@webskill/sdk 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/agent.d.ts +1 -1
  2. package/dist/agent.js +1 -1
  3. package/dist/browser.d.ts +151 -4
  4. package/dist/browser.js +269 -30
  5. package/dist/{catalogComponents-Dr5dFMAb-DKH_7VPI.js → catalogComponents-DfxxfUvn-T7Ic8QFV.js} +4026 -997
  6. package/dist/{dist-DnYG2-eY.js → dist-BQe1uglQ.js} +498 -118
  7. package/dist/{dist-8oQRa8Xz.js → dist-Bev6i6Ip.js} +102 -7
  8. package/dist/{dist-D0qW6e40.js → dist-CFmkV45C.js} +234 -27
  9. package/dist/{eventTypes-DjIQpt8Y-Bj3vghj4.js → eventTypes-DbOpAECr-BjcjZVms.js} +15 -2
  10. package/dist/governance.d.ts +24 -3
  11. package/dist/governance.js +30 -11
  12. package/dist/{index-BwsK9lGk.d.ts → index-DXNTIa-6.d.ts} +163 -6
  13. package/dist/{index-Ba3xFtfz.d.ts → index-lLcCpHE-.d.ts} +2 -2
  14. package/dist/{index-DkbABR43.d.ts → index-znZjobkr.d.ts} +144 -76
  15. package/dist/index.d.ts +11 -3
  16. package/dist/index.js +13 -4
  17. package/dist/mcp.d.ts +13 -2
  18. package/dist/mcp.js +19 -5
  19. package/dist/{memoryArtifactStore-52Zn9npI-BMPYwvoy.js → memoryArtifactStore-52Zn9npI-LbCQaqyx.js} +1 -1
  20. package/dist/node.d.ts +3 -3
  21. package/dist/node.js +6 -6
  22. package/dist/{openUiLibrary-Bdrji9qK-D2LxmM-a.js → openUiLibrary-DURlAxjk-Do_yqg3u.js} +3 -3
  23. package/dist/{skillVersionStore-Bl-ElD45-CWPvGvoq.d.ts → skillVersionStore-Bl-ElD45-dMJ8Ybhb.d.ts} +1 -1
  24. package/dist/{testing-CYTFqkDm.js → testing-Csg5ljNm.js} +2 -2
  25. package/dist/testing.d.ts +1 -1
  26. package/dist/testing.js +2 -2
  27. package/dist/{types-CcxRLdJG-DCXyw1US.d.ts → types-B3n0cMZu-BDhheIhX.d.ts} +54 -6
  28. package/dist/ui-react.d.ts +19 -6
  29. package/dist/ui-react.js +156 -84
  30. package/dist/ui-vue.d.ts +1 -1
  31. package/dist/ui-vue.js +2 -2
  32. package/dist/ui.d.ts +4 -4
  33. package/dist/ui.js +3 -3
  34. package/dist/{webskillLitCatalog-_mugzRHx-B_54vxum.js → webskillLitCatalog-DwTwSBFt-BG7kL-Es.js} +22 -3
  35. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { $ as SkillCatalog, C as UiSpecDrafts, D as UiSurfaceActionRequest, H as PageQuery, I as FileSystemProvider, P as DiscoveryResult, R as JsonSchema, V as Page, _ as MemoryStore, d as LlmContentPart, et as SkillCatalogEntry, f as LlmMessage, g as LlmToolSpec, gt as UiSpecNode, i as FormField, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, nt as SkillDocument, o as InteractionPolicy, p as LlmResponse, r as ChartSpec, rt as SkillInstallSource, s as InteractionRequest, st as SkillManifest, t as Artifact, tt as SkillDiscovery, u as LlmCompleteInput, v as RenderBlock, vt as ValidationReport, w as UiSpecEvent, x as UiBridge, xt as WebSkillErrorCode, y as RenderResultRequest } from "./types-CcxRLdJG-DCXyw1US.js";
1
+ import { C as UiSpecDrafts, D as UiSurfaceActionRequest, F as DiscoveryResult, H as Page, L as FileSystemProvider, U as PageQuery, _ as MemoryStore, at as SkillDocument, d as LlmContentPart, f as LlmMessage, g as LlmToolSpec, h as LlmToolCall, i as FormField, it as SkillDiscovery, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, nt as SkillCatalog, o as InteractionPolicy, ot as SkillInstallSource, p as LlmResponse, r as ChartSpec, rt as SkillCatalogEntry, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, ut as SkillManifest, v as RenderBlock, w as UiSpecEvent, wt as WebSkillErrorCode, x as UiBridge, xt as ValidationReport, y as RenderResultRequest, yt as UiSpecNode, z as JsonSchema } from "./types-B3n0cMZu-BDhheIhX.js";
2
2
  //#region ../runtime/dist/index.d.ts
3
3
  //#region src/llm/parts.d.ts
4
4
  /** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
@@ -6,6 +6,115 @@ 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/tools/types.d.ts
10
+ interface ToolDefinition {
11
+ /** LLM 可见名:脚本工具为 `${skillName}__${scriptName}` */
12
+ name: string;
13
+ description?: string;
14
+ /** 缺省即 schemaUnavailable 标记(推导见 deferred-items D2) */
15
+ inputSchema?: JsonSchema;
16
+ source: 'script' | 'mcp' | 'webmcp' | 'builtin';
17
+ skillName?: string;
18
+ }
19
+ /** 文本型分片(参与 `toolResultMaxBytes` 截断) @experimental */
20
+ type TextualToolContent = {
21
+ type: 'text' | 'json';
22
+ text?: string;
23
+ data?: unknown;
24
+ };
25
+ /**
26
+ * 工具结果的内容分片(0.6.0 §1.1)。
27
+ * `image` 分片不参与 `toolResultMaxBytes` 截断——那份预算是给文本的,
28
+ * base64 图像另有 `maxImageBytes` / `maxImagesPerMessage` 预算,混算会让任一方失效。
29
+ * `text?: undefined` 是故意的:图像分片没有文本,但让调用方能直接读 `part.text` 而不用先窄化。
30
+ * @experimental
31
+ */
32
+ type ToolContent = TextualToolContent | {
33
+ type: 'image';
34
+ mimeType: string;
35
+ data: string;
36
+ id: string;
37
+ text?: undefined;
38
+ };
39
+ interface ToolResult {
40
+ ok: boolean;
41
+ content: ToolContent[];
42
+ /** `data` 供宿主编程处理;`message` 是模型实际会读的那一份,两者都要写全 */
43
+ error?: {
44
+ code: string;
45
+ message: string;
46
+ data?: Record<string, unknown>;
47
+ };
48
+ artifacts?: Artifact[];
49
+ }
50
+ interface ScriptExecutionContext {
51
+ skillName: string;
52
+ runId: string;
53
+ readReference(relativePath: string): Promise<string>;
54
+ writeArtifact(path: string, content: string | Uint8Array, options?: {
55
+ mimeType?: string;
56
+ }): Promise<Artifact>;
57
+ /** 脚本主动请求人在环确认;策略见 InteractionPolicy.confirmations */
58
+ confirm?(message: string): Promise<boolean>;
59
+ /** 宿主侧降级 warning 出口(网络阻断等;引擎接线到 run.warning trace) */
60
+ onWarning?(message: string): void;
61
+ }
62
+ /** Schema 推导 port:纯文本静态分析脚本源码 → JSON Schema(best-effort) */
63
+ interface SchemaInferer {
64
+ inferSchemaFromSource(source: string, options?: {
65
+ fileName?: string;
66
+ }): JsonSchema | undefined;
67
+ }
68
+ interface ScriptExecutor {
69
+ loadDefinition(skillRoot: string, scriptName: string): Promise<ToolDefinition>;
70
+ execute(input: {
71
+ skillRoot: string;
72
+ scriptName: string;
73
+ args: Record<string, unknown>;
74
+ context: ScriptExecutionContext;
75
+ timeoutMs: number;
76
+ }): Promise<ToolResult>;
77
+ }
78
+ //#endregion
79
+ //#region src/llm/sealToolCallPairs.d.ts
80
+ /**
81
+ * S1 消息链不变量(分册 11 §2.1):
82
+ *
83
+ * > 任何送往模型的 `LlmMessage[]`,其中每一个 `assistant.toolCalls[i].id`
84
+ * > 都必须有一条 `role:'tool'` 且 `toolCallId` 相同的消息。
85
+ *
86
+ * 供应商侧的差异(OpenAI 的 tool 消息 vs Anthropic 的 tool_result 块)都建立在
87
+ * 这个配对之上,所以补齐放在**装配之前**做一次,而不是每个客户端各做一遍。
88
+ */
89
+ interface SealRecord {
90
+ callId: string;
91
+ toolName: string;
92
+ code: WebSkillErrorCode;
93
+ }
94
+ interface SealResult {
95
+ messages: LlmMessage[];
96
+ /** 补齐了哪些调用;空数组表示消息链本来就完整 */
97
+ sealed: readonly SealRecord[];
98
+ }
99
+ interface SealOptions {
100
+ /** 补齐结果里的错误码;缺省 `RUN_INTERRUPTED`(中断原因已丢失) */
101
+ code?: WebSkillErrorCode;
102
+ /** 已知的终止原因,写进模型可读的说明里 */
103
+ reason?: string;
104
+ }
105
+ /** 与正常工具结果同构:模型读到的是「这次调用被中断了」,而不是一个凭空消失的调用 */
106
+ declare function interruptedToolResult(call: LlmToolCall, options?: SealOptions): ToolResult;
107
+ /** 尚无 `role:'tool'` 应答的工具调用,按消息顺序 */
108
+ declare function findUnpairedToolCalls(messages: readonly LlmMessage[]): readonly LlmToolCall[];
109
+ /**
110
+ * 为每个未应答的工具调用补一条结构化的中断说明。
111
+ *
112
+ * 补齐消息紧跟在该 assistant 已有的 tool 兄弟之后——供应商装配按相邻块分组,
113
+ * 插到序列末尾会让它归属到别的 assistant 消息上。
114
+ * 本函数**不改写入参**,也不写盘(AC-11.8)。
115
+ */
116
+ declare function sealToolCallPairs(messages: readonly LlmMessage[], options?: SealOptions): SealResult;
117
+ //#endregion
9
118
  //#region src/llm/openAiCompatibleClient.d.ts
