From eb8e7a7dafb37a4e91ff9708ab1dece3e9d4db2c Mon Sep 17 00:00:00 2001 From: ywkj Date: Sun, 26 Apr 2026 20:15:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=8C=E6=AD=A5=20auth-cli.ts=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=20clientConfig()=20=E6=96=B9=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); }