@blade-hq/agent-client 2612.0.0-beta.76 → 2612.0.0-beta.77
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 +8 -0
- package/dist/{chunk-TT3SAXSF.js → chunk-4QJ7JUBB.js} +24 -3
- package/dist/chunk-4QJ7JUBB.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/connectors.d.ts +25 -0
- package/dist/resources/sessions.d.ts +20 -1
- package/package.json +1 -1
- package/public-api.md +31 -1
- package/dist/chunk-TT3SAXSF.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BladeApplicationClient } from "./application-client";
|
|
2
2
|
export { BladeClient } from "./blade-client";
|
|
3
3
|
export { ConnectorsResource } from "./resources/connectors";
|
|
4
|
-
export type { ConnectorArtifact, ConnectorApprovalStatus, ConnectorDomain, ConnectorAuthorization, ConnectorAuthorizationAction, ConnectorAuthorizationOptions, ConnectorAuthorizationPlan, ConnectorCapability, ConnectorPermission, ConnectorAuthorizationFailure, ConnectorAuthorizationStep, ConnectorDiagnostics, ConnectorRuntimeDiagnostics, ConnectorAuditEvent, AccountConnector, ConnectorDraft, ConnectorConnection, ConnectorConnectionView } from "./resources/connectors";
|
|
4
|
+
export type { ConnectorRuleValue, ConnectorRuleGroup, ConnectorRules, ConnectorArtifact, ConnectorApprovalStatus, ConnectorDomain, ConnectorAuthorization, ConnectorAuthorizationAction, ConnectorAuthorizationOptions, ConnectorAuthorizationPlan, ConnectorCapability, ConnectorPermission, ConnectorAuthorizationFailure, ConnectorAuthorizationStep, ConnectorDiagnostics, ConnectorRuntimeDiagnostics, ConnectorAuditEvent, AccountConnector, ConnectorDraft, ConnectorConnection, ConnectorConnectionView } from "./resources/connectors";
|
|
5
5
|
export type { BladeClientOptions, UploadProgress } from "./blade-client";
|
|
6
6
|
export { BladeApiError } from "./rest";
|
|
7
7
|
export type { LoginOptions, LoginResult, TokenStorageMode } from "./auth-login";
|
package/dist/index.js
CHANGED
package/dist/internal.js
CHANGED
|
@@ -265,9 +265,34 @@ export interface ConnectorArtifact {
|
|
|
265
265
|
/** Authenticated same-origin path; use downloadFile rather than a public URL. */
|
|
266
266
|
download_path: string;
|
|
267
267
|
}
|
|
268
|
+
export type ConnectorRuleValue = "allow" | "ask" | "off";
|
|
269
|
+
export interface ConnectorRuleGroup {
|
|
270
|
+
id: string;
|
|
271
|
+
label: string;
|
|
272
|
+
description: string;
|
|
273
|
+
default: ConnectorRuleValue;
|
|
274
|
+
current: ConnectorRuleValue;
|
|
275
|
+
tools: string[];
|
|
276
|
+
tool_details: Array<{
|
|
277
|
+
name: string;
|
|
278
|
+
label: string;
|
|
279
|
+
}>;
|
|
280
|
+
category?: string;
|
|
281
|
+
category_name?: string;
|
|
282
|
+
authorization?: "authorized" | "required" | "unknown";
|
|
283
|
+
}
|
|
284
|
+
export interface ConnectorRules {
|
|
285
|
+
groups: ConnectorRuleGroup[];
|
|
286
|
+
}
|
|
268
287
|
export declare class ConnectorsResource {
|
|
269
288
|
private client;
|
|
270
289
|
constructor(client: BladeClient);
|
|
290
|
+
rules(name: string): Promise<ConnectorRules>;
|
|
291
|
+
updateRules(name: string, set: Record<string, ConnectorRuleValue>): Promise<ConnectorRules>;
|
|
292
|
+
guide(name: string, section?: "first-connection", init?: RequestInit): Promise<{
|
|
293
|
+
description: string;
|
|
294
|
+
content: string;
|
|
295
|
+
}>;
|
|
271
296
|
/** Stage an explicit attachment in the current user's SW connection. Reuse requestId on retry. */
|
|
272
297
|
uploadFile(name: string, file: Blob, fileName: string, requestId: string): Promise<ConnectorArtifact>;
|
|
273
298
|
/** Fetch a private artifact through BA authentication; no SW PAT or public URL is exposed. */
|
|
@@ -298,11 +298,30 @@ export interface SessionTurnsQuery {
|
|
|
298
298
|
* 和"这次没取到"(网络 / 5xx / 鉴权)分开:前者说明这个定位目标已经没了,后者只说明这次失败。
|
|
299
299
|
*/
|
|
300
300
|
export declare function isEntryGoneError(error: unknown): boolean;
|
|
301
|
-
/**
|
|
301
|
+
/** 分段里的一次用户发言(脉络展开后的一项)。 */
|
|
302
|
+
export interface SessionTurnIndexEntry {
|
|
303
|
+
entryId: string;
|
|
304
|
+
preview: string;
|
|
305
|
+
createdAt: string | null;
|
|
306
|
+
/** AskUserQuestion 的应答:消息列表里没有独立行,点它定位不到。 */
|
|
307
|
+
answer?: boolean;
|
|
308
|
+
}
|
|
309
|
+
/** 这一段交付的产物(文件 / 链接),与 post_chat_followup.final_artifacts 同形。 */
|
|
310
|
+
export interface SessionTurnIndexArtifact {
|
|
311
|
+
kind: "file" | "link";
|
|
312
|
+
target: string;
|
|
313
|
+
label: string;
|
|
314
|
+
}
|
|
315
|
+
/** 侧栏「消息历史」的一条:一个小结分段的头。 */
|
|
302
316
|
export interface SessionTurnIndexItem {
|
|
303
317
|
entryId: string;
|
|
304
318
|
preview: string;
|
|
319
|
+
recaption?: string;
|
|
320
|
+
/** 这一段交付的产物,脉络卡片上直接列出来。 */
|
|
321
|
+
artifacts?: SessionTurnIndexArtifact[];
|
|
305
322
|
createdAt: string | null;
|
|
323
|
+
/** 这一段(从上一个小结之后到本小结)里的每一次用户发言。 */
|
|
324
|
+
entries?: SessionTurnIndexEntry[];
|
|
306
325
|
}
|
|
307
326
|
export interface SessionTurnIndex {
|
|
308
327
|
sessionId: string;
|
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
|
+
共 162 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `AccountComputer` (interface)
|
|
9
9
|
|
|
@@ -661,6 +661,33 @@ template: boolean | undefined
|
|
|
661
661
|
user_status: "unknown" | "granted" | "not_granted" | undefined
|
|
662
662
|
```
|
|
663
663
|
|
|
664
|
+
## `ConnectorRuleGroup` (interface)
|
|
665
|
+
|
|
666
|
+
```ts
|
|
667
|
+
authorization: "unknown" | "required" | "authorized" | undefined
|
|
668
|
+
category: string | undefined
|
|
669
|
+
category_name: string | undefined
|
|
670
|
+
current: ConnectorRuleValue
|
|
671
|
+
default: ConnectorRuleValue
|
|
672
|
+
description: string
|
|
673
|
+
id: string
|
|
674
|
+
label: string
|
|
675
|
+
tool_details: { name: string; label: string; }[]
|
|
676
|
+
tools: string[]
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
## `ConnectorRules` (interface)
|
|
680
|
+
|
|
681
|
+
```ts
|
|
682
|
+
groups: ConnectorRuleGroup[]
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
## `ConnectorRuleValue` (type)
|
|
686
|
+
|
|
687
|
+
```ts
|
|
688
|
+
export type ConnectorRuleValue = "allow" | "ask" | "off"
|
|
689
|
+
```
|
|
690
|
+
|
|
664
691
|
## `ConnectorRuntimeDiagnostics` (interface)
|
|
665
692
|
|
|
666
693
|
```ts
|
|
@@ -686,12 +713,15 @@ delete: (name: string) => Promise<{ name: string; }>
|
|
|
686
713
|
diagnostics: (name: string, init?: RequestInit) => Promise<ConnectorDiagnostics>
|
|
687
714
|
disconnect: (name: string) => Promise<ConnectorConnectionView>
|
|
688
715
|
downloadFile: (name: string, artifactId: string) => Promise<Blob>
|
|
716
|
+
guide: (name: string, section?: "first-connection", init?: RequestInit) => Promise<{ description: string; content: string; }>
|
|
689
717
|
list: (init?: RequestInit) => Promise<{ connectors: AccountConnector[]; }>
|
|
690
718
|
listForSession: (sessionId: string, init?: RequestInit) => Promise<{ connectors: AccountConnector[]; }>
|
|
691
719
|
read: (name: string, init?: RequestInit) => Promise<ConnectorConnectionView>
|
|
720
|
+
rules: (name: string) => Promise<ConnectorRules>
|
|
692
721
|
startBrowserAuthorization: (name: string, sessionId?: string) => Promise<{ session_id: string; view: ConnectorConnectionView; }>
|
|
693
722
|
startGeneration: ({ connector, onCreated, initiator }?: { connector?: Pick<AccountConnector, "name" | "display_name">; onCreated?: (created: { session_id: string; intent: string; }) => void | Promise<void>; initiator?: "ui" | "sdk"; }) => Promise<{ session_id: string; sent: boolean; }>
|
|
694
723
|
update: (name: string, draft: ConnectorDraft) => Promise<{ name: string; }>
|
|
724
|
+
updateRules: (name: string, set: Record<string, ConnectorRuleValue>) => Promise<ConnectorRules>
|
|
695
725
|
uploadFile: (name: string, file: Blob, fileName: string, requestId: string) => Promise<ConnectorArtifact>
|
|
696
726
|
verify: (name: string) => Promise<ConnectorConnectionView>
|
|
697
727
|
```
|