@webskill/sdk 0.9.0 → 0.11.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 (36) hide show
  1. package/dist/agent.d.ts +3 -2
  2. package/dist/agent.js +3 -1098
  3. package/dist/browser.d.ts +260 -11
  4. package/dist/browser.js +772 -52
  5. package/dist/{catalogComponents-DfxxfUvn-T7Ic8QFV.js → catalogComponents-BFoqpT1v-CjUBZ3bc.js} +1604 -426
  6. package/dist/{dist-CFmkV45C.js → dist-B-cOu08W.js} +874 -107
  7. package/dist/{dist-BQe1uglQ.js → dist-DTHZS2k1.js} +524 -30
  8. package/dist/dist-qnlI2Iup.js +1280 -0
  9. package/dist/{eventTypes-DbOpAECr-BjcjZVms.js → eventTypes-FllCrX-Z-DNDeHWoG.js} +9 -2
  10. package/dist/governance.d.ts +33 -6
  11. package/dist/governance.js +45 -7
  12. package/dist/{index-znZjobkr.d.ts → index-D3mONFHD.d.ts} +281 -11
  13. package/dist/{index-DXNTIa-6.d.ts → index-DACk2_XZ.d.ts} +114 -7
  14. package/dist/{index-lLcCpHE-.d.ts → index-DWbs58LF.d.ts} +234 -14
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +3 -3
  17. package/dist/mcp.d.ts +49 -6
  18. package/dist/mcp.js +146 -38
  19. package/dist/node.d.ts +3 -3
  20. package/dist/node.js +52 -2
  21. package/dist/{openUiLibrary-DURlAxjk-Do_yqg3u.js → openUiLibrary-D5u8oIvx-BLOAQCho.js} +3 -3
  22. package/dist/processSandboxEntry.js +6 -0
  23. package/dist/sandboxWorkerEntry.js +6 -0
  24. package/dist/{skillVersionStore-Bl-ElD45-dMJ8Ybhb.d.ts → skillVersionStore-D-qHk9ZE-BcmFLykd.d.ts} +13 -5
  25. package/dist/{testing-Csg5ljNm.js → testing-WPTyXQYt.js} +26 -3
  26. package/dist/testing.d.ts +1 -1
  27. package/dist/testing.js +1 -1
  28. package/dist/{types-B3n0cMZu-BDhheIhX.d.ts → types-C26b05fW-CdrRCRDb.d.ts} +55 -6
  29. package/dist/ui-react.d.ts +11 -2
  30. package/dist/ui-react.js +141 -42
  31. package/dist/ui-vue.d.ts +1 -1
  32. package/dist/ui-vue.js +2 -2
  33. package/dist/ui.d.ts +4 -4
  34. package/dist/ui.js +3 -3
  35. package/dist/{webskillLitCatalog-DwTwSBFt-BG7kL-Es.js → webskillLitCatalog-DME6PBkV-CmYNLlIT.js} +135 -16
  36. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { E as UiSpecSnapshot, S as UiSpecActionCapability, c as InteractionResponse, r as ChartSpec, s as InteractionRequest, v as RenderBlock, x as UiBridge, y as RenderResultRequest, yt as UiSpecNode, z as JsonSchema } from "./types-B3n0cMZu-BDhheIhX.js";
2
- import { k as ExternalToolSource } from "./index-znZjobkr.js";
1
+ import { B as JsonSchema, C as UiSpecActionCapability, D as UiSpecSnapshot, S as UiBridge, b as RenderResultRequest, bt as UiSpecNode, c as InteractionResponse, r as ChartSpec, s as InteractionRequest, y as RenderBlock } from "./types-C26b05fW-CdrRCRDb.js";
2
+ import { F as ExternalToolSource } from "./index-D3mONFHD.js";
3
3
  import { z } from "zod";
4
4
  import { ComponentType, ReactNode } from "react";
5
5
  //#region ../ui/dist/index.d.ts
