@blade-hq/agent-client 2612.0.0-beta.74 → 2612.0.0-beta.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/{chunk-Y5UEXTRK.js → chunk-TT3SAXSF.js} +12 -2
- package/dist/chunk-TT3SAXSF.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/resources/auth.d.ts +16 -0
- package/package.json +1 -1
- package/public-api.md +13 -1
- package/dist/chunk-Y5UEXTRK.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type { SessionConfig, SessionDefinition, SessionSetupStage, SkillDefiniti
|
|
|
19
19
|
export type { QueuedMessage, QueuedMessageStatus, QueueOperationResult, SessionQueueSnapshot, } from "./session/queue";
|
|
20
20
|
export type { CommandHandler } from "./commands/registry";
|
|
21
21
|
export type { BladeChatMountRenderers, MountHandle, MountRenderer, MountRendererObject, MountResult, } from "./embed/mount-renderer";
|
|
22
|
-
export type { AuthResource, ExchangeCodeParams, ExchangeCodeResult, ProvidersResponse, UserInfo, } from "./resources/auth";
|
|
22
|
+
export type { AuthResource, Subaccount, ExchangeCodeParams, ExchangeCodeResult, ProvidersResponse, UserInfo, } from "./resources/auth";
|
|
23
23
|
export type { HeadlessResource } from "./resources/headless";
|
|
24
24
|
export type { RunOptions, RunResult, RunTrace } from "./types/sdk-profile";
|
|
25
25
|
export type { ModelsResource, ModelCatalog, ModelOption } from "./resources/models";
|
package/dist/index.js
CHANGED
package/dist/internal.js
CHANGED
package/dist/resources/auth.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ export interface UserInfo {
|
|
|
9
9
|
auth_type: "casdoor";
|
|
10
10
|
is_admin?: boolean;
|
|
11
11
|
}
|
|
12
|
+
/** Managed execution account; its opaque ID belongs to the identity service. */
|
|
13
|
+
export interface Subaccount {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
avatar_url: string;
|
|
17
|
+
status: string;
|
|
18
|
+
}
|
|
12
19
|
export interface ProvidersResponse {
|
|
13
20
|
providers: Array<{
|
|
14
21
|
name: string;
|
|
@@ -43,6 +50,15 @@ export interface ExchangeCodeResult {
|
|
|
43
50
|
export declare class AuthResource {
|
|
44
51
|
private client;
|
|
45
52
|
constructor(client: BladeClient);
|
|
53
|
+
subaccounts(): Promise<{
|
|
54
|
+
items: Subaccount[];
|
|
55
|
+
}>;
|
|
56
|
+
createSubaccount(name: string, requestId: string): Promise<Subaccount>;
|
|
57
|
+
/** Server-side only: keep the returned execution credential out of the UI. */
|
|
58
|
+
subaccountCredential(id: string): Promise<{
|
|
59
|
+
account: Subaccount;
|
|
60
|
+
access_token: string;
|
|
61
|
+
}>;
|
|
46
62
|
/**
|
|
47
63
|
* 弹窗授权登录(浏览器专用):弹出后端授权页,用户点击"许可授权"后
|
|
48
64
|
* 自动取得 PAT 并热挂载到当前 client。等价于 client.login()。
|
package/package.json
CHANGED
package/public-api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
6
|
+
共 159 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `AccountComputer` (interface)
|
|
9
9
|
|
|
@@ -205,12 +205,15 @@ getContext: () => Record<string, unknown> | Promise<Record<string, unknown>>
|
|
|
205
205
|
## `AuthResource` (class)
|
|
206
206
|
|
|
207
207
|
```ts
|
|
208
|
+
createSubaccount: (name: string, requestId: string) => Promise<Subaccount>
|
|
208
209
|
exchangeCode: (params: ExchangeCodeParams) => Promise<ExchangeCodeResult>
|
|
209
210
|
getMe: (options?: { signal?: AbortSignal; }) => Promise<UserInfo>
|
|
210
211
|
getProviders: () => Promise<ProvidersResponse>
|
|
211
212
|
login: (options?: LoginOptions) => Promise<LoginResult>
|
|
212
213
|
logout: () => Promise<{ logout_url: string; }>
|
|
213
214
|
logoutToken: () => void
|
|
215
|
+
subaccountCredential: (id: string) => Promise<{ account: Subaccount; access_token: string; }>
|
|
216
|
+
subaccounts: () => Promise<{ items: Subaccount[]; }>
|
|
214
217
|
```
|
|
215
218
|
|
|
216
219
|
## `BladeApiError` (class)
|
|
@@ -1617,6 +1620,15 @@ export type SolutionDefinition =
|
|
|
1617
1620
|
| { files: TextFile[]; role?: string }
|
|
1618
1621
|
```
|
|
1619
1622
|
|
|
1623
|
+
## `Subaccount` (interface)
|
|
1624
|
+
|
|
1625
|
+
```ts
|
|
1626
|
+
avatar_url: string
|
|
1627
|
+
id: string
|
|
1628
|
+
name: string
|
|
1629
|
+
status: string
|
|
1630
|
+
```
|
|
1631
|
+
|
|
1620
1632
|
## `TextContentPart` (interface)
|
|
1621
1633
|
|
|
1622
1634
|
```ts
|