@blade-hq/agent-client 2612.0.0-beta.76 → 2612.0.0-beta.78
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 +24 -0
- package/dist/blade-client.d.ts +3 -0
- package/dist/{chunk-TT3SAXSF.js → chunk-5KC2WZOP.js} +256 -6
- package/dist/chunk-5KC2WZOP.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +9 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +11 -1
- package/dist/internal.js.map +1 -1
- package/dist/pack-page-bridge.d.ts +11 -0
- package/dist/resources/connectors.d.ts +63 -1
- package/dist/resources/pack-records.d.ts +26 -0
- package/dist/resources/phones.d.ts +14 -17
- package/dist/resources/profile.d.ts +100 -0
- package/dist/resources/sessions.d.ts +20 -1
- package/dist/session/queue.d.ts +2 -0
- package/dist/shared/pack-events.d.ts +4 -0
- package/dist/types/socket-events.d.ts +20 -0
- package/package.json +1 -1
- package/public-api.md +175 -2
- package/dist/chunk-TT3SAXSF.js.map +0 -1
package/public-api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
6
|
+
共 176 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `AccountComputer` (interface)
|
|
9
9
|
|
|
@@ -202,6 +202,12 @@ cli: AppCliDefinition | undefined
|
|
|
202
202
|
getContext: () => Record<string, unknown> | Promise<Record<string, unknown>>
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
+
## `attachPackPageBridge` (function)
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
attachPackPageBridge: (options: { client: BladeClient; frame: Window; pack: string; collections: readonly string[]; openSession: (sessionId: string) => void; host?: Window; }) => () => void
|
|
209
|
+
```
|
|
210
|
+
|
|
205
211
|
## `AuthResource` (class)
|
|
206
212
|
|
|
207
213
|
```ts
|
|
@@ -268,8 +274,10 @@ logoutToken: () => void
|
|
|
268
274
|
models: ModelsResource
|
|
269
275
|
onSocketReplaced: (listener: () => void) => () => void
|
|
270
276
|
options: BladeClientOptions
|
|
277
|
+
packs: PacksResource
|
|
271
278
|
phones: PhonesResource
|
|
272
279
|
plugins: PluginsResource
|
|
280
|
+
profile: ProfileResource
|
|
273
281
|
requestCommand: (event: string, payload: Record<string, unknown>, timeoutMs: number) => Promise<Record<string, unknown>>
|
|
274
282
|
responseFromInit: (path: string, init?: RequestInit) => Promise<Response>
|
|
275
283
|
sandbox: SandboxResource
|
|
@@ -623,7 +631,7 @@ url: string | null | undefined
|
|
|
623
631
|
```ts
|
|
624
632
|
audit_events: ConnectorAuditEvent[]
|
|
625
633
|
connection: ConnectorAuthorization
|
|
626
|
-
runtime: ConnectorRuntimeDiagnostics | undefined
|
|
634
|
+
runtime: ConnectorRuntimeDiagnostics | { last_sync_at_ms: number; next_retry_at_ms: number; consecutive_failures: number; } | undefined
|
|
627
635
|
```
|
|
628
636
|
|
|
629
637
|
## `ConnectorDomain` (interface)
|
|
@@ -661,6 +669,61 @@ template: boolean | undefined
|
|
|
661
669
|
user_status: "unknown" | "granted" | "not_granted" | undefined
|
|
662
670
|
```
|
|
663
671
|
|
|
672
|
+
## `ConnectorPushSetting` (interface)
|
|
673
|
+
|
|
674
|
+
```ts
|
|
675
|
+
default: string
|
|
676
|
+
description: string
|
|
677
|
+
id: string
|
|
678
|
+
next_push_at: number | null
|
|
679
|
+
options: { value: string; label: string; interval_seconds?: number; }[]
|
|
680
|
+
value: string
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
## `ConnectorPushSettings` (interface)
|
|
684
|
+
|
|
685
|
+
```ts
|
|
686
|
+
ack_reaction: boolean | undefined
|
|
687
|
+
ack_reaction_available: boolean | undefined
|
|
688
|
+
connection_id: string
|
|
689
|
+
items: ConnectorPushSetting[]
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
## `ConnectorPushSettingsResult` (type)
|
|
693
|
+
|
|
694
|
+
```ts
|
|
695
|
+
export type ConnectorPushSettingsResult =
|
|
696
|
+
| (ConnectorPushSettings & { available: true })
|
|
697
|
+
| { available: false; reason: string }
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
## `ConnectorRuleGroup` (interface)
|
|
701
|
+
|
|
702
|
+
```ts
|
|
703
|
+
authorization: "unknown" | "required" | "authorized" | undefined
|
|
704
|
+
category: string | undefined
|
|
705
|
+
category_name: string | undefined
|
|
706
|
+
current: ConnectorRuleValue
|
|
707
|
+
default: ConnectorRuleValue
|
|
708
|
+
description: string
|
|
709
|
+
id: string
|
|
710
|
+
label: string
|
|
711
|
+
tool_details: { name: string; label: string; }[]
|
|
712
|
+
tools: string[]
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
## `ConnectorRules` (interface)
|
|
716
|
+
|
|
717
|
+
```ts
|
|
718
|
+
groups: ConnectorRuleGroup[]
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
## `ConnectorRuleValue` (type)
|
|
722
|
+
|
|
723
|
+
```ts
|
|
724
|
+
export type ConnectorRuleValue = "allow" | "ask" | "off"
|
|
725
|
+
```
|
|
726
|
+
|
|
664
727
|
## `ConnectorRuntimeDiagnostics` (interface)
|
|
665
728
|
|
|
666
729
|
```ts
|
|
@@ -686,12 +749,17 @@ delete: (name: string) => Promise<{ name: string; }>
|
|
|
686
749
|
diagnostics: (name: string, init?: RequestInit) => Promise<ConnectorDiagnostics>
|
|
687
750
|
disconnect: (name: string) => Promise<ConnectorConnectionView>
|
|
688
751
|
downloadFile: (name: string, artifactId: string) => Promise<Blob>
|
|
752
|
+
guide: (name: string, section?: "first-connection", init?: RequestInit) => Promise<{ description: string; content: string; }>
|
|
689
753
|
list: (init?: RequestInit) => Promise<{ connectors: AccountConnector[]; }>
|
|
690
754
|
listForSession: (sessionId: string, init?: RequestInit) => Promise<{ connectors: AccountConnector[]; }>
|
|
755
|
+
pushSettings: (name: string, init?: RequestInit) => Promise<ConnectorPushSettingsResult>
|
|
691
756
|
read: (name: string, init?: RequestInit) => Promise<ConnectorConnectionView>
|
|
757
|
+
rules: (name: string) => Promise<ConnectorRules>
|
|
758
|
+
setPushSettings: (name: string, changes: Record<string, string | boolean>, init?: RequestInit & { expectedConnectionId?: string; }) => Promise<ConnectorPushSettingsResult>
|
|
692
759
|
startBrowserAuthorization: (name: string, sessionId?: string) => Promise<{ session_id: string; view: ConnectorConnectionView; }>
|
|
693
760
|
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
761
|
update: (name: string, draft: ConnectorDraft) => Promise<{ name: string; }>
|
|
762
|
+
updateRules: (name: string, set: Record<string, ConnectorRuleValue>) => Promise<ConnectorRules>
|
|
695
763
|
uploadFile: (name: string, file: Blob, fileName: string, requestId: string) => Promise<ConnectorArtifact>
|
|
696
764
|
verify: (name: string) => Promise<ConnectorConnectionView>
|
|
697
765
|
```
|
|
@@ -858,6 +926,16 @@ image_url: { url: string; source_path?: string; width?: number; height?: number;
|
|
|
858
926
|
type: "image_url"
|
|
859
927
|
```
|
|
860
928
|
|
|
929
|
+
## `InstalledPack` (interface)
|
|
930
|
+
|
|
931
|
+
```ts
|
|
932
|
+
digest: string
|
|
933
|
+
enabled: boolean
|
|
934
|
+
files: Record<string, string>
|
|
935
|
+
manifest: PackManifest
|
|
936
|
+
source: "builtin" | "user" | "fixture"
|
|
937
|
+
```
|
|
938
|
+
|
|
861
939
|
## `LlmResource` (class)
|
|
862
940
|
|
|
863
941
|
```ts
|
|
@@ -989,6 +1067,81 @@ normalizePluginRefs: (value: unknown) => PluginRef[]
|
|
|
989
1067
|
normalizeTopicAssetRefs: (value: unknown) => TopicAssetRef[]
|
|
990
1068
|
```
|
|
991
1069
|
|
|
1070
|
+
## `PackLayoutOperation` (interface)
|
|
1071
|
+
|
|
1072
|
+
```ts
|
|
1073
|
+
after: string | undefined
|
|
1074
|
+
component: string | undefined
|
|
1075
|
+
op: "hide" | "show" | "add" | "move"
|
|
1076
|
+
region: string | undefined
|
|
1077
|
+
target: string | undefined
|
|
1078
|
+
```
|
|
1079
|
+
|
|
1080
|
+
## `PackManifest` (interface)
|
|
1081
|
+
|
|
1082
|
+
```ts
|
|
1083
|
+
collections: { name: string; title?: string; fields: Record<string, string>; }[] | undefined
|
|
1084
|
+
components: ProfileComponent[] | undefined
|
|
1085
|
+
hooks: Record<string, unknown[]> | undefined
|
|
1086
|
+
layout: PackLayoutOperation[] | undefined
|
|
1087
|
+
limits: { daily_wakeups: number; consecutive_event_turns: number; } | undefined
|
|
1088
|
+
name: string
|
|
1089
|
+
persona: string | undefined
|
|
1090
|
+
title: string
|
|
1091
|
+
triggers: { id: string; on: string; function: string; deliver: Record<string, unknown>; }[] | undefined
|
|
1092
|
+
version: string
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
## `PackProfile` (interface)
|
|
1096
|
+
|
|
1097
|
+
```ts
|
|
1098
|
+
agent: { hooks: { pack: string; hooks: Record<string, unknown[]>; }[]; persona: { pack: string; text: string; }[]; collections: { pack: string; name: string; title?: string; fields: Record<string, string>; }[]; }
|
|
1099
|
+
hidden: string[]
|
|
1100
|
+
packs: { name: string; version: string; title: string; }[]
|
|
1101
|
+
regions: Record<string, ProfileComponent[]>
|
|
1102
|
+
version: string
|
|
1103
|
+
warnings: string[]
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
## `PackRecord` (interface)
|
|
1107
|
+
|
|
1108
|
+
```ts
|
|
1109
|
+
data: Record<string, string | number | boolean>
|
|
1110
|
+
id: string
|
|
1111
|
+
rev: number
|
|
1112
|
+
updated_at: string
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
## `PackRecordQuery` (interface)
|
|
1116
|
+
|
|
1117
|
+
```ts
|
|
1118
|
+
filter: Record<string, string | number | boolean> | undefined
|
|
1119
|
+
limit: number | undefined
|
|
1120
|
+
offset: number | undefined
|
|
1121
|
+
```
|
|
1122
|
+
|
|
1123
|
+
## `PackRecordsResource` (class)
|
|
1124
|
+
|
|
1125
|
+
```ts
|
|
1126
|
+
delete: (pack: string, collection: string, id: string) => Promise<{ deleted: boolean; }>
|
|
1127
|
+
list: (pack: string, collection: string, query?: PackRecordQuery, init?: RequestInit) => Promise<{ items: PackRecord[]; }>
|
|
1128
|
+
onChanged: (pack: string, collection: string, listener: () => void) => () => void
|
|
1129
|
+
upsert: (pack: string, collection: string, data: PackRecord["data"], id?: string) => Promise<PackRecord>
|
|
1130
|
+
```
|
|
1131
|
+
|
|
1132
|
+
## `PacksResource` (class)
|
|
1133
|
+
|
|
1134
|
+
```ts
|
|
1135
|
+
disable: (name: string) => Promise<PackProfile>
|
|
1136
|
+
enable: (name: string) => Promise<PackProfile>
|
|
1137
|
+
file: (name: string, path: string, init?: RequestInit) => Promise<string>
|
|
1138
|
+
list: () => Promise<{ items: InstalledPack[]; }>
|
|
1139
|
+
records: PackRecordsResource
|
|
1140
|
+
reset: () => Promise<PackProfile>
|
|
1141
|
+
save: (manifest: PackManifest, files?: Record<string, string>) => Promise<PackProfile>
|
|
1142
|
+
sessionByTag: (name: string, tag: string, init?: RequestInit) => Promise<{ session_id: string; }>
|
|
1143
|
+
```
|
|
1144
|
+
|
|
992
1145
|
## `PaginatedSessionsResult` (interface)
|
|
993
1146
|
|
|
994
1147
|
```ts
|
|
@@ -1119,6 +1272,25 @@ reasoningLevel: "max" | "off" | "minimal" | "low" | "medium" | "high" | "xhigh"
|
|
|
1119
1272
|
thinkingOverride: boolean | undefined
|
|
1120
1273
|
```
|
|
1121
1274
|
|
|
1275
|
+
## `ProfileComponent` (interface)
|
|
1276
|
+
|
|
1277
|
+
```ts
|
|
1278
|
+
entry: string | undefined
|
|
1279
|
+
id: string
|
|
1280
|
+
kind: "iframe" | undefined
|
|
1281
|
+
pack: string | undefined
|
|
1282
|
+
regions: string[]
|
|
1283
|
+
reserved: boolean | undefined
|
|
1284
|
+
title: string
|
|
1285
|
+
```
|
|
1286
|
+
|
|
1287
|
+
## `ProfileResource` (class)
|
|
1288
|
+
|
|
1289
|
+
```ts
|
|
1290
|
+
get: (init?: RequestInit) => Promise<PackProfile>
|
|
1291
|
+
onChanged: (listener: () => void) => () => void
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1122
1294
|
## `ProvidersResponse` (interface)
|
|
1123
1295
|
|
|
1124
1296
|
```ts
|
|
@@ -1152,6 +1324,7 @@ content: string
|
|
|
1152
1324
|
created_at: string
|
|
1153
1325
|
error: string | undefined
|
|
1154
1326
|
id: string
|
|
1327
|
+
next_turn_only: boolean | undefined
|
|
1155
1328
|
position: number
|
|
1156
1329
|
status: QueuedMessageStatus
|
|
1157
1330
|
target_run_id: string | undefined
|