@webskill/sdk 0.19.0 → 0.21.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.
@@ -1,4 +1,4 @@
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-Btpdd1y--BcxQ10Fa.js";
1
+ import { B as DiscoveryResult, O as UiSurfaceActionRequest, Pt as WebSkillErrorCode, Q as RemoteUrlPolicy, S as UiBridge, T as UiSpecEvent, U as FileSystemProvider, X as Page, Z as PageQuery, _ as LlmToolSpec, b as RenderResultRequest, d as LlmContentPart, dt as SkillCatalogEntry, f as LlmMessage, ft as SkillDiscovery, g as LlmToolCall, h as LlmTokenUsage, i as FormField, jt as ValidationReport, kt as UiSpecNode, l as LlmClient, m as LlmStreamEvent, mt as SkillInstallSource, n as ArtifactStore, o as InteractionPolicy, p as LlmResponse, pt as SkillDocument, q as JsonSchema, r as ChartSpec, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, ut as SkillCatalog, v as MemoryStore, vt as SkillManifest, w as UiSpecDrafts, y as RenderBlock } from "./types-BvTV_05--BW8zDuEk.js";
2
2
  //#region ../runtime/dist/index.d.ts
3
3
  //#region src/llm/parts.d.ts
4
4
  /** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
@@ -6,6 +6,46 @@ declare const textParts: (text: string) => LlmContentPart[];
6
6
  /** 取出 parts 中的文本(非文本分片在纯文本语境下无法表达,此处按丢弃处理——调用方须先校验) */
7
7
  declare const partsToText: (parts: readonly LlmContentPart[] | undefined) => string;
8
8
  //#endregion
9
+ //#region src/spreadsheet/types.d.ts
10
+ /**
11
+ * 表格导出契约(0.21.0 分册 10 FR-10.2)。
12
+ *
13
+ * 这份契约是**三处同源**的唯一事实源:`export_spreadsheet` 的参数 schema、
14
+ * `context.writeSpreadsheet` 的入参、编码器的输入。
15
+ */
16
+ /** 单元格取值。`null` / `undefined` / `''` 三者同义,均产出空单元格(DV-3) */
17
+ type SpreadsheetCell = string | number | boolean | null | undefined;
18
+ interface SpreadsheetSheet {
19
+ /** 工作表名。Excel 限制:1–31 字符,且不含 `: \ / ? * [ ]` */
20
+ name: string;
21
+ /** 表头文本。给了就作为首行并加粗;不给则首行即数据 */
22
+ columns?: string[];
23
+ /** 数据行。每行长度不必与 `columns` 相等,短则补空 */
24
+ rows: SpreadsheetCell[][];
25
+ }
26
+ interface SpreadsheetSpec {
27
+ sheets: SpreadsheetSheet[];
28
+ }
29
+ /** 规模上限(FR-10.7)。越界一律 `VALIDATION_FAILED`,不静默截断 */
30
+ declare const SPREADSHEET_LIMITS: {
31
+ readonly sheets: 16;
32
+ readonly rowsPerSheet: 10000;
33
+ readonly columnsPerSheet: 256;
34
+ /** Excel 对单个单元格文本的硬限制 */
35
+ readonly charsPerCell: 32767;
36
+ readonly bytes: number;
37
+ };
38
+ declare const SPREADSHEET_MIME_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
39
+ declare const SPREADSHEET_EXTENSION = ".xlsx";
40
+ /**
41
+ * 本版**不支持**的 xlsx 能力(FR-10.8,备案 D75)。
42
+ *
43
+ * 导出这张表是为了让上层能如实向用户/模型声明缺什么,而不是笼统写「基础支持」——
44
+ * 与 `XLSX_UNEXTRACTED` 同一条口径。
45
+ */
46
+ declare const XLSX_UNSUPPORTED: readonly ["cell-styles", "fonts-and-colors", "borders", "formulas", "merged-cells", "charts", "images", "comments", "date-and-time-cell-types", "column-widths", "frozen-panes", "auto-filter", "incremental-edit-of-existing-file"];
47
+ type XlsxUnsupportedFeature = (typeof XLSX_UNSUPPORTED)[number];
48
+ //#endregion
9
49
  //#region src/tools/types.d.ts
10
50
  interface ToolDefinition {
11
51
  /** LLM 可见名:脚本工具为 `${skillName}__${scriptName}` */
@@ -171,6 +211,18 @@ interface ScriptExecutionContext {
171
211
  mimeType?: string;
172
212
  metadata?: Record<string, unknown>;
173
213
  }): Promise<Artifact>;
214
+ /**
215
+ * 把表格规格编码为 xlsx 并写成 run 产物(0.21.0 分册 10 FR-10.4)。
216
+ *
217
+ * 编码跑在**宿主侧**:沙箱产物里没有编码器,桥上传的是规格而不是几百 KB 的
218
+ * `number[]`,产物字节因此也不可能由脚本伪造。
219
+ * `mimeType` 由实现固定,调用方无从覆盖;`options.metadata` 透传给 `writeArtifact`,
220
+ * 所以 `resultCard: false` 对它同样生效。
221
+ * 宿主未装配即整个键不存在(同 fetchData / documentSurface)。 @experimental
222
+ */
223
+ writeSpreadsheet?(path: string, spec: SpreadsheetSpec, options?: {
224
+ metadata?: Record<string, unknown>;
225
+ }): Promise<Artifact>;
174
226
  /**
175
227
  * 按**宿主声明的 sourceId** 取数(FR-16.1)。脚本给不了 URL——
176
228
  * 目标由宿主在 `DataSourceDef.target` 里写死,这就是「唯一授权面」。
@@ -501,6 +553,11 @@ declare function createScriptContext(deps: {
501
553
  * 脚本 `typeof context.documentSurface` 即可探测。
502
554
  */
503
555
  documentSurface?: boolean;
556
+ /**
557
+ * 宿主允许技能写表格产物(分册 10 FR-10.4)。传 `false` 与不传同义。
558
+ * 它不是一个新能力,是 `writeArtifact` 的一个便利入口——授权与开关都走那一位(DV-7)。
559
+ */
560
+ writeSpreadsheet?: boolean;
504
561
  /**
505
562
  * 本次 run 可读的用户上传文件(分册 17)。传进来的 `read` **已经过授权与预算**:
506
563
  * 把守在引擎侧只做一遍,四个执行器才不会各自实现一套而出现不一致。
@@ -563,6 +620,16 @@ type ExecuteLifecycleData = {
563
620
  kind: 'surface-action-resumed';
564
621
  surfaceId: string;
565
622
  actionId: string;
623
+ } |
624
+ /**
625
+ * 视觉委派的逐张进度(分册 26 FR-26.9)。只在委派进行中发,不进 trace:
626
+ * 它是过程指示,不是结果的一部分。`source` 是触发取图的工具名。
627
+ */
628
+ {
629
+ kind: 'vision-progress';
630
+ source: string;
631
+ done: number;
632
+ total: number;
566
633
  };
567
634
  /** interact 相位:脚本发起的交互请求,或声明式 surface 上的动作等待 */
568
635
  type InteractLifecycleData = {
@@ -693,6 +760,11 @@ interface AgentLoopConfig {
693
760
  maxDocumentTextBytes?: number;
694
761
  /** `read_linked_document` 的出站准入策略;与脚本取数共用同一个判定(AC-G23) */
695
762
  remoteUrl?: RemoteUrlPolicy;
763
+ /**
764
+ * 视觉委派的并发度(默认 2,上限 3,分册 26 FR-26.5)。
765
+ * 越界一律夹取而不报错:这是性能旋钮,配错了应该退化成能用,不是让 run 失败。
766
+ */
767
+ visionConcurrency?: number;
696
768
  }
697
769
  /** 技能状态拦截 port(治理装配;无注入默认全放行) */
698
770
  interface SkillStateGuard {
@@ -1229,6 +1301,15 @@ declare class FsArtifactStore implements ArtifactStore {
1229
1301
  listArtifacts(runId: string): Promise<Artifact[]>;
1230
1302
  }
1231
1303
  //#endregion
1304
+ //#region src/spreadsheet/encodeSpreadsheet.d.ts
1305
+ /**
1306
+ * 把表格规格编码为 xlsx 字节。
1307
+ *
1308
+ * 纯函数——不认识产物、run 与工具,因此工具、脚本能力、测试三个消费面共用同一份
1309
+ * 实现,AC-10.8「双消费面逐字节相同」是结构性成立的。
1310
+ */
1311
+ declare function encodeSpreadsheet(spec: SpreadsheetSpec): Promise<Uint8Array>;
1312
+ //#endregion
1232
1313
  //#region src/sandbox/bridgeProtocol.d.ts
1233
1314
  /** 能力桥 RPC 消息类型 + 入站校验(Worker 沙箱 ↔ 宿主;browser/node 共用单一来源) */
1234
1315
  type BridgeRequest = {
@@ -1257,6 +1338,18 @@ type BridgeRequest = {
1257
1338
  * 在这里拒绝只能 `return undefined`,而那会丢掉请求 id 使脚本挂到超时。
1258
1339
  */
1259
1340
  metadata?: unknown;
1341
+ } |
1342
+ /**
1343
+ * 表格导出(0.21.0 分册 10 FR-10.5)。桥上传的是**规格**不是字节:
1344
+ * 编码器留在宿主侧,沙箱产物里没有它,二进制也不必退化成 number[] 传一遍。
1345
+ */
1346
+ {
1347
+ kind: 'writeSpreadsheet';
1348
+ id: string;
1349
+ path: string;
1350
+ /** `SpreadsheetSpec` 的 JSON 形态。**不可信载荷**,形状判定在宿主侧的编码器里 */
1351
+ spec: unknown;
1352
+ metadata?: unknown;
1260
1353
  } | {
1261
1354
  kind: 'confirm';
1262
1355
  id: string;
@@ -1482,6 +1575,70 @@ declare const READ_LINKED_DOCUMENT_TOOL: ToolDefinition;
1482
1575
  /** 二进制转 base64;`btoa` 只吃 latin1,必须逐字节喂而不是先 decode 成字符串 */
1483
1576
  declare function toBase64(bytes: Uint8Array): string;
1484
1577
  //#endregion
1578
+ //#region src/engine/visionDelegate.d.ts
1579
+ /**
1580
+ * 视觉委派注入位(0.21.0 分册 17 · FR-17.11a)。
1581
+ *
1582
+ * 形状与 `PdfTextExtractor` 同类:环境无关、不注入即无此能力、逐层透传。
1583
+ * 引擎只负责「什么时候该委派、预算够不够、失败怎么说」,
1584
+ * **选哪个端点、要不要征得用户同意、怎么留痕**全在宿主实现里——
1585
+ * 那些都要读 `RuntimeConfig` 与界面语言,运行时看不见也不该看见。
1586
+ */
1587
+ /** 交给视觉端点的一张图;`data` 是 base64,与 `LlmImagePart` 同口径 */
1588
+ interface VisionDelegateImage {
1589
+ readonly mimeType: string;
1590
+ readonly data: string;
1591
+ }
1592
+ interface VisionDelegateRequest {
1593
+ /** 本轮要认的全部图。**一次调用**认完,不逐张发(FR-17.3a) */
1594
+ readonly images: readonly VisionDelegateImage[];
1595
+ /**
1596
+ * 当轮任务文本:本轮用户输入。**不含完整对话历史**(FR-17.3b)——
1597
+ * 把历史全带上等于把整段对话也交给了第二个厂商。
1598
+ */
1599
+ readonly task: string;
1600
+ /** 触发取图的工具名,用于留痕里的「触发来源」(FR-17.6) */
1601
+ readonly source: string;
1602
+ /**
1603
+ * 这张图所属的整批。逐张调用是并发的需要(FR-26.5),但用户看到的是**一次委派**:
1604
+ * 授权卡上的张数得是整批的张数,整批也只该问一次(FR-26.8)。
1605
+ * 缺席时按「这一次调用就是一整批」处理。
1606
+ */
1607
+ readonly batch?: {
1608
+ readonly id: string;
1609
+ readonly total: number;
1610
+ };
1611
+ /** 本次委派的时间预算,已与父运行剩余时长取小(FR-17.4a) */
1612
+ readonly timeoutMs: number;
1613
+ /** 超时或父 run 被取消时触发;实现必须把它传给底层请求 */
1614
+ readonly signal: AbortSignal;
1615
+ }
1616
+ /**
1617
+ * 委派结果。用判别联合而不是「文本 + 可选字段」:
1618
+ * 面向模型的措辞归引擎统一拼(AGENTS.md §1),宿主只回报发生了什么。
1619
+ */
1620
+ type VisionDelegateResult = {
1621
+ readonly outcome: 'described';
1622
+ readonly endpoint: string;
1623
+ readonly text: string;
1624
+ } | {
1625
+ readonly outcome: 'declined';
1626
+ } | {
1627
+ readonly outcome: 'failed';
1628
+ readonly reason: string;
1629
+ };
1630
+ interface VisionDelegate {
1631
+ /**
1632
+ * 当前是否需要把工具产出的图交给第二个端点认。
1633
+ * **每次调用时读配置**:用户中途换成支持图像的模型,下一轮就该回到直传。
1634
+ *
1635
+ * 用户同意与否**不在这里判**:在用户作出选择之前不得发出任何请求(FR-17.7b),
1636
+ * 而「问不问」本身取决于有没有图可认——所以同意在 `describe` 里把关。
1637
+ */
1638
+ applies(): Promise<boolean>;
1639
+ describe(request: VisionDelegateRequest): Promise<VisionDelegateResult>;
1640
+ }
1641
+ //#endregion
1485
1642
  //#region src/engine/toolStep.d.ts
1486
1643
  /**
1487
1644
  * 一次工具调用的**未截断**参数留存(分册 30 / FR-30.2)。
@@ -1562,6 +1719,14 @@ type ToolDisclosure = 'always' | 'on-demand';
1562
1719
  */
1563
1720
  interface ToolCallContext {
1564
1721
  readonly runId: string;
1722
+ /**
1723
+ * run 的取消信号(0.21.0 分册 22 · FR-22.15)。`cancel()` 与 `totalTimeoutMs`
1724
+ * 硬期限共用同一个 controller,所以这一个字段两件事都覆盖。
1725
+ *
1726
+ * 加它是因为长跑工具(逐页渲染 PDF 并逐张送多模态识别)在用户点停之后
1727
+ * 没有任何别的办法知道该收手。不读它的工具源行为完全不变。
1728
+ */
1729
+ readonly signal?: AbortSignal;
1565
1730
  }
1566
1731
  /**
1567
1732
  * 外部工具来源(runtime 扩展点,mcp 包实现并插入)。
@@ -1752,6 +1917,11 @@ interface AgentLoopDeps {
1752
1917
  * 不注入即没有回退能力,失败照报——与 docx / xlsx「不注入即没这个能力」同款。
1753
1918
  */
1754
1919
  pdfExtractor?: PdfTextExtractor;
1920
+ /**
1921
+ * 视觉委派(0.21.0 分册 17 · FR-17.11a)。选中模型看不了图时,把**工具产出**的图
1922
+ * 交给第二个端点认一遍。不注入即无此能力,工具产出的图照旧直接投给主模型。
1923
+ */
1924
+ visionDelegate?: VisionDelegate;
1755
1925
  /** 文档读取留痕出口(FR-22.6);不注入即不留痕,装配方要自己承担这个选择 */
1756
1926
  documentAudit?: {
1757
1927
  append(event: {
@@ -1765,6 +1935,12 @@ interface AgentLoopDeps {
1765
1935
  * 投放本身靠用户手势触发,脚本拿到端口也只会得到一个必然被拦的弹窗。
1766
1936
  */
1767
1937
  documentSurface?: true;
1938
+ /**
1939
+ * 宿主开放 `context.writeSpreadsheet`(0.21.0 分册 10 FR-10.4)。
1940
+ * 不传即键不存在,技能能提前分支而不是调完才拿到运行时错误;
1941
+ * 开了也仍然要过 `writeArtifact` 的能力开关与授权卡(DV-7)。
1942
+ */
1943
+ writeSpreadsheet?: true;
1768
1944
  /**
1769
1945
  * 本次 run 触发消息带上来的用户上传文件(0.15.0 分册 17)。
1770
1946
  * 由 `runtime.run(prompt, { uploadFiles })` 逐 run 传入,因此子 run 天然拿不到。
@@ -1961,6 +2137,8 @@ interface WebSkillRuntimeDeps {
1961
2137
  xlsxExtractor?: XlsxTextExtractor;
1962
2138
  /** PDF → 文本;**只在直传被端点拒后做回退**,不注入即没有回退能力(FR-22.1) */
1963
2139
  pdfExtractor?: PdfTextExtractor;
2140
+ /** 视觉委派(0.21.0 分册 17 FR-17.11a);不注入即工具产出的图照旧直接投给主模型 */
2141
+ visionDelegate?: VisionDelegate;
1964
2142
  /** 文档读取留痕出口(FR-22.6) */
1965
2143
  documentAudit?: {
1966
2144
  append(event: {
@@ -1971,6 +2149,8 @@ interface WebSkillRuntimeDeps {
1971
2149
  };
1972
2150
  /** 宿主具备文档投放面(0.15.0 分册 13 FR-13.4);只是能力位,端口本体不进脚本上下文 */
1973
2151
  documentSurface?: true;
2152
+ /** 宿主开放 `context.writeSpreadsheet`(0.21.0 分册 10 FR-10.4);授权仍走 writeArtifact 那一位 */
2153
+ writeSpreadsheet?: true;
1974
2154
  /** 上传文件读取留痕出口(0.15.0 分册 17 FR-17.7);批准与拒绝都写 */
1975
2155
  uploadFileAudit?: {
1976
2156
  append(event: {
@@ -2004,10 +2184,25 @@ declare class WebSkillRuntime {
2004
2184
  * 既有 runtime.run(prompt) 保持无状态单次语义不变。
2005
2185
  * 同 handle 并发 run 经 per-handle 队列串行化(防历史 last-writer-wins 丢轮次);
2006
2186
  * maxHistoryMessages(默认取 `DEFAULT_LOOP_LIMITS`)超出时滚动裁剪中段(保留首尾;边界对齐 tool 契约)。
2187
+ *
2188
+ * 配了 `contextWindow` 时另加一道**主动压缩**(分册 20 FR-20.6):按上一轮的真实
2189
+ * `prompt_tokens` 与窗口的比值判定,超阈值就在下一轮发起前把最早的一段摘要掉。
2190
+ * 三个输入(窗口、用量、足够长的历史)缺一不压——不估算、不猜。
2007
2191
  */
2008
2192
  createSession(options?: {
2009
2193
  sessionId?: string;
2010
2194
  maxHistoryMessages?: number;
2195
+ /** 该会话所用模型的上下文窗口(token);缺省即不压缩 */
2196
+ contextWindow?: number;
2197
+ /** 触发比例,默认 `DEFAULT_COMPACTION_THRESHOLD` */
2198
+ compactionThreshold?: number;
2199
+ /** 压缩后至少保留的原文消息数,默认 12,下界 6 */
2200
+ keepRecentMessages?: number;
2201
+ /** 压缩留痕出口(FR-20.8);只在真的压了之后调 */
2202
+ onCompacted?: (info: {
2203
+ removed: number;
2204
+ kept: number;
2205
+ }) => void;
2011
2206
  }): RuntimeSessionHandle;
2012
2207
  discover(): Promise<DiscoveryResult>;
2013
2208
  run(userPrompt: string | readonly LlmContentPart[], options?: {
@@ -2201,6 +2396,14 @@ interface RunUsageSummary {
2201
2396
  inputTokens?: number;
2202
2397
  /** 各轮 llm.usage 的输出 token 合计;缺省语义同 inputTokens */
2203
2398
  outputTokens?: number;
2399
+ /**
2400
+ * **最后一轮** llm.usage 的输入 token:本 run 结束时的上下文水位线(分册 20 FR-20.5)。
2401
+ *
2402
+ * 与 `inputTokens` 不是一回事——后者是各轮相加,一次 run 调三轮就把同一段历史数了三遍,
2403
+ * 回答的是「这次花了多少」;水位线回答的是「上下文占了多少」。历史在 run 内只增不减,
2404
+ * 所以末轮即水位。缺省语义同上。
2405
+ */
2406
+ lastInputTokens?: number;
2204
2407
  }
2205
2408
  /**
2206
2409
  * 从 run 的 trace 聚合大模型用量(请求次数 + 输入/输出 token)。
@@ -2348,4 +2551,60 @@ interface RedactedArgs {
2348
2551
  */
2349
2552
  declare function redactToolStepArgs(args: Record<string, unknown>, schema: JsonSchema | undefined, trust: ToolStepTrust): RedactedArgs;
2350
2553
  //#endregion
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 };
2554
+ //#region src/engine/visionBatch.d.ts
2555
+ /**
2556
+ * 视觉委派的分批并发调度(0.21.0 分册 26 · FR-26.5 ~ FR-26.7)。
2557
+ *
2558
+ * 从 `agentLoop` 里拆出来,是因为它有三条彼此独立的分支——并发、慢降级、失败隔离——
2559
+ * 塞进那个已经三千行的文件里就只能靠端到端测,而这三条恰恰是最需要单独逼出来的。
2560
+ * @experimental
2561
+ */
2562
+ /** 并发度上限。再高只会让每一张都变慢,同时把端点的速率限制撞穿(FR-26.5) @experimental */
2563
+ declare const VISION_MAX_CONCURRENCY = 3;
2564
+ /** @experimental */
2565
+ declare const VISION_DEFAULT_CONCURRENCY = 2;
2566
+ /**
2567
+ * 超过它就退回串行(FR-26.6)。云端视觉端点单张 3–15 秒,本地 Qwen-VL 一类 20–40 秒;
2568
+ * 越过 25 秒说明端点已经在排队,继续并发只会让第一张有用的描述来得更晚。
2569
+ * @experimental
2570
+ */
2571
+ declare const VISION_SLOW_THRESHOLD_MS = 25000;
2572
+ /** 配错了应该退化成能用,不是让 run 失败(FR-26.5) @experimental */
2573
+ declare function clampVisionConcurrency(value: unknown): number;
2574
+ /** @experimental */
2575
+ interface VisionBatchOptions {
2576
+ images: readonly VisionDelegateImage[];
2577
+ concurrency: number;
2578
+ slowThresholdMs?: number;
2579
+ /** 单张委派。`index` 只用于报错定位,实现方不必回传 */
2580
+ describe(image: VisionDelegateImage, index: number): Promise<VisionDelegateResult>;
2581
+ /** 每结算一张调一次(FR-26.9),`done` 递增、`total` 恒为总张数 */
2582
+ onProgress?(done: number, total: number): void;
2583
+ /** 父运行取消:置位后不再派发新的一张 */
2584
+ signal?: AbortSignal;
2585
+ now?(): number;
2586
+ }
2587
+ /** @experimental */
2588
+ interface VisionBatchOutcome {
2589
+ /** 与输入等长、逐张对位;`undefined` = 那张没成 */
2590
+ described: (string | undefined)[];
2591
+ /** 端点标识(首个成功的那张给出;一张都没成时缺席) */
2592
+ endpoint?: string;
2593
+ failures: {
2594
+ index: number;
2595
+ reason: string;
2596
+ }[];
2597
+ /** 用户拒绝:对整批有效,剩下的图不再派发 */
2598
+ declined: boolean;
2599
+ }
2600
+ /**
2601
+ * 逐张委派、按并发度并行。
2602
+ *
2603
+ * 第一波结算后测一次墙钟决定要不要降级:测第一波而不是第一张,
2604
+ * 因为并发下第一张返回得早纯属运气,一波的完成时间才反映端点的实际吞吐。
2605
+ * 降级是**单向**的,本次委派内不再回升。
2606
+ * @experimental
2607
+ */
2608
+ declare function runVisionBatch(options: VisionBatchOptions): Promise<VisionBatchOutcome>;
2609
+ //#endregion
2610
+ export { IntegrityVerdict as $, VisionBatchOutcome as $n, sealToolCallPairs as $r, SealResult as $t, DEFAULT_USER_PROFILE_LIMITS as A, TraceClock as An, listSkillScripts as Ar, RunToolCall as At, FS_SESSION_PAGE_SIZE as B, USER_PROFILE_REFINE_PROMPT as Bn, partsToText as Br, RuntimeSession as Bt, CapabilityApproval as C, ToolDisclosure as Cn, findUnpairedToolCalls as Cr, RouteResult as Ct, DEFAULT_MAX_DOCUMENT_BYTES as D, ToolStepRecord as Dn, interruptedToolResult as Dr, RunSnapshotListEntry as Dt, DEFAULT_MAX_DATA_SOURCE_BYTES as E, ToolStepReader as En, fromVercelStreamPart as Er, RunSnapshot as Et, EMPTY_USER_PROFILE as F, UPLOAD_FILES_UNAVAILABLE as Fn, normalizeErrorCode as Fr, RunTraceSummary as Ft, FsSessionStore as G, UserProfileExport as Gn, refineUserProfile as Gr, SPREADSHEET_LIMITS as Gt, FsMemoryStore as H, UploadFileInfo as Hn, readProfileEntries as Hr, SENSITIVE_ANNOTATION as Ht, EventBus as I, USER_PROFILE_EXPORT_VERSION as In, normalizeToolContent as Ir, RunUploadFiles as It, GoogleGenAiClient as J, VISION_DEFAULT_CONCURRENCY as Jn, runVisionBatch as Jr, SchemaInferer as Jt, FsToolStepStore as K, UserProfileImportDiff as Kn, renderUserProfileContext as Kr, SPREADSHEET_MIME_TYPE as Kt, ExecuteLifecycleData as L, USER_PROFILE_KEY as Ln, normalizeToolError as Lr, RunUsageSummary as Lt, DocumentSurfaceHost as M, TraceEventType as Mn, mergeProfileEntries as Mr, RunTraceFilter as Mt, DocumentSurfacePort as N, TraceRecorder as Nn, networkPolicyLibSource as Nr, RunTraceMetrics as Nt, DEFAULT_MAX_DOCUMENT_TEXT_BYTES as O, ToolStepStore as On, isNetworkAllowed as Or, RunSnapshotStore as Ot, DocxTextExtractor as P, UNSUPPORTED_DOCUMENT_MESSAGE as Pn, networkUrlHost as Pr, RunTraceStore as Pt, InstalledSkillManifest as Q, VisionBatchOptions as Qn, scriptToolName as Qr, SealRecord as Qt, ExternalSkillProvider as R, USER_PROFILE_NO_INVENTION_RULE as Rn, parseBridgeRequest as Rr, RuntimePhase as Rt, BridgeResponse as S, ToolDefinition as Sn, extractUiSpecEvents as Sr, RouteLifecycleData as St, DEFAULT_LOOP_LIMITS as T, ToolResult as Tn, fromVercelResult as Tr, RunResult as Tt, FsRunSnapshotStore as U, UserProfile as Un, readUserProfile as Ur, SESSION_SCHEMA_VERSION as Ut, FsArtifactStore as V, UnsupportedRunSnapshot as Vn, readBehaviorRecords as Vr, RuntimeSessionHandle as Vt, FsRunTraceStore as W, UserProfileEntry as Wn, redactToolStepArgs as Wr, SPREADSHEET_EXTENSION as Wt, HookRunner as X, VISION_SLOW_THRESHOLD_MS as Xn, schemaSourceLabel as Xr, ScriptExecutor as Xt, GoogleGenAiClientConfig as Y, VISION_MAX_CONCURRENCY as Yn, sampleBehaviorRecords as Yr, ScriptExecutionContext as Yt, HookRunnerOptions as Z, VercelToolSpec as Zn, schemaToForm as Zr, SealOptions as Zt, BehaviorRecordKind as _, TerminalLifecycleData as _n, diffUserProfile as _r, READ_SKILL_FILE_TOOL_NAME as _t, ASK_USER_TOOL as a, toRecordDigests as ai, SkillFailureReport as an, WebSkillRuntime as ar, LifecycleListener as at, BridgeCapability as b, ToolCallContext as bn, extractChartSpec as br, RedactedArgs as bt, AgentLoop as c, validateUiSpecNode as ci, SkillRouter as cn, XlsxTextExtractor as cr, NetworkPolicy as ct, AnthropicClient as d, SkillStateGuard as dn, applyUserProfileImport as dr, PdfTextExtractor as dt, summarizeRunUsage as ei, SerializingMemoryStore as en, VisionDelegate as er, InteractLifecycleData as et, AnthropicClientConfig as f, SkillSuccessReport as fn, bridgeError as fr, ProgressiveRouter as ft, BehaviorRecord as g, TEXT_BUDGETED_CONTENT_TYPES as gn, createWebSkillApi as gr, READ_SKILL_FILE_TOOL as gt, BEHAVIOR_RECORDS_KEY as h, SpreadsheetSpec as hn, createScriptContext as hr, READ_SKILL_FILE_INPUT_SCHEMA as ht, ASK_USER_MAX_FIELDS as i, toLlmToolSpec as ii, SessionStore as in, WebSkillApi as ir, LifecycleHookContext as it, DataSourceInfo as j, TraceEvent as jn, mergeCatalogEntries as jr, RunTraceFile as jt, DEFAULT_MAX_UPLOAD_FILE_BYTES as k, ToolStepTrust as kn, isUnsupportedRunSnapshot as kr, RunTerminationReason as kt, AgentLoopConfig as l, SkillScriptDescriptor as ln, XlsxUnsupportedFeature as lr, OpenAiCompatibleClient as lt, ApprovalScope as m, SpreadsheetSheet as mn, clampVisionConcurrency as mr, READ_LINKED_DOCUMENT_TOOL_NAME as mt, ASK_USER_FIELD_TYPES as n, textParts as ni, SessionMeta as nn, VisionDelegateRequest as nr, LifecycleEventInit as nt, ASK_USER_TOOL_NAME as o, toVercelToolSpecs as oi, SkillIntegrityGuard as on, WebSkillRuntimeDeps as or, LinkedDocumentReader as ot, ApprovalDecision as p, SpreadsheetCell as pn, buildRenderResult as pr, READ_LINKED_DOCUMENT_TOOL as pt, FullDisclosureRouter as q, UserProfileLimits as qn, resolveToolName as qr, SUPPORTED_DOCUMENT_MIME as qt, ASK_USER_INPUT_SCHEMA as r, toBase64 as ri, SessionRecord as rn, VisionDelegateResult as rr, LifecycleHook as rt, ActivateLifecycleData as s, validateUiSpecEvent as si, SkillOutcomeReporter as sn, XLSX_UNSUPPORTED as sr, MAX_TOOL_STEP_ARG_BYTES as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, summarizeToolCalls as ti, SessionListPage as tn, VisionDelegateImage as tr, LifecycleEvent as tt, AgentLoopDeps as u, SkillScriptSchemaSource as un, appendBehaviorRecords as ur, OpenAiCompatibleClientConfig as ut, BehaviorScene as v, TextualToolContent as vn, encodeSpreadsheet as vr, RUN_SNAPSHOT_SCHEMA_VERSION as vt, CapabilityMode as w, ToolResolution as wn, formatSkillScriptManifest as wr, RunLimitErrorDetails as wt, BridgeRequest as x, ToolContent as xn, extractTodoTraceEvents as xr, RefineUserProfileInput as xt, BridgeCapabilities as y, TodoTraceEvent as yn, exportUserProfile as yr, RUN_TRACE_SCHEMA_VERSION as yt, ExternalToolSource as z, USER_PROFILE_PROMPT_HEADER as zn, parseUserProfileExport as zr, RuntimeRun as zt };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
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-Btpdd1y--BcxQ10Fa.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-BDyXe-a5.js";
1
+ import { $ as SIGNATURE_SCHEMA_VERSION, $t as keyIdOf, A as extractSkillCandidate, At as UnsignedPolicy, B as DiscoveryResult, Bt as buildManifest, C as UiSpecActionCapability, Ct as SkillSource, D as UiSpecSnapshot, Dt as TrustedKeyStore, E as UiSpecPatch, Et as TrustedKey, F as CatalogRenderer, Ft as XLSX_MIME, G as FsTrustedKeyStore, Gt as detectSkillArchiveShape, H as FileStat, Ht as checkSkillRules, I as ChatAttachmentKind, It as assertRemoteUrlAllowed, J as MANIFEST_EXCLUDED_FILES, Jt as exportSkills, K as IMAGE_MIME_TYPES, Kt as detectSkillArchiveShapeFromFs, L as CryptoKeyLike, Lt as assertSafePathSegment, M as ATTACHMENT_TEXT_LIMIT, Mt as VerifyResult, N as ArchiveLimits, Nt as WebSkillError, O as UiSurfaceActionRequest, Ot as UNTRUSTED_LINE_LIMIT, P as AttachmentTextInput, Pt as WebSkillErrorCode, Q as RemoteUrlPolicy, Qt as jsonRenderer, R as DEFAULT_ARCHIVE_LIMITS, Rt as atomicWriteText, S as UiBridge, St as SkillSignature, T as UiSpecEvent, Tt as TEXT_EXTENSIONS, U as FileSystemProvider, Ut as classifyAttachment, V as FILE_MIME_TYPES, Vt as checkDependencyCycles, W as FileWriteStream, Wt as computeDigest, X as Page, Xt as isAtomicTempPath, Y as MemoryFS, Yt as formatAttachmentText, Z as PageQuery, Zt as isValidSkillName, _ as LlmToolSpec, _n as verifySkillSignature, _t as SkillManagerPort, a as InteractionOrigin, an as readSkillSignature, at as SKILL_SIGNATURE_FILE, b as RenderResultRequest, bt as SkillPackManifest, c as InteractionResponse, cn as resolveArchiveLimits, ct as SkillArchiveDetection, d as LlmContentPart, dn as signSkill, dt as SkillCatalogEntry, en as messageOf, et as SKILLS_LOCKFILE, f as LlmMessage, fn as signaturePayloadBytes, ft as SkillDiscovery, g as LlmToolCall, gn as verifyManifest, gt as SkillLocation, h as LlmTokenUsage, hn as validateSkills, ht as SkillIssue, i as FormField, in as readResponseWithLimit, it as SKILL_PACK_FILE, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as ValidationReport, k as UiSurfaceActionResponse, kt as UiSpecNode, l as LlmClient, ln as resolveInsideRoot, lt as SkillArchiveShape, m as LlmStreamEvent, mn as unzipWithLimits, mt as SkillInstallSource, n as ArtifactStore, nn as parseSkillMarkdown, nt as SKILL_NAME_MAX_LENGTH, o as InteractionPolicy, on as renderAvailableSkillsXml, ot as SignatureAuditSink, p as LlmResponse, pn as stripArchiveRoot, pt as SkillDocument, q as JsonSchema, qt as escapeXml, r as ChartSpec, rn as parseSkillPackManifest, rt as SKILL_NAME_PATTERN, s as InteractionRequest, sn as renderCatalogJson, st as SignatureVerdict, t as Artifact, tn as normalizePath, tt as SKILL_MANIFEST_FILE, u as LlmCompleteInput, un as sanitizeUntrustedLine, ut as SkillCatalog, v as MemoryStore, vn as xmlRenderer, vt as SkillManifest, w as UiSpecDrafts, wt as SkillsLockfile, x as SkillCandidateMarker, xt as SkillReader, y as RenderBlock, yt as SkillMetadata, z as DOCX_MIME, zt as buildCatalog } from "./types-BvTV_05--BW8zDuEk.js";
2
+ import { $ as IntegrityVerdict, $n as VisionBatchOutcome, $r as sealToolCallPairs, $t as SealResult, A as DEFAULT_USER_PROFILE_LIMITS, An as TraceClock, Ar as listSkillScripts, At as RunToolCall, B as FS_SESSION_PAGE_SIZE, Bn as USER_PROFILE_REFINE_PROMPT, Br as partsToText, Bt as RuntimeSession, C as CapabilityApproval, Cn as ToolDisclosure, Cr as findUnpairedToolCalls, Ct as RouteResult, D as DEFAULT_MAX_DOCUMENT_BYTES, Dn as ToolStepRecord, Dr as interruptedToolResult, Dt as RunSnapshotListEntry, E as DEFAULT_MAX_DATA_SOURCE_BYTES, En as ToolStepReader, Er as fromVercelStreamPart, Et as RunSnapshot, F as EMPTY_USER_PROFILE, Fn as UPLOAD_FILES_UNAVAILABLE, Fr as normalizeErrorCode, Ft as RunTraceSummary, G as FsSessionStore, Gn as UserProfileExport, Gr as refineUserProfile, Gt as SPREADSHEET_LIMITS, H as FsMemoryStore, Hn as UploadFileInfo, Hr as readProfileEntries, Ht as SENSITIVE_ANNOTATION, I as EventBus, In as USER_PROFILE_EXPORT_VERSION, Ir as normalizeToolContent, It as RunUploadFiles, J as GoogleGenAiClient, Jn as VISION_DEFAULT_CONCURRENCY, Jr as runVisionBatch, Jt as SchemaInferer, K as FsToolStepStore, Kn as UserProfileImportDiff, Kr as renderUserProfileContext, Kt as SPREADSHEET_MIME_TYPE, L as ExecuteLifecycleData, Ln as USER_PROFILE_KEY, Lr as normalizeToolError, Lt as RunUsageSummary, M as DocumentSurfaceHost, Mn as TraceEventType, Mr as mergeProfileEntries, Mt as RunTraceFilter, N as DocumentSurfacePort, Nn as TraceRecorder, Nr as networkPolicyLibSource, Nt as RunTraceMetrics, O as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, On as ToolStepStore, Or as isNetworkAllowed, Ot as RunSnapshotStore, P as DocxTextExtractor, Pn as UNSUPPORTED_DOCUMENT_MESSAGE, Pr as networkUrlHost, Pt as RunTraceStore, Q as InstalledSkillManifest, Qn as VisionBatchOptions, Qr as scriptToolName, Qt as SealRecord, R as ExternalSkillProvider, Rn as USER_PROFILE_NO_INVENTION_RULE, Rr as parseBridgeRequest, Rt as RuntimePhase, S as BridgeResponse, Sn as ToolDefinition, Sr as extractUiSpecEvents, St as RouteLifecycleData, T as DEFAULT_LOOP_LIMITS, Tn as ToolResult, Tr as fromVercelResult, Tt as RunResult, U as FsRunSnapshotStore, Un as UserProfile, Ur as readUserProfile, Ut as SESSION_SCHEMA_VERSION, V as FsArtifactStore, Vn as UnsupportedRunSnapshot, Vr as readBehaviorRecords, Vt as RuntimeSessionHandle, W as FsRunTraceStore, Wn as UserProfileEntry, Wr as redactToolStepArgs, Wt as SPREADSHEET_EXTENSION, X as HookRunner, Xn as VISION_SLOW_THRESHOLD_MS, Xr as schemaSourceLabel, Xt as ScriptExecutor, Y as GoogleGenAiClientConfig, Yn as VISION_MAX_CONCURRENCY, Yr as sampleBehaviorRecords, Yt as ScriptExecutionContext, Z as HookRunnerOptions, Zn as VercelToolSpec, Zr as schemaToForm, Zt as SealOptions, _ as BehaviorRecordKind, _n as TerminalLifecycleData, _r as diffUserProfile, _t as READ_SKILL_FILE_TOOL_NAME, a as ASK_USER_TOOL, ai as toRecordDigests, an as SkillFailureReport, ar as WebSkillRuntime, at as LifecycleListener, b as BridgeCapability, bn as ToolCallContext, br as extractChartSpec, bt as RedactedArgs, c as AgentLoop, ci as validateUiSpecNode, cn as SkillRouter, cr as XlsxTextExtractor, ct as NetworkPolicy, d as AnthropicClient, dn as SkillStateGuard, dr as applyUserProfileImport, dt as PdfTextExtractor, ei as summarizeRunUsage, en as SerializingMemoryStore, er as VisionDelegate, et as InteractLifecycleData, f as AnthropicClientConfig, fn as SkillSuccessReport, fr as bridgeError, ft as ProgressiveRouter, g as BehaviorRecord, gn as TEXT_BUDGETED_CONTENT_TYPES, gr as createWebSkillApi, gt as READ_SKILL_FILE_TOOL, h as BEHAVIOR_RECORDS_KEY, hn as SpreadsheetSpec, hr as createScriptContext, ht as READ_SKILL_FILE_INPUT_SCHEMA, i as ASK_USER_MAX_FIELDS, ii as toLlmToolSpec, in as SessionStore, ir as WebSkillApi, it as LifecycleHookContext, j as DataSourceInfo, jn as TraceEvent, jr as mergeCatalogEntries, jt as RunTraceFile, k as DEFAULT_MAX_UPLOAD_FILE_BYTES, kn as ToolStepTrust, kr as isUnsupportedRunSnapshot, kt as RunTerminationReason, l as AgentLoopConfig, ln as SkillScriptDescriptor, lr as XlsxUnsupportedFeature, lt as OpenAiCompatibleClient, m as ApprovalScope, mn as SpreadsheetSheet, mr as clampVisionConcurrency, mt as READ_LINKED_DOCUMENT_TOOL_NAME, n as ASK_USER_FIELD_TYPES, ni as textParts, nn as SessionMeta, nr as VisionDelegateRequest, nt as LifecycleEventInit, o as ASK_USER_TOOL_NAME, oi as toVercelToolSpecs, on as SkillIntegrityGuard, or as WebSkillRuntimeDeps, ot as LinkedDocumentReader, p as ApprovalDecision, pn as SpreadsheetCell, pr as buildRenderResult, pt as READ_LINKED_DOCUMENT_TOOL, q as FullDisclosureRouter, qn as UserProfileLimits, qr as resolveToolName, qt as SUPPORTED_DOCUMENT_MIME, r as ASK_USER_INPUT_SCHEMA, ri as toBase64, rn as SessionRecord, rr as VisionDelegateResult, rt as LifecycleHook, s as ActivateLifecycleData, si as validateUiSpecEvent, sn as SkillOutcomeReporter, sr as XLSX_UNSUPPORTED, st as MAX_TOOL_STEP_ARG_BYTES, t as ALLOWED_TOOLS_EXCLUSION_REASON, ti as summarizeToolCalls, tn as SessionListPage, tr as VisionDelegateImage, tt as LifecycleEvent, u as AgentLoopDeps, un as SkillScriptSchemaSource, ur as appendBehaviorRecords, ut as OpenAiCompatibleClientConfig, v as BehaviorScene, vn as TextualToolContent, vr as encodeSpreadsheet, vt as RUN_SNAPSHOT_SCHEMA_VERSION, w as CapabilityMode, wn as ToolResolution, wr as formatSkillScriptManifest, wt as RunLimitErrorDetails, x as BridgeRequest, xn as ToolContent, xr as extractTodoTraceEvents, xt as RefineUserProfileInput, y as BridgeCapabilities, yn as TodoTraceEvent, yr as exportUserProfile, yt as RUN_TRACE_SCHEMA_VERSION, z as ExternalToolSource, zn as USER_PROFILE_PROMPT_HEADER, zr as parseUserProfileExport, zt as RuntimeRun } from "./index-DHopiH_m.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.19.0";
9
+ declare const SDK_VERSION = "0.21.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, 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 };
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 FileWriteStream, 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, SPREADSHEET_EXTENSION, SPREADSHEET_LIMITS, SPREADSHEET_MIME_TYPE, 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, type SpreadsheetCell, type SpreadsheetSheet, type SpreadsheetSpec, 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, VISION_DEFAULT_CONCURRENCY, VISION_MAX_CONCURRENCY, VISION_SLOW_THRESHOLD_MS, type ValidationReport, type VercelToolSpec, type VerifyResult, type VisionBatchOptions, type VisionBatchOutcome, type VisionDelegate, type VisionDelegateImage, type VisionDelegateRequest, type VisionDelegateResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, XLSX_MIME, XLSX_UNSUPPORTED, type XlsxTextExtractor, type XlsxUnsupportedFeature, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clampVisionConcurrency, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, encodeSpreadsheet, 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, runVisionBatch, sampleBehaviorRecords, sanitizeUntrustedLine, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
package/dist/index.js CHANGED
@@ -2,14 +2,15 @@ import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
2
2
  import { A as SKILL_MANIFEST_FILE, C as keyIdOf, D as verifySkillSignature, E as signaturePayloadBytes, M as buildManifest, N as computeDigest, O as MANIFEST_EXCLUDED_FILES, P as verifyManifest, S as SIGNATURE_SCHEMA_VERSION, T as signSkill, _ as SKILL_NAME_MAX_LENGTH, a as DEFAULT_ARCHIVE_LIMITS, b as parseSkillMarkdown, c as unzipWithLimits, d as stripArchiveRoot, f as SKILL_PACK_FILE, g as checkSkillRules, h as checkDependencyCycles, i as buildCatalog, j as SKILL_SIGNATURE_FILE, k as SKILLS_LOCKFILE, l as detectSkillArchiveShape, m as parseSkillPackManifest, n as SkillDiscovery, o as readResponseWithLimit, p as exportSkills, r as SkillReader, s as resolveArchiveLimits, t as validateSkills, u as detectSkillArchiveShapeFromFs, v as SKILL_NAME_PATTERN, w as readSkillSignature, x as FsTrustedKeyStore, y as isValidSkillName } from "./skill-CAJMsLod.js";
3
3
  import { a as atomicWriteText, i as ATOMIC_TMP_SUFFIX_PATTERN, n as normalizePath, o as isAtomicTempPath, r as resolveInsideRoot, t as assertSafePathSegment } from "./pathSecurity-B1owvJAF.js";
4
4
  import { t as assertRemoteUrlAllowed } from "./urlSafety-CiSuCJvX.js";
5
- import { a as TEXT_EXTENSIONS, c as formatAttachmentText, i as IMAGE_MIME_TYPES, l as UNTRUSTED_LINE_LIMIT, n as DOCX_MIME, o as XLSX_MIME, r as FILE_MIME_TYPES, s as classifyAttachment, t as ATTACHMENT_TEXT_LIMIT, u as sanitizeUntrustedLine } from "./kind-DxgS8LM-.js";
6
- import { $ as scriptToolName, A as readUserProfile, B as createScriptContext, C as TraceRecorder, D as mergeProfileEntries, E as appendBehaviorRecords, F as DEFAULT_USER_PROFILE_LIMITS, G as ASK_USER_TOOL_NAME, H as ASK_USER_INPUT_SCHEMA, I as EMPTY_USER_PROFILE, J as READ_SKILL_FILE_TOOL_NAME, K as READ_SKILL_FILE_INPUT_SCHEMA, L as SerializingMemoryStore, M as USER_PROFILE_NO_INVENTION_RULE, N as USER_PROFILE_PROMPT_HEADER, O as readBehaviorRecords, P as renderUserProfileContext, Q as schemaSourceLabel, R as EventBus, S as extractTodoTraceEvents, T as USER_PROFILE_KEY, U as ASK_USER_MAX_FIELDS, V as ASK_USER_FIELD_TYPES, W as ASK_USER_TOOL, X as formatSkillScriptManifest, Y as ALLOWED_TOOLS_EXCLUSION_REASON, Z as listSkillScripts, _ as RUN_SNAPSHOT_SCHEMA_VERSION, a as networkPolicyLibSource, at as xmlRenderer, b as MAX_TOOL_STEP_ARG_BYTES, c as bridgeError, d as FsMemoryStore, et as resolveToolName, f as WebSkillRuntime, g as FsRunSnapshotStore, h as redactToolStepArgs, i as isNetworkAllowed, it as renderAvailableSkillsXml, j as sampleBehaviorRecords, k as readProfileEntries, l as parseBridgeRequest, m as SENSITIVE_ANNOTATION, n as normalizeErrorCode, nt as ProgressiveRouter, o as networkUrlHost, p as AgentLoop, q as READ_SKILL_FILE_TOOL, r as normalizeToolError, rt as escapeXml, s as UPLOAD_FILES_UNAVAILABLE, t as CapabilityApproval, tt as toLlmToolSpec, u as FsArtifactStore, v as isUnsupportedRunSnapshot, w as BEHAVIOR_RECORDS_KEY, x as extractSkillCandidate, y as DEFAULT_LOOP_LIMITS, z as schemaToForm } from "./approval-Bbh_Apwg.js";
5
+ import { n as sanitizeUntrustedLine, t as UNTRUSTED_LINE_LIMIT } from "./untrustedText-BIaRvPZK.js";
6
+ import { a as TEXT_EXTENSIONS, c as formatAttachmentText, i as IMAGE_MIME_TYPES, n as DOCX_MIME, o as XLSX_MIME, r as FILE_MIME_TYPES, s as classifyAttachment, t as ATTACHMENT_TEXT_LIMIT } from "./kind-DaKqLX2F.js";
7
+ import { $ as READ_SKILL_FILE_TOOL, A as BEHAVIOR_RECORDS_KEY, B as renderUserProfileContext, C as extractTodoTraceEvents, D as VISION_SLOW_THRESHOLD_MS, E as VISION_MAX_CONCURRENCY, F as readProfileEntries, G as schemaToForm, H as EMPTY_USER_PROFILE, I as readUserProfile, J as ASK_USER_INPUT_SCHEMA, K as createScriptContext, L as sampleBehaviorRecords, M as appendBehaviorRecords, N as mergeProfileEntries, O as clampVisionConcurrency, P as readBehaviorRecords, Q as READ_SKILL_FILE_INPUT_SCHEMA, R as USER_PROFILE_NO_INVENTION_RULE, S as extractSkillCandidate, T as VISION_DEFAULT_CONCURRENCY, U as SerializingMemoryStore, V as DEFAULT_USER_PROFILE_LIMITS, W as EventBus, X as ASK_USER_TOOL, Y as ASK_USER_MAX_FIELDS, Z as ASK_USER_TOOL_NAME, _ as FsRunSnapshotStore, a as networkPolicyLibSource, at as scriptToolName, b as DEFAULT_LOOP_LIMITS, c as bridgeError, ct as ProgressiveRouter, d as FsMemoryStore, dt as xmlRenderer, et as READ_SKILL_FILE_TOOL_NAME, f as WebSkillRuntime, g as redactToolStepArgs, h as SENSITIVE_ANNOTATION, i as isNetworkAllowed, it as schemaSourceLabel, j as USER_PROFILE_KEY, k as runVisionBatch, l as parseBridgeRequest, lt as escapeXml, m as AgentLoop, n as normalizeErrorCode, nt as formatSkillScriptManifest, o as networkUrlHost, ot as resolveToolName, p as summarizeRunUsage, q as ASK_USER_FIELD_TYPES, r as normalizeToolError, rt as listSkillScripts, s as UPLOAD_FILES_UNAVAILABLE, st as toLlmToolSpec, t as CapabilityApproval, tt as ALLOWED_TOOLS_EXCLUSION_REASON, u as FsArtifactStore, ut as renderAvailableSkillsXml, v as RUN_SNAPSHOT_SCHEMA_VERSION, w as TraceRecorder, x as MAX_TOOL_STEP_ARG_BYTES, y as isUnsupportedRunSnapshot, z as USER_PROFILE_PROMPT_HEADER } from "./approval-DwN2o2QG.js";
7
8
  import { a as GoogleGenAiClient, c as findUnpairedToolCalls, d as partsToText, f as promptText, i as toVercelToolSpecs, l as interruptedToolResult, n as fromVercelResult, o as AnthropicClient, p as textParts, r as fromVercelStreamPart, s as OpenAiCompatibleClient, u as sealToolCallPairs } from "./llm-eIQNO9tr.js";
8
- import { c as DEFAULT_MAX_DOCUMENT_BYTES, d as TEXT_BUDGETED_CONTENT_TYPES, i as UNSUPPORTED_DOCUMENT_MESSAGE, l as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, n as READ_LINKED_DOCUMENT_TOOL_NAME, o as toBase64, r as SUPPORTED_DOCUMENT_MIME, s as DEFAULT_MAX_DATA_SOURCE_BYTES, t as READ_LINKED_DOCUMENT_TOOL, u as DEFAULT_MAX_UPLOAD_FILE_BYTES } from "./linkedDocument-xNXF-z8n.js";
9
+ import { c as SPREADSHEET_EXTENSION, d as XLSX_UNSUPPORTED, f as DEFAULT_MAX_DATA_SOURCE_BYTES, g as TEXT_BUDGETED_CONTENT_TYPES, h as DEFAULT_MAX_UPLOAD_FILE_BYTES, i as UNSUPPORTED_DOCUMENT_MESSAGE, l as SPREADSHEET_LIMITS, m as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, n as READ_LINKED_DOCUMENT_TOOL_NAME, o as toBase64, p as DEFAULT_MAX_DOCUMENT_BYTES, r as SUPPORTED_DOCUMENT_MIME, s as encodeSpreadsheet, t as READ_LINKED_DOCUMENT_TOOL, u as SPREADSHEET_MIME_TYPE } from "./linkedDocument-C0gj1sMq.js";
9
10
  import { n as normalizeToolContent, t as mergeCatalogEntries } from "./external-_ZRQe-V9.js";
10
11
  import { n as extractChartSpec, t as buildRenderResult } from "./renderResult-D9Q-Vu2x.js";
11
12
  import { n as validateUiSpecEvent, r as validateUiSpecNode, t as extractUiSpecEvents } from "./surface-DVGiCmwq.js";
12
- import { t as createWebSkillApi } from "./webSkillApi-CsvA69qk.js";
13
+ import { t as createWebSkillApi } from "./webSkillApi-Cib6G-94.js";
13
14
 
14
15
  //#region ../core/src/fs/memoryFs.ts
15
16
  const ROOT = "/";
@@ -90,6 +91,46 @@ var MemoryFS = class {
90
91
  mtimeMs: Date.now()
91
92
  });
92
93
  }
94
+ /**
95
+ * 分块写入(FR-18.2c)。内存实现只能先攒着,`close()` 时才合并落表——
96
+ * 这样中途 `abort()` 或抛错都不会在表里留下半份内容(FR-18.2e)。
97
+ */
98
+ async createWriteStream(path) {
99
+ const key = this.#normalize(path);
100
+ const chunks = [];
101
+ let settled = false;
102
+ const guard = (op) => {
103
+ if (settled) throw new WebSkillError("FS_PERMISSION_DENIED", `Cannot ${op} a finished write stream: ${key}`);
104
+ };
105
+ return {
106
+ write: async (chunk) => {
107
+ guard("write to");
108
+ chunks.push(chunk);
109
+ },
110
+ close: async () => {
111
+ guard("close");
112
+ settled = true;
113
+ const total = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
114
+ const content = new Uint8Array(total);
115
+ let offset = 0;
116
+ for (const chunk of chunks) {
117
+ content.set(chunk, offset);
118
+ offset += chunk.length;
119
+ }
120
+ chunks.length = 0;
121
+ this.#ensureParents(key);
122
+ this.#entries.set(key, {
123
+ type: "file",
124
+ content,
125
+ mtimeMs: Date.now()
126
+ });
127
+ },
128
+ abort: async () => {
129
+ settled = true;
130
+ chunks.length = 0;
131
+ }
132
+ };
133
+ }
93
134
  async exists(path) {
94
135
  return this.#entries.has(this.#normalize(path));
95
136
  }
@@ -437,41 +478,6 @@ function applyUserProfileImport(current, incoming, options = {}) {
437
478
  };
438
479
  }
439
480
 
440
- //#endregion
441
- //#region ../runtime/src/engine/usage.ts
442
- /**
443
- * 从 run 的 trace 聚合大模型用量(请求次数 + 输入/输出 token)。
444
- * 与 `summarizeToolCalls` 同型:消费方不再各自遍历 trace。
445
- * @stable
446
- */
447
- function summarizeRunUsage(trace) {
448
- let llmCalls = 0;
449
- let inputTokens = 0;
450
- let outputTokens = 0;
451
- let hasUsage = false;
452
- for (const event of trace) {
453
- if (event.type === "llm.request") {
454
- llmCalls += 1;
455
- continue;
456
- }
457
- if (event.type !== "llm.usage") continue;
458
- const input = event.data?.["inputTokens"];
459
- const output = event.data?.["outputTokens"];
460
- const hasInput = typeof input === "number" && Number.isFinite(input);
461
- const hasOutput = typeof output === "number" && Number.isFinite(output);
462
- if (hasInput) inputTokens += input;
463
- if (hasOutput) outputTokens += output;
464
- if (hasInput || hasOutput) hasUsage = true;
465
- }
466
- return {
467
- llmCalls,
468
- ...hasUsage ? {
469
- inputTokens,
470
- outputTokens
471
- } : {}
472
- };
473
- }
474
-
475
481
  //#endregion
476
482
  //#region ../runtime/src/engine/runTrace.ts
477
483
  const RUN_TRACE_SCHEMA_VERSION = 1;
@@ -1004,7 +1010,7 @@ var FsToolStepStore = class {
1004
1010
  * Version of the published `@webskill/sdk` package, injected at build time.
1005
1011
  * @stable
1006
1012
  */
1007
- const SDK_VERSION = "0.19.0";
1013
+ const SDK_VERSION = "0.21.0";
1008
1014
 
1009
1015
  //#endregion
1010
- 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, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, DEFAULT_MAX_UPLOAD_FILE_BYTES, DEFAULT_USER_PROFILE_LIMITS, DOCX_MIME, EMPTY_USER_PROFILE, EventBus, FILE_MIME_TYPES, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, IMAGE_MIME_TYPES, MANIFEST_EXCLUDED_FILES, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_LINKED_DOCUMENT_TOOL, READ_LINKED_DOCUMENT_TOOL_NAME, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SDK_VERSION, 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, SerializingMemoryStore, SkillDiscovery, SkillReader, TEXT_BUDGETED_CONTENT_TYPES, TEXT_EXTENSIONS, TraceRecorder, 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, WebSkillError, WebSkillRuntime, XLSX_MIME, 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 };
1016
+ 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, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, DEFAULT_MAX_UPLOAD_FILE_BYTES, DEFAULT_USER_PROFILE_LIMITS, DOCX_MIME, EMPTY_USER_PROFILE, EventBus, FILE_MIME_TYPES, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, IMAGE_MIME_TYPES, MANIFEST_EXCLUDED_FILES, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_LINKED_DOCUMENT_TOOL, READ_LINKED_DOCUMENT_TOOL_NAME, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SDK_VERSION, 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, SPREADSHEET_EXTENSION, SPREADSHEET_LIMITS, SPREADSHEET_MIME_TYPE, SUPPORTED_DOCUMENT_MIME, SerializingMemoryStore, SkillDiscovery, SkillReader, TEXT_BUDGETED_CONTENT_TYPES, TEXT_EXTENSIONS, TraceRecorder, 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, VISION_DEFAULT_CONCURRENCY, VISION_MAX_CONCURRENCY, VISION_SLOW_THRESHOLD_MS, WebSkillError, WebSkillRuntime, XLSX_MIME, XLSX_UNSUPPORTED, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clampVisionConcurrency, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, encodeSpreadsheet, 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, runVisionBatch, sampleBehaviorRecords, sanitizeUntrustedLine, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };