@webskill/sdk 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +3 -3
- package/dist/agent.js +3 -3
- package/dist/browser.d.ts +225 -7
- package/dist/browser.js +659 -47
- package/dist/{catalogComponents-BgAJN0p8-CYEXSk45.js → catalogComponents-BgAJN0p8-Cr55ouOg.js} +2 -2
- package/dist/{dist-ExSQky4C.js → dist-Bfga1TmS.js} +45 -5
- package/dist/{dist-GK6dtjRv.js → dist-BnqAkSS6.js} +940 -49
- package/dist/{dist-DqcL6jKO.js → dist-CiaDIqkV.js} +2 -2
- package/dist/{dist-Bev6i6Ip.js → dist-D5YhlCdY.js} +59 -1
- package/dist/governance.d.ts +3 -3
- package/dist/governance.js +2 -2
- package/dist/{index-DkvBhJQy.d.ts → index-CWoKOFBP.d.ts} +47 -3
- package/dist/{index-iBm9tJL_.d.ts → index-DQwGvHAI.d.ts} +389 -9
- package/dist/{index-C3XdItd_.d.ts → index-sd-gVKey.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/mcp.d.ts +56 -3
- package/dist/mcp.js +36 -3
- package/dist/{memoryArtifactStore-52Zn9npI-LbCQaqyx.js → memoryArtifactStore-52Zn9npI-BxtUkrgV.js} +1 -1
- package/dist/node.d.ts +3 -3
- package/dist/node.js +6 -6
- package/dist/{openUiLibrary-BKXW7Iwx-CWWBVOkE.js → openUiLibrary-BKXW7Iwx-DjvEnMlJ.js} +2 -2
- package/dist/{skillVersionStore-D-qHk9ZE-DheTIwAB.d.ts → skillVersionStore-D-qHk9ZE-C0OFDTQY.d.ts} +1 -1
- package/dist/{testing-WPTyXQYt.js → testing-Cm8MseLF.js} +2 -2
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/dist/{types-DLctJep_-B5G4uk2u.d.ts → types-C3V6lAeO-BgeOvc1Y.d.ts} +63 -4
- package/dist/ui-react.d.ts +2 -2
- package/dist/ui-react.js +5 -5
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +2 -2
- package/dist/{webskillLitCatalog-D_zCqeQF-C9lrvvMr.js → webskillLitCatalog-D_zCqeQF-swXsWoAe.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { I as ChatAttachmentKind, Mt as WebSkillErrorCode, S as UiBridge, Z as RemoteUrlPolicy, a as InteractionOrigin, c as InteractionResponse, s as InteractionRequest } from "./types-C3V6lAeO-BgeOvc1Y.js";
|
|
2
|
+
import { A as DataSourceInfo, Bn as XlsxTextExtractor, I as ExternalToolSource, gn as ToolStepReader, j as DocxTextExtractor } from "./index-CWoKOFBP.js";
|
|
3
3
|
//#region ../agent/dist/index.d.ts
|
|
4
4
|
//#region src/todo/types.d.ts
|
|
5
5
|
/** 待办条目状态:未开始 / 进行中 / 已完成(FR-3.1) */
|
|
@@ -427,10 +427,17 @@ interface PerceivedNode {
|
|
|
427
427
|
href?: string;
|
|
428
428
|
/**
|
|
429
429
|
* 该节点为何可见(FR-25.6 / AC-G22)。只在**授权面被临时扩大**时出现:
|
|
430
|
-
* `'modal-elevated'` =
|
|
431
|
-
*
|
|
430
|
+
* `'modal-elevated'` = 它在一个由本次已授权操作打开的对话框里,原本不在白名单内;
|
|
431
|
+
* `'inline-frame'` = 它来自一个没有可路由地址的同源嵌套帧(`srcdoc` / `about:blank`),
|
|
432
|
+
* 外壳无法寻址到它,只能由父帧就地内联(分册 16 FR-16.1)。缺省不带该字段。
|
|
432
433
|
*/
|
|
433
|
-
provenance?: 'modal-elevated';
|
|
434
|
+
provenance?: 'modal-elevated' | 'inline-frame';
|
|
435
|
+
/**
|
|
436
|
+
* 该节点的子树在本段里**没有给全**(0.14.0 分册 22 FR-22.3)。
|
|
437
|
+
* 只在分段切分产生的祖先浅副本上出现:告诉模型这不是一个新冒出来的节点,
|
|
438
|
+
* 它的其余子节点在前一段或后一段里。缺省不带该字段。
|
|
439
|
+
*/
|
|
440
|
+
continued?: boolean;
|
|
434
441
|
children?: readonly PerceivedNode[];
|
|
435
442
|
}
|
|
436
443
|
/** 随感知一起下发的一张图像(FR-12.1) @experimental */
|
|
@@ -460,6 +467,24 @@ interface PerceptionCaptureOptions {
|
|
|
460
467
|
*/
|
|
461
468
|
minImageArea?: number;
|
|
462
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* 本帧范围内发现的一个嵌套帧(0.14.0 分册 16 FR-16.1)。
|
|
472
|
+
*
|
|
473
|
+
* 是**结构化数据**而不是说明文本:外壳要拿它去路由下一次感知,
|
|
474
|
+
* 从一句英文里正则抠地址是两边同时演进就会断的做法。
|
|
475
|
+
*
|
|
476
|
+
* 只上报解析得出 http(s) 绝对地址的帧——地址是外壳做帧匹配的唯一凭据,
|
|
477
|
+
* 无地址的同源帧由 reader 就地内联,不走这条路。
|
|
478
|
+
* @experimental
|
|
479
|
+
*/
|
|
480
|
+
interface NestedFrameRef {
|
|
481
|
+
/** 已按文档基准解析的绝对地址 */
|
|
482
|
+
url: string;
|
|
483
|
+
/** `aria-label` / `title` / `name` / `id` 的首个非空值;都没有则 `'unnamed'` */
|
|
484
|
+
hint: string;
|
|
485
|
+
/** 发现它的那一层帧标识;主文档发现的不带此字段 */
|
|
486
|
+
frame?: string;
|
|
487
|
+
}
|
|
463
488
|
/**
|
|
464
489
|
* reader 的完整产物。只实现文本的 reader 可以继续返回节点数组。
|
|
465
490
|
* @experimental
|
|
@@ -468,6 +493,8 @@ interface PerceptionResult {
|
|
|
468
493
|
nodes: readonly PerceivedNode[];
|
|
469
494
|
/** 被跳过的帧及原因;调用方据此告警(FR-24.2 / FR-24.3) */
|
|
470
495
|
frameNotes?: readonly FrameNote[];
|
|
496
|
+
/** 本次范围内发现、可供外壳继续下钻的嵌套帧(分册 16 FR-16.1) */
|
|
497
|
+
nestedFrames?: readonly NestedFrameRef[];
|
|
471
498
|
images?: readonly PerceivedImage[];
|
|
472
499
|
/** 超出 `maxImages` 而未下发的张数 */
|
|
473
500
|
imagesOmitted?: number;
|
|
@@ -495,6 +522,15 @@ interface PerceptionRecord {
|
|
|
495
522
|
frames?: readonly string[];
|
|
496
523
|
/** 读到的顶层节点数;用于「它读的比我预期的多」这类判断 */
|
|
497
524
|
nodeCount: number;
|
|
525
|
+
/**
|
|
526
|
+
* 整份快照的节点总数(含各层);**只在这次感知被切成了多段时存在**(分册 22 FR-22.7)。
|
|
527
|
+
* `nodeCount` 的语义不动——改它会让所有既有断言与 console 展示静默变义。
|
|
528
|
+
*/
|
|
529
|
+
nodesTotal?: number;
|
|
530
|
+
/** 切成了几段;只在分段发生时存在 */
|
|
531
|
+
segments?: number;
|
|
532
|
+
/** 本次直接回喂给模型的那一段承载了多少个节点;只在分段发生时存在 */
|
|
533
|
+
segmentNodeCount?: number;
|
|
498
534
|
/** 本次下发的图像张数,按取像级别分组(只在取像开启时存在) */
|
|
499
535
|
images?: {
|
|
500
536
|
src: number;
|
|
@@ -565,6 +601,35 @@ declare class PagePerceptionPolicy {
|
|
|
565
601
|
}>;
|
|
566
602
|
}
|
|
567
603
|
//#endregion
|
|
604
|
+
//#region src/perception/paging.d.ts
|
|
605
|
+
/**
|
|
606
|
+
* 分段读取的预算与开关(0.14.0 分册 22 FR-22.4)。
|
|
607
|
+
*
|
|
608
|
+
* 两道闸先触发哪个算哪个:`maxNodes` 兜常规页面(空壳多、每个节点很小),
|
|
609
|
+
* `maxChars` 兜「少数节点携带超长文本」的极端情况——只设 `maxNodes` 时,
|
|
610
|
+
* 一个塞满日志的 `<pre>` 就能让 1500 个节点撑到几百 KB。
|
|
611
|
+
* @experimental
|
|
612
|
+
*/
|
|
613
|
+
interface PerceptionPagingBudget {
|
|
614
|
+
/** 缺省 false:不开启时只有地板(FR-22.2),没有游标 */
|
|
615
|
+
enabled: boolean;
|
|
616
|
+
/** 一段最多几个节点(含各层子节点,不是顶层数) */
|
|
617
|
+
maxNodes: number;
|
|
618
|
+
/** 一段序列化后的字符上限 */
|
|
619
|
+
maxChars: number;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* 预算缺省值(设计 §10)。**全仓只写这一份**,工具源与测试读同一份——
|
|
623
|
+
* 「断言常量等于它自己」那类假守护正是靠这条避免的。
|
|
624
|
+
*
|
|
625
|
+
* `maxChars` 必须显著小于 `toolResultMaxBytes`(256 000),否则 AC-22.7
|
|
626
|
+
* 「盲切永不触发」守不住。
|
|
627
|
+
*/
|
|
628
|
+
declare const PERCEPTION_PAGING_DEFAULTS: {
|
|
629
|
+
readonly maxNodes: number;
|
|
630
|
+
readonly maxChars: number;
|
|
631
|
+
};
|
|
632
|
+
//#endregion
|
|
568
633
|
//#region src/perception/toolSource.d.ts
|
|
569
634
|
declare const PERCEIVE_PAGE_TOOL = "perceive_page";
|
|
570
635
|
interface PagePerceptionToolSourceOptions {
|
|
@@ -574,6 +639,13 @@ interface PagePerceptionToolSourceOptions {
|
|
|
574
639
|
* 缺省即不取像。判定在遍历 DOM **之前**完成一次,不是每个节点判一次。
|
|
575
640
|
*/
|
|
576
641
|
imageCapture?(): ImageCaptureBudget | Promise<ImageCaptureBudget>;
|
|
642
|
+
/**
|
|
643
|
+
* 分段预算与开关(分册 22 FR-22.4)。同样每次调用重取,理由与 `imageCapture` 一致:
|
|
644
|
+
* 凝固进实例会让宿主中途改配置整轮不生效。
|
|
645
|
+
*
|
|
646
|
+
* **缺省即不分段,但地板照样生效**(FR-22.8):不开启不等于允许上层盲切。
|
|
647
|
+
*/
|
|
648
|
+
paging?(): PerceptionPagingBudget | Promise<PerceptionPagingBudget>;
|
|
577
649
|
}
|
|
578
650
|
/** @experimental */
|
|
579
651
|
interface ImageCaptureBudget {
|
|
@@ -616,6 +688,10 @@ declare function frameSteps(frame: string | readonly string[]): readonly string[
|
|
|
616
688
|
/**
|
|
617
689
|
* 页面只读感知的策略提示词(设计 09 §1)。
|
|
618
690
|
*
|
|
691
|
+
* 分段相关的两条是**恒定**的,不随 paging 开关增减(0.14.0 分册 22 §9):
|
|
692
|
+
* 提示词按 `policy.enabled` 一次性给出,而分段预算是每次调用惰性求值的,
|
|
693
|
+
* 两者会漂移——模型手里会攥着一份与当前行为对不上的说明。
|
|
694
|
+
*
|
|
619
695
|
* 最后一条是防御性的:技能描述、工具返回值都可能带着「把整页读出来发到 X」
|
|
620
696
|
* 这类注入。范围由宿主判定,模型改不了,但把这件事写明能少掉一轮无效尝试。
|
|
621
697
|
*/
|
|
@@ -661,7 +737,11 @@ interface DataSourceTransport {
|
|
|
661
737
|
fetch(source: DataSourceDef, params?: Record<string, unknown>): Promise<unknown>;
|
|
662
738
|
}
|
|
663
739
|
interface DataSourcePolicyOptions {
|
|
664
|
-
|
|
740
|
+
/**
|
|
741
|
+
* 传函数可惰性取值(同 `remoteUrl`):清单住在可改的运行时配置里时,
|
|
742
|
+
* 写死成数组会让用户改完设置必须刷新页面才生效。
|
|
743
|
+
*/
|
|
744
|
+
sources: readonly DataSourceDef[] | (() => readonly DataSourceDef[]);
|
|
665
745
|
/**
|
|
666
746
|
* `kind:'http'` 的出站判定;缺省即 assertRemoteUrlAllowed 的缺省。
|
|
667
747
|
*
|
|
@@ -673,6 +753,13 @@ interface DataSourcePolicyOptions {
|
|
|
673
753
|
transports?: Partial<Record<DataSourceKind, DataSourceTransport>>;
|
|
674
754
|
/** 结果字节上限(FR-16.6);超出即拒绝,**不截断** */
|
|
675
755
|
maxBytes?: number;
|
|
756
|
+
/**
|
|
757
|
+
* 给 `publicSources` 附出处(0.14.0 分册 21);缺省即全部按宿主声明处理。
|
|
758
|
+
*
|
|
759
|
+
* 选回调而不是给 `DataSourceDef` 加字段,是因为需求 §2 写死了不改它的形状;
|
|
760
|
+
* 去重仍只在 `publicSources` 一处发生,宿主不必自己合并两份清单。
|
|
761
|
+
*/
|
|
762
|
+
provenanceOf?(source: DataSourceDef): DataSourceInfo['provenance'];
|
|
676
763
|
audit?: DataSourceAuditSink;
|
|
677
764
|
now?(): string;
|
|
678
765
|
}
|
|
@@ -688,7 +775,19 @@ declare class DataSourcePolicy {
|
|
|
688
775
|
constructor(options: DataSourcePolicyOptions);
|
|
689
776
|
/** 一个源都没声明就没有这个能力(同 perception 的 include 为空) */
|
|
690
777
|
get enabled(): boolean;
|
|
778
|
+
/**
|
|
779
|
+
* 当前声明的源。**id 撞名时保留先声明的那条**(0.14.0 分册 19):
|
|
780
|
+
* 宿主写死的源排在用户配置之前,于是一条用户配置改不了 `current-page` 这类源的目标。
|
|
781
|
+
*/
|
|
691
782
|
get sources(): readonly DataSourceDef[];
|
|
783
|
+
/**
|
|
784
|
+
* 送往引擎与界面的清单(0.14.0 分册 19)。
|
|
785
|
+
*
|
|
786
|
+
* 宿主不得改传 `sources`:`DataSourceDef` 结构上是 `DataSourceInfo` 的超集,
|
|
787
|
+
* 直接赋值类型检查会过,`target` 于是静默地进了模型上下文。
|
|
788
|
+
* @experimental
|
|
789
|
+
*/
|
|
790
|
+
get publicSources(): readonly DataSourceInfo[];
|
|
692
791
|
get records(): readonly DataSourceRecord[];
|
|
693
792
|
fetchData(sourceId: string, params?: Record<string, unknown>): Promise<unknown>;
|
|
694
793
|
}
|
|
@@ -715,6 +814,115 @@ interface HttpDataSourceOptions {
|
|
|
715
814
|
*/
|
|
716
815
|
declare function createHttpDataSourceTransport(options?: HttpDataSourceOptions): DataSourceTransport;
|
|
717
816
|
//#endregion
|
|
817
|
+
//#region src/dataSource/candidates.d.ts
|
|
818
|
+
/** 候选的出处;**随对象记录**,不靠调用方记忆(FR-21.1) */
|
|
819
|
+
type DataSourceProvenance = 'page-declared' | 'tool-projection';
|
|
820
|
+
/**
|
|
821
|
+
* 一条尚不可取数的候选源(FR-21.1)。
|
|
822
|
+
*
|
|
823
|
+
* 它与 `DataSourceDef` 字段同名,但**不是**它的别名:候选层不参与取数,
|
|
824
|
+
* 两者共用一个类型会让「候选可以直接塞进 sources」在类型上成立。
|
|
825
|
+
* @experimental
|
|
826
|
+
*/
|
|
827
|
+
interface DataSourceCandidate {
|
|
828
|
+
id: string;
|
|
829
|
+
kind: DataSourceKind;
|
|
830
|
+
description: string;
|
|
831
|
+
target: string;
|
|
832
|
+
provenance: DataSourceProvenance;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* 「记住这个站点的这个源」的存储;粒度键由宿主给(D-21-3)。
|
|
836
|
+
*
|
|
837
|
+
* `scope` 在本包里是不透明串:`@webskill/agent` 不认识 origin 这个概念,
|
|
838
|
+
* 扩展传 `binding.origin()`,别的宿主可以传别的。
|
|
839
|
+
* @experimental
|
|
840
|
+
*/
|
|
841
|
+
interface DataSourceCandidateStore {
|
|
842
|
+
recall(scope: string, id: string): boolean | Promise<boolean>;
|
|
843
|
+
remember(scope: string, id: string): void | Promise<void>;
|
|
844
|
+
forget(scope: string, id: string): void | Promise<void>;
|
|
845
|
+
}
|
|
846
|
+
/** 候选生命周期的留痕(FR-21.7);取数那一类仍走 `DataSourceRecord` @experimental */
|
|
847
|
+
interface DataSourceCandidateRecord {
|
|
848
|
+
/** ISO 8601 */
|
|
849
|
+
at: string;
|
|
850
|
+
event: 'offered' | 'approved' | 'forgotten';
|
|
851
|
+
/** 宿主定义的粒度键;扩展侧即 origin */
|
|
852
|
+
scope: string;
|
|
853
|
+
id?: string;
|
|
854
|
+
/** 批准记录必须带(FR-21.7):只记 id 的话,事后无从知道当时点头的是哪个地址 */
|
|
855
|
+
target?: string;
|
|
856
|
+
kind?: DataSourceKind;
|
|
857
|
+
provenance?: DataSourceProvenance;
|
|
858
|
+
/** 批准方式:`true` 为「已记住」,`false` 为仅当次 */
|
|
859
|
+
remembered?: boolean;
|
|
860
|
+
/** `offered` 专有:本批被接受 / 被丢弃的条数 */
|
|
861
|
+
accepted?: number;
|
|
862
|
+
rejected?: number;
|
|
863
|
+
}
|
|
864
|
+
interface DataSourceCandidateAuditSink {
|
|
865
|
+
record(event: DataSourceCandidateRecord): void | Promise<void>;
|
|
866
|
+
}
|
|
867
|
+
interface DataSourceCandidatePolicyOptions {
|
|
868
|
+
store?: DataSourceCandidateStore;
|
|
869
|
+
audit?: DataSourceCandidateAuditSink;
|
|
870
|
+
/** 一个 scope 最多接受多少条提议;缺省 32 */
|
|
871
|
+
maxCandidates?: number;
|
|
872
|
+
now?(): string;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* 候选源策略(分册 21)。
|
|
876
|
+
*
|
|
877
|
+
* **本类不持有任何取数通道,也不引用任何出站 API**(AC-21.13):
|
|
878
|
+
* 页面提议里携带的 `target` 在用户点头之前不可能被请求,
|
|
879
|
+
* 这是结构结论,不是一句 `if (!approved) return`。
|
|
880
|
+
* @experimental
|
|
881
|
+
*/
|
|
882
|
+
declare class DataSourceCandidatePolicy {
|
|
883
|
+
#private;
|
|
884
|
+
constructor(options?: DataSourceCandidatePolicyOptions);
|
|
885
|
+
get records(): readonly DataSourceCandidateRecord[];
|
|
886
|
+
/**
|
|
887
|
+
* 页面提议入表。**同步返回,且不做任何网络动作**。
|
|
888
|
+
*
|
|
889
|
+
* 不触发确认卡:页面每次刷新都会重发一遍提议,
|
|
890
|
+
* 接到弹窗上等于把打断用户的权力交给页面(设计 §4.1)。
|
|
891
|
+
*/
|
|
892
|
+
offer(scope: string, candidates: readonly unknown[], provenance?: DataSourceProvenance): {
|
|
893
|
+
accepted: number;
|
|
894
|
+
rejected: number;
|
|
895
|
+
};
|
|
896
|
+
/** 尚待确认的:已批准的那些不再重复出现在这里 */
|
|
897
|
+
pending(scope: string | undefined): readonly DataSourceCandidate[];
|
|
898
|
+
approve(scope: string, id: string, options?: {
|
|
899
|
+
remember?: boolean;
|
|
900
|
+
}): Promise<void>;
|
|
901
|
+
/** 撤销:立刻回到候选状态,不需要重载页面(FR-21.2) */
|
|
902
|
+
forget(scope: string, id: string): Promise<void>;
|
|
903
|
+
/**
|
|
904
|
+
* 已获批的,投影成既有 `DataSourceDef`(**出处不在其中**:
|
|
905
|
+
* `DataSourceDef` 的形状不改,出处经 `provenanceOf` 单独取)。
|
|
906
|
+
*
|
|
907
|
+
* `undefined` 返回空数组:没绑定 tab 时不是「全部可用」,是「一条都没有」。
|
|
908
|
+
*/
|
|
909
|
+
approved(scope: string | undefined): readonly DataSourceDef[];
|
|
910
|
+
/** 供 `DataSourcePolicy.provenanceOf` 直接接线:不是候选出身的返回 undefined */
|
|
911
|
+
provenanceOf(scope: string | undefined, id: string): DataSourceProvenance | undefined;
|
|
912
|
+
/**
|
|
913
|
+
* 切绑定 tab 时调用。清「待批的」与「当次批准的」,
|
|
914
|
+
* **不动已记住的**——那些通过 `approved(新 scope)` 自然只对新 scope 生效。
|
|
915
|
+
*/
|
|
916
|
+
clearPending(): void;
|
|
917
|
+
/**
|
|
918
|
+
* 从 store 回填已记住的批准。
|
|
919
|
+
*
|
|
920
|
+
* `recall` 是异步端口而 `approved()` 是同步 getter(`DataSourcePolicy.sources` 要求同步),
|
|
921
|
+
* 所以命中与否必须在提议入表时先问一遍,而不是取数时现问。
|
|
922
|
+
*/
|
|
923
|
+
restore(scope: string): Promise<void>;
|
|
924
|
+
}
|
|
925
|
+
//#endregion
|
|
718
926
|
//#region src/pageAction/types.d.ts
|
|
719
927
|
/**
|
|
720
928
|
* 页面操作的策略层类型(需求 23)。
|
|
@@ -851,8 +1059,11 @@ interface PageActionRecord {
|
|
|
851
1059
|
name?: string;
|
|
852
1060
|
/** 目标所在的帧;主文档目标不带该字段(FR-24.6) */
|
|
853
1061
|
frame?: string;
|
|
854
|
-
/**
|
|
855
|
-
|
|
1062
|
+
/**
|
|
1063
|
+
* 是否经用户确认;宿主预授权的操作记 `'preauthorized'`,
|
|
1064
|
+
* 命中用户此前「不再询问」的记 `'remembered'`(需求 11 / FR-11.5)。
|
|
1065
|
+
*/
|
|
1066
|
+
approved: boolean | 'preauthorized' | 'remembered';
|
|
856
1067
|
ok: boolean;
|
|
857
1068
|
/** 目标位于本次会话中被提升的模态里(授权面临时扩大,FR-25.6 / AC-G22) */
|
|
858
1069
|
elevated?: boolean;
|
|
@@ -870,6 +1081,24 @@ interface PageActionRecord {
|
|
|
870
1081
|
interface PageActionUi {
|
|
871
1082
|
request(input: InteractionRequest): Promise<InteractionResponse>;
|
|
872
1083
|
}
|
|
1084
|
+
/**
|
|
1085
|
+
* 「不再询问」的记忆端口(需求 11 / FR-11.1)。**存储与粒度归宿主**:
|
|
1086
|
+
* 粒度键通常是 origin,而本包不认识 origin。
|
|
1087
|
+
*
|
|
1088
|
+
* 不注入即完全无记忆:确认卡不出复选框,行为与 0.13.0 逐字一致。
|
|
1089
|
+
* @experimental
|
|
1090
|
+
*/
|
|
1091
|
+
interface PageActionConsent {
|
|
1092
|
+
/** 该目标 + 动作是否已被记住;`true` 即本次不弹卡 */
|
|
1093
|
+
recall(target: PageActionTarget, action: PageActionKind): boolean | Promise<boolean>;
|
|
1094
|
+
/** 用户勾了「不再询问」并允许后写入 */
|
|
1095
|
+
remember(target: PageActionTarget, action: PageActionKind): void | Promise<void>;
|
|
1096
|
+
/**
|
|
1097
|
+
* 复选框旁的文案。宿主不实现即用通用兜底串——
|
|
1098
|
+
* SDK 无权替宿主宣称记住的是「此站点」,写死会在宿主换粒度时变成谎报授权范围。
|
|
1099
|
+
*/
|
|
1100
|
+
describeScope?(target: PageActionTarget, action: PageActionKind): string | undefined;
|
|
1101
|
+
}
|
|
873
1102
|
interface PageActionPolicyOptions {
|
|
874
1103
|
/** 宿主声明的可操作范围;`include` 为空即整个能力不可用 */
|
|
875
1104
|
scope: PageActionScopeInput;
|
|
@@ -884,6 +1113,11 @@ interface PageActionPolicyOptions {
|
|
|
884
1113
|
* 只有宿主显式配置才生效,SDK 不提供任何缺省放行项。
|
|
885
1114
|
*/
|
|
886
1115
|
preauthorized?: readonly PageActionKind[];
|
|
1116
|
+
/**
|
|
1117
|
+
* 「不再询问」的记忆端口(需求 11)。与 `preauthorized` 并列且互不引用:
|
|
1118
|
+
* 前者是宿主装配时写死的静态配置,后者是用户运行期一次一次攒出来的。
|
|
1119
|
+
*/
|
|
1120
|
+
consent?: PageActionConsent;
|
|
887
1121
|
now?(): string;
|
|
888
1122
|
}
|
|
889
1123
|
/**
|
|
@@ -941,4 +1175,150 @@ declare function createPageActionToolSource(options: PageActionToolSourceOptions
|
|
|
941
1175
|
*/
|
|
942
1176
|
declare const PAGE_ACTION_SYSTEM_PROMPT: string;
|
|
943
1177
|
//#endregion
|
|
944
|
-
|
|
1178
|
+
//#region src/downloads/types.d.ts
|
|
1179
|
+
/**
|
|
1180
|
+
* 一条已下载文件的目录项。
|
|
1181
|
+
* @experimental
|
|
1182
|
+
*/
|
|
1183
|
+
interface DownloadedFileEntry {
|
|
1184
|
+
/**
|
|
1185
|
+
* 不透明标识。**不得是路径,也不得可反推出路径**(FR-20.2):
|
|
1186
|
+
* 模型手里只该有一个宿主认得、别人认不出的取件号。
|
|
1187
|
+
*/
|
|
1188
|
+
id: string;
|
|
1189
|
+
name: string;
|
|
1190
|
+
contentType: string;
|
|
1191
|
+
size: number;
|
|
1192
|
+
/** ISO 8601,下载完成时刻 */
|
|
1193
|
+
at: string;
|
|
1194
|
+
}
|
|
1195
|
+
/** `list_downloaded_files` 下发给模型的条目:目录项 + 可读性判定 @experimental */
|
|
1196
|
+
interface DownloadedFileListing extends DownloadedFileEntry {
|
|
1197
|
+
readable: boolean;
|
|
1198
|
+
/** 不可读的原因(英文);可读时不存在 */
|
|
1199
|
+
reason?: string;
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* 本机下载文件的取件实现(FR-20.1)。**不注入即整条通路不存在**——
|
|
1203
|
+
* 工具不注册,模型看不到它。
|
|
1204
|
+
* @experimental
|
|
1205
|
+
*/
|
|
1206
|
+
interface DownloadedFileReader {
|
|
1207
|
+
list(): Promise<readonly DownloadedFileEntry[]>;
|
|
1208
|
+
/**
|
|
1209
|
+
* 按不透明标识取字节。**`contentType` 必须由本方法重新给出**,
|
|
1210
|
+
* 不复用 `list()` 那次的值:两次调用之间文件可能被替换,
|
|
1211
|
+
* 信 list 的类型等于让「列出时是 csv、读取时是别的东西」这条路存在。
|
|
1212
|
+
*/
|
|
1213
|
+
read(id: string): Promise<{
|
|
1214
|
+
contentType: string;
|
|
1215
|
+
bytes: Uint8Array;
|
|
1216
|
+
}>;
|
|
1217
|
+
}
|
|
1218
|
+
/** 授权动作。列出与读取各自确认,措辞不同(D-20-3) @experimental */
|
|
1219
|
+
type DownloadedFileAction = 'list' | 'read';
|
|
1220
|
+
/**
|
|
1221
|
+
* 「不再询问」的记忆端口(D-20-2)。**存储与粒度归宿主**:
|
|
1222
|
+
* SDK 不认识「下载目录」这个概念,`remember` 记的是什么由装配方决定。
|
|
1223
|
+
*
|
|
1224
|
+
* 不注入即完全无记忆:确认卡不出复选框。
|
|
1225
|
+
* @experimental
|
|
1226
|
+
*/
|
|
1227
|
+
interface DownloadedFileConsent {
|
|
1228
|
+
recall(action: DownloadedFileAction, entry?: DownloadedFileEntry): boolean | Promise<boolean>;
|
|
1229
|
+
remember(action: DownloadedFileAction, entry?: DownloadedFileEntry): void | Promise<void>;
|
|
1230
|
+
/**
|
|
1231
|
+
* 复选框旁的文案。宿主不实现即用通用兜底串——
|
|
1232
|
+
* SDK 无权替宿主宣称记住的是「整个下载目录」,写死会变成谎报授权范围。
|
|
1233
|
+
*/
|
|
1234
|
+
describeScope?(action: DownloadedFileAction, entry?: DownloadedFileEntry): string | undefined;
|
|
1235
|
+
}
|
|
1236
|
+
/** 一次列出或读取的留痕(FR-20.5) @experimental */
|
|
1237
|
+
interface DownloadedFileRecord {
|
|
1238
|
+
at: string;
|
|
1239
|
+
action: DownloadedFileAction;
|
|
1240
|
+
/** `list` 时不存在:审计要回答「模型什么时候看过目录」,抄下整份清单是把一次披露变成两次 */
|
|
1241
|
+
name?: string;
|
|
1242
|
+
size?: number;
|
|
1243
|
+
contentType?: string;
|
|
1244
|
+
approved: boolean | 'remembered';
|
|
1245
|
+
ok: boolean;
|
|
1246
|
+
reason?: string;
|
|
1247
|
+
}
|
|
1248
|
+
/** 读取成功后交给工具层的形态;`kind` 决定它以哪种分片进上下文 @experimental */
|
|
1249
|
+
interface DownloadedFileReadResult {
|
|
1250
|
+
entry: DownloadedFileEntry;
|
|
1251
|
+
/** `read()` 重新给出的类型,不是 `entry.contentType` */
|
|
1252
|
+
contentType: string;
|
|
1253
|
+
kind: ChatAttachmentKind;
|
|
1254
|
+
/** `text` / `document-text`:已按上下文形态格式化并截断 */
|
|
1255
|
+
text?: string;
|
|
1256
|
+
/** `file` / `image`:原始字节 */
|
|
1257
|
+
bytes?: Uint8Array;
|
|
1258
|
+
}
|
|
1259
|
+
//#endregion
|
|
1260
|
+
//#region src/downloads/policy.d.ts
|
|
1261
|
+
/**
|
|
1262
|
+
* 授权卡的最小出口。与 `PageActionUi` 结构相同,宿主传同一个对象即可——
|
|
1263
|
+
* 不复用那个名字是因为「下载文件策略 import 一个叫 PageAction… 的类型」会被读成有依赖关系。
|
|
1264
|
+
* @experimental
|
|
1265
|
+
*/
|
|
1266
|
+
interface ConsentUi {
|
|
1267
|
+
request(input: InteractionRequest): Promise<InteractionResponse>;
|
|
1268
|
+
}
|
|
1269
|
+
interface DownloadedFilePolicyOptions {
|
|
1270
|
+
/** 取件实现。**不注入即整条通路不存在**:`enabled` 为 false,工具不注册(AC-20.1) */
|
|
1271
|
+
reader?: DownloadedFileReader;
|
|
1272
|
+
/**
|
|
1273
|
+
* 授权卡出口。**必填**:引擎的 `#confirm` 在没接 UI 桥时自动放行,
|
|
1274
|
+
* 那条 fail-open 的路对「读用户本机磁盘」不成立。接不上就构造不出策略。
|
|
1275
|
+
*/
|
|
1276
|
+
ui: ConsentUi;
|
|
1277
|
+
/** 能力开关(`sandbox.downloadedFiles`)。每次读取,设置改完立刻生效;缺省即**关闭** */
|
|
1278
|
+
capabilityEnabled?(): boolean;
|
|
1279
|
+
consent?: DownloadedFileConsent;
|
|
1280
|
+
audit?: PageAuditSink;
|
|
1281
|
+
/** 审计事件的 target(缺省 `downloads`) */
|
|
1282
|
+
auditTarget?: string;
|
|
1283
|
+
/** 选中模型能否读图(D-20-7)。缺省即**不能**:不知道就不给看 */
|
|
1284
|
+
imageCapable?(): boolean | Promise<boolean>;
|
|
1285
|
+
/** docx → 文本。必须与手动上传用的是**同一个**抽取器(AC-20.6) */
|
|
1286
|
+
docxExtractor?: DocxTextExtractor;
|
|
1287
|
+
/** xlsx → 文本。同上 */
|
|
1288
|
+
xlsxExtractor?: XlsxTextExtractor;
|
|
1289
|
+
now?(): string;
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* 读取本机下载文件的策略(0.14.0 分册 20)。
|
|
1293
|
+
*
|
|
1294
|
+
* 三道闸门依次是:宿主有没有接端口并打开开关、用户认不认、文件类型读不读得了。
|
|
1295
|
+
* 模型能表达的只有「列目录」与「读这个取件号」——它没有任何指定路径的入口(AC-20.9)。
|
|
1296
|
+
* @experimental
|
|
1297
|
+
*/
|
|
1298
|
+
declare class DownloadedFilePolicy {
|
|
1299
|
+
#private;
|
|
1300
|
+
constructor(options: DownloadedFilePolicyOptions);
|
|
1301
|
+
/** 端口未注入或开关关闭即整个能力不存在(AC-20.1 / AC-20.2) */
|
|
1302
|
+
get enabled(): boolean;
|
|
1303
|
+
/** 最近的记录(只读展示用),新的在前 */
|
|
1304
|
+
get records(): readonly DownloadedFileRecord[];
|
|
1305
|
+
list(): Promise<readonly DownloadedFileListing[]>;
|
|
1306
|
+
read(id: string): Promise<DownloadedFileReadResult>;
|
|
1307
|
+
}
|
|
1308
|
+
//#endregion
|
|
1309
|
+
//#region src/downloads/toolSource.d.ts
|
|
1310
|
+
declare const LIST_DOWNLOADED_FILES_TOOL = "list_downloaded_files";
|
|
1311
|
+
declare const READ_DOWNLOADED_FILE_TOOL = "read_downloaded_file";
|
|
1312
|
+
interface DownloadedFileToolSourceOptions {
|
|
1313
|
+
policy: DownloadedFilePolicy;
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* 把下载文件读取接到既有工具协议上。
|
|
1317
|
+
*
|
|
1318
|
+
* 端口未注入或能力开关关闭时 `listToolSpecs()` 返回空数组——
|
|
1319
|
+
* 模型连这两个工具的存在都看不到,而不是看得到再被拒(AC-20.1 / AC-20.2)。
|
|
1320
|
+
* @experimental
|
|
1321
|
+
*/
|
|
1322
|
+
declare function createDownloadedFileToolSource(options: DownloadedFileToolSourceOptions): ExternalToolSource;
|
|
1323
|
+
//#endregion
|
|
1324
|
+
export { PageActionOutcome as $, frameSteps as $t, DownloadedFilePolicyOptions as A, SkillGenerationToolSourceOptions as At, ImageCaptureBudget as B, TodoList as Bt, DelegationResult as C, PerceptionScopeInput as Ct, DownloadedFileEntry as D, SkillGenerationMessages as Dt, DownloadedFileConsent as E, SkillCandidateSink as Et, FrameNote as F, SubAgentRunInput as Ft, PAGE_ACTION_SYSTEM_PROMPT as G, createDelegationToolSource as Gt, MANAGE_TODO_TOOL as H, TodoStatus as Ht, FrameScope as I, SubAgentRunner as It, PERCEPTION_PAGING_DEFAULTS as J, createPageActionToolSource as Jt, PAGE_ACTION_TOOL as K, createDownloadedFileToolSource as Kt, GENERATE_SKILL_TOOL as L, TODO_SYSTEM_PROMPT as Lt, DownloadedFileReader as M, SkillGeneratorOptions as Mt, DownloadedFileRecord as N, SkillTraceEvidence as Nt, DownloadedFileListing as O, SkillGenerationOutcome as Ot, DownloadedFileToolSourceOptions as P, SkillTraceEvidenceStep as Pt, PageActionKind as Q, frameLabel as Qt, GeneratedSkillDraft as R, TodoEvent as Rt, DelegationRequest as S, PerceptionScope as St, DownloadedFileAction as T, SKILL_GENERATION_SYSTEM_PROMPT as Tt, NestedFrameRef as U, TodoStore as Ut, LIST_DOWNLOADED_FILES_TOOL as V, TodoListener as Vt, PAGE_ACTION_KINDS as W, TodoToolSourceOptions as Wt, PageActionConsent as X, createSkillGenerationToolSource as Xt, PERCEPTION_SYSTEM_PROMPT as Y, createPagePerceptionToolSource as Yt, PageActionExecutor as Z, createTodoToolSource as Zt, DataSourceRecord as _, PerceptionAuditSink as _t, DataSourceAuditSink as a, PageActionScopeInput as at, DelegationOrchestrator as b, PerceptionRecord as bt, DataSourceCandidatePolicy as c, PageActionUi as ct, DataSourceCandidateStore as d, PagePerceptionPolicyOptions as dt, toActionFrameScopes as en, PageActionPolicy as et, DataSourceDef as f, PagePerceptionReader as ft, DataSourceProvenance as g, PerceivedNode as gt, DataSourcePolicyOptions as h, PerceivedImage as ht, DELEGATION_SYSTEM_PROMPT as i, PageActionScope as it, DownloadedFileReadResult as j, SkillGenerator as jt, DownloadedFilePolicy as k, SkillGenerationPolicy as kt, DataSourceCandidatePolicyOptions as l, PageAuditSink as lt, DataSourcePolicy as m, ParentBudget as mt, ConsentUi as n, withDelegationOrigin as nn, PageActionRecord as nt, DataSourceCandidate as o, PageActionTarget as ot, DataSourceKind as p, PagePerceptionToolSourceOptions as pt, PERCEIVE_PAGE_TOOL as q, createHttpDataSourceTransport as qt, DELEGATE_TASK_TOOL as r, PageActionRequest as rt, DataSourceCandidateAuditSink as s, PageActionToolSourceOptions as st, ActionFrameScope as t, toFrameScopes as tn, PageActionPolicyOptions as tt, DataSourceCandidateRecord as u, PagePerceptionPolicy as ut, DataSourceTransport as v, PerceptionCaptureOptions as vt, DelegationToolSourceOptions as w, READ_DOWNLOADED_FILE_TOOL as wt, DelegationOrchestratorOptions as x, PerceptionResult as xt, DelegationBudget as y, PerceptionPagingBudget as yt, HttpDataSourceOptions as z, TodoItem as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { C as UiSpecActionCapability, D as UiSpecSnapshot, Dt as UiSpecNode, K as JsonSchema, S as UiBridge, b as RenderResultRequest, c as InteractionResponse, r as ChartSpec, s as InteractionRequest, y as RenderBlock } from "./types-C3V6lAeO-BgeOvc1Y.js";
|
|
2
|
+
import { I as ExternalToolSource } from "./index-CWoKOFBP.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
5
|
//#region ../ui/dist/index.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as
|
|
1
|
+
import { $ as SKILLS_LOCKFILE, $t as normalizePath, A as extractSkillCandidate, At as VerifyResult, B as DiscoveryResult, Bt as checkSkillRules, C as UiSpecActionCapability, Ct as SkillsLockfile, D as UiSpecSnapshot, Dt as UiSpecNode, E as UiSpecPatch, Et as TrustedKeyStore, F as CatalogRenderer, Ft as assertSafePathSegment, G as IMAGE_MIME_TYPES, Gt as escapeXml, H as FileStat, Ht as computeDigest, I as ChatAttachmentKind, It as atomicWriteText, J as MemoryFS, Jt as isAtomicTempPath, K as JsonSchema, Kt as exportSkills, L as CryptoKeyLike, Lt as buildCatalog, M as ATTACHMENT_TEXT_LIMIT, Mt as WebSkillErrorCode, N as ArchiveLimits, Nt as XLSX_MIME, O as UiSurfaceActionRequest, Ot as UnsignedPolicy, P as AttachmentTextInput, Pt as assertRemoteUrlAllowed, Q as SIGNATURE_SCHEMA_VERSION, Qt as messageOf, R as DEFAULT_ARCHIVE_LIMITS, Rt as buildManifest, S as UiBridge, St as SkillSource, T as UiSpecEvent, Tt as TrustedKey, U as FileSystemProvider, Ut as detectSkillArchiveShape, V as FILE_MIME_TYPES, Vt as classifyAttachment, W as FsTrustedKeyStore, Wt as detectSkillArchiveShapeFromFs, X as PageQuery, Xt as jsonRenderer, Y as Page, Yt as isValidSkillName, Z as RemoteUrlPolicy, Zt as keyIdOf, _ as LlmToolSpec, _t as SkillManifest, a as InteractionOrigin, an as renderCatalogJson, at as SignatureAuditSink, b as RenderResultRequest, bt as SkillReader, c as InteractionResponse, cn as signSkill, ct as SkillArchiveShape, d as LlmContentPart, dn as unzipWithLimits, dt as SkillDiscovery, en as parseSkillMarkdown, et as SKILL_MANIFEST_FILE, f as LlmMessage, fn as validateSkills, ft as SkillDocument, g as LlmToolCall, gt as SkillManagerPort, h as LlmTokenUsage, hn as xmlRenderer, ht as SkillLocation, i as FormField, in as renderAvailableSkillsXml, it as SKILL_SIGNATURE_FILE, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as WebSkillError, k as UiSurfaceActionResponse, kt as ValidationReport, l as LlmClient, ln as signaturePayloadBytes, lt as SkillCatalog, m as LlmStreamEvent, mn as verifySkillSignature, mt as SkillIssue, n as ArtifactStore, nn as readResponseWithLimit, nt as SKILL_NAME_PATTERN, o as InteractionPolicy, on as resolveArchiveLimits, ot as SignatureVerdict, p as LlmResponse, pn as verifyManifest, pt as SkillInstallSource, q as MANIFEST_EXCLUDED_FILES, qt as formatAttachmentText, r as ChartSpec, rn as readSkillSignature, rt as SKILL_PACK_FILE, s as InteractionRequest, sn as resolveInsideRoot, st as SkillArchiveDetection, t as Artifact, tn as parseSkillPackManifest, tt as SKILL_NAME_MAX_LENGTH, u as LlmCompleteInput, un as stripArchiveRoot, ut as SkillCatalogEntry, v as MemoryStore, vt as SkillMetadata, w as UiSpecDrafts, wt as TEXT_EXTENSIONS, x as SkillCandidateMarker, xt as SkillSignature, y as RenderBlock, yt as SkillPackManifest, z as DOCX_MIME, zt as checkDependencyCycles } from "./types-C3V6lAeO-BgeOvc1Y.js";
|
|
2
|
+
import { $ as LifecycleEventInit, $n as formatSkillScriptManifest, $t as SkillIntegrityGuard, A as DataSourceInfo, An as UnsupportedRunSnapshot, Ar as textParts, At as RunTraceMetrics, B as FsRunSnapshotStore, Bn as XlsxTextExtractor, Bt as SUPPORTED_DOCUMENT_MIME, C as CapabilityApproval, Cn as TraceRecorder, Cr as sampleBehaviorRecords, Ct as RunSnapshot, D as DEFAULT_MAX_DOCUMENT_BYTES, Dn as USER_PROFILE_NO_INVENTION_RULE, Dr as sealToolCallPairs, Dt as RunToolCall, E as DEFAULT_MAX_DATA_SOURCE_BYTES, En as USER_PROFILE_KEY, Er as scriptToolName, Et as RunTerminationReason, F as ExternalSkillProvider, Fn as UserProfileLimits, Fr as validateUiSpecEvent, Ft as RuntimeRun, G as GoogleGenAiClient, Gn as createScriptContext, Gt as SealRecord, H as FsSessionStore, Hn as applyUserProfileImport, Ht as ScriptExecutionContext, I as ExternalToolSource, In as VercelToolSpec, Ir as validateUiSpecNode, It as RuntimeSession, J as HookRunnerOptions, Jn as exportUserProfile, Jt as SessionListPage, K as GoogleGenAiClientConfig, Kn as createWebSkillApi, Kt as SealResult, L as FS_SESSION_PAGE_SIZE, Ln as WebSkillApi, Lt as RuntimeSessionHandle, M as EMPTY_USER_PROFILE, Mn as UserProfileEntry, Mr as toLlmToolSpec, Mt as RunTraceSummary, N as EventBus, Nn as UserProfileExport, Nr as toRecordDigests, Nt as RunUsageSummary, O as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, On as USER_PROFILE_PROMPT_HEADER, Or as summarizeRunUsage, Ot as RunTraceFile, P as ExecuteLifecycleData, Pn as UserProfileImportDiff, Pr as toVercelToolSpecs, Pt as RuntimePhase, Q as LifecycleEvent, Qn as findUnpairedToolCalls, Qt as SkillFailureReport, R as FsArtifactStore, Rn as WebSkillRuntime, Rt as SENSITIVE_ANNOTATION, S as BridgeResponse, Sn as TraceEventType, Sr as resolveToolName, St as RunResult, T as DEFAULT_LOOP_LIMITS, Tn as USER_PROFILE_EXPORT_VERSION, Tr as schemaToForm, Tt as RunSnapshotStore, U as FsToolStepStore, Un as bridgeError, Ut as ScriptExecutor, V as FsRunTraceStore, Vn as appendBehaviorRecords, Vt as SchemaInferer, W as FullDisclosureRouter, Wn as buildRenderResult, Wt as SealOptions, X as IntegrityVerdict, Xn as extractTodoTraceEvents, Xt as SessionRecord, Y as InstalledSkillManifest, Yn as extractChartSpec, Yt as SessionMeta, Z as InteractLifecycleData, Zn as extractUiSpecEvents, Zt as SessionStore, _ as BehaviorRecordKind, _n as ToolStepRecord, _r as readProfileEntries, _t as RedactedArgs, a as ASK_USER_TOOL, an as SkillSuccessReport, ar as listSkillScripts, at as NetworkPolicy, b as BridgeCapability, bn as TraceClock, br as refineUserProfile, bt as RouteResult, c as AgentLoop, cn as TextualToolContent, cr as networkPolicyLibSource, ct as PdfTextExtractor, d as AnthropicClient, dn as ToolContent, dr as normalizeToolContent, dt as READ_LINKED_DOCUMENT_TOOL_NAME, en as SkillOutcomeReporter, er as fromVercelResult, et as LifecycleHook, f as AnthropicClientConfig, fn as ToolDefinition, fr as normalizeToolError, ft as READ_SKILL_FILE_INPUT_SCHEMA, g as BehaviorRecord, gn as ToolStepReader, gr as readBehaviorRecords, gt as RUN_TRACE_SCHEMA_VERSION, h as BEHAVIOR_RECORDS_KEY, hn as ToolResult, hr as partsToText, ht as RUN_SNAPSHOT_SCHEMA_VERSION, i as ASK_USER_MAX_FIELDS, in as SkillStateGuard, ir as isUnsupportedRunSnapshot, it as MAX_TOOL_STEP_ARG_BYTES, j as DocxTextExtractor, jn as UserProfile, jr as toBase64, jt as RunTraceStore, k as DEFAULT_USER_PROFILE_LIMITS, kn as USER_PROFILE_REFINE_PROMPT, kr as summarizeToolCalls, kt as RunTraceFilter, l as AgentLoopConfig, ln as TodoTraceEvent, lr as networkUrlHost, lt as ProgressiveRouter, m as ApprovalScope, mn as ToolResolution, mr as parseUserProfileExport, mt as READ_SKILL_FILE_TOOL_NAME, n as ASK_USER_FIELD_TYPES, nn as SkillScriptDescriptor, nr as interruptedToolResult, nt as LifecycleListener, o as ASK_USER_TOOL_NAME, on as TEXT_BUDGETED_CONTENT_TYPES, or as mergeCatalogEntries, ot as OpenAiCompatibleClient, p as ApprovalDecision, pn as ToolDisclosure, pr as parseBridgeRequest, pt as READ_SKILL_FILE_TOOL, q as HookRunner, qn as diffUserProfile, qt as SerializingMemoryStore, r as ASK_USER_INPUT_SCHEMA, rn as SkillScriptSchemaSource, rr as isNetworkAllowed, rt as LinkedDocumentReader, s as ActivateLifecycleData, sn as TerminalLifecycleData, sr as mergeProfileEntries, st as OpenAiCompatibleClientConfig, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as SkillRouter, tr as fromVercelStreamPart, tt as LifecycleHookContext, u as AgentLoopDeps, un as ToolCallContext, ur as normalizeErrorCode, ut as READ_LINKED_DOCUMENT_TOOL, v as BehaviorScene, vn as ToolStepStore, vr as readUserProfile, vt as RefineUserProfileInput, w as CapabilityMode, wn as UNSUPPORTED_DOCUMENT_MESSAGE, wr as schemaSourceLabel, wt as RunSnapshotListEntry, x as BridgeRequest, xn as TraceEvent, xr as renderUserProfileContext, xt as RunLimitErrorDetails, y as BridgeCapabilities, yn as ToolStepTrust, yr as redactToolStepArgs, yt as RouteLifecycleData, z as FsMemoryStore, zn as WebSkillRuntimeDeps, zt as SESSION_SCHEMA_VERSION } from "./index-CWoKOFBP.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
|
+
declare const SDK_VERSION = "0.14.0";
|
|
10
10
|
//#endregion
|
|
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, FsToolStepStore, 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, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, type PdfTextExtractor, 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 RedactedArgs, 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, SENSITIVE_ANNOTATION, 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 ToolDisclosure, type ToolResolution, type ToolResult, type ToolStepReader, type ToolStepRecord, type ToolStepStore, type ToolStepTrust, 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, type XlsxTextExtractor, 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, redactToolStepArgs, 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, ATTACHMENT_TEXT_LIMIT, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, type AttachmentTextInput, 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 ChatAttachmentKind, 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, DOCX_MIME, type DataSourceInfo, type DiscoveryResult, type DocxTextExtractor, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FILE_MIME_TYPES, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, IMAGE_MIME_TYPES, 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, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, type PdfTextExtractor, 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 RedactedArgs, 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, SENSITIVE_ANNOTATION, 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, TEXT_EXTENSIONS, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolCallContext, type ToolContent, type ToolDefinition, type ToolDisclosure, type ToolResolution, type ToolResult, type ToolStepReader, type ToolStepRecord, type ToolStepStore, type ToolStepTrust, 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, XLSX_MIME, type XlsxTextExtractor, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatAttachmentText, 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, redactToolStepArgs, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|