@blade-hq/agent-client 2612.0.0-beta.85 → 2612.0.0-beta.87
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 +50 -31
- package/dist/browser-capability.d.ts +19 -0
- package/dist/{chunk-AKYL4RUF.js → chunk-WXZ5AWAT.js} +3506 -3835
- package/dist/chunk-WXZ5AWAT.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +9 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +11 -1
- package/dist/internal.js.map +1 -1
- package/dist/resources/headless.d.ts +2 -1
- package/dist/resources/sessions.d.ts +9 -0
- package/dist/schemas/context-attachments.d.ts +6 -0
- package/dist/session/agent-session.d.ts +39 -51
- package/dist/session/definition.d.ts +2 -1
- package/dist/session/log-cursor.d.ts +6 -0
- package/dist/tool-provider.d.ts +11 -0
- package/dist/types/sdk-profile.d.ts +2 -0
- package/dist/types/socket-events.d.ts +150 -27
- package/package.json +1 -1
- package/public-api.md +78 -27
- package/dist/chunk-AKYL4RUF.js.map +0 -1
|
@@ -27,12 +27,15 @@ export declare namespace ChatSendPayloadSchema {
|
|
|
27
27
|
type Name = string;
|
|
28
28
|
type SessionId = (string | null);
|
|
29
29
|
type Path = (string | null);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
/**
|
|
31
|
+
* @maxItems 20
|
|
32
|
+
*/
|
|
33
|
+
type ContextSources = [] | [ContextSource] | [ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource];
|
|
34
|
+
type Source = string;
|
|
33
35
|
type AskuserAnswer = ({
|
|
34
36
|
[k: string]: unknown;
|
|
35
37
|
} | null);
|
|
38
|
+
type Mode = (string | null);
|
|
36
39
|
type Model = (string | null);
|
|
37
40
|
type ThinkingOverride = (boolean | null);
|
|
38
41
|
type ReasoningLevel = (("off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") | null);
|
|
@@ -44,13 +47,6 @@ export declare namespace ChatSendPayloadSchema {
|
|
|
44
47
|
type Quotes = (unknown[] | null);
|
|
45
48
|
type DeprecateEntryIds = (string[] | null);
|
|
46
49
|
type ReplayDecision = (string | null);
|
|
47
|
-
type RuntimeEnv = ({
|
|
48
|
-
[k: string]: string;
|
|
49
|
-
} | null);
|
|
50
|
-
type AppContext = ({
|
|
51
|
-
[k: string]: unknown;
|
|
52
|
-
} | null);
|
|
53
|
-
type CompactionRatio = (number | null);
|
|
54
50
|
/**
|
|
55
51
|
* @maxItems 20
|
|
56
52
|
*/
|
|
@@ -70,13 +66,29 @@ export declare namespace ChatSendPayloadSchema {
|
|
|
70
66
|
type TopicId = string;
|
|
71
67
|
type Path1 = string;
|
|
72
68
|
type QueueWhenRunning = boolean;
|
|
69
|
+
type QueuePriority = (number | null);
|
|
70
|
+
type ReleaseNativeWait = (boolean | null);
|
|
71
|
+
type BatchKey = (string | null);
|
|
72
|
+
type InputKind = (("user" | "external_event" | "system") | null);
|
|
73
|
+
type ReceivedAt = (string | null);
|
|
74
|
+
type TimeZone = (string | null);
|
|
75
|
+
type SessionId1 = string;
|
|
76
|
+
type ClientRequestId = (string | null);
|
|
77
|
+
type RuntimeEnv = ({
|
|
78
|
+
[k: string]: string;
|
|
79
|
+
} | null);
|
|
80
|
+
type AppContext = ({
|
|
81
|
+
[k: string]: unknown;
|
|
82
|
+
} | null);
|
|
83
|
+
type CompactionRatio = (number | null);
|
|
84
|
+
/**
|
|
85
|
+
* Deprecated legacy chat:send payload. New clients use AgentSession.send / chat:append.
|
|
86
|
+
*/
|
|
73
87
|
interface ChatSendPayload {
|
|
74
88
|
context_attachments?: ContextAttachments;
|
|
75
|
-
|
|
76
|
-
message: Message;
|
|
77
|
-
client_request_id?: ClientRequestId;
|
|
78
|
-
mode?: Mode;
|
|
89
|
+
context_sources?: ContextSources;
|
|
79
90
|
askuser_answer?: AskuserAnswer;
|
|
91
|
+
mode?: Mode;
|
|
80
92
|
model?: Model;
|
|
81
93
|
thinking_override?: ThinkingOverride;
|
|
82
94
|
reasoning_level?: ReasoningLevel;
|
|
@@ -84,12 +96,21 @@ export declare namespace ChatSendPayloadSchema {
|
|
|
84
96
|
output_schema?: OutputSchema;
|
|
85
97
|
whatif?: (WhatIfPayload | null);
|
|
86
98
|
replay_decision?: ReplayDecision;
|
|
87
|
-
runtime_env?: RuntimeEnv;
|
|
88
|
-
app_context?: AppContext;
|
|
89
|
-
compaction_ratio?: CompactionRatio;
|
|
90
99
|
refs?: Refs;
|
|
91
100
|
topic_asset_refs?: TopicAssetRefs;
|
|
92
101
|
queue_when_running?: QueueWhenRunning;
|
|
102
|
+
queue_priority?: QueuePriority;
|
|
103
|
+
release_native_wait?: ReleaseNativeWait;
|
|
104
|
+
batch_key?: BatchKey;
|
|
105
|
+
input_kind?: InputKind;
|
|
106
|
+
received_at?: ReceivedAt;
|
|
107
|
+
time_zone?: TimeZone;
|
|
108
|
+
session_id: SessionId1;
|
|
109
|
+
message: Message;
|
|
110
|
+
client_request_id?: ClientRequestId;
|
|
111
|
+
runtime_env?: RuntimeEnv;
|
|
112
|
+
app_context?: AppContext;
|
|
113
|
+
compaction_ratio?: CompactionRatio;
|
|
93
114
|
[k: string]: unknown;
|
|
94
115
|
}
|
|
95
116
|
interface ContextAttachment {
|
|
@@ -106,7 +127,11 @@ export declare namespace ChatSendPayloadSchema {
|
|
|
106
127
|
session_id?: SessionId;
|
|
107
128
|
path?: Path;
|
|
108
129
|
}
|
|
109
|
-
interface
|
|
130
|
+
interface ContextSource {
|
|
131
|
+
source: Source;
|
|
132
|
+
arguments?: Arguments;
|
|
133
|
+
}
|
|
134
|
+
interface Arguments {
|
|
110
135
|
[k: string]: unknown;
|
|
111
136
|
}
|
|
112
137
|
interface WhatIfPayload {
|
|
@@ -134,6 +159,9 @@ export declare namespace ChatSendPayloadSchema {
|
|
|
134
159
|
path: Path1;
|
|
135
160
|
[k: string]: unknown;
|
|
136
161
|
}
|
|
162
|
+
interface Message {
|
|
163
|
+
[k: string]: unknown;
|
|
164
|
+
}
|
|
137
165
|
}
|
|
138
166
|
export type ChatSendPayload = ChatSendPayloadSchema.ChatSendPayload;
|
|
139
167
|
export declare namespace ChatStopPayloadSchema {
|
|
@@ -148,8 +176,7 @@ export declare namespace ChatStopPayloadSchema {
|
|
|
148
176
|
export type ChatStopPayload = ChatStopPayloadSchema.ChatStopPayload;
|
|
149
177
|
export declare namespace ChatAppendPayloadSchema {
|
|
150
178
|
type SessionId = string;
|
|
151
|
-
type
|
|
152
|
-
type ClientRequestId = (string | null);
|
|
179
|
+
type ClientRequestId = string;
|
|
153
180
|
/**
|
|
154
181
|
* @maxItems 20
|
|
155
182
|
*/
|
|
@@ -169,27 +196,91 @@ export declare namespace ChatAppendPayloadSchema {
|
|
|
169
196
|
type Name = string;
|
|
170
197
|
type SessionId1 = (string | null);
|
|
171
198
|
type Path = (string | null);
|
|
172
|
-
|
|
173
|
-
|
|
199
|
+
/**
|
|
200
|
+
* @maxItems 20
|
|
201
|
+
*/
|
|
202
|
+
type ContextSources = [] | [ContextSource] | [ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource] | [ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource, ContextSource];
|
|
203
|
+
type Source = string;
|
|
204
|
+
type AskuserAnswer = ({
|
|
205
|
+
[k: string]: unknown;
|
|
206
|
+
} | null);
|
|
174
207
|
type Mode = (("planning" | "executing") | null);
|
|
175
208
|
type Model = (string | null);
|
|
176
209
|
type ThinkingOverride = (boolean | null);
|
|
177
210
|
type ReasoningLevel = (("off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") | null);
|
|
211
|
+
type Headless = boolean;
|
|
212
|
+
type OutputSchema = ({
|
|
213
|
+
[k: string]: unknown;
|
|
214
|
+
} | null);
|
|
215
|
+
type FromStep = (number | string | null);
|
|
216
|
+
type Quotes = (unknown[] | null);
|
|
217
|
+
type DeprecateEntryIds = (string[] | null);
|
|
218
|
+
type ReplayDecision = (("keep_replay" | "continue_replay") | null);
|
|
219
|
+
/**
|
|
220
|
+
* @maxItems 20
|
|
221
|
+
*/
|
|
222
|
+
type Refs = [] | [(PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)];
|
|
223
|
+
type Provider = "plugin";
|
|
224
|
+
type Plugin = string;
|
|
225
|
+
type Server = string;
|
|
226
|
+
type Id1 = string;
|
|
227
|
+
type Label1 = string;
|
|
228
|
+
type Provider1 = "skill";
|
|
229
|
+
type Id2 = string;
|
|
230
|
+
type Label2 = string;
|
|
231
|
+
/**
|
|
232
|
+
* @maxItems 20
|
|
233
|
+
*/
|
|
234
|
+
type TopicAssetRefs = [] | [TopicAssetRef] | [TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef];
|
|
235
|
+
type TopicId = string;
|
|
236
|
+
type Path1 = string;
|
|
237
|
+
type QueueWhenRunning = boolean;
|
|
238
|
+
type QueuePriority = (number | null);
|
|
239
|
+
type ReleaseNativeWait = (boolean | null);
|
|
240
|
+
type BatchKey = (string | null);
|
|
241
|
+
type InputKind = (("user" | "external_event" | "system") | null);
|
|
242
|
+
type ReceivedAt = (string | null);
|
|
243
|
+
type TimeZone = (string | null);
|
|
244
|
+
type AppContext = ({
|
|
245
|
+
[k: string]: unknown;
|
|
246
|
+
} | null);
|
|
247
|
+
type ReplayResolution = (("keep_replay" | "continue_replay") | null);
|
|
178
248
|
interface ChatAppendPayload {
|
|
179
249
|
session_id: SessionId;
|
|
180
250
|
message: Message;
|
|
181
|
-
client_request_id
|
|
182
|
-
|
|
251
|
+
client_request_id: ClientRequestId;
|
|
252
|
+
options?: SendOptions;
|
|
253
|
+
app_context?: AppContext;
|
|
254
|
+
replay_resolution?: ReplayResolution;
|
|
183
255
|
[k: string]: unknown;
|
|
184
256
|
}
|
|
185
|
-
interface
|
|
257
|
+
interface Message {
|
|
258
|
+
[k: string]: unknown;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Complete options for the single durable input protocol.
|
|
262
|
+
*/
|
|
263
|
+
interface SendOptions {
|
|
186
264
|
context_attachments?: ContextAttachments;
|
|
187
|
-
|
|
188
|
-
|
|
265
|
+
context_sources?: ContextSources;
|
|
266
|
+
askuser_answer?: AskuserAnswer;
|
|
189
267
|
mode?: Mode;
|
|
190
268
|
model?: Model;
|
|
191
269
|
thinking_override?: ThinkingOverride;
|
|
192
270
|
reasoning_level?: ReasoningLevel;
|
|
271
|
+
headless?: Headless;
|
|
272
|
+
output_schema?: OutputSchema;
|
|
273
|
+
whatif?: (WhatIfPayload | null);
|
|
274
|
+
replay_decision?: ReplayDecision;
|
|
275
|
+
refs?: Refs;
|
|
276
|
+
topic_asset_refs?: TopicAssetRefs;
|
|
277
|
+
queue_when_running?: QueueWhenRunning;
|
|
278
|
+
queue_priority?: QueuePriority;
|
|
279
|
+
release_native_wait?: ReleaseNativeWait;
|
|
280
|
+
batch_key?: BatchKey;
|
|
281
|
+
input_kind?: InputKind;
|
|
282
|
+
received_at?: ReceivedAt;
|
|
283
|
+
time_zone?: TimeZone;
|
|
193
284
|
}
|
|
194
285
|
interface ContextAttachment {
|
|
195
286
|
id: Id;
|
|
@@ -205,6 +296,38 @@ export declare namespace ChatAppendPayloadSchema {
|
|
|
205
296
|
session_id?: SessionId1;
|
|
206
297
|
path?: Path;
|
|
207
298
|
}
|
|
299
|
+
interface ContextSource {
|
|
300
|
+
source: Source;
|
|
301
|
+
arguments?: Arguments;
|
|
302
|
+
}
|
|
303
|
+
interface Arguments {
|
|
304
|
+
[k: string]: unknown;
|
|
305
|
+
}
|
|
306
|
+
interface WhatIfPayload {
|
|
307
|
+
from_step?: FromStep;
|
|
308
|
+
quotes?: Quotes;
|
|
309
|
+
deprecate_entry_ids?: DeprecateEntryIds;
|
|
310
|
+
[k: string]: unknown;
|
|
311
|
+
}
|
|
312
|
+
interface PluginRef {
|
|
313
|
+
provider: Provider;
|
|
314
|
+
plugin: Plugin;
|
|
315
|
+
server: Server;
|
|
316
|
+
id: Id1;
|
|
317
|
+
label: Label1;
|
|
318
|
+
[k: string]: unknown;
|
|
319
|
+
}
|
|
320
|
+
interface SkillRef {
|
|
321
|
+
provider: Provider1;
|
|
322
|
+
id: Id2;
|
|
323
|
+
label: Label2;
|
|
324
|
+
[k: string]: unknown;
|
|
325
|
+
}
|
|
326
|
+
interface TopicAssetRef {
|
|
327
|
+
topic_id: TopicId;
|
|
328
|
+
path: Path1;
|
|
329
|
+
[k: string]: unknown;
|
|
330
|
+
}
|
|
208
331
|
}
|
|
209
332
|
export type ChatAppendPayload = ChatAppendPayloadSchema.ChatAppendPayload;
|
|
210
333
|
export declare namespace ChatQueueRequestPayloadSchema {
|
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
|
+
共 211 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `AccountComputer` (interface)
|
|
9
9
|
|
|
@@ -90,16 +90,13 @@ locateEntry: (entryId: string) => Promise<boolean>
|
|
|
90
90
|
off: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => void
|
|
91
91
|
on: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => () => void
|
|
92
92
|
onCommand: (action: string, handler: CommandHandler) => () => void
|
|
93
|
-
prepareSend: (content: string, options?: PreparedSendOptions) => PreparedSend
|
|
94
|
-
queueMessage: (content: string) => Promise<QueueOperationResult>
|
|
95
93
|
refreshQueue: () => Promise<QueueOperationResult>
|
|
96
94
|
refreshRunningState: () => Promise<void>
|
|
97
95
|
reloadHistory: () => Promise<boolean>
|
|
98
96
|
reorderQueuedMessages: (expectedRevision: number, orderedIds: string[]) => Promise<QueueOperationResult>
|
|
99
97
|
resumeQueue: () => Promise<QueueOperationResult>
|
|
100
98
|
selectModel: (model: string) => Promise<boolean>
|
|
101
|
-
send: (content: MessageContent, options?: SendOptions) => Promise<
|
|
102
|
-
sendPrepared: (request: PreparedSend) => Promise<DeliveryReceipt>
|
|
99
|
+
send: (content: MessageContent, options?: SendOptions) => Promise<DeliveryReceipt>
|
|
103
100
|
sessionId: string
|
|
104
101
|
setReplaySpeed: (speed: ReplaySpeed) => Promise<void>
|
|
105
102
|
stop: (executionId?: string) => Promise<Record<string, unknown>>
|
|
@@ -307,6 +304,33 @@ token: string | (() => string | null | undefined) | undefined
|
|
|
307
304
|
tokenStorage: TokenStorageMode | undefined
|
|
308
305
|
```
|
|
309
306
|
|
|
307
|
+
## `BROWSER_DISABLED_CODE` (const)
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
BROWSER_DISABLED_CODE: "BROWSER_DISABLED"
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## `BrowserCapability` (interface)
|
|
314
|
+
|
|
315
|
+
```ts
|
|
316
|
+
enabled: boolean
|
|
317
|
+
reason: string
|
|
318
|
+
revision: string
|
|
319
|
+
source: string
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
## `BrowserDisabledError` (class)
|
|
323
|
+
|
|
324
|
+
```ts
|
|
325
|
+
cause: unknown
|
|
326
|
+
code: "BROWSER_DISABLED"
|
|
327
|
+
message: string
|
|
328
|
+
name: string
|
|
329
|
+
retryable: false
|
|
330
|
+
source: string
|
|
331
|
+
stack: string | undefined
|
|
332
|
+
```
|
|
333
|
+
|
|
310
334
|
## `CapabilitiesResource` (class)
|
|
311
335
|
|
|
312
336
|
```ts
|
|
@@ -453,6 +477,12 @@ topic_asset_refs: TopicAssetRef[] | undefined
|
|
|
453
477
|
export type CommandHandler = (payload: unknown, meta: { toolCallId?: string }) => void
|
|
454
478
|
```
|
|
455
479
|
|
|
480
|
+
## `CompactionPreference` (type)
|
|
481
|
+
|
|
482
|
+
```ts
|
|
483
|
+
export type CompactionPreference = "default" | "economical"
|
|
484
|
+
```
|
|
485
|
+
|
|
456
486
|
## `ComputersResource` (class)
|
|
457
487
|
|
|
458
488
|
```ts
|
|
@@ -798,6 +828,13 @@ label: string
|
|
|
798
828
|
update_format: "snapshot" | "diff" | undefined
|
|
799
829
|
```
|
|
800
830
|
|
|
831
|
+
## `ContextSource` (interface)
|
|
832
|
+
|
|
833
|
+
```ts
|
|
834
|
+
arguments: Record<string, unknown> | undefined
|
|
835
|
+
source: string
|
|
836
|
+
```
|
|
837
|
+
|
|
801
838
|
## `CreateChatGroupTask` (interface)
|
|
802
839
|
|
|
803
840
|
```ts
|
|
@@ -814,6 +851,7 @@ title: string
|
|
|
814
851
|
anonymous: boolean | undefined
|
|
815
852
|
biz_role_id: string | null | undefined
|
|
816
853
|
chat_group_id: string | null | undefined
|
|
854
|
+
compaction_preference: CompactionPreference | undefined
|
|
817
855
|
compaction_ratio: number | null | undefined
|
|
818
856
|
disable_tools: string[] | null | undefined
|
|
819
857
|
enable_thinking: boolean | null | undefined
|
|
@@ -840,6 +878,7 @@ DEFAULT_REPLAY_SPEED: ReplaySpeed
|
|
|
840
878
|
## `DeliveryReceipt` (interface)
|
|
841
879
|
|
|
842
880
|
```ts
|
|
881
|
+
code: string | undefined
|
|
843
882
|
executionId: string | null | undefined
|
|
844
883
|
itemId: string | undefined
|
|
845
884
|
message: string | undefined
|
|
@@ -1194,6 +1233,12 @@ token: string
|
|
|
1194
1233
|
formatAskUserAnswer: (data: AskUserQuestionData, answer: AskUserAnswerData) => string
|
|
1195
1234
|
```
|
|
1196
1235
|
|
|
1236
|
+
## `getBrowserCapability` (function)
|
|
1237
|
+
|
|
1238
|
+
```ts
|
|
1239
|
+
getBrowserCapability: (client: { json<T>(method: string, path: string): Promise<T>; }, sessionId: string) => Promise<BrowserCapability>
|
|
1240
|
+
```
|
|
1241
|
+
|
|
1197
1242
|
## `getFileParts` (function)
|
|
1198
1243
|
|
|
1199
1244
|
```ts
|
|
@@ -1233,6 +1278,12 @@ image_url: { url: string; source_path?: string; width?: number; height?: number;
|
|
|
1233
1278
|
type: "image_url"
|
|
1234
1279
|
```
|
|
1235
1280
|
|
|
1281
|
+
## `InputKind` (type)
|
|
1282
|
+
|
|
1283
|
+
```ts
|
|
1284
|
+
export type InputKind = "user" | "external_event" | "system"
|
|
1285
|
+
```
|
|
1286
|
+
|
|
1236
1287
|
## `InstalledPack` (interface)
|
|
1237
1288
|
|
|
1238
1289
|
```ts
|
|
@@ -1243,6 +1294,12 @@ manifest: PackManifest
|
|
|
1243
1294
|
source: "builtin" | "user" | "fixture"
|
|
1244
1295
|
```
|
|
1245
1296
|
|
|
1297
|
+
## `isBrowserDisabledError` (function)
|
|
1298
|
+
|
|
1299
|
+
```ts
|
|
1300
|
+
isBrowserDisabledError: (error: unknown) => boolean
|
|
1301
|
+
```
|
|
1302
|
+
|
|
1246
1303
|
## `LlmResource` (class)
|
|
1247
1304
|
|
|
1248
1305
|
```ts
|
|
@@ -1562,27 +1619,6 @@ provider: "plugin"
|
|
|
1562
1619
|
server: string
|
|
1563
1620
|
```
|
|
1564
1621
|
|
|
1565
|
-
## `PreparedSend` (interface)
|
|
1566
|
-
|
|
1567
|
-
```ts
|
|
1568
|
-
content: string
|
|
1569
|
-
options: PreparedSendOptions
|
|
1570
|
-
requestId: string
|
|
1571
|
-
sessionId: string
|
|
1572
|
-
```
|
|
1573
|
-
|
|
1574
|
-
## `PreparedSendOptions` (interface)
|
|
1575
|
-
|
|
1576
|
-
```ts
|
|
1577
|
-
contextAttachments: ContextAttachment[] | undefined
|
|
1578
|
-
headless: boolean | undefined
|
|
1579
|
-
mode: "planning" | "executing" | undefined
|
|
1580
|
-
model: string | undefined
|
|
1581
|
-
queueWhenRunning: boolean | undefined
|
|
1582
|
-
reasoningLevel: "max" | "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined
|
|
1583
|
-
thinkingOverride: boolean | undefined
|
|
1584
|
-
```
|
|
1585
|
-
|
|
1586
1622
|
## `ProfileComponent` (interface)
|
|
1587
1623
|
|
|
1588
1624
|
```ts
|
|
@@ -1755,14 +1791,25 @@ SDK_VERSION: string
|
|
|
1755
1791
|
|
|
1756
1792
|
```ts
|
|
1757
1793
|
askUserAnswer: Record<string, unknown> | undefined
|
|
1794
|
+
batchKey: string | undefined
|
|
1758
1795
|
contextAttachments: ContextAttachment[] | undefined
|
|
1796
|
+
contextSources: ContextSource[] | undefined
|
|
1797
|
+
headless: boolean | undefined
|
|
1798
|
+
inputKind: InputKind | undefined
|
|
1759
1799
|
mode: string | undefined
|
|
1760
1800
|
model: string | undefined
|
|
1801
|
+
outputSchema: Record<string, unknown> | undefined
|
|
1802
|
+
queuePriority: number | undefined
|
|
1761
1803
|
queueWhenRunning: boolean | undefined
|
|
1762
1804
|
reasoningLevel: string | undefined
|
|
1805
|
+
receivedAt: string | undefined
|
|
1763
1806
|
refs: MessageRef[] | undefined
|
|
1807
|
+
releaseNativeWait: boolean | undefined
|
|
1764
1808
|
replayDecision: "keep_replay" | "continue_replay" | undefined
|
|
1809
|
+
requestId: string | undefined
|
|
1810
|
+
signal: AbortSignal | undefined
|
|
1765
1811
|
thinkingOverride: boolean | undefined
|
|
1812
|
+
timeZone: string | undefined
|
|
1766
1813
|
topicAssetRefs: TopicAssetRef[] | undefined
|
|
1767
1814
|
whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
|
|
1768
1815
|
```
|
|
@@ -1790,6 +1837,7 @@ workspace: string | null | undefined
|
|
|
1790
1837
|
## `SessionConfig` (interface)
|
|
1791
1838
|
|
|
1792
1839
|
```ts
|
|
1840
|
+
compactionPreference: CompactionPreference | undefined
|
|
1793
1841
|
compactionRatio: number | undefined
|
|
1794
1842
|
disableTools: string[] | undefined
|
|
1795
1843
|
enableThinking: boolean | undefined
|
|
@@ -1802,7 +1850,7 @@ model: string | undefined
|
|
|
1802
1850
|
## `SessionConfiguration` (interface)
|
|
1803
1851
|
|
|
1804
1852
|
```ts
|
|
1805
|
-
configuration: { solution_identity: Record<string, unknown> | null; solution_version: string | null; biz_role_id: string | null; biz_role_version: string | null; model: string | null; enable_thinking: boolean | null; memory_enabled: boolean; env: Record<string, string>; disable_tools: string[]; mcp_sources: Omit<McpSourceConfig, "bearer_token">[]; skip_confirmations: boolean; compaction_ratio: number | null; }
|
|
1853
|
+
configuration: { solution_identity: Record<string, unknown> | null; solution_version: string | null; biz_role_id: string | null; biz_role_version: string | null; model: string | null; enable_thinking: boolean | null; memory_enabled: boolean; env: Record<string, string>; disable_tools: string[]; mcp_sources: Omit<McpSourceConfig, "bearer_token">[]; skip_confirmations: boolean; compaction_ratio: number | null; compaction_preference: CompactionPreference; }
|
|
1806
1854
|
revision: number
|
|
1807
1855
|
session_id: string
|
|
1808
1856
|
version: string | null
|
|
@@ -2059,6 +2107,7 @@ SessionStatus = type(
|
|
|
2059
2107
|
|
|
2060
2108
|
```ts
|
|
2061
2109
|
currentMode: "planning" | "executing"
|
|
2110
|
+
logCursor: { afterLogSeq: number; epoch: number; } | undefined
|
|
2062
2111
|
nextBefore: string | null
|
|
2063
2112
|
turns: TurnProjection[]
|
|
2064
2113
|
```
|
|
@@ -2189,6 +2238,7 @@ url: string
|
|
|
2189
2238
|
|
|
2190
2239
|
```ts
|
|
2191
2240
|
capability: string
|
|
2241
|
+
getContext: ((arguments_: Record<string, unknown>, context: { sessionId: string; signal: AbortSignal; executionId?: string; requestId?: string; receivedAt?: string; timeZone?: string; previous?: Record<string, Record<string, unknown>>; }) => ContextAttachment[] | Promise<ContextAttachment[]>) | undefined
|
|
2192
2242
|
onError: ((error: Error) => void) | undefined
|
|
2193
2243
|
providerId: string
|
|
2194
2244
|
tools: ProviderTool[]
|
|
@@ -2221,6 +2271,7 @@ title: string | undefined
|
|
|
2221
2271
|
|
|
2222
2272
|
```ts
|
|
2223
2273
|
biz_role_id: string | undefined
|
|
2274
|
+
compaction_preference: CompactionPreference | undefined
|
|
2224
2275
|
compaction_ratio: number | null | undefined
|
|
2225
2276
|
disable_tools: string[] | undefined
|
|
2226
2277
|
enable_thinking: boolean | null | undefined
|