@webskill/sdk 0.4.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 -0
  2. package/dist/agent.js +909 -0
  3. package/dist/browser.d.ts +233 -4
  4. package/dist/browser.js +869 -19
  5. package/dist/{catalogComponents-KsujmL4b-Clx1kCnU.js → catalogComponents-Dr5dFMAb-Dacibl1e.js} +372 -126
  6. package/dist/{dist-D9Lcn5Pp.js → dist-DnYG2-eY.js} +642 -39
  7. package/dist/{dist-C-Sh0MDU.js → dist-DusANsrn.js} +1035 -99
  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 +46 -4
  11. package/dist/governance.js +45 -2
  12. package/dist/{index-CHXxDccV.d.ts → index-BMocOEi0.d.ts} +106 -10
  13. package/dist/index-BuTpBMzr.d.ts +474 -0
  14. package/dist/{index-DLfR2Y6I.d.ts → index-C-KFAZoF.d.ts} +337 -18
  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-YLS-cxyT-C96jWDQq.js → openUiLibrary-Bdrji9qK-DzAxRlTY.js} +3 -3
  23. package/dist/{skillVersionStore-uyefLPR1-DXOzbksv.d.ts → skillVersionStore-BzLbzFOL-CxdAFWO2.d.ts} +4 -3
  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-7Wcg--Vh-1YlQ4jF9.d.ts → types-4pg-qp_I-Gq63X8Oa.d.ts} +55 -5
  28. package/dist/ui-react.d.ts +26 -5
  29. package/dist/ui-react.js +147 -29
  30. package/dist/ui-vue.d.ts +1 -1
  31. package/dist/ui-vue.js +30 -6
  32. package/dist/ui.d.ts +4 -4
  33. package/dist/ui.js +3 -3
  34. package/dist/{webskillLitCatalog-CSTbhBe_-CYIs5BX8.js → webskillLitCatalog-_mugzRHx-B_54vxum.js} +88 -2
  35. package/package.json +6 -1
