From 5430437bfdebd426d1be6672941d62c1a82073b4 Mon Sep 17 00:00:00 2001 From: ywkj Date: Sun, 26 Apr 2026 20:14:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=20ClientConfig=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=92=8C=20clientConfig()=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auth-cli.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/auth-cli.ts b/src/auth-cli.ts index e20a343..beec1d8 100644 --- a/src/auth-cli.ts +++ b/src/auth-cli.ts @@ -55,6 +55,20 @@ export interface SessionResponse { hookToken?: string; } +export interface ClientConfig { + clientId: string; + name: string; + status: string; + metadata: { + provider?: { + api_key?: string; + base_url?: string; + model?: string; + }; + [key: string]: unknown; + }; +} + export interface SkillClientOptions { apiBase?: string; dryRun?: boolean; @@ -91,6 +105,13 @@ export class SkillClient { return JSON.parse(runCli('session')); } + async clientConfig(): Promise { + if (this.dryRun) { + return { clientId: '', name: '', status: 'active', metadata: {} }; + } + return JSON.parse(runCli('client-config')); + } + async get(urlPath: string): Promise { return this.request('GET', urlPath); }