10
119
  interface OpenAiCompatibleClientConfig {
11
120
  baseUrl?: string;
@@ -52,7 +161,12 @@ declare class AnthropicClient implements LlmClient {
52
161
  complete(input: LlmCompleteInput): Promise<LlmResponse>;
53
162
  /** SSE 流式:text_delta → text-delta;input_json_delta 按 block index 聚合 → tool-calls */
54
163
  stream(input: LlmCompleteInput): AsyncIterable<LlmStreamEvent>;
55
- /** 轻量探测(GET /v1/models),集成测试据此决定 skip */
164
+ /**
165
+ * 真实调用路径探测(FR-27.1):`POST /v1/messages` 最小请求(max_tokens=1),200 即可达。
166
+ * Anthropic 兼容端点(如 LM Studio 的 /anthropic 层)不实现 `GET /v1/models`,
167
+ * 用 /models 探测会把「能对话」误判为「不可达」——checkAvailability 的语义从
168
+ * 「/models 可达」改为「能完成一次真实调用」。
169
+ */
56
170
  checkAvailability(): Promise<boolean>;
57
171
  }
58
172
  //#endregion
@@ -120,76 +234,6 @@ declare class FullDisclosureRouter implements SkillRouter {
120
234
  route(catalog: SkillCatalog): Promise<RouteResult>;
121
235
  }
122
236
  //#endregion
123
- //#region src/tools/types.d.ts
124
- interface ToolDefinition {
125
- /** LLM 可见名:脚本工具为 `${skillName}__${scriptName}` */
126
- name: string;
127
- description?: string;
128
- /** 缺省即 schemaUnavailable 标记(推导见 deferred-items D2) */
129
- inputSchema?: JsonSchema;
130
- source: 'script' | 'mcp' | 'webmcp' | 'builtin';
131
- skillName?: string;
132
- }
133
- /** 文本型分片(参与 `toolResultMaxBytes` 截断) @experimental */
134
- type TextualToolContent = {
135
- type: 'text' | 'json';
136
- text?: string;
137
- data?: unknown;
138
- };
139
- /**
140
- * 工具结果的内容分片(0.6.0 §1.1)。
141
- * `image` 分片不参与 `toolResultMaxBytes` 截断——那份预算是给文本的,
142
- * base64 图像另有 `maxImageBytes` / `maxImagesPerMessage` 预算,混算会让任一方失效。
143
- * `text?: undefined` 是故意的:图像分片没有文本,但让调用方能直接读 `part.text` 而不用先窄化。
144
- * @experimental
145
- */
146
- type ToolContent = TextualToolContent | {
147
- type: 'image';
148
- mimeType: string;
149
- data: string;
150
- id: string;
151
- text?: undefined;
152
- };
153
- interface ToolResult {
154
- ok: boolean;
155
- content: ToolContent[];
156
- /** `data` 供宿主编程处理;`message` 是模型实际会读的那一份,两者都要写全 */
157
- error?: {
158
- code: string;
159
- message: string;
160
- data?: Record<string, unknown>;
161
- };
162
- artifacts?: Artifact[];
163
- }
164
- interface ScriptExecutionContext {
165
- skillName: string;
166
- runId: string;
167
- readReference(relativePath: string): Promise<string>;
168
- writeArtifact(path: string, content: string | Uint8Array, options?: {
169
- mimeType?: string;
170
- }): Promise<Artifact>;
171
- /** 脚本主动请求人在环确认;策略见 InteractionPolicy.confirmations */
172
- confirm?(message: string): Promise<boolean>;
173
- /** 宿主侧降级 warning 出口(网络阻断等;引擎接线到 run.warning trace) */
174
- onWarning?(message: string): void;
175
- }
176
- /** Schema 推导 port:纯文本静态分析脚本源码 → JSON Schema(best-effort) */
177
- interface SchemaInferer {
178
- inferSchemaFromSource(source: string, options?: {
179
- fileName?: string;
180
- }): JsonSchema | undefined;
181
- }
182
- interface ScriptExecutor {
183
- loadDefinition(skillRoot: string, scriptName: string): Promise<ToolDefinition>;
184
- execute(input: {
185
- skillRoot: string;
186
- scriptName: string;
187
- args: Record<string, unknown>;
188
- context: ScriptExecutionContext;
189
- timeoutMs: number;
190
- }): Promise<ToolResult>;
191
- }
192
- //#endregion
193
237
  //#region src/tools/toolResolver.d.ts
194
238
  type ToolResolution = {
195
239
  kind: 'script';
@@ -400,7 +444,7 @@ type LifecycleHook = (ctx: LifecycleHookContext) => Promise<void | {
400
444
  }>;
401
445
  //#endregion
402
446
  //#region src/trace/types.d.ts
403
- type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.denied' | 'artifact.created' | 'ui.requested' | 'ui.resumed' | 'ui.surface-action.requested' | 'ui.surface-action.resolved' | 'ui.rendered' | 'todo.created' | 'todo.updated' | 'todo.cleared' | 'run.warning' | 'run.completed' | 'run.cancelled' | 'run.failed' | 'run.resumed';
447
+ type TraceEventType = 'skill.routed' | 'skill.activated' | 'skill.integrity-failed' | 'llm.request' | 'llm.response' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'tool.denied' | 'artifact.created' | 'ui.requested' | 'ui.resumed' | 'ui.surface-action.requested' | 'ui.surface-action.resolved' | 'ui.rendered' | 'ui.degraded' | 'todo.created' | 'todo.updated' | 'todo.cleared' | 'run.warning' | 'run.completed' | 'run.cancelled' | 'run.failed' | 'run.resumed';
404
448
  interface TraceEvent {
405
449
  id: string;
406
450
  runId: string;
@@ -875,6 +919,19 @@ declare function exportUserProfile(profile: UserProfile, options: {
875
919
  /** 解析并校验导入内容(FR-19.7)。含凭据是**拒绝**而不是忽略 @experimental */
876
920
  declare function parseUserProfileExport(raw: unknown): UserProfileExport;
877
921
  /** 导入前给用户看的差异(FR-19.7):新增哪些、覆盖哪些 @experimental */
922
+ /**
923
+ * 导入前的差异预览(FR-19.7)。`origin` 来自导入文件,
924
+ * 让用户在确认前能看清这份画像是从哪个站点带过来的。
925
+ *
926
+ * 类型放在 runtime:导入入口同时存在于 chatbot 与 console 两侧,
927
+ * 写在其中任一宿主包里都会逼出反向依赖。
928
+ * @experimental
929
+ */
930
+ interface UserProfileImportDiff {
931
+ added: readonly UserProfileEntry[];
932
+ updated: readonly UserProfileEntry[];
933
+ origin: string;
934
+ }
878
935
  declare function diffUserProfile(current: UserProfile, incoming: UserProfileExport): {
879
936
  added: readonly UserProfileEntry[];
880
937
  updated: readonly UserProfileEntry[];
@@ -1096,13 +1153,13 @@ interface ExternalSkillProvider {
1096
1153
  declare function mergeCatalogEntries(localEntries: SkillCatalogEntry[], providerEntries: SkillCatalogEntry[]): SkillCatalogEntry[];
1097
1154
  //#endregion
1098
1155
  //#region src/engine/snapshot.d.ts
1099
- declare const RUN_SNAPSHOT_SCHEMA_VERSION = 2;
1156
+ declare const RUN_SNAPSHOT_SCHEMA_VERSION = 3;
1100
1157
  /**
1101
1158
  * interrupted(等待用户)状态点的可恢复快照(D3 收窄版)
1102
1159
  * @experimental
1103
1160
  */
1104
1161
  interface RunSnapshot {
1105
- schemaVersion: 2;
1162
+ schemaVersion: 3;
1106
1163
  runId: string;
1107
1164
  sessionId: string;
1108
1165
  userPrompt: string;
@@ -1541,6 +1598,8 @@ interface SessionMeta {
1541
1598
  titleLocked?: boolean;
1542
1599
  /** 归档标记:默认 `list()` 不返回 */
1543
1600
  archived?: boolean;
1601
+ /** 会话级的模型选择;缺省即回落全局默认(FR-29.1) */
1602
+ modelId?: string;
1544
1603
  messageCount: number;
1545
1604
  }
1546
1605
  /**
@@ -1593,6 +1652,13 @@ interface SessionStore<TMessage = unknown> {
1593
1652
  lock?: boolean;
1594
1653
  }): Promise<void>;
1595
1654
  setArchived(id: string, archived: boolean): Promise<void>;
1655
+ /** 传 `undefined` 即清掉会话级选择,回落全局默认 */
1656
+ setModel(id: string, modelId: string | undefined): Promise<void>;
1657
+ /**
1658
+ * 只取元信息,**不把消息拉过端口**。
1659
+ * 磁盘那侧仍是整文件读(D25),但选会话这条热路径不应因为读一个字段而抬整段历史。
1660
+ */
1661
+ getMeta(id: string): Promise<SessionMeta | undefined>;
1596
1662
  delete(id: string): Promise<void>;
1597
1663
  }
1598
1664
  /**
@@ -1626,7 +1692,9 @@ declare class FsSessionStore<TMessage = unknown> implements SessionStore<TMessag
1626
1692
  lock?: boolean;
1627
1693
  }): Promise<void>;
1628
1694
  setArchived(id: string, archived: boolean): Promise<void>;
1695
+ setModel(id: string, modelId: string | undefined): Promise<void>;
1696
+ getMeta(id: string): Promise<SessionMeta | undefined>;
1629
1697
  delete(id: string): Promise<void>;
1630
1698
  }
1631
1699
  //#endregion
1632
- export { READ_SKILL_FILE_INPUT_SCHEMA as $, validateUiSpecEvent as $n, USER_PROFILE_NO_INVENTION_RULE as $t, FS_SESSION_PAGE_SIZE as A, networkPolicyLibSource as An, SessionRecord as At, HookRunnerOptions as B, readUserProfile as Bn, TerminalLifecycleData as Bt, DEFAULT_LOOP_LIMITS as C, fromVercelResult as Cn, SESSION_SCHEMA_VERSION as Ct, ExecuteLifecycleData as D, listSkillScripts as Dn, SerializingMemoryStore as Dt, EventBus as E, isUnsupportedRunSnapshot as En, ScriptExecutor as Et, FsSessionStore as F, parseBridgeRequest as Fn, SkillRouter as Ft, LifecycleEventInit as G, schemaSourceLabel as Gn, ToolResolution as Gt, IntegrityVerdict as H, renderUserProfileContext as Hn, TodoTraceEvent as Ht, FullDisclosureRouter as I, parseUserProfileExport as In, SkillScriptDescriptor as It, LifecycleListener as J, summarizeToolCalls as Jn, TraceEvent as Jt, LifecycleHook as K, schemaToForm as Kn, ToolResult as Kt, GoogleGenAiClient as L, partsToText as Ln, SkillScriptSchemaSource as Lt, FsMemoryStore as M, normalizeErrorCode as Mn, SkillFailureReport as Mt, FsRunSnapshotStore as N, normalizeToolContent as Nn, SkillIntegrityGuard as Nt, ExternalSkillProvider as O, mergeCatalogEntries as On, SessionListPage as Ot, FsRunTraceStore as P, normalizeToolError as Pn, SkillOutcomeReporter as Pt, ProgressiveRouter as Q, toVercelToolSpecs as Qn, USER_PROFILE_KEY as Qt, GoogleGenAiClientConfig as R, readBehaviorRecords as Rn, SkillStateGuard as Rt, CapabilityMode as S, formatSkillScriptManifest as Sn, RuntimeSessionHandle as St, EMPTY_USER_PROFILE as T, isNetworkAllowed as Tn, ScriptExecutionContext as Tt, InteractLifecycleData as U, resolveToolName as Un, ToolContent as Ut, InstalledSkillManifest as V, refineUserProfile as Vn, TextualToolContent as Vt, LifecycleEvent as W, sampleBehaviorRecords as Wn, ToolDefinition as Wt, OpenAiCompatibleClient as X, toLlmToolSpec as Xn, TraceRecorder as Xt, NetworkPolicy as Y, textParts as Yn, TraceEventType as Yt, OpenAiCompatibleClientConfig as Z, toRecordDigests as Zn, USER_PROFILE_EXPORT_VERSION as Zt, BridgeCapabilities as _, diffUserProfile as _n, RunTraceStore as _t, ActivateLifecycleData as a, UserProfileExport as an, RouteLifecycleData as at, BridgeResponse as b, extractTodoTraceEvents as bn, RuntimeRun as bt, AgentLoopDeps as c, WebSkillApi as cn, RunResult as ct, ApprovalDecision as d, appendBehaviorRecords as dn, RunSnapshotStore as dt, USER_PROFILE_PROMPT_HEADER as en, validateUiSpecNode as er, READ_SKILL_FILE_TOOL as et, ApprovalScope as f, applyUserProfileImport as fn, RunTerminationReason as ft, BehaviorScene as g, createWebSkillApi as gn, RunTraceMetrics as gt, BehaviorRecordKind as h, createScriptContext as hn, RunTraceFilter as ht, ASK_USER_TOOL_NAME as i, UserProfileEntry as in, RefineUserProfileInput as it, FsArtifactStore as j, networkUrlHost as jn, SessionStore as jt, ExternalToolSource as k, mergeProfileEntries as kn, SessionMeta as kt, AnthropicClient as l, WebSkillRuntime as ln, RunSnapshot as lt, BehaviorRecord as m, buildRenderResult as mn, RunTraceFile as mt, ASK_USER_INPUT_SCHEMA as n, UnsupportedRunSnapshot as nn, RUN_SNAPSHOT_SCHEMA_VERSION as nt, AgentLoop as o, UserProfileLimits as on, RouteResult as ot, BEHAVIOR_RECORDS_KEY as p, bridgeError as pn, RunToolCall as pt, LifecycleHookContext as q, scriptToolName as qn, TraceClock as qt, ASK_USER_TOOL as r, UserProfile as rn, RUN_TRACE_SCHEMA_VERSION as rt, AgentLoopConfig as s, VercelToolSpec as sn, RunLimitErrorDetails as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, USER_PROFILE_REFINE_PROMPT as tn, READ_SKILL_FILE_TOOL_NAME as tt, AnthropicClientConfig as u, WebSkillRuntimeDeps as un, RunSnapshotListEntry as ut, BridgeCapability as v, exportUserProfile as vn, RunTraceSummary as vt, DEFAULT_USER_PROFILE_LIMITS as w, fromVercelStreamPart as wn, SchemaInferer as wt, CapabilityApproval as x, extractUiSpecEvents as xn, RuntimeSession as xt, BridgeRequest as y, extractChartSpec as yn, RuntimePhase as yt, HookRunner as z, readProfileEntries as zn, SkillSuccessReport as zt };
1700
+ export { READ_SKILL_FILE_INPUT_SCHEMA as $, scriptToolName as $n, TraceRecorder as $t, FS_SESSION_PAGE_SIZE as A, interruptedToolResult as An, SerializingMemoryStore as At, HookRunnerOptions as B, normalizeToolError as Bn, SkillScriptSchemaSource as Bt, DEFAULT_LOOP_LIMITS as C, extractChartSpec as Cn, SESSION_SCHEMA_VERSION as Ct, ExecuteLifecycleData as D, formatSkillScriptManifest as Dn, SealOptions as Dt, EventBus as E, findUnpairedToolCalls as En, ScriptExecutor as Et, FsSessionStore as F, mergeProfileEntries as Fn, SkillFailureReport as Ft, LifecycleEventInit as G, readProfileEntries as Gn, TodoTraceEvent as Gt, IntegrityVerdict as H, parseUserProfileExport as Hn, SkillSuccessReport as Ht, FullDisclosureRouter as I, networkPolicyLibSource as In, SkillIntegrityGuard as It, LifecycleListener as J, renderUserProfileContext as Jn, ToolResolution as Jt, LifecycleHook as K, readUserProfile as Kn, ToolContent as Kt, GoogleGenAiClient as L, networkUrlHost as Ln, SkillOutcomeReporter as Lt, FsMemoryStore as M, isUnsupportedRunSnapshot as Mn, SessionMeta as Mt, FsRunSnapshotStore as N, listSkillScripts as Nn, SessionRecord as Nt, ExternalSkillProvider as O, fromVercelResult as On, SealRecord as Ot, FsRunTraceStore as P, mergeCatalogEntries as Pn, SessionStore as Pt, ProgressiveRouter as Q, schemaToForm as Qn, TraceEventType as Qt, GoogleGenAiClientConfig as R, normalizeErrorCode as Rn, SkillRouter as Rt, CapabilityMode as S, exportUserProfile as Sn, RuntimeSessionHandle as St, EMPTY_USER_PROFILE as T, extractUiSpecEvents as Tn, ScriptExecutionContext as Tt, InteractLifecycleData as U, partsToText as Un, TerminalLifecycleData as Ut, InstalledSkillManifest as V, parseBridgeRequest as Vn, SkillStateGuard as Vt, LifecycleEvent as W, readBehaviorRecords as Wn, TextualToolContent as Wt, OpenAiCompatibleClient as X, sampleBehaviorRecords as Xn, TraceClock as Xt, NetworkPolicy as Y, resolveToolName as Yn, ToolResult as Yt, OpenAiCompatibleClientConfig as Z, schemaSourceLabel as Zn, TraceEvent as Zt, BridgeCapabilities as _, bridgeError as _n, RunTraceStore as _t, ActivateLifecycleData as a, UnsupportedRunSnapshot as an, toVercelToolSpecs as ar, RouteLifecycleData as at, BridgeResponse as b, createWebSkillApi as bn, RuntimeRun as bt, AgentLoopDeps as c, UserProfileExport as cn, RunResult as ct, ApprovalDecision as d, VercelToolSpec as dn, RunSnapshotStore as dt, USER_PROFILE_EXPORT_VERSION as en, sealToolCallPairs as er, READ_SKILL_FILE_TOOL as et, ApprovalScope as f, WebSkillApi as fn, RunTerminationReason as ft, BehaviorScene as g, applyUserProfileImport as gn, RunTraceMetrics as gt, BehaviorRecordKind as h, appendBehaviorRecords as hn, RunTraceFilter as ht, ASK_USER_TOOL_NAME as i, USER_PROFILE_REFINE_PROMPT as in, toRecordDigests as ir, RefineUserProfileInput as it, FsArtifactStore as j, isNetworkAllowed as jn, SessionListPage as jt, ExternalToolSource as k, fromVercelStreamPart as kn, SealResult as kt, AnthropicClient as l, UserProfileImportDiff as ln, RunSnapshot as lt, BehaviorRecord as m, WebSkillRuntimeDeps as mn, RunTraceFile as mt, ASK_USER_INPUT_SCHEMA as n, USER_PROFILE_NO_INVENTION_RULE as nn, textParts as nr, RUN_SNAPSHOT_SCHEMA_VERSION as nt, AgentLoop as o, UserProfile as on, validateUiSpecEvent as or, RouteResult as ot, BEHAVIOR_RECORDS_KEY as p, WebSkillRuntime as pn, RunToolCall as pt, LifecycleHookContext as q, refineUserProfile as qn, ToolDefinition as qt, ASK_USER_TOOL as r, USER_PROFILE_PROMPT_HEADER as rn, toLlmToolSpec as rr, RUN_TRACE_SCHEMA_VERSION as rt, AgentLoopConfig as s, UserProfileEntry as sn, validateUiSpecNode as sr, RunLimitErrorDetails as st, ALLOWED_TOOLS_EXCLUSION_REASON as t, USER_PROFILE_KEY as tn, summarizeToolCalls as tr, READ_SKILL_FILE_TOOL_NAME as tt, AnthropicClientConfig as u, UserProfileLimits as un, RunSnapshotListEntry as ut, BridgeCapability as v, buildRenderResult as vn, RunTraceSummary as vt, DEFAULT_USER_PROFILE_LIMITS as w, extractTodoTraceEvents as wn, SchemaInferer as wt, CapabilityApproval as x, diffUserProfile as xn, RuntimeSession as xt, BridgeRequest as y, createScriptContext as yn, RuntimePhase as yt, HookRunner as z, normalizeToolContent as zn, SkillScriptDescriptor as zt };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,11 @@
1
- import { $ as SkillCatalog, A as ArchiveLimits, At as escapeXml, B as MemoryFS, Bt as readSkillSignature, C as UiSpecDrafts, Ct as assertSafePathSegment, D as UiSurfaceActionRequest, Dt as checkDependencyCycles, E as UiSpecSnapshot, Et as buildManifest, F as FileStat, Ft as messageOf, G as SKILLS_LOCKFILE, Gt as signSkill, H as PageQuery, Ht as renderCatalogJson, I as FileSystemProvider, It as normalizePath, J as SKILL_NAME_PATTERN, Jt as validateSkills, K as SKILL_MANIFEST_FILE, Kt as signaturePayloadBytes, L as FsTrustedKeyStore, Lt as parseSkillMarkdown, M as CryptoKeyLike, Mt as isValidSkillName, N as DEFAULT_ARCHIVE_LIMITS, Nt as jsonRenderer, O as UiSurfaceActionResponse, Ot as checkSkillRules, P as DiscoveryResult, Pt as keyIdOf, Q as SignatureVerdict, R as JsonSchema, Rt as parseSkillPackManifest, S as UiSpecActionCapability, St as assertRemoteUrlAllowed, T as UiSpecPatch, Tt as buildCatalog, U as RemoteUrlPolicy, Ut as resolveArchiveLimits, V as Page, Vt as renderAvailableSkillsXml, W as SIGNATURE_SCHEMA_VERSION, Wt as resolveInsideRoot, X as SKILL_SIGNATURE_FILE, Xt as verifySkillSignature, Y as SKILL_PACK_FILE, Yt as verifyManifest, Z as SignatureAuditSink, Zt as xmlRenderer, _ as MemoryStore, _t as UnsignedPolicy, a as InteractionOrigin, at as SkillLocation, b as SkillCandidateMarker, bt as WebSkillError, c as InteractionResponse, ct as SkillMetadata, d as LlmContentPart, dt as SkillSignature, et as SkillCatalogEntry, f as LlmMessage, ft as SkillSource, g as LlmToolSpec, gt as UiSpecNode, h as LlmToolCall, ht as TrustedKeyStore, i as FormField, it as SkillIssue, j as CatalogRenderer, jt as exportSkills, k as extractSkillCandidate, kt as computeDigest, l as LlmClient, lt as SkillPackManifest, m as LlmStreamEvent, mt as TrustedKey, n as ArtifactStore, nt as SkillDocument, o as InteractionPolicy, ot as SkillManagerPort, p as LlmResponse, pt as SkillsLockfile, q as SKILL_NAME_MAX_LENGTH, qt as unzipWithLimits, r as ChartSpec, rt as SkillInstallSource, s as InteractionRequest, st as SkillManifest, t as Artifact, tt as SkillDiscovery, u as LlmCompleteInput, ut as SkillReader, v as RenderBlock, vt as ValidationReport, w as UiSpecEvent, wt as atomicWriteText, x as UiBridge, xt as WebSkillErrorCode, y as RenderResultRequest, yt as VerifyResult, z as MANIFEST_EXCLUDED_FILES, zt as readResponseWithLimit } from "./types-CcxRLdJG-DCXyw1US.js";
2
- import { $ as READ_SKILL_FILE_INPUT_SCHEMA, $n as validateUiSpecEvent, $t as USER_PROFILE_NO_INVENTION_RULE, A as FS_SESSION_PAGE_SIZE, An as networkPolicyLibSource, At as SessionRecord, B as HookRunnerOptions, Bn as readUserProfile, Bt as TerminalLifecycleData, C as DEFAULT_LOOP_LIMITS, Cn as fromVercelResult, Ct as SESSION_SCHEMA_VERSION, D as ExecuteLifecycleData, Dn as listSkillScripts, Dt as SerializingMemoryStore, E as EventBus, En as isUnsupportedRunSnapshot, Et as ScriptExecutor, F as FsSessionStore, Fn as parseBridgeRequest, Ft as SkillRouter, G as LifecycleEventInit, Gn as schemaSourceLabel, Gt as ToolResolution, H as IntegrityVerdict, Hn as renderUserProfileContext, Ht as TodoTraceEvent, I as FullDisclosureRouter, In as parseUserProfileExport, It as SkillScriptDescriptor, J as LifecycleListener, Jn as summarizeToolCalls, Jt as TraceEvent, K as LifecycleHook, Kn as schemaToForm, Kt as ToolResult, L as GoogleGenAiClient, Ln as partsToText, Lt as SkillScriptSchemaSource, M as FsMemoryStore, Mn as normalizeErrorCode, Mt as SkillFailureReport, N as FsRunSnapshotStore, Nn as normalizeToolContent, Nt as SkillIntegrityGuard, O as ExternalSkillProvider, On as mergeCatalogEntries, Ot as SessionListPage, P as FsRunTraceStore, Pn as normalizeToolError, Pt as SkillOutcomeReporter, Q as ProgressiveRouter, Qn as toVercelToolSpecs, Qt as USER_PROFILE_KEY, R as GoogleGenAiClientConfig, Rn as readBehaviorRecords, Rt as SkillStateGuard, S as CapabilityMode, Sn as formatSkillScriptManifest, St as RuntimeSessionHandle, T as EMPTY_USER_PROFILE, Tn as isNetworkAllowed, Tt as ScriptExecutionContext, U as InteractLifecycleData, Un as resolveToolName, Ut as ToolContent, V as InstalledSkillManifest, Vn as refineUserProfile, Vt as TextualToolContent, W as LifecycleEvent, Wn as sampleBehaviorRecords, Wt as ToolDefinition, X as OpenAiCompatibleClient, Xn as toLlmToolSpec, Xt as TraceRecorder, Y as NetworkPolicy, Yn as textParts, Yt as TraceEventType, Z as OpenAiCompatibleClientConfig, Zn as toRecordDigests, Zt as USER_PROFILE_EXPORT_VERSION, _ as BridgeCapabilities, _n as diffUserProfile, _t as RunTraceStore, a as ActivateLifecycleData, an as UserProfileExport, at as RouteLifecycleData, b as BridgeResponse, bn as extractTodoTraceEvents, bt as RuntimeRun, c as AgentLoopDeps, cn as WebSkillApi, ct as RunResult, d as ApprovalDecision, dn as appendBehaviorRecords, dt as RunSnapshotStore, en as USER_PROFILE_PROMPT_HEADER, er as validateUiSpecNode, et as READ_SKILL_FILE_TOOL, f as ApprovalScope, fn as applyUserProfileImport, ft as RunTerminationReason, g as BehaviorScene, gn as createWebSkillApi, gt as RunTraceMetrics, h as BehaviorRecordKind, hn as createScriptContext, ht as RunTraceFilter, i as ASK_USER_TOOL_NAME, in as UserProfileEntry, it as RefineUserProfileInput, j as FsArtifactStore, jn as networkUrlHost, jt as SessionStore, k as ExternalToolSource, kn as mergeProfileEntries, kt as SessionMeta, l as AnthropicClient, ln as WebSkillRuntime, lt as RunSnapshot, m as BehaviorRecord, mn as buildRenderResult, mt as RunTraceFile, n as ASK_USER_INPUT_SCHEMA, nn as UnsupportedRunSnapshot, nt as RUN_SNAPSHOT_SCHEMA_VERSION, o as AgentLoop, on as UserProfileLimits, ot as RouteResult, p as BEHAVIOR_RECORDS_KEY, pn as bridgeError, pt as RunToolCall, q as LifecycleHookContext, qn as scriptToolName, qt as TraceClock, r as ASK_USER_TOOL, rn as UserProfile, rt as RUN_TRACE_SCHEMA_VERSION, s as AgentLoopConfig, sn as VercelToolSpec, st as RunLimitErrorDetails, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as USER_PROFILE_REFINE_PROMPT, tt as READ_SKILL_FILE_TOOL_NAME, u as AnthropicClientConfig, un as WebSkillRuntimeDeps, ut as RunSnapshotListEntry, v as BridgeCapability, vn as exportUserProfile, vt as RunTraceSummary, w as DEFAULT_USER_PROFILE_LIMITS, wn as fromVercelStreamPart, wt as SchemaInferer, x as CapabilityApproval, xn as extractUiSpecEvents, xt as RuntimeSession, y as BridgeRequest, yn as extractChartSpec, yt as RuntimePhase, z as HookRunner, zn as readProfileEntries, zt as SkillSuccessReport } from "./index-DkbABR43.js";
3
- export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, BEHAVIOR_RECORDS_KEY, type BehaviorRecord, type BehaviorRecordKind, type BehaviorScene, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, type DiscoveryResult, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionOrigin, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RefineUserProfileInput, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunLimitErrorDetails, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillCandidateMarker, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillSuccessReport, type SkillsLockfile, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolContent, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type UserProfile, type UserProfileEntry, type UserProfileExport, type UserProfileLimits, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
1
+ import { $ as SignatureVerdict, $t as stripArchiveRoot, A as ATOMIC_TMP_SUFFIX_PATTERN, At as checkDependencyCycles, B as MANIFEST_EXCLUDED_FILES, Bt as keyIdOf, C as UiSpecDrafts, Ct as WebSkillError, D as UiSurfaceActionRequest, Dt as atomicWriteText, E as UiSpecSnapshot, Et as assertSafePathSegment, F as DiscoveryResult, Ft as escapeXml, G as SIGNATURE_SCHEMA_VERSION, Gt as readResponseWithLimit, H as Page, Ht as normalizePath, I as FileStat, It as exportSkills, J as SKILL_NAME_MAX_LENGTH, Jt as renderCatalogJson, K as SKILLS_LOCKFILE, Kt as readSkillSignature, L as FileSystemProvider, Lt as isAtomicTempPath, M as CatalogRenderer, Mt as computeDigest, N as CryptoKeyLike, Nt as detectSkillArchiveShape, O as UiSurfaceActionResponse, Ot as buildCatalog, P as DEFAULT_ARCHIVE_LIMITS, Pt as detectSkillArchiveShapeFromFs, Q as SignatureAuditSink, Qt as signaturePayloadBytes, R as FsTrustedKeyStore, Rt as isValidSkillName, S as UiSpecActionCapability, St as VerifyResult, T as UiSpecPatch, Tt as assertRemoteUrlAllowed, U as PageQuery, Ut as parseSkillMarkdown, V as MemoryFS, Vt as messageOf, W as RemoteUrlPolicy, Wt as parseSkillPackManifest, X as SKILL_PACK_FILE, Xt as resolveInsideRoot, Y as SKILL_NAME_PATTERN, Yt as resolveArchiveLimits, Z as SKILL_SIGNATURE_FILE, Zt as signSkill, _ as MemoryStore, _t as TrustedKey, a as InteractionOrigin, at as SkillDocument, b as SkillCandidateMarker, bt as UnsignedPolicy, c as InteractionResponse, ct as SkillLocation, d as LlmContentPart, dt as SkillMetadata, en as unzipWithLimits, et as SkillArchiveDetection, f as LlmMessage, ft as SkillPackManifest, g as LlmToolSpec, gt as SkillsLockfile, h as LlmToolCall, ht as SkillSource, i as FormField, in as xmlRenderer, it as SkillDiscovery, j as ArchiveLimits, jt as checkSkillRules, k as extractSkillCandidate, kt as buildManifest, l as LlmClient, lt as SkillManagerPort, m as LlmStreamEvent, mt as SkillSignature, n as ArtifactStore, nn as verifyManifest, nt as SkillCatalog, o as InteractionPolicy, ot as SkillInstallSource, p as LlmResponse, pt as SkillReader, q as SKILL_MANIFEST_FILE, qt as renderAvailableSkillsXml, r as ChartSpec, rn as verifySkillSignature, rt as SkillCatalogEntry, s as InteractionRequest, st as SkillIssue, t as Artifact, tn as validateSkills, tt as SkillArchiveShape, u as LlmCompleteInput, ut as SkillManifest, v as RenderBlock, vt as TrustedKeyStore, w as UiSpecEvent, wt as WebSkillErrorCode, x as UiBridge, xt as ValidationReport, y as RenderResultRequest, yt as UiSpecNode, z as JsonSchema, zt as jsonRenderer } from "./types-B3n0cMZu-BDhheIhX.js";
2
+ import { $ as READ_SKILL_FILE_INPUT_SCHEMA, $n as scriptToolName, $t as TraceRecorder, A as FS_SESSION_PAGE_SIZE, An as interruptedToolResult, At as SerializingMemoryStore, B as HookRunnerOptions, Bn as normalizeToolError, Bt as SkillScriptSchemaSource, C as DEFAULT_LOOP_LIMITS, Cn as extractChartSpec, Ct as SESSION_SCHEMA_VERSION, D as ExecuteLifecycleData, Dn as formatSkillScriptManifest, Dt as SealOptions, E as EventBus, En as findUnpairedToolCalls, Et as ScriptExecutor, F as FsSessionStore, Fn as mergeProfileEntries, Ft as SkillFailureReport, G as LifecycleEventInit, Gn as readProfileEntries, Gt as TodoTraceEvent, H as IntegrityVerdict, Hn as parseUserProfileExport, Ht as SkillSuccessReport, I as FullDisclosureRouter, In as networkPolicyLibSource, It as SkillIntegrityGuard, J as LifecycleListener, Jn as renderUserProfileContext, Jt as ToolResolution, K as LifecycleHook, Kn as readUserProfile, Kt as ToolContent, L as GoogleGenAiClient, Ln as networkUrlHost, Lt as SkillOutcomeReporter, M as FsMemoryStore, Mn as isUnsupportedRunSnapshot, Mt as SessionMeta, N as FsRunSnapshotStore, Nn as listSkillScripts, Nt as SessionRecord, O as ExternalSkillProvider, On as fromVercelResult, Ot as SealRecord, P as FsRunTraceStore, Pn as mergeCatalogEntries, Pt as SessionStore, Q as ProgressiveRouter, Qn as schemaToForm, Qt as TraceEventType, R as GoogleGenAiClientConfig, Rn as normalizeErrorCode, Rt as SkillRouter, S as CapabilityMode, Sn as exportUserProfile, St as RuntimeSessionHandle, T as EMPTY_USER_PROFILE, Tn as extractUiSpecEvents, Tt as ScriptExecutionContext, U as InteractLifecycleData, Un as partsToText, Ut as TerminalLifecycleData, V as InstalledSkillManifest, Vn as parseBridgeRequest, Vt as SkillStateGuard, W as LifecycleEvent, Wn as readBehaviorRecords, Wt as TextualToolContent, X as OpenAiCompatibleClient, Xn as sampleBehaviorRecords, Xt as TraceClock, Y as NetworkPolicy, Yn as resolveToolName, Yt as ToolResult, Z as OpenAiCompatibleClientConfig, Zn as schemaSourceLabel, Zt as TraceEvent, _ as BridgeCapabilities, _n as bridgeError, _t as RunTraceStore, a as ActivateLifecycleData, an as UnsupportedRunSnapshot, ar as toVercelToolSpecs, at as RouteLifecycleData, b as BridgeResponse, bn as createWebSkillApi, bt as RuntimeRun, c as AgentLoopDeps, cn as UserProfileExport, ct as RunResult, d as ApprovalDecision, dn as VercelToolSpec, dt as RunSnapshotStore, en as USER_PROFILE_EXPORT_VERSION, er as sealToolCallPairs, et as READ_SKILL_FILE_TOOL, f as ApprovalScope, fn as WebSkillApi, ft as RunTerminationReason, g as BehaviorScene, gn as applyUserProfileImport, gt as RunTraceMetrics, h as BehaviorRecordKind, hn as appendBehaviorRecords, ht as RunTraceFilter, i as ASK_USER_TOOL_NAME, in as USER_PROFILE_REFINE_PROMPT, ir as toRecordDigests, it as RefineUserProfileInput, j as FsArtifactStore, jn as isNetworkAllowed, jt as SessionListPage, k as ExternalToolSource, kn as fromVercelStreamPart, kt as SealResult, l as AnthropicClient, ln as UserProfileImportDiff, lt as RunSnapshot, m as BehaviorRecord, mn as WebSkillRuntimeDeps, mt as RunTraceFile, n as ASK_USER_INPUT_SCHEMA, nn as USER_PROFILE_NO_INVENTION_RULE, nr as textParts, nt as RUN_SNAPSHOT_SCHEMA_VERSION, o as AgentLoop, on as UserProfile, or as validateUiSpecEvent, ot as RouteResult, p as BEHAVIOR_RECORDS_KEY, pn as WebSkillRuntime, pt as RunToolCall, q as LifecycleHookContext, qn as refineUserProfile, qt as ToolDefinition, r as ASK_USER_TOOL, rn as USER_PROFILE_PROMPT_HEADER, rr as toLlmToolSpec, rt as RUN_TRACE_SCHEMA_VERSION, s as AgentLoopConfig, sn as UserProfileEntry, sr as validateUiSpecNode, st as RunLimitErrorDetails, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as USER_PROFILE_KEY, tr as summarizeToolCalls, tt as READ_SKILL_FILE_TOOL_NAME, u as AnthropicClientConfig, un as UserProfileLimits, ut as RunSnapshotListEntry, v as BridgeCapability, vn as buildRenderResult, vt as RunTraceSummary, w as DEFAULT_USER_PROFILE_LIMITS, wn as extractTodoTraceEvents, wt as SchemaInferer, x as CapabilityApproval, xn as diffUserProfile, xt as RuntimeSession, y as BridgeRequest, yn as createScriptContext, yt as RuntimePhase, z as HookRunner, zn as normalizeToolContent, zt as SkillScriptDescriptor } from "./index-znZjobkr.js";
3
+ //#region src/version.d.ts
4
+ /** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
5
+ /**
6
+ * Version of the published `@webskill/sdk` package, injected at build time.
7
+ * @stable
8
+ */
9
+ declare const SDK_VERSION = "0.9.0";
10
+ //#endregion
11
+ export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, BEHAVIOR_RECORDS_KEY, type BehaviorRecord, type BehaviorRecordKind, type BehaviorScene, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, type DiscoveryResult, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionOrigin, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RefineUserProfileInput, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunLimitErrorDetails, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SDK_VERSION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, type SealOptions, type SealRecord, type SealResult, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillArchiveDetection, type SkillArchiveShape, type SkillCandidateMarker, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillSuccessReport, type SkillsLockfile, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolContent, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type UserProfile, type UserProfileEntry, type UserProfileExport, type UserProfileImportDiff, type UserProfileLimits, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
package/dist/index.js CHANGED
@@ -1,5 +1,14 @@
1
- import { A as parseSkillMarkdown, B as unzipWithLimits, C as escapeXml, D as keyIdOf, E as jsonRenderer, F as renderCatalogJson, H as verifyManifest, I as resolveArchiveLimits, L as resolveInsideRoot, M as readResponseWithLimit, N as readSkillSignature, O as messageOf, P as renderAvailableSkillsXml, R as signSkill, S as computeDigest, T as isValidSkillName, U as verifySkillSignature, V as validateSkills, W as xmlRenderer, _ as atomicWriteText, a as SIGNATURE_SCHEMA_VERSION, b as checkDependencyCycles, c as SKILL_NAME_MAX_LENGTH, d as SKILL_SIGNATURE_FILE, f as SkillDiscovery, g as assertSafePathSegment, h as assertRemoteUrlAllowed, i as MemoryFS, j as parseSkillPackManifest, k as normalizePath, l as SKILL_NAME_PATTERN, m as WebSkillError, n as FsTrustedKeyStore, o as SKILLS_LOCKFILE, p as SkillReader, r as MANIFEST_EXCLUDED_FILES, s as SKILL_MANIFEST_FILE, t as DEFAULT_ARCHIVE_LIMITS, u as SKILL_PACK_FILE, v as buildCatalog, w as exportSkills, x as checkSkillRules, y as buildManifest, z as signaturePayloadBytes } from "./dist-8oQRa8Xz.js";
2
- import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-BMPYwvoy.js";
3
- import { $ as isNetworkAllowed, A as SerializingMemoryStore, B as bridgeError, C as ProgressiveRouter, Ct as toRecordDigests, D as RUN_SNAPSHOT_SCHEMA_VERSION, E as READ_SKILL_FILE_TOOL_NAME, Et as validateUiSpecNode, F as USER_PROFILE_PROMPT_HEADER, G as exportUserProfile, H as createScriptContext, I as USER_PROFILE_REFINE_PROMPT, J as extractTodoTraceEvents, K as extractChartSpec, L as WebSkillRuntime, M as USER_PROFILE_EXPORT_VERSION, N as USER_PROFILE_KEY, O as RUN_TRACE_SCHEMA_VERSION, P as USER_PROFILE_NO_INVENTION_RULE, Q as fromVercelStreamPart, R as appendBehaviorRecords, S as OpenAiCompatibleClient, St as toLlmToolSpec, T as READ_SKILL_FILE_TOOL, Tt as validateUiSpecEvent, U as createWebSkillApi, V as buildRenderResult, W as diffUserProfile, X as formatSkillScriptManifest, Y as extractUiSpecEvents, Z as fromVercelResult, _ as FsRunTraceStore, _t as sampleBehaviorRecords, a as AgentLoop, at as networkUrlHost, b as GoogleGenAiClient, bt as scriptToolName, c as CapabilityApproval, ct as normalizeToolError, d as EMPTY_USER_PROFILE, dt as readBehaviorRecords, et as isUnsupportedRunSnapshot, f as EventBus, ft as readProfileEntries, g as FsRunSnapshotStore, gt as resolveToolName, h as FsMemoryStore, ht as renderUserProfileContext, i as ASK_USER_TOOL_NAME, it as networkPolicyLibSource, j as TraceRecorder, k as SESSION_SCHEMA_VERSION, l as DEFAULT_LOOP_LIMITS, lt as parseBridgeRequest, m as FsArtifactStore, mt as refineUserProfile, n as ASK_USER_INPUT_SCHEMA, nt as mergeCatalogEntries, o as AnthropicClient, ot as normalizeErrorCode, p as FS_SESSION_PAGE_SIZE, pt as readUserProfile, q as extractSkillCandidate, r as ASK_USER_TOOL, rt as mergeProfileEntries, s as BEHAVIOR_RECORDS_KEY, st as normalizeToolContent, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as listSkillScripts, u as DEFAULT_USER_PROFILE_LIMITS, ut as parseUserProfileExport, v as FsSessionStore, vt as schemaSourceLabel, w as READ_SKILL_FILE_INPUT_SCHEMA, wt as toVercelToolSpecs, x as HookRunner, xt as summarizeToolCalls, y as FullDisclosureRouter, yt as schemaToForm, z as applyUserProfileImport } from "./dist-D0qW6e40.js";
1
+ import { A as jsonRenderer, B as resolveArchiveLimits, C as computeDigest, D as exportSkills, E as escapeXml, F as parseSkillPackManifest, G as unzipWithLimits, H as signSkill, I as readResponseWithLimit, J as verifySkillSignature, K as validateSkills, L as readSkillSignature, M as messageOf, N as normalizePath, O as isAtomicTempPath, P as parseSkillMarkdown, R as renderAvailableSkillsXml, S as checkSkillRules, T as detectSkillArchiveShapeFromFs, U as signaturePayloadBytes, V as resolveInsideRoot, W as stripArchiveRoot, Y as xmlRenderer, _ as assertSafePathSegment, a as MemoryFS, b as buildManifest, c as SKILL_MANIFEST_FILE, d as SKILL_PACK_FILE, f as SKILL_SIGNATURE_FILE, g as assertRemoteUrlAllowed, h as WebSkillError, i as MANIFEST_EXCLUDED_FILES, j as keyIdOf, k as isValidSkillName, l as SKILL_NAME_MAX_LENGTH, m as SkillReader, n as DEFAULT_ARCHIVE_LIMITS, o as SIGNATURE_SCHEMA_VERSION, p as SkillDiscovery, q as verifyManifest, r as FsTrustedKeyStore, s as SKILLS_LOCKFILE, t as ATOMIC_TMP_SUFFIX_PATTERN, u as SKILL_NAME_PATTERN, v as atomicWriteText, w as detectSkillArchiveShape, x as checkDependencyCycles, y as buildCatalog, z as renderCatalogJson } from "./dist-Bev6i6Ip.js";
2
+ import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-LbCQaqyx.js";
3
+ import { $ as fromVercelStreamPart, A as SerializingMemoryStore, B as bridgeError, C as ProgressiveRouter, Ct as sealToolCallPairs, D as RUN_SNAPSHOT_SCHEMA_VERSION, Dt as toVercelToolSpecs, E as READ_SKILL_FILE_TOOL_NAME, Et as toRecordDigests, F as USER_PROFILE_PROMPT_HEADER, G as exportUserProfile, H as createScriptContext, I as USER_PROFILE_REFINE_PROMPT, J as extractTodoTraceEvents, K as extractChartSpec, L as WebSkillRuntime, M as USER_PROFILE_EXPORT_VERSION, N as USER_PROFILE_KEY, O as RUN_TRACE_SCHEMA_VERSION, Ot as validateUiSpecEvent, P as USER_PROFILE_NO_INVENTION_RULE, Q as fromVercelResult, R as appendBehaviorRecords, S as OpenAiCompatibleClient, St as scriptToolName, T as READ_SKILL_FILE_TOOL, Tt as toLlmToolSpec, U as createWebSkillApi, V as buildRenderResult, W as diffUserProfile, X as findUnpairedToolCalls, Y as extractUiSpecEvents, Z as formatSkillScriptManifest, _ as FsRunTraceStore, _t as renderUserProfileContext, a as AgentLoop, at as mergeProfileEntries, b as GoogleGenAiClient, bt as schemaSourceLabel, c as CapabilityApproval, ct as normalizeErrorCode, d as EMPTY_USER_PROFILE, dt as parseBridgeRequest, et as interruptedToolResult, f as EventBus, ft as parseUserProfileExport, g as FsRunSnapshotStore, gt as refineUserProfile, h as FsMemoryStore, ht as readUserProfile, i as ASK_USER_TOOL_NAME, it as mergeCatalogEntries, j as TraceRecorder, k as SESSION_SCHEMA_VERSION, kt as validateUiSpecNode, l as DEFAULT_LOOP_LIMITS, lt as normalizeToolContent, m as FsArtifactStore, mt as readProfileEntries, n as ASK_USER_INPUT_SCHEMA, nt as isUnsupportedRunSnapshot, o as AnthropicClient, ot as networkPolicyLibSource, p as FS_SESSION_PAGE_SIZE, pt as readBehaviorRecords, q as extractSkillCandidate, r as ASK_USER_TOOL, rt as listSkillScripts, s as BEHAVIOR_RECORDS_KEY, st as networkUrlHost, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as isNetworkAllowed, u as DEFAULT_USER_PROFILE_LIMITS, ut as normalizeToolError, v as FsSessionStore, vt as resolveToolName, w as READ_SKILL_FILE_INPUT_SCHEMA, wt as summarizeToolCalls, x as HookRunner, xt as schemaToForm, y as FullDisclosureRouter, yt as sampleBehaviorRecords, z as applyUserProfileImport } from "./dist-CFmkV45C.js";
4
4
 
5
- export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, EMPTY_USER_PROFILE, EventBus, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MANIFEST_EXCLUDED_FILES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SerializingMemoryStore, SkillDiscovery, SkillReader, TraceRecorder, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, WebSkillError, WebSkillRuntime, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, signSkill, signaturePayloadBytes, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
5
+ //#region src/version.ts
6
+ /** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
7
+ /**
8
+ * Version of the published `@webskill/sdk` package, injected at build time.
9
+ * @stable
10
+ */
11
+ const SDK_VERSION = "0.9.0";
12
+
13
+ //#endregion
14
+ export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, EMPTY_USER_PROFILE, EventBus, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MANIFEST_EXCLUDED_FILES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SDK_VERSION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SerializingMemoryStore, SkillDiscovery, SkillReader, TraceRecorder, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, WebSkillError, WebSkillRuntime, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
package/dist/mcp.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as JsonSchema, et as SkillCatalogEntry, g as LlmToolSpec, nt as SkillDocument } from "./types-CcxRLdJG-DCXyw1US.js";
2
- import { Kt as ToolResult, O as ExternalSkillProvider, On as mergeCatalogEntries, k as ExternalToolSource } from "./index-DkbABR43.js";
1
+ import { at as SkillDocument, g as LlmToolSpec, rt as SkillCatalogEntry, z as JsonSchema } from "./types-B3n0cMZu-BDhheIhX.js";
2
+ import { O as ExternalSkillProvider, Pn as mergeCatalogEntries, Yt as ToolResult, k as ExternalToolSource } from "./index-znZjobkr.js";
3
3
  import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
4
4
  import { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -244,7 +244,18 @@ declare class ExperimentalWebMcpAdapter {
244
244
  constructor(api?: BrowserModelContextLike | (() => BrowserModelContextLike | undefined), options?: {
245
245
  enabled?: boolean;
246
246
  });
247
+ /**
248
+ * 宿主能力检测(FR-19.2/19.4):**只**看 `document.modelContext.executeTool` 是否存在,
249
+ * 不含 `enabled` 状态——「未启用」不等于「浏览器不支持」,两者必须可区分。
250
+ * 是否对 LLM 列出工具由 `isEnabled()` 单独把关(McpRuntimePlugin 读它,见测试)。
251
+ */
247
252
  isAvailable(): boolean;
253
+ isEnabled(): boolean;
254
+ /**
255
+ * 宿主把开关交给用户时必须走这里:适配器是工具是否对 LLM 可见的**唯一闸门**。
256
+ * 宿主自己另存一份开关态而不同步到这里,会出现「界面上关了、模型照样能调」。
257
+ */
258
+ setEnabled(on: boolean): void;
248
259
  /** 工具清单(getTools 缺失时返回 undefined;调用失败时告警后返回 undefined) */
249
260
  listTools(): Promise<WebMcpToolDescriptor[] | undefined>;
250
261
  /** 工具名清单(getTools 缺失/失败时返回 undefined) */
package/dist/mcp.js CHANGED
@@ -1,5 +1,5 @@
1
- import { O as messageOf, h as assertRemoteUrlAllowed, m as WebSkillError } from "./dist-8oQRa8Xz.js";
2
- import { nt as mergeCatalogEntries, st as normalizeToolContent } from "./dist-D0qW6e40.js";
1
+ import { M as messageOf, g as assertRemoteUrlAllowed, h as WebSkillError } from "./dist-Bev6i6Ip.js";
2
+ import { it as mergeCatalogEntries, lt as normalizeToolContent } from "./dist-CFmkV45C.js";
3
3
 
4
4
  //#region ../mcp/dist/index.js
5
5
  /**
@@ -441,9 +441,23 @@ var ExperimentalWebMcpAdapter = class {
441
441
  this.#resolveApi = typeof api === "function" ? api : () => api;
442
442
  this.#enabled = options?.enabled ?? false;
443
443
  }
444
+ /**
445
+ * 宿主能力检测(FR-19.2/19.4):**只**看 `document.modelContext.executeTool` 是否存在,
446
+ * 不含 `enabled` 状态——「未启用」不等于「浏览器不支持」,两者必须可区分。
447
+ * 是否对 LLM 列出工具由 `isEnabled()` 单独把关(McpRuntimePlugin 读它,见测试)。
448
+ */
444
449
  isAvailable() {
445
- const api = this.#resolveApi();
446
- return this.#enabled && typeof api?.executeTool === "function";
450
+ return typeof this.#resolveApi()?.executeTool === "function";
451
+ }
452
+ isEnabled() {
453
+ return this.#enabled;
454
+ }
455
+ /**
456
+ * 宿主把开关交给用户时必须走这里:适配器是工具是否对 LLM 可见的**唯一闸门**。
457
+ * 宿主自己另存一份开关态而不同步到这里,会出现「界面上关了、模型照样能调」。
458
+ */
459
+ setEnabled(on) {
460
+ this.#enabled = on;
447
461
  }
448
462
  /** 工具清单(getTools 缺失时返回 undefined;调用失败时告警后返回 undefined) */
449
463
  async listTools() {
@@ -523,7 +537,7 @@ var McpRuntimePlugin = class {
523
537
  } catch (e) {
524
538
  this.#onWarning(`[webskill] MCP endpoint "${endpoint}" is unavailable; its tools are omitted from this turn: ${e instanceof Error ? e.message : String(e)}`);
525
539
  }
526
- if (this.#webMcp?.isAvailable()) {
540
+ if (this.#webMcp?.isEnabled()) {
527
541
  const tools = await this.#webMcp.listTools();
528
542
  for (const tool of tools ?? []) specs.push({
529
543
  name: webMcpToolLlmName(tool.name),
@@ -1,4 +1,4 @@
1
- import { m as WebSkillError } from "./dist-8oQRa8Xz.js";
1
+ import { h as WebSkillError } from "./dist-Bev6i6Ip.js";
2
2
 
3
3
  //#region ../runtime/dist/memoryArtifactStore-52Zn9npI.js
4
4
  /** 纯文本消息内容的构造快捷方式(引擎内部绝大多数消息仍是纯文本) */
package/dist/node.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { A as ArchiveLimits, F as FileStat, G as SKILLS_LOCKFILE, I as FileSystemProvider, K as SKILL_MANIFEST_FILE, R as JsonSchema, Z as SignatureAuditSink, _t as UnsignedPolicy, c as InteractionResponse, ht as TrustedKeyStore, ot as SkillManagerPort, pt as SkillsLockfile, rt as SkillInstallSource, s as InteractionRequest, st as SkillManifest, x as UiBridge, y as RenderResultRequest, yt as VerifyResult } from "./types-CcxRLdJG-DCXyw1US.js";
2
- import { Et as ScriptExecutor, Kt as ToolResult, M as FsMemoryStore, Tt as ScriptExecutionContext, Wt as ToolDefinition, Y as NetworkPolicy, _ as BridgeCapabilities, f as ApprovalScope, hn as createScriptContext, j as FsArtifactStore, ln as WebSkillRuntime, un as WebSkillRuntimeDeps, wt as SchemaInferer } from "./index-DkbABR43.js";
3
- import { a as AuditLog, p as CandidateStore, r as ApprovalPolicy, u as CandidateSkill, v as SkillVersionStore } from "./skillVersionStore-Bl-ElD45-CWPvGvoq.js";
1
+ import { I as FileStat, K as SKILLS_LOCKFILE, L as FileSystemProvider, Q as SignatureAuditSink, St as VerifyResult, bt as UnsignedPolicy, c as InteractionResponse, gt as SkillsLockfile, j as ArchiveLimits, lt as SkillManagerPort, ot as SkillInstallSource, q as SKILL_MANIFEST_FILE, s as InteractionRequest, ut as SkillManifest, vt as TrustedKeyStore, x as UiBridge, y as RenderResultRequest, z as JsonSchema } from "./types-B3n0cMZu-BDhheIhX.js";
2
+ import { Et as ScriptExecutor, M as FsMemoryStore, Tt as ScriptExecutionContext, Y as NetworkPolicy, Yt as ToolResult, _ as BridgeCapabilities, f as ApprovalScope, j as FsArtifactStore, mn as WebSkillRuntimeDeps, pn as WebSkillRuntime, qt as ToolDefinition, wt as SchemaInferer, yn as createScriptContext } from "./index-znZjobkr.js";
3
+ import { a as AuditLog, p as CandidateStore, r as ApprovalPolicy, u as CandidateSkill, v as SkillVersionStore } from "./skillVersionStore-Bl-ElD45-dMJ8Ybhb.js";
4
4
  import { n as LlmEnvConfig, s as probeLlmCapabilities, t as LlmCapabilities } from "./env-AK3cSMEA-Dli6QU5E.js";
5
5
  import { Readable, Writable } from "node:stream";
6
6
  //#region ../node/dist/index.d.ts
package/dist/node.js CHANGED
@@ -1,7 +1,7 @@
1
- import { A as parseSkillMarkdown, B as unzipWithLimits, H as verifyManifest, I as resolveArchiveLimits, L as resolveInsideRoot, M as readResponseWithLimit, N as readSkillSignature, O as messageOf, T as isValidSkillName, U as verifySkillSignature, V as validateSkills, _ as atomicWriteText, g as assertSafePathSegment, h as assertRemoteUrlAllowed, j as parseSkillPackManifest, m as WebSkillError, o as SKILLS_LOCKFILE, r as MANIFEST_EXCLUDED_FILES, s as SKILL_MANIFEST_FILE, u as SKILL_PACK_FILE, w as exportSkills, y as buildManifest } from "./dist-8oQRa8Xz.js";
2
- import { B as bridgeError, H as createScriptContext, L as WebSkillRuntime, c as CapabilityApproval, ct as normalizeToolError, h as FsMemoryStore, it as networkPolicyLibSource, lt as parseBridgeRequest, m as FsArtifactStore, st as normalizeToolContent } from "./dist-D0qW6e40.js";
1
+ import { B as resolveArchiveLimits, D as exportSkills, F as parseSkillPackManifest, G as unzipWithLimits, I as readResponseWithLimit, J as verifySkillSignature, K as validateSkills, L as readSkillSignature, M as messageOf, O as isAtomicTempPath, P as parseSkillMarkdown, V as resolveInsideRoot, _ as assertSafePathSegment, b as buildManifest, c as SKILL_MANIFEST_FILE, d as SKILL_PACK_FILE, g as assertRemoteUrlAllowed, h as WebSkillError, i as MANIFEST_EXCLUDED_FILES, k as isValidSkillName, q as verifyManifest, s as SKILLS_LOCKFILE, v as atomicWriteText } from "./dist-Bev6i6Ip.js";
2
+ import { B as bridgeError, H as createScriptContext, L as WebSkillRuntime, c as CapabilityApproval, dt as parseBridgeRequest, h as FsMemoryStore, lt as normalizeToolContent, m as FsArtifactStore, ot as networkPolicyLibSource, ut as normalizeToolError } from "./dist-CFmkV45C.js";
3
3
  import { i as probeLlmCapabilities } from "./env-8cY40DXB-CGnEVZby.js";
4
- import { t as AUDIT_EVENT_TYPES } from "./eventTypes-DjIQpt8Y-Bj3vghj4.js";
4
+ import { t as AUDIT_EVENT_TYPES } from "./eventTypes-DbOpAECr-BjcjZVms.js";
5
5
  import { createRequire } from "node:module";
6
6
  import { unzipSync, zipSync } from "fflate";
7
7
  import { existsSync, promises, realpathSync } from "node:fs";
@@ -1274,14 +1274,14 @@ async function extractTarFile(archivePath, destRoot, limits) {
1274
1274
  throw new WebSkillError("INSTALL_FAILED", `Failed to extract tar archive: ${messageOf(e)}`, e);
1275
1275
  }
1276
1276
  }
1277
- /** 递归列出目录内全部文件(相对路径,posix 分隔,不含目录条目) */
1277
+ /** 递归列出目录内全部文件(相对路径,posix 分隔,不含目录条目;原子写中断残留的 `.tmp-*` 不计入) */
1278
1278
  async function listFiles(fs, root, prefix = "") {
1279
1279
  const out = [];
1280
1280
  for (const entry of await fs.list(root)) {
1281
1281
  const name = entry.path.split("/").pop() ?? "";
1282
1282
  const rel = prefix === "" ? name : `${prefix}/${name}`;
1283
1283
  if (entry.type === "directory") out.push(...await listFiles(fs, entry.path, rel));
1284
- else out.push(rel);
1284
+ else if (!isAtomicTempPath(name)) out.push(rel);
1285
1285
  }
1286
1286
  return out;
1287
1287
  }
@@ -2238,7 +2238,7 @@ var ApprovalWorkflow = class {
2238
2238
  const stagingRoot = (await mkdtemp(path.join(tmpdir(), "webskill-candidate-"))).split(path.sep).join("/");
2239
2239
  try {
2240
2240
  const skillDir = `${stagingRoot}/${candidate.name}`;
2241
- for (const file of candidate.files) await this.#fs.writeText(resolveInsideRoot(skillDir, file.path), file.content);
2241
+ for (const file of candidate.files) await atomicWriteText(this.#fs, resolveInsideRoot(skillDir, file.path), file.content);
2242
2242
  const report = await validateSkills(this.#fs, [stagingRoot]);
2243
2243
  if (!report.ok) {
2244
2244
  const errors = report.issues.filter((i) => i.severity === "error");
@@ -1,5 +1,5 @@
1
- import { nt as uiCatalog } from "./dist-DnYG2-eY.js";
2
- import { t as CatalogNode } from "./catalogComponents-Dr5dFMAb-DKH_7VPI.js";
1
+ import { ft as uiCatalog } from "./dist-BQe1uglQ.js";
2
+ import { t as CatalogNode } from "./catalogComponents-DfxxfUvn-T7Ic8QFV.js";
3
3
  import { z } from "zod";
4
4
  import { Component, Fragment, createContext, useCallback, useContext, useEffect, useInsertionEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -3761,7 +3761,7 @@ function Renderer({ response, library, isStreaming = false, onAction, onStateUpd
3761
3761
  const FormValidationContext = createContext(null);
3762
3762
 
3763
3763
  //#endregion
3764
- //#region ../ui-react/dist/openUiLibrary-Bdrji9qK.js
3764
+ //#region ../ui-react/dist/openUiLibrary-DURlAxjk.js
3765
3765
  const propsFor = (props, container) => container ? props.extend({ children: z.array(z.any()).optional() }) : props;
3766
3766
  /**
3767
3767
  * catalog 的 OpenUI 投影:`defineComponent` 复用同一份 zod schema 与描述,
@@ -1,4 +1,4 @@
1
- import { H as PageQuery, I as FileSystemProvider, V as Page, et as SkillCatalogEntry, st as SkillManifest } from "./types-CcxRLdJG-DCXyw1US.js";
1
+ import { H as Page, L as FileSystemProvider, U as PageQuery, rt as SkillCatalogEntry, ut as SkillManifest } from "./types-B3n0cMZu-BDhheIhX.js";
2
2
  //#region ../governance/dist/skillVersionStore-Bl-ElD45.d.ts
3
3
  //#region src/types.d.ts
4
4
  type CandidateStatus = 'draft' | 'pending-review' | 'approved' | 'published' | 'rejected';
@@ -1,5 +1,5 @@
1
- import { m as WebSkillError } from "./dist-8oQRa8Xz.js";
2
- import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-BMPYwvoy.js";
1
+ import { h as WebSkillError } from "./dist-Bev6i6Ip.js";
2
+ import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-LbCQaqyx.js";
3
3
 
4
4
  //#region ../runtime/dist/testing.js
5
5
  /**
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as MemoryStore, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, x as UiBridge } from "./types-CcxRLdJG-DCXyw1US.js";
1
+ import { _ as MemoryStore, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, x as UiBridge } from "./types-B3n0cMZu-BDhheIhX.js";
2
2
  import { a as loadGoogleConfigFromEnv, i as loadAnthropicConfigFromEnv, n as LlmEnvConfig, o as loadLlmConfigFromEnv, r as ProviderEnvConfig } from "./env-AK3cSMEA-Dli6QU5E.js";
3
3
  //#region ../runtime/dist/testing.d.ts
4
4
  //#region src/llm/mockLlmClient.d.ts
package/dist/testing.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as MemoryArtifactStore } from "./memoryArtifactStore-52Zn9npI-BMPYwvoy.js";
1
+ import { t as MemoryArtifactStore } from "./memoryArtifactStore-52Zn9npI-LbCQaqyx.js";
2
2
  import { n as loadGoogleConfigFromEnv, r as loadLlmConfigFromEnv, t as loadAnthropicConfigFromEnv } from "./env-8cY40DXB-CGnEVZby.js";
3
- import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-CYTFqkDm.js";
3
+ import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-Csg5ljNm.js";
4
4
 
5
5
  export { InMemoryStore, MemoryArtifactStore, MockLlmClient, MockUiBridge, loadAnthropicConfigFromEnv, loadGoogleConfigFromEnv, loadLlmConfigFromEnv };