@@ -16,7 +16,7 @@ interface ControlModel {
16
16
  name: string;
17
17
  label: string;
18
18
  /** `password` 在不支持它的渲染档里必须**不渲染**,退化成文本框等于明文显示 */
19
- control: 'text' | 'number' | 'boolean' | 'select' | 'textarea' | 'file' | 'password';
19
+ control: 'text' | 'number' | 'boolean' | 'select' | 'textarea' | 'file' | 'password' | 'date';
20
20
  required?: boolean;
21
21
  description?: string;
22
22
  defaultValue?: unknown;
@@ -76,6 +76,10 @@ interface SurfaceFormTexts {
76
76
  arrayFirstItemOnly: string;
77
77
  /** 历史快照(宿主未接 action)的一次性只读说明 */
78
78
  readOnlySnapshot: string;
79
+ /** 建议值的前缀(0.10.0 #48.14:画像建议标签此前只有英文硬编码) */
80
+ suggested: string;
81
+ /** 采纳建议值的按钮 */
82
+ useSuggestion: string;
79
83
  }
80
84
  /** 可复用的部分取自 DEFAULT_INTERACTION_TEXTS,不另抄一份(AC-G10) */
81
85
  declare const DEFAULT_SURFACE_FORM_TEXTS: SurfaceFormTexts;
@@ -149,6 +153,47 @@ interface EchartHandle {
149
153
  */
150
154
  declare function mountEchart(container: HTMLElement): EchartHandle;
151
155
  //#endregion
156
+ //#region src/viewer/presetComponents.d.ts
157
+ /**
158
+ * viewer 的宿主预置组件(0.11.0 分册 18 FR-18.5 / 分册 19)。
159
+ *
160
+ * 技能**不写 JS**:文档 HTML 里只留占位,由这里挂载真实组件。
161
+ * 交互只落在图表上——表格排序的例子已作废(分册 29 §2 登记 #13)。
162
+ *
163
+ * 三条硬约束:
164
+ * - props 用 **catalog 自己的 zod schema** 解析,同形因此是机制上成立的,
165
+ * 不是靠一句「记得同步」的注释(FR-19.2);
166
+ * - 值一律经 `textContent` 落地,**永不** `innerHTML`(FR-19.4 / AC-19.5);
167
+ * - 白名单外的名字只渲染降级提示,**不触发任何按名 import**(FR-19.3)。
168
+ */
169
+ /** 占位元素的属性名,模板与挂载方共用(FR-19.1 的契约) */
170
+ declare const VIEWER_COMPONENT_ATTR = "data-webskill-component";
171
+ declare const VIEWER_PROPS_ATTR = "data-webskill-props";
172
+ /** 降级提示的标记;模板 CSS 与判据都认这个属性,不认某个 class 名 */
173
+ declare const VIEWER_FALLBACK_ATTR = "data-webskill-fallback";
174
+ /** 文档面可用的组件白名单(FR-19.3)。字面量数组——不接受任何按名动态加载 */
175
+ declare const DOCUMENT_COMPONENTS: readonly ["Chart", "Table", "Metric", "Gauge", "KeyValue"];
176
+ type DocumentComponentName = (typeof DOCUMENT_COMPONENTS)[number];
177
+ interface ViewerComponentsHandle {
178
+ dispose(): void;
179
+ }
180
+ /**
181
+ * 扫描 `root` 下的占位并挂载预置组件。
182
+ *
183
+ * 逐个占位独立处理:一个坏占位只降级它自己,不会让整篇文档变空白。
184
+ */
185
+ declare function mountViewerComponents(root: ParentNode): ViewerComponentsHandle;
186
+ //#endregion
187
+ //#region src/catalog/gauge.d.ts
188
+ /**
189
+ * `Gauge` 的百分比换算(0.11.0 分册 19 FR-19.2)。
190
+ *
191
+ * catalog 的 React `SpecGauge` 与文档面的预置组件都读这一份:
192
+ * 换算里有两个容易各写各的判断——`max === min` 时不能除零、越界值要夹紧——
193
+ * 两处各写一遍就会在边界值上给出不同的条。
194
+ */
195
+ declare function gaugePercent(value: number, min: number, max: number): number;
196
+ //#endregion
152
197
  //#region src/web/webFormBridge.d.ts
153
198
  /**
154
199
  * 框架无关原生 DOM 的 UiBridge:request 渲染表单并返回 Promise
@@ -232,7 +277,15 @@ interface UiSpecDegradation {
232
277
  kind: 'prop-dropped' | 'node-dropped' | 'unknown-component' | 'constraint-ignored' | 'condition-invalid';
233
278
  component: string;
234
279
  detail: string;
280
+ /**
281
+ * 稳定降级码,供上层可编程处理(AC-13.4)。
282
+ * 只有**策略性**拒绝才有码;纯粹的类型不匹配没有,那种只需要 detail。
283
+ * 组件在自己的 zod 里用 `codedError()` 声明,sanitize 自动提取——不维护组件名单。
284
+ */
285
+ code?: UiSpecDegradationCode;
235
286
  }
287
+ /** 稳定降级码。新增成员即新增公开契约,须登记。 */
288
+ type UiSpecDegradationCode = 'IMAGE_SRC_NOT_ALLOWED';
236
289
  interface UiSpecSanitization {
237
290
  /** `undefined` 表示连根节点都救不回来 */
238
291
  node: UiSpecNode | undefined;
@@ -290,10 +343,64 @@ declare const UI_CATALOG_GROUPS: {
290
343
  };
291
344
  /**
292
345
  * catalog 系统提示的体积上限(UTF-8 字节,FR-6.6)。
293
- * 描述每次请求都要重发,所以上限必须是可判定的数字而不是「尽量精简」。
294
- * 要改这个数字,先想清楚是否值得让每次请求都多付这些 token。
346
+ *
347
+ * **0.11.0 起只是 `CATALOG_PROMPT_MAX` 的别名**:旧值 20 480 相对实际 7 788 宽了 2.6 倍,
348
+ * 拦不住任何东西;且它只量提示词,漏掉了 `render_ui` 入参 Schema 那约两分之一的成本。
349
+ * @deprecated 用 `CATALOG_PROMPT_MAX` / `CATALOG_SCHEMA_MAX`(`./budget`)。
295
350
  */
296
- declare const UI_CATALOG_PROMPT_BUDGET_BYTES = 20480;
351
+ declare const UI_CATALOG_PROMPT_BUDGET_BYTES: number;
352
+ //#endregion
353
+ //#region src/catalog/budget.d.ts
354
+ /**
355
+ * catalog 请求体积上限(0.11.0 分册 14 / AC-G20)的**数字单一来源**。
356
+ *
357
+ * 度量与报错格式在 `scripts/catalogBudget.mjs`(`check:contracts` 与 vitest 共用);
358
+ * 那边不重复这些数字,一律从本模块读——两处各写一份阈值就等于没有阈值。
359
+ *
360
+ * catalog 进入每一次 LLM 请求的有两处:系统提示词 `toPrompt()` 与
361
+ * `render_ui` 入参 `toJsonSchema()`。只量前者会漏掉约 2/3 的成本。
362
+ *
363
+ * **超阈值的处置是砍组件或收窄枚举取值,不是抬高这里的数字。**
364
+ */
365
+ /**
366
+ * 预算阶段。分册 12 是本版最后一处 catalog 增量(分册 11 只把 `date` 加进
367
+ * 已有的 `Field.type`,分册 23 不碰 catalog),故在此切到 `'final'`:
368
+ * 阈值收紧到实测终态 + 余量,且余量小于一个平均组件的成本
369
+ * ——余量大于一个组件,等于默许下一版无声塞进一个。
370
+ */
371
+ declare const CATALOG_BUDGET_STAGE: 'entry' | 'final';
372
+ /**
373
+ * 阈值 = **已落地实测** + 余量,余量须小于一个平均组件的成本。
374
+ *
375
+ * 2026-08-14 实测终态(分册 12 落地后):prompt 12 744 / schema 21 470,30 个组件。
376
+ * 平均组件成本 prompt 425 / schema 716。
377
+ * 当前余量 prompt 256 / schema 330,均小于一个平均组件——再加一个组件必红。
378
+ *
379
+ * ⚠️ **本版这两个数字被上调过两次**,两次都由需求方裁决并改写了需求文档
380
+ * (分册 29 §2 范围订正 第 7 条与 §2.2),不是实现阶段自行放宽:
381
+ *
382
+ * 1. 11 200 → 12 200 / 20 500 → 21 200:分册 13 组件描述由短改长。
383
+ * `example` 是既有护栏的硬要求(`catalog.test.ts` 与 `catalogMatrix.test.tsx`
384
+ * 逐个组件校验并四档渲染),靠省掉示例腾出的空间收不回来。
385
+ * 2. 12 200 → 13 000 / 21 200 → 21 800:分册 12 的 `Split` 实测 490 + 694,
386
+ * 超出计划增量(403 + 1 047)的 prompt 侧。需求方裁定
387
+ * 「描述要长,可用性大于预算阈值」——收紧措辞可省回 158 字节,
388
+ * 但砍的正是各组件「何时改用 X」的辨析句,即选型准确率本身。
389
+ *
390
+ * 两次上调合计把单请求成本从 21.7 KB 抬到约 34.2 KB。
391
+ * **AC-G20 原文「超了砍组件、不抬阈值」已被推翻,但仅限本版;
392
+ * 后续再撞顶仍须回到需求方,不得沿用本版作为先例。**
393
+ */
394
+ declare const CATALOG_PROMPT_MAX = 13000;
395
+ declare const CATALOG_SCHEMA_MAX = 21800;
396
+ /**
397
+ * **尚未落地**的计划增量。本版已无剩余 catalog 增量,故归零;
398
+ * `CATALOG_BUDGET_STAGE` 同时切到 `'final'`,余量改由「小于一个平均组件」判定。
399
+ */
400
+ declare const PLANNED_INCREMENT: {
401
+ readonly prompt: 0;
402
+ readonly schema: 0;
403
+ };
297
404
  //#endregion
298
405
  //#region src/catalog/formScopes.d.ts
299
406
  /** 声明树里一个 `Form` 的提交作用域。@experimental */
@@ -765,4 +872,4 @@ interface LoadedOpenUiPeers {
765
872
  */
766
873
  declare function loadOpenUiPeers(): Promise<LoadedOpenUiPeers>;
767
874
  //#endregion
768
- export { UiSpecIssue as $, MAX_CONDITION_DEPTH as A, interactionToUiSpec as At, UI_CATALOG_PROMPT_BUDGET_BYTES as B, resolveColumnWidths as Bt, FieldCondition as C, ensureStyles as Ct, InteractionTexts as D, fromUiSurfaceActionDispatch as Dt, InteractionSpecLabels as E, fromA2uiSurfaceAction as Et, SPEC_TABLE_MIN_COLUMN_VAR as F, qualifyFieldName as Ft, UiCatalogInput as G, toA2uiSurfaceAction as Gt, UI_PRESET_NAMES as H, resolveSurfaceFormTexts as Ht, SPEC_TABLE_MIN_COLUMN_WIDTH as I, renderBlocks as It, UiComponentDef as J, toUiSurfaceActionDispatch as Jt, UiCatalogPromptOptions as K, toJsonRenderSpec as Kt, SpecColumnMeta as L, renderMiniChart as Lt, OpenUiRendererProps as M, loadWebSkillLitCatalog as Mt, OpenUiRuntime as N, mountEchart as Nt, JsonRenderSpec as O, fromVercelToolResult as Ot, RENDER_UI_TOOL as P, normalizeColumnWidths as Pt, UiSpecDegradation as Q, SurfaceFormTexts as R, renderMiniMarkdown as Rt, EvaluateFieldConditionOptions as S, defineUiCatalog as St, FormModel as T, fromA2uiSpecAction as Tt, UiActionDef as U, shapeInteractionValue as Ut, UI_PRESETS as V, resolveInteractionTexts as Vt, UiCatalog as W, toA2uiSpecMessages as Wt, UiPreset as X, uiCatalog as Xt, UiFormScope as Y, toVercelToolInvocation as Yt, UiPresetName as Z, uiPreset as Zt, ControlModel as _, collectFormScopes as _t, A2UI_SURFACE_ACTION as a, VercelUiBridge as at, DESCRIBE_UI_PRESET_TOOL as b, collectValues as bt, A2uiCatalogDefinition as c, WEBSKILL_SURFACE_ACTION as ct, A2uiMessage as d, a2uiComponentSchema as dt, UiSpecSanitization as et, A2uiSpecActionEvent as f, a2uiComponentShapes as ft, ColumnWidthsRejection as g, chartToTable as gt, CollectedValues as h, chartSpecFromProps as ht, A2UI_SPEC_FORM_PATH as i, VercelToolInvocation as it, NormalizedColumnWidths as j, loadOpenUiPeers as jt, LoadedOpenUiPeers as k, interactionToFormModel as kt, A2uiCatalogHandle as l, WebFormBridge as lt, CHART_PALETTE as m, buildA2uiCatalogDefinition as mt, A2UI_COMMON_TYPES as n, UiSurfaceActionDispatch as nt, A2UI_VERSION as o, WEBSKILL_A2UI_CATALOG_ID as ot, A2uiSpecMessageOptions as p, applySuggestion as pt, UiCatalogToolSourceOptions as q, toOpenUiSpecLang as qt, A2UI_SPEC_ACTION as r, VERCEL_INTERACTION_TOOL_NAME as rt, A2uiCatalogComponent as s, WEBSKILL_STYLES_CSS as st, A2UI_BASIC_CATALOG_ID as t, UiSpecValidation as tt, A2uiComponentShape as u, ZodRuntime as ut, DEFAULT_INTERACTION_TEXTS as v, collectScopedValues as vt, FieldConditionResult as w, evaluateFieldCondition as wt, EchartHandle as x, createUiCatalogToolSource as xt, DEFAULT_SURFACE_FORM_TEXTS as y, collectSpecActions as yt, UI_CATALOG_GROUPS as z, renderRenderResult as zt };
875
+ export { UiCatalogToolSourceOptions as $, resolveColumnWidths as $t, FormModel as A, collectSpecActions as At, RENDER_UI_TOOL as B, gaugePercent as Bt, DESCRIBE_UI_PRESET_TOOL as C, a2uiComponentShapes as Ct, EvaluateFieldConditionOptions as D, chartToTable as Dt, EchartHandle as E, chartSpecFromProps as Et, MAX_CONDITION_DEPTH as F, evaluateFieldCondition as Ft, UI_CATALOG_GROUPS as G, mountEchart as Gt, SPEC_TABLE_MIN_COLUMN_WIDTH as H, interactionToUiSpec as Ht, NormalizedColumnWidths as I, fromA2uiSpecAction as It, UI_PRESET_NAMES as J, qualifyFieldName as Jt, UI_CATALOG_PROMPT_BUDGET_BYTES as K, mountViewerComponents as Kt, OpenUiRendererProps as L, fromA2uiSurfaceAction as Lt, InteractionTexts as M, createUiCatalogToolSource as Mt, JsonRenderSpec as N, defineUiCatalog as Nt, FieldCondition as O, collectFormScopes as Ot, LoadedOpenUiPeers as P, ensureStyles as Pt, UiCatalogPromptOptions as Q, renderRenderResult as Qt, OpenUiRuntime as R, fromUiSurfaceActionDispatch as Rt, DEFAULT_SURFACE_FORM_TEXTS as S, a2uiComponentSchema as St, DocumentComponentName as T, buildA2uiCatalogDefinition as Tt, SpecColumnMeta as U, loadOpenUiPeers as Ut, SPEC_TABLE_MIN_COLUMN_VAR as V, interactionToFormModel as Vt, SurfaceFormTexts as W, loadWebSkillLitCatalog as Wt, UiCatalog as X, renderMiniChart as Xt, UiActionDef as Y, renderBlocks as Yt, UiCatalogInput as Z, renderMiniMarkdown as Zt, CHART_PALETTE as _, WEBSKILL_A2UI_CATALOG_ID as _t, A2UI_SURFACE_ACTION as a, toJsonRenderSpec as an, UiSpecDegradationCode as at, ControlModel as b, WebFormBridge as bt, A2uiCatalogDefinition as c, toVercelToolInvocation as cn, UiSpecValidation as ct, A2uiMessage as d, VIEWER_COMPONENT_ATTR as dt, resolveInteractionTexts as en, UiComponentDef as et, A2uiSpecActionEvent as f, VIEWER_FALLBACK_ATTR as ft, CATALOG_SCHEMA_MAX as g, ViewerComponentsHandle as gt, CATALOG_PROMPT_MAX as h, VercelUiBridge as ht, A2UI_SPEC_FORM_PATH as i, toA2uiSurfaceAction as in, UiSpecDegradation as it, InteractionSpecLabels as j, collectValues as jt, FieldConditionResult as k, collectScopedValues as kt, A2uiCatalogHandle as l, uiCatalog as ln, UiSurfaceActionDispatch as lt, CATALOG_BUDGET_STAGE as m, VercelToolInvocation as mt, A2UI_COMMON_TYPES as n, shapeInteractionValue as nn, UiPreset as nt, A2UI_VERSION as o, toOpenUiSpecLang as on, UiSpecIssue as ot, A2uiSpecMessageOptions as p, VIEWER_PROPS_ATTR as pt, UI_PRESETS as q, normalizeColumnWidths as qt, A2UI_SPEC_ACTION as r, toA2uiSpecMessages as rn, UiPresetName as rt, A2uiCatalogComponent as s, toUiSurfaceActionDispatch as sn, UiSpecSanitization as st, A2UI_BASIC_CATALOG_ID as t, resolveSurfaceFormTexts as tn, UiFormScope as tt, A2uiComponentShape as u, uiPreset as un, VERCEL_INTERACTION_TOOL_NAME as ut, CollectedValues as v, WEBSKILL_STYLES_CSS as vt, DOCUMENT_COMPONENTS as w, applySuggestion as wt, DEFAULT_INTERACTION_TEXTS as x, ZodRuntime as xt, ColumnWidthsRejection as y, WEBSKILL_SURFACE_ACTION as yt, PLANNED_INCREMENT as z, fromVercelToolResult as zt };
@@ -1,5 +1,5 @@
1
- import { a as InteractionOrigin, c as InteractionResponse, s as InteractionRequest, x as UiBridge } from "./types-B3n0cMZu-BDhheIhX.js";
2
- import { k as ExternalToolSource } from "./index-znZjobkr.js";
1
+ import { G as RemoteUrlPolicy, S as UiBridge, Tt as WebSkillErrorCode, a as InteractionOrigin, c as InteractionResponse, s as InteractionRequest } from "./types-C26b05fW-CdrRCRDb.js";
2
+ import { F as ExternalToolSource } from "./index-D3mONFHD.js";
3
3
  //#region ../agent/dist/index.d.ts
4
4
  //#region src/todo/types.d.ts
5
5
  /** 待办条目状态:未开始 / 进行中 / 已完成(FR-3.1) */
@@ -134,6 +134,13 @@ interface SkillGeneratorOptions {
134
134
  /** 生成所属会话,写入审计与候选 metadata */
135
135
  sessionId?: () => string | undefined;
136
136
  now?: () => Date;
137
+ /** 界面文案注入口:生成器与语言无关,字典在宿主手里(UI-UX5 #9) */
138
+ messages?: SkillGenerationMessages;
139
+ }
140
+ /** 生成器面向用户的文案;缺省全部为英文模板 */
141
+ interface SkillGenerationMessages {
142
+ /** 授权确认卡的正文(含技能名与描述插值由实现方完成) */
143
+ confirmSkill?(draft: GeneratedSkillDraft): string;
137
144
  }
138
145
  /**
139
146
  * 技能自动生成策略。生成动作是策略而不是内核:它不进入 `AgentLoop`,
@@ -301,11 +308,54 @@ interface PerceptionScope {
301
308
  /** 从 include 子树中剪除的敏感区域(凭据输入、个人信息展示区等) */
302
309
  exclude?: readonly string[];
303
310
  }
311
+ /**
312
+ * 一个帧内的可感知范围(FR-24.1)。
313
+ *
314
+ * `frame` 的选择器在**主文档**里求值,不下钻到 iframe 内部再找 iframe:
315
+ * 允许 `a > b > c` 式的跨帧路径会让「授权面到底覆盖了什么」无法在配置里一眼看出来。
316
+ * 要读更深的帧须再写一条——而那条也只能写主文档里的选择器,所以本版实际只支持一层。
317
+ * @experimental
318
+ */
319
+ interface FrameScope {
320
+ /** 主文档写 `'self'`;iframe 写主文档里定位该 `<iframe>` 的选择器 */
321
+ frame: 'self' | string;
322
+ include: readonly string[];
323
+ exclude?: readonly string[];
324
+ }
325
+ /**
326
+ * 宿主声明的感知范围:单帧(旧形状)或多帧。
327
+ *
328
+ * 保留旧形状不是为了好看——AC-24.9 要求宿主不改配置也能升级。
329
+ * @experimental
330
+ */
331
+ type PerceptionScopeInput = PerceptionScope | {
332
+ frames: readonly FrameScope[];
333
+ };
334
+ /**
335
+ * 两种形状归一成帧列表;旧形状等价于一条 `frame:'self'`(FR-24.1)。
336
+ *
337
+ * **这是判别的单一来源。** 散在各处写 `'frames' in scope` 会让
338
+ * 「旧配置还等价吗」这个问题没有唯一答案。
339
+ * @experimental
340
+ */
341
+ declare function toFrameScopes(scope: PerceptionScopeInput): readonly FrameScope[];
342
+ /** 某个帧未能读取的原因(FR-24.2 / FR-24.3);不静默跳过 @experimental */
343
+ interface FrameNote {
344
+ frame: string;
345
+ reason: 'cross-origin' | 'origin-changed' | 'not-found';
346
+ /** 面向模型的英文说明,同时也是说明节点的 name */
347
+ message: string;
348
+ }
304
349
  /**
305
350
  * 结构化元素描述(FR-10.4,硬约束):只有角色、名称、值。
306
351
  *
307
- * 不下发 HTML 原文有两条理由:HTML 里的 class / data 属性 / 注释远超模型
308
- * 完成任务所需;且页面文本一旦以 HTML 形式进上下文,就多了一条注入通道。
352
+ * 仍**不下发 HTML 原文**:HTML 里的 class / data 属性 / 注释远超模型完成任务所需;
353
+ * 且页面文本一旦以 HTML 形式进上下文,就多了一条注入通道。
354
+ *
355
+ * **链接 URL 是显式放行的例外**(0.11.0 分册 22,FR-22.1/22.2)。
356
+ * 它的风险不再由「不下发」承担,而是由取数侧的四道闸门共同承担:
357
+ * 同源判定、跨源逐次确认、`assertRemoteUrlAllowed`、审计留痕。
358
+ * 放行的只有 `href` 这一个属性,其余属性照旧不下发。
309
359
  * @experimental
310
360
  */
311
361
  interface PerceivedNode {
@@ -325,6 +375,23 @@ interface PerceivedNode {
325
375
  * 由 reader 生成,只在产生它的那次感知内有效;模型不得构造或推断。
326
376
  */
327
377
  ref?: string;
378
+ /**
379
+ * 该节点来自哪个帧(FR-24.4)。**主文档节点不带这个字段**——
380
+ * 否则旧宿主的断言会凭空变化。跨帧后会出现同名控件,不标帧模型会点错。
381
+ */
382
+ frame?: string;
383
+ /**
384
+ * 链接目标(FR-22.1)。**仅 `role === 'link'` 的节点有**,且只有感知白名单
385
+ * 区域内的链接才有。URL **原样**保留,不去 query —— 去掉会让 `?share=…`
386
+ * 这类链接失效,而 query 里的敏感信息本就不该由感知层来猜。
387
+ */
388
+ href?: string;
389
+ /**
390
+ * 该节点为何可见(FR-25.6 / AC-G22)。只在**授权面被临时扩大**时出现:
391
+ * `'modal-elevated'` = 它在一个由本次已授权操作打开的对话框里,
392
+ * 原本不在白名单内。缺省不带该字段。
393
+ */
394
+ provenance?: 'modal-elevated';
328
395
  children?: readonly PerceivedNode[];
329
396
  }
330
397
  /** 随感知一起下发的一张图像(FR-12.1) @experimental */
@@ -355,6 +422,8 @@ interface PerceptionCaptureOptions {
355
422
  */
356
423
  interface PerceptionResult {
357
424
  nodes: readonly PerceivedNode[];
425
+ /** 被跳过的帧及原因;调用方据此告警(FR-24.2 / FR-24.3) */
426
+ frameNotes?: readonly FrameNote[];
358
427
  images?: readonly PerceivedImage[];
359
428
  /** 超出 `maxImages` 而未下发的张数 */
360
429
  imagesOmitted?: number;
@@ -369,15 +438,17 @@ interface PerceptionResult {
369
438
  * @experimental
370
439
  */
371
440
  interface PagePerceptionReader {
372
- read(scope: PerceptionScope, capture?: PerceptionCaptureOptions): Promise<readonly PerceivedNode[] | PerceptionResult> | readonly PerceivedNode[] | PerceptionResult;
441
+ read(scope: PerceptionScopeInput, capture?: PerceptionCaptureOptions): Promise<readonly PerceivedNode[] | PerceptionResult> | readonly PerceivedNode[] | PerceptionResult;
373
442
  }
374
443
  /** 一次感知的留痕(FR-10.5 的 UI 提示与 FR-10.6 的审计共用同一条记录) @experimental */
375
444
  interface PerceptionRecord {
376
445
  /** ISO 8601 */
377
446
  at: string;
378
- /** 本次实际生效的白名单 */
447
+ /** 本次实际生效的白名单(多帧时是各帧的并集) */
379
448
  include: readonly string[];
380
449
  exclude: readonly string[];
450
+ /** 本次读取的帧标识;单帧配置时不存在,旧宿主的断言不受影响(FR-24.6) */
451
+ frames?: readonly string[];
381
452
  /** 读到的顶层节点数;用于「它读的比我预期的多」这类判断 */
382
453
  nodeCount: number;
383
454
  /** 本次下发的图像张数,按取像级别分组(只在取像开启时存在) */
@@ -411,12 +482,14 @@ type PerceptionAuditSink = PageAuditSink;
411
482
  //#region src/perception/policy.d.ts
412
483
  interface PagePerceptionPolicyOptions {
413
484
  /** 宿主声明的白名单;`include` 为空即整个能力不可用 */
414
- scope: PerceptionScope;
485
+ scope: PerceptionScopeInput;
415
486
  reader: PagePerceptionReader;
416
487
  /** FR-10.6:每次感知写审计。不注入即不留痕,装配方要自己承担这个选择 */
417
488
  audit?: PerceptionAuditSink;
418
489
  /** 审计事件的 target(缺省 `page`);多页面宿主可用它区分来源 */
419
490
  auditTarget?: string;
491
+ /** 帧被跳过时的告警出口(跨源、origin 变更、找不到);FR-24.3 要求「失效并告警」 */
492
+ onWarning?(message: string): void;
420
493
  now?(): string;
421
494
  }
422
495
  /**
@@ -435,7 +508,7 @@ declare class PagePerceptionPolicy {
435
508
  constructor(options: PagePerceptionPolicyOptions);
436
509
  /** 白名单为空即不可用(FR-10.1/10.2):宿主没声明范围就没有这个能力 */
437
510
  get enabled(): boolean;
438
- get scope(): PerceptionScope;
511
+ get scope(): PerceptionScopeInput;
439
512
  /** 最近的感知记录(console 只读展示用),新的在前 */
440
513
  get records(): readonly PerceptionRecord[];
441
514
  /** FR-10.5:感知发生时通知 UI,chatbot 据此在消息流里标注一行 */
@@ -483,6 +556,100 @@ declare function createPagePerceptionToolSource(options: PagePerceptionToolSourc
483
556
  */
484
557
  declare const PERCEPTION_SYSTEM_PROMPT: string;
485
558
  //#endregion
559
+ //#region src/dataSource/policy.d.ts
560
+ /** 数据源的四种通道(FR-16.2);后三种的通道由分册 24/26/27 建立,本层只做消费 */
561
+ type DataSourceKind = 'page-perception' | 'webmcp-tool' | 'http' | 'page-skill';
562
+ /**
563
+ * 宿主声明的一个数据源。
564
+ *
565
+ * **`target` 由宿主写死,脚本传不进来**——这就是 FR-16.2「唯一授权面」的实现方式。
566
+ * `assertRemoteUrlAllowed` 只判 scheme 与私有地址,**给不了**域名白名单,
567
+ * 所以授权靠的是「URL 根本不由脚本提供」,那个函数是第二道闸门。
568
+ * @experimental
569
+ */
570
+ interface DataSourceDef {
571
+ id: string;
572
+ kind: DataSourceKind;
573
+ /** 给技能作者看的一句话;不进模型上下文 */
574
+ description: string;
575
+ /** 按 kind 各异:选择器 / 工具名 / URL / 技能名 */
576
+ target: string;
577
+ }
578
+ /** 一次取数的留痕(FR-16.4);被拒也要记,否则「反复试探未授权的源」在审计里看不见 */
579
+ interface DataSourceRecord {
580
+ /** ISO 8601 */
581
+ at: string;
582
+ sourceId: string;
583
+ kind?: DataSourceKind;
584
+ ok: boolean;
585
+ /** 成功时的结果字节数 */
586
+ bytes?: number;
587
+ /** 失败时的稳定错误码 */
588
+ code?: WebSkillErrorCode;
589
+ reason?: string;
590
+ }
591
+ interface DataSourceAuditSink {
592
+ record(event: DataSourceRecord): void | Promise<void>;
593
+ }
594
+ /** 取数的实际执行;`http` 之外的三种由各自分册接线后注入(FR-16.3) */
595
+ interface DataSourceTransport {
596
+ fetch(source: DataSourceDef, params?: Record<string, unknown>): Promise<unknown>;
597
+ }
598
+ interface DataSourcePolicyOptions {
599
+ sources: readonly DataSourceDef[];
600
+ /**
601
+ * `kind:'http'` 的出站判定;缺省即 assertRemoteUrlAllowed 的缺省。
602
+ *
603
+ * 传函数形式可惰性取值:宿主的出站策略通常住在可改的运行时配置里,
604
+ * 写死成字面量会让改完设置必须刷新页面才生效。
605
+ */
606
+ remoteUrl?: RemoteUrlPolicy | (() => RemoteUrlPolicy | Promise<RemoteUrlPolicy>);
607
+ /** 按 kind 注入的执行器;缺失的 kind 调用时报「宿主未提供该通道」 */
608
+ transports?: Partial<Record<DataSourceKind, DataSourceTransport>>;
609
+ /** 结果字节上限(FR-16.6);超出即拒绝,**不截断** */
610
+ maxBytes?: number;
611
+ audit?: DataSourceAuditSink;
612
+ now?(): string;
613
+ }
614
+ /**
615
+ * 脚本取数策略(分册 16)。
616
+ *
617
+ * 与 `PagePerceptionPolicy` / `PageActionPolicy` 同款:**未注入即该能力不存在**。
618
+ * 脚本侧看到的是 `context.fetchData === undefined`,不是一个会报错的函数。
619
+ * @experimental
620
+ */
621
+ declare class DataSourcePolicy {
622
+ #private;
623
+ constructor(options: DataSourcePolicyOptions);
624
+ /** 一个源都没声明就没有这个能力(同 perception 的 include 为空) */
625
+ get enabled(): boolean;
626
+ get sources(): readonly DataSourceDef[];
627
+ get records(): readonly DataSourceRecord[];
628
+ fetchData(sourceId: string, params?: Record<string, unknown>): Promise<unknown>;
629
+ }
630
+ //#endregion
631
+ //#region src/dataSource/httpTransport.d.ts
632
+ interface HttpDataSourceOptions {
633
+ /**
634
+ * 注入点存在只为可测(AC-16.1 要断「零请求」,得能数调用次数)。
635
+ * 生产装配留空即用全局 fetch。
636
+ */
637
+ fetch?: typeof globalThis.fetch;
638
+ /** 宿主侧固定请求头,例如网关鉴权;**脚本改不了** */
639
+ headers?: Readonly<Record<string, string>>;
640
+ /** 单次请求超时,缺省 15s;卡死的上游会一直占着沙箱的一次调用 */
641
+ timeoutMs?: number;
642
+ }
643
+ /**
644
+ * `kind:'http'` 的搬运层(分册 16 §2.3 本册唯一新建通道)。
645
+ *
646
+ * `params` 一律走查询串,**不拼进 path**:拼 path 的话
647
+ * `params={ x: '../admin' }` 就能把目标挪走,那样 `target` 写死就白写了
648
+ * ——「唯一授权面」是靠目标不可被脚本影响撑住的(FR-16.2)。
649
+ * @experimental
650
+ */
651
+ declare function createHttpDataSourceTransport(options?: HttpDataSourceOptions): DataSourceTransport;
652
+ //#endregion
486
653
  //#region src/pageAction/types.d.ts
487
654
  /**
488
655
  * 页面操作的策略层类型(需求 23)。
@@ -504,14 +671,49 @@ interface PageActionScope {
504
671
  /** 从 include 子树中剪除的危险控件(支付、删除、权限变更等) */
505
672
  exclude?: readonly string[];
506
673
  }
507
- /** 本版的最小操作集(FR-23.4)。导航、拖拽、滚动均不在内。 @experimental */
508
- type PageActionKind = 'click' | 'fill' | 'submit';
674
+ /**
675
+ * 一个帧内的可操作范围(FR-24.1)。
676
+ *
677
+ * 与感知侧的 `FrameScope` 同构但**独立声明**,理由同上:合并成一个类型会让
678
+ * 「一份配置同时当感知范围和操作范围用」在类型层面合法。
679
+ * @experimental
680
+ */
681
+ interface ActionFrameScope {
682
+ /** 主文档写 `'self'`;iframe 写主文档里定位该 `<iframe>` 的选择器 */
683
+ frame: 'self' | string;
684
+ include: readonly string[];
685
+ exclude?: readonly string[];
686
+ }
687
+ /** 宿主声明的操作范围:单帧(旧形状)或多帧。旧形状必须继续可用(AC-24.9) @experimental */
688
+ type PageActionScopeInput = PageActionScope | {
689
+ frames: readonly ActionFrameScope[];
690
+ };
691
+ /**
692
+ * 两种形状归一成帧列表;旧形状等价于一条 `frame:'self'`。
693
+ * 与感知侧的 `toFrameScopes` 一样,是本侧判别的**单一来源**。
694
+ * @experimental
695
+ */
696
+ declare function toActionFrameScopes(scope: PageActionScopeInput): readonly ActionFrameScope[];
697
+ /**
698
+ * 本版的操作集(FR-25.1)。导航、拖拽、滚动仍不在内。
699
+ *
700
+ * `select`/`set`/`attach` 与既有三个走**同一条** policy 路径,
701
+ * 范围白名单、逐次确认、审计三条硬约束因此天然覆盖到它们——
702
+ * 前提是新动作不绕过 policy 直接调执行器(AC-25.4 守这一点)。
703
+ * @experimental
704
+ */
705
+ declare const PAGE_ACTION_KINDS: readonly ["click", "fill", "submit", "select", "set", "attach"];
706
+ type PageActionKind = (typeof PAGE_ACTION_KINDS)[number];
509
707
  /** @experimental */
510
708
  interface PageActionRequest {
511
709
  /** 感知产出的不透明句柄;不接受选择器(FR-23.4) */
512
710
  ref: string;
513
711
  action: PageActionKind;
514
- /** `action === 'fill'` 时必填 */
712
+ /**
713
+ * `fill` 填入的文本;`select` 要选中的选项可访问名;
714
+ * `set` 的目标态(`'true'` | `'false'`)。`attach` 不用它——
715
+ * 文件**始终由用户在确认卡里选**,Agent 传不进本地路径(FR-25.5)。
716
+ */
515
717
  value?: string;
516
718
  }
517
719
  /** @experimental */
@@ -525,9 +727,17 @@ interface PageActionOutcome {
525
727
  target: {
526
728
  role: string;
527
729
  name?: string;
730
+ frame?: string;
528
731
  };
529
732
  /** 目标是密码类控件:确认卡与留痕据此隐去值(FR-23.3) */
530
733
  secret?: boolean;
734
+ /**
735
+ * `set` 判定当前态已是目标态,因此**没有真的操作**(FR-25.4)。
736
+ * 仍返回 `ok: true`:返回失败模型会重试,假装点了审计会失真。
737
+ */
738
+ noop?: boolean;
739
+ /** 本次操作新打开的模态的可访问名;授权面临时扩大要在留痕里看得见(FR-25.6) */
740
+ elevatedModal?: string;
531
741
  /** 失败原因(英文) */
532
742
  reason?: string;
533
743
  }
@@ -543,6 +753,8 @@ interface PageActionExecutor {
543
753
  role: string;
544
754
  name?: string;
545
755
  secret?: boolean;
756
+ frame?: string;
757
+ elevated?: boolean;
546
758
  } | undefined;
547
759
  }
548
760
  /** 一次页面操作的留痕(FR-23.3 的五项字段) @experimental */
@@ -552,9 +764,17 @@ interface PageActionRecord {
552
764
  action: PageActionKind;
553
765
  role: string;
554
766
  name?: string;
767
+ /** 目标所在的帧;主文档目标不带该字段(FR-24.6) */
768
+ frame?: string;
555
769
  /** 是否经用户确认;宿主预授权的操作记 `'preauthorized'` */
556
770
  approved: boolean | 'preauthorized';
557
771
  ok: boolean;
772
+ /** 目标位于本次会话中被提升的模态里(授权面临时扩大,FR-25.6 / AC-G22) */
773
+ elevated?: boolean;
774
+ /** 本次操作新打开的模态 */
775
+ elevatedModal?: string;
776
+ /** 当前态已是目标态,未执行任何操作(FR-25.4) */
777
+ noop?: boolean;
558
778
  /** 非密码类控件填入的值;密码类控件**整个字段不存在** */
559
779
  value?: string;
560
780
  reason?: string;
@@ -567,7 +787,7 @@ interface PageActionUi {
567
787
  }
568
788
  interface PageActionPolicyOptions {
569
789
  /** 宿主声明的可操作范围;`include` 为空即整个能力不可用 */
570
- scope: PageActionScope;
790
+ scope: PageActionScopeInput;
571
791
  executor: PageActionExecutor;
572
792
  ui: PageActionUi;
573
793
  /** FR-23.3:每次操作写审计。不注入即不留痕,装配方要自己承担这个选择 */
@@ -593,7 +813,7 @@ declare class PageActionPolicy {
593
813
  constructor(options: PageActionPolicyOptions);
594
814
  /** 白名单为空即不可用(FR-23.1):宿主没声明范围就没有这个能力 */
595
815
  get enabled(): boolean;
596
- get scope(): PageActionScope;
816
+ get scope(): PageActionScopeInput;
597
817
  /** 最近的操作记录(只读展示用),新的在前 */
598
818
  get records(): readonly PageActionRecord[];
599
819
  act(request: PageActionRequest): Promise<PageActionOutcome>;
@@ -622,4 +842,4 @@ declare function createPageActionToolSource(options: PageActionToolSourceOptions
622
842
  */
623
843
  declare const PAGE_ACTION_SYSTEM_PROMPT: string;
624
844
  //#endregion
625
- export { TodoListener as $, PagePerceptionReader as A, SKILL_GENERATION_SYSTEM_PROMPT as B, PageActionRequest as C, PageAuditSink as D, PageActionUi as E, PerceptionAuditSink as F, SkillGenerator as G, SkillGenerationOutcome as H, PerceptionCaptureOptions as I, SubAgentRunner as J, SkillGeneratorOptions as K, PerceptionRecord as L, ParentBudget as M, PerceivedImage as N, PagePerceptionPolicy as O, PerceivedNode as P, TodoList as Q, PerceptionResult as R, PageActionRecord as S, PageActionToolSourceOptions as T, SkillGenerationPolicy as U, SkillCandidateSink as V, SkillGenerationToolSourceOptions as W, TodoEvent as X, TODO_SYSTEM_PROMPT as Y, TodoItem as Z, PageActionExecutor as _, DelegationOrchestratorOptions as a, createPagePerceptionToolSource as at, PageActionPolicy as b, DelegationToolSourceOptions as c, withDelegationOrigin as ct, ImageCaptureBudget as d, TodoStatus as et, MANAGE_TODO_TOOL as f, PERCEPTION_SYSTEM_PROMPT as g, PERCEIVE_PAGE_TOOL as h, DelegationOrchestrator as i, createPageActionToolSource as it, PagePerceptionToolSourceOptions as j, PagePerceptionPolicyOptions as k, GENERATE_SKILL_TOOL as l, PAGE_ACTION_TOOL as m, DELEGATION_SYSTEM_PROMPT as n, TodoToolSourceOptions as nt, DelegationRequest as o, createSkillGenerationToolSource as ot, PAGE_ACTION_SYSTEM_PROMPT as p, SubAgentRunInput as q, DelegationBudget as r, createDelegationToolSource as rt, DelegationResult as s, createTodoToolSource as st, DELEGATE_TASK_TOOL as t, TodoStore as tt, GeneratedSkillDraft as u, PageActionKind as v, PageActionScope as w, PageActionPolicyOptions as x, PageActionOutcome as y, PerceptionScope as z };
845
+ export { PerceptionScopeInput as $, PageActionKind as A, PageAuditSink as B, MANAGE_TODO_TOOL as C, createTodoToolSource as Ct, PERCEIVE_PAGE_TOOL as D, PAGE_ACTION_TOOL as E, withDelegationOrigin as Et, PageActionRequest as F, ParentBudget as G, PagePerceptionPolicyOptions as H, PageActionScope as I, PerceptionAuditSink as J, PerceivedImage as K, PageActionScopeInput as L, PageActionPolicy as M, PageActionPolicyOptions as N, PERCEPTION_SYSTEM_PROMPT as O, PageActionRecord as P, PerceptionScope as Q, PageActionToolSourceOptions as R, ImageCaptureBudget as S, createSkillGenerationToolSource as St, PAGE_ACTION_SYSTEM_PROMPT as T, toFrameScopes as Tt, PagePerceptionReader as U, PagePerceptionPolicy as V, PagePerceptionToolSourceOptions as W, PerceptionRecord as X, PerceptionCaptureOptions as Y, PerceptionResult as Z, FrameNote as _, TodoToolSourceOptions as _t, DataSourceDef as a, SkillGenerationToolSourceOptions as at, GeneratedSkillDraft as b, createPageActionToolSource as bt, DataSourcePolicyOptions as c, SubAgentRunInput as ct, DelegationBudget as d, TodoEvent as dt, SKILL_GENERATION_SYSTEM_PROMPT as et, DelegationOrchestrator as f, TodoItem as ft, DelegationToolSourceOptions as g, TodoStore as gt, DelegationResult as h, TodoStatus as ht, DataSourceAuditSink as i, SkillGenerationPolicy as it, PageActionOutcome as j, PageActionExecutor as k, DataSourceRecord as l, SubAgentRunner as lt, DelegationRequest as m, TodoListener as mt, DELEGATE_TASK_TOOL as n, SkillGenerationMessages as nt, DataSourceKind as o, SkillGenerator as ot, DelegationOrchestratorOptions as p, TodoList as pt, PerceivedNode as q, DELEGATION_SYSTEM_PROMPT as r, SkillGenerationOutcome as rt, DataSourcePolicy as s, SkillGeneratorOptions as st, ActionFrameScope as t, SkillCandidateSink as tt, DataSourceTransport as u, TODO_SYSTEM_PROMPT as ut, FrameScope as v, createDelegationToolSource as vt, PAGE_ACTION_KINDS as w, toActionFrameScopes as wt, HttpDataSourceOptions as x, createPagePerceptionToolSource as xt, GENERATE_SKILL_TOOL as y, createHttpDataSourceTransport as yt, PageActionUi as z };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { $ as SignatureVerdict, $t as stripArchiveRoot, A as ATOMIC_TMP_SUFFIX_PATTERN, At as checkDependencyCycles, B as MANIFEST_EXCLUDED_FILES, Bt as keyIdOf, C as UiSpecDrafts, Ct as WebSkillError, D as UiSurfaceActionRequest, Dt as atomicWriteText, E as UiSpecSnapshot, Et as assertSafePathSegment, F as DiscoveryResult, Ft as escapeXml, G as SIGNATURE_SCHEMA_VERSION, Gt as readResponseWithLimit, H as Page, Ht as normalizePath, I as FileStat, It as exportSkills, J as SKILL_NAME_MAX_LENGTH, Jt as renderCatalogJson, K as SKILLS_LOCKFILE, Kt as readSkillSignature, L as FileSystemProvider, Lt as isAtomicTempPath, M as CatalogRenderer, Mt as computeDigest, N as CryptoKeyLike, Nt as detectSkillArchiveShape, O as UiSurfaceActionResponse, Ot as buildCatalog, P as DEFAULT_ARCHIVE_LIMITS, Pt as detectSkillArchiveShapeFromFs, Q as SignatureAuditSink, Qt as signaturePayloadBytes, R as FsTrustedKeyStore, Rt as isValidSkillName, S as UiSpecActionCapability, St as VerifyResult, T as UiSpecPatch, Tt as assertRemoteUrlAllowed, U as PageQuery, Ut as parseSkillMarkdown, V as MemoryFS, Vt as messageOf, W as RemoteUrlPolicy, Wt as parseSkillPackManifest, X as SKILL_PACK_FILE, Xt as resolveInsideRoot, Y as SKILL_NAME_PATTERN, Yt as resolveArchiveLimits, Z as SKILL_SIGNATURE_FILE, Zt as signSkill, _ as MemoryStore, _t as TrustedKey, a as InteractionOrigin, at as SkillDocument, b as SkillCandidateMarker, bt as UnsignedPolicy, c as InteractionResponse, ct as SkillLocation, d as LlmContentPart, dt as SkillMetadata, en as unzipWithLimits, et as SkillArchiveDetection, f as LlmMessage, ft as SkillPackManifest, g as LlmToolSpec, gt as SkillsLockfile, h as LlmToolCall, ht as SkillSource, i as FormField, in as xmlRenderer, it as SkillDiscovery, j as ArchiveLimits, jt as checkSkillRules, k as extractSkillCandidate, kt as buildManifest, l as LlmClient, lt as SkillManagerPort, m as LlmStreamEvent, mt as SkillSignature, n as ArtifactStore, nn as verifyManifest, nt as SkillCatalog, o as InteractionPolicy, ot as SkillInstallSource, p as LlmResponse, pt as SkillReader, q as SKILL_MANIFEST_FILE, qt as renderAvailableSkillsXml, r as ChartSpec, rn as verifySkillSignature, rt as SkillCatalogEntry, s as InteractionRequest, st as SkillIssue, t as Artifact, tn as validateSkills, tt as SkillArchiveShape, u as LlmCompleteInput, ut as SkillManifest, v as RenderBlock, vt as TrustedKeyStore, w as UiSpecEvent, wt as WebSkillErrorCode, x as UiBridge, xt as ValidationReport, y as RenderResultRequest, yt as UiSpecNode, z as JsonSchema, zt as jsonRenderer } from "./types-B3n0cMZu-BDhheIhX.js";
2
- import { $ as READ_SKILL_FILE_INPUT_SCHEMA, $n as scriptToolName, $t as TraceRecorder, A as FS_SESSION_PAGE_SIZE, An as interruptedToolResult, At as SerializingMemoryStore, B as HookRunnerOptions, Bn as normalizeToolError, Bt as SkillScriptSchemaSource, C as DEFAULT_LOOP_LIMITS, Cn as extractChartSpec, Ct as SESSION_SCHEMA_VERSION, D as ExecuteLifecycleData, Dn as formatSkillScriptManifest, Dt as SealOptions, E as EventBus, En as findUnpairedToolCalls, Et as ScriptExecutor, F as FsSessionStore, Fn as mergeProfileEntries, Ft as SkillFailureReport, G as LifecycleEventInit, Gn as readProfileEntries, Gt as TodoTraceEvent, H as IntegrityVerdict, Hn as parseUserProfileExport, Ht as SkillSuccessReport, I as FullDisclosureRouter, In as networkPolicyLibSource, It as SkillIntegrityGuard, J as LifecycleListener, Jn as renderUserProfileContext, Jt as ToolResolution, K as LifecycleHook, Kn as readUserProfile, Kt as ToolContent, L as GoogleGenAiClient, Ln as networkUrlHost, Lt as SkillOutcomeReporter, M as FsMemoryStore, Mn as isUnsupportedRunSnapshot, Mt as SessionMeta, N as FsRunSnapshotStore, Nn as listSkillScripts, Nt as SessionRecord, O as ExternalSkillProvider, On as fromVercelResult, Ot as SealRecord, P as FsRunTraceStore, Pn as mergeCatalogEntries, Pt as SessionStore, Q as ProgressiveRouter, Qn as schemaToForm, Qt as TraceEventType, R as GoogleGenAiClientConfig, Rn as normalizeErrorCode, Rt as SkillRouter, S as CapabilityMode, Sn as exportUserProfile, St as RuntimeSessionHandle, T as EMPTY_USER_PROFILE, Tn as extractUiSpecEvents, Tt as ScriptExecutionContext, U as InteractLifecycleData, Un as partsToText, Ut as TerminalLifecycleData, V as InstalledSkillManifest, Vn as parseBridgeRequest, Vt as SkillStateGuard, W as LifecycleEvent, Wn as readBehaviorRecords, Wt as TextualToolContent, X as OpenAiCompatibleClient, Xn as sampleBehaviorRecords, Xt as TraceClock, Y as NetworkPolicy, Yn as resolveToolName, Yt as ToolResult, Z as OpenAiCompatibleClientConfig, Zn as schemaSourceLabel, Zt as TraceEvent, _ as BridgeCapabilities, _n as bridgeError, _t as RunTraceStore, a as ActivateLifecycleData, an as UnsupportedRunSnapshot, ar as toVercelToolSpecs, at as RouteLifecycleData, b as BridgeResponse, bn as createWebSkillApi, bt as RuntimeRun, c as AgentLoopDeps, cn as UserProfileExport, ct as RunResult, d as ApprovalDecision, dn as VercelToolSpec, dt as RunSnapshotStore, en as USER_PROFILE_EXPORT_VERSION, er as sealToolCallPairs, et as READ_SKILL_FILE_TOOL, f as ApprovalScope, fn as WebSkillApi, ft as RunTerminationReason, g as BehaviorScene, gn as applyUserProfileImport, gt as RunTraceMetrics, h as BehaviorRecordKind, hn as appendBehaviorRecords, ht as RunTraceFilter, i as ASK_USER_TOOL_NAME, in as USER_PROFILE_REFINE_PROMPT, ir as toRecordDigests, it as RefineUserProfileInput, j as FsArtifactStore, jn as isNetworkAllowed, jt as SessionListPage, k as ExternalToolSource, kn as fromVercelStreamPart, kt as SealResult, l as AnthropicClient, ln as UserProfileImportDiff, lt as RunSnapshot, m as BehaviorRecord, mn as WebSkillRuntimeDeps, mt as RunTraceFile, n as ASK_USER_INPUT_SCHEMA, nn as USER_PROFILE_NO_INVENTION_RULE, nr as textParts, nt as RUN_SNAPSHOT_SCHEMA_VERSION, o as AgentLoop, on as UserProfile, or as validateUiSpecEvent, ot as RouteResult, p as BEHAVIOR_RECORDS_KEY, pn as WebSkillRuntime, pt as RunToolCall, q as LifecycleHookContext, qn as refineUserProfile, qt as ToolDefinition, r as ASK_USER_TOOL, rn as USER_PROFILE_PROMPT_HEADER, rr as toLlmToolSpec, rt as RUN_TRACE_SCHEMA_VERSION, s as AgentLoopConfig, sn as UserProfileEntry, sr as validateUiSpecNode, st as RunLimitErrorDetails, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as USER_PROFILE_KEY, tr as summarizeToolCalls, tt as READ_SKILL_FILE_TOOL_NAME, u as AnthropicClientConfig, un as UserProfileLimits, ut as RunSnapshotListEntry, v as BridgeCapability, vn as buildRenderResult, vt as RunTraceSummary, w as DEFAULT_USER_PROFILE_LIMITS, wn as extractTodoTraceEvents, wt as SchemaInferer, x as CapabilityApproval, xn as diffUserProfile, xt as RuntimeSession, y as BridgeRequest, yn as createScriptContext, yt as RuntimePhase, z as HookRunner, zn as normalizeToolContent, zt as SkillScriptDescriptor } from "./index-znZjobkr.js";
1
+ import { $ as SignatureAuditSink, $t as signaturePayloadBytes, A as extractSkillCandidate, At as buildManifest, B as JsonSchema, Bt as jsonRenderer, C as UiSpecActionCapability, Ct as VerifyResult, D as UiSpecSnapshot, Dt as assertSafePathSegment, E as UiSpecPatch, Et as assertRemoteUrlAllowed, F as DEFAULT_ARCHIVE_LIMITS, Ft as detectSkillArchiveShapeFromFs, G as RemoteUrlPolicy, Gt as parseSkillPackManifest, H as MemoryFS, Ht as messageOf, I as DiscoveryResult, It as escapeXml, J as SKILL_MANIFEST_FILE, Jt as renderAvailableSkillsXml, K as SIGNATURE_SCHEMA_VERSION, Kt as readResponseWithLimit, L as FileStat, Lt as exportSkills, M as ArchiveLimits, Mt as checkSkillRules, N as CatalogRenderer, Nt as computeDigest, O as UiSurfaceActionRequest, Ot as atomicWriteText, P as CryptoKeyLike, Pt as detectSkillArchiveShape, Q as SKILL_SIGNATURE_FILE, Qt as signSkill, R as FileSystemProvider, Rt as isAtomicTempPath, S as UiBridge, St as ValidationReport, T as UiSpecEvent, Tt as WebSkillErrorCode, U as Page, Ut as normalizePath, V as MANIFEST_EXCLUDED_FILES, Vt as keyIdOf, W as PageQuery, Wt as parseSkillMarkdown, X as SKILL_NAME_PATTERN, Xt as resolveArchiveLimits, Y as SKILL_NAME_MAX_LENGTH, Yt as renderCatalogJson, Z as SKILL_PACK_FILE, Zt as resolveInsideRoot, _ as LlmToolSpec, _t as SkillsLockfile, a as InteractionOrigin, an as xmlRenderer, at as SkillDiscovery, b as RenderResultRequest, bt as UiSpecNode, c as InteractionResponse, ct as SkillIssue, d as LlmContentPart, dt as SkillManifest, en as stripArchiveRoot, et as SignatureVerdict, f as LlmMessage, ft as SkillMetadata, g as LlmToolCall, gt as SkillSource, h as LlmTokenUsage, ht as SkillSignature, i as FormField, in as verifySkillSignature, it as SkillCatalogEntry, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as checkDependencyCycles, k as UiSurfaceActionResponse, kt as buildCatalog, l as LlmClient, lt as SkillLocation, m as LlmStreamEvent, mt as SkillReader, n as ArtifactStore, nn as validateSkills, nt as SkillArchiveShape, o as InteractionPolicy, ot as SkillDocument, p as LlmResponse, pt as SkillPackManifest, q as SKILLS_LOCKFILE, qt as readSkillSignature, r as ChartSpec, rn as verifyManifest, rt as SkillCatalog, s as InteractionRequest, st as SkillInstallSource, t as Artifact, tn as unzipWithLimits, tt as SkillArchiveDetection, u as LlmCompleteInput, ut as SkillManagerPort, v as MemoryStore, vt as TrustedKey, w as UiSpecDrafts, wt as WebSkillError, x as SkillCandidateMarker, xt as UnsignedPolicy, y as RenderBlock, yt as TrustedKeyStore, z as FsTrustedKeyStore, zt as isValidSkillName } from "./types-C26b05fW-CdrRCRDb.js";
2
+ import { $ as LifecycleHookContext, $n as normalizeToolError, $t as SkillSuccessReport, A as DocxTextExtractor, An as bridgeError, At as RuntimeRun, B as FsRunTraceStore, Bn as formatSkillScriptManifest, Bt as SealResult, C as CapabilityApproval, Cn as UserProfileLimits, Ct as RunTraceFile, D as DEFAULT_MAX_DOCUMENT_BYTES, Dn as WebSkillRuntimeDeps, Dt as RunTraceSummary, E as DEFAULT_MAX_DATA_SOURCE_BYTES, En as WebSkillRuntime, Et as RunTraceStore, F as ExternalToolSource, Fn as exportUserProfile, Ft as SchemaInferer, G as HookRunner, Gn as isUnsupportedRunSnapshot, Gt as SessionStore, H as FullDisclosureRouter, Hn as fromVercelStreamPart, Ht as SessionListPage, I as FS_SESSION_PAGE_SIZE, In as extractChartSpec, It as ScriptExecutionContext, J as IntegrityVerdict, Jn as mergeProfileEntries, Jt as SkillOutcomeReporter, K as HookRunnerOptions, Kn as listSkillScripts, Kt as SkillFailureReport, L as FsArtifactStore, Ln as extractTodoTraceEvents, Lt as ScriptExecutor, M as EventBus, Mn as createScriptContext, Mt as RuntimeSessionHandle, N as ExecuteLifecycleData, Nn as createWebSkillApi, Nt as SESSION_SCHEMA_VERSION, O as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, On as appendBehaviorRecords, Ot as RunUsageSummary, P as ExternalSkillProvider, Pn as diffUserProfile, Pt as SUPPORTED_DOCUMENT_MIME, Q as LifecycleHook, Qn as normalizeToolContent, Qt as SkillStateGuard, R as FsMemoryStore, Rn as extractUiSpecEvents, Rt as SealOptions, S as BridgeResponse, Sn as UserProfileImportDiff, St as RunToolCall, T as DEFAULT_LOOP_LIMITS, Tn as WebSkillApi, Tt as RunTraceMetrics, U as GoogleGenAiClient, Un as interruptedToolResult, Ut as SessionMeta, V as FsSessionStore, Vn as fromVercelResult, Vt as SerializingMemoryStore, W as GoogleGenAiClientConfig, Wn as isNetworkAllowed, Wt as SessionRecord, X as LifecycleEvent, Xn as networkUrlHost, Xt as SkillScriptDescriptor, Y as InteractLifecycleData, Yn as networkPolicyLibSource, Yt as SkillRouter, Z as LifecycleEventInit, Zn as normalizeErrorCode, Zt as SkillScriptSchemaSource, _ as BehaviorRecordKind, _n as USER_PROFILE_REFINE_PROMPT, _r as toLlmToolSpec, _t as RunResult, a as ASK_USER_TOOL, an as ToolDefinition, ar as readUserProfile, at as ProgressiveRouter, b as BridgeCapability, bn as UserProfileEntry, br as validateUiSpecEvent, bt as RunSnapshotStore, c as AgentLoop, cn as TraceClock, cr as resolveToolName, ct as READ_SKILL_FILE_INPUT_SCHEMA, d as AnthropicClient, dn as TraceRecorder, dr as schemaToForm, dt as RUN_SNAPSHOT_SCHEMA_VERSION, en as TEXT_BUDGETED_CONTENT_TYPES, er as parseBridgeRequest, et as LifecycleListener, f as AnthropicClientConfig, fn as UNSUPPORTED_DOCUMENT_MESSAGE, fr as scriptToolName, ft as RUN_TRACE_SCHEMA_VERSION, g as BehaviorRecord, gn as USER_PROFILE_PROMPT_HEADER, gr as textParts, gt as RunLimitErrorDetails, h as BEHAVIOR_RECORDS_KEY, hn as USER_PROFILE_NO_INVENTION_RULE, hr as summarizeToolCalls, ht as RouteResult, i as ASK_USER_MAX_FIELDS, in as ToolContent, ir as readProfileEntries, it as OpenAiCompatibleClientConfig, j as EMPTY_USER_PROFILE, jn as buildRenderResult, jt as RuntimeSession, k as DEFAULT_USER_PROFILE_LIMITS, kn as applyUserProfileImport, kt as RuntimePhase, l as AgentLoopConfig, ln as TraceEvent, lr as sampleBehaviorRecords, lt as READ_SKILL_FILE_TOOL, m as ApprovalScope, mn as USER_PROFILE_KEY, mr as summarizeRunUsage, mt as RouteLifecycleData, n as ASK_USER_FIELD_TYPES, nn as TextualToolContent, nr as partsToText, nt as NetworkPolicy, o as ASK_USER_TOOL_NAME, on as ToolResolution, or as refineUserProfile, ot as READ_LINKED_DOCUMENT_TOOL, p as ApprovalDecision, pn as USER_PROFILE_EXPORT_VERSION, pr as sealToolCallPairs, pt as RefineUserProfileInput, q as InstalledSkillManifest, qn as mergeCatalogEntries, qt as SkillIntegrityGuard, r as ASK_USER_INPUT_SCHEMA, rn as TodoTraceEvent, rr as readBehaviorRecords, rt as OpenAiCompatibleClient, s as ActivateLifecycleData, sn as ToolResult, sr as renderUserProfileContext, st as READ_LINKED_DOCUMENT_TOOL_NAME, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as TerminalLifecycleData, tr as parseUserProfileExport, tt as LinkedDocumentReader, u as AgentLoopDeps, un as TraceEventType, ur as schemaSourceLabel, ut as READ_SKILL_FILE_TOOL_NAME, v as BehaviorScene, vn as UnsupportedRunSnapshot, vr as toRecordDigests, vt as RunSnapshot, w as CapabilityMode, wn as VercelToolSpec, wt as RunTraceFilter, x as BridgeRequest, xn as UserProfileExport, xr as validateUiSpecNode, xt as RunTerminationReason, y as BridgeCapabilities, yn as UserProfile, yr as toVercelToolSpecs, yt as RunSnapshotListEntry, z as FsRunSnapshotStore, zn as findUnpairedToolCalls, zt as SealRecord } from "./index-D3mONFHD.js";
3
3
  //#region src/version.d.ts
4
4
  /** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
5
5
  /**
6
6
  * Version of the published `@webskill/sdk` package, injected at build time.
7
7
  * @stable
8
8
  */
9
- declare const SDK_VERSION = "0.9.0";
9
+ declare const SDK_VERSION = "0.11.0";
10
10
  //#endregion
11
- export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, 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_LOOP_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 RunLimitErrorDetails, 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, SDK_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, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, type SealOptions, type SealRecord, type SealResult, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillArchiveDetection, type SkillArchiveShape, type SkillCandidateMarker, 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 SkillSuccessReport, 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 UserProfileImportDiff, 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, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, 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, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
11
+ export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_FIELD_TYPES, ASK_USER_INPUT_SCHEMA, ASK_USER_MAX_FIELDS, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, 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_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, DEFAULT_USER_PROFILE_LIMITS, type DiscoveryResult, type DocxTextExtractor, 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 LinkedDocumentReader, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmTokenUsage, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_LINKED_DOCUMENT_TOOL, READ_LINKED_DOCUMENT_TOOL_NAME, 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 RunLimitErrorDetails, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RunUsageSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SDK_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, SUPPORTED_DOCUMENT_MIME, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, type SealOptions, type SealRecord, type SealResult, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillArchiveDetection, type SkillArchiveShape, type SkillCandidateMarker, 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 SkillSuccessReport, type SkillsLockfile, TEXT_BUDGETED_CONTENT_TYPES, 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, UNSUPPORTED_DOCUMENT_MESSAGE, 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 UserProfileImportDiff, 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, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, 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, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };