@webskill/sdk 0.5.0 → 0.6.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.
Files changed (35) hide show
  1. package/dist/agent.d.ts +2 -2
  2. package/dist/agent.js +57 -15
  3. package/dist/browser.d.ts +101 -5
  4. package/dist/browser.js +421 -11
  5. package/dist/{catalogComponents-DV7cPpUm-C77AEEx9.js → catalogComponents-Dr5dFMAb-Dacibl1e.js} +126 -44
  6. package/dist/{dist-bewtXYlO.js → dist-DnYG2-eY.js} +53 -14
  7. package/dist/{dist-6C03DShK.js → dist-DusANsrn.js} +981 -185
  8. package/dist/{env--jJB-TSX-04klhTYi.js → env-8cY40DXB-CGnEVZby.js} +7 -6
  9. package/dist/{env-BPUBZCwJ-4jat_SVG.d.ts → env-AK3cSMEA-Dli6QU5E.d.ts} +4 -3
  10. package/dist/governance.d.ts +3 -3
  11. package/dist/governance.js +1 -1
  12. package/dist/{index-Bsqg4ftU.d.ts → index-BMocOEi0.d.ts} +13 -7
  13. package/dist/{index-D_7ZZjkl.d.ts → index-BuTpBMzr.d.ts} +69 -6
  14. package/dist/{index-vBz_FC9w.d.ts → index-C-KFAZoF.d.ts} +298 -52
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +3 -3
  17. package/dist/mcp.d.ts +39 -8
  18. package/dist/mcp.js +53 -19
  19. package/dist/{memoryArtifactStore-BtOeB_hm-tj3fC5ip.js → memoryArtifactStore-52Zn9npI-BMPYwvoy.js} +10 -2
  20. package/dist/node.d.ts +4 -4
  21. package/dist/node.js +9 -2
  22. package/dist/{openUiLibrary-W3Ce896k-ClFTRZFs.js → openUiLibrary-Bdrji9qK-DzAxRlTY.js} +3 -3
  23. package/dist/{skillVersionStore-BzLbzFOL-CxwIewHJ.d.ts → skillVersionStore-BzLbzFOL-CxdAFWO2.d.ts} +1 -1
  24. package/dist/{testing-DDCJWvgA.js → testing-CYTFqkDm.js} +1 -1
  25. package/dist/testing.d.ts +2 -2
  26. package/dist/testing.js +3 -3
  27. package/dist/{types-D_hoCri8-BnNPiZCi.d.ts → types-4pg-qp_I-Gq63X8Oa.d.ts} +33 -8
  28. package/dist/ui-react.d.ts +2 -2
  29. package/dist/ui-react.js +66 -23
  30. package/dist/ui-vue.d.ts +1 -1
  31. package/dist/ui-vue.js +13 -8
  32. package/dist/ui.d.ts +3 -3
  33. package/dist/ui.js +2 -2
  34. package/dist/{webskillLitCatalog-_mugzRHx-DiuJpCuf.js → webskillLitCatalog-_mugzRHx-B_54vxum.js} +1 -1
  35. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { $ as SkillDiscovery, B as PageQuery, C as UiSpecEvent, E as UiSurfaceActionRequest, I as JsonSchema, M as DiscoveryResult, P as FileSystemProvider, Q as SkillCatalogEntry, S as UiSpecDrafts, Z as SkillCatalog, _ as MemoryStore, at as SkillManifest, b as UiBridge, d as LlmContentPart, et as SkillDocument, f as LlmMessage, g as LlmToolSpec, gt as ValidationReport, i as FormField, l as LlmClient, m as LlmStreamEvent, mt as UiSpecNode, n as ArtifactStore, o as InteractionPolicy, p as LlmResponse, r as ChartSpec, s as InteractionRequest, t as Artifact, tt as SkillInstallSource, u as LlmCompleteInput, v as RenderBlock, y as RenderResultRequest, yt as WebSkillErrorCode, z as Page } from "./types-D_hoCri8-BnNPiZCi.js";