@@ -1,4 +1,4 @@
1
- import { $ as SkillDocument, F as JsonSchema, N as FileSystemProvider, Q as SkillDiscovery, R as Page, S as UiSpecEvent, T as UiSurfaceActionRequest, X as SkillCatalog, Z as SkillCatalogEntry, _ as RenderBlock, a as InteractionPolicy, c as LlmClient, d as LlmMessage, et as SkillInstallSource, f as LlmResponse, g as MemoryStore, h as LlmToolSpec, ht as ValidationReport, i as FormField, it as SkillManifest, j as DiscoveryResult, l as LlmCompleteInput, n as ArtifactStore, o as InteractionRequest, p as LlmStreamEvent, pt as UiSpecNode, r as ChartSpec, t as Artifact, u as LlmContentPart, v as RenderResultRequest, vt as WebSkillErrorCode, x as UiSpecDrafts, y as UiBridge, z as PageQuery } from "./types-7Wcg--Vh-1YlQ4jF9.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";
@@ -263,6 +323,11 @@ type ExecuteLifecycleData = {
263
323
  name: string;
264
324
  callId: string;
265
325
  args: string;
326
+ /**
327
+ * failed 时的结构化错误码(如 `TOOL_NOT_ALLOWED`)。
328
+ * “被策略拦下”与“执行出错”在 UI 上是两件事,消费方不应靠解析文案区分。
329
+ */
330
+ errorCode?: string;
266
331
  } | {
267
332
  kind: 'llm-delta';
268
333
  delta: string;
@@ -335,7 +400,7 @@ type LifecycleHook = (ctx: LifecycleHookContext) => Promise<void | {
335
400
  }>;
336
401
  //#endregion
337
402
  //#region src/trace/types.d.ts
338
- type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.denied' | 'artifact.created' | 'ui.requested' | 'ui.resumed' | 'ui.surface-action.requested' | 'ui.surface-action.resolved' | 'ui.rendered' | 'run.warning' | 'run.completed' | 'run.cancelled' | 'run.failed' | 'run.resumed';
403
+ type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.denied' | 'artifact.created' | 'ui.requested' | 'ui.resumed' | 'ui.surface-action.requested' | 'ui.surface-action.resolved' | 'ui.rendered' | 'todo.created' | 'todo.updated' | 'todo.cleared' | 'run.warning' | 'run.completed' | 'run.cancelled' | 'run.failed' | 'run.resumed';
339
404
  interface TraceEvent {
340
405
  id: string;
341
406
  runId: string;
@@ -360,6 +425,17 @@ interface AgentLoopConfig {
360
425
  toolResultMaxBytes?: number;
361
426
  /** session paramHistory 保留条数上限(默认 50,超出裁最旧) */
362
427
  paramHistoryLimit?: 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;
363
439
  }
364
440
  /** 技能状态拦截 port(治理装配;无注入默认全放行) */
365
441
  interface SkillStateGuard {
@@ -417,7 +493,9 @@ interface RuntimeSession {
417
493
  id: string;
418
494
  createdAt: string;
419
495
  }
420
- 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';
421
499
  interface RuntimeRun {
422
500
  id: string;
423
501
  sessionId: string;
@@ -441,7 +519,7 @@ interface RunResult {
441
519
  }
442
520
  /** createSession 返回的会话句柄:跨 run 延续消息历史 */
443
521
  interface RuntimeSessionHandle extends RuntimeSession {
444
- run(prompt: string): Promise<RunResult>;
522
+ run(prompt: string | readonly LlmContentPart[]): Promise<RunResult>;
445
523
  }
446
524
  //#endregion
447
525
  //#region src/interaction/renderResult.d.ts
@@ -602,6 +680,199 @@ declare class SerializingMemoryStore implements MemoryStore {
602
680
  transaction<T>(scope: string, fn: (inner: MemoryStore) => Promise<T>): Promise<T>;
603
681
  }
604
682
  //#endregion
683
+ //#region src/profile/types.d.ts
684
+ /**
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)。
693
+ * @experimental
694
+ */
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[];
757
+ /**
758
+ * 追加并按容量淘汰最旧(FR-19.2)。`value` 同时截断:
759
+ * 一条被粘贴进来的长文本能把整个 JSON 撑爆,而提炼只需要语义。
760
+ * @experimental
761
+ */
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;
875
+ //#endregion
605
876
  //#region src/artifacts/fsArtifactStore.d.ts
606
877
  /**
607
878
  * 基于 FileSystemProvider 的 ArtifactStore:产物落盘 <root>/<runId>/<path>,
@@ -768,6 +1039,20 @@ declare class TraceRecorder {
768
1039
  list(): TraceEvent[];
769
1040
  }
770
1041
  //#endregion
1042
+ //#region src/trace/todoMarker.d.ts
1043
+ interface TodoTraceEvent {
1044
+ type: TraceEventType;
1045
+ data: Record<string, unknown>;
1046
+ }
1047
+ /**
1048
+ * `$todo` 约定的形状校验:JSON content 的 data 含 `$todo` 键(单条或数组)→ trace 事件。
1049
+ *
1050
+ * 与 `$chart` / `$surface` 同一条既有通道——待办清单的状态机全部在 `@webskill/agent`,
1051
+ * runtime 只认这三个事件类型名,不含任何计划态逻辑。畸形条目忽略不炸。
1052
+ * @experimental
1053
+ */
1054
+ declare function extractTodoTraceEvents(data: unknown): TodoTraceEvent[];
1055
+ //#endregion
771
1056
  //#region src/engine/external.d.ts
772
1057
  /**
773
1058
  * 外部工具来源(runtime 扩展点,mcp 包实现并插入)。
@@ -919,6 +1204,15 @@ interface AgentLoopDeps {
919
1204
  enabled: true;
920
1205
  userId: string;
921
1206
  };
1207
+ /**
1208
+ * 用户画像(FR-19.2/19.4);**不注入即关闭**,关闭时既不记录也不注入。
1209
+ * 与 `longTerm` 分开:后者存的是技能使用统计,本项存的是用户行为与对其的推断,
1210
+ * 两者的隐私含义不同(FR-19.6)。
1211
+ */
1212
+ userProfile?: {
1213
+ userId: string;
1214
+ limits?: UserProfileLimits;
1215
+ };
922
1216
  /** 外部工具来源(mcp 插件等);specs 在 run 开始时并入每轮 tools */
923
1217
  externalTools?: ExternalToolSource[];
924
1218
  /** 外部技能提供者(页面动态技能等) */
@@ -945,12 +1239,12 @@ declare class AgentLoop {
945
1239
  /**
946
1240
  * 取消进行中的 run:触发该 run 的 AbortController(与 totalTimeout 硬期限同一通道),
947
1241
  * run 以 cancelled(RUN_CANCELLED)终止;未找到(已终态或不属于本实例)返回 false。
948
- * 取消在下一个中断点生效(LLM complete/stream 调用;交互等待不强制中断)。
1242
+ * 取消在下一个中断点生效;LLM 调用与交互等待都监听同一个 signal,因此等表单时也能立即停。
949
1243
  */
950
1244
  cancel(runId: string): boolean;
951
1245
  run(input: {
952
1246
  sessionId: string;
953
- userPrompt: string;
1247
+ userPrompt: string | readonly LlmContentPart[];
954
1248
  route: RouteResult;
955
1249
  runId?: string;
956
1250
  /** 多会话历史延续:插入 system 与本轮 user 之间(不含 system 消息) */
@@ -988,6 +1282,11 @@ interface WebSkillRuntimeDeps {
988
1282
  enabled: true;
989
1283
  userId: string;
990
1284
  };
1285
+ /** 用户画像(FR-19.2/19.4);不注入即关闭,关闭时既不记录也不注入 */
1286
+ userProfile?: {
1287
+ userId: string;
1288
+ limits?: UserProfileLimits;
1289
+ };
991
1290
  /** 外部工具来源(mcp 插件等) */
992
1291
  externalTools?: ExternalToolSource[];
993
1292
  /** 外部技能提供者(页面动态技能等);Catalog 合并同名本地优先 */
@@ -1036,9 +1335,10 @@ declare class WebSkillRuntime {
1036
1335
  maxHistoryMessages?: number;
1037
1336
  }): RuntimeSessionHandle;
1038
1337
  discover(): Promise<DiscoveryResult>;
1039
- run(userPrompt: string, options?: {
1338
+ run(userPrompt: string | readonly LlmContentPart[], options?: {
1040
1339
  sessionId?: string;
1041
1340
  history?: LlmMessage[];
1341
+ skillName?: string;
1042
1342
  }): Promise<RunResult>;
1043
1343
  /** D3:列出 interrupted run(供 UI 展示"未完成任务");版本不受支持的项带 unsupported 标记 */
1044
1344
  listInterruptedRuns(): Promise<RunSnapshotListEntry[]>;
@@ -1147,8 +1447,10 @@ declare class FsRunTraceStore implements RunTraceStore {
1147
1447
  constructor(deps: {
1148
1448
  root: string;
1149
1449
  fs: FileSystemProvider;
1150
- /** 落盘失败的降级处理;默认 console.warn,保持「写失败不阻断对话」的产品语义 */
1450
+ /** 正文落盘失败的降级处理;默认 console.warn,保持「写失败不阻断对话」的产品语义 */
1151
1451
  onError?: (error: unknown, run: RuntimeRun) => void;
1452
+ /** 索引追加失败的降级处理;与 onError 分开是因为它可自愈(FR-21.7) */
1453
+ onIndexError?: (error: unknown, run: RuntimeRun) => void;
1152
1454
  });
1153
1455
  put(run: RuntimeRun): Promise<void>;
1154
1456
  get(runId: string): Promise<RunTraceFile>;
@@ -1169,6 +1471,13 @@ interface RunToolCall {
1169
1471
  args?: string;
1170
1472
  /** 执行耗时 ms */
1171
1473
  durationMs?: number;
1474
+ /**
1475
+ * failed 时的结构化错误码(如 `TOOL_NOT_ALLOWED`)。
1476
+ * 消费方据此区分「被策略拒绝」与「执行出错」,不必解析 message 文案。
1477
+ */
1478
+ errorCode?: string;
1479
+ /** failed 时的错误说明(trace 事件的 message) */
1480
+ errorMessage?: string;
1172
1481
  }
1173
1482
  /**
1174
1483
  * 从 run 的 trace 推导终态工具调用列表。
@@ -1204,6 +1513,16 @@ interface SessionRecord<TMessage = unknown> extends SessionMeta {
1204
1513
  schemaVersion: number;
1205
1514
  messages: TMessage[];
1206
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
+ }
1207
1526
  /**
1208
1527
  * 会话持久化端口。消息载荷对 runtime 不透明——`ChatMessage` 是 chatbot 的 UI 类型,
1209
1528
  * runtime 不能认识它,所以泛型默认 `unknown`(只读消费方直接用默认参数即可)。
@@ -1215,7 +1534,7 @@ interface SessionStore<TMessage = unknown> {
1215
1534
  */
1216
1535
  list(options?: {
1217
1536
  includeArchived?: boolean;
1218
- } & PageQuery): Promise<Page<SessionMeta>>;
1537
+ } & PageQuery): Promise<SessionListPage>;
1219
1538
  get(id: string): Promise<SessionRecord<TMessage> | undefined>;
1220
1539
  /**
1221
1540
  * 消息分页读。与 `list()` 同方向:无游标时给**最后**一页(最新的 `limit` 条),
@@ -1252,7 +1571,7 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
1252
1571
  });
1253
1572
  list(options?: {
1254
1573
  includeArchived?: boolean;
1255
- } & PageQuery): Promise<Page<SessionMeta>>;
1574
+ } & PageQuery): Promise<SessionListPage>;
1256
1575
  /**
1257
1576
  * 整文件读后切片。磁盘 I/O 复杂度没有改善(备案 D25),
1258
1577
  * 但**跨出端口的记录数**已是常量——这正是分页对上层的意义。
@@ -1272,4 +1591,4 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
1272
1591
  delete(id: string): Promise<void>;
1273
1592
  }
1274
1593
  //#endregion
1275
- export { RunSnapshot as $, normalizeToolContent as $t, GoogleGenAiClientConfig as A, TraceClock as At, LifecycleListener as B, buildRenderResult as Bt, FsArtifactStore as C, SkillOutcomeReporter as Ct, FsSessionStore as D, ToolDefinition as Dt, FsRunTraceStore as E, TerminalLifecycleData as Et, InteractLifecycleData as F, VercelToolSpec as Ft, READ_SKILL_FILE_INPUT_SCHEMA as G, fromVercelResult as Gt, OpenAiCompatibleClient as H, createWebSkillApi as Ht, LifecycleEvent as I, WebSkillApi as It, RUN_SNAPSHOT_SCHEMA_VERSION as J, isUnsupportedRunSnapshot as Jt, READ_SKILL_FILE_TOOL as K, fromVercelStreamPart as Kt, LifecycleEventInit as L, WebSkillRuntime as Lt, HookRunnerOptions as M, TraceEventType as Mt, InstalledSkillManifest as N, TraceRecorder as Nt, FullDisclosureRouter as O, ToolResolution as Ot, IntegrityVerdict as P, UnsupportedRunSnapshot as Pt, RunResult as Q, normalizeErrorCode as Qt, LifecycleHook as R, WebSkillRuntimeDeps as Rt, FS_SESSION_PAGE_SIZE as S, SkillIntegrityGuard as St, FsRunSnapshotStore as T, SkillStateGuard as Tt, OpenAiCompatibleClientConfig as U, extractChartSpec as Ut, NetworkPolicy as V, createScriptContext as Vt, ProgressiveRouter as W, extractUiSpecEvents as Wt, RouteLifecycleData as X, networkPolicyLibSource as Xt, RUN_TRACE_SCHEMA_VERSION as Y, mergeCatalogEntries as Yt, RouteResult as Z, networkUrlHost as Zt, CapabilityMode as _, SerializingMemoryStore as _t, AgentLoop as a, summarizeToolCalls as an, RunTraceFilter as at, ExternalSkillProvider as b, SessionStore as bt, AnthropicClient as c, toVercelToolSpecs as cn, RunTraceSummary as ct, ApprovalScope as d, RuntimeSession as dt, normalizeToolError as en, RunSnapshotListEntry as et, BridgeCapabilities as f, RuntimeSessionHandle as ft, CapabilityApproval as g, ScriptExecutor as gt, BridgeResponse as h, ScriptExecutionContext as ht, ActivateLifecycleData as i, schemaToForm as in, RunTraceFile as it, HookRunner as j, TraceEvent as jt, GoogleGenAiClient as k, ToolResult as kt, AnthropicClientConfig as l, validateUiSpecEvent as ln, RuntimePhase as lt, BridgeRequest as m, SchemaInferer as mt, ASK_USER_TOOL as n, partsToText as nn, RunTerminationReason as nt, AgentLoopConfig as o, textParts as on, RunTraceMetrics as ot, BridgeCapability as p, SESSION_SCHEMA_VERSION as pt, READ_SKILL_FILE_TOOL_NAME as q, isNetworkAllowed as qt, ASK_USER_TOOL_NAME as r, resolveToolName as rn, RunToolCall as rt, AgentLoopDeps as s, toLlmToolSpec as sn, RunTraceStore as st, ASK_USER_INPUT_SCHEMA as t, parseBridgeRequest as tn, RunSnapshotStore as tt, ApprovalDecision as u, validateUiSpecNode as un, RuntimeRun as ut, EventBus as v, SessionMeta as vt, FsMemoryStore as w, SkillRouter as wt, ExternalToolSource as x, SkillFailureReport as xt, ExecuteLifecycleData as y, SessionRecord as yt, LifecycleHookContext as z, bridgeError 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 SkillDocument, A as DEFAULT_ARCHIVE_LIMITS, At as jsonRenderer, B as RemoteUrlPolicy, Bt as resolveArchiveLimits, C as UiSpecPatch, Ct as buildManifest, D as ArchiveLimits, Dt as escapeXml, E as UiSurfaceActionResponse, Et as computeDigest, F as JsonSchema, Ft as parseSkillPackManifest, G as SKILL_NAME_PATTERN, Gt as validateSkills, H as SKILLS_LOCKFILE, Ht as signSkill, I as MANIFEST_EXCLUDED_FILES, It as readResponseWithLimit, J as SignatureAuditSink, Jt as xmlRenderer, K as SKILL_PACK_FILE, Kt as verifyManifest, L as MemoryFS, Lt as readSkillSignature, M as FileStat, Mt as messageOf, N as FileSystemProvider, Nt as normalizePath, O as CatalogRenderer, Ot as exportSkills, P as FsTrustedKeyStore, Pt as parseSkillMarkdown, Q as SkillDiscovery, R as Page, Rt as renderAvailableSkillsXml, S as UiSpecEvent, St as buildCatalog, T as UiSurfaceActionRequest, Tt as checkSkillRules, U as SKILL_MANIFEST_FILE, Ut as signaturePayloadBytes, V as SIGNATURE_SCHEMA_VERSION, Vt as resolveInsideRoot, W as SKILL_NAME_MAX_LENGTH, Wt as unzipWithLimits, X as SkillCatalog, Y as SignatureVerdict, Z as SkillCatalogEntry, _ as RenderBlock, _t as WebSkillError, a as InteractionPolicy, at as SkillMetadata, b as UiSpecActionCapability, bt as assertSafePathSegment, c as LlmClient, ct as SkillSignature, d as LlmMessage, dt as TrustedKey, et as SkillInstallSource, f as LlmResponse, ft as TrustedKeyStore, g as MemoryStore, gt as VerifyResult, h as LlmToolSpec, ht as ValidationReport, i as FormField, it as SkillManifest, j as DiscoveryResult, jt as keyIdOf, k as CryptoKeyLike, kt as isValidSkillName, l as LlmCompleteInput, lt as SkillSource, m as LlmToolCall, mt as UnsignedPolicy, n as ArtifactStore, nt as SkillLocation, o as InteractionRequest, ot as SkillPackManifest, p as LlmStreamEvent, pt as UiSpecNode, q as SKILL_SIGNATURE_FILE, qt as verifySkillSignature, r as ChartSpec, rt as SkillManagerPort, s as InteractionResponse, st as SkillReader, t as Artifact, tt as SkillIssue, u as LlmContentPart, ut as SkillsLockfile, v as RenderResultRequest, vt as WebSkillErrorCode, w as UiSpecSnapshot, wt as checkDependencyCycles, x as UiSpecDrafts, xt as atomicWriteText, y as UiBridge, yt as assertRemoteUrlAllowed, z as PageQuery, zt as renderCatalogJson } from "./types-7Wcg--Vh-1YlQ4jF9.js";
2
- import { $ as RunSnapshot, $t as normalizeToolContent, A as GoogleGenAiClientConfig, At as TraceClock, B as LifecycleListener, Bt as buildRenderResult, C as FsArtifactStore, Ct as SkillOutcomeReporter, D as FsSessionStore, Dt as ToolDefinition, E as FsRunTraceStore, Et as TerminalLifecycleData, F as InteractLifecycleData, Ft as VercelToolSpec, G as READ_SKILL_FILE_INPUT_SCHEMA, Gt as fromVercelResult, H as OpenAiCompatibleClient, Ht as createWebSkillApi, I as LifecycleEvent, It as WebSkillApi, J as RUN_SNAPSHOT_SCHEMA_VERSION, Jt as isUnsupportedRunSnapshot, K as READ_SKILL_FILE_TOOL, Kt as fromVercelStreamPart, L as LifecycleEventInit, Lt as WebSkillRuntime, M as HookRunnerOptions, Mt as TraceEventType, N as InstalledSkillManifest, Nt as TraceRecorder, O as FullDisclosureRouter, Ot as ToolResolution, P as IntegrityVerdict, Pt as UnsupportedRunSnapshot, Q as RunResult, Qt as normalizeErrorCode, R as LifecycleHook, Rt as WebSkillRuntimeDeps, S as FS_SESSION_PAGE_SIZE, St as SkillIntegrityGuard, T as FsRunSnapshotStore, Tt as SkillStateGuard, U as OpenAiCompatibleClientConfig, Ut as extractChartSpec, V as NetworkPolicy, Vt as createScriptContext, W as ProgressiveRouter, Wt as extractUiSpecEvents, X as RouteLifecycleData, Xt as networkPolicyLibSource, Y as RUN_TRACE_SCHEMA_VERSION, Yt as mergeCatalogEntries, Z as RouteResult, Zt as networkUrlHost, _ as CapabilityMode, _t as SerializingMemoryStore, a as AgentLoop, an as summarizeToolCalls, at as RunTraceFilter, b as ExternalSkillProvider, bt as SessionStore, c as AnthropicClient, cn as toVercelToolSpecs, ct as RunTraceSummary, d as ApprovalScope, dt as RuntimeSession, en as normalizeToolError, et as RunSnapshotListEntry, f as BridgeCapabilities, ft as RuntimeSessionHandle, g as CapabilityApproval, gt as ScriptExecutor, h as BridgeResponse, ht as ScriptExecutionContext, i as ActivateLifecycleData, in as schemaToForm, it as RunTraceFile, j as HookRunner, jt as TraceEvent, k as GoogleGenAiClient, kt as ToolResult, l as AnthropicClientConfig, ln as validateUiSpecEvent, lt as RuntimePhase, m as BridgeRequest, mt as SchemaInferer, n as ASK_USER_TOOL, nn as partsToText, nt as RunTerminationReason, o as AgentLoopConfig, on as textParts, ot as RunTraceMetrics, p as BridgeCapability, pt as SESSION_SCHEMA_VERSION, q as READ_SKILL_FILE_TOOL_NAME, qt as isNetworkAllowed, r as ASK_USER_TOOL_NAME, rn as resolveToolName, rt as RunToolCall, s as AgentLoopDeps, sn as toLlmToolSpec, st as RunTraceStore, t as ASK_USER_INPUT_SCHEMA, tn as parseBridgeRequest, tt as RunSnapshotStore, u as ApprovalDecision, un as validateUiSpecNode, ut as RuntimeRun, v as EventBus, vt as SessionMeta, w as FsMemoryStore, wt as SkillRouter, x as ExternalToolSource, xt as SkillFailureReport, y as ExecuteLifecycleData, yt as SessionRecord, z as LifecycleHookContext, zt as bridgeError } from "./index-DLfR2Y6I.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, 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 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 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, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, extractUiSpecEvents, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, mergeCatalogEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, partsToText, 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 { A as createScriptContext, B as networkUrlHost, C as RUN_TRACE_SCHEMA_VERSION, D as WebSkillRuntime, E as TraceRecorder, F as fromVercelStreamPart, G as resolveToolName, H as normalizeToolContent, I as isNetworkAllowed, J as toLlmToolSpec, K as schemaToForm, L as isUnsupportedRunSnapshot, M as extractChartSpec, N as extractUiSpecEvents, O as bridgeError, P as fromVercelResult, R as mergeCatalogEntries, S as RUN_SNAPSHOT_SCHEMA_VERSION, T as SerializingMemoryStore, U as normalizeToolError, V as normalizeErrorCode, W as parseBridgeRequest, X as validateUiSpecEvent, Y as toVercelToolSpecs, Z as validateUiSpecNode, _ as OpenAiCompatibleClient, a as AnthropicClient, b as READ_SKILL_FILE_TOOL, c as FS_SESSION_PAGE_SIZE, d as FsRunSnapshotStore, f as FsRunTraceStore, g as HookRunner, h as GoogleGenAiClient, i as AgentLoop, j as createWebSkillApi, k as buildRenderResult, l as FsArtifactStore, m as FullDisclosureRouter, n as ASK_USER_TOOL, o as CapabilityApproval, p as FsSessionStore, q as summarizeToolCalls, r as ASK_USER_TOOL_NAME, s as EventBus, t as ASK_USER_INPUT_SCHEMA, u as FsMemoryStore, v as ProgressiveRouter, w as SESSION_SCHEMA_VERSION, x as READ_SKILL_FILE_TOOL_NAME, y as READ_SKILL_FILE_INPUT_SCHEMA, z as networkPolicyLibSource } from "./dist-C-Sh0MDU.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, 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, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, extractUiSpecEvents, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, mergeCatalogEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, partsToText, 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 };