@webskill/sdk 0.5.0 → 0.7.0
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/dist/agent.d.ts +2 -2
- package/dist/agent.js +274 -42
- package/dist/browser.d.ts +127 -5
- package/dist/browser.js +611 -17
- package/dist/{catalogComponents-DV7cPpUm-C77AEEx9.js → catalogComponents-Dr5dFMAb-DKH_7VPI.js} +848 -974
- package/dist/{dist-6C03DShK.js → dist-D0qW6e40.js} +1213 -210
- package/dist/{dist-bewtXYlO.js → dist-DnYG2-eY.js} +53 -14
- package/dist/{env--jJB-TSX-04klhTYi.js → env-8cY40DXB-CGnEVZby.js} +7 -6
- package/dist/{env-BPUBZCwJ-4jat_SVG.d.ts → env-AK3cSMEA-Dli6QU5E.d.ts} +4 -3
- package/dist/eventTypes-DjIQpt8Y-Bj3vghj4.js +32 -0
- package/dist/governance.d.ts +78 -11
- package/dist/governance.js +173 -50
- package/dist/{index-D_7ZZjkl.d.ts → index-Ba3xFtfz.d.ts} +222 -8
- package/dist/{index-Bsqg4ftU.d.ts → index-BwsK9lGk.d.ts} +13 -7
- package/dist/{index-vBz_FC9w.d.ts → index-DkbABR43.d.ts} +336 -52
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +159 -11
- package/dist/mcp.js +276 -45
- package/dist/{memoryArtifactStore-BtOeB_hm-tj3fC5ip.js → memoryArtifactStore-52Zn9npI-BMPYwvoy.js} +10 -2
- package/dist/node.d.ts +4 -4
- package/dist/node.js +11 -3
- package/dist/{openUiLibrary-W3Ce896k-ClFTRZFs.js → openUiLibrary-Bdrji9qK-D2LxmM-a.js} +3 -3
- package/dist/{skillVersionStore-BzLbzFOL-CxwIewHJ.d.ts → skillVersionStore-Bl-ElD45-CWPvGvoq.d.ts} +8 -2
- package/dist/{testing-DDCJWvgA.js → testing-CYTFqkDm.js} +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +3 -3
- package/dist/{types-D_hoCri8-BnNPiZCi.d.ts → types-CcxRLdJG-DCXyw1US.d.ts} +62 -10
- package/dist/ui-react.d.ts +5 -3
- package/dist/ui-react.js +72 -47
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +13 -8
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +2 -2
- package/dist/{webskillLitCatalog-_mugzRHx-DiuJpCuf.js → webskillLitCatalog-_mugzRHx-B_54vxum.js} +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { E as UiSpecSnapshot, R as JsonSchema, S as UiSpecActionCapability, c as InteractionResponse, gt as UiSpecNode, r as ChartSpec, s as InteractionRequest, v as RenderBlock, x as UiBridge, y as RenderResultRequest } from "./types-CcxRLdJG-DCXyw1US.js";
|
|
2
|
+
import { k as ExternalToolSource } from "./index-DkbABR43.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
5
|
//#region ../ui/dist/index.d.ts
|
|
6
6
|
//#region src/model/formModel.d.ts
|
|
7
7
|
interface FormModel {
|
|
8
|
-
kind: 'ask' | 'confirm' | 'form' | 'select' | 'authorize';
|
|
8
|
+
kind: 'ask' | 'confirm' | 'form' | 'select' | 'authorize' | 'file-pick';
|
|
9
9
|
title?: string;
|
|
10
10
|
message?: string;
|
|
11
11
|
controls: ControlModel[];
|
|
@@ -15,7 +15,7 @@ interface FormModel {
|
|
|
15
15
|
interface ControlModel {
|
|
16
16
|
name: string;
|
|
17
17
|
label: string;
|
|
18
|
-
control: 'text' | 'number' | 'boolean' | 'select' | 'textarea';
|
|
18
|
+
control: 'text' | 'number' | 'boolean' | 'select' | 'textarea' | 'file';
|
|
19
19
|
required?: boolean;
|
|
20
20
|
description?: string;
|
|
21
21
|
defaultValue?: unknown;
|
|
@@ -23,14 +23,17 @@ interface ControlModel {
|
|
|
23
23
|
label: string;
|
|
24
24
|
value: unknown;
|
|
25
25
|
}>;
|
|
26
|
+
/** 传给 `input.accept` 的类型列表(仅 file 控件) */
|
|
27
|
+
accept?: readonly string[];
|
|
28
|
+
multiple?: boolean;
|
|
26
29
|
/**
|
|
27
|
-
*
|
|
30
|
+
* 建议值(FR-19.4)。与 `defaultValue` 严格分开:渲染器只能把它展示为建议,
|
|
28
31
|
* 用户主动采纳后才能进控件。
|
|
29
32
|
* @experimental
|
|
30
33
|
*/
|
|
31
34
|
suggestion?: {
|
|
32
35
|
value: unknown;
|
|
33
|
-
|
|
36
|
+
reason?: string;
|
|
34
37
|
};
|
|
35
38
|
}
|
|
36
39
|
/** 提交值按请求类型归形(WebFormBridge 与框架组件库共享单一来源) */
|
|
@@ -67,7 +70,10 @@ declare function applySuggestion(control: ControlModel, container: ParentNode):
|
|
|
67
70
|
declare function renderMiniMarkdown(text: string, doc: Document): HTMLElement;
|
|
68
71
|
//#endregion
|
|
69
72
|
//#region src/chart/miniChart.d.ts
|
|
70
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* 固定 8 色循环调色板。这是**数据编码**(区分序列),不是主题色;
|
|
75
|
+
* 图表的轴线与文字等“外壳”颜色走 currentColor,跟随宿主容器的主题。
|
|
76
|
+
*/
|
|
71
77
|
declare const CHART_PALETTE: readonly ["#4e79a7", "#f28e2b", "#e15759", "#76b7b2", "#59a14f", "#edc948", "#b07aa1", "#ff9da7"];
|
|
72
78
|
/**
|
|
73
79
|
* ChartSpec → SVG(bar 等宽柱 + 值标签;line 折线 + 点;pie 扇形 + 图例;空数据容错)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as SkillCatalog, C as UiSpecDrafts, D as UiSurfaceActionRequest, H as PageQuery, I as FileSystemProvider, P as DiscoveryResult, R as JsonSchema, V as Page, _ as MemoryStore, d as LlmContentPart, et as SkillCatalogEntry, f as LlmMessage, g as LlmToolSpec, gt as UiSpecNode, i as FormField, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, nt as SkillDocument, o as InteractionPolicy, p as LlmResponse, r as ChartSpec, rt as SkillInstallSource, s as InteractionRequest, st as SkillManifest, t as Artifact, tt as SkillDiscovery, u as LlmCompleteInput, v as RenderBlock, vt as ValidationReport, w as UiSpecEvent, x as UiBridge, xt as WebSkillErrorCode, y as RenderResultRequest } from "./types-CcxRLdJG-DCXyw1US.js";
|
|
2
2
|
//#region ../runtime/dist/index.d.ts
|
|
3
3
|
//#region src/llm/parts.d.ts
|
|
4
4
|
/** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
|
|
@@ -130,16 +130,34 @@ interface ToolDefinition {
|
|
|
130
130
|
source: 'script' | 'mcp' | 'webmcp' | 'builtin';
|
|
131
131
|
skillName?: string;
|
|
132
132
|
}
|
|
133
|
+
/** 文本型分片(参与 `toolResultMaxBytes` 截断) @experimental */
|
|
134
|
+
type TextualToolContent = {
|
|
135
|
+
type: 'text' | 'json';
|
|
136
|
+
text?: string;
|
|
137
|
+
data?: unknown;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* 工具结果的内容分片(0.6.0 §1.1)。
|
|
141
|
+
* `image` 分片不参与 `toolResultMaxBytes` 截断——那份预算是给文本的,
|
|
142
|
+
* base64 图像另有 `maxImageBytes` / `maxImagesPerMessage` 预算,混算会让任一方失效。
|
|
143
|
+
* `text?: undefined` 是故意的:图像分片没有文本,但让调用方能直接读 `part.text` 而不用先窄化。
|
|
144
|
+
* @experimental
|
|
145
|
+
*/
|
|
146
|
+
type ToolContent = TextualToolContent | {
|
|
147
|
+
type: 'image';
|
|
148
|
+
mimeType: string;
|
|
149
|
+
data: string;
|
|
150
|
+
id: string;
|
|
151
|
+
text?: undefined;
|
|
152
|
+
};
|
|
133
153
|
interface ToolResult {
|
|
134
154
|
ok: boolean;
|
|
135
|
-
content:
|
|
136
|
-
|
|
137
|
-
text?: string;
|
|
138
|
-
data?: unknown;
|
|
139
|
-
}>;
|
|
155
|
+
content: ToolContent[];
|
|
156
|
+
/** `data` 供宿主编程处理;`message` 是模型实际会读的那一份,两者都要写全 */
|
|
140
157
|
error?: {
|
|
141
158
|
code: string;
|
|
142
159
|
message: string;
|
|
160
|
+
data?: Record<string, unknown>;
|
|
143
161
|
};
|
|
144
162
|
artifacts?: Artifact[];
|
|
145
163
|
}
|
|
@@ -185,6 +203,9 @@ type ToolResolution = {
|
|
|
185
203
|
kind: 'not-found';
|
|
186
204
|
code: 'TOOL_NOT_FOUND';
|
|
187
205
|
message: string;
|
|
206
|
+
data: {
|
|
207
|
+
availableTools: string[];
|
|
208
|
+
};
|
|
188
209
|
};
|
|
189
210
|
/**
|
|
190
211
|
* 工具名解析规则(单一实现,Agent 循环使用):
|
|
@@ -193,16 +214,55 @@ type ToolResolution = {
|
|
|
193
214
|
* 3. `mcp#` 前缀 → TOOL_UNSUPPORTED(WebMCP 阶段实现)
|
|
194
215
|
* 4. 其余 → TOOL_NOT_FOUND
|
|
195
216
|
*/
|
|
196
|
-
declare function resolveToolName(name: string, activatedSkills: ReadonlySet<string>): ToolResolution;
|
|
217
|
+
declare function resolveToolName(name: string, activatedSkills: ReadonlySet<string>, activatedTools?: Iterable<string>): ToolResolution;
|
|
197
218
|
/** ToolDefinition → LLM 工具 spec;缺 schema 时用宽松 object 兜底并在描述中标记 */
|
|
198
219
|
declare function toLlmToolSpec(tool: ToolDefinition): LlmToolSpec;
|
|
199
220
|
//#endregion
|
|
221
|
+
//#region src/tools/skillScripts.d.ts
|
|
222
|
+
/**
|
|
223
|
+
* 技能脚本清单(0.6.0 FR-18.1)。
|
|
224
|
+
* 同一份数据两处用:`AgentLoop` 激活技能时喂给模型,console 技能详情展示给人。
|
|
225
|
+
* 两处各写一份的话,模型看到的和作者看到的会慢慢对不上,而这正是「反复猜错脚本名」的来源。
|
|
226
|
+
* 纯函数(入参是技能根目录下的相对路径清单),因此宿主端不需要 FileSystemProvider 也能复用。
|
|
227
|
+
*/
|
|
228
|
+
/** 入参 schema 的来源;`unknown` 表示尚未加载脚本定义(console 只看目录,不执行脚本) */
|
|
229
|
+
type SkillScriptSchemaSource = 'module-export' | 'sidecar' | 'inferred' | 'unavailable' | 'unknown';
|
|
230
|
+
interface SkillScriptDescriptor {
|
|
231
|
+
/** 技能根目录下的相对路径,如 `scripts/parse.ts` */
|
|
232
|
+
path: string;
|
|
233
|
+
/** 去掉目录与扩展名的脚本名,也是工具名的后半段 */
|
|
234
|
+
scriptName: string;
|
|
235
|
+
/** 暴露为工具时的工具名;未暴露时为 undefined */
|
|
236
|
+
toolName?: string;
|
|
237
|
+
schemaSource: SkillScriptSchemaSource;
|
|
238
|
+
/** 未暴露为工具的原因(allowed-tools 排除 / 定义加载失败) */
|
|
239
|
+
unexposedReason?: string;
|
|
240
|
+
}
|
|
241
|
+
/** 工具名规则:技能**目录名**加双下划线加脚本名,与 frontmatter 的 name 无关 */
|
|
242
|
+
declare function scriptToolName(skillName: string, scriptName: string): string;
|
|
243
|
+
/** 展示用的 schema 来源文案(console 与模型清单共用一套措辞) */
|
|
244
|
+
declare function schemaSourceLabel(source: SkillScriptSchemaSource): string;
|
|
245
|
+
/** allowed-tools 排除的脚本对模型不可见;清单里必须写明原因,否则作者只会看到工具凭空消失 */
|
|
246
|
+
declare const ALLOWED_TOOLS_EXCLUSION_REASON = "excluded by the allowed-tools list in SKILL.md";
|
|
247
|
+
/**
|
|
248
|
+
* 从技能文件清单中挑出脚本并给出工具名映射。
|
|
249
|
+
* @param files 技能根目录下的相对路径(如 `scripts/parse.ts`、`SKILL.md`)
|
|
250
|
+
* @param allowedTools SKILL.md 声明的 allowed-tools;未声明传 undefined(全部暴露)
|
|
251
|
+
*/
|
|
252
|
+
declare function listSkillScripts(skillName: string, files: readonly string[], allowedTools?: readonly string[]): SkillScriptDescriptor[];
|
|
253
|
+
/**
|
|
254
|
+
* 清单 → 喂给模型的文本(FR-18.1)。
|
|
255
|
+
* 「authoritative」这句是给模型的信号:以目录为准,别照 SKILL.md 的描述猜文件名。
|
|
256
|
+
*/
|
|
257
|
+
declare function formatSkillScriptManifest(descriptors: readonly SkillScriptDescriptor[]): string;
|
|
258
|
+
//#endregion
|
|
200
259
|
//#region src/tools/normalizeContent.d.ts
|
|
201
260
|
/**
|
|
202
261
|
* 脚本返回值归一到 MCP content 格式:数组沿用(逐项归一),
|
|
203
262
|
* 字符串包装为 text,其他值序列化包装。Node/浏览器执行器共享。
|
|
263
|
+
* 产出只有文本型分片:脚本侧没有下发图像的通道(图像只来自页面取像)。
|
|
204
264
|
*/
|
|
205
|
-
declare function normalizeToolContent(value: unknown):
|
|
265
|
+
declare function normalizeToolContent(value: unknown): TextualToolContent[];
|
|
206
266
|
//#endregion
|
|
207
267
|
//#region src/tools/readSkillFileTool.d.ts
|
|
208
268
|
declare const READ_SKILL_FILE_TOOL_NAME = "read_skill_file";
|
|
@@ -365,8 +425,17 @@ interface AgentLoopConfig {
|
|
|
365
425
|
toolResultMaxBytes?: number;
|
|
366
426
|
/** session paramHistory 保留条数上限(默认 50,超出裁最旧) */
|
|
367
427
|
paramHistoryLimit?: number;
|
|
368
|
-
/**
|
|
369
|
-
|
|
428
|
+
/**
|
|
429
|
+
* 模型不支持原生工具调用时置 true(0.6.0 FR-14.3):不注入任何工具定义、
|
|
430
|
+
* 不收集外部来源的系统提示,并换成精简提示。不这么做的话,不会调工具的模型
|
|
431
|
+
* 会照着提示词里的语法“演”一个工具调用出来。
|
|
432
|
+
*/
|
|
433
|
+
toolCallingDisabled?: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* 单次 run 内允许的「调用不存在的工具」次数(默认 2,超出即终止 run,0.6.0 FR-18.3)。
|
|
436
|
+
* 不设上限的话,模型会一路猜到 maxTurns 用完,用户等到最后拿到的还是一句失败。
|
|
437
|
+
*/
|
|
438
|
+
maxUnknownToolRetries?: number;
|
|
370
439
|
}
|
|
371
440
|
/** 技能状态拦截 port(治理装配;无注入默认全放行) */
|
|
372
441
|
interface SkillStateGuard {
|
|
@@ -403,6 +472,11 @@ interface SkillFailureReport {
|
|
|
403
472
|
/** 英文失败说明;上报方须能据此向用户解释,不要传空串 */
|
|
404
473
|
message: string;
|
|
405
474
|
}
|
|
475
|
+
/** 技能脚本执行成功的上报负载 */
|
|
476
|
+
interface SkillSuccessReport {
|
|
477
|
+
skillName: string;
|
|
478
|
+
runId: string;
|
|
479
|
+
}
|
|
406
480
|
/**
|
|
407
481
|
* 技能执行结果上报 port(治理 `SkillStatePolicy.toSkillOutcomeReporter` 装配;**不注入即关闭**)。
|
|
408
482
|
*
|
|
@@ -419,12 +493,19 @@ interface SkillFailureReport {
|
|
|
419
493
|
*/
|
|
420
494
|
interface SkillOutcomeReporter {
|
|
421
495
|
onSkillFailed?(report: SkillFailureReport): Promise<void>;
|
|
496
|
+
/**
|
|
497
|
+
* 成功上报(0.7.0 新增,可选;裁决 D-5)。没有它,失败计数只能单调递增,
|
|
498
|
+
* 「连续三次失败」实际退化成「累计三次」——一个长期正常的技能迟早会被隔离。
|
|
499
|
+
*/
|
|
500
|
+
onSkillSucceeded?(report: SkillSuccessReport): Promise<void>;
|
|
422
501
|
}
|
|
423
502
|
interface RuntimeSession {
|
|
424
503
|
id: string;
|
|
425
504
|
createdAt: string;
|
|
426
505
|
}
|
|
427
|
-
type RunTerminationReason = 'final-answer' | 'max-turns' | 'timeout' | 'llm-error' | 'interaction-timeout' | 'user-cancelled' | 'hook-error'
|
|
506
|
+
type RunTerminationReason = 'final-answer' | 'max-turns' | 'timeout' | 'llm-error' | 'interaction-timeout' | 'user-cancelled' | 'hook-error' |
|
|
507
|
+
/** 反复调用不存在的工具,提前止损(0.6.0 FR-18.3) */
|
|
508
|
+
'tool-resolution-exhausted';
|
|
428
509
|
interface RuntimeRun {
|
|
429
510
|
id: string;
|
|
430
511
|
sessionId: string;
|
|
@@ -448,7 +529,7 @@ interface RunResult {
|
|
|
448
529
|
}
|
|
449
530
|
/** createSession 返回的会话句柄:跨 run 延续消息历史 */
|
|
450
531
|
interface RuntimeSessionHandle extends RuntimeSession {
|
|
451
|
-
run(prompt: string): Promise<RunResult>;
|
|
532
|
+
run(prompt: string | readonly LlmContentPart[]): Promise<RunResult>;
|
|
452
533
|
}
|
|
453
534
|
//#endregion
|
|
454
535
|
//#region src/interaction/renderResult.d.ts
|
|
@@ -460,6 +541,7 @@ declare function extractChartSpec(data: unknown): ChartSpec | undefined;
|
|
|
460
541
|
/**
|
|
461
542
|
* 默认的结果渲染构造:run 内收集的 renderBlocks(chart 等)在前,
|
|
462
543
|
* LLM 最终输出 → markdown block,run.artifacts → file blocks 在后;summary 取 terminationReason。
|
|
544
|
+
* 注入 output block 时一并记下它的下标(S7),供消费方按来源去重。
|
|
463
545
|
*/
|
|
464
546
|
declare function buildRenderResult(run: RuntimeRun, output: string, renderBlocks?: RenderBlock[]): RenderResultRequest;
|
|
465
547
|
//#endregion
|
|
@@ -476,11 +558,8 @@ declare function extractUiSpecEvents(data: unknown): UiSpecEvent[];
|
|
|
476
558
|
* JsonSchema → 表单模型:按 properties 生成字段,required 标记必填;
|
|
477
559
|
* providedArgs 已有的值作为 defaultValue 预填(表单只为补齐缺失项服务)。
|
|
478
560
|
* type 映射:string→text、number/integer→number、boolean→boolean、enum→select、其余→textarea。
|
|
479
|
-
* 传入 skillName 时给每个字段带上跨会话稳定的 `fieldKey`(FR-5.6)。
|
|
480
561
|
*/
|
|
481
|
-
declare function schemaToForm(schema: JsonSchema, providedArgs?: Record<string, unknown
|
|
482
|
-
skillName?: string;
|
|
483
|
-
}): FormField[];
|
|
562
|
+
declare function schemaToForm(schema: JsonSchema, providedArgs?: Record<string, unknown>): FormField[];
|
|
484
563
|
//#endregion
|
|
485
564
|
//#region src/facade/types.d.ts
|
|
486
565
|
/**
|
|
@@ -612,35 +691,198 @@ declare class SerializingMemoryStore implements MemoryStore {
|
|
|
612
691
|
transaction<T>(scope: string, fn: (inner: MemoryStore) => Promise<T>): Promise<T>;
|
|
613
692
|
}
|
|
614
693
|
//#endregion
|
|
615
|
-
//#region src/
|
|
616
|
-
/**
|
|
617
|
-
|
|
694
|
+
//#region src/profile/types.d.ts
|
|
695
|
+
/**
|
|
696
|
+
* 用户画像(0.6.0 需求 19)。行为记录是原始事实,画像是模型提炼出的结论——
|
|
697
|
+
* 只有后者会进入后续对话的上下文(FR-19.3)。
|
|
698
|
+
*/
|
|
699
|
+
/** @experimental */
|
|
700
|
+
type BehaviorRecordKind = 'question' | 'choice' | 'text-input' | 'stated-preference';
|
|
701
|
+
/**
|
|
702
|
+
* 记录发生时的场景。没有场景的记录对提炼没有价值:
|
|
703
|
+
* 「选了 A」不带候选集与字段语义,模型无从判断这代表什么偏好(FR-19.2)。
|
|
704
|
+
* @experimental
|
|
705
|
+
*/
|
|
706
|
+
interface BehaviorScene {
|
|
707
|
+
readonly sessionId: string;
|
|
708
|
+
readonly skillName?: string;
|
|
709
|
+
readonly interactionId?: string;
|
|
710
|
+
readonly fieldName?: string;
|
|
711
|
+
/** 字段语义(label / description),供提炼时理解字段含义 */
|
|
712
|
+
readonly fieldSemantics?: string;
|
|
713
|
+
/** 下拉候选集:理解「用户在什么范围里选了什么」 */
|
|
714
|
+
readonly options?: readonly string[];
|
|
715
|
+
}
|
|
716
|
+
/** @experimental */
|
|
717
|
+
interface BehaviorRecord {
|
|
718
|
+
readonly id: string;
|
|
719
|
+
readonly kind: BehaviorRecordKind;
|
|
720
|
+
/** epoch ms */
|
|
721
|
+
readonly at: number;
|
|
722
|
+
readonly scene: BehaviorScene;
|
|
723
|
+
readonly value: string;
|
|
724
|
+
/** 用户是否显式确认过(采样维度之一) */
|
|
725
|
+
readonly confirmed?: boolean;
|
|
726
|
+
}
|
|
727
|
+
/** 一条自然语言结论。条目化而不是整段文本,才谈得上逐条查看与删除(FR-19.3) @experimental */
|
|
728
|
+
interface UserProfileEntry {
|
|
729
|
+
readonly id: string;
|
|
730
|
+
readonly text: string;
|
|
731
|
+
readonly confidence: 'high' | 'low';
|
|
732
|
+
/** epoch ms */
|
|
733
|
+
readonly updatedAt: number;
|
|
734
|
+
readonly sourceKinds: readonly BehaviorRecordKind[];
|
|
735
|
+
}
|
|
736
|
+
/** @experimental */
|
|
737
|
+
interface UserProfile {
|
|
738
|
+
readonly version: 1;
|
|
739
|
+
readonly entries: readonly UserProfileEntry[];
|
|
740
|
+
/** epoch ms;从未提炼过时为 0 */
|
|
741
|
+
readonly refinedAt: number;
|
|
742
|
+
}
|
|
743
|
+
/** @experimental */
|
|
744
|
+
interface UserProfileLimits {
|
|
745
|
+
/** 行为记录容量上限,超出淘汰最旧 */
|
|
746
|
+
recordLimit: number;
|
|
747
|
+
/** 单条 value 的字符上限(用户输入需保留语义,故远大于感知截断) */
|
|
748
|
+
valueMaxChars: number;
|
|
749
|
+
/** 送入一次提炼的记录条数上限 */
|
|
750
|
+
sampleLimit: number;
|
|
751
|
+
/** 画像注入系统提示的字节上限 */
|
|
752
|
+
injectMaxBytes: number;
|
|
753
|
+
/** 画像条目数上限,超出按 updatedAt 淘汰 */
|
|
754
|
+
entryLimit: number;
|
|
755
|
+
}
|
|
756
|
+
/** @experimental */
|
|
757
|
+
declare const DEFAULT_USER_PROFILE_LIMITS: UserProfileLimits;
|
|
758
|
+
/** @experimental */
|
|
759
|
+
declare const EMPTY_USER_PROFILE: UserProfile;
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region src/profile/records.d.ts
|
|
762
|
+
/** `user:{id}` scope 下的行为记录 key @experimental */
|
|
763
|
+
declare const BEHAVIOR_RECORDS_KEY = "behaviorRecords";
|
|
764
|
+
/** `user:{id}` scope 下的画像 key @experimental */
|
|
765
|
+
declare const USER_PROFILE_KEY = "userProfile";
|
|
766
|
+
/** 存储里的形状不受控(宿主可能手改文件),逐条筛而不是整体信任 @experimental */
|
|
767
|
+
declare function readBehaviorRecords(raw: unknown): BehaviorRecord[];
|
|
618
768
|
/**
|
|
619
|
-
*
|
|
620
|
-
*
|
|
769
|
+
* 追加并按容量淘汰最旧(FR-19.2)。`value` 同时截断:
|
|
770
|
+
* 一条被粘贴进来的长文本能把整个 JSON 撑爆,而提炼只需要语义。
|
|
621
771
|
* @experimental
|
|
622
772
|
*/
|
|
623
|
-
declare function
|
|
624
|
-
/**
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
|
|
773
|
+
declare function appendBehaviorRecords(current: readonly BehaviorRecord[], incoming: readonly BehaviorRecord[], limits?: UserProfileLimits): BehaviorRecord[];
|
|
774
|
+
/** @experimental */
|
|
775
|
+
declare function readUserProfile(raw: unknown): UserProfile;
|
|
776
|
+
/** @experimental */
|
|
777
|
+
declare function readProfileEntries(raw: unknown): UserProfileEntry[];
|
|
778
|
+
/**
|
|
779
|
+
* 合并提炼结果:同 id 更新,新 id 追加,超上限按 `updatedAt` 淘汰最旧(设计 09 §1.4)。
|
|
780
|
+
* @experimental
|
|
781
|
+
*/
|
|
782
|
+
declare function mergeProfileEntries(current: UserProfile, incoming: readonly UserProfileEntry[], options: {
|
|
783
|
+
now: number;
|
|
784
|
+
limits?: UserProfileLimits;
|
|
785
|
+
}): UserProfile;
|
|
786
|
+
/**
|
|
787
|
+
* 提炼采样(FR-19.3):最近的 + 高频的 + 被用户显式确认过的,去重后截到上限。
|
|
788
|
+
* 三个维度缺一不可——只取最近会让长期偏好被一次突发淹没,只取高频则学不到新变化。
|
|
789
|
+
* @experimental
|
|
790
|
+
*/
|
|
791
|
+
declare function sampleBehaviorRecords(records: readonly BehaviorRecord[], limits?: UserProfileLimits): BehaviorRecord[];
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region src/profile/refine.d.ts
|
|
794
|
+
/**
|
|
795
|
+
* 提炼提示词。要求返回结论列表而不是散文:条目化是「可见、可编辑、可删除」的前提(FR-19.3)。
|
|
796
|
+
* `id` 由模型给出稳定 slug,才能在下一次提炼时更新同一条而不是无限追加。
|
|
797
|
+
*/
|
|
798
|
+
declare const USER_PROFILE_REFINE_PROMPT = "You summarize what a single user is like, based on records of what they did in a chat application.\n\nReturn ONLY a JSON object with this shape, and nothing else:\n\n{\n \"entries\": [\n { \"id\": \"slug-case-stable-id\", \"text\": \"One sentence about the user.\", \"confidence\": \"high\" | \"low\" }\n ]\n}\n\nRules:\n- Each entry is one durable, reusable fact or preference about the user — how they like answers, what they work on, values they keep entering, languages they use.\n- Reuse the same \"id\" across runs for the same conclusion so it can be updated instead of duplicated. Use lowercase words joined by hyphens.\n- Use \"high\" only when several records agree. A single record is \"low\".\n- Do not restate individual records. Do not include secrets, credentials, or full personal identifiers.\n- Do not invent anything the records do not support. If the records say nothing useful, return {\"entries\": []}.";
|
|
799
|
+
/** @experimental */
|
|
800
|
+
interface RefineUserProfileInput {
|
|
801
|
+
llm: LlmClient;
|
|
802
|
+
records: readonly BehaviorRecord[];
|
|
803
|
+
/** 当前画像;提炼结果与它合并(同 id 更新) */
|
|
804
|
+
profile?: UserProfile;
|
|
805
|
+
model?: string;
|
|
806
|
+
limits?: UserProfileLimits;
|
|
807
|
+
/** epoch ms 时钟,默认 `Date.now` */
|
|
808
|
+
now?: () => number;
|
|
809
|
+
signal?: AbortSignal;
|
|
810
|
+
}
|
|
811
|
+
/** 送模型的记录形态:只保留提炼用得上的字段,会话 id 之类的内部标识不外发 */
|
|
812
|
+
interface RecordDigest {
|
|
813
|
+
kind: string;
|
|
814
|
+
at: string;
|
|
815
|
+
value: string;
|
|
816
|
+
skill?: string;
|
|
817
|
+
field?: string;
|
|
818
|
+
meaning?: string;
|
|
819
|
+
options?: readonly string[];
|
|
820
|
+
confirmed?: boolean;
|
|
821
|
+
}
|
|
822
|
+
/** 采样后的记录 → 送模型的摘要。导出供测试与宿主复核实际请求内容(AC-19.6) @experimental */
|
|
823
|
+
declare function toRecordDigests(records: readonly BehaviorRecord[]): RecordDigest[];
|
|
638
824
|
/**
|
|
639
|
-
*
|
|
640
|
-
*
|
|
825
|
+
* 一次提炼(FR-19.3)。调用方负责持久化返回值;本函数不碰存储,
|
|
826
|
+
* 也不吞异常——「失败不影响会话结束」由调用点的 fire-and-forget 保证,
|
|
827
|
+
* 在这里吞掉会让手动提炼入口无法报错。
|
|
641
828
|
* @experimental
|
|
642
829
|
*/
|
|
643
|
-
declare function
|
|
830
|
+
declare function refineUserProfile(input: RefineUserProfileInput): Promise<UserProfile>;
|
|
831
|
+
//#endregion
|
|
832
|
+
//#region src/profile/inject.d.ts
|
|
833
|
+
/** 注入段的标题。宿主/测试要判断「有没有注入画像」时对它取子串,不要自己再拼一份 @experimental */
|
|
834
|
+
declare const USER_PROFILE_PROMPT_HEADER = "## About this user (inferred from past behavior; may be outdated)";
|
|
835
|
+
/**
|
|
836
|
+
* 无画像时也要下发的约束(AC-19.11):没有依据就把字段留空,
|
|
837
|
+
* 不写这一句时模型会把「建议值」当成必填项去编。
|
|
838
|
+
* @experimental
|
|
839
|
+
*/
|
|
840
|
+
declare const USER_PROFILE_NO_INVENTION_RULE = "Only offer a suggested value for a question when the profile above actually supports it. With no relevant profile entry, omit the suggestion and leave the field empty; never invent one.";
|
|
841
|
+
/**
|
|
842
|
+
* 画像 → 系统提示片段,按 confidence + updatedAt 优先级排序后逐条累加,
|
|
843
|
+
* 超出字节上限的部分丢弃并标注(FR-19.4 / AC-19.9)。
|
|
844
|
+
* 空画像返回空串:只有标题的空段落白占 token,还会诱导模型编造。
|
|
845
|
+
* @experimental
|
|
846
|
+
*/
|
|
847
|
+
declare function renderUserProfileContext(profile?: UserProfile, maxBytes?: number): string;
|
|
848
|
+
//#endregion
|
|
849
|
+
//#region src/profile/transfer.d.ts
|
|
850
|
+
/** 导出文件的版本;导入时逐字校验,不做向前兼容猜测 @experimental */
|
|
851
|
+
declare const USER_PROFILE_EXPORT_VERSION = 1;
|
|
852
|
+
/**
|
|
853
|
+
* 导出物(FR-19.7)。**结构上只有 entries**:原始行为记录与凭据没有容身之处,
|
|
854
|
+
* 这是「导出不泄露」的类型层保证,运行时另有一道断言兜底。
|
|
855
|
+
* @experimental
|
|
856
|
+
*/
|
|
857
|
+
interface UserProfileExport {
|
|
858
|
+
readonly kind: 'webskill.user-profile';
|
|
859
|
+
readonly version: typeof USER_PROFILE_EXPORT_VERSION;
|
|
860
|
+
/** 来源标识(站点 origin),用于导入时说明这份画像来自哪里 */
|
|
861
|
+
readonly origin: string;
|
|
862
|
+
/** epoch ms */
|
|
863
|
+
readonly exportedAt: number;
|
|
864
|
+
readonly entries: readonly UserProfileEntry[];
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* 导出画像(FR-19.7)。`excludeIds` 来自导出前的审阅界面:用户勾掉的条目不进文件。
|
|
868
|
+
* @experimental
|
|
869
|
+
*/
|
|
870
|
+
declare function exportUserProfile(profile: UserProfile, options: {
|
|
871
|
+
origin: string;
|
|
872
|
+
excludeIds?: readonly string[];
|
|
873
|
+
now?: () => number;
|
|
874
|
+
}): UserProfileExport;
|
|
875
|
+
/** 解析并校验导入内容(FR-19.7)。含凭据是**拒绝**而不是忽略 @experimental */
|
|
876
|
+
declare function parseUserProfileExport(raw: unknown): UserProfileExport;
|
|
877
|
+
/** 导入前给用户看的差异(FR-19.7):新增哪些、覆盖哪些 @experimental */
|
|
878
|
+
declare function diffUserProfile(current: UserProfile, incoming: UserProfileExport): {
|
|
879
|
+
added: readonly UserProfileEntry[];
|
|
880
|
+
updated: readonly UserProfileEntry[];
|
|
881
|
+
};
|
|
882
|
+
/** 确认后落库:同 id 覆盖,其余保留;不触碰模型配置与凭据 @experimental */
|
|
883
|
+
declare function applyUserProfileImport(current: UserProfile, incoming: UserProfileExport, options?: {
|
|
884
|
+
now?: () => number;
|
|
885
|
+
}): UserProfile;
|
|
644
886
|
//#endregion
|
|
645
887
|
//#region src/artifacts/fsArtifactStore.d.ts
|
|
646
888
|
/**
|
|
@@ -974,12 +1216,13 @@ interface AgentLoopDeps {
|
|
|
974
1216
|
userId: string;
|
|
975
1217
|
};
|
|
976
1218
|
/**
|
|
977
|
-
*
|
|
978
|
-
* 与 `longTerm`
|
|
979
|
-
*
|
|
1219
|
+
* 用户画像(FR-19.2/19.4);**不注入即关闭**,关闭时既不记录也不注入。
|
|
1220
|
+
* 与 `longTerm` 分开:后者存的是技能使用统计,本项存的是用户行为与对其的推断,
|
|
1221
|
+
* 两者的隐私含义不同(FR-19.6)。
|
|
980
1222
|
*/
|
|
981
|
-
|
|
1223
|
+
userProfile?: {
|
|
982
1224
|
userId: string;
|
|
1225
|
+
limits?: UserProfileLimits;
|
|
983
1226
|
};
|
|
984
1227
|
/** 外部工具来源(mcp 插件等);specs 在 run 开始时并入每轮 tools */
|
|
985
1228
|
externalTools?: ExternalToolSource[];
|
|
@@ -1007,12 +1250,12 @@ declare class AgentLoop {
|
|
|
1007
1250
|
/**
|
|
1008
1251
|
* 取消进行中的 run:触发该 run 的 AbortController(与 totalTimeout 硬期限同一通道),
|
|
1009
1252
|
* run 以 cancelled(RUN_CANCELLED)终止;未找到(已终态或不属于本实例)返回 false。
|
|
1010
|
-
*
|
|
1253
|
+
* 取消在下一个中断点生效;LLM 调用与交互等待都监听同一个 signal,因此等表单时也能立即停。
|
|
1011
1254
|
*/
|
|
1012
1255
|
cancel(runId: string): boolean;
|
|
1013
1256
|
run(input: {
|
|
1014
1257
|
sessionId: string;
|
|
1015
|
-
userPrompt: string;
|
|
1258
|
+
userPrompt: string | readonly LlmContentPart[];
|
|
1016
1259
|
route: RouteResult;
|
|
1017
1260
|
runId?: string;
|
|
1018
1261
|
/** 多会话历史延续:插入 system 与本轮 user 之间(不含 system 消息) */
|
|
@@ -1025,6 +1268,33 @@ declare class AgentLoop {
|
|
|
1025
1268
|
resume(snapshot: RunSnapshot): Promise<RunResult>;
|
|
1026
1269
|
}
|
|
1027
1270
|
//#endregion
|
|
1271
|
+
//#region src/engine/limits.d.ts
|
|
1272
|
+
/**
|
|
1273
|
+
* Agent loop 的运行上限默认值。**全仓唯一来源**(S8)。
|
|
1274
|
+
*
|
|
1275
|
+
* 在 0.7.0 之前这三个数字在 `AgentLoop` 的构造与 ui-kit 的 `defaultRuntimeConfig()`
|
|
1276
|
+
* 里各写了一遍。两份值今天恰好相等,所以不出事;一旦其中一处被改,
|
|
1277
|
+
* 「恢复默认值」会恢复到 agent loop 根本不用的值——验收绿、行为错。
|
|
1278
|
+
* @stable
|
|
1279
|
+
*/
|
|
1280
|
+
declare const DEFAULT_LOOP_LIMITS: {
|
|
1281
|
+
readonly maxTurns: 10;
|
|
1282
|
+
readonly totalTimeoutMs: 120000;
|
|
1283
|
+
readonly toolTimeoutMs: 30000;
|
|
1284
|
+
};
|
|
1285
|
+
/**
|
|
1286
|
+
* 触顶类失败(`RUN_TIMEOUT` / `RUN_MAX_TURNS_EXCEEDED`)记进 `run.failed`
|
|
1287
|
+
* 轨迹事件 `data` 的结构化细节:程序化消费方据此判断是哪个上限、当时的生效值,
|
|
1288
|
+
* 而不必去解析英文 message。
|
|
1289
|
+
* @stable
|
|
1290
|
+
*/
|
|
1291
|
+
interface RunLimitErrorDetails {
|
|
1292
|
+
/** 触顶的上限字段名,与 `RuntimeLoopConfig` 的键一致 */
|
|
1293
|
+
limit: 'totalTimeoutMs' | 'toolTimeoutMs' | 'maxTurns';
|
|
1294
|
+
/** 触顶时该上限的生效值 */
|
|
1295
|
+
value: number;
|
|
1296
|
+
}
|
|
1297
|
+
//#endregion
|
|
1028
1298
|
//#region src/engine/runtime.d.ts
|
|
1029
1299
|
interface WebSkillRuntimeDeps {
|
|
1030
1300
|
fs: FileSystemProvider;
|
|
@@ -1050,9 +1320,10 @@ interface WebSkillRuntimeDeps {
|
|
|
1050
1320
|
enabled: true;
|
|
1051
1321
|
userId: string;
|
|
1052
1322
|
};
|
|
1053
|
-
/**
|
|
1054
|
-
|
|
1323
|
+
/** 用户画像(FR-19.2/19.4);不注入即关闭,关闭时既不记录也不注入 */
|
|
1324
|
+
userProfile?: {
|
|
1055
1325
|
userId: string;
|
|
1326
|
+
limits?: UserProfileLimits;
|
|
1056
1327
|
};
|
|
1057
1328
|
/** 外部工具来源(mcp 插件等) */
|
|
1058
1329
|
externalTools?: ExternalToolSource[];
|
|
@@ -1102,9 +1373,10 @@ declare class WebSkillRuntime {
|
|
|
1102
1373
|
maxHistoryMessages?: number;
|
|
1103
1374
|
}): RuntimeSessionHandle;
|
|
1104
1375
|
discover(): Promise<DiscoveryResult>;
|
|
1105
|
-
run(userPrompt: string, options?: {
|
|
1376
|
+
run(userPrompt: string | readonly LlmContentPart[], options?: {
|
|
1106
1377
|
sessionId?: string;
|
|
1107
1378
|
history?: LlmMessage[];
|
|
1379
|
+
skillName?: string;
|
|
1108
1380
|
}): Promise<RunResult>;
|
|
1109
1381
|
/** D3:列出 interrupted run(供 UI 展示"未完成任务");版本不受支持的项带 unsupported 标记 */
|
|
1110
1382
|
listInterruptedRuns(): Promise<RunSnapshotListEntry[]>;
|
|
@@ -1213,8 +1485,10 @@ declare class FsRunTraceStore implements RunTraceStore {
|
|
|
1213
1485
|
constructor(deps: {
|
|
1214
1486
|
root: string;
|
|
1215
1487
|
fs: FileSystemProvider;
|
|
1216
|
-
/**
|
|
1488
|
+
/** 正文落盘失败的降级处理;默认 console.warn,保持「写失败不阻断对话」的产品语义 */
|
|
1217
1489
|
onError?: (error: unknown, run: RuntimeRun) => void;
|
|
1490
|
+
/** 索引追加失败的降级处理;与 onError 分开是因为它可自愈(FR-21.7) */
|
|
1491
|
+
onIndexError?: (error: unknown, run: RuntimeRun) => void;
|
|
1218
1492
|
});
|
|
1219
1493
|
put(run: RuntimeRun): Promise<void>;
|
|
1220
1494
|
get(runId: string): Promise<RunTraceFile>;
|
|
@@ -1277,6 +1551,16 @@ interface SessionRecord<TMessage = unknown> extends SessionMeta {
|
|
|
1277
1551
|
schemaVersion: number;
|
|
1278
1552
|
messages: TMessage[];
|
|
1279
1553
|
}
|
|
1554
|
+
/**
|
|
1555
|
+
* `list()` 的返回页。空列表有两种成因,UI 必须能分辨:
|
|
1556
|
+
* 真的没有会话,和根目录压根不存在(多半是 chatRoot 配错)。
|
|
1557
|
+
*/
|
|
1558
|
+
interface SessionListPage extends Page<SessionMeta> {
|
|
1559
|
+
/** `'ok'` = 正常列举;`'missing-root'` = 根目录不存在 */
|
|
1560
|
+
readonly source: 'ok' | 'missing-root';
|
|
1561
|
+
/** 解析失败被跳过的文件名,供 UI 提示与定位 */
|
|
1562
|
+
readonly skipped: readonly string[];
|
|
1563
|
+
}
|
|
1280
1564
|
/**
|
|
1281
1565
|
* 会话持久化端口。消息载荷对 runtime 不透明——`ChatMessage` 是 chatbot 的 UI 类型,
|
|
1282
1566
|
* runtime 不能认识它,所以泛型默认 `unknown`(只读消费方直接用默认参数即可)。
|
|
@@ -1288,7 +1572,7 @@ interface SessionStore<TMessage = unknown> {
|
|
|
1288
1572
|
*/
|
|
1289
1573
|
list(options?: {
|
|
1290
1574
|
includeArchived?: boolean;
|
|
1291
|
-
} & PageQuery): Promise<
|
|
1575
|
+
} & PageQuery): Promise<SessionListPage>;
|
|
1292
1576
|
get(id: string): Promise<SessionRecord<TMessage> | undefined>;
|
|
1293
1577
|
/**
|
|
1294
1578
|
* 消息分页读。与 `list()` 同方向:无游标时给**最后**一页(最新的 `limit` 条),
|
|
@@ -1325,7 +1609,7 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
|
|
|
1325
1609
|
});
|
|
1326
1610
|
list(options?: {
|
|
1327
1611
|
includeArchived?: boolean;
|
|
1328
|
-
} & PageQuery): Promise<
|
|
1612
|
+
} & PageQuery): Promise<SessionListPage>;
|
|
1329
1613
|
/**
|
|
1330
1614
|
* 整文件读后切片。磁盘 I/O 复杂度没有改善(备案 D25),
|
|
1331
1615
|
* 但**跨出端口的记录数**已是常量——这正是分页对上层的意义。
|
|
@@ -1345,4 +1629,4 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
|
|
|
1345
1629
|
delete(id: string): Promise<void>;
|
|
1346
1630
|
}
|
|
1347
1631
|
//#endregion
|
|
1348
|
-
export {
|
|
1632
|
+
export { READ_SKILL_FILE_INPUT_SCHEMA as $, validateUiSpecEvent as $n, USER_PROFILE_NO_INVENTION_RULE as $t, FS_SESSION_PAGE_SIZE as A, networkPolicyLibSource as An, SessionRecord as At, HookRunnerOptions as B, readUserProfile as Bn, TerminalLifecycleData as Bt, DEFAULT_LOOP_LIMITS as C, fromVercelResult as Cn, SESSION_SCHEMA_VERSION as Ct, ExecuteLifecycleData as D, listSkillScripts as Dn, SerializingMemoryStore as Dt, EventBus as E, isUnsupportedRunSnapshot as En, ScriptExecutor as Et, FsSessionStore as F, parseBridgeRequest as Fn, SkillRouter as Ft, LifecycleEventInit as G, schemaSourceLabel as Gn, ToolResolution as Gt, IntegrityVerdict as H, renderUserProfileContext as Hn, TodoTraceEvent as Ht, FullDisclosureRouter as I, parseUserProfileExport as In, SkillScriptDescriptor as It, LifecycleListener as J, summarizeToolCalls as Jn, TraceEvent as Jt, LifecycleHook as K, schemaToForm as Kn, ToolResult as Kt, GoogleGenAiClient as L, partsToText as Ln, SkillScriptSchemaSource as Lt, FsMemoryStore as M, normalizeErrorCode as Mn, SkillFailureReport as Mt, FsRunSnapshotStore as N, normalizeToolContent as Nn, SkillIntegrityGuard as Nt, ExternalSkillProvider as O, mergeCatalogEntries as On, SessionListPage as Ot, FsRunTraceStore as P, normalizeToolError as Pn, SkillOutcomeReporter as Pt, ProgressiveRouter as Q, toVercelToolSpecs as Qn, USER_PROFILE_KEY as Qt, GoogleGenAiClientConfig as R, readBehaviorRecords as Rn, SkillStateGuard as Rt, CapabilityMode as S, formatSkillScriptManifest as Sn, RuntimeSessionHandle as St, EMPTY_USER_PROFILE as T, isNetworkAllowed as Tn, ScriptExecutionContext as Tt, InteractLifecycleData as U, resolveToolName as Un, ToolContent as Ut, InstalledSkillManifest as V, refineUserProfile as Vn, TextualToolContent as Vt, LifecycleEvent as W, sampleBehaviorRecords as Wn, ToolDefinition as Wt, OpenAiCompatibleClient as X, toLlmToolSpec as Xn, TraceRecorder as Xt, NetworkPolicy as Y, textParts as Yn, TraceEventType as Yt, OpenAiCompatibleClientConfig as Z, toRecordDigests as Zn, USER_PROFILE_EXPORT_VERSION as Zt, BridgeCapabilities as _, diffUserProfile as _n, RunTraceStore as _t, ActivateLifecycleData as a, UserProfileExport as an, RouteLifecycleData as at, BridgeResponse as b, extractTodoTraceEvents as bn, RuntimeRun as bt, AgentLoopDeps as c, WebSkillApi as cn, RunResult as ct, ApprovalDecision as d, appendBehaviorRecords as dn, RunSnapshotStore as dt, USER_PROFILE_PROMPT_HEADER as en, validateUiSpecNode as er, READ_SKILL_FILE_TOOL as et, ApprovalScope as f, applyUserProfileImport as fn, RunTerminationReason as ft, BehaviorScene as g, createWebSkillApi as gn, RunTraceMetrics as gt, BehaviorRecordKind as h, createScriptContext as hn, RunTraceFilter as ht, ASK_USER_TOOL_NAME as i, UserProfileEntry as in, RefineUserProfileInput as it, FsArtifactStore as j, networkUrlHost as jn, SessionStore as jt, ExternalToolSource as k, mergeProfileEntries as kn, SessionMeta as kt, AnthropicClient as l, WebSkillRuntime as ln, RunSnapshot as lt, BehaviorRecord as m, buildRenderResult as mn, RunTraceFile as mt, ASK_USER_INPUT_SCHEMA as n, UnsupportedRunSnapshot as nn, RUN_SNAPSHOT_SCHEMA_VERSION as nt, AgentLoop as o, UserProfileLimits as on, RouteResult as ot, BEHAVIOR_RECORDS_KEY as p, bridgeError as pn, RunToolCall as pt, LifecycleHookContext as q, scriptToolName as qn, TraceClock as qt, ASK_USER_TOOL as r, UserProfile as rn, RUN_TRACE_SCHEMA_VERSION as rt, AgentLoopConfig as s, VercelToolSpec as sn, RunLimitErrorDetails as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, USER_PROFILE_REFINE_PROMPT as tn, READ_SKILL_FILE_TOOL_NAME as tt, AnthropicClientConfig as u, WebSkillRuntimeDeps as un, RunSnapshotListEntry as ut, BridgeCapability as v, exportUserProfile as vn, RunTraceSummary as vt, DEFAULT_USER_PROFILE_LIMITS as w, fromVercelStreamPart as wn, SchemaInferer as wt, CapabilityApproval as x, extractUiSpecEvents as xn, RuntimeSession as xt, BridgeRequest as y, extractChartSpec as yn, RuntimePhase as yt, HookRunner as z, readProfileEntries as zn, SkillSuccessReport as zt };
|