1
+ import { $ as SkillDiscovery, B as PageQuery, C as UiSpecEvent, E as UiSurfaceActionRequest, I as JsonSchema, M as DiscoveryResult, P as FileSystemProvider, Q as SkillCatalogEntry, S as UiSpecDrafts, Z as SkillCatalog, _ as MemoryStore, at as SkillManifest, b as UiBridge, d as LlmContentPart, et as SkillDocument, f as LlmMessage, g as LlmToolSpec, gt as ValidationReport, i as FormField, l as LlmClient, m as LlmStreamEvent, mt as UiSpecNode, n as ArtifactStore, o as InteractionPolicy, p as LlmResponse, r as ChartSpec, s as InteractionRequest, t as Artifact, tt as SkillInstallSource, u as LlmCompleteInput, v as RenderBlock, y as RenderResultRequest, yt as WebSkillErrorCode, z as Page } from "./types-4pg-qp_I-Gq63X8Oa.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: Array<{
136
- type: 'text' | 'json';
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): ToolResult['content'];
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
- /** 跨会话表单填写值的字段数上限(默认 100,超出裁最旧) */
369
- formValueLimit?: number;
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 {
@@ -424,7 +493,9 @@ interface RuntimeSession {
424
493
  id: string;
425
494
  createdAt: string;
426
495
  }
427
- type RunTerminationReason = 'final-answer' | 'max-turns' | 'timeout' | 'llm-error' | 'interaction-timeout' | 'user-cancelled' | 'hook-error';
496
+ type RunTerminationReason = 'final-answer' | 'max-turns' | 'timeout' | 'llm-error' | 'interaction-timeout' | 'user-cancelled' | 'hook-error' |
497
+ /** 反复调用不存在的工具,提前止损(0.6.0 FR-18.3) */
498
+ 'tool-resolution-exhausted';
428
499
  interface RuntimeRun {
429
500
  id: string;
430
501
  sessionId: string;
@@ -448,7 +519,7 @@ interface RunResult {
448
519
  }
449
520
  /** createSession 返回的会话句柄:跨 run 延续消息历史 */
450
521
  interface RuntimeSessionHandle extends RuntimeSession {
451
- run(prompt: string): Promise<RunResult>;
522
+ run(prompt: string | readonly LlmContentPart[]): Promise<RunResult>;
452
523
  }
453
524
  //#endregion
454
525
  //#region src/interaction/renderResult.d.ts
@@ -476,11 +547,8 @@ declare function extractUiSpecEvents(data: unknown): UiSpecEvent[];
476
547
  * JsonSchema → 表单模型:按 properties 生成字段,required 标记必填;
477
548
  * providedArgs 已有的值作为 defaultValue 预填(表单只为补齐缺失项服务)。
478
549
  * type 映射:string→text、number/integer→number、boolean→boolean、enum→select、其余→textarea。
479
- * 传入 skillName 时给每个字段带上跨会话稳定的 `fieldKey`(FR-5.6)。
480
550
  */
481
- declare function schemaToForm(schema: JsonSchema, providedArgs?: Record<string, unknown>, options?: {
482
- skillName?: string;
483
- }): FormField[];
551
+ declare function schemaToForm(schema: JsonSchema, providedArgs?: Record<string, unknown>): FormField[];
484
552
  //#endregion
485
553
  //#region src/facade/types.d.ts
486
554
  /**
@@ -612,35 +680,198 @@ declare class SerializingMemoryStore implements MemoryStore {
612
680
  transaction<T>(scope: string, fn: (inner: MemoryStore) => Promise<T>): Promise<T>;
613
681
  }
614
682
  //#endregion
615
- //#region src/memory/formValues.d.ts
616
- /** 跨会话表单填写值在 `user:{userId}` scope 下的 key(FR-5.7) @experimental */
617
- declare const FORM_VALUES_KEY = "formValues";
683
+ //#region src/profile/types.d.ts
618
684
  /**
619
- * 跨会话稳定的字段标识(FR-5.6)。必须带技能名:
620
- * 只有字段名时,两个技能各自的 `email` 会互相串号。
685
+ * 用户画像(0.6.0 需求 19)。行为记录是原始事实,画像是模型提炼出的结论——
686
+ * 只有后者会进入后续对话的上下文(FR-19.3)。
687
+ */
688
+ /** @experimental */
689
+ type BehaviorRecordKind = 'question' | 'choice' | 'text-input' | 'stated-preference';
690
+ /**
691
+ * 记录发生时的场景。没有场景的记录对提炼没有价值:
692
+ * 「选了 A」不带候选集与字段语义,模型无从判断这代表什么偏好(FR-19.2)。
621
693
  * @experimental
622
694
  */
623
- declare function formFieldKey(skillName: string, fieldName: string): string;
624
- /** 某个字段最近一次的填写值 @experimental */
625
- interface FormValueRecord {
626
- value: unknown;
627
- /** 写入时刻(epoch ms);超上限裁剪时按它排序 */
628
- ts: number;
629
- }
630
- /** fieldKey → 最近一次填写值(**只留最近一次**,不是历史序列) @experimental */
631
- type FormValueMap = Record<string, FormValueRecord>;
632
- /** memory 里的原始值形状不受控(宿主可能手改文件),逐条过滤而不是整体信任 @experimental */
633
- declare function readFormValues(raw: unknown): FormValueMap;
634
- /** 合并本次提交并按上限裁剪最旧(FR-5.12) @experimental */
635
- declare function putFormValues(current: FormValueMap, updates: FormValueMap, limit: number): FormValueMap;
636
- /** 清除单个字段;不传 fieldKey 即全部清除(FR-5.11) @experimental */
637
- declare function clearFormValues(current: FormValueMap, fieldKey?: string): FormValueMap;
695
+ interface BehaviorScene {
696
+ readonly sessionId: string;
697
+ readonly skillName?: string;
698
+ readonly interactionId?: string;
699
+ readonly fieldName?: string;
700
+ /** 字段语义(label / description),供提炼时理解字段含义 */
701
+ readonly fieldSemantics?: string;
702
+ /** 下拉候选集:理解「用户在什么范围里选了什么」 */
703
+ readonly options?: readonly string[];
704
+ }
705
+ /** @experimental */
706
+ interface BehaviorRecord {
707
+ readonly id: string;
708
+ readonly kind: BehaviorRecordKind;
709
+ /** epoch ms */
710
+ readonly at: number;
711
+ readonly scene: BehaviorScene;
712
+ readonly value: string;
713
+ /** 用户是否显式确认过(采样维度之一) */
714
+ readonly confirmed?: boolean;
715
+ }
716
+ /** 一条自然语言结论。条目化而不是整段文本,才谈得上逐条查看与删除(FR-19.3) @experimental */
717
+ interface UserProfileEntry {
718
+ readonly id: string;
719
+ readonly text: string;
720
+ readonly confidence: 'high' | 'low';
721
+ /** epoch ms */
722
+ readonly updatedAt: number;
723
+ readonly sourceKinds: readonly BehaviorRecordKind[];
724
+ }
725
+ /** @experimental */
726
+ interface UserProfile {
727
+ readonly version: 1;
728
+ readonly entries: readonly UserProfileEntry[];
729
+ /** epoch ms;从未提炼过时为 0 */
730
+ readonly refinedAt: number;
731
+ }
732
+ /** @experimental */
733
+ interface UserProfileLimits {
734
+ /** 行为记录容量上限,超出淘汰最旧 */
735
+ recordLimit: number;
736
+ /** 单条 value 的字符上限(用户输入需保留语义,故远大于感知截断) */
737
+ valueMaxChars: number;
738
+ /** 送入一次提炼的记录条数上限 */
739
+ sampleLimit: number;
740
+ /** 画像注入系统提示的字节上限 */
741
+ injectMaxBytes: number;
742
+ /** 画像条目数上限,超出按 updatedAt 淘汰 */
743
+ entryLimit: number;
744
+ }
745
+ /** @experimental */
746
+ declare const DEFAULT_USER_PROFILE_LIMITS: UserProfileLimits;
747
+ /** @experimental */
748
+ declare const EMPTY_USER_PROFILE: UserProfile;
749
+ //#endregion
750
+ //#region src/profile/records.d.ts
751
+ /** `user:{id}` scope 下的行为记录 key @experimental */
752
+ declare const BEHAVIOR_RECORDS_KEY = "behaviorRecords";
753
+ /** `user:{id}` scope 下的画像 key @experimental */
754
+ declare const USER_PROFILE_KEY = "userProfile";
755
+ /** 存储里的形状不受控(宿主可能手改文件),逐条筛而不是整体信任 @experimental */
756
+ declare function readBehaviorRecords(raw: unknown): BehaviorRecord[];
638
757
  /**
639
- * 宿主侧的清除入口(FR-5.11):设置面板的「清除填写历史」直接调它,
640
- * 不必自己知道 scope 与 key 的约定。
758
+ * 追加并按容量淘汰最旧(FR-19.2)。`value` 同时截断:
759
+ * 一条被粘贴进来的长文本能把整个 JSON 撑爆,而提炼只需要语义。
641
760
  * @experimental
642
761
  */
643
- declare function clearStoredFormValues(memory: MemoryStore, userId: string, fieldKey?: string): Promise<void>;
762
+ declare function appendBehaviorRecords(current: readonly BehaviorRecord[], incoming: readonly BehaviorRecord[], limits?: UserProfileLimits): BehaviorRecord[];
763
+ /** @experimental */
764
+ declare function readUserProfile(raw: unknown): UserProfile;
765
+ /** @experimental */
766
+ declare function readProfileEntries(raw: unknown): UserProfileEntry[];
767
+ /**
768
+ * 合并提炼结果:同 id 更新,新 id 追加,超上限按 `updatedAt` 淘汰最旧(设计 09 §1.4)。
769
+ * @experimental
770
+ */
771
+ declare function mergeProfileEntries(current: UserProfile, incoming: readonly UserProfileEntry[], options: {
772
+ now: number;
773
+ limits?: UserProfileLimits;
774
+ }): UserProfile;
775
+ /**
776
+ * 提炼采样(FR-19.3):最近的 + 高频的 + 被用户显式确认过的,去重后截到上限。
777
+ * 三个维度缺一不可——只取最近会让长期偏好被一次突发淹没,只取高频则学不到新变化。
778
+ * @experimental
779
+ */
780
+ declare function sampleBehaviorRecords(records: readonly BehaviorRecord[], limits?: UserProfileLimits): BehaviorRecord[];
781
+ //#endregion
782
+ //#region src/profile/refine.d.ts
783
+ /**
784
+ * 提炼提示词。要求返回结论列表而不是散文:条目化是「可见、可编辑、可删除」的前提(FR-19.3)。
785
+ * `id` 由模型给出稳定 slug,才能在下一次提炼时更新同一条而不是无限追加。
786
+ */
787
+ 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\": []}.";
788
+ /** @experimental */
789
+ interface RefineUserProfileInput {
790
+ llm: LlmClient;
791
+ records: readonly BehaviorRecord[];
792
+ /** 当前画像;提炼结果与它合并(同 id 更新) */
793
+ profile?: UserProfile;
794
+ model?: string;
795
+ limits?: UserProfileLimits;
796
+ /** epoch ms 时钟,默认 `Date.now` */
797
+ now?: () => number;
798
+ signal?: AbortSignal;
799
+ }
800
+ /** 送模型的记录形态:只保留提炼用得上的字段,会话 id 之类的内部标识不外发 */
801
+ interface RecordDigest {
802
+ kind: string;
803
+ at: string;
804
+ value: string;
805
+ skill?: string;
806
+ field?: string;
807
+ meaning?: string;
808
+ options?: readonly string[];
809
+ confirmed?: boolean;
810
+ }
811
+ /** 采样后的记录 → 送模型的摘要。导出供测试与宿主复核实际请求内容(AC-19.6) @experimental */
812
+ declare function toRecordDigests(records: readonly BehaviorRecord[]): RecordDigest[];
813
+ /**
814
+ * 一次提炼(FR-19.3)。调用方负责持久化返回值;本函数不碰存储,
815
+ * 也不吞异常——「失败不影响会话结束」由调用点的 fire-and-forget 保证,
816
+ * 在这里吞掉会让手动提炼入口无法报错。
817
+ * @experimental
818
+ */
819
+ declare function refineUserProfile(input: RefineUserProfileInput): Promise<UserProfile>;
820
+ //#endregion
821
+ //#region src/profile/inject.d.ts
822
+ /** 注入段的标题。宿主/测试要判断「有没有注入画像」时对它取子串,不要自己再拼一份 @experimental */
823
+ declare const USER_PROFILE_PROMPT_HEADER = "## About this user (inferred from past behavior; may be outdated)";
824
+ /**
825
+ * 无画像时也要下发的约束(AC-19.11):没有依据就把字段留空,
826
+ * 不写这一句时模型会把「建议值」当成必填项去编。
827
+ * @experimental
828
+ */
829
+ 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.";
830
+ /**
831
+ * 画像 → 系统提示片段,按 confidence + updatedAt 优先级排序后逐条累加,
832
+ * 超出字节上限的部分丢弃并标注(FR-19.4 / AC-19.9)。
833
+ * 空画像返回空串:只有标题的空段落白占 token,还会诱导模型编造。
834
+ * @experimental
835
+ */
836
+ declare function renderUserProfileContext(profile?: UserProfile, maxBytes?: number): string;
837
+ //#endregion
838
+ //#region src/profile/transfer.d.ts
839
+ /** 导出文件的版本;导入时逐字校验,不做向前兼容猜测 @experimental */
840
+ declare const USER_PROFILE_EXPORT_VERSION = 1;
841
+ /**
842
+ * 导出物(FR-19.7)。**结构上只有 entries**:原始行为记录与凭据没有容身之处,
843
+ * 这是「导出不泄露」的类型层保证,运行时另有一道断言兜底。
844
+ * @experimental
845
+ */
846
+ interface UserProfileExport {
847
+ readonly kind: 'webskill.user-profile';
848
+ readonly version: typeof USER_PROFILE_EXPORT_VERSION;
849
+ /** 来源标识(站点 origin),用于导入时说明这份画像来自哪里 */
850
+ readonly origin: string;
851
+ /** epoch ms */
852
+ readonly exportedAt: number;
853
+ readonly entries: readonly UserProfileEntry[];
854
+ }
855
+ /**
856
+ * 导出画像(FR-19.7)。`excludeIds` 来自导出前的审阅界面:用户勾掉的条目不进文件。
857
+ * @experimental
858
+ */
859
+ declare function exportUserProfile(profile: UserProfile, options: {
860
+ origin: string;
861
+ excludeIds?: readonly string[];
862
+ now?: () => number;
863
+ }): UserProfileExport;
864
+ /** 解析并校验导入内容(FR-19.7)。含凭据是**拒绝**而不是忽略 @experimental */
865
+ declare function parseUserProfileExport(raw: unknown): UserProfileExport;
866
+ /** 导入前给用户看的差异(FR-19.7):新增哪些、覆盖哪些 @experimental */
867
+ declare function diffUserProfile(current: UserProfile, incoming: UserProfileExport): {
868
+ added: readonly UserProfileEntry[];
869
+ updated: readonly UserProfileEntry[];
870
+ };
871
+ /** 确认后落库:同 id 覆盖,其余保留;不触碰模型配置与凭据 @experimental */
872
+ declare function applyUserProfileImport(current: UserProfile, incoming: UserProfileExport, options?: {
873
+ now?: () => number;
874
+ }): UserProfile;
644
875
  //#endregion
645
876
  //#region src/artifacts/fsArtifactStore.d.ts
646
877
  /**
@@ -974,12 +1205,13 @@ interface AgentLoopDeps {
974
1205
  userId: string;
975
1206
  };
976
1207
  /**
977
- * 跨会话表单自动填充(FR-5.7);**不注入即关闭**,关闭时不查也不写。
978
- * 与 `longTerm` 分开:后者存的是技能使用统计,本项存的是用户亲手填的内容,
979
- * 两者的开关语义不同(AC-5.7)。
1208
+ * 用户画像(FR-19.2/19.4);**不注入即关闭**,关闭时既不记录也不注入。
1209
+ * 与 `longTerm` 分开:后者存的是技能使用统计,本项存的是用户行为与对其的推断,
1210
+ * 两者的隐私含义不同(FR-19.6)。
980
1211
  */
981
- formAutofill?: {
1212
+ userProfile?: {
982
1213
  userId: string;
1214
+ limits?: UserProfileLimits;
983
1215
  };
984
1216
  /** 外部工具来源(mcp 插件等);specs 在 run 开始时并入每轮 tools */
985
1217
  externalTools?: ExternalToolSource[];
@@ -1007,12 +1239,12 @@ declare class AgentLoop {
1007
1239
  /**
1008
1240
  * 取消进行中的 run:触发该 run 的 AbortController(与 totalTimeout 硬期限同一通道),
1009
1241
  * run 以 cancelled(RUN_CANCELLED)终止;未找到(已终态或不属于本实例)返回 false。
1010
- * 取消在下一个中断点生效(LLM complete/stream 调用;交互等待不强制中断)。
1242
+ * 取消在下一个中断点生效;LLM 调用与交互等待都监听同一个 signal,因此等表单时也能立即停。
1011
1243
  */
1012
1244
  cancel(runId: string): boolean;
1013
1245
  run(input: {
1014
1246
  sessionId: string;
1015
- userPrompt: string;
1247
+ userPrompt: string | readonly LlmContentPart[];
1016
1248
  route: RouteResult;
1017
1249
  runId?: string;
1018
1250
  /** 多会话历史延续:插入 system 与本轮 user 之间(不含 system 消息) */
@@ -1050,9 +1282,10 @@ interface WebSkillRuntimeDeps {
1050
1282
  enabled: true;
1051
1283
  userId: string;
1052
1284
  };
1053
- /** 跨会话表单自动填充(FR-5.7);不注入即关闭,关闭时不查也不写 */
1054
- formAutofill?: {
1285
+ /** 用户画像(FR-19.2/19.4);不注入即关闭,关闭时既不记录也不注入 */
1286
+ userProfile?: {
1055
1287
  userId: string;
1288
+ limits?: UserProfileLimits;
1056
1289
  };
1057
1290
  /** 外部工具来源(mcp 插件等) */
1058
1291
  externalTools?: ExternalToolSource[];
@@ -1102,9 +1335,10 @@ declare class WebSkillRuntime {
1102
1335
  maxHistoryMessages?: number;
1103
1336
  }): RuntimeSessionHandle;
1104
1337
  discover(): Promise<DiscoveryResult>;
1105
- run(userPrompt: string, options?: {
1338
+ run(userPrompt: string | readonly LlmContentPart[], options?: {
1106
1339
  sessionId?: string;
1107
1340
  history?: LlmMessage[];
1341
+ skillName?: string;
1108
1342
  }): Promise<RunResult>;
1109
1343
  /** D3:列出 interrupted run(供 UI 展示"未完成任务");版本不受支持的项带 unsupported 标记 */
1110
1344
  listInterruptedRuns(): Promise<RunSnapshotListEntry[]>;
@@ -1213,8 +1447,10 @@ declare class FsRunTraceStore implements RunTraceStore {
1213
1447
  constructor(deps: {
1214
1448
  root: string;
1215
1449
  fs: FileSystemProvider;
1216
- /** 落盘失败的降级处理;默认 console.warn,保持「写失败不阻断对话」的产品语义 */
1450
+ /** 正文落盘失败的降级处理;默认 console.warn,保持「写失败不阻断对话」的产品语义 */
1217
1451
  onError?: (error: unknown, run: RuntimeRun) => void;
1452
+ /** 索引追加失败的降级处理;与 onError 分开是因为它可自愈(FR-21.7) */
1453
+ onIndexError?: (error: unknown, run: RuntimeRun) => void;
1218
1454
  });
1219
1455
  put(run: RuntimeRun): Promise<void>;
1220
1456
  get(runId: string): Promise<RunTraceFile>;
@@ -1277,6 +1513,16 @@ interface SessionRecord<TMessage = unknown> extends SessionMeta {
1277
1513
  schemaVersion: number;
1278
1514
  messages: TMessage[];
1279
1515
  }
1516
+ /**
1517
+ * `list()` 的返回页。空列表有两种成因,UI 必须能分辨:
1518
+ * 真的没有会话,和根目录压根不存在(多半是 chatRoot 配错)。
1519
+ */
1520
+ interface SessionListPage extends Page<SessionMeta> {
1521
+ /** `'ok'` = 正常列举;`'missing-root'` = 根目录不存在 */
1522
+ readonly source: 'ok' | 'missing-root';
1523
+ /** 解析失败被跳过的文件名,供 UI 提示与定位 */
1524
+ readonly skipped: readonly string[];
1525
+ }
1280
1526
  /**
1281
1527
  * 会话持久化端口。消息载荷对 runtime 不透明——`ChatMessage` 是 chatbot 的 UI 类型,
1282
1528
  * runtime 不能认识它,所以泛型默认 `unknown`(只读消费方直接用默认参数即可)。
@@ -1288,7 +1534,7 @@ interface SessionStore<TMessage = unknown> {
1288
1534
  */
1289
1535
  list(options?: {
1290
1536
  includeArchived?: boolean;
1291
- } & PageQuery): Promise<Page<SessionMeta>>;
1537
+ } & PageQuery): Promise<SessionListPage>;
1292
1538
  get(id: string): Promise<SessionRecord<TMessage> | undefined>;
1293
1539
  /**
1294
1540
  * 消息分页读。与 `list()` 同方向:无游标时给**最后**一页(最新的 `limit` 条),
@@ -1325,7 +1571,7 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
1325
1571
  });
1326
1572
  list(options?: {
1327
1573
  includeArchived?: boolean;
1328
- } & PageQuery): Promise<Page<SessionMeta>>;
1574
+ } & PageQuery): Promise<SessionListPage>;
1329
1575
  /**
1330
1576
  * 整文件读后切片。磁盘 I/O 复杂度没有改善(备案 D25),
1331
1577
  * 但**跨出端口的记录数**已是常量——这正是分页对上层的意义。
@@ -1345,4 +1591,4 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
1345
1591
  delete(id: string): Promise<void>;
1346
1592
  }
1347
1593
  //#endregion
1348
- export { RouteLifecycleData as $, fromVercelResult as $t, FsSessionStore as A, TodoTraceEvent as At, LifecycleEventInit as B, WebSkillApi as Bt, FS_SESSION_PAGE_SIZE as C, SessionStore as Ct, FsMemoryStore as D, SkillRouter as Dt, FsArtifactStore as E, SkillOutcomeReporter as Et, HookRunnerOptions as F, TraceEvent as Ft, OpenAiCompatibleClient as G, clearFormValues as Gt, LifecycleHookContext as H, WebSkillRuntimeDeps as Ht, InstalledSkillManifest as I, TraceEventType as It, READ_SKILL_FILE_INPUT_SCHEMA as J, createWebSkillApi as Jt, OpenAiCompatibleClientConfig as K, clearStoredFormValues as Kt, IntegrityVerdict as L, TraceRecorder as Lt, GoogleGenAiClient as M, ToolResolution as Mt, GoogleGenAiClientConfig as N, ToolResult as Nt, FsRunSnapshotStore as O, SkillStateGuard as Ot, HookRunner as P, TraceClock as Pt, RUN_TRACE_SCHEMA_VERSION as Q, formFieldKey as Qt, InteractLifecycleData as R, UnsupportedRunSnapshot as Rt, FORM_VALUES_KEY as S, SessionRecord as St, FormValueRecord as T, SkillIntegrityGuard as Tt, LifecycleListener as U, bridgeError as Ut, LifecycleHook as V, WebSkillRuntime as Vt, NetworkPolicy as W, buildRenderResult as Wt, READ_SKILL_FILE_TOOL_NAME as X, extractTodoTraceEvents as Xt, READ_SKILL_FILE_TOOL as Y, extractChartSpec as Yt, RUN_SNAPSHOT_SCHEMA_VERSION as Z, extractUiSpecEvents as Zt, CapabilityMode as _, toLlmToolSpec as _n, SchemaInferer as _t, AgentLoop as a, networkUrlHost as an, RunTerminationReason as at, ExternalSkillProvider as b, validateUiSpecNode as bn, SerializingMemoryStore as bt, AnthropicClient as c, normalizeToolError as cn, RunTraceFilter as ct, ApprovalScope as d, putFormValues as dn, RunTraceSummary as dt, fromVercelStreamPart as en, RouteResult as et, BridgeCapabilities as f, readFormValues as fn, RuntimePhase as ft, CapabilityApproval as g, textParts as gn, SESSION_SCHEMA_VERSION as gt, BridgeResponse as h, summarizeToolCalls as hn, RuntimeSessionHandle as ht, ActivateLifecycleData as i, networkPolicyLibSource as in, RunSnapshotStore as it, FullDisclosureRouter as j, ToolDefinition as jt, FsRunTraceStore as k, TerminalLifecycleData as kt, AnthropicClientConfig as l, parseBridgeRequest as ln, RunTraceMetrics as lt, BridgeRequest as m, schemaToForm as mn, RuntimeSession as mt, ASK_USER_TOOL as n, isUnsupportedRunSnapshot as nn, RunSnapshot as nt, AgentLoopConfig as o, normalizeErrorCode as on, RunToolCall as ot, BridgeCapability as p, resolveToolName as pn, RuntimeRun as pt, ProgressiveRouter as q, createScriptContext as qt, ASK_USER_TOOL_NAME as r, mergeCatalogEntries as rn, RunSnapshotListEntry as rt, AgentLoopDeps as s, normalizeToolContent as sn, RunTraceFile as st, ASK_USER_INPUT_SCHEMA as t, isNetworkAllowed as tn, RunResult as tt, ApprovalDecision as u, partsToText as un, RunTraceStore as ut, EventBus as v, toVercelToolSpecs as vn, ScriptExecutionContext as vt, FormValueMap as w, SkillFailureReport as wt, ExternalToolSource as x, SessionMeta as xt, ExecuteLifecycleData as y, validateUiSpecEvent as yn, ScriptExecutor as yt, LifecycleEvent as z, VercelToolSpec as zt };
1594
+ export { READ_SKILL_FILE_TOOL as $, UnsupportedRunSnapshot as $t, FsArtifactStore as A, normalizeToolContent as An, SkillFailureReport as At, InstalledSkillManifest as B, resolveToolName as Bn, ToolContent as Bt, DEFAULT_USER_PROFILE_LIMITS as C, isUnsupportedRunSnapshot as Cn, ScriptExecutionContext as Ct, ExternalSkillProvider as D, networkPolicyLibSource as Dn, SessionMeta as Dt, ExecuteLifecycleData as E, mergeProfileEntries as En, SessionListPage as Et, FullDisclosureRouter as F, readBehaviorRecords as Fn, SkillScriptSchemaSource as Ft, LifecycleHook as G, summarizeToolCalls as Gn, TraceEvent as Gt, InteractLifecycleData as H, schemaSourceLabel as Hn, ToolResolution as Ht, GoogleGenAiClient as I, readProfileEntries as In, SkillStateGuard as It, NetworkPolicy as J, toRecordDigests as Jn, USER_PROFILE_EXPORT_VERSION as Jt, LifecycleHookContext as K, textParts as Kn, TraceEventType as Kt, GoogleGenAiClientConfig as L, readUserProfile as Ln, TerminalLifecycleData as Lt, FsRunSnapshotStore as M, parseBridgeRequest as Mn, SkillOutcomeReporter as Mt, FsRunTraceStore as N, parseUserProfileExport as Nn, SkillRouter as Nt, ExternalToolSource as O, networkUrlHost as On, SessionRecord as Ot, FsSessionStore as P, partsToText as Pn, SkillScriptDescriptor as Pt, READ_SKILL_FILE_INPUT_SCHEMA as Q, USER_PROFILE_REFINE_PROMPT as Qt, HookRunner as R, refineUserProfile as Rn, TextualToolContent as Rt, CapabilityMode as S, isNetworkAllowed as Sn, SchemaInferer as St, EventBus as T, mergeCatalogEntries as Tn, SerializingMemoryStore as Tt, LifecycleEvent as U, schemaToForm as Un, ToolResult as Ut, IntegrityVerdict as V, sampleBehaviorRecords as Vn, ToolDefinition as Vt, LifecycleEventInit as W, scriptToolName as Wn, TraceClock as Wt, OpenAiCompatibleClientConfig as X, validateUiSpecEvent as Xn, USER_PROFILE_NO_INVENTION_RULE as Xt, OpenAiCompatibleClient as Y, toVercelToolSpecs as Yn, USER_PROFILE_KEY as Yt, ProgressiveRouter as Z, validateUiSpecNode as Zn, USER_PROFILE_PROMPT_HEADER as Zt, BridgeCapabilities as _, extractTodoTraceEvents as _n, RuntimePhase as _t, ActivateLifecycleData as a, WebSkillApi as an, RouteResult as at, BridgeResponse as b, fromVercelResult as bn, RuntimeSessionHandle as bt, AgentLoopDeps as c, appendBehaviorRecords as cn, RunSnapshotListEntry as ct, ApprovalDecision as d, buildRenderResult as dn, RunToolCall as dt, UserProfile as en, READ_SKILL_FILE_TOOL_NAME as et, ApprovalScope as f, createScriptContext as fn, RunTraceFile as ft, BehaviorScene as g, extractChartSpec as gn, RunTraceSummary as gt, BehaviorRecordKind as h, exportUserProfile as hn, RunTraceStore as ht, ASK_USER_TOOL_NAME as i, VercelToolSpec as in, RouteLifecycleData as it, FsMemoryStore as j, normalizeToolError as jn, SkillIntegrityGuard as jt, FS_SESSION_PAGE_SIZE as k, normalizeErrorCode as kn, SessionStore as kt, AnthropicClient as l, applyUserProfileImport as ln, RunSnapshotStore as lt, BehaviorRecord as m, diffUserProfile as mn, RunTraceMetrics as mt, ASK_USER_INPUT_SCHEMA as n, UserProfileExport as nn, RUN_TRACE_SCHEMA_VERSION as nt, AgentLoop as o, WebSkillRuntime as on, RunResult as ot, BEHAVIOR_RECORDS_KEY as p, createWebSkillApi as pn, RunTraceFilter as pt, LifecycleListener as q, toLlmToolSpec as qn, TraceRecorder as qt, ASK_USER_TOOL as r, UserProfileLimits as rn, RefineUserProfileInput as rt, AgentLoopConfig as s, WebSkillRuntimeDeps as sn, RunSnapshot as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, UserProfileEntry as tn, RUN_SNAPSHOT_SCHEMA_VERSION as tt, AnthropicClientConfig as u, bridgeError as un, RunTerminationReason as ut, BridgeCapability as v, extractUiSpecEvents as vn, RuntimeRun as vt, EMPTY_USER_PROFILE as w, listSkillScripts as wn, ScriptExecutor as wt, CapabilityApproval as x, fromVercelStreamPart as xn, SESSION_SCHEMA_VERSION as xt, BridgeRequest as y, formatSkillScriptManifest as yn, RuntimeSession as yt, HookRunnerOptions as z, renderUserProfileContext as zn, TodoTraceEvent as zt };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as SkillDiscovery, A as CryptoKeyLike, At as isValidSkillName, B as PageQuery, Bt as renderCatalogJson, C as UiSpecEvent, Ct as buildCatalog, D as UiSurfaceActionResponse, Dt as computeDigest, E as UiSurfaceActionRequest, Et as checkSkillRules, F as FsTrustedKeyStore, Ft as parseSkillMarkdown, G as SKILL_NAME_MAX_LENGTH, Gt as unzipWithLimits, H as SIGNATURE_SCHEMA_VERSION, Ht as resolveInsideRoot, I as JsonSchema, It as parseSkillPackManifest, J as SKILL_SIGNATURE_FILE, Jt as verifySkillSignature, K as SKILL_NAME_PATTERN, Kt as validateSkills, L as MANIFEST_EXCLUDED_FILES, Lt as readResponseWithLimit, M as DiscoveryResult, Mt as keyIdOf, N as FileStat, Nt as messageOf, O as ArchiveLimits, Ot as escapeXml, P as FileSystemProvider, Pt as normalizePath, Q as SkillCatalogEntry, R as MemoryFS, Rt as readSkillSignature, S as UiSpecDrafts, St as atomicWriteText, T as UiSpecSnapshot, Tt as checkDependencyCycles, U as SKILLS_LOCKFILE, Ut as signSkill, V as RemoteUrlPolicy, Vt as resolveArchiveLimits, W as SKILL_MANIFEST_FILE, Wt as signaturePayloadBytes, X as SignatureVerdict, Y as SignatureAuditSink, Yt as xmlRenderer, Z as SkillCatalog, _ as MemoryStore, _t as VerifyResult, a as InteractionOrigin, at as SkillManifest, b as UiBridge, bt as assertRemoteUrlAllowed, c as InteractionResponse, ct as SkillReader, d as LlmContentPart, dt as SkillsLockfile, et as SkillDocument, f as LlmMessage, ft as TrustedKey, g as LlmToolSpec, gt as ValidationReport, h as LlmToolCall, ht as UnsignedPolicy, i as FormField, it as SkillManagerPort, j as DEFAULT_ARCHIVE_LIMITS, jt as jsonRenderer, k as CatalogRenderer, kt as exportSkills, l as LlmClient, lt as SkillSignature, m as LlmStreamEvent, mt as UiSpecNode, n as ArtifactStore, nt as SkillIssue, o as InteractionPolicy, ot as SkillMetadata, p as LlmResponse, pt as TrustedKeyStore, q as SKILL_PACK_FILE, qt as verifyManifest, r as ChartSpec, rt as SkillLocation, s as InteractionRequest, st as SkillPackManifest, t as Artifact, tt as SkillInstallSource, u as LlmCompleteInput, ut as SkillSource, v as RenderBlock, vt as WebSkillError, w as UiSpecPatch, wt as buildManifest, x as UiSpecActionCapability, xt as assertSafePathSegment, y as RenderResultRequest, yt as WebSkillErrorCode, z as Page, zt as renderAvailableSkillsXml } from "./types-D_hoCri8-BnNPiZCi.js";
2
- import { $ as RouteLifecycleData, $t as fromVercelResult, A as FsSessionStore, At as TodoTraceEvent, B as LifecycleEventInit, Bt as WebSkillApi, C as FS_SESSION_PAGE_SIZE, Ct as SessionStore, D as FsMemoryStore, Dt as SkillRouter, E as FsArtifactStore, Et as SkillOutcomeReporter, F as HookRunnerOptions, Ft as TraceEvent, G as OpenAiCompatibleClient, Gt as clearFormValues, H as LifecycleHookContext, Ht as WebSkillRuntimeDeps, I as InstalledSkillManifest, It as TraceEventType, J as READ_SKILL_FILE_INPUT_SCHEMA, Jt as createWebSkillApi, K as OpenAiCompatibleClientConfig, Kt as clearStoredFormValues, L as IntegrityVerdict, Lt as TraceRecorder, M as GoogleGenAiClient, Mt as ToolResolution, N as GoogleGenAiClientConfig, Nt as ToolResult, O as FsRunSnapshotStore, Ot as SkillStateGuard, P as HookRunner, Pt as TraceClock, Q as RUN_TRACE_SCHEMA_VERSION, Qt as formFieldKey, R as InteractLifecycleData, Rt as UnsupportedRunSnapshot, S as FORM_VALUES_KEY, St as SessionRecord, T as FormValueRecord, Tt as SkillIntegrityGuard, U as LifecycleListener, Ut as bridgeError, V as LifecycleHook, Vt as WebSkillRuntime, W as NetworkPolicy, Wt as buildRenderResult, X as READ_SKILL_FILE_TOOL_NAME, Xt as extractTodoTraceEvents, Y as READ_SKILL_FILE_TOOL, Yt as extractChartSpec, Z as RUN_SNAPSHOT_SCHEMA_VERSION, Zt as extractUiSpecEvents, _ as CapabilityMode, _n as toLlmToolSpec, _t as SchemaInferer, a as AgentLoop, an as networkUrlHost, at as RunTerminationReason, b as ExternalSkillProvider, bn as validateUiSpecNode, bt as SerializingMemoryStore, c as AnthropicClient, cn as normalizeToolError, ct as RunTraceFilter, d as ApprovalScope, dn as putFormValues, dt as RunTraceSummary, en as fromVercelStreamPart, et as RouteResult, f as BridgeCapabilities, fn as readFormValues, ft as RuntimePhase, g as CapabilityApproval, gn as textParts, gt as SESSION_SCHEMA_VERSION, h as BridgeResponse, hn as summarizeToolCalls, ht as RuntimeSessionHandle, i as ActivateLifecycleData, in as networkPolicyLibSource, it as RunSnapshotStore, j as FullDisclosureRouter, jt as ToolDefinition, k as FsRunTraceStore, kt as TerminalLifecycleData, l as AnthropicClientConfig, ln as parseBridgeRequest, lt as RunTraceMetrics, m as BridgeRequest, mn as schemaToForm, mt as RuntimeSession, n as ASK_USER_TOOL, nn as isUnsupportedRunSnapshot, nt as RunSnapshot, o as AgentLoopConfig, on as normalizeErrorCode, ot as RunToolCall, p as BridgeCapability, pn as resolveToolName, pt as RuntimeRun, q as ProgressiveRouter, qt as createScriptContext, r as ASK_USER_TOOL_NAME, rn as mergeCatalogEntries, rt as RunSnapshotListEntry, s as AgentLoopDeps, sn as normalizeToolContent, st as RunTraceFile, t as ASK_USER_INPUT_SCHEMA, tn as isNetworkAllowed, tt as RunResult, u as ApprovalDecision, un as partsToText, ut as RunTraceStore, v as EventBus, vn as toVercelToolSpecs, vt as ScriptExecutionContext, w as FormValueMap, wt as SkillFailureReport, x as ExternalToolSource, xt as SessionMeta, y as ExecuteLifecycleData, yn as validateUiSpecEvent, yt as ScriptExecutor, z as LifecycleEvent, zt as VercelToolSpec } from "./index-vBz_FC9w.js";
3
- export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, type DiscoveryResult, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FORM_VALUES_KEY, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, type FormValueMap, type FormValueRecord, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionOrigin, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, SerializingMemoryStore, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillsLockfile, type TerminalLifecycleData, type TodoTraceEvent, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clearFormValues, clearStoredFormValues, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, extractTodoTraceEvents, extractUiSpecEvents, formFieldKey, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, mergeCatalogEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, partsToText, putFormValues, readFormValues, readResponseWithLimit, readSkillSignature, renderAvailableSkillsXml, renderCatalogJson, resolveArchiveLimits, resolveInsideRoot, resolveToolName, schemaToForm, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
1
+ import { $ as SkillDiscovery, A as CryptoKeyLike, At as isValidSkillName, B as PageQuery, Bt as renderCatalogJson, C as UiSpecEvent, Ct as buildCatalog, D as UiSurfaceActionResponse, Dt as computeDigest, E as UiSurfaceActionRequest, Et as checkSkillRules, F as FsTrustedKeyStore, Ft as parseSkillMarkdown, G as SKILL_NAME_MAX_LENGTH, Gt as unzipWithLimits, H as SIGNATURE_SCHEMA_VERSION, Ht as resolveInsideRoot, I as JsonSchema, It as parseSkillPackManifest, J as SKILL_SIGNATURE_FILE, Jt as verifySkillSignature, K as SKILL_NAME_PATTERN, Kt as validateSkills, L as MANIFEST_EXCLUDED_FILES, Lt as readResponseWithLimit, M as DiscoveryResult, Mt as keyIdOf, N as FileStat, Nt as messageOf, O as ArchiveLimits, Ot as escapeXml, P as FileSystemProvider, Pt as normalizePath, Q as SkillCatalogEntry, R as MemoryFS, Rt as readSkillSignature, S as UiSpecDrafts, St as atomicWriteText, T as UiSpecSnapshot, Tt as checkDependencyCycles, U as SKILLS_LOCKFILE, Ut as signSkill, V as RemoteUrlPolicy, Vt as resolveArchiveLimits, W as SKILL_MANIFEST_FILE, Wt as signaturePayloadBytes, X as SignatureVerdict, Y as SignatureAuditSink, Yt as xmlRenderer, Z as SkillCatalog, _ as MemoryStore, _t as VerifyResult, a as InteractionOrigin, at as SkillManifest, b as UiBridge, bt as assertRemoteUrlAllowed, c as InteractionResponse, ct as SkillReader, d as LlmContentPart, dt as SkillsLockfile, et as SkillDocument, f as LlmMessage, ft as TrustedKey, g as LlmToolSpec, gt as ValidationReport, h as LlmToolCall, ht as UnsignedPolicy, i as FormField, it as SkillManagerPort, j as DEFAULT_ARCHIVE_LIMITS, jt as jsonRenderer, k as CatalogRenderer, kt as exportSkills, l as LlmClient, lt as SkillSignature, m as LlmStreamEvent, mt as UiSpecNode, n as ArtifactStore, nt as SkillIssue, o as InteractionPolicy, ot as SkillMetadata, p as LlmResponse, pt as TrustedKeyStore, q as SKILL_PACK_FILE, qt as verifyManifest, r as ChartSpec, rt as SkillLocation, s as InteractionRequest, st as SkillPackManifest, t as Artifact, tt as SkillInstallSource, u as LlmCompleteInput, ut as SkillSource, v as RenderBlock, vt as WebSkillError, w as UiSpecPatch, wt as buildManifest, x as UiSpecActionCapability, xt as assertSafePathSegment, y as RenderResultRequest, yt as WebSkillErrorCode, z as Page, zt as renderAvailableSkillsXml } from "./types-4pg-qp_I-Gq63X8Oa.js";
2
+ import { $ as READ_SKILL_FILE_TOOL, $t as UnsupportedRunSnapshot, A as FsArtifactStore, An as normalizeToolContent, At as SkillFailureReport, B as InstalledSkillManifest, Bn as resolveToolName, Bt as ToolContent, C as DEFAULT_USER_PROFILE_LIMITS, Cn as isUnsupportedRunSnapshot, Ct as ScriptExecutionContext, D as ExternalSkillProvider, Dn as networkPolicyLibSource, Dt as SessionMeta, E as ExecuteLifecycleData, En as mergeProfileEntries, Et as SessionListPage, F as FullDisclosureRouter, Fn as readBehaviorRecords, Ft as SkillScriptSchemaSource, G as LifecycleHook, Gn as summarizeToolCalls, Gt as TraceEvent, H as InteractLifecycleData, Hn as schemaSourceLabel, Ht as ToolResolution, I as GoogleGenAiClient, In as readProfileEntries, It as SkillStateGuard, J as NetworkPolicy, Jn as toRecordDigests, Jt as USER_PROFILE_EXPORT_VERSION, K as LifecycleHookContext, Kn as textParts, Kt as TraceEventType, L as GoogleGenAiClientConfig, Ln as readUserProfile, Lt as TerminalLifecycleData, M as FsRunSnapshotStore, Mn as parseBridgeRequest, Mt as SkillOutcomeReporter, N as FsRunTraceStore, Nn as parseUserProfileExport, Nt as SkillRouter, O as ExternalToolSource, On as networkUrlHost, Ot as SessionRecord, P as FsSessionStore, Pn as partsToText, Pt as SkillScriptDescriptor, Q as READ_SKILL_FILE_INPUT_SCHEMA, Qt as USER_PROFILE_REFINE_PROMPT, R as HookRunner, Rn as refineUserProfile, Rt as TextualToolContent, S as CapabilityMode, Sn as isNetworkAllowed, St as SchemaInferer, T as EventBus, Tn as mergeCatalogEntries, Tt as SerializingMemoryStore, U as LifecycleEvent, Un as schemaToForm, Ut as ToolResult, V as IntegrityVerdict, Vn as sampleBehaviorRecords, Vt as ToolDefinition, W as LifecycleEventInit, Wn as scriptToolName, Wt as TraceClock, X as OpenAiCompatibleClientConfig, Xn as validateUiSpecEvent, Xt as USER_PROFILE_NO_INVENTION_RULE, Y as OpenAiCompatibleClient, Yn as toVercelToolSpecs, Yt as USER_PROFILE_KEY, Z as ProgressiveRouter, Zn as validateUiSpecNode, Zt as USER_PROFILE_PROMPT_HEADER, _ as BridgeCapabilities, _n as extractTodoTraceEvents, _t as RuntimePhase, a as ActivateLifecycleData, an as WebSkillApi, at as RouteResult, b as BridgeResponse, bn as fromVercelResult, bt as RuntimeSessionHandle, c as AgentLoopDeps, cn as appendBehaviorRecords, ct as RunSnapshotListEntry, d as ApprovalDecision, dn as buildRenderResult, dt as RunToolCall, en as UserProfile, et as READ_SKILL_FILE_TOOL_NAME, f as ApprovalScope, fn as createScriptContext, ft as RunTraceFile, g as BehaviorScene, gn as extractChartSpec, gt as RunTraceSummary, h as BehaviorRecordKind, hn as exportUserProfile, ht as RunTraceStore, i as ASK_USER_TOOL_NAME, in as VercelToolSpec, it as RouteLifecycleData, j as FsMemoryStore, jn as normalizeToolError, jt as SkillIntegrityGuard, k as FS_SESSION_PAGE_SIZE, kn as normalizeErrorCode, kt as SessionStore, l as AnthropicClient, ln as applyUserProfileImport, lt as RunSnapshotStore, m as BehaviorRecord, mn as diffUserProfile, mt as RunTraceMetrics, n as ASK_USER_INPUT_SCHEMA, nn as UserProfileExport, nt as RUN_TRACE_SCHEMA_VERSION, o as AgentLoop, on as WebSkillRuntime, ot as RunResult, p as BEHAVIOR_RECORDS_KEY, pn as createWebSkillApi, pt as RunTraceFilter, q as LifecycleListener, qn as toLlmToolSpec, qt as TraceRecorder, r as ASK_USER_TOOL, rn as UserProfileLimits, rt as RefineUserProfileInput, s as AgentLoopConfig, sn as WebSkillRuntimeDeps, st as RunSnapshot, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as UserProfileEntry, tt as RUN_SNAPSHOT_SCHEMA_VERSION, u as AnthropicClientConfig, un as bridgeError, ut as RunTerminationReason, v as BridgeCapability, vn as extractUiSpecEvents, vt as RuntimeRun, w as EMPTY_USER_PROFILE, wn as listSkillScripts, wt as ScriptExecutor, x as CapabilityApproval, xn as fromVercelStreamPart, xt as SESSION_SCHEMA_VERSION, y as BridgeRequest, yn as formatSkillScriptManifest, yt as RuntimeSession, z as HookRunnerOptions, zn as renderUserProfileContext, zt as TodoTraceEvent } from "./index-C-KFAZoF.js";
3
+ export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, BEHAVIOR_RECORDS_KEY, type BehaviorRecord, type BehaviorRecordKind, type BehaviorScene, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, DEFAULT_USER_PROFILE_LIMITS, type DiscoveryResult, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionOrigin, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RefineUserProfileInput, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillsLockfile, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolContent, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type UserProfile, type UserProfileEntry, type UserProfileExport, type UserProfileLimits, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { A as parseSkillMarkdown, B as unzipWithLimits, C as escapeXml, D as keyIdOf, E as jsonRenderer, F as renderCatalogJson, H as verifyManifest, I as resolveArchiveLimits, L as resolveInsideRoot, M as readResponseWithLimit, N as readSkillSignature, O as messageOf, P as renderAvailableSkillsXml, R as signSkill, S as computeDigest, T as isValidSkillName, U as verifySkillSignature, V as validateSkills, W as xmlRenderer, _ as atomicWriteText, a as SIGNATURE_SCHEMA_VERSION, b as checkDependencyCycles, c as SKILL_NAME_MAX_LENGTH, d as SKILL_SIGNATURE_FILE, f as SkillDiscovery, g as assertSafePathSegment, h as assertRemoteUrlAllowed, i as MemoryFS, j as parseSkillPackManifest, k as normalizePath, l as SKILL_NAME_PATTERN, m as WebSkillError, n as FsTrustedKeyStore, o as SKILLS_LOCKFILE, p as SkillReader, r as MANIFEST_EXCLUDED_FILES, s as SKILL_MANIFEST_FILE, t as DEFAULT_ARCHIVE_LIMITS, u as SKILL_PACK_FILE, v as buildCatalog, w as exportSkills, x as checkSkillRules, y as buildManifest, z as signaturePayloadBytes } from "./dist-8oQRa8Xz.js";
2
- import { i as textParts, n as partsToText } from "./memoryArtifactStore-BtOeB_hm-tj3fC5ip.js";
3
- import { $ as schemaToForm, A as buildRenderResult, B as fromVercelStreamPart, C as RUN_SNAPSHOT_SCHEMA_VERSION, D as TraceRecorder, E as SerializingMemoryStore, F as extractChartSpec, G as networkUrlHost, H as isUnsupportedRunSnapshot, I as extractTodoTraceEvents, J as normalizeToolError, K as normalizeErrorCode, L as extractUiSpecEvents, M as clearStoredFormValues, N as createScriptContext, O as WebSkillRuntime, P as createWebSkillApi, Q as resolveToolName, R as formFieldKey, S as READ_SKILL_FILE_TOOL_NAME, T as SESSION_SCHEMA_VERSION, U as mergeCatalogEntries, V as isNetworkAllowed, W as networkPolicyLibSource, X as putFormValues, Y as parseBridgeRequest, Z as readFormValues, _ as HookRunner, a as AnthropicClient, b as READ_SKILL_FILE_INPUT_SCHEMA, c as FORM_VALUES_KEY, d as FsMemoryStore, et as summarizeToolCalls, f as FsRunSnapshotStore, g as GoogleGenAiClient, h as FullDisclosureRouter, i as AgentLoop, it as validateUiSpecNode, j as clearFormValues, k as bridgeError, l as FS_SESSION_PAGE_SIZE, m as FsSessionStore, n as ASK_USER_TOOL, nt as toVercelToolSpecs, o as CapabilityApproval, p as FsRunTraceStore, q as normalizeToolContent, r as ASK_USER_TOOL_NAME, rt as validateUiSpecEvent, s as EventBus, t as ASK_USER_INPUT_SCHEMA, tt as toLlmToolSpec, u as FsArtifactStore, v as OpenAiCompatibleClient, w as RUN_TRACE_SCHEMA_VERSION, x as READ_SKILL_FILE_TOOL, y as ProgressiveRouter, z as fromVercelResult } from "./dist-6C03DShK.js";
2
+ import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-BMPYwvoy.js";
3
+ import { $ as listSkillScripts, A as TraceRecorder, B as buildRenderResult, C as READ_SKILL_FILE_INPUT_SCHEMA, Ct as validateUiSpecEvent, D as RUN_TRACE_SCHEMA_VERSION, E as RUN_SNAPSHOT_SCHEMA_VERSION, F as USER_PROFILE_REFINE_PROMPT, G as extractChartSpec, H as createWebSkillApi, I as WebSkillRuntime, J as formatSkillScriptManifest, K as extractTodoTraceEvents, L as appendBehaviorRecords, M as USER_PROFILE_KEY, N as USER_PROFILE_NO_INVENTION_RULE, O as SESSION_SCHEMA_VERSION, P as USER_PROFILE_PROMPT_HEADER, Q as isUnsupportedRunSnapshot, R as applyUserProfileImport, S as ProgressiveRouter, St as toVercelToolSpecs, T as READ_SKILL_FILE_TOOL_NAME, U as diffUserProfile, V as createScriptContext, W as exportUserProfile, X as fromVercelStreamPart, Y as fromVercelResult, Z as isNetworkAllowed, _ as FsSessionStore, _t as schemaToForm, a as AgentLoop, at as normalizeToolContent, b as HookRunner, bt as toLlmToolSpec, c as CapabilityApproval, ct as parseUserProfileExport, d as EventBus, dt as readUserProfile, et as mergeCatalogEntries, f as FS_SESSION_PAGE_SIZE, ft as refineUserProfile, g as FsRunTraceStore, gt as schemaSourceLabel, h as FsRunSnapshotStore, ht as sampleBehaviorRecords, i as ASK_USER_TOOL_NAME, it as normalizeErrorCode, j as USER_PROFILE_EXPORT_VERSION, k as SerializingMemoryStore, l as DEFAULT_USER_PROFILE_LIMITS, lt as readBehaviorRecords, m as FsMemoryStore, mt as resolveToolName, n as ASK_USER_INPUT_SCHEMA, nt as networkPolicyLibSource, o as AnthropicClient, ot as normalizeToolError, p as FsArtifactStore, pt as renderUserProfileContext, q as extractUiSpecEvents, r as ASK_USER_TOOL, rt as networkUrlHost, s as BEHAVIOR_RECORDS_KEY, st as parseBridgeRequest, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as mergeProfileEntries, u as EMPTY_USER_PROFILE, ut as readProfileEntries, v as FullDisclosureRouter, vt as scriptToolName, w as READ_SKILL_FILE_TOOL, wt as validateUiSpecNode, x as OpenAiCompatibleClient, xt as toRecordDigests, y as GoogleGenAiClient, yt as summarizeToolCalls, z as bridgeError } from "./dist-DusANsrn.js";
4
4
 
5
- export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, AnthropicClient, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, EventBus, FORM_VALUES_KEY, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MANIFEST_EXCLUDED_FILES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SerializingMemoryStore, SkillDiscovery, SkillReader, TraceRecorder, WebSkillError, WebSkillRuntime, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clearFormValues, clearStoredFormValues, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, extractTodoTraceEvents, extractUiSpecEvents, formFieldKey, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, mergeCatalogEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, partsToText, putFormValues, readFormValues, readResponseWithLimit, readSkillSignature, renderAvailableSkillsXml, renderCatalogJson, resolveArchiveLimits, resolveInsideRoot, resolveToolName, schemaToForm, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
5
+ export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_USER_PROFILE_LIMITS, EMPTY_USER_PROFILE, EventBus, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MANIFEST_EXCLUDED_FILES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SerializingMemoryStore, SkillDiscovery, SkillReader, TraceRecorder, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, WebSkillError, WebSkillRuntime, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };