@webskill/sdk 0.10.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 (34) hide show
  1. package/dist/agent.d.ts +3 -2
  2. package/dist/agent.js +3 -1102
  3. package/dist/browser.d.ts +258 -11
  4. package/dist/browser.js +758 -46
  5. package/dist/{catalogComponents-DTcYfpLQ-CcoOaz-Z.js → catalogComponents-BFoqpT1v-CjUBZ3bc.js} +253 -14
  6. package/dist/{dist-BViUeszk.js → dist-B-cOu08W.js} +526 -76
  7. package/dist/{dist-1OFC-zax.js → dist-DTHZS2k1.js} +520 -28
  8. package/dist/dist-qnlI2Iup.js +1280 -0
  9. package/dist/{eventTypes-s2uwAcLG-Go3l_dUe.js → eventTypes-FllCrX-Z-DNDeHWoG.js} +6 -2
  10. package/dist/governance.d.ts +7 -3
  11. package/dist/governance.js +1 -1
  12. package/dist/{index-DtFdMKBX.d.ts → index-D3mONFHD.d.ts} +220 -7
  13. package/dist/{index-B0QPLWPZ.d.ts → index-DACk2_XZ.d.ts} +110 -7
  14. package/dist/{index-BF4E1a9j.d.ts → index-DWbs58LF.d.ts} +227 -14
  15. package/dist/index.d.ts +4 -4
  16. package/dist/index.js +3 -3
  17. package/dist/mcp.d.ts +35 -7
  18. package/dist/mcp.js +88 -21
  19. package/dist/node.d.ts +3 -3
  20. package/dist/node.js +52 -2
  21. package/dist/{openUiLibrary-CIrV--Ad-B8zG_91e.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-D-qHk9ZE-DBsYYCWn.d.ts → skillVersionStore-D-qHk9ZE-BcmFLykd.d.ts} +1 -1
  25. package/dist/testing.d.ts +1 -1
  26. package/dist/{types-CrRcT-LM-DZAp8sWv.d.ts → types-C26b05fW-CdrRCRDb.d.ts} +20 -4
  27. package/dist/ui-react.d.ts +2 -2
  28. package/dist/ui-react.js +28 -10
  29. package/dist/ui-vue.d.ts +1 -1
  30. package/dist/ui-vue.js +2 -2
  31. package/dist/ui.d.ts +4 -4
  32. package/dist/ui.js +3 -3
  33. package/dist/{webskillLitCatalog-BJrphK0y-SGmRXaaO.js → webskillLitCatalog-DME6PBkV-CmYNLlIT.js} +135 -16
  34. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { S as UiBridge, a as InteractionOrigin, c as InteractionResponse, s as InteractionRequest } from "./types-CrRcT-LM-DZAp8sWv.js";
2
- import { k as ExternalToolSource } from "./index-DtFdMKBX.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) */
@@ -308,11 +308,54 @@ interface PerceptionScope {
308
308
  /** 从 include 子树中剪除的敏感区域(凭据输入、个人信息展示区等) */
309
309
  exclude?: readonly string[];
310
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
+ }
311
349
  /**
312
350
  * 结构化元素描述(FR-10.4,硬约束):只有角色、名称、值。
313
351
  *
314
- * 不下发 HTML 原文有两条理由:HTML 里的 class / data 属性 / 注释远超模型
315
- * 完成任务所需;且页面文本一旦以 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` 这一个属性,其余属性照旧不下发。
316
359
  * @experimental
317
360
  */
