@webskill/sdk 0.13.0 → 0.15.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 +2442 -3
- package/dist/{dist-ExSQky4C.js → approval-BnLLCOG0.js} +277 -2934
- package/dist/browser.d.ts +327 -8
- package/dist/browser.js +1017 -51
- package/dist/{openUiLibrary-BKXW7Iwx-CWWBVOkE.js → dist-CTsxblSD.js} +496 -28
- package/dist/{echarts-De78wXqV.js → echarts-BE7oV_Dl.js} +1 -1
- package/dist/{env-8cY40DXB-CGnEVZby.js → env-Bj1MI2Ww.js} +1 -1
- package/dist/errors-BDZNpC13.js +22 -0
- package/dist/{eventTypes-FllCrX-Z-DNDeHWoG.js → eventTypes-Y07N8IAC.js} +14 -2
- package/dist/external-_ZRQe-V9.js +53 -0
- package/dist/governance.d.ts +15 -3
- package/dist/governance.js +86 -4
- package/dist/{index-iBm9tJL_.d.ts → index-CQYo4tcT.d.ts} +469 -10
- package/dist/{index-C3XdItd_.d.ts → index-CU2md8R1.d.ts} +26 -18
- package/dist/{index-DkvBhJQy.d.ts → index-Oc3H89TJ.d.ts} +204 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1001 -5
- package/dist/kind-DxgS8LM-.js +77 -0
- package/dist/linkedDocument-xNXF-z8n.js +94 -0
- package/dist/llm-B7lLH0ZI.js +1767 -0
- package/dist/mcp.d.ts +56 -3
- package/dist/mcp.js +75 -5
- package/dist/memoryArtifactStore-D6dLeY55.js +48 -0
- package/dist/miniChart-owdCdaw-.js +533 -0
- package/dist/node.d.ts +3 -3
- package/dist/node.js +110 -13
- package/dist/openUiLibrary-CY_ADoe0.js +30 -0
- package/dist/openUiSpecLang-DuOCdw9G.js +1849 -0
- package/dist/pathSecurity-B1owvJAF.js +65 -0
- package/dist/processSandboxEntry.js +5 -1
- package/dist/renderResult-D9Q-Vu2x.js +143 -0
- package/dist/{rolldown-runtime-BOF7iYI8.js → rolldown-runtime-BHkdefai.js} +1 -2
- package/dist/sandboxWorkerEntry.js +5 -1
- package/dist/{dist-Bev6i6Ip.js → skill-CAJMsLod.js} +44 -314
- package/dist/{skillVersionStore-D-qHk9ZE-DheTIwAB.d.ts → skillVersionStore-B24Jjjry-C4zomhMZ.d.ts} +14 -2
- package/dist/surface-DVGiCmwq.js +145 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +64 -3
- package/dist/{types-DLctJep_-B5G4uk2u.d.ts → types-C3V6lAeO-BIf7UB2e.d.ts} +79 -4
- package/dist/types-TUydnxaj.js +78 -0
- package/dist/ui-react.d.ts +12 -5
- package/dist/ui-react.js +128548 -4729
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +11 -2
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +1254 -3
- package/dist/urlSafety-CiSuCJvX.js +65 -0
- package/dist/webSkillApi-DOOyz2G5.js +106 -0
- package/dist/{webskillLitCatalog-D_zCqeQF-C9lrvvMr.js → webskillLitCatalog-DSqVFQjK.js} +11 -3
- package/package.json +1 -1
- package/dist/catalogComponents-BgAJN0p8-CYEXSk45.js +0 -124384
- package/dist/client-BCM6Z3yq-qUQNkKrK.js +0 -7787
- package/dist/dist-DqcL6jKO.js +0 -3509
- package/dist/dist-DxyxmXPU-DGC-dpXf.js +0 -5621
- package/dist/dist-GK6dtjRv.js +0 -1493
- package/dist/memoryArtifactStore-52Zn9npI-LbCQaqyx.js +0 -86
- package/dist/stdio-CFMoANJJ-BxrTeXh7.js +0 -31
- package/dist/testing-WPTyXQYt.js +0 -142
- package/dist/types-WovEf4ED-CZSDiiBU.js +0 -6215
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { C as UiSpecActionCapability, D as UiSpecSnapshot, K as JsonSchema, Ot as UiSpecNode, S as UiBridge, b as RenderResultRequest, c as InteractionResponse, r as ChartSpec, s as InteractionRequest, y as RenderBlock } from "./types-C3V6lAeO-BIf7UB2e.js";
|
|
2
|
+
import { z as ExternalToolSource } from "./index-Oc3H89TJ.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
5
|
//#region ../ui/dist/index.d.ts
|
|
@@ -80,6 +80,8 @@ interface SurfaceFormTexts {
|
|
|
80
80
|
suggested: string;
|
|
81
81
|
/** 采纳建议值的按钮 */
|
|
82
82
|
useSuggestion: string;
|
|
83
|
+
/** `OpenDocument` 按钮的缺省文案(0.15.0 分册 13;技能的 `props.label` 优先) */
|
|
84
|
+
openDocument: string;
|
|
83
85
|
}
|
|
84
86
|
/** 可复用的部分取自 DEFAULT_INTERACTION_TEXTS,不另抄一份(AC-G10) */
|
|
85
87
|
declare const DEFAULT_SURFACE_FORM_TEXTS: SurfaceFormTexts;
|
|
@@ -447,39 +449,45 @@ declare const UI_CATALOG_PROMPT_BUDGET_BYTES: number;
|
|
|
447
449
|
* **超阈值的处置是砍组件或收窄枚举取值,不是抬高这里的数字。**
|
|
448
450
|
*/
|
|
449
451
|
/**
|
|
450
|
-
*
|
|
451
|
-
* 已有的 `Field.type`,分册 23 不碰 catalog),故在此切到 `'final'`:
|
|
452
|
+
* 预算阶段。0.11.0 分册 12 是那一版最后一处 catalog 增量,故切到 `'final'`:
|
|
452
453
|
* 阈值收紧到实测终态 + 余量,且余量小于一个平均组件的成本
|
|
453
454
|
* ——余量大于一个组件,等于默许下一版无声塞进一个。
|
|
455
|
+
* 0.15.0 分册 13 新增 `OpenDocument` 后仍是 `'final'`,只是实测基线换了一份。
|
|
454
456
|
*/
|
|
455
457
|
declare const CATALOG_BUDGET_STAGE: 'entry' | 'final';
|
|
456
458
|
/**
|
|
457
459
|
* 阈值 = **已落地实测** + 余量,余量须小于一个平均组件的成本。
|
|
458
460
|
*
|
|
459
|
-
* 2026-08-
|
|
460
|
-
* 平均组件成本 prompt
|
|
461
|
-
* 当前余量 prompt
|
|
461
|
+
* 2026-08-26 实测终态(0.15.0 分册 13 落地后):prompt 13 372 / schema 22 184,31 个组件。
|
|
462
|
+
* 平均组件成本 prompt 431 / schema 715。
|
|
463
|
+
* 当前余量 prompt 278 / schema 316,均小于一个平均组件——再加一个组件必红。
|
|
462
464
|
*
|
|
463
|
-
* ⚠️
|
|
464
|
-
*
|
|
465
|
+
* ⚠️ **这两个数字被上调过三次**,三次都由需求方裁决并改写了需求文档,
|
|
466
|
+
* 不是实现阶段自行放宽:
|
|
465
467
|
*
|
|
466
|
-
* 1. 11 200 → 12 200 / 20 500 → 21 200
|
|
468
|
+
* 1. 11 200 → 12 200 / 20 500 → 21 200(0.11.0 分册 29 §2 第 7 条):分册 13 组件描述由短改长。
|
|
467
469
|
* `example` 是既有护栏的硬要求(`catalog.test.ts` 与 `catalogMatrix.test.tsx`
|
|
468
470
|
* 逐个组件校验并四档渲染),靠省掉示例腾出的空间收不回来。
|
|
469
|
-
* 2. 12 200 → 13 000 / 21 200 → 21 800
|
|
471
|
+
* 2. 12 200 → 13 000 / 21 200 → 21 800(0.11.0 分册 29 §2.2):分册 12 的 `Split` 实测 490 + 694,
|
|
470
472
|
* 超出计划增量(403 + 1 047)的 prompt 侧。需求方裁定
|
|
471
473
|
* 「描述要长,可用性大于预算阈值」——收紧措辞可省回 158 字节,
|
|
472
474
|
* 但砍的正是各组件「何时改用 X」的辨析句,即选型准确率本身。
|
|
475
|
+
* 3. 13 000 → 13 650 / 21 800 → 22 500(0.15.0 分册 13 §3,2026-08-26 裁决):
|
|
476
|
+
* 新增内置组件 `OpenDocument`,实测 prompt +372 / schema +384。
|
|
477
|
+
* 该组件是本册消灭「站点技能在扩展里必然落到红框」的唯一手段,
|
|
478
|
+
* 砍它等于砍掉整册需求;改用「catalog 里有些组件不广告」则引入一个新概念,
|
|
479
|
+
* 模型看不见的组件与不存在的组件在它眼里没区别。需求方裁定取组件可用性、上调阈值,
|
|
480
|
+
* 幅度以落地后实测为准、不得预留宽裕。
|
|
473
481
|
*
|
|
474
|
-
*
|
|
475
|
-
* **AC-G20
|
|
476
|
-
*
|
|
482
|
+
* 三次上调合计把单请求成本从 21.7 KB 抬到约 35.3 KB。
|
|
483
|
+
* **AC-G20 原文「超了砍组件、不抬阈值」在这三处被推翻,每次都限于当版;
|
|
484
|
+
* 后续再撞顶仍须回到需求方,本版同样不得成为第四次上调的先例。**
|
|
477
485
|
*/
|
|
478
|
-
declare const CATALOG_PROMPT_MAX =
|
|
479
|
-
declare const CATALOG_SCHEMA_MAX =
|
|
486
|
+
declare const CATALOG_PROMPT_MAX = 13650;
|
|
487
|
+
declare const CATALOG_SCHEMA_MAX = 22500;
|
|
480
488
|
/**
|
|
481
|
-
*
|
|
482
|
-
* `CATALOG_BUDGET_STAGE`
|
|
489
|
+
* **尚未落地**的计划增量。0.15.0 分册 13 已落地,故仍归零;
|
|
490
|
+
* `CATALOG_BUDGET_STAGE` 保持 `'final'`,余量改由「小于一个平均组件」判定。
|
|
483
491
|
*/
|
|
484
492
|
declare const PLANNED_INCREMENT: {
|
|
485
493
|
readonly prompt: 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { At as ValidationReport, B as DiscoveryResult, K as JsonSchema, Nt as WebSkillErrorCode, O as UiSurfaceActionRequest, Ot as UiSpecNode, S as UiBridge, T as UiSpecEvent, U as FileSystemProvider, X as PageQuery, Y as Page, Z as RemoteUrlPolicy, _ as LlmToolSpec, _t as SkillManifest, b as RenderResultRequest, d as LlmContentPart, dt as SkillDiscovery, f as LlmMessage, ft as SkillDocument, g as LlmToolCall, h as LlmTokenUsage, i as FormField, l as LlmClient, lt as SkillCatalog, m as LlmStreamEvent, n as ArtifactStore, o as InteractionPolicy, p as LlmResponse, pt as SkillInstallSource, r as ChartSpec, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, ut as SkillCatalogEntry, v as MemoryStore, w as UiSpecDrafts, y as RenderBlock } from "./types-C3V6lAeO-BIf7UB2e.js";
|
|
2
2
|
//#region ../runtime/dist/index.d.ts
|
|
3
3
|
//#region src/llm/parts.d.ts
|
|
4
4
|
/** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
|
|
@@ -61,6 +61,30 @@ declare const DEFAULT_MAX_DOCUMENT_TEXT_BYTES = 512000;
|
|
|
61
61
|
* 结构化数据不是文档,量级差一个数量级;超出**只拒不截**——截断的 JSON 解不出来。
|
|
62
62
|
*/
|
|
63
63
|
declare const DEFAULT_MAX_DATA_SOURCE_BYTES = 1024000;
|
|
64
|
+
/**
|
|
65
|
+
* 单个上传文件交给脚本的字节上限(0.15.0 分册 17,FR-17.5):20 MB。
|
|
66
|
+
* 取得比模型图片预算宽:字节不进模型上下文,只进脚本,护的是内存不是 token。
|
|
67
|
+
*/
|
|
68
|
+
declare const DEFAULT_MAX_UPLOAD_FILE_BYTES: number;
|
|
69
|
+
/**
|
|
70
|
+
* 宿主声明的一个数据源的**可公开部分**(0.14.0 分册 19)。
|
|
71
|
+
*
|
|
72
|
+
* `target` 不在这里,且不得被加进来:这条通路的终点是模型上下文,
|
|
73
|
+
* 而「地址不由脚本提供」正是 0.11.0 分册 16 §2.2 授权面的全部依据。
|
|
74
|
+
* @experimental
|
|
75
|
+
*/
|
|
76
|
+
interface DataSourceInfo {
|
|
77
|
+
id: string;
|
|
78
|
+
description: string;
|
|
79
|
+
/**
|
|
80
|
+
* 非宿主声明时的出处(0.14.0 分册 21)。缺省即宿主声明,不带标注。
|
|
81
|
+
*
|
|
82
|
+
* 有值意味着 `description` **来自页面**,模型看到的清单里必须随之出现「可能不准确」的标注,
|
|
83
|
+
* 否则一段由站点控制的文本会以宿主口吻进上下文。
|
|
84
|
+
* @experimental
|
|
85
|
+
*/
|
|
86
|
+
provenance?: 'page-declared' | 'tool-projection';
|
|
87
|
+
}
|
|
64
88
|
/**
|
|
65
89
|
* 工具结果的内容分片(0.6.0 §1.1)。
|
|
66
90
|
* `image` 分片不参与 `toolResultMaxBytes` 截断——那份预算是给文本的,
|
|
@@ -107,6 +131,29 @@ interface ToolResult {
|
|
|
107
131
|
};
|
|
108
132
|
artifacts?: Artifact[];
|
|
109
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* 本次 run 的触发消息带上来的一个用户文件(0.15.0 分册 17)。
|
|
136
|
+
*
|
|
137
|
+
* **不含路径**:那是宿主的存储细节,交给脚本等于把宿主目录结构递出去。
|
|
138
|
+
* @experimental
|
|
139
|
+
*/
|
|
140
|
+
interface UploadFileInfo {
|
|
141
|
+
id: string;
|
|
142
|
+
name: string;
|
|
143
|
+
contentType: string;
|
|
144
|
+
size: number;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* 本次 run 可读的用户上传文件(分册 17 FR-17.4)。
|
|
148
|
+
*
|
|
149
|
+
* 按 **run 选项**传入而不是放在运行时 deps:只有发起这一轮的那次调用才带它,
|
|
150
|
+
* 委派出去的子 run 自然拿不到——「只读这一轮」因此是结构上成立的,不靠调用方自律。
|
|
151
|
+
* @experimental
|
|
152
|
+
*/
|
|
153
|
+
interface RunUploadFiles {
|
|
154
|
+
list(): Promise<readonly UploadFileInfo[]>;
|
|
155
|
+
read(id: string): Promise<Uint8Array>;
|
|
156
|
+
}
|
|
110
157
|
interface ScriptExecutionContext {
|
|
111
158
|
skillName: string;
|
|
112
159
|
runId: string;
|
|
@@ -130,8 +177,25 @@ interface ScriptExecutionContext {
|
|
|
130
177
|
* 宿主未装配即不存在(同 readAsset / confirm)。 @experimental
|
|
131
178
|
*/
|
|
132
179
|
fetchData?(sourceId: string, params?: Record<string, unknown>): Promise<unknown>;
|
|
180
|
+
/**
|
|
181
|
+
* 宿主具备文档投放面(0.15.0 分册 13 FR-13.4)。注意它是**能力位而非函数**:
|
|
182
|
+
* 投放必须由用户点击 `OpenDocument` 按钮触发,脚本能做的只是**提前分支**——
|
|
183
|
+
* 不具备时改产一份能内联的精简版,而不是白白写一个永远没有入口的报表。
|
|
184
|
+
* 宿主未装配即整个键不存在(同 fetchData)。 @experimental
|
|
185
|
+
*/
|
|
186
|
+
documentSurface?: true;
|
|
133
187
|
/** 脚本主动请求人在环确认;策略见 InteractionPolicy.confirmations */
|
|
134
188
|
confirm?(message: string): Promise<boolean>;
|
|
189
|
+
/**
|
|
190
|
+
* 列出本次 run 触发消息带上来的用户文件(分册 17 FR-17.1)。
|
|
191
|
+
* 本轮没传东西就是空数组;能力关闭时整个键不存在,两者必须分得开。 @experimental
|
|
192
|
+
*/
|
|
193
|
+
listUploadFiles?(): Promise<UploadFileInfo[]>;
|
|
194
|
+
/**
|
|
195
|
+
* 读回原始字节,**不做任何抽取或转码**:图片、Word / Excel 一律给文件本身(FR-17.5)。
|
|
196
|
+
* 每次调用都要用户点头;拒绝抛 `TOOL_DENIED`。 @experimental
|
|
197
|
+
*/
|
|
198
|
+
readUploadFile?(id: string): Promise<Uint8Array>;
|
|
135
199
|
/** 宿主侧降级 warning 出口(网络阻断等;引擎接线到 run.warning trace) */
|
|
136
200
|
onWarning?(message: string): void;
|
|
137
201
|
}
|
|
@@ -432,6 +496,19 @@ declare function createScriptContext(deps: {
|
|
|
432
496
|
* 不给「存在但永远失败」的假出口。
|
|
433
497
|
*/
|
|
434
498
|
fetchData?: (sourceId: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
499
|
+
/**
|
|
500
|
+
* 宿主具备文档投放面(分册 13 FR-13.4)。传 `false` 与不传同义:键整个不出现,
|
|
501
|
+
* 脚本 `typeof context.documentSurface` 即可探测。
|
|
502
|
+
*/
|
|
503
|
+
documentSurface?: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* 本次 run 可读的用户上传文件(分册 17)。传进来的 `read` **已经过授权与预算**:
|
|
506
|
+
* 把守在引擎侧只做一遍,四个执行器才不会各自实现一套而出现不一致。
|
|
507
|
+
*/
|
|
508
|
+
uploadFiles?: {
|
|
509
|
+
list(): Promise<readonly UploadFileInfo[]>;
|
|
510
|
+
read(id: string): Promise<Uint8Array>;
|
|
511
|
+
};
|
|
435
512
|
/** 宿主侧降级 warning 出口(网络阻断等;引擎接线到 run.warning trace) */
|
|
436
513
|
onWarning?: (message: string) => void;
|
|
437
514
|
/** writeArtifact 创建产物后的回调(引擎记录新产物 ID,执行后单次 listArtifacts 过滤) */
|
|
@@ -709,7 +786,11 @@ interface RunResult {
|
|
|
709
786
|
}
|
|
710
787
|
/** createSession 返回的会话句柄:跨 run 延续消息历史 */
|
|
711
788
|
interface RuntimeSessionHandle extends RuntimeSession {
|
|
712
|
-
run(prompt: string | readonly LlmContentPart[]
|
|
789
|
+
run(prompt: string | readonly LlmContentPart[],
|
|
790
|
+
/** 本轮触发消息带上来的用户文件(0.15.0 分册 17);只对这一次 run 生效 */
|
|
791
|
+
options?: {
|
|
792
|
+
uploadFiles?: RunUploadFiles;
|
|
793
|
+
}): Promise<RunResult>;
|
|
713
794
|
}
|
|
714
795
|
//#endregion
|
|
715
796
|
//#region src/interaction/renderResult.d.ts
|
|
@@ -741,6 +822,47 @@ declare function extractUiSpecEvents(data: unknown): UiSpecEvent[];
|
|
|
741
822
|
*/
|
|
742
823
|
declare function schemaToForm(schema: JsonSchema, providedArgs?: Record<string, unknown>): FormField[];
|
|
743
824
|
//#endregion
|
|
825
|
+
//#region src/interaction/documentSurface.d.ts
|
|
826
|
+
/**
|
|
827
|
+
* 文档投放面的两个端口(0.15.0 分册 13)。
|
|
828
|
+
*
|
|
829
|
+
* 落在 `@webskill/runtime` 而不是 `browser` 或 `ui-react`:按钮在 `ui-react`、
|
|
830
|
+
* 实现在 `browser`,两者的公共下游只有 `core` 与 `runtime`,
|
|
831
|
+
* 而 `runtime/interaction` 已经是 surface 协议的归属地。
|
|
832
|
+
*/
|
|
833
|
+
/**
|
|
834
|
+
* 宿主侧的文档投放实现;`@webskill/browser` 的 `createDocumentSurfaceHost` 满足它。
|
|
835
|
+
*
|
|
836
|
+
* 收的是**已经读出来的文档**——产物在哪、技能叫什么由 SDK 解析,
|
|
837
|
+
* 合并进 `DocumentSurfacePort` 就等于把「产物目录在哪」变成宿主必须知道的事。
|
|
838
|
+
* @experimental
|
|
839
|
+
*/
|
|
840
|
+
interface DocumentSurfaceHost {
|
|
841
|
+
open(input: {
|
|
842
|
+
skillName: string;
|
|
843
|
+
dataSource: string;
|
|
844
|
+
document: {
|
|
845
|
+
html: string;
|
|
846
|
+
css?: string;
|
|
847
|
+
};
|
|
848
|
+
}): Promise<void>;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* 渲染侧端口;由 chatbot 装配,`undefined` 表示本宿主没有文档面(按钮整个不渲染)。
|
|
852
|
+
*
|
|
853
|
+
* 收的是**产物文件名**,不是路径:路径由引擎按 run 拼出并做包含校验,
|
|
854
|
+
* 让声明树给完整路径等于凭空开一个读取面。
|
|
855
|
+
* @experimental
|
|
856
|
+
*/
|
|
857
|
+
interface DocumentSurfacePort {
|
|
858
|
+
open(request: {
|
|
859
|
+
runId: string;
|
|
860
|
+
artifact: string;
|
|
861
|
+
style?: string;
|
|
862
|
+
dataSource: string;
|
|
863
|
+
}): Promise<void>;
|
|
864
|
+
}
|
|
865
|
+
//#endregion
|
|
744
866
|
//#region src/facade/types.d.ts
|
|
745
867
|
/**
|
|
746
868
|
* 安装结果清单(对齐 README IDL 命名;SkillManifest 的精简投影)
|
|
@@ -1146,6 +1268,17 @@ type BridgeRequest = {
|
|
|
1146
1268
|
id: string;
|
|
1147
1269
|
sourceId: string;
|
|
1148
1270
|
params?: Record<string, unknown>;
|
|
1271
|
+
} |
|
|
1272
|
+
/** 列出本轮上传的文件(0.15.0 分册 17);回值是 `UploadFileInfo[]`,不含路径 */
|
|
1273
|
+
{
|
|
1274
|
+
kind: 'listUploadFiles';
|
|
1275
|
+
id: string;
|
|
1276
|
+
} |
|
|
1277
|
+
/** 读上传文件原始字节;回值走 `number[]`,与 readAssetBinary 同口径 */
|
|
1278
|
+
{
|
|
1279
|
+
kind: 'readUploadFile';
|
|
1280
|
+
id: string;
|
|
1281
|
+
fileId: string;
|
|
1149
1282
|
};
|
|
1150
1283
|
interface BridgeResponse {
|
|
1151
1284
|
id: string;
|
|
@@ -1179,6 +1312,11 @@ interface BridgeCapabilities {
|
|
|
1179
1312
|
/** 入站校验:非法 kind / 缺 id / 缺字段 → undefined(调用方忽略并记 warning) */
|
|
1180
1313
|
declare function parseBridgeRequest(data: unknown): BridgeRequest | undefined;
|
|
1181
1314
|
declare function bridgeError(id: string, code: string, message: string): BridgeResponse;
|
|
1315
|
+
/**
|
|
1316
|
+
* 上传文件能力缺席时四个执行器共用的说辞(分册 17 FR-17.6):
|
|
1317
|
+
* 讲清「宿主没接 / 开关没开」,与「用户拒了这一次」(TOOL_DENIED)分得开。
|
|
1318
|
+
*/
|
|
1319
|
+
declare const UPLOAD_FILES_UNAVAILABLE: string;
|
|
1182
1320
|
//#endregion
|
|
1183
1321
|
//#region src/sandbox/networkPolicy.d.ts
|
|
1184
1322
|
/**
|
|
@@ -1341,6 +1479,8 @@ declare const UNSUPPORTED_DOCUMENT_MESSAGE: string;
|
|
|
1341
1479
|
* 入口拦会误伤 docx,它抽成文本后根本不需要文档能力。
|
|
1342
1480
|
*/
|
|
1343
1481
|
declare const READ_LINKED_DOCUMENT_TOOL: ToolDefinition;
|
|
1482
|
+
/** 二进制转 base64;`btoa` 只吃 latin1,必须逐字节喂而不是先 decode 成字符串 */
|
|
1483
|
+
declare function toBase64(bytes: Uint8Array): string;
|
|
1344
1484
|
//#endregion
|
|
1345
1485
|
//#region src/engine/toolStep.d.ts
|
|
1346
1486
|
/**
|
|
@@ -1412,6 +1552,17 @@ declare class FsToolStepStore implements ToolStepStore {
|
|
|
1412
1552
|
* **不影响可执行性**——要限制访问的宿主应当使用禁用(各来源自己的 enabled 通道)。
|
|
1413
1553
|
*/
|
|
1414
1554
|
type ToolDisclosure = 'always' | 'on-demand';
|
|
1555
|
+
/**
|
|
1556
|
+
* 一次工具调用的调用侧上下文(0.14.0 分册 22 FR-22.5)。
|
|
1557
|
+
*
|
|
1558
|
+
* 工具源不实现这个参数即行为不变:TypeScript 里参数更少的函数可以
|
|
1559
|
+
* 赋给参数更多的函数类型。它存在的唯一理由是「游标跨 run 一律失效」——
|
|
1560
|
+
* 宝宝在游标里编时间戳只能做到「基本失效」,做不到「一律失效」。
|
|
1561
|
+
* @experimental
|
|
1562
|
+
*/
|
|
1563
|
+
interface ToolCallContext {
|
|
1564
|
+
readonly runId: string;
|
|
1565
|
+
}
|
|
1415
1566
|
/**
|
|
1416
1567
|
* 外部工具来源(runtime 扩展点,mcp 包实现并插入)。
|
|
1417
1568
|
* LLM 可见名为已消毒名(如 endpoint__greet / mcp__search)。
|
|
@@ -1435,7 +1586,7 @@ interface ExternalToolSource {
|
|
|
1435
1586
|
*/
|
|
1436
1587
|
systemPrompt?(): Promise<string | undefined>;
|
|
1437
1588
|
canHandle(llmToolName: string): boolean;
|
|
1438
|
-
call(llmToolName: string, args: Record<string, unknown
|
|
1589
|
+
call(llmToolName: string, args: Record<string, unknown>, context?: ToolCallContext): Promise<ToolResult>;
|
|
1439
1590
|
/**
|
|
1440
1591
|
* 参数留存的信任判定(分册 30 / FR-30.3)。**不实现 ⇒ 该源全部工具按 untrusted 处理**(参数全脱敏)。
|
|
1441
1592
|
*
|
|
@@ -1581,6 +1732,13 @@ interface AgentLoopDeps {
|
|
|
1581
1732
|
* 所以这里只收一个函数,不收策略对象——否则依赖方向反了。
|
|
1582
1733
|
*/
|
|
1583
1734
|
fetchData?: (sourceId: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
1735
|
+
/**
|
|
1736
|
+
* 宿主声明的数据源清单(0.14.0 分册 19):技能声明了本宿主没有的源时,激活期据此说明缺什么。
|
|
1737
|
+
* 只含可公开字段——`target` 进不来,见 `DataSourceInfo`。
|
|
1738
|
+
*
|
|
1739
|
+
* 可传函数:宿主的源清单随用户配置变动时,惰性形式免去为一次配置改动重建引擎。
|
|
1740
|
+
*/
|
|
1741
|
+
dataSources?: readonly DataSourceInfo[] | (() => readonly DataSourceInfo[]);
|
|
1584
1742
|
/**
|
|
1585
1743
|
* 页面链接文档的读取实现(分册 22)。不注入即 `read_linked_document` 不注册——
|
|
1586
1744
|
* 模型连这个工具的存在都看不到,而不是看得到再被拒。
|
|
@@ -1602,6 +1760,26 @@ interface AgentLoopDeps {
|
|
|
1602
1760
|
data?: Record<string, unknown>;
|
|
1603
1761
|
}): Promise<unknown>;
|
|
1604
1762
|
};
|
|
1763
|
+
/**
|
|
1764
|
+
* 宿主具备文档投放面(0.15.0 分册 13 FR-13.4)。**只传这一位**,不传端口:
|
|
1765
|
+
* 投放本身靠用户手势触发,脚本拿到端口也只会得到一个必然被拦的弹窗。
|
|
1766
|
+
*/
|
|
1767
|
+
documentSurface?: true;
|
|
1768
|
+
/**
|
|
1769
|
+
* 本次 run 触发消息带上来的用户上传文件(0.15.0 分册 17)。
|
|
1770
|
+
* 由 `runtime.run(prompt, { uploadFiles })` 逐 run 传入,因此子 run 天然拿不到。
|
|
1771
|
+
*/
|
|
1772
|
+
uploadFiles?: RunUploadFiles;
|
|
1773
|
+
/** 上传文件读取留痕出口(FR-17.7);批准与拒绝都写 */
|
|
1774
|
+
uploadFileAudit?: {
|
|
1775
|
+
append(event: {
|
|
1776
|
+
type: string;
|
|
1777
|
+
target: string;
|
|
1778
|
+
data?: Record<string, unknown>;
|
|
1779
|
+
}): Promise<unknown>;
|
|
1780
|
+
};
|
|
1781
|
+
/** 单个上传文件的字节预算(FR-17.5);超出直接拒,不截断 */
|
|
1782
|
+
maxUploadFileBytes?: number;
|
|
1605
1783
|
fs: FileSystemProvider;
|
|
1606
1784
|
/** name → skillRoot(来自发现结果) */
|
|
1607
1785
|
skillIndex: Map<string, string>;
|
|
@@ -1767,6 +1945,11 @@ interface WebSkillRuntimeDeps {
|
|
|
1767
1945
|
* 通常由 `@webskill/agent` 的 `DataSourcePolicy.fetchData` 绑定过来。
|
|
1768
1946
|
*/
|
|
1769
1947
|
fetchData?: (sourceId: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
1948
|
+
/**
|
|
1949
|
+
* 宿主声明的数据源清单(0.14.0 分册 19);用 `DataSourcePolicy.publicSources` 取,不要自己传 `sources`。
|
|
1950
|
+
* 不注入即「宿主没说」,引擎不会断言某个源不存在。
|
|
1951
|
+
*/
|
|
1952
|
+
dataSources?: readonly DataSourceInfo[] | (() => readonly DataSourceInfo[]);
|
|
1770
1953
|
/**
|
|
1771
1954
|
* 读页面链接指向的文档(分册 22);不注入即 `read_linked_document` 不注册。
|
|
1772
1955
|
* 实现住在 `@webskill/browser`(docx 抽取要 `DOMParser`),由宿主装配。
|
|
@@ -1786,6 +1969,18 @@ interface WebSkillRuntimeDeps {
|
|
|
1786
1969
|
data?: Record<string, unknown>;
|
|
1787
1970
|
}): Promise<unknown>;
|
|
1788
1971
|
};
|
|
1972
|
+
/** 宿主具备文档投放面(0.15.0 分册 13 FR-13.4);只是能力位,端口本体不进脚本上下文 */
|
|
1973
|
+
documentSurface?: true;
|
|
1974
|
+
/** 上传文件读取留痕出口(0.15.0 分册 17 FR-17.7);批准与拒绝都写 */
|
|
1975
|
+
uploadFileAudit?: {
|
|
1976
|
+
append(event: {
|
|
1977
|
+
type: string;
|
|
1978
|
+
target: string;
|
|
1979
|
+
data?: Record<string, unknown>;
|
|
1980
|
+
}): Promise<unknown>;
|
|
1981
|
+
};
|
|
1982
|
+
/** 单个上传文件的字节预算(FR-17.5);超出直接拒,不截断 */
|
|
1983
|
+
maxUploadFileBytes?: number;
|
|
1789
1984
|
}
|
|
1790
1985
|
/**
|
|
1791
1986
|
* runtime 门面:组合 discovery / router / agent loop / lifecycle
|
|
@@ -1819,6 +2014,11 @@ declare class WebSkillRuntime {
|
|
|
1819
2014
|
sessionId?: string;
|
|
1820
2015
|
history?: LlmMessage[];
|
|
1821
2016
|
skillName?: string;
|
|
2017
|
+
/**
|
|
2018
|
+
* 本次触发消息带上来的用户文件(0.15.0 分册 17)。
|
|
2019
|
+
* 逐 run 传:委派出去的子 run 另起一次 `run()`,不会捷径拿到。
|
|
2020
|
+
*/
|
|
2021
|
+
uploadFiles?: RunUploadFiles;
|
|
1822
2022
|
}): Promise<RunResult>;
|
|
1823
2023
|
/** D3:列出 interrupted run(供 UI 展示"未完成任务");版本不受支持的项带 unsupported 标记 */
|
|
1824
2024
|
listInterruptedRuns(): Promise<RunSnapshotListEntry[]>;
|
|
@@ -2148,4 +2348,4 @@ interface RedactedArgs {
|
|
|
2148
2348
|
*/
|
|
2149
2349
|
declare function redactToolStepArgs(args: Record<string, unknown>, schema: JsonSchema | undefined, trust: ToolStepTrust): RedactedArgs;
|
|
2150
2350
|
//#endregion
|
|
2151
|
-
export {
|
|
2351
|
+
export { IntegrityVerdict as $, diffUserProfile as $n, SessionMeta as $t, DEFAULT_USER_PROFILE_LIMITS as A, USER_PROFILE_EXPORT_VERSION as An, schemaSourceLabel as Ar, RunToolCall as At, FS_SESSION_PAGE_SIZE as B, UserProfileImportDiff as Bn, toVercelToolSpecs as Br, RuntimeSession as Bt, CapabilityApproval as C, ToolStepTrust as Cn, readProfileEntries as Cr, RouteResult as Ct, DEFAULT_MAX_DOCUMENT_BYTES as D, TraceRecorder as Dn, renderUserProfileContext as Dr, RunSnapshotListEntry as Dt, DEFAULT_MAX_DATA_SOURCE_BYTES as E, TraceEventType as En, refineUserProfile as Er, RunSnapshot as Et, EMPTY_USER_PROFILE as F, UnsupportedRunSnapshot as Fn, summarizeToolCalls as Fr, RunTraceSummary as Ft, FsSessionStore as G, WebSkillRuntimeDeps as Gn, SchemaInferer as Gt, FsMemoryStore as H, VercelToolSpec as Hn, validateUiSpecNode as Hr, SENSITIVE_ANNOTATION as Ht, EventBus as I, UploadFileInfo as In, textParts as Ir, RunUploadFiles as It, GoogleGenAiClient as J, applyUserProfileImport as Jn, SealOptions as Jt, FsToolStepStore as K, XlsxTextExtractor as Kn, ScriptExecutionContext as Kt, ExecuteLifecycleData as L, UserProfile as Ln, toBase64 as Lr, RunUsageSummary as Lt, DocumentSurfaceHost as M, USER_PROFILE_NO_INVENTION_RULE as Mn, scriptToolName as Mr, RunTraceFilter as Mt, DocumentSurfacePort as N, USER_PROFILE_PROMPT_HEADER as Nn, sealToolCallPairs as Nr, RunTraceMetrics as Nt, DEFAULT_MAX_DOCUMENT_TEXT_BYTES as O, UNSUPPORTED_DOCUMENT_MESSAGE as On, resolveToolName as Or, RunSnapshotStore as Ot, DocxTextExtractor as P, USER_PROFILE_REFINE_PROMPT as Pn, summarizeRunUsage as Pr, RunTraceStore as Pt, InstalledSkillManifest as Q, createWebSkillApi as Qn, SessionListPage as Qt, ExternalSkillProvider as R, UserProfileEntry as Rn, toLlmToolSpec as Rr, RuntimePhase as Rt, BridgeResponse as S, ToolStepStore as Sn, readBehaviorRecords as Sr, RouteLifecycleData as St, DEFAULT_LOOP_LIMITS as T, TraceEvent as Tn, redactToolStepArgs as Tr, RunResult as Tt, FsRunSnapshotStore as U, WebSkillApi as Un, SESSION_SCHEMA_VERSION as Ut, FsArtifactStore as V, UserProfileLimits as Vn, validateUiSpecEvent as Vr, RuntimeSessionHandle as Vt, FsRunTraceStore as W, WebSkillRuntime as Wn, SUPPORTED_DOCUMENT_MIME as Wt, HookRunner as X, buildRenderResult as Xn, SealResult as Xt, GoogleGenAiClientConfig as Y, bridgeError as Yn, SealRecord as Yt, HookRunnerOptions as Z, createScriptContext as Zn, SerializingMemoryStore as Zt, BehaviorRecordKind as _, ToolDisclosure as _n, normalizeToolContent as _r, READ_SKILL_FILE_TOOL_NAME as _t, ASK_USER_TOOL as a, SkillRouter as an, formatSkillScriptManifest as ar, LifecycleListener as at, BridgeCapability as b, ToolStepReader as bn, parseUserProfileExport as br, RedactedArgs as bt, AgentLoop as c, SkillStateGuard as cn, interruptedToolResult as cr, NetworkPolicy as ct, AnthropicClient as d, TerminalLifecycleData as dn, listSkillScripts as dr, PdfTextExtractor as dt, SessionRecord as en, exportUserProfile as er, InteractLifecycleData as et, AnthropicClientConfig as f, TextualToolContent as fn, mergeCatalogEntries as fr, ProgressiveRouter as ft, BehaviorRecord as g, ToolDefinition as gn, normalizeErrorCode as gr, READ_SKILL_FILE_TOOL as gt, BEHAVIOR_RECORDS_KEY as h, ToolContent as hn, networkUrlHost as hr, READ_SKILL_FILE_INPUT_SCHEMA as ht, ASK_USER_MAX_FIELDS as i, SkillOutcomeReporter as in, findUnpairedToolCalls as ir, LifecycleHookContext as it, DataSourceInfo as j, USER_PROFILE_KEY as jn, schemaToForm as jr, RunTraceFile as jt, DEFAULT_MAX_UPLOAD_FILE_BYTES as k, UPLOAD_FILES_UNAVAILABLE as kn, sampleBehaviorRecords as kr, RunTerminationReason as kt, AgentLoopConfig as l, SkillSuccessReport as ln, isNetworkAllowed as lr, OpenAiCompatibleClient as lt, ApprovalScope as m, ToolCallContext as mn, networkPolicyLibSource as mr, READ_LINKED_DOCUMENT_TOOL_NAME as mt, ASK_USER_FIELD_TYPES as n, SkillFailureReport as nn, extractTodoTraceEvents as nr, LifecycleEventInit as nt, ASK_USER_TOOL_NAME as o, SkillScriptDescriptor as on, fromVercelResult as or, LinkedDocumentReader as ot, ApprovalDecision as p, TodoTraceEvent as pn, mergeProfileEntries as pr, READ_LINKED_DOCUMENT_TOOL as pt, FullDisclosureRouter as q, appendBehaviorRecords as qn, ScriptExecutor as qt, ASK_USER_INPUT_SCHEMA as r, SkillIntegrityGuard as rn, extractUiSpecEvents as rr, LifecycleHook as rt, ActivateLifecycleData as s, SkillScriptSchemaSource as sn, fromVercelStreamPart as sr, MAX_TOOL_STEP_ARG_BYTES as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, SessionStore as tn, extractChartSpec as tr, LifecycleEvent as tt, AgentLoopDeps as u, TEXT_BUDGETED_CONTENT_TYPES as un, isUnsupportedRunSnapshot as ur, OpenAiCompatibleClientConfig as ut, BehaviorScene as v, ToolResolution as vn, normalizeToolError as vr, RUN_SNAPSHOT_SCHEMA_VERSION as vt, CapabilityMode as w, TraceClock as wn, readUserProfile as wr, RunLimitErrorDetails as wt, BridgeRequest as x, ToolStepRecord as xn, partsToText as xr, RefineUserProfileInput as xt, BridgeCapabilities as y, ToolResult as yn, parseBridgeRequest as yr, RUN_TRACE_SCHEMA_VERSION as yt, ExternalToolSource as z, UserProfileExport as zn, toRecordDigests as zr, RuntimeRun as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as
|
|
1
|
+
import { $ as SKILLS_LOCKFILE, $t as messageOf, A as extractSkillCandidate, At as ValidationReport, B as DiscoveryResult, Bt as checkDependencyCycles, C as UiSpecActionCapability, Ct as SkillsLockfile, D as UiSpecSnapshot, Dt as UNTRUSTED_LINE_LIMIT, E as UiSpecPatch, Et as TrustedKeyStore, F as CatalogRenderer, Ft as assertRemoteUrlAllowed, G as IMAGE_MIME_TYPES, Gt as detectSkillArchiveShapeFromFs, H as FileStat, Ht as classifyAttachment, I as ChatAttachmentKind, It as assertSafePathSegment, J as MemoryFS, Jt as formatAttachmentText, K as JsonSchema, Kt as escapeXml, L as CryptoKeyLike, Lt as atomicWriteText, M as ATTACHMENT_TEXT_LIMIT, Mt as WebSkillError, N as ArchiveLimits, Nt as WebSkillErrorCode, O as UiSurfaceActionRequest, Ot as UiSpecNode, P as AttachmentTextInput, Pt as XLSX_MIME, Q as SIGNATURE_SCHEMA_VERSION, Qt as keyIdOf, R as DEFAULT_ARCHIVE_LIMITS, Rt as buildCatalog, S as UiBridge, St as SkillSource, T as UiSpecEvent, Tt as TrustedKey, U as FileSystemProvider, Ut as computeDigest, V as FILE_MIME_TYPES, Vt as checkSkillRules, W as FsTrustedKeyStore, Wt as detectSkillArchiveShape, X as PageQuery, Xt as isValidSkillName, Y as Page, Yt as isAtomicTempPath, Z as RemoteUrlPolicy, Zt as jsonRenderer, _ as LlmToolSpec, _n as xmlRenderer, _t as SkillManifest, a as InteractionOrigin, an as renderAvailableSkillsXml, at as SignatureAuditSink, b as RenderResultRequest, bt as SkillReader, c as InteractionResponse, cn as resolveInsideRoot, ct as SkillArchiveShape, d as LlmContentPart, dn as signaturePayloadBytes, dt as SkillDiscovery, en as normalizePath, et as SKILL_MANIFEST_FILE, f as LlmMessage, fn as stripArchiveRoot, ft as SkillDocument, g as LlmToolCall, gn as verifySkillSignature, gt as SkillManagerPort, h as LlmTokenUsage, hn as verifyManifest, ht as SkillLocation, i as FormField, in as readSkillSignature, it as SKILL_SIGNATURE_FILE, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as VerifyResult, k as UiSurfaceActionResponse, kt as UnsignedPolicy, l as LlmClient, ln as sanitizeUntrustedLine, lt as SkillCatalog, m as LlmStreamEvent, mn as validateSkills, mt as SkillIssue, n as ArtifactStore, nn as parseSkillPackManifest, nt as SKILL_NAME_PATTERN, o as InteractionPolicy, on as renderCatalogJson, ot as SignatureVerdict, p as LlmResponse, pn as unzipWithLimits, pt as SkillInstallSource, q as MANIFEST_EXCLUDED_FILES, qt as exportSkills, r as ChartSpec, rn as readResponseWithLimit, rt as SKILL_PACK_FILE, s as InteractionRequest, sn as resolveArchiveLimits, st as SkillArchiveDetection, t as Artifact, tn as parseSkillMarkdown, tt as SKILL_NAME_MAX_LENGTH, u as LlmCompleteInput, un as signSkill, 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 buildManifest } from "./types-C3V6lAeO-BIf7UB2e.js";
|
|
2
|
+
import { $ as IntegrityVerdict, $n as diffUserProfile, $t as SessionMeta, A as DEFAULT_USER_PROFILE_LIMITS, An as USER_PROFILE_EXPORT_VERSION, Ar as schemaSourceLabel, At as RunToolCall, B as FS_SESSION_PAGE_SIZE, Bn as UserProfileImportDiff, Br as toVercelToolSpecs, Bt as RuntimeSession, C as CapabilityApproval, Cn as ToolStepTrust, Cr as readProfileEntries, Ct as RouteResult, D as DEFAULT_MAX_DOCUMENT_BYTES, Dn as TraceRecorder, Dr as renderUserProfileContext, Dt as RunSnapshotListEntry, E as DEFAULT_MAX_DATA_SOURCE_BYTES, En as TraceEventType, Er as refineUserProfile, Et as RunSnapshot, F as EMPTY_USER_PROFILE, Fn as UnsupportedRunSnapshot, Fr as summarizeToolCalls, Ft as RunTraceSummary, G as FsSessionStore, Gn as WebSkillRuntimeDeps, Gt as SchemaInferer, H as FsMemoryStore, Hn as VercelToolSpec, Hr as validateUiSpecNode, Ht as SENSITIVE_ANNOTATION, I as EventBus, In as UploadFileInfo, Ir as textParts, It as RunUploadFiles, J as GoogleGenAiClient, Jn as applyUserProfileImport, Jt as SealOptions, K as FsToolStepStore, Kn as XlsxTextExtractor, Kt as ScriptExecutionContext, L as ExecuteLifecycleData, Ln as UserProfile, Lr as toBase64, Lt as RunUsageSummary, M as DocumentSurfaceHost, Mn as USER_PROFILE_NO_INVENTION_RULE, Mr as scriptToolName, Mt as RunTraceFilter, N as DocumentSurfacePort, Nn as USER_PROFILE_PROMPT_HEADER, Nr as sealToolCallPairs, Nt as RunTraceMetrics, O as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, On as UNSUPPORTED_DOCUMENT_MESSAGE, Or as resolveToolName, Ot as RunSnapshotStore, P as DocxTextExtractor, Pn as USER_PROFILE_REFINE_PROMPT, Pr as summarizeRunUsage, Pt as RunTraceStore, Q as InstalledSkillManifest, Qn as createWebSkillApi, Qt as SessionListPage, R as ExternalSkillProvider, Rn as UserProfileEntry, Rr as toLlmToolSpec, Rt as RuntimePhase, S as BridgeResponse, Sn as ToolStepStore, Sr as readBehaviorRecords, St as RouteLifecycleData, T as DEFAULT_LOOP_LIMITS, Tn as TraceEvent, Tr as redactToolStepArgs, Tt as RunResult, U as FsRunSnapshotStore, Un as WebSkillApi, Ut as SESSION_SCHEMA_VERSION, V as FsArtifactStore, Vn as UserProfileLimits, Vr as validateUiSpecEvent, Vt as RuntimeSessionHandle, W as FsRunTraceStore, Wn as WebSkillRuntime, Wt as SUPPORTED_DOCUMENT_MIME, X as HookRunner, Xn as buildRenderResult, Xt as SealResult, Y as GoogleGenAiClientConfig, Yn as bridgeError, Yt as SealRecord, Z as HookRunnerOptions, Zn as createScriptContext, Zt as SerializingMemoryStore, _ as BehaviorRecordKind, _n as ToolDisclosure, _r as normalizeToolContent, _t as READ_SKILL_FILE_TOOL_NAME, a as ASK_USER_TOOL, an as SkillRouter, ar as formatSkillScriptManifest, at as LifecycleListener, b as BridgeCapability, bn as ToolStepReader, br as parseUserProfileExport, bt as RedactedArgs, c as AgentLoop, cn as SkillStateGuard, cr as interruptedToolResult, ct as NetworkPolicy, d as AnthropicClient, dn as TerminalLifecycleData, dr as listSkillScripts, dt as PdfTextExtractor, en as SessionRecord, er as exportUserProfile, et as InteractLifecycleData, f as AnthropicClientConfig, fn as TextualToolContent, fr as mergeCatalogEntries, ft as ProgressiveRouter, g as BehaviorRecord, gn as ToolDefinition, gr as normalizeErrorCode, gt as READ_SKILL_FILE_TOOL, h as BEHAVIOR_RECORDS_KEY, hn as ToolContent, hr as networkUrlHost, ht as READ_SKILL_FILE_INPUT_SCHEMA, i as ASK_USER_MAX_FIELDS, in as SkillOutcomeReporter, ir as findUnpairedToolCalls, it as LifecycleHookContext, j as DataSourceInfo, jn as USER_PROFILE_KEY, jr as schemaToForm, jt as RunTraceFile, k as DEFAULT_MAX_UPLOAD_FILE_BYTES, kn as UPLOAD_FILES_UNAVAILABLE, kr as sampleBehaviorRecords, kt as RunTerminationReason, l as AgentLoopConfig, ln as SkillSuccessReport, lr as isNetworkAllowed, lt as OpenAiCompatibleClient, m as ApprovalScope, mn as ToolCallContext, mr as networkPolicyLibSource, mt as READ_LINKED_DOCUMENT_TOOL_NAME, n as ASK_USER_FIELD_TYPES, nn as SkillFailureReport, nr as extractTodoTraceEvents, nt as LifecycleEventInit, o as ASK_USER_TOOL_NAME, on as SkillScriptDescriptor, or as fromVercelResult, ot as LinkedDocumentReader, p as ApprovalDecision, pn as TodoTraceEvent, pr as mergeProfileEntries, pt as READ_LINKED_DOCUMENT_TOOL, q as FullDisclosureRouter, qn as appendBehaviorRecords, qt as ScriptExecutor, r as ASK_USER_INPUT_SCHEMA, rn as SkillIntegrityGuard, rr as extractUiSpecEvents, rt as LifecycleHook, s as ActivateLifecycleData, sn as SkillScriptSchemaSource, sr as fromVercelStreamPart, st as MAX_TOOL_STEP_ARG_BYTES, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as SessionStore, tr as extractChartSpec, tt as LifecycleEvent, u as AgentLoopDeps, un as TEXT_BUDGETED_CONTENT_TYPES, ur as isUnsupportedRunSnapshot, ut as OpenAiCompatibleClientConfig, v as BehaviorScene, vn as ToolResolution, vr as normalizeToolError, vt as RUN_SNAPSHOT_SCHEMA_VERSION, w as CapabilityMode, wn as TraceClock, wr as readUserProfile, wt as RunLimitErrorDetails, x as BridgeRequest, xn as ToolStepRecord, xr as partsToText, xt as RefineUserProfileInput, y as BridgeCapabilities, yn as ToolResult, yr as parseBridgeRequest, yt as RUN_TRACE_SCHEMA_VERSION, z as ExternalToolSource, zn as UserProfileExport, zr as toRecordDigests, zt as RuntimeRun } from "./index-Oc3H89TJ.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.15.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_MAX_UPLOAD_FILE_BYTES, DEFAULT_USER_PROFILE_LIMITS, DOCX_MIME, type DataSourceInfo, type DiscoveryResult, type DocumentSurfaceHost, type DocumentSurfacePort, 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 RunUploadFiles, 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, UNTRUSTED_LINE_LIMIT, UPLOAD_FILES_UNAVAILABLE, 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 UploadFileInfo, 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, sanitizeUntrustedLine, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|