@h-ai/ai 1.0.0-beta.23 → 1.0.0-beta.24
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.en.md +145 -141
- package/README.ja.md +145 -141
- package/README.md +143 -141
- package/dist/{ai-acp-types-BNeA1j0P.d.ts → ai-acp-types-B99Oa7WD.d.ts} +2242 -233
- package/dist/browser.d.ts +3 -1
- package/dist/browser.js +3 -3
- package/dist/{chunk-CCXG2S7O.js → chunk-3G4ZLXH4.js} +154 -9
- package/dist/chunk-3G4ZLXH4.js.map +1 -0
- package/dist/{chunk-WSH2246H.js → chunk-3R5SMLSJ.js} +3 -3
- package/dist/{chunk-WSH2246H.js.map → chunk-3R5SMLSJ.js.map} +1 -1
- package/dist/{chunk-M77C3VAP.js → chunk-NRDLMUSY.js} +4 -2
- package/dist/chunk-NRDLMUSY.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2492 -593
- package/dist/index.js.map +1 -1
- package/models/agents/README.md +30 -18
- package/models/agents/build.mjs +158 -55
- package/models/agents/codex-acp/Dockerfile +8 -13
- package/models/agents/deepseek-harness/Dockerfile +8 -13
- package/models/agents/goose/Dockerfile +8 -13
- package/models/agents/goose/agent.json +1 -1
- package/package.json +11 -8
- package/tools/.dockerignore +4 -0
- package/tools/README.md +74 -0
- package/tools/archives.py +56 -0
- package/tools/browser/Dockerfile +19 -0
- package/tools/browser/operation.py +50 -0
- package/tools/browser/render.mjs +40 -0
- package/tools/documents/Dockerfile +20 -0
- package/tools/documents/operation.py +80 -0
- package/tools/ocr/Dockerfile +19 -0
- package/tools/ocr/operation.py +18 -0
- package/tools/office/Dockerfile +21 -0
- package/tools/office/office_job.py +65 -0
- package/tools/office/operation.py +43 -0
- package/tools/tests/image-smoke.mjs +83 -0
- package/tools/tests/test_hai_tool.py +82 -0
- package/tools/tool.py +145 -0
- package/dist/chunk-CCXG2S7O.js.map +0 -1
- package/dist/chunk-M77C3VAP.js.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as _h_ai_core from '@h-ai/core';
|
|
2
2
|
import { HaiResult, HaiError } from '@h-ai/core';
|
|
3
|
+
import * as _h_ai_runner from '@h-ai/runner';
|
|
4
|
+
import { RunnerScope, RunnerJson, RunnerFunctions } from '@h-ai/runner';
|
|
3
5
|
import { TaskState } from '@a2a-js/sdk';
|
|
4
6
|
import { AgentExecutor } from '@a2a-js/sdk/server';
|
|
5
7
|
import * as zod from 'zod';
|
|
@@ -9,9 +11,10 @@ import { CleanOptionsInput, ChunkOptionsInput } from '@h-ai/datapipe';
|
|
|
9
11
|
import { e as AudioOperations, a as AudioContent, P as PlayableAudio, b as AudioFormat } from './ai-audio-types-4R5yUAVl.js';
|
|
10
12
|
import * as zod_v4_core from 'zod/v4/core';
|
|
11
13
|
import * as _agentclientprotocol_sdk from '@agentclientprotocol/sdk';
|
|
12
|
-
import { McpServer, ContentBlock, SessionNotification, ClientRequestHandlersByMethod, ClientCapabilities } from '@agentclientprotocol/sdk';
|
|
14
|
+
import { McpServer, ContentBlock, RequestPermissionRequest, SessionNotification, ClientRequestHandlersByMethod, ClientCapabilities } from '@agentclientprotocol/sdk';
|
|
13
15
|
import OpenAI from 'openai';
|
|
14
|
-
import { PromptMessage } from '@modelcontextprotocol/sdk/types.js';
|
|
16
|
+
import { CallToolRequest, PromptMessage, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
17
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
20
|
* 工程主分支必须显式填写。
|
|
@@ -86,6 +89,82 @@ declare const ACPAgentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
86
89
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
87
90
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
88
91
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
92
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
93
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
94
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
id: z.ZodOptional<z.ZodString>;
|
|
97
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
98
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
auto: "auto";
|
|
104
|
+
shared: "shared";
|
|
105
|
+
user: "user";
|
|
106
|
+
task: "task";
|
|
107
|
+
}>>;
|
|
108
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
109
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
}, z.core.$strict>>;
|
|
113
|
+
}, z.core.$strict>>;
|
|
114
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
115
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
118
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
119
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
scope: z.ZodEnum<{
|
|
121
|
+
user: "user";
|
|
122
|
+
none: "none";
|
|
123
|
+
space: "space";
|
|
124
|
+
}>;
|
|
125
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
126
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
127
|
+
none: "none";
|
|
128
|
+
confirm: "confirm";
|
|
129
|
+
"on-success": "on-success";
|
|
130
|
+
}>>;
|
|
131
|
+
}, z.core.$strict>>;
|
|
132
|
+
}, z.core.$strict>>;
|
|
133
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
135
|
+
}, z.core.$strict>>;
|
|
136
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
138
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
"read-only": "read-only";
|
|
140
|
+
workspace: "workspace";
|
|
141
|
+
"full-access": "full-access";
|
|
142
|
+
}>>;
|
|
143
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
never: "never";
|
|
145
|
+
"on-request": "on-request";
|
|
146
|
+
}>>;
|
|
147
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
|
+
}, z.core.$strict>>;
|
|
149
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
150
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
}, z.core.$strict>>;
|
|
155
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
format: z.ZodEnum<{
|
|
157
|
+
text: "text";
|
|
158
|
+
json: "json";
|
|
159
|
+
}>;
|
|
160
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
adapter: z.ZodString;
|
|
164
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
165
|
+
}, z.core.$strict>>;
|
|
166
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
167
|
+
}, z.core.$strict>>;
|
|
89
168
|
}, z.core.$strict>, z.ZodObject<{
|
|
90
169
|
mode: z.ZodLiteral<"embedded">;
|
|
91
170
|
transport: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
@@ -98,6 +177,82 @@ declare const ACPAgentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
98
177
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
99
178
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
100
179
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
180
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
181
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
182
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
id: z.ZodOptional<z.ZodString>;
|
|
185
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
186
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
}, z.core.$strict>>;
|
|
189
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
190
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
191
|
+
auto: "auto";
|
|
192
|
+
shared: "shared";
|
|
193
|
+
user: "user";
|
|
194
|
+
task: "task";
|
|
195
|
+
}>>;
|
|
196
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
197
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
}, z.core.$strict>>;
|
|
201
|
+
}, z.core.$strict>>;
|
|
202
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
203
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
205
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
206
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
207
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
scope: z.ZodEnum<{
|
|
209
|
+
user: "user";
|
|
210
|
+
none: "none";
|
|
211
|
+
space: "space";
|
|
212
|
+
}>;
|
|
213
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
214
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
215
|
+
none: "none";
|
|
216
|
+
confirm: "confirm";
|
|
217
|
+
"on-success": "on-success";
|
|
218
|
+
}>>;
|
|
219
|
+
}, z.core.$strict>>;
|
|
220
|
+
}, z.core.$strict>>;
|
|
221
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
223
|
+
}, z.core.$strict>>;
|
|
224
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
225
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
227
|
+
"read-only": "read-only";
|
|
228
|
+
workspace: "workspace";
|
|
229
|
+
"full-access": "full-access";
|
|
230
|
+
}>>;
|
|
231
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
never: "never";
|
|
233
|
+
"on-request": "on-request";
|
|
234
|
+
}>>;
|
|
235
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
236
|
+
}, z.core.$strict>>;
|
|
237
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
}, z.core.$strict>>;
|
|
243
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
format: z.ZodEnum<{
|
|
245
|
+
text: "text";
|
|
246
|
+
json: "json";
|
|
247
|
+
}>;
|
|
248
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
249
|
+
}, z.core.$strict>>;
|
|
250
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
adapter: z.ZodString;
|
|
252
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
253
|
+
}, z.core.$strict>>;
|
|
254
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
255
|
+
}, z.core.$strict>>;
|
|
101
256
|
}, z.core.$strict>, z.ZodObject<{
|
|
102
257
|
mode: z.ZodLiteral<"builtin-service">;
|
|
103
258
|
transport: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
@@ -116,6 +271,82 @@ declare const ACPAgentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
116
271
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
117
272
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
118
273
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
274
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
275
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
276
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
277
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
278
|
+
id: z.ZodOptional<z.ZodString>;
|
|
279
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
280
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
}, z.core.$strict>>;
|
|
283
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
285
|
+
auto: "auto";
|
|
286
|
+
shared: "shared";
|
|
287
|
+
user: "user";
|
|
288
|
+
task: "task";
|
|
289
|
+
}>>;
|
|
290
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
291
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
292
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
}, z.core.$strict>>;
|
|
295
|
+
}, z.core.$strict>>;
|
|
296
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
297
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
299
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
300
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
301
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
302
|
+
scope: z.ZodEnum<{
|
|
303
|
+
user: "user";
|
|
304
|
+
none: "none";
|
|
305
|
+
space: "space";
|
|
306
|
+
}>;
|
|
307
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
308
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
309
|
+
none: "none";
|
|
310
|
+
confirm: "confirm";
|
|
311
|
+
"on-success": "on-success";
|
|
312
|
+
}>>;
|
|
313
|
+
}, z.core.$strict>>;
|
|
314
|
+
}, z.core.$strict>>;
|
|
315
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
316
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
317
|
+
}, z.core.$strict>>;
|
|
318
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
319
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
320
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
321
|
+
"read-only": "read-only";
|
|
322
|
+
workspace: "workspace";
|
|
323
|
+
"full-access": "full-access";
|
|
324
|
+
}>>;
|
|
325
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
326
|
+
never: "never";
|
|
327
|
+
"on-request": "on-request";
|
|
328
|
+
}>>;
|
|
329
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
330
|
+
}, z.core.$strict>>;
|
|
331
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
332
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
}, z.core.$strict>>;
|
|
337
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
format: z.ZodEnum<{
|
|
339
|
+
text: "text";
|
|
340
|
+
json: "json";
|
|
341
|
+
}>;
|
|
342
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
343
|
+
}, z.core.$strict>>;
|
|
344
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
345
|
+
adapter: z.ZodString;
|
|
346
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
347
|
+
}, z.core.$strict>>;
|
|
348
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
349
|
+
}, z.core.$strict>>;
|
|
119
350
|
}, z.core.$strict>], "mode">;
|
|
120
351
|
/**
|
|
121
352
|
* 会话 Git 发布请求。
|
|
@@ -164,6 +395,82 @@ declare const ACPConfigSchema: z.ZodObject<{
|
|
|
164
395
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
165
396
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
166
397
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
398
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
399
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
400
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
401
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
402
|
+
id: z.ZodOptional<z.ZodString>;
|
|
403
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
404
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
406
|
+
}, z.core.$strict>>;
|
|
407
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
409
|
+
auto: "auto";
|
|
410
|
+
shared: "shared";
|
|
411
|
+
user: "user";
|
|
412
|
+
task: "task";
|
|
413
|
+
}>>;
|
|
414
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
415
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
416
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
418
|
+
}, z.core.$strict>>;
|
|
419
|
+
}, z.core.$strict>>;
|
|
420
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
421
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
423
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
424
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
425
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
426
|
+
scope: z.ZodEnum<{
|
|
427
|
+
user: "user";
|
|
428
|
+
none: "none";
|
|
429
|
+
space: "space";
|
|
430
|
+
}>;
|
|
431
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
432
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
433
|
+
none: "none";
|
|
434
|
+
confirm: "confirm";
|
|
435
|
+
"on-success": "on-success";
|
|
436
|
+
}>>;
|
|
437
|
+
}, z.core.$strict>>;
|
|
438
|
+
}, z.core.$strict>>;
|
|
439
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
440
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
441
|
+
}, z.core.$strict>>;
|
|
442
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
443
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
444
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
445
|
+
"read-only": "read-only";
|
|
446
|
+
workspace: "workspace";
|
|
447
|
+
"full-access": "full-access";
|
|
448
|
+
}>>;
|
|
449
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
450
|
+
never: "never";
|
|
451
|
+
"on-request": "on-request";
|
|
452
|
+
}>>;
|
|
453
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
454
|
+
}, z.core.$strict>>;
|
|
455
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
456
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
457
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
458
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
460
|
+
}, z.core.$strict>>;
|
|
461
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
462
|
+
format: z.ZodEnum<{
|
|
463
|
+
text: "text";
|
|
464
|
+
json: "json";
|
|
465
|
+
}>;
|
|
466
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
467
|
+
}, z.core.$strict>>;
|
|
468
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
469
|
+
adapter: z.ZodString;
|
|
470
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
471
|
+
}, z.core.$strict>>;
|
|
472
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
473
|
+
}, z.core.$strict>>;
|
|
167
474
|
}, z.core.$strict>, z.ZodObject<{
|
|
168
475
|
mode: z.ZodLiteral<"embedded">;
|
|
169
476
|
transport: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
@@ -176,6 +483,82 @@ declare const ACPConfigSchema: z.ZodObject<{
|
|
|
176
483
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
177
484
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
178
485
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
486
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
487
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
488
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
489
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
490
|
+
id: z.ZodOptional<z.ZodString>;
|
|
491
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
492
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
493
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
494
|
+
}, z.core.$strict>>;
|
|
495
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
496
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
497
|
+
auto: "auto";
|
|
498
|
+
shared: "shared";
|
|
499
|
+
user: "user";
|
|
500
|
+
task: "task";
|
|
501
|
+
}>>;
|
|
502
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
503
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
504
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
}, z.core.$strict>>;
|
|
507
|
+
}, z.core.$strict>>;
|
|
508
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
509
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
510
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
511
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
512
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
513
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
514
|
+
scope: z.ZodEnum<{
|
|
515
|
+
user: "user";
|
|
516
|
+
none: "none";
|
|
517
|
+
space: "space";
|
|
518
|
+
}>;
|
|
519
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
520
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
521
|
+
none: "none";
|
|
522
|
+
confirm: "confirm";
|
|
523
|
+
"on-success": "on-success";
|
|
524
|
+
}>>;
|
|
525
|
+
}, z.core.$strict>>;
|
|
526
|
+
}, z.core.$strict>>;
|
|
527
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
528
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
529
|
+
}, z.core.$strict>>;
|
|
530
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
531
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
532
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
533
|
+
"read-only": "read-only";
|
|
534
|
+
workspace: "workspace";
|
|
535
|
+
"full-access": "full-access";
|
|
536
|
+
}>>;
|
|
537
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
538
|
+
never: "never";
|
|
539
|
+
"on-request": "on-request";
|
|
540
|
+
}>>;
|
|
541
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
542
|
+
}, z.core.$strict>>;
|
|
543
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
544
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
545
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
547
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
548
|
+
}, z.core.$strict>>;
|
|
549
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
format: z.ZodEnum<{
|
|
551
|
+
text: "text";
|
|
552
|
+
json: "json";
|
|
553
|
+
}>;
|
|
554
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
555
|
+
}, z.core.$strict>>;
|
|
556
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
557
|
+
adapter: z.ZodString;
|
|
558
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
559
|
+
}, z.core.$strict>>;
|
|
560
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
561
|
+
}, z.core.$strict>>;
|
|
179
562
|
}, z.core.$strict>, z.ZodObject<{
|
|
180
563
|
mode: z.ZodLiteral<"builtin-service">;
|
|
181
564
|
transport: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
@@ -194,6 +577,82 @@ declare const ACPConfigSchema: z.ZodObject<{
|
|
|
194
577
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
195
578
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
196
579
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
580
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
581
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
582
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
583
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
584
|
+
id: z.ZodOptional<z.ZodString>;
|
|
585
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
586
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
587
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
588
|
+
}, z.core.$strict>>;
|
|
589
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
590
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
591
|
+
auto: "auto";
|
|
592
|
+
shared: "shared";
|
|
593
|
+
user: "user";
|
|
594
|
+
task: "task";
|
|
595
|
+
}>>;
|
|
596
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
597
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
598
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
599
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
600
|
+
}, z.core.$strict>>;
|
|
601
|
+
}, z.core.$strict>>;
|
|
602
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
603
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
604
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
605
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
606
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
607
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
608
|
+
scope: z.ZodEnum<{
|
|
609
|
+
user: "user";
|
|
610
|
+
none: "none";
|
|
611
|
+
space: "space";
|
|
612
|
+
}>;
|
|
613
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
614
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
615
|
+
none: "none";
|
|
616
|
+
confirm: "confirm";
|
|
617
|
+
"on-success": "on-success";
|
|
618
|
+
}>>;
|
|
619
|
+
}, z.core.$strict>>;
|
|
620
|
+
}, z.core.$strict>>;
|
|
621
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
622
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
623
|
+
}, z.core.$strict>>;
|
|
624
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
625
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
626
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
627
|
+
"read-only": "read-only";
|
|
628
|
+
workspace: "workspace";
|
|
629
|
+
"full-access": "full-access";
|
|
630
|
+
}>>;
|
|
631
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
632
|
+
never: "never";
|
|
633
|
+
"on-request": "on-request";
|
|
634
|
+
}>>;
|
|
635
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
636
|
+
}, z.core.$strict>>;
|
|
637
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
638
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
639
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
641
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
642
|
+
}, z.core.$strict>>;
|
|
643
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
644
|
+
format: z.ZodEnum<{
|
|
645
|
+
text: "text";
|
|
646
|
+
json: "json";
|
|
647
|
+
}>;
|
|
648
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
649
|
+
}, z.core.$strict>>;
|
|
650
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
651
|
+
adapter: z.ZodString;
|
|
652
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
653
|
+
}, z.core.$strict>>;
|
|
654
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
655
|
+
}, z.core.$strict>>;
|
|
197
656
|
}, z.core.$strict>], "mode">>>;
|
|
198
657
|
workspaces: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
199
658
|
id: z.ZodString;
|
|
@@ -224,6 +683,7 @@ declare const ACPConfigSchema: z.ZodObject<{
|
|
|
224
683
|
cancelTimeout: z.ZodDefault<z.ZodNumber>;
|
|
225
684
|
maxContentBytes: z.ZodDefault<z.ZodNumber>;
|
|
226
685
|
maxPendingEvents: z.ZodDefault<z.ZodNumber>;
|
|
686
|
+
workerIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
227
687
|
}, z.core.$strict>;
|
|
228
688
|
/**
|
|
229
689
|
* ACP 初始化配置,已填充超时和只读清单默认值。
|
|
@@ -3368,8 +3828,8 @@ declare const OptionalSecretSchema: z.ZodOptional<z.ZodPipe<z.ZodNullable<z.ZodS
|
|
|
3368
3828
|
*/
|
|
3369
3829
|
declare const ModelScenarioSchema: z.ZodEnum<{
|
|
3370
3830
|
default: "default";
|
|
3371
|
-
chat: "chat";
|
|
3372
3831
|
reasoning: "reasoning";
|
|
3832
|
+
chat: "chat";
|
|
3373
3833
|
plan: "plan";
|
|
3374
3834
|
execute: "execute";
|
|
3375
3835
|
extraction: "extraction";
|
|
@@ -3597,8 +4057,8 @@ declare const LLMConfigSchema: z.ZodObject<{
|
|
|
3597
4057
|
}, z.core.$strict>>>;
|
|
3598
4058
|
scenarios: z.ZodOptional<z.ZodObject<{
|
|
3599
4059
|
default: z.ZodOptional<z.ZodString>;
|
|
3600
|
-
chat: z.ZodOptional<z.ZodString>;
|
|
3601
4060
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
4061
|
+
chat: z.ZodOptional<z.ZodString>;
|
|
3602
4062
|
plan: z.ZodOptional<z.ZodString>;
|
|
3603
4063
|
execute: z.ZodOptional<z.ZodString>;
|
|
3604
4064
|
extraction: z.ZodOptional<z.ZodString>;
|
|
@@ -3797,12 +4257,21 @@ declare const MCPExternalServerSchema: z.ZodObject<{
|
|
|
3797
4257
|
http: "http";
|
|
3798
4258
|
stdio: "stdio";
|
|
3799
4259
|
sse: "sse";
|
|
4260
|
+
job: "job";
|
|
3800
4261
|
}>;
|
|
4262
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
3801
4263
|
command: z.ZodOptional<z.ZodString>;
|
|
3802
4264
|
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3803
4265
|
url: z.ZodOptional<z.ZodURL>;
|
|
3804
4266
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3805
4267
|
headerEnv: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4268
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4269
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4270
|
+
pool: z.ZodOptional<z.ZodObject<{
|
|
4271
|
+
maxRunning: z.ZodNumber;
|
|
4272
|
+
minReady: z.ZodOptional<z.ZodNumber>;
|
|
4273
|
+
maxTotal: z.ZodOptional<z.ZodNumber>;
|
|
4274
|
+
}, z.core.$strict>>;
|
|
3806
4275
|
}, z.core.$strict>;
|
|
3807
4276
|
/**
|
|
3808
4277
|
* 外部 MCP 服务配置。
|
|
@@ -3839,12 +4308,21 @@ declare const MCPConfigSchema: z.ZodObject<{
|
|
|
3839
4308
|
http: "http";
|
|
3840
4309
|
stdio: "stdio";
|
|
3841
4310
|
sse: "sse";
|
|
4311
|
+
job: "job";
|
|
3842
4312
|
}>;
|
|
4313
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
3843
4314
|
command: z.ZodOptional<z.ZodString>;
|
|
3844
4315
|
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3845
4316
|
url: z.ZodOptional<z.ZodURL>;
|
|
3846
4317
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3847
4318
|
headerEnv: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4319
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4320
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
4321
|
+
pool: z.ZodOptional<z.ZodObject<{
|
|
4322
|
+
maxRunning: z.ZodNumber;
|
|
4323
|
+
minReady: z.ZodOptional<z.ZodNumber>;
|
|
4324
|
+
maxTotal: z.ZodOptional<z.ZodNumber>;
|
|
4325
|
+
}, z.core.$strict>>;
|
|
3848
4326
|
}, z.core.$strict>>>;
|
|
3849
4327
|
server: z.ZodOptional<z.ZodObject<{
|
|
3850
4328
|
name: z.ZodString;
|
|
@@ -4834,6 +5312,82 @@ declare const AIConfigSchema: z.ZodObject<{
|
|
|
4834
5312
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
4835
5313
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
4836
5314
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5315
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
5316
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
5317
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
5318
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
5319
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5320
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
5321
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
5322
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
5323
|
+
}, z.core.$strict>>;
|
|
5324
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
5325
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
5326
|
+
auto: "auto";
|
|
5327
|
+
shared: "shared";
|
|
5328
|
+
user: "user";
|
|
5329
|
+
task: "task";
|
|
5330
|
+
}>>;
|
|
5331
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
5332
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
5333
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
5334
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
5335
|
+
}, z.core.$strict>>;
|
|
5336
|
+
}, z.core.$strict>>;
|
|
5337
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
5338
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
5339
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5340
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5341
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5342
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
5343
|
+
scope: z.ZodEnum<{
|
|
5344
|
+
user: "user";
|
|
5345
|
+
none: "none";
|
|
5346
|
+
space: "space";
|
|
5347
|
+
}>;
|
|
5348
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
5349
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
5350
|
+
none: "none";
|
|
5351
|
+
confirm: "confirm";
|
|
5352
|
+
"on-success": "on-success";
|
|
5353
|
+
}>>;
|
|
5354
|
+
}, z.core.$strict>>;
|
|
5355
|
+
}, z.core.$strict>>;
|
|
5356
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
5357
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5358
|
+
}, z.core.$strict>>;
|
|
5359
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5360
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
5361
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
5362
|
+
"read-only": "read-only";
|
|
5363
|
+
workspace: "workspace";
|
|
5364
|
+
"full-access": "full-access";
|
|
5365
|
+
}>>;
|
|
5366
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
5367
|
+
never: "never";
|
|
5368
|
+
"on-request": "on-request";
|
|
5369
|
+
}>>;
|
|
5370
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5371
|
+
}, z.core.$strict>>;
|
|
5372
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
5373
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5374
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5375
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5376
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
5377
|
+
}, z.core.$strict>>;
|
|
5378
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
5379
|
+
format: z.ZodEnum<{
|
|
5380
|
+
text: "text";
|
|
5381
|
+
json: "json";
|
|
5382
|
+
}>;
|
|
5383
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
5384
|
+
}, z.core.$strict>>;
|
|
5385
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
5386
|
+
adapter: z.ZodString;
|
|
5387
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
5388
|
+
}, z.core.$strict>>;
|
|
5389
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5390
|
+
}, z.core.$strict>>;
|
|
4837
5391
|
}, z.core.$strict>, z.ZodObject<{
|
|
4838
5392
|
mode: z.ZodLiteral<"embedded">;
|
|
4839
5393
|
transport: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
@@ -4846,6 +5400,82 @@ declare const AIConfigSchema: z.ZodObject<{
|
|
|
4846
5400
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
4847
5401
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
4848
5402
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5403
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
5404
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
5405
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
5406
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
5407
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5408
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
5409
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
5410
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
5411
|
+
}, z.core.$strict>>;
|
|
5412
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
5413
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
5414
|
+
auto: "auto";
|
|
5415
|
+
shared: "shared";
|
|
5416
|
+
user: "user";
|
|
5417
|
+
task: "task";
|
|
5418
|
+
}>>;
|
|
5419
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
5420
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
5421
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
5422
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
5423
|
+
}, z.core.$strict>>;
|
|
5424
|
+
}, z.core.$strict>>;
|
|
5425
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
5426
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
5427
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5428
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5429
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5430
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
5431
|
+
scope: z.ZodEnum<{
|
|
5432
|
+
user: "user";
|
|
5433
|
+
none: "none";
|
|
5434
|
+
space: "space";
|
|
5435
|
+
}>;
|
|
5436
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
5437
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
5438
|
+
none: "none";
|
|
5439
|
+
confirm: "confirm";
|
|
5440
|
+
"on-success": "on-success";
|
|
5441
|
+
}>>;
|
|
5442
|
+
}, z.core.$strict>>;
|
|
5443
|
+
}, z.core.$strict>>;
|
|
5444
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
5445
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5446
|
+
}, z.core.$strict>>;
|
|
5447
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5448
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
5449
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
5450
|
+
"read-only": "read-only";
|
|
5451
|
+
workspace: "workspace";
|
|
5452
|
+
"full-access": "full-access";
|
|
5453
|
+
}>>;
|
|
5454
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
5455
|
+
never: "never";
|
|
5456
|
+
"on-request": "on-request";
|
|
5457
|
+
}>>;
|
|
5458
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5459
|
+
}, z.core.$strict>>;
|
|
5460
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
5461
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5462
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5463
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5464
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
5465
|
+
}, z.core.$strict>>;
|
|
5466
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
5467
|
+
format: z.ZodEnum<{
|
|
5468
|
+
text: "text";
|
|
5469
|
+
json: "json";
|
|
5470
|
+
}>;
|
|
5471
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
5472
|
+
}, z.core.$strict>>;
|
|
5473
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
5474
|
+
adapter: z.ZodString;
|
|
5475
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
5476
|
+
}, z.core.$strict>>;
|
|
5477
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5478
|
+
}, z.core.$strict>>;
|
|
4849
5479
|
}, z.core.$strict>, z.ZodObject<{
|
|
4850
5480
|
mode: z.ZodLiteral<"builtin-service">;
|
|
4851
5481
|
transport: z.ZodDefault<z.ZodLiteral<"stdio">>;
|
|
@@ -4864,6 +5494,82 @@ declare const AIConfigSchema: z.ZodObject<{
|
|
|
4864
5494
|
modelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
4865
5495
|
defaultModelId: z.ZodOptional<z.ZodString>;
|
|
4866
5496
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5497
|
+
environmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
5498
|
+
allowedCapabilities: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
|
|
5499
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
5500
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
5501
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5502
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
5503
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
5504
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
5505
|
+
}, z.core.$strict>>;
|
|
5506
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
5507
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
5508
|
+
auto: "auto";
|
|
5509
|
+
shared: "shared";
|
|
5510
|
+
user: "user";
|
|
5511
|
+
task: "task";
|
|
5512
|
+
}>>;
|
|
5513
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
5514
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
5515
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
5516
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
5517
|
+
}, z.core.$strict>>;
|
|
5518
|
+
}, z.core.$strict>>;
|
|
5519
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
5520
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
5521
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5522
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5523
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5524
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
5525
|
+
scope: z.ZodEnum<{
|
|
5526
|
+
user: "user";
|
|
5527
|
+
none: "none";
|
|
5528
|
+
space: "space";
|
|
5529
|
+
}>;
|
|
5530
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
5531
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
5532
|
+
none: "none";
|
|
5533
|
+
confirm: "confirm";
|
|
5534
|
+
"on-success": "on-success";
|
|
5535
|
+
}>>;
|
|
5536
|
+
}, z.core.$strict>>;
|
|
5537
|
+
}, z.core.$strict>>;
|
|
5538
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
5539
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5540
|
+
}, z.core.$strict>>;
|
|
5541
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5542
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
5543
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
5544
|
+
"read-only": "read-only";
|
|
5545
|
+
workspace: "workspace";
|
|
5546
|
+
"full-access": "full-access";
|
|
5547
|
+
}>>;
|
|
5548
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
5549
|
+
never: "never";
|
|
5550
|
+
"on-request": "on-request";
|
|
5551
|
+
}>>;
|
|
5552
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5553
|
+
}, z.core.$strict>>;
|
|
5554
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
5555
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5556
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5557
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5558
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
5559
|
+
}, z.core.$strict>>;
|
|
5560
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
5561
|
+
format: z.ZodEnum<{
|
|
5562
|
+
text: "text";
|
|
5563
|
+
json: "json";
|
|
5564
|
+
}>;
|
|
5565
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
5566
|
+
}, z.core.$strict>>;
|
|
5567
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
5568
|
+
adapter: z.ZodString;
|
|
5569
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
5570
|
+
}, z.core.$strict>>;
|
|
5571
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5572
|
+
}, z.core.$strict>>;
|
|
4867
5573
|
}, z.core.$strict>], "mode">>>;
|
|
4868
5574
|
workspaces: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
4869
5575
|
id: z.ZodString;
|
|
@@ -4894,6 +5600,7 @@ declare const AIConfigSchema: z.ZodObject<{
|
|
|
4894
5600
|
cancelTimeout: z.ZodDefault<z.ZodNumber>;
|
|
4895
5601
|
maxContentBytes: z.ZodDefault<z.ZodNumber>;
|
|
4896
5602
|
maxPendingEvents: z.ZodDefault<z.ZodNumber>;
|
|
5603
|
+
workerIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
4897
5604
|
}, z.core.$strict>>;
|
|
4898
5605
|
llm: z.ZodDefault<z.ZodObject<{
|
|
4899
5606
|
apiKey: z.ZodOptional<z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | undefined, string | null>>>;
|
|
@@ -4945,8 +5652,8 @@ declare const AIConfigSchema: z.ZodObject<{
|
|
|
4945
5652
|
}, z.core.$strict>>>;
|
|
4946
5653
|
scenarios: z.ZodOptional<z.ZodObject<{
|
|
4947
5654
|
default: z.ZodOptional<z.ZodString>;
|
|
4948
|
-
chat: z.ZodOptional<z.ZodString>;
|
|
4949
5655
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
5656
|
+
chat: z.ZodOptional<z.ZodString>;
|
|
4950
5657
|
plan: z.ZodOptional<z.ZodString>;
|
|
4951
5658
|
execute: z.ZodOptional<z.ZodString>;
|
|
4952
5659
|
extraction: z.ZodOptional<z.ZodString>;
|
|
@@ -4965,12 +5672,21 @@ declare const AIConfigSchema: z.ZodObject<{
|
|
|
4965
5672
|
http: "http";
|
|
4966
5673
|
stdio: "stdio";
|
|
4967
5674
|
sse: "sse";
|
|
5675
|
+
job: "job";
|
|
4968
5676
|
}>;
|
|
5677
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
4969
5678
|
command: z.ZodOptional<z.ZodString>;
|
|
4970
5679
|
args: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
4971
5680
|
url: z.ZodOptional<z.ZodURL>;
|
|
4972
5681
|
environmentRefs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4973
5682
|
headerEnv: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5683
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5684
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
5685
|
+
pool: z.ZodOptional<z.ZodObject<{
|
|
5686
|
+
maxRunning: z.ZodNumber;
|
|
5687
|
+
minReady: z.ZodOptional<z.ZodNumber>;
|
|
5688
|
+
maxTotal: z.ZodOptional<z.ZodNumber>;
|
|
5689
|
+
}, z.core.$strict>>;
|
|
4974
5690
|
}, z.core.$strict>>>;
|
|
4975
5691
|
server: z.ZodOptional<z.ZodObject<{
|
|
4976
5692
|
name: z.ZodString;
|
|
@@ -5530,6 +6246,188 @@ interface A2ACallResult {
|
|
|
5530
6246
|
responseParts?: unknown[];
|
|
5531
6247
|
}
|
|
5532
6248
|
|
|
6249
|
+
/**
|
|
6250
|
+
* 计划或持续会话的参数。
|
|
6251
|
+
* @example 模块内部上下文
|
|
6252
|
+
* ```ts
|
|
6253
|
+
* const request = platformRequestSchema.parse({ agentId: 'assistant' })
|
|
6254
|
+
* ```
|
|
6255
|
+
*/
|
|
6256
|
+
declare const platformRequestSchema: z.ZodObject<{
|
|
6257
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
6258
|
+
id: z.ZodOptional<z.ZodString>;
|
|
6259
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
6260
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
6261
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
6262
|
+
}, z.core.$strict>>;
|
|
6263
|
+
execution: z.ZodOptional<z.ZodObject<{
|
|
6264
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
6265
|
+
auto: "auto";
|
|
6266
|
+
shared: "shared";
|
|
6267
|
+
user: "user";
|
|
6268
|
+
task: "task";
|
|
6269
|
+
}>>;
|
|
6270
|
+
environmentId: z.ZodOptional<z.ZodString>;
|
|
6271
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
6272
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
6273
|
+
memoryMiB: z.ZodOptional<z.ZodNumber>;
|
|
6274
|
+
}, z.core.$strict>>;
|
|
6275
|
+
}, z.core.$strict>>;
|
|
6276
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
6277
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
6278
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6279
|
+
knowledgeBaseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6280
|
+
skillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6281
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
6282
|
+
scope: z.ZodEnum<{
|
|
6283
|
+
user: "user";
|
|
6284
|
+
none: "none";
|
|
6285
|
+
space: "space";
|
|
6286
|
+
}>;
|
|
6287
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
6288
|
+
write: z.ZodOptional<z.ZodEnum<{
|
|
6289
|
+
none: "none";
|
|
6290
|
+
confirm: "confirm";
|
|
6291
|
+
"on-success": "on-success";
|
|
6292
|
+
}>>;
|
|
6293
|
+
}, z.core.$strict>>;
|
|
6294
|
+
}, z.core.$strict>>;
|
|
6295
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
6296
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6297
|
+
}, z.core.$strict>>;
|
|
6298
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6299
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
6300
|
+
profile: z.ZodOptional<z.ZodEnum<{
|
|
6301
|
+
"read-only": "read-only";
|
|
6302
|
+
workspace: "workspace";
|
|
6303
|
+
"full-access": "full-access";
|
|
6304
|
+
}>>;
|
|
6305
|
+
approval: z.ZodOptional<z.ZodEnum<{
|
|
6306
|
+
never: "never";
|
|
6307
|
+
"on-request": "on-request";
|
|
6308
|
+
}>>;
|
|
6309
|
+
ruleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6310
|
+
}, z.core.$strict>>;
|
|
6311
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
6312
|
+
queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
6313
|
+
runTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
6314
|
+
approvalTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
6315
|
+
maxOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
6316
|
+
}, z.core.$strict>>;
|
|
6317
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
6318
|
+
format: z.ZodEnum<{
|
|
6319
|
+
text: "text";
|
|
6320
|
+
json: "json";
|
|
6321
|
+
}>;
|
|
6322
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
6323
|
+
}, z.core.$strict>>;
|
|
6324
|
+
native: z.ZodOptional<z.ZodObject<{
|
|
6325
|
+
adapter: z.ZodString;
|
|
6326
|
+
options: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
6327
|
+
}, z.core.$strict>>;
|
|
6328
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6329
|
+
agentId: z.ZodString;
|
|
6330
|
+
}, z.core.$strict>;
|
|
6331
|
+
|
|
6332
|
+
/**
|
|
6333
|
+
* 应用核验主体和任务所请求的高权限选项。
|
|
6334
|
+
* @example
|
|
6335
|
+
* ```ts
|
|
6336
|
+
* import type { ACPPlatformPolicy } from '@h-ai/ai'
|
|
6337
|
+
* const policy: ACPPlatformPolicy = { allowFullAccess: scope => scope.userId === 'operator' }
|
|
6338
|
+
* ```
|
|
6339
|
+
*/
|
|
6340
|
+
interface ACPPlatformPolicy {
|
|
6341
|
+
/** 只接受已由应用确认的主体和 Agent。默认禁止完全访问。 */
|
|
6342
|
+
allowFullAccess?: (scope: RunnerScope, agentId: string) => boolean | Promise<boolean>;
|
|
6343
|
+
/** 自动模式下明确允许同一用户复用独占 Worker。 */
|
|
6344
|
+
preferUserWorker?: (scope: RunnerScope, agentId: string) => boolean | Promise<boolean>;
|
|
6345
|
+
/** 检查当前主体是否能使用选定工具,每轮重新校验。 */
|
|
6346
|
+
allowTools?: (scope: RunnerScope, agentId: string, toolIds: readonly string[]) => boolean | Promise<boolean>;
|
|
6347
|
+
/** 创建应用控制的 HTTP MCP 入口,凭据只在执行节点使用。 */
|
|
6348
|
+
bindTools?: (scope: RunnerScope, sessionId: string, toolIds: readonly string[], signal: AbortSignal) => Promise<{
|
|
6349
|
+
servers: McpServer[];
|
|
6350
|
+
revoke: () => void | Promise<void>;
|
|
6351
|
+
}>;
|
|
6352
|
+
/** 在计划和执行时验证知识库、文件与记忆选择的权限。 */
|
|
6353
|
+
allowContext?: (scope: RunnerScope, agentId: string, context: NonNullable<ACPPlatformRequest['context']>) => boolean | Promise<boolean>;
|
|
6354
|
+
/** 以当前主体检查只读工作区快照的访问权限。 */
|
|
6355
|
+
allowWorkspace?: (scope: RunnerScope, workspaceId: string) => boolean | Promise<boolean>;
|
|
6356
|
+
/** 在执行节点读取已授权的工作区文件。最多 8 个平铺普通文件,总量受执行环境和 16 MiB 上限约束。 */
|
|
6357
|
+
resolveWorkspace?: (scope: RunnerScope, workspaceId: string, signal: AbortSignal) => Promise<Readonly<Record<string, Uint8Array>>>;
|
|
6358
|
+
/** 在当前轮次装配经授权的知识片段、记忆及附件。只读;不共享宿主路径。 */
|
|
6359
|
+
resolveContext?: (scope: RunnerScope, request: ACPPlatformRequest, prompt: readonly ContentBlock[], signal: AbortSignal) => Promise<ContentBlock[]>;
|
|
6360
|
+
/** 提交用户记忆。应用按 turnId 幂等写入,或登记人工确认。 */
|
|
6361
|
+
commitMemory?: (input: {
|
|
6362
|
+
scope: RunnerScope;
|
|
6363
|
+
sessionId: string;
|
|
6364
|
+
turnId: string;
|
|
6365
|
+
context: NonNullable<ACPPlatformRequest['context']>;
|
|
6366
|
+
text: string;
|
|
6367
|
+
}, signal: AbortSignal) => Promise<void>;
|
|
6368
|
+
/** 解析已授权技能的正文或原生指令。 */
|
|
6369
|
+
resolveSkills?: (scope: RunnerScope, agentId: string, skillIds: readonly string[], signal: AbortSignal) => Promise<ContentBlock[]>;
|
|
6370
|
+
/** 核对当前 ACL 和原生操作,返回绑定真实对象与操作的规则键。返回 undefined 时拒绝。 */
|
|
6371
|
+
resolvePermission?: (scope: RunnerScope, sessionId: string, tool: RequestPermissionRequest['toolCall']) => {
|
|
6372
|
+
key: string;
|
|
6373
|
+
summary: string;
|
|
6374
|
+
} | undefined | Promise<{
|
|
6375
|
+
key: string;
|
|
6376
|
+
summary: string;
|
|
6377
|
+
} | undefined>;
|
|
6378
|
+
}
|
|
6379
|
+
/**
|
|
6380
|
+
* 审批有效期或拒绝本次操作。
|
|
6381
|
+
* @example
|
|
6382
|
+
* ```ts
|
|
6383
|
+
* import type { ACPApprovalDecision } from '@h-ai/ai'
|
|
6384
|
+
* const decision: ACPApprovalDecision = 'allow-once'
|
|
6385
|
+
* ```
|
|
6386
|
+
*/
|
|
6387
|
+
type ACPApprovalDecision = 'allow-once' | 'allow-session' | 'always-allow' | 'deny';
|
|
6388
|
+
/**
|
|
6389
|
+
* 受管会话及计划的调用参数。
|
|
6390
|
+
* @example
|
|
6391
|
+
* ```ts
|
|
6392
|
+
* import type { ACPPlatformRequest } from '@h-ai/ai'
|
|
6393
|
+
* const request: ACPPlatformRequest = { agentId: 'assistant', execution: { mode: 'auto' } }
|
|
6394
|
+
* ```
|
|
6395
|
+
*/
|
|
6396
|
+
type ACPPlatformRequest = z.input<typeof platformRequestSchema>;
|
|
6397
|
+
/**
|
|
6398
|
+
* 一次请求的业务输入。
|
|
6399
|
+
* @example
|
|
6400
|
+
* ```ts
|
|
6401
|
+
* import type { ACPRunRequest } from '@h-ai/ai'
|
|
6402
|
+
* const request: ACPRunRequest = { agentId: 'assistant', prompt: '总结', idempotencyKey: 'message-1' }
|
|
6403
|
+
* ```
|
|
6404
|
+
*/
|
|
6405
|
+
type ACPRunRequest = ACPPlatformRequest & {
|
|
6406
|
+
prompt: string | ContentBlock[];
|
|
6407
|
+
idempotencyKey?: string;
|
|
6408
|
+
};
|
|
6409
|
+
/**
|
|
6410
|
+
* API 侧的观察器和显式取消信号。
|
|
6411
|
+
* @example
|
|
6412
|
+
* ```ts
|
|
6413
|
+
* import type { ACPRunObserver } from '@h-ai/ai'
|
|
6414
|
+
* const observer: ACPRunObserver = { signal: new AbortController().signal }
|
|
6415
|
+
* ```
|
|
6416
|
+
*/
|
|
6417
|
+
interface ACPRunObserver {
|
|
6418
|
+
signal?: AbortSignal;
|
|
6419
|
+
onEvent?: (event: RunnerJson) => void;
|
|
6420
|
+
}
|
|
6421
|
+
/**
|
|
6422
|
+
* 可在当前轮次调整的时限、输出和事件观察选项。
|
|
6423
|
+
* @example
|
|
6424
|
+
* ```ts
|
|
6425
|
+
* import type { ACPTurnOptions } from '@h-ai/ai'
|
|
6426
|
+
* const options: ACPTurnOptions = { limits: { runTimeoutMs: 10000 }, output: { format: 'json' } }
|
|
6427
|
+
* ```
|
|
6428
|
+
*/
|
|
6429
|
+
type ACPTurnOptions = ACPRunObserver & Pick<ACPPlatformRequest, 'limits' | 'output'>;
|
|
6430
|
+
|
|
5533
6431
|
/**
|
|
5534
6432
|
* @h-ai/ai — RAG(Retrieval-Augmented Generation)子功能类型
|
|
5535
6433
|
*
|
|
@@ -6863,34 +7761,414 @@ interface FileOperations {
|
|
|
6863
7761
|
}
|
|
6864
7762
|
|
|
6865
7763
|
/**
|
|
6866
|
-
* @h-ai/ai —
|
|
7764
|
+
* @h-ai/ai — MCP 子功能类型
|
|
6867
7765
|
*
|
|
6868
|
-
*
|
|
6869
|
-
*
|
|
6870
|
-
* 长期人格。它与 Memory 正交——Memory 用 `objectId` / `scope` 回答「谁的记忆」,
|
|
6871
|
-
* Persona 回答「这个 AI 的身份与人设」,二者通过 `scope: { personaId }` 关联。
|
|
6872
|
-
* @module ai-persona-types
|
|
7766
|
+
* 定义 MCP 工具、资源、提示词的注册与调用接口。
|
|
7767
|
+
* @module ai-mcp-types
|
|
6873
7768
|
*/
|
|
6874
7769
|
|
|
6875
7770
|
/**
|
|
6876
|
-
*
|
|
7771
|
+
* MCP 工具定义(注册工具时的元数据)
|
|
6877
7772
|
*
|
|
6878
7773
|
* @example
|
|
6879
7774
|
* ```ts
|
|
6880
|
-
* import type
|
|
6881
|
-
*
|
|
6882
|
-
* const
|
|
7775
|
+
* import { ai, type MCPToolDefinition } from '@h-ai/ai'
|
|
7776
|
+
* // 应用启动已成功初始化 ai;echo 为无外部副作用的示例工具。
|
|
7777
|
+
* const definition: MCPToolDefinition = { name: 'echo', description: '返回输入', inputSchema: { type: 'object', properties: { text: { type: 'string' } }, required: ['text'], additionalProperties: false } }
|
|
7778
|
+
* const registered = ai.mcp.registerTool(definition, (input: { text: string }) => ({ text: input.text }))
|
|
7779
|
+
* if (!registered.success) throw new Error(registered.error.message)
|
|
6883
7780
|
* ```
|
|
6884
7781
|
*/
|
|
6885
|
-
interface
|
|
6886
|
-
/**
|
|
6887
|
-
|
|
6888
|
-
/**
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
7782
|
+
interface MCPToolDefinition {
|
|
7783
|
+
/** 工具名称(需唯一) */
|
|
7784
|
+
name: string;
|
|
7785
|
+
/** 工具功能描述 */
|
|
7786
|
+
description: string;
|
|
7787
|
+
/** 输入参数的 JSON Schema */
|
|
7788
|
+
inputSchema: Record<string, unknown>;
|
|
7789
|
+
}
|
|
7790
|
+
/**
|
|
7791
|
+
* MCP 工具处理器,接收输入参数和执行上下文
|
|
7792
|
+
*
|
|
7793
|
+
* @example
|
|
7794
|
+
* ```ts
|
|
7795
|
+
* import type { MCPToolHandler } from '@h-ai/ai'
|
|
7796
|
+
* const echo: MCPToolHandler<{ text: string }, { text: string }> = (input, context) => ({ text: `${context.requestId ?? 'request'}: ${input.text}` })
|
|
7797
|
+
* const output = await echo({ text: '你好' }, { requestId: 'request-1' })
|
|
7798
|
+
* ```
|
|
7799
|
+
*/
|
|
7800
|
+
type MCPToolHandler<TInput = unknown, TOutput = unknown> = (input: TInput, context: MCPContext) => Promise<TOutput> | TOutput;
|
|
7801
|
+
/**
|
|
7802
|
+
* MCP 执行上下文,携带请求元数据
|
|
7803
|
+
*
|
|
7804
|
+
* @example
|
|
7805
|
+
* ```ts
|
|
7806
|
+
* import type { MCPContext } from '@h-ai/ai'
|
|
7807
|
+
* const value: MCPContext = { requestId: 'request-1', clientInfo: { name: 'assistant', version: '1.0.0' } }
|
|
7808
|
+
* const correlationId = value.requestId
|
|
7809
|
+
* ```
|
|
7810
|
+
*/
|
|
7811
|
+
interface MCPContext {
|
|
7812
|
+
/** 请求唯一标识(未传入时自动生成 UUID) */
|
|
7813
|
+
requestId?: string;
|
|
7814
|
+
/** 客户端信息(可选) */
|
|
7815
|
+
clientInfo?: {
|
|
7816
|
+
name: string;
|
|
7817
|
+
version: string;
|
|
7818
|
+
};
|
|
7819
|
+
/** 自定义元数据(可选) */
|
|
7820
|
+
metadata?: Record<string, unknown>;
|
|
7821
|
+
}
|
|
7822
|
+
/**
|
|
7823
|
+
* MCP 资源描述(注册资源时的元数据)
|
|
7824
|
+
*
|
|
7825
|
+
* @example
|
|
7826
|
+
* ```ts
|
|
7827
|
+
* import type { MCPResource } from '@h-ai/ai'
|
|
7828
|
+
* const value: MCPResource = { uri: 'config://public/features', name: '公开特性', mimeType: 'application/json' }
|
|
7829
|
+
* const resourceName = value.name
|
|
7830
|
+
* ```
|
|
7831
|
+
*/
|
|
7832
|
+
interface MCPResource {
|
|
7833
|
+
/** 资源 URI(唯一标识) */
|
|
7834
|
+
uri: string;
|
|
7835
|
+
/** 资源名称 */
|
|
7836
|
+
name: string;
|
|
7837
|
+
/** 资源描述(可选) */
|
|
7838
|
+
description?: string;
|
|
7839
|
+
/** MIME 类型(可选,如 `'application/json'`) */
|
|
7840
|
+
mimeType?: string;
|
|
7841
|
+
}
|
|
7842
|
+
/**
|
|
7843
|
+
* MCP 资源内容(readResource 的返回值)
|
|
7844
|
+
*
|
|
7845
|
+
* @example
|
|
7846
|
+
* ```ts
|
|
7847
|
+
* import type { MCPResourceContent } from '@h-ai/ai'
|
|
7848
|
+
* const value: MCPResourceContent = { uri: 'config://public/features', mimeType: 'application/json', text: JSON.stringify({ enabled: true }) }
|
|
7849
|
+
* const text = value.text
|
|
7850
|
+
* ```
|
|
7851
|
+
*/
|
|
7852
|
+
interface MCPResourceContent {
|
|
7853
|
+
/** 资源 URI */
|
|
7854
|
+
uri: string;
|
|
7855
|
+
/** MIME 类型(可选) */
|
|
7856
|
+
mimeType?: string;
|
|
7857
|
+
/** 文本内容(与 blob 二选一) */
|
|
7858
|
+
text?: string;
|
|
7859
|
+
/** Base64 编码的二进制内容(与 text 二选一) */
|
|
7860
|
+
blob?: string;
|
|
7861
|
+
}
|
|
7862
|
+
/**
|
|
7863
|
+
* MCP 提示词模板描述
|
|
7864
|
+
*
|
|
7865
|
+
* @example
|
|
7866
|
+
* ```ts
|
|
7867
|
+
* import type { MCPPrompt } from '@h-ai/ai'
|
|
7868
|
+
* const value: MCPPrompt = { name: 'explain', description: '解释主题', arguments: [{ name: 'topic', required: true }] }
|
|
7869
|
+
* const required = value.arguments?.filter(argument => argument.required)
|
|
7870
|
+
* ```
|
|
7871
|
+
*/
|
|
7872
|
+
interface MCPPrompt {
|
|
7873
|
+
/** 提示词名称(唯一标识) */
|
|
7874
|
+
name: string;
|
|
7875
|
+
/** 提示词描述(可选) */
|
|
7876
|
+
description?: string;
|
|
7877
|
+
/** 参数定义列表(可选) */
|
|
7878
|
+
arguments?: MCPPromptArgument[];
|
|
7879
|
+
}
|
|
7880
|
+
/**
|
|
7881
|
+
* MCP 提示词参数定义
|
|
7882
|
+
*
|
|
7883
|
+
* @example
|
|
7884
|
+
* ```ts
|
|
7885
|
+
* import type { MCPPromptArgument } from '@h-ai/ai'
|
|
7886
|
+
* const value: MCPPromptArgument = { name: 'topic', description: '要解释的主题', required: true }
|
|
7887
|
+
* const field = value.name
|
|
7888
|
+
* ```
|
|
7889
|
+
*/
|
|
7890
|
+
interface MCPPromptArgument {
|
|
7891
|
+
/** 参数名称 */
|
|
7892
|
+
name: string;
|
|
7893
|
+
/** 参数描述(可选) */
|
|
7894
|
+
description?: string;
|
|
7895
|
+
/** 是否必填(默认 `false`) */
|
|
7896
|
+
required?: boolean;
|
|
7897
|
+
}
|
|
7898
|
+
/**
|
|
7899
|
+
* MCP 提示词消息,直接复用 SDK 的完整判别联合(含图片、音频与嵌入资源)
|
|
7900
|
+
*
|
|
7901
|
+
* @example
|
|
7902
|
+
* ```ts
|
|
7903
|
+
* import type { MCPPromptMessage } from '@h-ai/ai'
|
|
7904
|
+
* const value: MCPPromptMessage = { role: 'user', content: { type: 'text', text: '请解释共享状态' } }
|
|
7905
|
+
* const role = value.role
|
|
7906
|
+
* ```
|
|
7907
|
+
*/
|
|
7908
|
+
type MCPPromptMessage = PromptMessage;
|
|
7909
|
+
/**
|
|
7910
|
+
* MCP 提示词内容;按 type 缩窄后访问对应字段
|
|
7911
|
+
*
|
|
7912
|
+
* @example
|
|
7913
|
+
* ```ts
|
|
7914
|
+
* import type { MCPPromptContent } from '@h-ai/ai'
|
|
7915
|
+
* function textContent(content: MCPPromptContent): string | undefined {
|
|
7916
|
+
* return content.type === 'text' ? content.text : undefined
|
|
7917
|
+
* }
|
|
7918
|
+
* ```
|
|
7919
|
+
*/
|
|
7920
|
+
type MCPPromptContent = PromptMessage['content'];
|
|
7921
|
+
/**
|
|
7922
|
+
* MCP 服务器创建选项
|
|
7923
|
+
*
|
|
7924
|
+
* @example
|
|
7925
|
+
* ```ts
|
|
7926
|
+
* import { createMcpServer, type McpServerOptions } from '@h-ai/ai'
|
|
7927
|
+
* const options: McpServerOptions = { name: 'public-tools', version: '1.0.0' }
|
|
7928
|
+
* const server = createMcpServer(options)
|
|
7929
|
+
* // 应用停止接入请求后关闭 SDK server。
|
|
7930
|
+
* await server.close()
|
|
7931
|
+
* ```
|
|
7932
|
+
*/
|
|
7933
|
+
interface McpServerOptions {
|
|
7934
|
+
/** 服务器名称 */
|
|
7935
|
+
name: string;
|
|
7936
|
+
/** 服务器版本(默认 `'1.0.0'`) */
|
|
7937
|
+
version?: string;
|
|
7938
|
+
}
|
|
7939
|
+
/**
|
|
7940
|
+
* MCP 操作接口(通过 `ai.mcp` 访问)
|
|
7941
|
+
*
|
|
7942
|
+
* 需要先调用 `ai.init()` 初始化,否则所有方法返回 `NOT_INITIALIZED` 错误。
|
|
7943
|
+
*
|
|
7944
|
+
* @example
|
|
7945
|
+
* ```ts
|
|
7946
|
+
* import { ai, type MCPOperations } from '@h-ai/ai'
|
|
7947
|
+
* // 应用启动已成功初始化 ai。
|
|
7948
|
+
* const mcp: MCPOperations = ai.mcp
|
|
7949
|
+
* const registered = mcp.registerTool({ name: 'echo', description: '返回输入', inputSchema: { type: 'string' } }, (input: string) => input)
|
|
7950
|
+
* if (!registered.success) throw new Error(registered.error.message)
|
|
7951
|
+
* const called = await mcp.callTool('echo', '你好', { requestId: 'request-1' })
|
|
7952
|
+
* if (!called.success) throw new Error(called.error.message)
|
|
7953
|
+
* ```
|
|
7954
|
+
*/
|
|
7955
|
+
interface MCPOperations {
|
|
7956
|
+
/** 注册工具并编译 JSON Schema;非法 Schema 返回 MCP_TOOL_ERROR,同名注册覆盖 */
|
|
7957
|
+
registerTool: <TInput, TOutput>(definition: MCPToolDefinition, handler: MCPToolHandler<TInput, TOutput>) => HaiResult<void>;
|
|
7958
|
+
/** 注册资源加载器;读取时校验 text/blob 输出 */
|
|
7959
|
+
registerResource: (resource: MCPResource, handler: () => Promise<MCPResourceContent>) => HaiResult<void>;
|
|
7960
|
+
/** 注册提示词;调用时校验必填参数和 SDK 消息格式 */
|
|
7961
|
+
registerPrompt: (prompt: MCPPrompt, handler: (args: Record<string, string>) => Promise<MCPPromptMessage[]>) => HaiResult<void>;
|
|
7962
|
+
/** 校验输入后执行工具;自动补齐缺失的 requestId */
|
|
7963
|
+
callTool: (name: string, args: unknown, context?: MCPContext) => Promise<HaiResult<unknown>>;
|
|
7964
|
+
/** 读取资源,输出必须恰好含一个有效 text 或 blob */
|
|
7965
|
+
readResource: (uri: string) => Promise<HaiResult<MCPResourceContent>>;
|
|
7966
|
+
/** 渲染提示词;必填参数必须是自身属性,且提供的已声明参数必须是字符串 */
|
|
7967
|
+
getPrompt: (name: string, args: Record<string, string>) => Promise<HaiResult<MCPPromptMessage[]>>;
|
|
7968
|
+
}
|
|
7969
|
+
/**
|
|
7970
|
+
* 按目录 ID 调用工具,连接设置始终由服务端清单提供。
|
|
7971
|
+
* @example
|
|
7972
|
+
* ```ts
|
|
7973
|
+
* import type { MCPServiceRequest } from '@h-ai/ai'
|
|
7974
|
+
* const request: MCPServiceRequest = { serviceId: 'docs', tool: 'search', arguments: { query: 'manual' } }
|
|
7975
|
+
* ```
|
|
7976
|
+
*/
|
|
7977
|
+
interface MCPServiceRequest {
|
|
7978
|
+
serviceId: string;
|
|
7979
|
+
tool: string;
|
|
7980
|
+
arguments?: CallToolRequest['params']['arguments'];
|
|
7981
|
+
}
|
|
7982
|
+
/**
|
|
7983
|
+
* 由可信应用从认证态和业务授权构造的调用上下文。
|
|
7984
|
+
* @example
|
|
7985
|
+
* ```ts
|
|
7986
|
+
* import type { MCPServiceAuthorization } from '@h-ai/ai'
|
|
7987
|
+
* const authorization: MCPServiceAuthorization = {
|
|
7988
|
+
* principal: { tenantId: 'team', userId: 'ada' },
|
|
7989
|
+
* authorize: ({ principal, serviceId, tool }) => principal.tenantId === 'team' && serviceId === 'docs' && tool === 'search',
|
|
7990
|
+
* }
|
|
7991
|
+
* ```
|
|
7992
|
+
*/
|
|
7993
|
+
interface MCPServiceAuthorization {
|
|
7994
|
+
/** 从 IAM 会话或可信服务身份取得的主体,不能从模型或工具参数构造。 */
|
|
7995
|
+
principal: {
|
|
7996
|
+
tenantId: string;
|
|
7997
|
+
userId: string;
|
|
7998
|
+
};
|
|
7999
|
+
/** 可信调用方绑定的业务任务 ID;通过 Broker 调用时由绑定提供。 */
|
|
8000
|
+
taskId?: string;
|
|
8001
|
+
/** 根据主体、工具和实际参数检查资料访问权限及操作权限。 */
|
|
8002
|
+
authorize: (input: MCPServiceRequest & {
|
|
8003
|
+
principal: MCPServiceAuthorization['principal'];
|
|
8004
|
+
signal: AbortSignal;
|
|
8005
|
+
}) => boolean | Promise<boolean>;
|
|
8006
|
+
/** 在请求开始前或执行中取消;远端已完成的操作由业务核对。 */
|
|
8007
|
+
signal?: AbortSignal;
|
|
8008
|
+
}
|
|
8009
|
+
/**
|
|
8010
|
+
* 作业执行者在读取授权对象或提交暂存产物时使用的可信业务绑定。
|
|
8011
|
+
* @example
|
|
8012
|
+
* ```ts
|
|
8013
|
+
* import type { MCPJobFileContext } from '@h-ai/ai'
|
|
8014
|
+
* function owner(context: MCPJobFileContext) { return context.principal.tenantId }
|
|
8015
|
+
* ```
|
|
8016
|
+
*/
|
|
8017
|
+
interface MCPJobFileContext {
|
|
8018
|
+
principal: MCPServiceAuthorization['principal'];
|
|
8019
|
+
taskId?: string;
|
|
8020
|
+
jobId: string;
|
|
8021
|
+
signal: AbortSignal;
|
|
8022
|
+
}
|
|
8023
|
+
/**
|
|
8024
|
+
* 应用提供对象 ACL 与存储接入。文件内容只在作业节点暂存,队列仅保存对象 ID。
|
|
8025
|
+
* @example
|
|
8026
|
+
* ```ts
|
|
8027
|
+
* import { err, type HaiResult } from '@h-ai/core'
|
|
8028
|
+
* import { HaiAIError, type MCPJobFiles } from '@h-ai/ai'
|
|
8029
|
+
* function denied<T>(): HaiResult<T> { return err(HaiAIError.MCP_TOOL_FORBIDDEN, 'File is not authorized') }
|
|
8030
|
+
* const files: MCPJobFiles = { read: async () => denied(), publish: async () => denied() }
|
|
8031
|
+
* ```
|
|
8032
|
+
*/
|
|
8033
|
+
interface MCPJobFiles {
|
|
8034
|
+
/** 在读取前验证主体、任务状态、对象归属和读取授权。 */
|
|
8035
|
+
read: (input: MCPJobFileContext & {
|
|
8036
|
+
fileId: string;
|
|
8037
|
+
}) => Promise<HaiResult<{
|
|
8038
|
+
name: string;
|
|
8039
|
+
base64: string;
|
|
8040
|
+
}>>;
|
|
8041
|
+
/** 重新验证主体与任务,提交带归属、可按 jobId 回收的暂存对象。 */
|
|
8042
|
+
publish: (input: MCPJobFileContext & {
|
|
8043
|
+
name: string;
|
|
8044
|
+
base64: string;
|
|
8045
|
+
}) => Promise<HaiResult<{
|
|
8046
|
+
fileId: string;
|
|
8047
|
+
}>>;
|
|
8048
|
+
}
|
|
8049
|
+
/**
|
|
8050
|
+
* 通过现有合并目录调用受控的第三方 Streamable HTTP 工具。
|
|
8051
|
+
* @example
|
|
8052
|
+
* ```ts
|
|
8053
|
+
* import { ai, type MCPServiceAuthorization } from '@h-ai/ai'
|
|
8054
|
+
* async function search(context: MCPServiceAuthorization) {
|
|
8055
|
+
* const result = await ai.mcp.services.invoke({ serviceId: 'docs', tool: 'search', arguments: { query: 'manual' } }, context)
|
|
8056
|
+
* if (!result.success) return result
|
|
8057
|
+
* return result.data.content
|
|
8058
|
+
* }
|
|
8059
|
+
* ```
|
|
8060
|
+
*/
|
|
8061
|
+
interface MCPServiceOperations {
|
|
8062
|
+
/** 解析当前清单和授权后连接远端,返回标准 MCP 工具内容或本地化失败。 */
|
|
8063
|
+
invoke: (request: MCPServiceRequest, authorization: MCPServiceAuthorization) => Promise<HaiResult<CallToolResult>>;
|
|
8064
|
+
/** 在执行节点创建受信 HTTP 工具入口。 */
|
|
8065
|
+
createBroker: (options: MCPServiceBrokerOptions) => HaiResult<MCPServiceBroker>;
|
|
8066
|
+
}
|
|
8067
|
+
/**
|
|
8068
|
+
* 工具入口固定地址及每次调用的实时业务授权。
|
|
8069
|
+
* @example
|
|
8070
|
+
* ```ts
|
|
8071
|
+
* import type { MCPServiceBrokerOptions } from '@h-ai/ai'
|
|
8072
|
+
* const broker: MCPServiceBrokerOptions = {
|
|
8073
|
+
* url: 'https://executor.example.com/mcp',
|
|
8074
|
+
* authorize: ({ principal, serviceId, taskId }) => principal.tenantId === 'team' && serviceId === 'docs' && taskId === 'run-1',
|
|
8075
|
+
* }
|
|
8076
|
+
* ```
|
|
8077
|
+
*/
|
|
8078
|
+
interface MCPServiceBrokerOptions {
|
|
8079
|
+
/** Agent 容器可访问的固定工具端点。 */
|
|
8080
|
+
url: string;
|
|
8081
|
+
/** 可信应用每次核验任务仍运行、主体和实际参数仍允许。 */
|
|
8082
|
+
authorize: (input: Parameters<MCPServiceAuthorization['authorize']>[0] & {
|
|
8083
|
+
taskId: string;
|
|
8084
|
+
}) => boolean | Promise<boolean>;
|
|
8085
|
+
}
|
|
8086
|
+
/**
|
|
8087
|
+
* 任务授权、模型可见工具名及应用提供的输入契约。
|
|
8088
|
+
* @example
|
|
8089
|
+
* ```ts
|
|
8090
|
+
* import type { MCPServiceBindingRequest } from '@h-ai/ai'
|
|
8091
|
+
* const binding: MCPServiceBindingRequest = {
|
|
8092
|
+
* principal: { tenantId: 'team', userId: 'ada' },
|
|
8093
|
+
* taskId: 'run-1',
|
|
8094
|
+
* tools: [{ id: 'docs_search', serviceId: 'docs', tool: 'search', description: 'Search manuals', inputSchema: { type: 'object' } }],
|
|
8095
|
+
* }
|
|
8096
|
+
* ```
|
|
8097
|
+
*/
|
|
8098
|
+
interface MCPServiceBindingRequest {
|
|
8099
|
+
principal: MCPServiceAuthorization['principal'];
|
|
8100
|
+
taskId: string;
|
|
8101
|
+
tools: Array<{
|
|
8102
|
+
id: string;
|
|
8103
|
+
serviceId: string;
|
|
8104
|
+
tool: string;
|
|
8105
|
+
description: string;
|
|
8106
|
+
inputSchema: Record<string, unknown>;
|
|
8107
|
+
}>;
|
|
8108
|
+
/** 有效期,缺省 15 分钟,最多 24 小时。 */
|
|
8109
|
+
ttlMs?: number;
|
|
8110
|
+
/** 执行结束或失租时撤销此绑定。 */
|
|
8111
|
+
signal?: AbortSignal;
|
|
8112
|
+
}
|
|
8113
|
+
/**
|
|
8114
|
+
* 只向当前执行代次提供的 MCP 连接和撤销句柄。
|
|
8115
|
+
* @example
|
|
8116
|
+
* ```ts
|
|
8117
|
+
* import type { MCPServiceBinding } from '@h-ai/ai'
|
|
8118
|
+
* function stop(binding: MCPServiceBinding) { binding.revoke() }
|
|
8119
|
+
* ```
|
|
8120
|
+
*/
|
|
8121
|
+
interface MCPServiceBinding {
|
|
8122
|
+
/** 仅传给当前 Agent,含短期 Bearer。 */
|
|
8123
|
+
servers: Array<Extract<McpServer, {
|
|
8124
|
+
type: 'http';
|
|
8125
|
+
}>>;
|
|
8126
|
+
revoke: () => void;
|
|
8127
|
+
}
|
|
8128
|
+
/**
|
|
8129
|
+
* 执行节点挂载的任务工具入口。
|
|
8130
|
+
* @example
|
|
8131
|
+
* ```ts
|
|
8132
|
+
* import { createServer } from 'node:http'
|
|
8133
|
+
* import type { MCPServiceBroker } from '@h-ai/ai'
|
|
8134
|
+
* function mount(broker: MCPServiceBroker) { return createServer((req, res) => void broker.handleRequest(req, res)) }
|
|
8135
|
+
* ```
|
|
8136
|
+
*/
|
|
8137
|
+
interface MCPServiceBroker {
|
|
8138
|
+
bind: (request: MCPServiceBindingRequest) => Promise<HaiResult<MCPServiceBinding>>;
|
|
8139
|
+
handleRequest: (request: IncomingMessage, response: ServerResponse) => Promise<void>;
|
|
8140
|
+
close: () => void;
|
|
8141
|
+
}
|
|
8142
|
+
|
|
8143
|
+
/**
|
|
8144
|
+
* @h-ai/ai — Persona 子功能类型
|
|
8145
|
+
*
|
|
8146
|
+
* 定义「AI 角色人格」的持久化与组合接口。Persona 解决的是「AI 是谁」的问题:
|
|
8147
|
+
* 多智能体场景(如多位专家同台访谈)中,每个 AI 有稳定的系统提示词、性格特征与
|
|
8148
|
+
* 长期人格。它与 Memory 正交——Memory 用 `objectId` / `scope` 回答「谁的记忆」,
|
|
8149
|
+
* Persona 回答「这个 AI 的身份与人设」,二者通过 `scope: { personaId }` 关联。
|
|
8150
|
+
* @module ai-persona-types
|
|
8151
|
+
*/
|
|
8152
|
+
|
|
8153
|
+
/**
|
|
8154
|
+
* Persona 档案输入(创建 / 覆盖保存时使用)
|
|
8155
|
+
*
|
|
8156
|
+
* @example
|
|
8157
|
+
* ```ts
|
|
8158
|
+
* import type { PersonaProfileInput } from '@h-ai/ai'
|
|
8159
|
+
*
|
|
8160
|
+
* const value: PersonaProfileInput = { id: 'support', objectId: 'tenant-1', name: '客服助手', systemPrompt: '根据已验证的订单信息回答。', traits: ['简洁', '先核对证据'] }
|
|
8161
|
+
* ```
|
|
8162
|
+
*/
|
|
8163
|
+
interface PersonaProfileInput {
|
|
8164
|
+
/** 角色唯一标识(业务侧稳定 ID,如 `xiaop`) */
|
|
8165
|
+
id: string;
|
|
8166
|
+
/**
|
|
8167
|
+
* 所属主体 ID(多租户隔离)
|
|
8168
|
+
*
|
|
8169
|
+
* 不同主体可创建同名角色而互不覆盖;不传时归为平台内置角色 `system`。
|
|
8170
|
+
*/
|
|
8171
|
+
objectId?: string;
|
|
6894
8172
|
/** 角色显示名(如「小P」) */
|
|
6895
8173
|
name?: string;
|
|
6896
8174
|
/** 角色系统提示词(定义身份、职责、语气) */
|
|
@@ -7163,213 +8441,6 @@ interface ImageOperations {
|
|
|
7163
8441
|
generate: (request: GenerateImageRequest) => Promise<HaiResult<GenerateImageResult>>;
|
|
7164
8442
|
}
|
|
7165
8443
|
|
|
7166
|
-
/**
|
|
7167
|
-
* @h-ai/ai — MCP 子功能类型
|
|
7168
|
-
*
|
|
7169
|
-
* 定义 MCP 工具、资源、提示词的注册与调用接口。
|
|
7170
|
-
* @module ai-mcp-types
|
|
7171
|
-
*/
|
|
7172
|
-
|
|
7173
|
-
/**
|
|
7174
|
-
* MCP 工具定义(注册工具时的元数据)
|
|
7175
|
-
*
|
|
7176
|
-
* @example
|
|
7177
|
-
* ```ts
|
|
7178
|
-
* import { ai, type MCPToolDefinition } from '@h-ai/ai'
|
|
7179
|
-
* // 应用启动已成功初始化 ai;echo 为无外部副作用的示例工具。
|
|
7180
|
-
* const definition: MCPToolDefinition = { name: 'echo', description: '返回输入', inputSchema: { type: 'object', properties: { text: { type: 'string' } }, required: ['text'], additionalProperties: false } }
|
|
7181
|
-
* const registered = ai.mcp.registerTool(definition, (input: { text: string }) => ({ text: input.text }))
|
|
7182
|
-
* if (!registered.success) throw new Error(registered.error.message)
|
|
7183
|
-
* ```
|
|
7184
|
-
*/
|
|
7185
|
-
interface MCPToolDefinition {
|
|
7186
|
-
/** 工具名称(需唯一) */
|
|
7187
|
-
name: string;
|
|
7188
|
-
/** 工具功能描述 */
|
|
7189
|
-
description: string;
|
|
7190
|
-
/** 输入参数的 JSON Schema */
|
|
7191
|
-
inputSchema: Record<string, unknown>;
|
|
7192
|
-
}
|
|
7193
|
-
/**
|
|
7194
|
-
* MCP 工具处理器,接收输入参数和执行上下文
|
|
7195
|
-
*
|
|
7196
|
-
* @example
|
|
7197
|
-
* ```ts
|
|
7198
|
-
* import type { MCPToolHandler } from '@h-ai/ai'
|
|
7199
|
-
* const echo: MCPToolHandler<{ text: string }, { text: string }> = (input, context) => ({ text: `${context.requestId ?? 'request'}: ${input.text}` })
|
|
7200
|
-
* const output = await echo({ text: '你好' }, { requestId: 'request-1' })
|
|
7201
|
-
* ```
|
|
7202
|
-
*/
|
|
7203
|
-
type MCPToolHandler<TInput = unknown, TOutput = unknown> = (input: TInput, context: MCPContext) => Promise<TOutput> | TOutput;
|
|
7204
|
-
/**
|
|
7205
|
-
* MCP 执行上下文,携带请求元数据
|
|
7206
|
-
*
|
|
7207
|
-
* @example
|
|
7208
|
-
* ```ts
|
|
7209
|
-
* import type { MCPContext } from '@h-ai/ai'
|
|
7210
|
-
* const value: MCPContext = { requestId: 'request-1', clientInfo: { name: 'assistant', version: '1.0.0' } }
|
|
7211
|
-
* const correlationId = value.requestId
|
|
7212
|
-
* ```
|
|
7213
|
-
*/
|
|
7214
|
-
interface MCPContext {
|
|
7215
|
-
/** 请求唯一标识(未传入时自动生成 UUID) */
|
|
7216
|
-
requestId?: string;
|
|
7217
|
-
/** 客户端信息(可选) */
|
|
7218
|
-
clientInfo?: {
|
|
7219
|
-
name: string;
|
|
7220
|
-
version: string;
|
|
7221
|
-
};
|
|
7222
|
-
/** 自定义元数据(可选) */
|
|
7223
|
-
metadata?: Record<string, unknown>;
|
|
7224
|
-
}
|
|
7225
|
-
/**
|
|
7226
|
-
* MCP 资源描述(注册资源时的元数据)
|
|
7227
|
-
*
|
|
7228
|
-
* @example
|
|
7229
|
-
* ```ts
|
|
7230
|
-
* import type { MCPResource } from '@h-ai/ai'
|
|
7231
|
-
* const value: MCPResource = { uri: 'config://public/features', name: '公开特性', mimeType: 'application/json' }
|
|
7232
|
-
* const resourceName = value.name
|
|
7233
|
-
* ```
|
|
7234
|
-
*/
|
|
7235
|
-
interface MCPResource {
|
|
7236
|
-
/** 资源 URI(唯一标识) */
|
|
7237
|
-
uri: string;
|
|
7238
|
-
/** 资源名称 */
|
|
7239
|
-
name: string;
|
|
7240
|
-
/** 资源描述(可选) */
|
|
7241
|
-
description?: string;
|
|
7242
|
-
/** MIME 类型(可选,如 `'application/json'`) */
|
|
7243
|
-
mimeType?: string;
|
|
7244
|
-
}
|
|
7245
|
-
/**
|
|
7246
|
-
* MCP 资源内容(readResource 的返回值)
|
|
7247
|
-
*
|
|
7248
|
-
* @example
|
|
7249
|
-
* ```ts
|
|
7250
|
-
* import type { MCPResourceContent } from '@h-ai/ai'
|
|
7251
|
-
* const value: MCPResourceContent = { uri: 'config://public/features', mimeType: 'application/json', text: JSON.stringify({ enabled: true }) }
|
|
7252
|
-
* const text = value.text
|
|
7253
|
-
* ```
|
|
7254
|
-
*/
|
|
7255
|
-
interface MCPResourceContent {
|
|
7256
|
-
/** 资源 URI */
|
|
7257
|
-
uri: string;
|
|
7258
|
-
/** MIME 类型(可选) */
|
|
7259
|
-
mimeType?: string;
|
|
7260
|
-
/** 文本内容(与 blob 二选一) */
|
|
7261
|
-
text?: string;
|
|
7262
|
-
/** Base64 编码的二进制内容(与 text 二选一) */
|
|
7263
|
-
blob?: string;
|
|
7264
|
-
}
|
|
7265
|
-
/**
|
|
7266
|
-
* MCP 提示词模板描述
|
|
7267
|
-
*
|
|
7268
|
-
* @example
|
|
7269
|
-
* ```ts
|
|
7270
|
-
* import type { MCPPrompt } from '@h-ai/ai'
|
|
7271
|
-
* const value: MCPPrompt = { name: 'explain', description: '解释主题', arguments: [{ name: 'topic', required: true }] }
|
|
7272
|
-
* const required = value.arguments?.filter(argument => argument.required)
|
|
7273
|
-
* ```
|
|
7274
|
-
*/
|
|
7275
|
-
interface MCPPrompt {
|
|
7276
|
-
/** 提示词名称(唯一标识) */
|
|
7277
|
-
name: string;
|
|
7278
|
-
/** 提示词描述(可选) */
|
|
7279
|
-
description?: string;
|
|
7280
|
-
/** 参数定义列表(可选) */
|
|
7281
|
-
arguments?: MCPPromptArgument[];
|
|
7282
|
-
}
|
|
7283
|
-
/**
|
|
7284
|
-
* MCP 提示词参数定义
|
|
7285
|
-
*
|
|
7286
|
-
* @example
|
|
7287
|
-
* ```ts
|
|
7288
|
-
* import type { MCPPromptArgument } from '@h-ai/ai'
|
|
7289
|
-
* const value: MCPPromptArgument = { name: 'topic', description: '要解释的主题', required: true }
|
|
7290
|
-
* const field = value.name
|
|
7291
|
-
* ```
|
|
7292
|
-
*/
|
|
7293
|
-
interface MCPPromptArgument {
|
|
7294
|
-
/** 参数名称 */
|
|
7295
|
-
name: string;
|
|
7296
|
-
/** 参数描述(可选) */
|
|
7297
|
-
description?: string;
|
|
7298
|
-
/** 是否必填(默认 `false`) */
|
|
7299
|
-
required?: boolean;
|
|
7300
|
-
}
|
|
7301
|
-
/**
|
|
7302
|
-
* MCP 提示词消息,直接复用 SDK 的完整判别联合(含图片、音频与嵌入资源)
|
|
7303
|
-
*
|
|
7304
|
-
* @example
|
|
7305
|
-
* ```ts
|
|
7306
|
-
* import type { MCPPromptMessage } from '@h-ai/ai'
|
|
7307
|
-
* const value: MCPPromptMessage = { role: 'user', content: { type: 'text', text: '请解释共享状态' } }
|
|
7308
|
-
* const role = value.role
|
|
7309
|
-
* ```
|
|
7310
|
-
*/
|
|
7311
|
-
type MCPPromptMessage = PromptMessage;
|
|
7312
|
-
/**
|
|
7313
|
-
* MCP 提示词内容;按 type 缩窄后访问对应字段
|
|
7314
|
-
*
|
|
7315
|
-
* @example
|
|
7316
|
-
* ```ts
|
|
7317
|
-
* import type { MCPPromptContent } from '@h-ai/ai'
|
|
7318
|
-
* function textContent(content: MCPPromptContent): string | undefined {
|
|
7319
|
-
* return content.type === 'text' ? content.text : undefined
|
|
7320
|
-
* }
|
|
7321
|
-
* ```
|
|
7322
|
-
*/
|
|
7323
|
-
type MCPPromptContent = PromptMessage['content'];
|
|
7324
|
-
/**
|
|
7325
|
-
* MCP 服务器创建选项
|
|
7326
|
-
*
|
|
7327
|
-
* @example
|
|
7328
|
-
* ```ts
|
|
7329
|
-
* import { createMcpServer, type McpServerOptions } from '@h-ai/ai'
|
|
7330
|
-
* const options: McpServerOptions = { name: 'public-tools', version: '1.0.0' }
|
|
7331
|
-
* const server = createMcpServer(options)
|
|
7332
|
-
* // 应用停止接入请求后关闭 SDK server。
|
|
7333
|
-
* await server.close()
|
|
7334
|
-
* ```
|
|
7335
|
-
*/
|
|
7336
|
-
interface McpServerOptions {
|
|
7337
|
-
/** 服务器名称 */
|
|
7338
|
-
name: string;
|
|
7339
|
-
/** 服务器版本(默认 `'1.0.0'`) */
|
|
7340
|
-
version?: string;
|
|
7341
|
-
}
|
|
7342
|
-
/**
|
|
7343
|
-
* MCP 操作接口(通过 `ai.mcp` 访问)
|
|
7344
|
-
*
|
|
7345
|
-
* 需要先调用 `ai.init()` 初始化,否则所有方法返回 `NOT_INITIALIZED` 错误。
|
|
7346
|
-
*
|
|
7347
|
-
* @example
|
|
7348
|
-
* ```ts
|
|
7349
|
-
* import { ai, type MCPOperations } from '@h-ai/ai'
|
|
7350
|
-
* // 应用启动已成功初始化 ai。
|
|
7351
|
-
* const mcp: MCPOperations = ai.mcp
|
|
7352
|
-
* const registered = mcp.registerTool({ name: 'echo', description: '返回输入', inputSchema: { type: 'string' } }, (input: string) => input)
|
|
7353
|
-
* if (!registered.success) throw new Error(registered.error.message)
|
|
7354
|
-
* const called = await mcp.callTool('echo', '你好', { requestId: 'request-1' })
|
|
7355
|
-
* if (!called.success) throw new Error(called.error.message)
|
|
7356
|
-
* ```
|
|
7357
|
-
*/
|
|
7358
|
-
interface MCPOperations {
|
|
7359
|
-
/** 注册工具并编译 JSON Schema;非法 Schema 返回 MCP_TOOL_ERROR,同名注册覆盖 */
|
|
7360
|
-
registerTool: <TInput, TOutput>(definition: MCPToolDefinition, handler: MCPToolHandler<TInput, TOutput>) => HaiResult<void>;
|
|
7361
|
-
/** 注册资源加载器;读取时校验 text/blob 输出 */
|
|
7362
|
-
registerResource: (resource: MCPResource, handler: () => Promise<MCPResourceContent>) => HaiResult<void>;
|
|
7363
|
-
/** 注册提示词;调用时校验必填参数和 SDK 消息格式 */
|
|
7364
|
-
registerPrompt: (prompt: MCPPrompt, handler: (args: Record<string, string>) => Promise<MCPPromptMessage[]>) => HaiResult<void>;
|
|
7365
|
-
/** 校验输入后执行工具;自动补齐缺失的 requestId */
|
|
7366
|
-
callTool: (name: string, args: unknown, context?: MCPContext) => Promise<HaiResult<unknown>>;
|
|
7367
|
-
/** 读取资源,输出必须恰好含一个有效 text 或 blob */
|
|
7368
|
-
readResource: (uri: string) => Promise<HaiResult<MCPResourceContent>>;
|
|
7369
|
-
/** 渲染提示词;必填参数必须是自身属性,且提供的已声明参数必须是字符串 */
|
|
7370
|
-
getPrompt: (name: string, args: Record<string, string>) => Promise<HaiResult<MCPPromptMessage[]>>;
|
|
7371
|
-
}
|
|
7372
|
-
|
|
7373
8444
|
/**
|
|
7374
8445
|
* 清单项与来源;配置来源不可修改,version 仅用于数据库乐观并发更新。
|
|
7375
8446
|
* @example
|
|
@@ -7509,6 +8580,8 @@ interface ManagedImageOperations extends ImageOperations {
|
|
|
7509
8580
|
* ```
|
|
7510
8581
|
*/
|
|
7511
8582
|
interface ManagedMCPOperations extends MCPOperations {
|
|
8583
|
+
/** 按业务身份调用合并清单中已显式开放的工具。 */
|
|
8584
|
+
services: MCPServiceOperations;
|
|
7512
8585
|
/** 配置只读、数据库可维护的合并清单。 */
|
|
7513
8586
|
servers: AIResourceRegistry<z.output<typeof MCPExternalServerSchema>, z.input<typeof MCPExternalServerSchema>>;
|
|
7514
8587
|
}
|
|
@@ -7739,6 +8812,8 @@ declare const HaiAIError: {
|
|
|
7739
8812
|
readonly MCP_TOOL_ERROR: _h_ai_core.HaiErrorDef;
|
|
7740
8813
|
readonly MCP_RESOURCE_ERROR: _h_ai_core.HaiErrorDef;
|
|
7741
8814
|
readonly MCP_SERVER_ERROR: _h_ai_core.HaiErrorDef;
|
|
8815
|
+
readonly MCP_TOOL_FORBIDDEN: _h_ai_core.HaiErrorDef;
|
|
8816
|
+
readonly MCP_TOOL_CANCELLED: _h_ai_core.HaiErrorDef;
|
|
7742
8817
|
readonly EMBEDDING_API_ERROR: _h_ai_core.HaiErrorDef;
|
|
7743
8818
|
readonly EMBEDDING_MODEL_NOT_FOUND: _h_ai_core.HaiErrorDef;
|
|
7744
8819
|
readonly EMBEDDING_INPUT_TOO_LONG: _h_ai_core.HaiErrorDef;
|
|
@@ -7832,6 +8907,12 @@ declare const HaiAIError: {
|
|
|
7832
8907
|
* ```
|
|
7833
8908
|
*/
|
|
7834
8909
|
interface AIInitOptions {
|
|
8910
|
+
/** 由应用初始化和关闭的受管执行实例。 */
|
|
8911
|
+
runner?: RunnerFunctions;
|
|
8912
|
+
/** 应用对受管 ACP 请求执行的可信授权。 */
|
|
8913
|
+
acpPolicy?: ACPPlatformPolicy;
|
|
8914
|
+
/** 在作业领取者上验证文件权限、读入对象和暂存结果。 */
|
|
8915
|
+
mcpJobFiles?: MCPJobFiles;
|
|
7835
8916
|
/** 可信服务端扩展:为其他 ACP 智能体生成原生配置。 */
|
|
7836
8917
|
acpAdapters?: Record<string, ACPAgentAdapter>;
|
|
7837
8918
|
/**
|
|
@@ -8300,7 +9381,289 @@ type AudioWsServerMessage = AudioWsSpeechMessage | AudioWsTranscriptMessage | Au
|
|
|
8300
9381
|
* async function assemble(provider: AIStoreProvider, config: AIConfig) { const acp = createACPOperations(provider, config); await provider.initialize(); return acp }
|
|
8301
9382
|
* ```
|
|
8302
9383
|
*/
|
|
8303
|
-
declare function createACPOperations(provider: AIStoreProvider, config: AIConfig, extensions?: Record<string, ACPAgentAdapter>, modelConfig?: () => Promise<AIConfig>, mcpLookup?: (ids: string[]) => Promise<McpServer[]
|
|
9384
|
+
declare function createACPOperations(provider: AIStoreProvider, config: AIConfig, extensions?: Record<string, ACPAgentAdapter>, modelConfig?: () => Promise<AIConfig>, mcpLookup?: (ids: string[]) => Promise<McpServer[]>, runner?: RunnerFunctions, policy?: ACPPlatformPolicy): {
|
|
9385
|
+
scoped: (rawScope: _h_ai_runner.RunnerScope) => {
|
|
9386
|
+
plan: (request: ACPPlatformRequest) => Promise<HaiResult<{
|
|
9387
|
+
readonly image: string;
|
|
9388
|
+
readonly resources: {
|
|
9389
|
+
cpu: number;
|
|
9390
|
+
memoryMiB: number;
|
|
9391
|
+
pids: number;
|
|
9392
|
+
scratchMiB: number;
|
|
9393
|
+
};
|
|
9394
|
+
readonly modelId: string;
|
|
9395
|
+
readonly model: {
|
|
9396
|
+
id?: string | undefined;
|
|
9397
|
+
reasoningEffort?: string | undefined;
|
|
9398
|
+
temperature?: number | undefined;
|
|
9399
|
+
maxOutputTokens?: number | undefined;
|
|
9400
|
+
};
|
|
9401
|
+
readonly permissions: {
|
|
9402
|
+
profile: "read-only" | "workspace" | "full-access";
|
|
9403
|
+
approval: "never" | "on-request";
|
|
9404
|
+
ruleIds?: string[] | undefined;
|
|
9405
|
+
};
|
|
9406
|
+
readonly limits: {
|
|
9407
|
+
readonly queueTimeoutMs: number;
|
|
9408
|
+
readonly runTimeoutMs: number;
|
|
9409
|
+
readonly approvalTimeoutMs: number;
|
|
9410
|
+
readonly maxOutputBytes: number;
|
|
9411
|
+
};
|
|
9412
|
+
readonly capabilities: string[];
|
|
9413
|
+
readonly reason: "user-policy" | "verified-shared" | "isolated-default" | "explicit";
|
|
9414
|
+
readonly nativeResume: "none" | "load" | "resume";
|
|
9415
|
+
readonly workspaceId?: string | undefined;
|
|
9416
|
+
readonly agentId: string;
|
|
9417
|
+
readonly adapter: string;
|
|
9418
|
+
readonly requestedMode: "auto" | "shared" | "user" | "task";
|
|
9419
|
+
readonly resolvedMode: "shared" | "user" | "task";
|
|
9420
|
+
readonly environmentId: string;
|
|
9421
|
+
}>>;
|
|
9422
|
+
agents: {
|
|
9423
|
+
describe: (id: string) => Promise<HaiResult<{
|
|
9424
|
+
managedTransport: "stdio";
|
|
9425
|
+
protocols: readonly ApiType[];
|
|
9426
|
+
workerModes: readonly ("shared" | "user" | "task")[];
|
|
9427
|
+
nativeResume: "load" | "resume" | "none";
|
|
9428
|
+
id: string;
|
|
9429
|
+
adapter: string;
|
|
9430
|
+
modelIds: string[];
|
|
9431
|
+
environmentIds: string[];
|
|
9432
|
+
}>>;
|
|
9433
|
+
};
|
|
9434
|
+
approvals: {
|
|
9435
|
+
rules: (offset?: number, limit?: number) => Promise<HaiResult<{
|
|
9436
|
+
id: string;
|
|
9437
|
+
summary: string;
|
|
9438
|
+
sessionId: string | undefined;
|
|
9439
|
+
expiresAt: number;
|
|
9440
|
+
}[]>>;
|
|
9441
|
+
revoke: (id: string) => Promise<HaiResult<void>>;
|
|
9442
|
+
respond: (approvalId: string, decision: ACPApprovalDecision) => Promise<HaiResult<void>>;
|
|
9443
|
+
};
|
|
9444
|
+
tasks: {
|
|
9445
|
+
get: (id: string) => Promise<HaiResult<_h_ai_runner.RunnerExecution>>;
|
|
9446
|
+
events: (id: string, after?: number, limit?: number) => Promise<HaiResult<_h_ai_runner.RunnerEvent[]>>;
|
|
9447
|
+
cancel: (id: string) => Promise<HaiResult<_h_ai_runner.RunnerExecution>>;
|
|
9448
|
+
};
|
|
9449
|
+
sessions: {
|
|
9450
|
+
create: (request: ACPPlatformRequest) => Promise<HaiResult<{
|
|
9451
|
+
id: string;
|
|
9452
|
+
prompt: (content: ACPRunRequest["prompt"], observer?: ACPTurnOptions) => Promise<HaiResult<{
|
|
9453
|
+
taskId: string;
|
|
9454
|
+
output: string | number | boolean | z.core.util.JSONType[] | {
|
|
9455
|
+
[key: string]: z.core.util.JSONType;
|
|
9456
|
+
} | null;
|
|
9457
|
+
effectiveOptions: {
|
|
9458
|
+
readonly image: string;
|
|
9459
|
+
readonly resources: {
|
|
9460
|
+
cpu: number;
|
|
9461
|
+
memoryMiB: number;
|
|
9462
|
+
pids: number;
|
|
9463
|
+
scratchMiB: number;
|
|
9464
|
+
};
|
|
9465
|
+
readonly modelId: string;
|
|
9466
|
+
readonly model: {
|
|
9467
|
+
id?: string | undefined;
|
|
9468
|
+
reasoningEffort?: string | undefined;
|
|
9469
|
+
temperature?: number | undefined;
|
|
9470
|
+
maxOutputTokens?: number | undefined;
|
|
9471
|
+
};
|
|
9472
|
+
readonly permissions: {
|
|
9473
|
+
profile: "read-only" | "workspace" | "full-access";
|
|
9474
|
+
approval: "never" | "on-request";
|
|
9475
|
+
ruleIds?: string[] | undefined;
|
|
9476
|
+
};
|
|
9477
|
+
readonly limits: {
|
|
9478
|
+
readonly queueTimeoutMs: number;
|
|
9479
|
+
readonly runTimeoutMs: number;
|
|
9480
|
+
readonly approvalTimeoutMs: number;
|
|
9481
|
+
readonly maxOutputBytes: number;
|
|
9482
|
+
};
|
|
9483
|
+
readonly capabilities: string[];
|
|
9484
|
+
readonly reason: "user-policy" | "verified-shared" | "isolated-default" | "explicit";
|
|
9485
|
+
readonly nativeResume: "none" | "load" | "resume";
|
|
9486
|
+
readonly workspaceId?: string | undefined;
|
|
9487
|
+
readonly agentId: string;
|
|
9488
|
+
readonly adapter: string;
|
|
9489
|
+
readonly requestedMode: "auto" | "shared" | "user" | "task";
|
|
9490
|
+
readonly resolvedMode: "shared" | "user" | "task";
|
|
9491
|
+
readonly environmentId: string;
|
|
9492
|
+
};
|
|
9493
|
+
}>>;
|
|
9494
|
+
close: () => Promise<HaiResult<void>>;
|
|
9495
|
+
stream(content: ACPRunRequest["prompt"], options?: ACPTurnOptions): AsyncGenerator<_h_ai_runner.RunnerJson>;
|
|
9496
|
+
changeExecution: (execution: NonNullable<ACPPlatformRequest["execution"]> & {
|
|
9497
|
+
acceptNewSession: true;
|
|
9498
|
+
historySummary?: string;
|
|
9499
|
+
}) => Promise<HaiResult<{
|
|
9500
|
+
readonly image: string;
|
|
9501
|
+
readonly resources: {
|
|
9502
|
+
cpu: number;
|
|
9503
|
+
memoryMiB: number;
|
|
9504
|
+
pids: number;
|
|
9505
|
+
scratchMiB: number;
|
|
9506
|
+
};
|
|
9507
|
+
readonly modelId: string;
|
|
9508
|
+
readonly model: {
|
|
9509
|
+
id?: string | undefined;
|
|
9510
|
+
reasoningEffort?: string | undefined;
|
|
9511
|
+
temperature?: number | undefined;
|
|
9512
|
+
maxOutputTokens?: number | undefined;
|
|
9513
|
+
};
|
|
9514
|
+
readonly permissions: {
|
|
9515
|
+
profile: "read-only" | "workspace" | "full-access";
|
|
9516
|
+
approval: "never" | "on-request";
|
|
9517
|
+
ruleIds?: string[] | undefined;
|
|
9518
|
+
};
|
|
9519
|
+
readonly limits: {
|
|
9520
|
+
readonly queueTimeoutMs: number;
|
|
9521
|
+
readonly runTimeoutMs: number;
|
|
9522
|
+
readonly approvalTimeoutMs: number;
|
|
9523
|
+
readonly maxOutputBytes: number;
|
|
9524
|
+
};
|
|
9525
|
+
readonly capabilities: string[];
|
|
9526
|
+
readonly reason: "user-policy" | "verified-shared" | "isolated-default" | "explicit";
|
|
9527
|
+
readonly nativeResume: "none" | "load" | "resume";
|
|
9528
|
+
readonly workspaceId?: string | undefined;
|
|
9529
|
+
readonly agentId: string;
|
|
9530
|
+
readonly adapter: string;
|
|
9531
|
+
readonly requestedMode: "auto" | "shared" | "user" | "task";
|
|
9532
|
+
readonly resolvedMode: "shared" | "user" | "task";
|
|
9533
|
+
readonly environmentId: string;
|
|
9534
|
+
}>>;
|
|
9535
|
+
}>>;
|
|
9536
|
+
get: (id: string) => Promise<HaiResult<{
|
|
9537
|
+
id: string;
|
|
9538
|
+
prompt: (content: ACPRunRequest["prompt"], observer?: ACPTurnOptions) => Promise<HaiResult<{
|
|
9539
|
+
taskId: string;
|
|
9540
|
+
output: string | number | boolean | z.core.util.JSONType[] | {
|
|
9541
|
+
[key: string]: z.core.util.JSONType;
|
|
9542
|
+
} | null;
|
|
9543
|
+
effectiveOptions: {
|
|
9544
|
+
readonly image: string;
|
|
9545
|
+
readonly resources: {
|
|
9546
|
+
cpu: number;
|
|
9547
|
+
memoryMiB: number;
|
|
9548
|
+
pids: number;
|
|
9549
|
+
scratchMiB: number;
|
|
9550
|
+
};
|
|
9551
|
+
readonly modelId: string;
|
|
9552
|
+
readonly model: {
|
|
9553
|
+
id?: string | undefined;
|
|
9554
|
+
reasoningEffort?: string | undefined;
|
|
9555
|
+
temperature?: number | undefined;
|
|
9556
|
+
maxOutputTokens?: number | undefined;
|
|
9557
|
+
};
|
|
9558
|
+
readonly permissions: {
|
|
9559
|
+
profile: "read-only" | "workspace" | "full-access";
|
|
9560
|
+
approval: "never" | "on-request";
|
|
9561
|
+
ruleIds?: string[] | undefined;
|
|
9562
|
+
};
|
|
9563
|
+
readonly limits: {
|
|
9564
|
+
readonly queueTimeoutMs: number;
|
|
9565
|
+
readonly runTimeoutMs: number;
|
|
9566
|
+
readonly approvalTimeoutMs: number;
|
|
9567
|
+
readonly maxOutputBytes: number;
|
|
9568
|
+
};
|
|
9569
|
+
readonly capabilities: string[];
|
|
9570
|
+
readonly reason: "user-policy" | "verified-shared" | "isolated-default" | "explicit";
|
|
9571
|
+
readonly nativeResume: "none" | "load" | "resume";
|
|
9572
|
+
readonly workspaceId?: string | undefined;
|
|
9573
|
+
readonly agentId: string;
|
|
9574
|
+
readonly adapter: string;
|
|
9575
|
+
readonly requestedMode: "auto" | "shared" | "user" | "task";
|
|
9576
|
+
readonly resolvedMode: "shared" | "user" | "task";
|
|
9577
|
+
readonly environmentId: string;
|
|
9578
|
+
};
|
|
9579
|
+
}>>;
|
|
9580
|
+
close: () => Promise<HaiResult<void>>;
|
|
9581
|
+
stream(content: ACPRunRequest["prompt"], options?: ACPTurnOptions): AsyncGenerator<_h_ai_runner.RunnerJson>;
|
|
9582
|
+
changeExecution: (execution: NonNullable<ACPPlatformRequest["execution"]> & {
|
|
9583
|
+
acceptNewSession: true;
|
|
9584
|
+
historySummary?: string;
|
|
9585
|
+
}) => Promise<HaiResult<{
|
|
9586
|
+
readonly image: string;
|
|
9587
|
+
readonly resources: {
|
|
9588
|
+
cpu: number;
|
|
9589
|
+
memoryMiB: number;
|
|
9590
|
+
pids: number;
|
|
9591
|
+
scratchMiB: number;
|
|
9592
|
+
};
|
|
9593
|
+
readonly modelId: string;
|
|
9594
|
+
readonly model: {
|
|
9595
|
+
id?: string | undefined;
|
|
9596
|
+
reasoningEffort?: string | undefined;
|
|
9597
|
+
temperature?: number | undefined;
|
|
9598
|
+
maxOutputTokens?: number | undefined;
|
|
9599
|
+
};
|
|
9600
|
+
readonly permissions: {
|
|
9601
|
+
profile: "read-only" | "workspace" | "full-access";
|
|
9602
|
+
approval: "never" | "on-request";
|
|
9603
|
+
ruleIds?: string[] | undefined;
|
|
9604
|
+
};
|
|
9605
|
+
readonly limits: {
|
|
9606
|
+
readonly queueTimeoutMs: number;
|
|
9607
|
+
readonly runTimeoutMs: number;
|
|
9608
|
+
readonly approvalTimeoutMs: number;
|
|
9609
|
+
readonly maxOutputBytes: number;
|
|
9610
|
+
};
|
|
9611
|
+
readonly capabilities: string[];
|
|
9612
|
+
readonly reason: "user-policy" | "verified-shared" | "isolated-default" | "explicit";
|
|
9613
|
+
readonly nativeResume: "none" | "load" | "resume";
|
|
9614
|
+
readonly workspaceId?: string | undefined;
|
|
9615
|
+
readonly agentId: string;
|
|
9616
|
+
readonly adapter: string;
|
|
9617
|
+
readonly requestedMode: "auto" | "shared" | "user" | "task";
|
|
9618
|
+
readonly resolvedMode: "shared" | "user" | "task";
|
|
9619
|
+
readonly environmentId: string;
|
|
9620
|
+
}>>;
|
|
9621
|
+
}>>;
|
|
9622
|
+
};
|
|
9623
|
+
run: (raw: ACPRunRequest, observer?: ACPRunObserver) => Promise<HaiResult<{
|
|
9624
|
+
taskId: string;
|
|
9625
|
+
output: string | number | boolean | z.core.util.JSONType[] | {
|
|
9626
|
+
[key: string]: z.core.util.JSONType;
|
|
9627
|
+
} | null;
|
|
9628
|
+
effectiveOptions: {
|
|
9629
|
+
readonly image: string;
|
|
9630
|
+
readonly resources: {
|
|
9631
|
+
cpu: number;
|
|
9632
|
+
memoryMiB: number;
|
|
9633
|
+
pids: number;
|
|
9634
|
+
scratchMiB: number;
|
|
9635
|
+
};
|
|
9636
|
+
readonly modelId: string;
|
|
9637
|
+
readonly model: {
|
|
9638
|
+
id?: string | undefined;
|
|
9639
|
+
reasoningEffort?: string | undefined;
|
|
9640
|
+
temperature?: number | undefined;
|
|
9641
|
+
maxOutputTokens?: number | undefined;
|
|
9642
|
+
};
|
|
9643
|
+
readonly permissions: {
|
|
9644
|
+
profile: "read-only" | "workspace" | "full-access";
|
|
9645
|
+
approval: "never" | "on-request";
|
|
9646
|
+
ruleIds?: string[] | undefined;
|
|
9647
|
+
};
|
|
9648
|
+
readonly limits: {
|
|
9649
|
+
readonly queueTimeoutMs: number;
|
|
9650
|
+
readonly runTimeoutMs: number;
|
|
9651
|
+
readonly approvalTimeoutMs: number;
|
|
9652
|
+
readonly maxOutputBytes: number;
|
|
9653
|
+
};
|
|
9654
|
+
readonly capabilities: string[];
|
|
9655
|
+
readonly reason: "user-policy" | "verified-shared" | "isolated-default" | "explicit";
|
|
9656
|
+
readonly nativeResume: "none" | "load" | "resume";
|
|
9657
|
+
readonly workspaceId?: string | undefined;
|
|
9658
|
+
readonly agentId: string;
|
|
9659
|
+
readonly adapter: string;
|
|
9660
|
+
readonly requestedMode: "auto" | "shared" | "user" | "task";
|
|
9661
|
+
readonly resolvedMode: "shared" | "user" | "task";
|
|
9662
|
+
readonly environmentId: string;
|
|
9663
|
+
};
|
|
9664
|
+
}>>;
|
|
9665
|
+
};
|
|
9666
|
+
registerManagedExecutors: () => void;
|
|
8304
9667
|
agents: {
|
|
8305
9668
|
/**
|
|
8306
9669
|
* 校验模型与适配器后新增数据库智能体;配置同名条目只读。
|
|
@@ -8326,7 +9689,60 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8326
9689
|
adapter: string;
|
|
8327
9690
|
modelIds: string[];
|
|
8328
9691
|
environmentRefs: Record<string, string>;
|
|
9692
|
+
environmentIds: string[];
|
|
9693
|
+
allowedCapabilities: string[];
|
|
8329
9694
|
defaultModelId?: string | undefined;
|
|
9695
|
+
defaults?: {
|
|
9696
|
+
model?: {
|
|
9697
|
+
id?: string | undefined;
|
|
9698
|
+
reasoningEffort?: string | undefined;
|
|
9699
|
+
temperature?: number | undefined;
|
|
9700
|
+
maxOutputTokens?: number | undefined;
|
|
9701
|
+
} | undefined;
|
|
9702
|
+
execution?: {
|
|
9703
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
9704
|
+
environmentId?: string | undefined;
|
|
9705
|
+
resources?: {
|
|
9706
|
+
cpu?: number | undefined;
|
|
9707
|
+
memoryMiB?: number | undefined;
|
|
9708
|
+
} | undefined;
|
|
9709
|
+
} | undefined;
|
|
9710
|
+
workspaceId?: string | undefined;
|
|
9711
|
+
context?: {
|
|
9712
|
+
fileIds?: string[] | undefined;
|
|
9713
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
9714
|
+
skillIds?: string[] | undefined;
|
|
9715
|
+
memory?: {
|
|
9716
|
+
scope: "user" | "none" | "space";
|
|
9717
|
+
spaceId?: string | undefined;
|
|
9718
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
9719
|
+
} | undefined;
|
|
9720
|
+
} | undefined;
|
|
9721
|
+
tools?: {
|
|
9722
|
+
allow?: string[] | undefined;
|
|
9723
|
+
} | undefined;
|
|
9724
|
+
capabilities?: string[] | undefined;
|
|
9725
|
+
permissions?: {
|
|
9726
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
9727
|
+
approval?: "never" | "on-request" | undefined;
|
|
9728
|
+
ruleIds?: string[] | undefined;
|
|
9729
|
+
} | undefined;
|
|
9730
|
+
limits?: {
|
|
9731
|
+
queueTimeoutMs?: number | undefined;
|
|
9732
|
+
runTimeoutMs?: number | undefined;
|
|
9733
|
+
approvalTimeoutMs?: number | undefined;
|
|
9734
|
+
maxOutputBytes?: number | undefined;
|
|
9735
|
+
} | undefined;
|
|
9736
|
+
output?: {
|
|
9737
|
+
format: "text" | "json";
|
|
9738
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
9739
|
+
} | undefined;
|
|
9740
|
+
native?: {
|
|
9741
|
+
adapter: string;
|
|
9742
|
+
options: Record<string, z.core.util.JSONType>;
|
|
9743
|
+
} | undefined;
|
|
9744
|
+
metadata?: Record<string, string> | undefined;
|
|
9745
|
+
} | undefined;
|
|
8330
9746
|
} | {
|
|
8331
9747
|
mode: "embedded";
|
|
8332
9748
|
transport: "stdio";
|
|
@@ -8336,9 +9752,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8336
9752
|
adapter: string;
|
|
8337
9753
|
modelIds: string[];
|
|
8338
9754
|
environmentRefs: Record<string, string>;
|
|
9755
|
+
environmentIds: string[];
|
|
9756
|
+
allowedCapabilities: string[];
|
|
8339
9757
|
command?: string | undefined;
|
|
8340
9758
|
args?: string[] | undefined;
|
|
8341
9759
|
defaultModelId?: string | undefined;
|
|
9760
|
+
defaults?: {
|
|
9761
|
+
model?: {
|
|
9762
|
+
id?: string | undefined;
|
|
9763
|
+
reasoningEffort?: string | undefined;
|
|
9764
|
+
temperature?: number | undefined;
|
|
9765
|
+
maxOutputTokens?: number | undefined;
|
|
9766
|
+
} | undefined;
|
|
9767
|
+
execution?: {
|
|
9768
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
9769
|
+
environmentId?: string | undefined;
|
|
9770
|
+
resources?: {
|
|
9771
|
+
cpu?: number | undefined;
|
|
9772
|
+
memoryMiB?: number | undefined;
|
|
9773
|
+
} | undefined;
|
|
9774
|
+
} | undefined;
|
|
9775
|
+
workspaceId?: string | undefined;
|
|
9776
|
+
context?: {
|
|
9777
|
+
fileIds?: string[] | undefined;
|
|
9778
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
9779
|
+
skillIds?: string[] | undefined;
|
|
9780
|
+
memory?: {
|
|
9781
|
+
scope: "user" | "none" | "space";
|
|
9782
|
+
spaceId?: string | undefined;
|
|
9783
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
9784
|
+
} | undefined;
|
|
9785
|
+
} | undefined;
|
|
9786
|
+
tools?: {
|
|
9787
|
+
allow?: string[] | undefined;
|
|
9788
|
+
} | undefined;
|
|
9789
|
+
capabilities?: string[] | undefined;
|
|
9790
|
+
permissions?: {
|
|
9791
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
9792
|
+
approval?: "never" | "on-request" | undefined;
|
|
9793
|
+
ruleIds?: string[] | undefined;
|
|
9794
|
+
} | undefined;
|
|
9795
|
+
limits?: {
|
|
9796
|
+
queueTimeoutMs?: number | undefined;
|
|
9797
|
+
runTimeoutMs?: number | undefined;
|
|
9798
|
+
approvalTimeoutMs?: number | undefined;
|
|
9799
|
+
maxOutputBytes?: number | undefined;
|
|
9800
|
+
} | undefined;
|
|
9801
|
+
output?: {
|
|
9802
|
+
format: "text" | "json";
|
|
9803
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
9804
|
+
} | undefined;
|
|
9805
|
+
native?: {
|
|
9806
|
+
adapter: string;
|
|
9807
|
+
options: Record<string, z.core.util.JSONType>;
|
|
9808
|
+
} | undefined;
|
|
9809
|
+
metadata?: Record<string, string> | undefined;
|
|
9810
|
+
} | undefined;
|
|
8342
9811
|
} | {
|
|
8343
9812
|
mode: "builtin-service";
|
|
8344
9813
|
transport: "stdio";
|
|
@@ -8350,9 +9819,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8350
9819
|
adapter: string;
|
|
8351
9820
|
modelIds: string[];
|
|
8352
9821
|
environmentRefs: Record<string, string>;
|
|
9822
|
+
environmentIds: string[];
|
|
9823
|
+
allowedCapabilities: string[];
|
|
8353
9824
|
command?: string | undefined;
|
|
8354
9825
|
args?: string[] | undefined;
|
|
8355
9826
|
defaultModelId?: string | undefined;
|
|
9827
|
+
defaults?: {
|
|
9828
|
+
model?: {
|
|
9829
|
+
id?: string | undefined;
|
|
9830
|
+
reasoningEffort?: string | undefined;
|
|
9831
|
+
temperature?: number | undefined;
|
|
9832
|
+
maxOutputTokens?: number | undefined;
|
|
9833
|
+
} | undefined;
|
|
9834
|
+
execution?: {
|
|
9835
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
9836
|
+
environmentId?: string | undefined;
|
|
9837
|
+
resources?: {
|
|
9838
|
+
cpu?: number | undefined;
|
|
9839
|
+
memoryMiB?: number | undefined;
|
|
9840
|
+
} | undefined;
|
|
9841
|
+
} | undefined;
|
|
9842
|
+
workspaceId?: string | undefined;
|
|
9843
|
+
context?: {
|
|
9844
|
+
fileIds?: string[] | undefined;
|
|
9845
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
9846
|
+
skillIds?: string[] | undefined;
|
|
9847
|
+
memory?: {
|
|
9848
|
+
scope: "user" | "none" | "space";
|
|
9849
|
+
spaceId?: string | undefined;
|
|
9850
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
9851
|
+
} | undefined;
|
|
9852
|
+
} | undefined;
|
|
9853
|
+
tools?: {
|
|
9854
|
+
allow?: string[] | undefined;
|
|
9855
|
+
} | undefined;
|
|
9856
|
+
capabilities?: string[] | undefined;
|
|
9857
|
+
permissions?: {
|
|
9858
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
9859
|
+
approval?: "never" | "on-request" | undefined;
|
|
9860
|
+
ruleIds?: string[] | undefined;
|
|
9861
|
+
} | undefined;
|
|
9862
|
+
limits?: {
|
|
9863
|
+
queueTimeoutMs?: number | undefined;
|
|
9864
|
+
runTimeoutMs?: number | undefined;
|
|
9865
|
+
approvalTimeoutMs?: number | undefined;
|
|
9866
|
+
maxOutputBytes?: number | undefined;
|
|
9867
|
+
} | undefined;
|
|
9868
|
+
output?: {
|
|
9869
|
+
format: "text" | "json";
|
|
9870
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
9871
|
+
} | undefined;
|
|
9872
|
+
native?: {
|
|
9873
|
+
adapter: string;
|
|
9874
|
+
options: Record<string, z.core.util.JSONType>;
|
|
9875
|
+
} | undefined;
|
|
9876
|
+
metadata?: Record<string, string> | undefined;
|
|
9877
|
+
} | undefined;
|
|
8356
9878
|
}>>>;
|
|
8357
9879
|
/**
|
|
8358
9880
|
* 按 ID 读取合并清单条目;source 区分配置与数据库,数据库 get 返回 version。
|
|
@@ -8378,7 +9900,60 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8378
9900
|
adapter: string;
|
|
8379
9901
|
modelIds: string[];
|
|
8380
9902
|
environmentRefs: Record<string, string>;
|
|
9903
|
+
environmentIds: string[];
|
|
9904
|
+
allowedCapabilities: string[];
|
|
8381
9905
|
defaultModelId?: string | undefined;
|
|
9906
|
+
defaults?: {
|
|
9907
|
+
model?: {
|
|
9908
|
+
id?: string | undefined;
|
|
9909
|
+
reasoningEffort?: string | undefined;
|
|
9910
|
+
temperature?: number | undefined;
|
|
9911
|
+
maxOutputTokens?: number | undefined;
|
|
9912
|
+
} | undefined;
|
|
9913
|
+
execution?: {
|
|
9914
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
9915
|
+
environmentId?: string | undefined;
|
|
9916
|
+
resources?: {
|
|
9917
|
+
cpu?: number | undefined;
|
|
9918
|
+
memoryMiB?: number | undefined;
|
|
9919
|
+
} | undefined;
|
|
9920
|
+
} | undefined;
|
|
9921
|
+
workspaceId?: string | undefined;
|
|
9922
|
+
context?: {
|
|
9923
|
+
fileIds?: string[] | undefined;
|
|
9924
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
9925
|
+
skillIds?: string[] | undefined;
|
|
9926
|
+
memory?: {
|
|
9927
|
+
scope: "user" | "none" | "space";
|
|
9928
|
+
spaceId?: string | undefined;
|
|
9929
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
9930
|
+
} | undefined;
|
|
9931
|
+
} | undefined;
|
|
9932
|
+
tools?: {
|
|
9933
|
+
allow?: string[] | undefined;
|
|
9934
|
+
} | undefined;
|
|
9935
|
+
capabilities?: string[] | undefined;
|
|
9936
|
+
permissions?: {
|
|
9937
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
9938
|
+
approval?: "never" | "on-request" | undefined;
|
|
9939
|
+
ruleIds?: string[] | undefined;
|
|
9940
|
+
} | undefined;
|
|
9941
|
+
limits?: {
|
|
9942
|
+
queueTimeoutMs?: number | undefined;
|
|
9943
|
+
runTimeoutMs?: number | undefined;
|
|
9944
|
+
approvalTimeoutMs?: number | undefined;
|
|
9945
|
+
maxOutputBytes?: number | undefined;
|
|
9946
|
+
} | undefined;
|
|
9947
|
+
output?: {
|
|
9948
|
+
format: "text" | "json";
|
|
9949
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
9950
|
+
} | undefined;
|
|
9951
|
+
native?: {
|
|
9952
|
+
adapter: string;
|
|
9953
|
+
options: Record<string, z.core.util.JSONType>;
|
|
9954
|
+
} | undefined;
|
|
9955
|
+
metadata?: Record<string, string> | undefined;
|
|
9956
|
+
} | undefined;
|
|
8382
9957
|
} | {
|
|
8383
9958
|
mode: "embedded";
|
|
8384
9959
|
transport: "stdio";
|
|
@@ -8388,9 +9963,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8388
9963
|
adapter: string;
|
|
8389
9964
|
modelIds: string[];
|
|
8390
9965
|
environmentRefs: Record<string, string>;
|
|
9966
|
+
environmentIds: string[];
|
|
9967
|
+
allowedCapabilities: string[];
|
|
8391
9968
|
command?: string | undefined;
|
|
8392
9969
|
args?: string[] | undefined;
|
|
8393
9970
|
defaultModelId?: string | undefined;
|
|
9971
|
+
defaults?: {
|
|
9972
|
+
model?: {
|
|
9973
|
+
id?: string | undefined;
|
|
9974
|
+
reasoningEffort?: string | undefined;
|
|
9975
|
+
temperature?: number | undefined;
|
|
9976
|
+
maxOutputTokens?: number | undefined;
|
|
9977
|
+
} | undefined;
|
|
9978
|
+
execution?: {
|
|
9979
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
9980
|
+
environmentId?: string | undefined;
|
|
9981
|
+
resources?: {
|
|
9982
|
+
cpu?: number | undefined;
|
|
9983
|
+
memoryMiB?: number | undefined;
|
|
9984
|
+
} | undefined;
|
|
9985
|
+
} | undefined;
|
|
9986
|
+
workspaceId?: string | undefined;
|
|
9987
|
+
context?: {
|
|
9988
|
+
fileIds?: string[] | undefined;
|
|
9989
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
9990
|
+
skillIds?: string[] | undefined;
|
|
9991
|
+
memory?: {
|
|
9992
|
+
scope: "user" | "none" | "space";
|
|
9993
|
+
spaceId?: string | undefined;
|
|
9994
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
9995
|
+
} | undefined;
|
|
9996
|
+
} | undefined;
|
|
9997
|
+
tools?: {
|
|
9998
|
+
allow?: string[] | undefined;
|
|
9999
|
+
} | undefined;
|
|
10000
|
+
capabilities?: string[] | undefined;
|
|
10001
|
+
permissions?: {
|
|
10002
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10003
|
+
approval?: "never" | "on-request" | undefined;
|
|
10004
|
+
ruleIds?: string[] | undefined;
|
|
10005
|
+
} | undefined;
|
|
10006
|
+
limits?: {
|
|
10007
|
+
queueTimeoutMs?: number | undefined;
|
|
10008
|
+
runTimeoutMs?: number | undefined;
|
|
10009
|
+
approvalTimeoutMs?: number | undefined;
|
|
10010
|
+
maxOutputBytes?: number | undefined;
|
|
10011
|
+
} | undefined;
|
|
10012
|
+
output?: {
|
|
10013
|
+
format: "text" | "json";
|
|
10014
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10015
|
+
} | undefined;
|
|
10016
|
+
native?: {
|
|
10017
|
+
adapter: string;
|
|
10018
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10019
|
+
} | undefined;
|
|
10020
|
+
metadata?: Record<string, string> | undefined;
|
|
10021
|
+
} | undefined;
|
|
8394
10022
|
} | {
|
|
8395
10023
|
mode: "builtin-service";
|
|
8396
10024
|
transport: "stdio";
|
|
@@ -8402,9 +10030,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8402
10030
|
adapter: string;
|
|
8403
10031
|
modelIds: string[];
|
|
8404
10032
|
environmentRefs: Record<string, string>;
|
|
10033
|
+
environmentIds: string[];
|
|
10034
|
+
allowedCapabilities: string[];
|
|
8405
10035
|
command?: string | undefined;
|
|
8406
10036
|
args?: string[] | undefined;
|
|
8407
10037
|
defaultModelId?: string | undefined;
|
|
10038
|
+
defaults?: {
|
|
10039
|
+
model?: {
|
|
10040
|
+
id?: string | undefined;
|
|
10041
|
+
reasoningEffort?: string | undefined;
|
|
10042
|
+
temperature?: number | undefined;
|
|
10043
|
+
maxOutputTokens?: number | undefined;
|
|
10044
|
+
} | undefined;
|
|
10045
|
+
execution?: {
|
|
10046
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
10047
|
+
environmentId?: string | undefined;
|
|
10048
|
+
resources?: {
|
|
10049
|
+
cpu?: number | undefined;
|
|
10050
|
+
memoryMiB?: number | undefined;
|
|
10051
|
+
} | undefined;
|
|
10052
|
+
} | undefined;
|
|
10053
|
+
workspaceId?: string | undefined;
|
|
10054
|
+
context?: {
|
|
10055
|
+
fileIds?: string[] | undefined;
|
|
10056
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
10057
|
+
skillIds?: string[] | undefined;
|
|
10058
|
+
memory?: {
|
|
10059
|
+
scope: "user" | "none" | "space";
|
|
10060
|
+
spaceId?: string | undefined;
|
|
10061
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
10062
|
+
} | undefined;
|
|
10063
|
+
} | undefined;
|
|
10064
|
+
tools?: {
|
|
10065
|
+
allow?: string[] | undefined;
|
|
10066
|
+
} | undefined;
|
|
10067
|
+
capabilities?: string[] | undefined;
|
|
10068
|
+
permissions?: {
|
|
10069
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10070
|
+
approval?: "never" | "on-request" | undefined;
|
|
10071
|
+
ruleIds?: string[] | undefined;
|
|
10072
|
+
} | undefined;
|
|
10073
|
+
limits?: {
|
|
10074
|
+
queueTimeoutMs?: number | undefined;
|
|
10075
|
+
runTimeoutMs?: number | undefined;
|
|
10076
|
+
approvalTimeoutMs?: number | undefined;
|
|
10077
|
+
maxOutputBytes?: number | undefined;
|
|
10078
|
+
} | undefined;
|
|
10079
|
+
output?: {
|
|
10080
|
+
format: "text" | "json";
|
|
10081
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10082
|
+
} | undefined;
|
|
10083
|
+
native?: {
|
|
10084
|
+
adapter: string;
|
|
10085
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10086
|
+
} | undefined;
|
|
10087
|
+
metadata?: Record<string, string> | undefined;
|
|
10088
|
+
} | undefined;
|
|
8408
10089
|
}>>>;
|
|
8409
10090
|
/**
|
|
8410
10091
|
* 列出配置与数据库合并后的智能体;同 ID 配置优先。
|
|
@@ -8429,7 +10110,60 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8429
10110
|
adapter: string;
|
|
8430
10111
|
modelIds: string[];
|
|
8431
10112
|
environmentRefs: Record<string, string>;
|
|
10113
|
+
environmentIds: string[];
|
|
10114
|
+
allowedCapabilities: string[];
|
|
8432
10115
|
defaultModelId?: string | undefined;
|
|
10116
|
+
defaults?: {
|
|
10117
|
+
model?: {
|
|
10118
|
+
id?: string | undefined;
|
|
10119
|
+
reasoningEffort?: string | undefined;
|
|
10120
|
+
temperature?: number | undefined;
|
|
10121
|
+
maxOutputTokens?: number | undefined;
|
|
10122
|
+
} | undefined;
|
|
10123
|
+
execution?: {
|
|
10124
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
10125
|
+
environmentId?: string | undefined;
|
|
10126
|
+
resources?: {
|
|
10127
|
+
cpu?: number | undefined;
|
|
10128
|
+
memoryMiB?: number | undefined;
|
|
10129
|
+
} | undefined;
|
|
10130
|
+
} | undefined;
|
|
10131
|
+
workspaceId?: string | undefined;
|
|
10132
|
+
context?: {
|
|
10133
|
+
fileIds?: string[] | undefined;
|
|
10134
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
10135
|
+
skillIds?: string[] | undefined;
|
|
10136
|
+
memory?: {
|
|
10137
|
+
scope: "user" | "none" | "space";
|
|
10138
|
+
spaceId?: string | undefined;
|
|
10139
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
10140
|
+
} | undefined;
|
|
10141
|
+
} | undefined;
|
|
10142
|
+
tools?: {
|
|
10143
|
+
allow?: string[] | undefined;
|
|
10144
|
+
} | undefined;
|
|
10145
|
+
capabilities?: string[] | undefined;
|
|
10146
|
+
permissions?: {
|
|
10147
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10148
|
+
approval?: "never" | "on-request" | undefined;
|
|
10149
|
+
ruleIds?: string[] | undefined;
|
|
10150
|
+
} | undefined;
|
|
10151
|
+
limits?: {
|
|
10152
|
+
queueTimeoutMs?: number | undefined;
|
|
10153
|
+
runTimeoutMs?: number | undefined;
|
|
10154
|
+
approvalTimeoutMs?: number | undefined;
|
|
10155
|
+
maxOutputBytes?: number | undefined;
|
|
10156
|
+
} | undefined;
|
|
10157
|
+
output?: {
|
|
10158
|
+
format: "text" | "json";
|
|
10159
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10160
|
+
} | undefined;
|
|
10161
|
+
native?: {
|
|
10162
|
+
adapter: string;
|
|
10163
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10164
|
+
} | undefined;
|
|
10165
|
+
metadata?: Record<string, string> | undefined;
|
|
10166
|
+
} | undefined;
|
|
8433
10167
|
} | {
|
|
8434
10168
|
mode: "embedded";
|
|
8435
10169
|
transport: "stdio";
|
|
@@ -8439,9 +10173,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8439
10173
|
adapter: string;
|
|
8440
10174
|
modelIds: string[];
|
|
8441
10175
|
environmentRefs: Record<string, string>;
|
|
10176
|
+
environmentIds: string[];
|
|
10177
|
+
allowedCapabilities: string[];
|
|
8442
10178
|
command?: string | undefined;
|
|
8443
10179
|
args?: string[] | undefined;
|
|
8444
10180
|
defaultModelId?: string | undefined;
|
|
10181
|
+
defaults?: {
|
|
10182
|
+
model?: {
|
|
10183
|
+
id?: string | undefined;
|
|
10184
|
+
reasoningEffort?: string | undefined;
|
|
10185
|
+
temperature?: number | undefined;
|
|
10186
|
+
maxOutputTokens?: number | undefined;
|
|
10187
|
+
} | undefined;
|
|
10188
|
+
execution?: {
|
|
10189
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
10190
|
+
environmentId?: string | undefined;
|
|
10191
|
+
resources?: {
|
|
10192
|
+
cpu?: number | undefined;
|
|
10193
|
+
memoryMiB?: number | undefined;
|
|
10194
|
+
} | undefined;
|
|
10195
|
+
} | undefined;
|
|
10196
|
+
workspaceId?: string | undefined;
|
|
10197
|
+
context?: {
|
|
10198
|
+
fileIds?: string[] | undefined;
|
|
10199
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
10200
|
+
skillIds?: string[] | undefined;
|
|
10201
|
+
memory?: {
|
|
10202
|
+
scope: "user" | "none" | "space";
|
|
10203
|
+
spaceId?: string | undefined;
|
|
10204
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
10205
|
+
} | undefined;
|
|
10206
|
+
} | undefined;
|
|
10207
|
+
tools?: {
|
|
10208
|
+
allow?: string[] | undefined;
|
|
10209
|
+
} | undefined;
|
|
10210
|
+
capabilities?: string[] | undefined;
|
|
10211
|
+
permissions?: {
|
|
10212
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10213
|
+
approval?: "never" | "on-request" | undefined;
|
|
10214
|
+
ruleIds?: string[] | undefined;
|
|
10215
|
+
} | undefined;
|
|
10216
|
+
limits?: {
|
|
10217
|
+
queueTimeoutMs?: number | undefined;
|
|
10218
|
+
runTimeoutMs?: number | undefined;
|
|
10219
|
+
approvalTimeoutMs?: number | undefined;
|
|
10220
|
+
maxOutputBytes?: number | undefined;
|
|
10221
|
+
} | undefined;
|
|
10222
|
+
output?: {
|
|
10223
|
+
format: "text" | "json";
|
|
10224
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10225
|
+
} | undefined;
|
|
10226
|
+
native?: {
|
|
10227
|
+
adapter: string;
|
|
10228
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10229
|
+
} | undefined;
|
|
10230
|
+
metadata?: Record<string, string> | undefined;
|
|
10231
|
+
} | undefined;
|
|
8445
10232
|
} | {
|
|
8446
10233
|
mode: "builtin-service";
|
|
8447
10234
|
transport: "stdio";
|
|
@@ -8453,9 +10240,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8453
10240
|
adapter: string;
|
|
8454
10241
|
modelIds: string[];
|
|
8455
10242
|
environmentRefs: Record<string, string>;
|
|
10243
|
+
environmentIds: string[];
|
|
10244
|
+
allowedCapabilities: string[];
|
|
8456
10245
|
command?: string | undefined;
|
|
8457
10246
|
args?: string[] | undefined;
|
|
8458
10247
|
defaultModelId?: string | undefined;
|
|
10248
|
+
defaults?: {
|
|
10249
|
+
model?: {
|
|
10250
|
+
id?: string | undefined;
|
|
10251
|
+
reasoningEffort?: string | undefined;
|
|
10252
|
+
temperature?: number | undefined;
|
|
10253
|
+
maxOutputTokens?: number | undefined;
|
|
10254
|
+
} | undefined;
|
|
10255
|
+
execution?: {
|
|
10256
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
10257
|
+
environmentId?: string | undefined;
|
|
10258
|
+
resources?: {
|
|
10259
|
+
cpu?: number | undefined;
|
|
10260
|
+
memoryMiB?: number | undefined;
|
|
10261
|
+
} | undefined;
|
|
10262
|
+
} | undefined;
|
|
10263
|
+
workspaceId?: string | undefined;
|
|
10264
|
+
context?: {
|
|
10265
|
+
fileIds?: string[] | undefined;
|
|
10266
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
10267
|
+
skillIds?: string[] | undefined;
|
|
10268
|
+
memory?: {
|
|
10269
|
+
scope: "user" | "none" | "space";
|
|
10270
|
+
spaceId?: string | undefined;
|
|
10271
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
10272
|
+
} | undefined;
|
|
10273
|
+
} | undefined;
|
|
10274
|
+
tools?: {
|
|
10275
|
+
allow?: string[] | undefined;
|
|
10276
|
+
} | undefined;
|
|
10277
|
+
capabilities?: string[] | undefined;
|
|
10278
|
+
permissions?: {
|
|
10279
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10280
|
+
approval?: "never" | "on-request" | undefined;
|
|
10281
|
+
ruleIds?: string[] | undefined;
|
|
10282
|
+
} | undefined;
|
|
10283
|
+
limits?: {
|
|
10284
|
+
queueTimeoutMs?: number | undefined;
|
|
10285
|
+
runTimeoutMs?: number | undefined;
|
|
10286
|
+
approvalTimeoutMs?: number | undefined;
|
|
10287
|
+
maxOutputBytes?: number | undefined;
|
|
10288
|
+
} | undefined;
|
|
10289
|
+
output?: {
|
|
10290
|
+
format: "text" | "json";
|
|
10291
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10292
|
+
} | undefined;
|
|
10293
|
+
native?: {
|
|
10294
|
+
adapter: string;
|
|
10295
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10296
|
+
} | undefined;
|
|
10297
|
+
metadata?: Record<string, string> | undefined;
|
|
10298
|
+
} | undefined;
|
|
8459
10299
|
}>[]>>;
|
|
8460
10300
|
/**
|
|
8461
10301
|
* 整体替换数据库智能体;可传入 get 返回的版本防止覆盖并发修改,配置条目不可改。
|
|
@@ -8483,7 +10323,60 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8483
10323
|
adapter: string;
|
|
8484
10324
|
modelIds: string[];
|
|
8485
10325
|
environmentRefs: Record<string, string>;
|
|
10326
|
+
environmentIds: string[];
|
|
10327
|
+
allowedCapabilities: string[];
|
|
8486
10328
|
defaultModelId?: string | undefined;
|
|
10329
|
+
defaults?: {
|
|
10330
|
+
model?: {
|
|
10331
|
+
id?: string | undefined;
|
|
10332
|
+
reasoningEffort?: string | undefined;
|
|
10333
|
+
temperature?: number | undefined;
|
|
10334
|
+
maxOutputTokens?: number | undefined;
|
|
10335
|
+
} | undefined;
|
|
10336
|
+
execution?: {
|
|
10337
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
10338
|
+
environmentId?: string | undefined;
|
|
10339
|
+
resources?: {
|
|
10340
|
+
cpu?: number | undefined;
|
|
10341
|
+
memoryMiB?: number | undefined;
|
|
10342
|
+
} | undefined;
|
|
10343
|
+
} | undefined;
|
|
10344
|
+
workspaceId?: string | undefined;
|
|
10345
|
+
context?: {
|
|
10346
|
+
fileIds?: string[] | undefined;
|
|
10347
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
10348
|
+
skillIds?: string[] | undefined;
|
|
10349
|
+
memory?: {
|
|
10350
|
+
scope: "user" | "none" | "space";
|
|
10351
|
+
spaceId?: string | undefined;
|
|
10352
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
10353
|
+
} | undefined;
|
|
10354
|
+
} | undefined;
|
|
10355
|
+
tools?: {
|
|
10356
|
+
allow?: string[] | undefined;
|
|
10357
|
+
} | undefined;
|
|
10358
|
+
capabilities?: string[] | undefined;
|
|
10359
|
+
permissions?: {
|
|
10360
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10361
|
+
approval?: "never" | "on-request" | undefined;
|
|
10362
|
+
ruleIds?: string[] | undefined;
|
|
10363
|
+
} | undefined;
|
|
10364
|
+
limits?: {
|
|
10365
|
+
queueTimeoutMs?: number | undefined;
|
|
10366
|
+
runTimeoutMs?: number | undefined;
|
|
10367
|
+
approvalTimeoutMs?: number | undefined;
|
|
10368
|
+
maxOutputBytes?: number | undefined;
|
|
10369
|
+
} | undefined;
|
|
10370
|
+
output?: {
|
|
10371
|
+
format: "text" | "json";
|
|
10372
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10373
|
+
} | undefined;
|
|
10374
|
+
native?: {
|
|
10375
|
+
adapter: string;
|
|
10376
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10377
|
+
} | undefined;
|
|
10378
|
+
metadata?: Record<string, string> | undefined;
|
|
10379
|
+
} | undefined;
|
|
8487
10380
|
} | {
|
|
8488
10381
|
mode: "embedded";
|
|
8489
10382
|
transport: "stdio";
|
|
@@ -8493,9 +10386,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8493
10386
|
adapter: string;
|
|
8494
10387
|
modelIds: string[];
|
|
8495
10388
|
environmentRefs: Record<string, string>;
|
|
10389
|
+
environmentIds: string[];
|
|
10390
|
+
allowedCapabilities: string[];
|
|
8496
10391
|
command?: string | undefined;
|
|
8497
10392
|
args?: string[] | undefined;
|
|
8498
10393
|
defaultModelId?: string | undefined;
|
|
10394
|
+
defaults?: {
|
|
10395
|
+
model?: {
|
|
10396
|
+
id?: string | undefined;
|
|
10397
|
+
reasoningEffort?: string | undefined;
|
|
10398
|
+
temperature?: number | undefined;
|
|
10399
|
+
maxOutputTokens?: number | undefined;
|
|
10400
|
+
} | undefined;
|
|
10401
|
+
execution?: {
|
|
10402
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
10403
|
+
environmentId?: string | undefined;
|
|
10404
|
+
resources?: {
|
|
10405
|
+
cpu?: number | undefined;
|
|
10406
|
+
memoryMiB?: number | undefined;
|
|
10407
|
+
} | undefined;
|
|
10408
|
+
} | undefined;
|
|
10409
|
+
workspaceId?: string | undefined;
|
|
10410
|
+
context?: {
|
|
10411
|
+
fileIds?: string[] | undefined;
|
|
10412
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
10413
|
+
skillIds?: string[] | undefined;
|
|
10414
|
+
memory?: {
|
|
10415
|
+
scope: "user" | "none" | "space";
|
|
10416
|
+
spaceId?: string | undefined;
|
|
10417
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
10418
|
+
} | undefined;
|
|
10419
|
+
} | undefined;
|
|
10420
|
+
tools?: {
|
|
10421
|
+
allow?: string[] | undefined;
|
|
10422
|
+
} | undefined;
|
|
10423
|
+
capabilities?: string[] | undefined;
|
|
10424
|
+
permissions?: {
|
|
10425
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10426
|
+
approval?: "never" | "on-request" | undefined;
|
|
10427
|
+
ruleIds?: string[] | undefined;
|
|
10428
|
+
} | undefined;
|
|
10429
|
+
limits?: {
|
|
10430
|
+
queueTimeoutMs?: number | undefined;
|
|
10431
|
+
runTimeoutMs?: number | undefined;
|
|
10432
|
+
approvalTimeoutMs?: number | undefined;
|
|
10433
|
+
maxOutputBytes?: number | undefined;
|
|
10434
|
+
} | undefined;
|
|
10435
|
+
output?: {
|
|
10436
|
+
format: "text" | "json";
|
|
10437
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10438
|
+
} | undefined;
|
|
10439
|
+
native?: {
|
|
10440
|
+
adapter: string;
|
|
10441
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10442
|
+
} | undefined;
|
|
10443
|
+
metadata?: Record<string, string> | undefined;
|
|
10444
|
+
} | undefined;
|
|
8499
10445
|
} | {
|
|
8500
10446
|
mode: "builtin-service";
|
|
8501
10447
|
transport: "stdio";
|
|
@@ -8507,9 +10453,62 @@ declare function createACPOperations(provider: AIStoreProvider, config: AIConfig
|
|
|
8507
10453
|
adapter: string;
|
|
8508
10454
|
modelIds: string[];
|
|
8509
10455
|
environmentRefs: Record<string, string>;
|
|
10456
|
+
environmentIds: string[];
|
|
10457
|
+
allowedCapabilities: string[];
|
|
8510
10458
|
command?: string | undefined;
|
|
8511
10459
|
args?: string[] | undefined;
|
|
8512
10460
|
defaultModelId?: string | undefined;
|
|
10461
|
+
defaults?: {
|
|
10462
|
+
model?: {
|
|
10463
|
+
id?: string | undefined;
|
|
10464
|
+
reasoningEffort?: string | undefined;
|
|
10465
|
+
temperature?: number | undefined;
|
|
10466
|
+
maxOutputTokens?: number | undefined;
|
|
10467
|
+
} | undefined;
|
|
10468
|
+
execution?: {
|
|
10469
|
+
mode?: "auto" | "shared" | "user" | "task" | undefined;
|
|
10470
|
+
environmentId?: string | undefined;
|
|
10471
|
+
resources?: {
|
|
10472
|
+
cpu?: number | undefined;
|
|
10473
|
+
memoryMiB?: number | undefined;
|
|
10474
|
+
} | undefined;
|
|
10475
|
+
} | undefined;
|
|
10476
|
+
workspaceId?: string | undefined;
|
|
10477
|
+
context?: {
|
|
10478
|
+
fileIds?: string[] | undefined;
|
|
10479
|
+
knowledgeBaseIds?: string[] | undefined;
|
|
10480
|
+
skillIds?: string[] | undefined;
|
|
10481
|
+
memory?: {
|
|
10482
|
+
scope: "user" | "none" | "space";
|
|
10483
|
+
spaceId?: string | undefined;
|
|
10484
|
+
write?: "none" | "confirm" | "on-success" | undefined;
|
|
10485
|
+
} | undefined;
|
|
10486
|
+
} | undefined;
|
|
10487
|
+
tools?: {
|
|
10488
|
+
allow?: string[] | undefined;
|
|
10489
|
+
} | undefined;
|
|
10490
|
+
capabilities?: string[] | undefined;
|
|
10491
|
+
permissions?: {
|
|
10492
|
+
profile?: "read-only" | "workspace" | "full-access" | undefined;
|
|
10493
|
+
approval?: "never" | "on-request" | undefined;
|
|
10494
|
+
ruleIds?: string[] | undefined;
|
|
10495
|
+
} | undefined;
|
|
10496
|
+
limits?: {
|
|
10497
|
+
queueTimeoutMs?: number | undefined;
|
|
10498
|
+
runTimeoutMs?: number | undefined;
|
|
10499
|
+
approvalTimeoutMs?: number | undefined;
|
|
10500
|
+
maxOutputBytes?: number | undefined;
|
|
10501
|
+
} | undefined;
|
|
10502
|
+
output?: {
|
|
10503
|
+
format: "text" | "json";
|
|
10504
|
+
schema?: Record<string, z.core.util.JSONType> | undefined;
|
|
10505
|
+
} | undefined;
|
|
10506
|
+
native?: {
|
|
10507
|
+
adapter: string;
|
|
10508
|
+
options: Record<string, z.core.util.JSONType>;
|
|
10509
|
+
} | undefined;
|
|
10510
|
+
metadata?: Record<string, string> | undefined;
|
|
10511
|
+
} | undefined;
|
|
8513
10512
|
}>>>;
|
|
8514
10513
|
/**
|
|
8515
10514
|
* 删除无会话引用的数据库智能体定义;不删除镜像或外部服务。
|
|
@@ -9680,6 +11679,10 @@ interface ACPClientOptions {
|
|
|
9680
11679
|
* ```
|
|
9681
11680
|
*/
|
|
9682
11681
|
interface ACPAgentAdapter {
|
|
11682
|
+
/** 仅已验证无原生越权入口、能安全隔离并关闭会话的适配器可声明。 */
|
|
11683
|
+
sharedSessions?: true;
|
|
11684
|
+
/** 验证原生扩展并返回实际生效的选项。 */
|
|
11685
|
+
nativeOptions?: z.ZodType<Record<string, _h_ai_runner.RunnerJson>>;
|
|
9683
11686
|
/**
|
|
9684
11687
|
* 生成当前会话的原生启动参数;实现可以异步,不应在此启动进程或持久保存密钥。
|
|
9685
11688
|
* @param input - 智能体、已解析模型与独立状态目录。
|
|
@@ -9711,6 +11714,12 @@ interface ACPAgentAdapterInput {
|
|
|
9711
11714
|
modelId?: string;
|
|
9712
11715
|
/** 已创建的专属状态目录;托管容器内使用 /state/<会话 ID>。 */
|
|
9713
11716
|
statePath: string;
|
|
11717
|
+
/** 受管任务请求的权限范围。 */
|
|
11718
|
+
permissionProfile?: 'read-only' | 'workspace' | 'full-access';
|
|
11719
|
+
/** 已由适配器 Schema 校验的原生扩展选项。 */
|
|
11720
|
+
nativeOptions?: Record<string, _h_ai_runner.RunnerJson>;
|
|
11721
|
+
/** 模型声明支持且适配器可落实的推理级别。 */
|
|
11722
|
+
reasoningEffort?: string;
|
|
9714
11723
|
}
|
|
9715
11724
|
/**
|
|
9716
11725
|
* 单次启动的原生配置;env 可能含凭据,不可向浏览器或日志直接公开。
|
|
@@ -9865,4 +11874,4 @@ interface ACPGitReport {
|
|
|
9865
11874
|
type ACPOperations = ReturnType<typeof createACPOperations>;
|
|
9866
11875
|
|
|
9867
11876
|
export { AudioFormatSchema as $, ACPPublishSchema as B, ACPRepositorySchema as C, ACPWorkspaceSchema as F, AIConfigSchema as I, AUDIO_WS_PATH as U, ApiTypeSchema as W, AudioConfigSchema as _, EntityTypeSchema as a$, AudioModelEntrySchema as a1, AudioOperationSchema as a3, AudioOperationsSchema as a4, AudioProviderSchema as a6, AudioWsClientMessageSchema as a8, CompressionStrategySchema as aC, EmbeddingConfigSchema as aR, AudioWsDoneMessageSchema as aa, AudioWsStartMessageSchema as ai, AudioWsTextMessageSchema as ak, CompressConfigSchema as ax, FileConfigSchema as b1, LLMConfigSchema as bL, MCPConfigSchema as bO, MCPExternalServerSchema as bR, MCPServerCapabilitiesSchema as b_, HaiAIError as bb, ImageConfigSchema as bd, ImageModelEntrySchema as bg, ImageProviderSchema as bj, KnowledgeConfigSchema as bp, MCPServerConfigSchema as c0, MemoryConfigSchema as ce, MemoryTypeSchema as cp, ModelCapabilitiesSchema as ct, ModelEntrySchema as cv, ModelScenarioSchema as cx, OptionalSecretSchema as cz, RetrievalConfigSchema as d1, RetrievalSourceSchema as d8, ensureAudioCredential as dN, resolveAudioModel as dO, resolveImageModel as dP, resolveModelApi as dQ, resolveModelEntry as dR, serializePlayableAudio as dS, SummaryConfigSchema as dl, TokenConfigSchema as du, A2AConfigSchema as h, A2ASkillConfigSchema as n, ACPAgentSchema as s, ACPConfigSchema as w };
|
|
9868
|
-
export type { A2AAgentCardConfig as A, ACPSessionInfo as D, ACPTransport as E, AIConfig as G, AIConfigInput as H, AIFunctions as J, AIInitOptions as K, AIRelStore as L, AIRelStoreCompareAndSwap as M, AIRelStoreOptions as N, AIResourceEntry as O, AIResourceRegistry as P, AIStoreProvider as Q, AIVectorBackend as R, AIVectorStore as S, AIVersionedRecord as T, ApiType as V, AskOptions as X, AssistantMessage as Y, AudioConfig as Z, A2AAgentCardDocument as a, AudioModelEntry as a0, AudioOperation as a2, AudioProviderName as a5, AudioWsClientMessage as a7, AudioWsDoneMessage as a9, CompressResult as aA, CompressionStrategy as aB, ConsolidateOptions as aD, ConsolidateResult as aE, ContextChatOptions as aF, ContextChatResult as aG, ContextManager as aH, ContextManagerOptions as aI, ContextOperations as aJ, ContextResetOptions as aK, ContextStreamEvent as aL, ConversationTurn as aM, ConversationTurnStatus as aN, DefineToolOptions as aO, DeveloperMessage as aP, EmbeddingConfig as aQ, EmbeddingItem as aS, EmbeddingOperations as aT, EmbeddingRequest as aU, EmbeddingResponse as aV, EntityDocumentRelation as aW, EntityDocumentResult as aX, EntityListOptions as aY, EntityQueryOptions as aZ, EntityType as a_, AudioWsEndMessage as ab, AudioWsErrorMessage as ac, AudioWsSegmentDoneMessage as ad, AudioWsSegmentStartedMessage as ae, AudioWsServerMessage as af, AudioWsSpeechMessage as ag, AudioWsStartMessage as ah, AudioWsTextMessage as aj, AudioWsTranscriptMessage as al, ChatCompletionChoice as am, ChatCompletionChunk as an, ChatCompletionDelta as ao, ChatCompletionRequest as ap, ChatCompletionResponse as aq, ChatHistoryOptions as ar, ChatMessage as as, ChatRecord as at, Citation as au, CommitTurnInput as av, CompressConfig as aw, CompressOperations as ay, CompressOptions as az, A2AApiKeySecurity as b, MCPServerConfig as b$, FileConfig as b0, FileOperations as b2, FileParseMethod as b3, FileParseOptions as b4, FileParseRequest as b5, FileParseResult as b6, GenerateImageRequest as b7, GenerateImageResult as b8, GenerateObjectRequest as b9, KnowledgeIngestResult as bA, KnowledgeOperations as bB, KnowledgeRepairOptions as bC, KnowledgeRepairProgress as bD, KnowledgeRepairResult as bE, KnowledgeRetrieveItem as bF, KnowledgeRetrieveOptions as bG, KnowledgeRetrieveResult as bH, KnowledgeSetupOptions as bI, KnowledgeStore as bJ, LLMConfig as bK, LLMOperations as bM, MCPConfig as bN, MCPContext as bP, MCPExternalServer as bQ, MCPOperations as bS, MCPPrompt as bT, MCPPromptArgument as bU, MCPPromptContent as bV, MCPPromptMessage as bW, MCPResource as bX, MCPResourceContent as bY, MCPServerCapabilities as bZ, GeneratedImage as ba, ImageConfig as bc, ImageContent as be, ImageModelEntry as bf, ImageOperations as bh, ImageProviderName as bi, ImageSize as bk, InteractionScope as bl, KnowledgeAskOptions as bm, KnowledgeAskResult as bn, KnowledgeConfig as bo, KnowledgeDocumentInfo as bq, KnowledgeDocumentListOptions as br, KnowledgeDocumentMetadata as bs, KnowledgeDocumentRemoveOptions as bt, KnowledgeDocumentRevision as bu, KnowledgeEntity as bv, KnowledgeIngestBatchProgress as bw, KnowledgeIngestBatchResult as bx, KnowledgeIngestFileInput as by, KnowledgeIngestInput as bz, A2AAuthenticator as c, ResolvedModelConfig as c$, MCPToolDefinition as c1, MCPToolHandler as c2, ManagedAudioOperations as c3, ManagedImageOperations as c4, ManagedLLMOperations as c5, ManagedMCPOperations as c6, ManagedRetrievalOperations as c7, McpServerOptions as c8, MemoryAccessScope as c9, OutputFormat as cA, PersonaOperations as cB, PersonaProfile as cC, PersonaProfileInput as cD, PersonaProfileUpdate as cE, PersonaScopeOptions as cF, RagContextItem as cG, RagOperations as cH, RagOptions as cI, RagResult as cJ, RagStreamEvent as cK, ReasoningOperations as cL, ReasoningOptions as cM, ReasoningResult as cN, ReasoningStep as cO, ReasoningStepType as cP, ReasoningStrategy as cQ, ReasoningStreamEvent as cR, ReferenceImage as cS, RerankDocument as cT, RerankItem as cU, RerankOperations as cV, RerankRequest as cW, RerankResponse as cX, ResolveRequiredModelEntryOptions as cY, ResolvedAudioModel as cZ, ResolvedImageModel as c_, MemoryAdminOperations as ca, MemoryClearAllOptions as cb, MemoryClearOptions as cc, MemoryConfig as cd, MemoryCoreOperations as cf, MemoryEntry as cg, MemoryEntryInput as ch, MemoryExtractOptions as ci, MemoryInjectionOptions as cj, MemoryListOptions as ck, MemoryListPageOptions as cl, MemoryOperations as cm, MemoryRecallOptions as cn, MemoryType as co, MemoryUpdateInput as cq, MessageContent as cr, MessageRole as cs, ModelEntry as cu, ModelScenario as cw, ObjectRef as cy, A2ACallOptions as d, RetrievalConfig as d0, RetrievalOperations as d2, RetrievalRequest as d3, RetrievalResult as d4, RetrievalResultItem as d5, RetrievalSource as d6, RetrievalSourceConfig as d7, SSEDecoder as d9, ToolCall as dA, ToolDefinition as dB, ToolErrorType as dC, ToolExecutionContext as dD, ToolExecutionOptions as dE, ToolMessage as dF, ToolRegistryOperations as dG, ToolRegistryOptions as dH, ToolsOperations as dI, UserMessage as dJ, WhereClause as dK, WhereOperator as dL, WhereValue as dM,
|
|
11877
|
+
export type { A2AAgentCardConfig as A, ACPSessionInfo as D, ACPTransport as E, AIConfig as G, AIConfigInput as H, AIFunctions as J, AIInitOptions as K, AIRelStore as L, AIRelStoreCompareAndSwap as M, AIRelStoreOptions as N, AIResourceEntry as O, AIResourceRegistry as P, AIStoreProvider as Q, AIVectorBackend as R, AIVectorStore as S, AIVersionedRecord as T, ApiType as V, AskOptions as X, AssistantMessage as Y, AudioConfig as Z, A2AAgentCardDocument as a, AudioModelEntry as a0, AudioOperation as a2, AudioProviderName as a5, AudioWsClientMessage as a7, AudioWsDoneMessage as a9, CompressResult as aA, CompressionStrategy as aB, ConsolidateOptions as aD, ConsolidateResult as aE, ContextChatOptions as aF, ContextChatResult as aG, ContextManager as aH, ContextManagerOptions as aI, ContextOperations as aJ, ContextResetOptions as aK, ContextStreamEvent as aL, ConversationTurn as aM, ConversationTurnStatus as aN, DefineToolOptions as aO, DeveloperMessage as aP, EmbeddingConfig as aQ, EmbeddingItem as aS, EmbeddingOperations as aT, EmbeddingRequest as aU, EmbeddingResponse as aV, EntityDocumentRelation as aW, EntityDocumentResult as aX, EntityListOptions as aY, EntityQueryOptions as aZ, EntityType as a_, AudioWsEndMessage as ab, AudioWsErrorMessage as ac, AudioWsSegmentDoneMessage as ad, AudioWsSegmentStartedMessage as ae, AudioWsServerMessage as af, AudioWsSpeechMessage as ag, AudioWsStartMessage as ah, AudioWsTextMessage as aj, AudioWsTranscriptMessage as al, ChatCompletionChoice as am, ChatCompletionChunk as an, ChatCompletionDelta as ao, ChatCompletionRequest as ap, ChatCompletionResponse as aq, ChatHistoryOptions as ar, ChatMessage as as, ChatRecord as at, Citation as au, CommitTurnInput as av, CompressConfig as aw, CompressOperations as ay, CompressOptions as az, A2AApiKeySecurity as b, MCPServerConfig as b$, FileConfig as b0, FileOperations as b2, FileParseMethod as b3, FileParseOptions as b4, FileParseRequest as b5, FileParseResult as b6, GenerateImageRequest as b7, GenerateImageResult as b8, GenerateObjectRequest as b9, KnowledgeIngestResult as bA, KnowledgeOperations as bB, KnowledgeRepairOptions as bC, KnowledgeRepairProgress as bD, KnowledgeRepairResult as bE, KnowledgeRetrieveItem as bF, KnowledgeRetrieveOptions as bG, KnowledgeRetrieveResult as bH, KnowledgeSetupOptions as bI, KnowledgeStore as bJ, LLMConfig as bK, LLMOperations as bM, MCPConfig as bN, MCPContext as bP, MCPExternalServer as bQ, MCPOperations as bS, MCPPrompt as bT, MCPPromptArgument as bU, MCPPromptContent as bV, MCPPromptMessage as bW, MCPResource as bX, MCPResourceContent as bY, MCPServerCapabilities as bZ, GeneratedImage as ba, ImageConfig as bc, ImageContent as be, ImageModelEntry as bf, ImageOperations as bh, ImageProviderName as bi, ImageSize as bk, InteractionScope as bl, KnowledgeAskOptions as bm, KnowledgeAskResult as bn, KnowledgeConfig as bo, KnowledgeDocumentInfo as bq, KnowledgeDocumentListOptions as br, KnowledgeDocumentMetadata as bs, KnowledgeDocumentRemoveOptions as bt, KnowledgeDocumentRevision as bu, KnowledgeEntity as bv, KnowledgeIngestBatchProgress as bw, KnowledgeIngestBatchResult as bx, KnowledgeIngestFileInput as by, KnowledgeIngestInput as bz, A2AAuthenticator as c, ResolvedModelConfig as c$, MCPToolDefinition as c1, MCPToolHandler as c2, ManagedAudioOperations as c3, ManagedImageOperations as c4, ManagedLLMOperations as c5, ManagedMCPOperations as c6, ManagedRetrievalOperations as c7, McpServerOptions as c8, MemoryAccessScope as c9, OutputFormat as cA, PersonaOperations as cB, PersonaProfile as cC, PersonaProfileInput as cD, PersonaProfileUpdate as cE, PersonaScopeOptions as cF, RagContextItem as cG, RagOperations as cH, RagOptions as cI, RagResult as cJ, RagStreamEvent as cK, ReasoningOperations as cL, ReasoningOptions as cM, ReasoningResult as cN, ReasoningStep as cO, ReasoningStepType as cP, ReasoningStrategy as cQ, ReasoningStreamEvent as cR, ReferenceImage as cS, RerankDocument as cT, RerankItem as cU, RerankOperations as cV, RerankRequest as cW, RerankResponse as cX, ResolveRequiredModelEntryOptions as cY, ResolvedAudioModel as cZ, ResolvedImageModel as c_, MemoryAdminOperations as ca, MemoryClearAllOptions as cb, MemoryClearOptions as cc, MemoryConfig as cd, MemoryCoreOperations as cf, MemoryEntry as cg, MemoryEntryInput as ch, MemoryExtractOptions as ci, MemoryInjectionOptions as cj, MemoryListOptions as ck, MemoryListPageOptions as cl, MemoryOperations as cm, MemoryRecallOptions as cn, MemoryType as co, MemoryUpdateInput as cq, MessageContent as cr, MessageRole as cs, ModelEntry as cu, ModelScenario as cw, ObjectRef as cy, A2ACallOptions as d, MCPJobFiles as d$, RetrievalConfig as d0, RetrievalOperations as d2, RetrievalRequest as d3, RetrievalResult as d4, RetrievalResultItem as d5, RetrievalSource as d6, RetrievalSourceConfig as d7, SSEDecoder as d9, ToolCall as dA, ToolDefinition as dB, ToolErrorType as dC, ToolExecutionContext as dD, ToolExecutionOptions as dE, ToolMessage as dF, ToolRegistryOperations as dG, ToolRegistryOptions as dH, ToolsOperations as dI, UserMessage as dJ, WhereClause as dK, WhereOperator as dL, WhereValue as dM, ACPApprovalDecision as dT, ACPPlatformPolicy as dU, ACPPlatformRequest as dV, ACPRunObserver as dW, ACPRunRequest as dX, ACPSessionWorkspace as dY, ACPTurnOptions as dZ, MCPJobFileContext as d_, SSEEvent as da, ScopedMemoryBinding as db, ScopedMemoryOperations as dc, SessionInfo as dd, StoreFilter as de, StorePage as df, StoreScope as dg, StreamOperations as dh, StreamProcessor as di, StreamResult as dj, SummaryConfig as dk, SummaryOperations as dm, SummaryOptions as dn, SummaryResult as dp, SystemMessage as dq, TempModelConfig as dr, TextContent as ds, TokenConfig as dt, TokenOperations as dv, TokenUsage as dw, Tool as dx, ToolAuthorizationRequest as dy, ToolAuthorizer as dz, A2ACallResult as e, MCPServiceAuthorization as e0, MCPServiceBinding as e1, MCPServiceBindingRequest as e2, MCPServiceBroker as e3, MCPServiceBrokerOptions as e4, MCPServiceOperations as e5, MCPServiceRequest as e6, A2ACallerIdentity as f, A2AConfig as g, A2AContextInfo as i, A2AHandleResult as j, A2AMessageRecord as k, A2AOperations as l, A2ASecurityConfig as m, A2ATaskFilter as o, ACPAgentAdapter as p, ACPAgentAdapterInput as q, ACPAgentLaunch as r, ACPClientOptions as t, ACPConfig as u, ACPConfigInput as v, ACPCreateSessionOptions as x, ACPGitReport as y, ACPOperations as z };
|