318
361
  interface PerceivedNode {
@@ -332,6 +375,23 @@ interface PerceivedNode {
332
375
  * 由 reader 生成,只在产生它的那次感知内有效;模型不得构造或推断。
333
376
  */
334
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';
335
395
  children?: readonly PerceivedNode[];
336
396
  }
337
397
  /** 随感知一起下发的一张图像(FR-12.1) @experimental */
@@ -362,6 +422,8 @@ interface PerceptionCaptureOptions {
362
422
  */
363
423
  interface PerceptionResult {
364
424
  nodes: readonly PerceivedNode[];
425
+ /** 被跳过的帧及原因;调用方据此告警(FR-24.2 / FR-24.3) */
426
+ frameNotes?: readonly FrameNote[];
365
427
  images?: readonly PerceivedImage[];
366
428
  /** 超出 `maxImages` 而未下发的张数 */
367
429
  imagesOmitted?: number;
@@ -376,15 +438,17 @@ interface PerceptionResult {
376
438
  * @experimental
377
439
  */
378
440
  interface PagePerceptionReader {
379
- 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;
380
442
  }
381
443
  /** 一次感知的留痕(FR-10.5 的 UI 提示与 FR-10.6 的审计共用同一条记录) @experimental */
382
444
  interface PerceptionRecord {
383
445
  /** ISO 8601 */
384
446
  at: string;
385
- /** 本次实际生效的白名单 */
447
+ /** 本次实际生效的白名单(多帧时是各帧的并集) */
386
448
  include: readonly string[];
387
449
  exclude: readonly string[];
450
+ /** 本次读取的帧标识;单帧配置时不存在,旧宿主的断言不受影响(FR-24.6) */
451
+ frames?: readonly string[];
388
452
  /** 读到的顶层节点数;用于「它读的比我预期的多」这类判断 */
389
453
  nodeCount: number;
390
454
  /** 本次下发的图像张数,按取像级别分组(只在取像开启时存在) */
@@ -418,12 +482,14 @@ type PerceptionAuditSink = PageAuditSink;
418
482
  //#region src/perception/policy.d.ts
419
483
  interface PagePerceptionPolicyOptions {
420
484
  /** 宿主声明的白名单;`include` 为空即整个能力不可用 */
421
- scope: PerceptionScope;
485
+ scope: PerceptionScopeInput;
422
486
  reader: PagePerceptionReader;
423
487
  /** FR-10.6:每次感知写审计。不注入即不留痕,装配方要自己承担这个选择 */
424
488
  audit?: PerceptionAuditSink;
425
489
  /** 审计事件的 target(缺省 `page`);多页面宿主可用它区分来源 */
426
490
  auditTarget?: string;
491
+ /** 帧被跳过时的告警出口(跨源、origin 变更、找不到);FR-24.3 要求「失效并告警」 */
492
+ onWarning?(message: string): void;
427
493
  now?(): string;
428
494
  }
429
495
  /**
@@ -442,7 +508,7 @@ declare class PagePerceptionPolicy {
442
508
  constructor(options: PagePerceptionPolicyOptions);
443
509
  /** 白名单为空即不可用(FR-10.1/10.2):宿主没声明范围就没有这个能力 */
444
510
  get enabled(): boolean;
445
- get scope(): PerceptionScope;
511
+ get scope(): PerceptionScopeInput;
446
512
  /** 最近的感知记录(console 只读展示用),新的在前 */
447
513
  get records(): readonly PerceptionRecord[];
448
514
  /** FR-10.5:感知发生时通知 UI,chatbot 据此在消息流里标注一行 */
@@ -490,6 +556,100 @@ declare function createPagePerceptionToolSource(options: PagePerceptionToolSourc
490
556
  */
491
557
  declare const PERCEPTION_SYSTEM_PROMPT: string;
492
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
493
653
  //#region src/pageAction/types.d.ts
494
654
  /**
495
655
  * 页面操作的策略层类型(需求 23)。
@@ -511,14 +671,49 @@ interface PageActionScope {
511
671
  /** 从 include 子树中剪除的危险控件(支付、删除、权限变更等) */
512
672
  exclude?: readonly string[];
513
673
  }
514
- /** 本版的最小操作集(FR-23.4)。导航、拖拽、滚动均不在内。 @experimental */
515
- 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];
516
707
  /** @experimental */
517
708
  interface PageActionRequest {
518
709
  /** 感知产出的不透明句柄;不接受选择器(FR-23.4) */
519
710
  ref: string;
520
711
  action: PageActionKind;
521
- /** `action === 'fill'` 时必填 */
712
+ /**
713
+ * `fill` 填入的文本;`select` 要选中的选项可访问名;
714
+ * `set` 的目标态(`'true'` | `'false'`)。`attach` 不用它——
715
+ * 文件**始终由用户在确认卡里选**,Agent 传不进本地路径(FR-25.5)。
716
+ */
522
717
  value?: string;
523
718
  }
524
719
  /** @experimental */
@@ -532,9 +727,17 @@ interface PageActionOutcome {
532
727
  target: {
533
728
  role: string;
534
729
  name?: string;
730
+ frame?: string;
535
731
  };
536
732
  /** 目标是密码类控件:确认卡与留痕据此隐去值(FR-23.3) */
537
733
  secret?: boolean;
734
+ /**
735
+ * `set` 判定当前态已是目标态,因此**没有真的操作**(FR-25.4)。
736
+ * 仍返回 `ok: true`:返回失败模型会重试,假装点了审计会失真。
737
+ */
738
+ noop?: boolean;
739
+ /** 本次操作新打开的模态的可访问名;授权面临时扩大要在留痕里看得见(FR-25.6) */
740
+ elevatedModal?: string;
538
741
  /** 失败原因(英文) */
539
742
  reason?: string;
540
743
  }
@@ -550,6 +753,8 @@ interface PageActionExecutor {
550
753
  role: string;
551
754
  name?: string;
552
755
  secret?: boolean;
756
+ frame?: string;
757
+ elevated?: boolean;
553
758
  } | undefined;
554
759
  }
555
760
  /** 一次页面操作的留痕(FR-23.3 的五项字段) @experimental */
@@ -559,9 +764,17 @@ interface PageActionRecord {
559
764
  action: PageActionKind;
560
765
  role: string;
561
766
  name?: string;
767
+ /** 目标所在的帧;主文档目标不带该字段(FR-24.6) */
768
+ frame?: string;
562
769
  /** 是否经用户确认;宿主预授权的操作记 `'preauthorized'` */
563
770
  approved: boolean | 'preauthorized';
564
771
  ok: boolean;
772
+ /** 目标位于本次会话中被提升的模态里(授权面临时扩大,FR-25.6 / AC-G22) */
773
+ elevated?: boolean;
774
+ /** 本次操作新打开的模态 */
775
+ elevatedModal?: string;
776
+ /** 当前态已是目标态,未执行任何操作(FR-25.4) */
777
+ noop?: boolean;
565
778
  /** 非密码类控件填入的值;密码类控件**整个字段不存在** */
566
779
  value?: string;
567
780
  reason?: string;
@@ -574,7 +787,7 @@ interface PageActionUi {
574
787
  }
575
788
  interface PageActionPolicyOptions {
576
789
  /** 宿主声明的可操作范围;`include` 为空即整个能力不可用 */
577
- scope: PageActionScope;
790
+ scope: PageActionScopeInput;
578
791
  executor: PageActionExecutor;
579
792
  ui: PageActionUi;
580
793
  /** FR-23.3:每次操作写审计。不注入即不留痕,装配方要自己承担这个选择 */
@@ -600,7 +813,7 @@ declare class PageActionPolicy {
600
813
  constructor(options: PageActionPolicyOptions);
601
814
  /** 白名单为空即不可用(FR-23.1):宿主没声明范围就没有这个能力 */
602
815
  get enabled(): boolean;
603
- get scope(): PageActionScope;
816
+ get scope(): PageActionScopeInput;
604
817
  /** 最近的操作记录(只读展示用),新的在前 */
605
818
  get records(): readonly PageActionRecord[];
606
819
  act(request: PageActionRequest): Promise<PageActionOutcome>;
@@ -629,4 +842,4 @@ declare function createPageActionToolSource(options: PageActionToolSourceOptions
629
842
  */
630
843
  declare const PAGE_ACTION_SYSTEM_PROMPT: string;
631
844
  //#endregion
632
- export { TodoList as $, PagePerceptionReader as A, SKILL_GENERATION_SYSTEM_PROMPT as B, PageActionRequest as C, PageAuditSink as D, PageActionUi as E, PerceptionAuditSink as F, SkillGenerationToolSourceOptions as G, SkillGenerationMessages as H, PerceptionCaptureOptions as I, SubAgentRunInput as J, SkillGenerator as K, PerceptionRecord as L, ParentBudget as M, PerceivedImage as N, PagePerceptionPolicy as O, PerceivedNode as P, TodoItem as Q, PerceptionResult as R, PageActionRecord as S, PageActionToolSourceOptions as T, SkillGenerationOutcome as U, SkillCandidateSink as V, SkillGenerationPolicy as W, TODO_SYSTEM_PROMPT as X, SubAgentRunner as Y, TodoEvent as Z, PageActionExecutor as _, DelegationOrchestratorOptions as a, createPageActionToolSource as at, PageActionPolicy as b, DelegationToolSourceOptions as c, createTodoToolSource as ct, ImageCaptureBudget as d, TodoListener as et, MANAGE_TODO_TOOL as f, PERCEPTION_SYSTEM_PROMPT as g, PERCEIVE_PAGE_TOOL as h, DelegationOrchestrator as i, createDelegationToolSource as it, PagePerceptionToolSourceOptions as j, PagePerceptionPolicyOptions as k, GENERATE_SKILL_TOOL as l, withDelegationOrigin as lt, PAGE_ACTION_TOOL as m, DELEGATION_SYSTEM_PROMPT as n, TodoStore as nt, DelegationRequest as o, createPagePerceptionToolSource as ot, PAGE_ACTION_SYSTEM_PROMPT as p, SkillGeneratorOptions as q, DelegationBudget as r, TodoToolSourceOptions as rt, DelegationResult as s, createSkillGenerationToolSource as st, DELEGATE_TASK_TOOL as t, TodoStatus 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 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-CrRcT-LM-DZAp8sWv.js";
2
- import { $ as READ_SKILL_FILE_INPUT_SCHEMA, $n as schemaToForm, $t as TraceEventType, A as FS_SESSION_PAGE_SIZE, An as fromVercelStreamPart, At as SealResult, B as HookRunnerOptions, Bn as normalizeToolContent, Bt as SkillScriptDescriptor, C as DEFAULT_LOOP_LIMITS, Cn as exportUserProfile, Ct as RuntimeSessionHandle, D as ExecuteLifecycleData, Dn as findUnpairedToolCalls, Dt as ScriptExecutor, E as EventBus, En as extractUiSpecEvents, Et as ScriptExecutionContext, F as FsSessionStore, Fn as mergeCatalogEntries, Ft as SessionStore, G as LifecycleEventInit, Gn as readBehaviorRecords, Gt as TextualToolContent, H as IntegrityVerdict, Hn as parseBridgeRequest, Ht as SkillStateGuard, I as FullDisclosureRouter, In as mergeProfileEntries, It as SkillFailureReport, J as LifecycleListener, Jn as refineUserProfile, Jt as ToolDefinition, K as LifecycleHook, Kn as readProfileEntries, Kt as TodoTraceEvent, L as GoogleGenAiClient, Ln as networkPolicyLibSource, Lt as SkillIntegrityGuard, M as FsMemoryStore, Mn as isNetworkAllowed, Mt as SessionListPage, N as FsRunSnapshotStore, Nn as isUnsupportedRunSnapshot, Nt as SessionMeta, O as ExternalSkillProvider, On as formatSkillScriptManifest, Ot as SealOptions, P as FsRunTraceStore, Pn as listSkillScripts, Pt as SessionRecord, Q as ProgressiveRouter, Qn as schemaSourceLabel, Qt as TraceEvent, R as GoogleGenAiClientConfig, Rn as networkUrlHost, Rt as SkillOutcomeReporter, S as CapabilityMode, Sn as diffUserProfile, St as RuntimeSession, T as EMPTY_USER_PROFILE, Tn as extractTodoTraceEvents, Tt as SchemaInferer, U as InteractLifecycleData, Un as parseUserProfileExport, Ut as SkillSuccessReport, V as InstalledSkillManifest, Vn as normalizeToolError, Vt as SkillScriptSchemaSource, W as LifecycleEvent, Wn as partsToText, Wt as TerminalLifecycleData, X as OpenAiCompatibleClient, Xn as resolveToolName, Xt as ToolResult, Y as NetworkPolicy, Yn as renderUserProfileContext, Yt as ToolResolution, Z as OpenAiCompatibleClientConfig, Zn as sampleBehaviorRecords, Zt as TraceClock, _ as BridgeCapabilities, _n as applyUserProfileImport, _t as RunTraceStore, a as ActivateLifecycleData, an as USER_PROFILE_REFINE_PROMPT, ar as toLlmToolSpec, at as RouteLifecycleData, b as BridgeResponse, bn as createScriptContext, bt as RuntimePhase, c as AgentLoopDeps, cn as UserProfileEntry, cr as validateUiSpecEvent, ct as RunResult, d as ApprovalDecision, dn as UserProfileLimits, dt as RunSnapshotStore, en as TraceRecorder, er as scriptToolName, et as READ_SKILL_FILE_TOOL, f as ApprovalScope, fn as VercelToolSpec, ft as RunTerminationReason, g as BehaviorScene, gn as appendBehaviorRecords, gt as RunTraceMetrics, h as BehaviorRecordKind, hn as WebSkillRuntimeDeps, ht as RunTraceFilter, i as ASK_USER_TOOL_NAME, in as USER_PROFILE_PROMPT_HEADER, ir as textParts, it as RefineUserProfileInput, j as FsArtifactStore, jn as interruptedToolResult, jt as SerializingMemoryStore, k as ExternalToolSource, kn as fromVercelResult, kt as SealRecord, l as AnthropicClient, ln as UserProfileExport, lr as validateUiSpecNode, lt as RunSnapshot, m as BehaviorRecord, mn as WebSkillRuntime, mt as RunTraceFile, n as ASK_USER_INPUT_SCHEMA, nn as USER_PROFILE_KEY, nr as summarizeRunUsage, nt as RUN_SNAPSHOT_SCHEMA_VERSION, o as AgentLoop, on as UnsupportedRunSnapshot, or as toRecordDigests, ot as RouteResult, p as BEHAVIOR_RECORDS_KEY, pn as WebSkillApi, pt as RunToolCall, q as LifecycleHookContext, qn as readUserProfile, qt as ToolContent, r as ASK_USER_TOOL, rn as USER_PROFILE_NO_INVENTION_RULE, rr as summarizeToolCalls, rt as RUN_TRACE_SCHEMA_VERSION, s as AgentLoopConfig, sn as UserProfile, sr as toVercelToolSpecs, st as RunLimitErrorDetails, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as USER_PROFILE_EXPORT_VERSION, tr as sealToolCallPairs, tt as READ_SKILL_FILE_TOOL_NAME, u as AnthropicClientConfig, un as UserProfileImportDiff, ut as RunSnapshotListEntry, v as BridgeCapability, vn as bridgeError, vt as RunTraceSummary, w as DEFAULT_USER_PROFILE_LIMITS, wn as extractChartSpec, wt as SESSION_SCHEMA_VERSION, x as CapabilityApproval, xn as createWebSkillApi, xt as RuntimeRun, y as BridgeRequest, yn as buildRenderResult, yt as RunUsageSummary, z as HookRunner, zn as normalizeErrorCode, zt as SkillRouter } from "./index-DtFdMKBX.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.10.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 LlmTokenUsage, 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 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, 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, summarizeRunUsage, 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 };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { A as jsonRenderer, B as resolveArchiveLimits, C as computeDigest, D as exportSkills, E as escapeXml, F as parseSkillPackManifest, G as unzipWithLimits, H as signSkill, I as readResponseWithLimit, J as verifySkillSignature, K as validateSkills, L as readSkillSignature, M as messageOf, N as normalizePath, O as isAtomicTempPath, P as parseSkillMarkdown, R as renderAvailableSkillsXml, S as checkSkillRules, T as detectSkillArchiveShapeFromFs, U as signaturePayloadBytes, V as resolveInsideRoot, W as stripArchiveRoot, Y as xmlRenderer, _ as assertSafePathSegment, a as MemoryFS, b as buildManifest, c as SKILL_MANIFEST_FILE, d as SKILL_PACK_FILE, f as SKILL_SIGNATURE_FILE, g as assertRemoteUrlAllowed, h as WebSkillError, i as MANIFEST_EXCLUDED_FILES, j as keyIdOf, k as isValidSkillName, l as SKILL_NAME_MAX_LENGTH, m as SkillReader, n as DEFAULT_ARCHIVE_LIMITS, o as SIGNATURE_SCHEMA_VERSION, p as SkillDiscovery, q as verifyManifest, r as FsTrustedKeyStore, s as SKILLS_LOCKFILE, t as ATOMIC_TMP_SUFFIX_PATTERN, u as SKILL_NAME_PATTERN, v as atomicWriteText, w as detectSkillArchiveShape, x as checkDependencyCycles, y as buildCatalog, z as renderCatalogJson } from "./dist-Bev6i6Ip.js";
2
2
  import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-LbCQaqyx.js";
3
- import { $ as fromVercelStreamPart, A as SerializingMemoryStore, At as validateUiSpecNode, B as bridgeError, C as ProgressiveRouter, Ct as sealToolCallPairs, D as RUN_SNAPSHOT_SCHEMA_VERSION, Dt as toRecordDigests, E as READ_SKILL_FILE_TOOL_NAME, Et as toLlmToolSpec, F as USER_PROFILE_PROMPT_HEADER, G as exportUserProfile, H as createScriptContext, I as USER_PROFILE_REFINE_PROMPT, J as extractTodoTraceEvents, K as extractChartSpec, L as WebSkillRuntime, M as USER_PROFILE_EXPORT_VERSION, N as USER_PROFILE_KEY, O as RUN_TRACE_SCHEMA_VERSION, Ot as toVercelToolSpecs, P as USER_PROFILE_NO_INVENTION_RULE, Q as fromVercelResult, R as appendBehaviorRecords, S as OpenAiCompatibleClient, St as scriptToolName, T as READ_SKILL_FILE_TOOL, Tt as summarizeToolCalls, U as createWebSkillApi, V as buildRenderResult, W as diffUserProfile, X as findUnpairedToolCalls, Y as extractUiSpecEvents, Z as formatSkillScriptManifest, _ as FsRunTraceStore, _t as renderUserProfileContext, a as AgentLoop, at as mergeProfileEntries, b as GoogleGenAiClient, bt as schemaSourceLabel, c as CapabilityApproval, ct as normalizeErrorCode, d as EMPTY_USER_PROFILE, dt as parseBridgeRequest, et as interruptedToolResult, f as EventBus, ft as parseUserProfileExport, g as FsRunSnapshotStore, gt as refineUserProfile, h as FsMemoryStore, ht as readUserProfile, i as ASK_USER_TOOL_NAME, it as mergeCatalogEntries, j as TraceRecorder, k as SESSION_SCHEMA_VERSION, kt as validateUiSpecEvent, l as DEFAULT_LOOP_LIMITS, lt as normalizeToolContent, m as FsArtifactStore, mt as readProfileEntries, n as ASK_USER_INPUT_SCHEMA, nt as isUnsupportedRunSnapshot, o as AnthropicClient, ot as networkPolicyLibSource, p as FS_SESSION_PAGE_SIZE, pt as readBehaviorRecords, q as extractSkillCandidate, r as ASK_USER_TOOL, rt as listSkillScripts, s as BEHAVIOR_RECORDS_KEY, st as networkUrlHost, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as isNetworkAllowed, u as DEFAULT_USER_PROFILE_LIMITS, ut as normalizeToolError, v as FsSessionStore, vt as resolveToolName, w as READ_SKILL_FILE_INPUT_SCHEMA, wt as summarizeRunUsage, x as HookRunner, xt as schemaToForm, y as FullDisclosureRouter, yt as sampleBehaviorRecords, z as applyUserProfileImport } from "./dist-BViUeszk.js";
3
+ import { $ as createWebSkillApi, A as READ_LINKED_DOCUMENT_TOOL_NAME, At as schemaSourceLabel, B as TraceRecorder, Bt as validateUiSpecNode, C as FsSessionStore, Ct as readBehaviorRecords, D as OpenAiCompatibleClient, Dt as renderUserProfileContext, E as HookRunner, Et as refineUserProfile, F as RUN_TRACE_SCHEMA_VERSION, Ft as summarizeToolCalls, G as USER_PROFILE_PROMPT_HEADER, H as USER_PROFILE_EXPORT_VERSION, I as SESSION_SCHEMA_VERSION, It as toLlmToolSpec, J as appendBehaviorRecords, K as USER_PROFILE_REFINE_PROMPT, L as SUPPORTED_DOCUMENT_MIME, Lt as toRecordDigests, M as READ_SKILL_FILE_TOOL, Mt as scriptToolName, N as READ_SKILL_FILE_TOOL_NAME, Nt as sealToolCallPairs, O as ProgressiveRouter, Ot as resolveToolName, P as RUN_SNAPSHOT_SCHEMA_VERSION, Pt as summarizeRunUsage, Q as createScriptContext, R as SerializingMemoryStore, Rt as toVercelToolSpecs, S as FsRunTraceStore, St as parseUserProfileExport, T as GoogleGenAiClient, Tt as readUserProfile, U as USER_PROFILE_KEY, V as UNSUPPORTED_DOCUMENT_MESSAGE, W as USER_PROFILE_NO_INVENTION_RULE, X as bridgeError, Y as applyUserProfileImport, Z as buildRenderResult, _ as EventBus, _t as networkUrlHost, a as ASK_USER_TOOL, at as extractUiSpecEvents, b as FsMemoryStore, bt as normalizeToolError, c as AnthropicClient, ct as fromVercelResult, d as DEFAULT_LOOP_LIMITS, dt as isNetworkAllowed, et as diffUserProfile, f as DEFAULT_MAX_DATA_SOURCE_BYTES, ft as isUnsupportedRunSnapshot, g as EMPTY_USER_PROFILE, gt as networkPolicyLibSource, h as DEFAULT_USER_PROFILE_LIMITS, ht as mergeProfileEntries, i as ASK_USER_MAX_FIELDS, it as extractTodoTraceEvents, j as READ_SKILL_FILE_INPUT_SCHEMA, jt as schemaToForm, k as READ_LINKED_DOCUMENT_TOOL, kt as sampleBehaviorRecords, l as BEHAVIOR_RECORDS_KEY, lt as fromVercelStreamPart, m as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, mt as mergeCatalogEntries, n as ASK_USER_FIELD_TYPES, nt as extractChartSpec, o as ASK_USER_TOOL_NAME, ot as findUnpairedToolCalls, p as DEFAULT_MAX_DOCUMENT_BYTES, pt as listSkillScripts, q as WebSkillRuntime, r as ASK_USER_INPUT_SCHEMA, rt as extractSkillCandidate, s as AgentLoop, st as formatSkillScriptManifest, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as exportUserProfile, u as CapabilityApproval, ut as interruptedToolResult, v as FS_SESSION_PAGE_SIZE, vt as normalizeErrorCode, w as FullDisclosureRouter, wt as readProfileEntries, x as FsRunSnapshotStore, xt as parseBridgeRequest, y as FsArtifactStore, yt as normalizeToolContent, z as TEXT_BUDGETED_CONTENT_TYPES, zt as validateUiSpecEvent } from "./dist-B-cOu08W.js";
4
4
 
5
5
  //#region src/version.ts
6
6
  /** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
@@ -8,7 +8,7 @@ import { $ as fromVercelStreamPart, A as SerializingMemoryStore, At as validateU
8
8
  * Version of the published `@webskill/sdk` package, injected at build time.
9
9
  * @stable
10
10
  */
11
- const SDK_VERSION = "0.10.0";
11
+ const SDK_VERSION = "0.11.0";
12
12
 
13
13
  //#endregion
14
- export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_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, 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, 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, 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 };
14
+ 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, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, 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_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, 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, SerializingMemoryStore, SkillDiscovery, SkillReader, TEXT_BUDGETED_CONTENT_TYPES, TraceRecorder, UNSUPPORTED_DOCUMENT_MESSAGE, 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, 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 };
package/dist/mcp.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as JsonSchema, _ as LlmToolSpec, it as SkillCatalogEntry, ot as SkillDocument } from "./types-CrRcT-LM-DZAp8sWv.js";
2
- import { Fn as mergeCatalogEntries, O as ExternalSkillProvider, Xt as ToolResult, k as ExternalToolSource } from "./index-DtFdMKBX.js";
1
+ import { B as JsonSchema, _ as LlmToolSpec, it as SkillCatalogEntry, ot as SkillDocument } from "./types-C26b05fW-CdrRCRDb.js";
2
+ import { F as ExternalToolSource, P as ExternalSkillProvider, qn as mergeCatalogEntries, sn as ToolResult } from "./index-D3mONFHD.js";
3
3
  import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
4
4
  import { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -141,8 +141,26 @@ declare class McpToolResolver {
141
141
  */
142
142
  declare function endpointToolLlmName(endpoint: string, toolName: string): string;
143
143
  declare function parseEndpointToolLlmName(endpoint: string, llmName: string): string | undefined;
144
- declare function webMcpToolLlmName(toolName: string): string;
145
- declare function parseWebMcpToolLlmName(llmName: string): string | undefined;
144
+ /**
145
+ * 来源标识的长度上限(分册 26 §2.2)。
146
+ *
147
+ * 前缀计入工具名,而工具名进**每一次**请求 —— 长 sourceId 是持续成本。
148
+ * 装配期校验并给出可读错误,比运行时被 provider 拒掉好查。
149
+ */
150
+ declare const WEB_MCP_SOURCE_ID_MAX = 24;
151
+ /**
152
+ * WebMCP 工具的 LLM 可见名。
153
+ *
154
+ * 多来源时带来源前缀(FR-26.2):三个文档都注册 `get_current_date` 是常态,
155
+ * 「首个来源优先」是**静默歧义** —— 模型选中的到底是哪个,谁也说不清。
156
+ * 不传 sourceId 时保持 0.10.0 的旧名,单来源宿主无感。
157
+ */
158
+ declare function webMcpToolLlmName(toolName: string, sourceId?: string): string;
159
+ /** 解析回 `{ sourceId?, toolName }`;旧名(无来源段)解析出 `sourceId: undefined` */
160
+ declare function parseWebMcpToolLlmName(llmName: string, sourceIds?: readonly string[]): {
161
+ sourceId?: string;
162
+ toolName: string;
163
+ } | undefined;
146
164
  //#endregion
147
165
  //#region src/skills/temporarySkillProvider.d.ts
148
166
  /**
@@ -241,8 +259,14 @@ interface WebMcpToolDescriptor {
241
259
  */
242
260
  declare class ExperimentalWebMcpAdapter {
243
261
  #private;
262
+ /**
263
+ * 多来源时的消歧标识(分册 26 FR-26.2)。不设即沿用 0.10.0 的旧工具名,
264
+ * 单来源宿主无感;**两个以上来源必须各自设**,否则同名工具会撞车。
265
+ */
266
+ readonly sourceId?: string;
244
267
  constructor(api?: BrowserModelContextLike | (() => BrowserModelContextLike | undefined), options?: {
245
268
  enabled?: boolean;
269
+ sourceId?: string;
246
270
  });
247
271
  /**
248
272
  * 宿主能力检测(FR-19.2/19.4):**只**看 `document.modelContext.executeTool` 是否存在,
@@ -275,7 +299,11 @@ interface McpToolVisibility {
275
299
  /** 端点工具级开关;返回 false 时该工具对大模型不可见 */
276
300
  isEndpointToolEnabled?(endpoint: string, tool: string): boolean;
277
301
  /** WebMCP 工具级开关;返回 false 时该工具对大模型不可见 */
278
- isWebMcpToolEnabled?(tool: string): boolean;
302
+ /**
303
+ * 两级启停(FR-26.3,与端点/工具同款):`sourceId` 为空即整个来源那一组。
304
+ * 宿主按来源关 → 该组全灭;按工具关 → 只灭一个。
305
+ */
306
+ isWebMcpToolEnabled?(tool: string, sourceId?: string): boolean;
279
307
  }
280
308
  /**
281
309
  * runtime 扩展点实现:endpoint 注册表 + WebMCP adapter 一处装配。
@@ -286,7 +314,7 @@ declare class McpRuntimePlugin implements ExternalToolSource {
286
314
  readonly kind = "mcp";
287
315
  constructor(deps: {
288
316
  registry: EndpointRegistry<McpClientLike>;
289
- webMcp?: ExperimentalWebMcpAdapter;
317
+ webMcp?: readonly ExperimentalWebMcpAdapter[];
290
318
  resolver?: McpToolResolver;
291
319
  /** 工具可见性策略(端点/工具级启停);缺省全部可见 */
292
320
  visibility?: McpToolVisibility;
@@ -443,4 +471,4 @@ interface RemoteEndpointHandle {
443
471
  */
444
472
  declare function connectRemoteEndpoint(registry: EndpointRegistry<McpClientLike>, config: RemoteEndpointConfig): Promise<RemoteEndpointHandle>;
445
473
  //#endregion
446
- export { type BrowserModelContextLike, EndpointRegistry, ExperimentalWebMcpAdapter, type McpClientLike, type McpOAuthClient, type McpOAuthConfig, type McpOAuthHandshake, type McpOAuthHandshakeStore, type McpOAuthProvider, type McpOAuthStage, type McpOAuthTokenStore, type McpOAuthTokens, McpRuntimePlugin, McpToolResolver, type McpToolVisibility, MessageChannelTransport, type MessageChannelTransportOptions, type MessagePortLike, type RemoteEndpointConfig, type RemoteEndpointHandle, type ServedSkill, TemporarySkillProvider, type TransportState, type WebMcpToolDescriptor, type WebMcpToolLike, catalogMerge, connectRemoteEndpoint, createMemoryOAuthStores, createOAuthProvider, endpointToolLlmName, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };
474
+ export { type BrowserModelContextLike, EndpointRegistry, ExperimentalWebMcpAdapter, type McpClientLike, type McpOAuthClient, type McpOAuthConfig, type McpOAuthHandshake, type McpOAuthHandshakeStore, type McpOAuthProvider, type McpOAuthStage, type McpOAuthTokenStore, type McpOAuthTokens, McpRuntimePlugin, McpToolResolver, type McpToolVisibility, MessageChannelTransport, type MessageChannelTransportOptions, type MessagePortLike, type RemoteEndpointConfig, type RemoteEndpointHandle, type ServedSkill, TemporarySkillProvider, type TransportState, WEB_MCP_SOURCE_ID_MAX, type WebMcpToolDescriptor, type WebMcpToolLike, catalogMerge, connectRemoteEndpoint, createMemoryOAuthStores, createOAuthProvider, endpointToolLlmName, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };