@webskill/sdk 0.1.4 → 0.1.5

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 { A as SkillCatalog, C as JsonSchema, L as SkillManifest, M as SkillDiscovery, N as SkillDocument, P as SkillInstallSource, S as FileSystemProvider, U as ValidationReport, _ as RenderResultRequest, a as InteractionPolicy, b as DiscoveryResult, c as LlmClient, d as LlmResponse, f as LlmStreamEvent, g as RenderBlock, h as MemoryStore, i as FormField, j as SkillCatalogEntry, l as LlmCompleteInput, m as LlmToolSpec, n as ArtifactStore, o as InteractionRequest, r as ChartSpec, t as Artifact, u as LlmMessage, v as UiBridge } from "./types-CgNC-oQu-DYrxhD3z.js";
1
+ import { F as SkillDocument, G as ValidationReport, I as SkillInstallSource, M as SkillCatalog, N as SkillCatalogEntry, P as SkillDiscovery, S as DiscoveryResult, T as JsonSchema, _ as RenderResultRequest, a as InteractionPolicy, c as LlmClient, d as LlmResponse, f as LlmStreamEvent, g as RenderBlock, h as MemoryStore, i as FormField, l as LlmCompleteInput, m as LlmToolSpec, n as ArtifactStore, o as InteractionRequest, r as ChartSpec, t as Artifact, u as LlmMessage, v as UiBridge, w as FileSystemProvider, z as SkillManifest } from "./types-CgNC-oQu-DEcIBJKG.js";
2
2
  //#region ../runtime/dist/index.d.ts
3
3
  //#region src/llm/openAiCompatibleClient.d.ts
4
4
  interface OpenAiCompatibleClientConfig {
@@ -263,6 +263,14 @@ interface AgentLoopConfig {
263
263
  temperature?: number;
264
264
  /** 设为 'off' 时完成 run 不调用 uiBridge.renderResult */
265
265
  renderResult?: 'off';
266
+ /** 工具结果回喂上限(字节,默认 100_000;超长头尾保留 + 完整内容落 artifact) */
267
+ toolResultMaxBytes?: number;
268
+ }
269
+ /** 技能状态拦截 port(治理装配;无注入默认全放行) */
270
+ interface SkillStateGuard {
271
+ canRead?(skillName: string): boolean | Promise<boolean>;
272
+ canActivate?(skillName: string): boolean | Promise<boolean>;
273
+ canExecute?(skillName: string): boolean | Promise<boolean>;
266
274
  }
267
275
  interface RuntimeSession {
268
276
  id: string;
@@ -657,6 +665,8 @@ interface AgentLoopDeps {
657
665
  skillProviders?: ExternalSkillProvider[];
658
666
  /** Catalog 过滤钩子(治理状态拦截路由,如 quarantined/deprecated 过滤) */
659
667
  catalogFilter?: (entries: SkillCatalogEntry[]) => SkillCatalogEntry[] | Promise<SkillCatalogEntry[]>;
668
+ /** 技能状态拦截(read/activate/execute 三入口一致执行;无注入默认全放行) */
669
+ skillStateGuard?: SkillStateGuard;
660
670
  /** D3:interrupt 点快照存储(无配置则行为与现状完全一致) */
661
671
  snapshotStore?: RunSnapshotStore;
662
672
  }
@@ -719,6 +729,8 @@ interface WebSkillRuntimeDeps {
719
729
  }) => Promise<void>;
720
730
  /** D3:interrupt 点快照存储(配置后 interrupted run 可 resumeRun 恢复) */
721
731
  snapshotStore?: RunSnapshotStore;
732
+ /** 技能状态拦截 port(治理 SkillStatePolicy.toSkillStateGuard 装配;无注入默认全放行) */
733
+ skillStateGuard?: SkillStateGuard;
722
734
  }
723
735
  /**
724
736
  * runtime 门面:组合 discovery / router / agent loop / lifecycle
@@ -730,6 +742,11 @@ declare class WebSkillRuntime {
730
742
  get session(): RuntimeSession;
731
743
  /** 生命周期事件总线(只读观测) */
732
744
  get events(): EventBus;
745
+ /**
746
+ * Catalog 缓存失效:下次 run/discover 重新扫描技能目录。
747
+ * 与 SkillManager onChanged 接线:`new SkillManager({ ..., onChanged: () => runtime.invalidate() })`。
748
+ */
749
+ invalidate(): void;
733
750
  discover(): Promise<DiscoveryResult>;
734
751
  run(userPrompt: string): Promise<RunResult>;
735
752
  /** D3:列出可恢复的 interrupted run(供 UI 展示"未完成任务") */
@@ -743,4 +760,4 @@ declare class WebSkillRuntime {
743
760
  resumeRun(runId: string): Promise<RunResult>;
744
761
  }
745
762
  //#endregion
746
- export { ToolDefinition as $, LifecycleHook as A, RUN_SNAPSHOT_SCHEMA_VERSION as B, FullDisclosureRouter as C, schemaToForm as Ct, HookRunnerOptions as D, HookRunner as E, OpenAiCompatibleClientConfig as F, RunTerminationReason as G, RunResult as H, ProgressiveRouter as I, RuntimeSession as J, RuntimePhase as K, READ_SKILL_FILE_INPUT_SCHEMA as L, LifecycleListener as M, NetworkPolicy as N, InstalledSkillManifest as O, OpenAiCompatibleClient as P, SkillRouter as Q, READ_SKILL_FILE_TOOL as R, FsRunSnapshotStore as S, resolveToolName as St, GoogleGenAiClientConfig as T, toVercelToolSpecs as Tt, RunSnapshot as U, RouteResult as V, RunSnapshotStore as W, ScriptExecutionContext as X, SchemaInferer as Y, ScriptExecutor as Z, EventBus as _, isNetworkAllowed as _t, AgentLoopConfig as a, TraceRecorder as at, FsArtifactStore as b, normalizeToolContent as bt, AnthropicClientConfig as c, WebSkillRuntime as ct, BridgeCapabilities as d, buildRenderResult as dt, ToolResolution as et, BridgeCapability as f, createScriptContext as ft, CapabilityMode as g, fromVercelStreamPart as gt, CapabilityApproval as h, fromVercelResult as ht, AgentLoop as i, TraceEventType as it, LifecycleHookContext as j, LifecycleEvent as k, ApprovalDecision as l, WebSkillRuntimeDeps as lt, BridgeResponse as m, extractChartSpec as mt, ASK_USER_TOOL as n, TraceClock as nt, AgentLoopDeps as o, VercelToolSpec as ot, BridgeRequest as p, createWebSkillApi as pt, RuntimeRun as q, ASK_USER_TOOL_NAME as r, TraceEvent as rt, AnthropicClient as s, WebSkillApi as st, ASK_USER_INPUT_SCHEMA as t, ToolResult as tt, ApprovalScope as u, bridgeError as ut, ExternalSkillProvider as v, mergeCatalogEntries as vt, GoogleGenAiClient as w, toLlmToolSpec as wt, FsMemoryStore as x, parseBridgeRequest as xt, ExternalToolSource as y, networkUrlHost as yt, READ_SKILL_FILE_TOOL_NAME as z };
763
+ export { SkillStateGuard as $, LifecycleHook as A, RUN_SNAPSHOT_SCHEMA_VERSION as B, FullDisclosureRouter as C, resolveToolName as Ct, HookRunnerOptions as D, HookRunner as E, toVercelToolSpecs as Et, OpenAiCompatibleClientConfig as F, RunTerminationReason as G, RunResult as H, ProgressiveRouter as I, RuntimeSession as J, RuntimePhase as K, READ_SKILL_FILE_INPUT_SCHEMA as L, LifecycleListener as M, NetworkPolicy as N, InstalledSkillManifest as O, OpenAiCompatibleClient as P, SkillRouter as Q, READ_SKILL_FILE_TOOL as R, FsRunSnapshotStore as S, parseBridgeRequest as St, GoogleGenAiClientConfig as T, toLlmToolSpec as Tt, RunSnapshot as U, RouteResult as V, RunSnapshotStore as W, ScriptExecutionContext as X, SchemaInferer as Y, ScriptExecutor as Z, EventBus as _, fromVercelStreamPart as _t, AgentLoopConfig as a, TraceEventType as at, FsArtifactStore as b, networkUrlHost as bt, AnthropicClientConfig as c, WebSkillApi as ct, BridgeCapabilities as d, bridgeError as dt, ToolDefinition as et, BridgeCapability as f, buildRenderResult as ft, CapabilityMode as g, fromVercelResult as gt, CapabilityApproval as h, extractChartSpec as ht, AgentLoop as i, TraceEvent as it, LifecycleHookContext as j, LifecycleEvent as k, ApprovalDecision as l, WebSkillRuntime as lt, BridgeResponse as m, createWebSkillApi as mt, ASK_USER_TOOL as n, ToolResult as nt, AgentLoopDeps as o, TraceRecorder as ot, BridgeRequest as p, createScriptContext as pt, RuntimeRun as q, ASK_USER_TOOL_NAME as r, TraceClock as rt, AnthropicClient as s, VercelToolSpec as st, ASK_USER_INPUT_SCHEMA as t, ToolResolution as tt, ApprovalScope as u, WebSkillRuntimeDeps as ut, ExternalSkillProvider as v, isNetworkAllowed as vt, GoogleGenAiClient as w, schemaToForm as wt, FsMemoryStore as x, normalizeToolContent as xt, ExternalToolSource as y, mergeCatalogEntries as yt, READ_SKILL_FILE_TOOL_NAME as z };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as escapeXml, A as SkillCatalog, B as SkillReader, C as JsonSchema, D as SKILL_NAME_MAX_LENGTH, E as SKILL_MANIFEST_FILE, F as SkillIssue, G as WebSkillError, H as SkillsLockfile, I as SkillLocation, J as buildCatalog, K as WebSkillErrorCode, L as SkillManifest, M as SkillDiscovery, N as SkillDocument, O as SKILL_NAME_PATTERN, P as SkillInstallSource, Q as computeDigest, R as SkillMetadata, S as FileSystemProvider, T as SKILLS_LOCKFILE, U as ValidationReport, V as SkillSource, W as VerifyResult, X as checkDependencyCycles, Y as buildManifest, Z as checkSkillRules, _ as RenderResultRequest, a as InteractionPolicy, at as parseSkillPackManifest, b as DiscoveryResult, c as LlmClient, ct as resolveInsideRoot, d as LlmResponse, dt as xmlRenderer, et as exportSkills, f as LlmStreamEvent, g as RenderBlock, h as MemoryStore, i as FormField, it as parseSkillMarkdown, j as SkillCatalogEntry, k as SKILL_PACK_FILE, l as LlmCompleteInput, lt as validateSkills, m as LlmToolSpec, n as ArtifactStore, nt as jsonRenderer, o as InteractionRequest, ot as renderAvailableSkillsXml, p as LlmToolCall, q as assertSafePathSegment, r as ChartSpec, rt as normalizePath, s as InteractionResponse, st as renderCatalogJson, t as Artifact, tt as isValidSkillName, u as LlmMessage, ut as verifyManifest, v as UiBridge, w as MemoryFS, x as FileStat, y as CatalogRenderer, z as SkillPackManifest } from "./types-CgNC-oQu-DYrxhD3z.js";
2
- import { $ as ToolDefinition, A as LifecycleHook, B as RUN_SNAPSHOT_SCHEMA_VERSION, C as FullDisclosureRouter, Ct as schemaToForm, D as HookRunnerOptions, E as HookRunner, F as OpenAiCompatibleClientConfig, G as RunTerminationReason, H as RunResult, I as ProgressiveRouter, J as RuntimeSession, K as RuntimePhase, L as READ_SKILL_FILE_INPUT_SCHEMA, M as LifecycleListener, N as NetworkPolicy, O as InstalledSkillManifest, P as OpenAiCompatibleClient, Q as SkillRouter, R as READ_SKILL_FILE_TOOL, S as FsRunSnapshotStore, St as resolveToolName, T as GoogleGenAiClientConfig, Tt as toVercelToolSpecs, U as RunSnapshot, V as RouteResult, W as RunSnapshotStore, X as ScriptExecutionContext, Y as SchemaInferer, Z as ScriptExecutor, _ as EventBus, _t as isNetworkAllowed, a as AgentLoopConfig, at as TraceRecorder, b as FsArtifactStore, bt as normalizeToolContent, c as AnthropicClientConfig, ct as WebSkillRuntime, d as BridgeCapabilities, dt as buildRenderResult, et as ToolResolution, f as BridgeCapability, ft as createScriptContext, g as CapabilityMode, gt as fromVercelStreamPart, h as CapabilityApproval, ht as fromVercelResult, i as AgentLoop, it as TraceEventType, j as LifecycleHookContext, k as LifecycleEvent, l as ApprovalDecision, lt as WebSkillRuntimeDeps, m as BridgeResponse, mt as extractChartSpec, n as ASK_USER_TOOL, nt as TraceClock, o as AgentLoopDeps, ot as VercelToolSpec, p as BridgeRequest, pt as createWebSkillApi, q as RuntimeRun, r as ASK_USER_TOOL_NAME, rt as TraceEvent, s as AnthropicClient, st as WebSkillApi, t as ASK_USER_INPUT_SCHEMA, tt as ToolResult, u as ApprovalScope, ut as bridgeError, v as ExternalSkillProvider, vt as mergeCatalogEntries, w as GoogleGenAiClient, wt as toLlmToolSpec, x as FsMemoryStore, xt as parseBridgeRequest, y as ExternalToolSource, yt as networkUrlHost, z as READ_SKILL_FILE_TOOL_NAME } from "./index-BSS3EWY-.js";
3
- export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type Artifact, type ArtifactStore, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type DiscoveryResult, EventBus, type ExternalSkillProvider, type ExternalToolSource, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, type RenderBlock, type RenderResultRequest, type RouteResult, type RunResult, type RunSnapshot, type RunSnapshotStore, type RunTerminationReason, type RuntimePhase, type RuntimeRun, type RuntimeSession, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillInstallSource, type SkillIssue, type SkillLocation, type SkillManifest, type SkillMetadata, type SkillPackManifest, SkillReader, type SkillRouter, type SkillSource, type SkillsLockfile, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type UiBridge, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, assertSafePathSegment, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isValidSkillName, jsonRenderer, mergeCatalogEntries, networkUrlHost, normalizePath, normalizeToolContent, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, renderAvailableSkillsXml, renderCatalogJson, resolveInsideRoot, resolveToolName, schemaToForm, toLlmToolSpec, toVercelToolSpecs, validateSkills, verifyManifest, xmlRenderer };
1
+ import { $ as checkSkillRules, A as SKILL_NAME_PATTERN, B as SkillMetadata, C as FileStat, D as SKILLS_LOCKFILE, E as MemoryFS, F as SkillDocument, G as ValidationReport, H as SkillReader, I as SkillInstallSource, J as WebSkillErrorCode, K as VerifyResult, L as SkillIssue, M as SkillCatalog, N as SkillCatalogEntry, O as SKILL_MANIFEST_FILE, P as SkillDiscovery, Q as checkDependencyCycles, R as SkillLocation, S as DiscoveryResult, T as JsonSchema, U as SkillSource, V as SkillPackManifest, W as SkillsLockfile, X as buildCatalog, Y as assertSafePathSegment, Z as buildManifest, _ as RenderResultRequest, a as InteractionPolicy, at as normalizePath, b as CatalogRenderer, c as LlmClient, ct as readResponseWithLimit, d as LlmResponse, dt as resolveArchiveLimits, et as computeDigest, f as LlmStreamEvent, ft as resolveInsideRoot, g as RenderBlock, gt as xmlRenderer, h as MemoryStore, ht as verifyManifest, i as FormField, it as jsonRenderer, j as SKILL_PACK_FILE, k as SKILL_NAME_MAX_LENGTH, l as LlmCompleteInput, lt as renderAvailableSkillsXml, m as LlmToolSpec, mt as validateSkills, n as ArtifactStore, nt as exportSkills, o as InteractionRequest, ot as parseSkillMarkdown, p as LlmToolCall, pt as unzipWithLimits, q as WebSkillError, r as ChartSpec, rt as isValidSkillName, s as InteractionResponse, st as parseSkillPackManifest, t as Artifact, tt as escapeXml, u as LlmMessage, ut as renderCatalogJson, v as UiBridge, w as FileSystemProvider, x as DEFAULT_ARCHIVE_LIMITS, y as ArchiveLimits, z as SkillManifest } from "./types-CgNC-oQu-DEcIBJKG.js";
2
+ import { $ as SkillStateGuard, A as LifecycleHook, B as RUN_SNAPSHOT_SCHEMA_VERSION, C as FullDisclosureRouter, Ct as resolveToolName, D as HookRunnerOptions, E as HookRunner, Et as toVercelToolSpecs, F as OpenAiCompatibleClientConfig, G as RunTerminationReason, H as RunResult, I as ProgressiveRouter, J as RuntimeSession, K as RuntimePhase, L as READ_SKILL_FILE_INPUT_SCHEMA, M as LifecycleListener, N as NetworkPolicy, O as InstalledSkillManifest, P as OpenAiCompatibleClient, Q as SkillRouter, R as READ_SKILL_FILE_TOOL, S as FsRunSnapshotStore, St as parseBridgeRequest, T as GoogleGenAiClientConfig, Tt as toLlmToolSpec, U as RunSnapshot, V as RouteResult, W as RunSnapshotStore, X as ScriptExecutionContext, Y as SchemaInferer, Z as ScriptExecutor, _ as EventBus, _t as fromVercelStreamPart, a as AgentLoopConfig, at as TraceEventType, b as FsArtifactStore, bt as networkUrlHost, c as AnthropicClientConfig, ct as WebSkillApi, d as BridgeCapabilities, dt as bridgeError, et as ToolDefinition, f as BridgeCapability, ft as buildRenderResult, g as CapabilityMode, gt as fromVercelResult, h as CapabilityApproval, ht as extractChartSpec, i as AgentLoop, it as TraceEvent, j as LifecycleHookContext, k as LifecycleEvent, l as ApprovalDecision, lt as WebSkillRuntime, m as BridgeResponse, mt as createWebSkillApi, n as ASK_USER_TOOL, nt as ToolResult, o as AgentLoopDeps, ot as TraceRecorder, p as BridgeRequest, pt as createScriptContext, q as RuntimeRun, r as ASK_USER_TOOL_NAME, rt as TraceClock, s as AnthropicClient, st as VercelToolSpec, t as ASK_USER_INPUT_SCHEMA, tt as ToolResolution, u as ApprovalScope, ut as WebSkillRuntimeDeps, v as ExternalSkillProvider, vt as isNetworkAllowed, w as GoogleGenAiClient, wt as schemaToForm, x as FsMemoryStore, xt as normalizeToolContent, y as ExternalToolSource, yt as mergeCatalogEntries, z as READ_SKILL_FILE_TOOL_NAME } from "./index-COuOu6gw.js";
3
+ export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, DEFAULT_ARCHIVE_LIMITS, type DiscoveryResult, EventBus, type ExternalSkillProvider, type ExternalToolSource, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LlmClient, type LlmCompleteInput, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmToolCall, type LlmToolSpec, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, type RenderBlock, type RenderResultRequest, type RouteResult, type RunResult, type RunSnapshot, type RunSnapshotStore, type RunTerminationReason, type RuntimePhase, type RuntimeRun, type RuntimeSession, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillInstallSource, type SkillIssue, type SkillLocation, type SkillManifest, type SkillMetadata, type SkillPackManifest, SkillReader, type SkillRouter, type SkillSource, type SkillStateGuard, type SkillsLockfile, type ToolDefinition, type ToolResolution, type ToolResult, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type UiBridge, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, assertSafePathSegment, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isValidSkillName, jsonRenderer, mergeCatalogEntries, networkUrlHost, normalizePath, normalizeToolContent, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, readResponseWithLimit, renderAvailableSkillsXml, renderCatalogJson, resolveArchiveLimits, resolveInsideRoot, resolveToolName, schemaToForm, toLlmToolSpec, toVercelToolSpecs, unzipWithLimits, validateSkills, verifyManifest, xmlRenderer };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as renderAvailableSkillsXml, D as verifyManifest, E as validateSkills, O as xmlRenderer, S as parseSkillPackManifest, T as resolveInsideRoot, _ as exportSkills, a as SKILL_NAME_PATTERN, b as normalizePath, c as SkillReader, d as buildCatalog, f as buildManifest, g as escapeXml, h as computeDigest, i as SKILL_NAME_MAX_LENGTH, l as WebSkillError, m as checkSkillRules, n as SKILLS_LOCKFILE, o as SKILL_PACK_FILE, p as checkDependencyCycles, r as SKILL_MANIFEST_FILE, s as SkillDiscovery, t as MemoryFS, u as assertSafePathSegment, v as isValidSkillName, w as renderCatalogJson, x as parseSkillMarkdown, y as jsonRenderer } from "./dist-DvoBsChX.js";
2
- import { A as mergeCatalogEntries, C as buildRenderResult, D as fromVercelResult, E as extractChartSpec, F as schemaToForm, I as toLlmToolSpec, L as toVercelToolSpecs, M as normalizeToolContent, N as parseBridgeRequest, O as fromVercelStreamPart, P as resolveToolName, S as bridgeError, T as createWebSkillApi, _ as READ_SKILL_FILE_TOOL, a as AnthropicClient, b as TraceRecorder, c as FsArtifactStore, d as FullDisclosureRouter, f as GoogleGenAiClient, g as READ_SKILL_FILE_INPUT_SCHEMA, h as ProgressiveRouter, i as AgentLoop, j as networkUrlHost, k as isNetworkAllowed, l as FsMemoryStore, m as OpenAiCompatibleClient, n as ASK_USER_TOOL, o as CapabilityApproval, p as HookRunner, r as ASK_USER_TOOL_NAME, s as EventBus, t as ASK_USER_INPUT_SCHEMA, u as FsRunSnapshotStore, v as READ_SKILL_FILE_TOOL_NAME, w as createScriptContext, x as WebSkillRuntime, y as RUN_SNAPSHOT_SCHEMA_VERSION } from "./dist-DAn07zHu.js";
1
+ import { A as validateSkills, C as parseSkillPackManifest, D as resolveArchiveLimits, E as renderCatalogJson, M as xmlRenderer, O as resolveInsideRoot, S as parseSkillMarkdown, T as renderAvailableSkillsXml, _ as escapeXml, a as SKILL_NAME_MAX_LENGTH, b as jsonRenderer, c as SkillDiscovery, d as assertSafePathSegment, f as buildCatalog, g as computeDigest, h as checkSkillRules, i as SKILL_MANIFEST_FILE, j as verifyManifest, k as unzipWithLimits, l as SkillReader, m as checkDependencyCycles, n as MemoryFS, o as SKILL_NAME_PATTERN, p as buildManifest, r as SKILLS_LOCKFILE, s as SKILL_PACK_FILE, t as DEFAULT_ARCHIVE_LIMITS, u as WebSkillError, v as exportSkills, w as readResponseWithLimit, x as normalizePath, y as isValidSkillName } from "./dist-fZFZaf43.js";
2
+ import { A as mergeCatalogEntries, C as buildRenderResult, D as fromVercelResult, E as extractChartSpec, F as schemaToForm, I as toLlmToolSpec, L as toVercelToolSpecs, M as normalizeToolContent, N as parseBridgeRequest, O as fromVercelStreamPart, P as resolveToolName, S as bridgeError, T as createWebSkillApi, _ as READ_SKILL_FILE_TOOL, a as AnthropicClient, b as TraceRecorder, c as FsArtifactStore, d as FullDisclosureRouter, f as GoogleGenAiClient, g as READ_SKILL_FILE_INPUT_SCHEMA, h as ProgressiveRouter, i as AgentLoop, j as networkUrlHost, k as isNetworkAllowed, l as FsMemoryStore, m as OpenAiCompatibleClient, n as ASK_USER_TOOL, o as CapabilityApproval, p as HookRunner, r as ASK_USER_TOOL_NAME, s as EventBus, t as ASK_USER_INPUT_SCHEMA, u as FsRunSnapshotStore, v as READ_SKILL_FILE_TOOL_NAME, w as createScriptContext, x as WebSkillRuntime, y as RUN_SNAPSHOT_SCHEMA_VERSION } from "./dist-DuGN5x0v.js";
3
3
 
4
- export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, AnthropicClient, CapabilityApproval, EventBus, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SkillDiscovery, SkillReader, TraceRecorder, WebSkillError, WebSkillRuntime, assertSafePathSegment, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isValidSkillName, jsonRenderer, mergeCatalogEntries, networkUrlHost, normalizePath, normalizeToolContent, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, renderAvailableSkillsXml, renderCatalogJson, resolveInsideRoot, resolveToolName, schemaToForm, toLlmToolSpec, toVercelToolSpecs, validateSkills, verifyManifest, xmlRenderer };
4
+ export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, AnthropicClient, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, EventBus, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SkillDiscovery, SkillReader, TraceRecorder, WebSkillError, WebSkillRuntime, assertSafePathSegment, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, escapeXml, exportSkills, extractChartSpec, fromVercelResult, fromVercelStreamPart, isNetworkAllowed, isValidSkillName, jsonRenderer, mergeCatalogEntries, networkUrlHost, normalizePath, normalizeToolContent, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, readResponseWithLimit, renderAvailableSkillsXml, renderCatalogJson, resolveArchiveLimits, resolveInsideRoot, resolveToolName, schemaToForm, toLlmToolSpec, toVercelToolSpecs, unzipWithLimits, validateSkills, verifyManifest, xmlRenderer };
package/dist/mcp.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as JsonSchema, N as SkillDocument, j as SkillCatalogEntry, m as LlmToolSpec } from "./types-CgNC-oQu-DYrxhD3z.js";
2
- import { tt as ToolResult, v as ExternalSkillProvider, vt as mergeCatalogEntries, y as ExternalToolSource } from "./index-BSS3EWY-.js";
1
+ import { F as SkillDocument, N as SkillCatalogEntry, T as JsonSchema, m as LlmToolSpec } from "./types-CgNC-oQu-DEcIBJKG.js";
2
+ import { nt as ToolResult, v as ExternalSkillProvider, y as ExternalToolSource, yt as mergeCatalogEntries } from "./index-COuOu6gw.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";
package/dist/mcp.js CHANGED
@@ -1,5 +1,5 @@
1
- import { l as WebSkillError } from "./dist-DvoBsChX.js";
2
- import { A as mergeCatalogEntries, M as normalizeToolContent } from "./dist-DAn07zHu.js";
1
+ import { u as WebSkillError } from "./dist-fZFZaf43.js";
2
+ import { A as mergeCatalogEntries, M as normalizeToolContent } from "./dist-DuGN5x0v.js";
3
3
  import { fromJSONSchema } from "zod";
4
4
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
5
5
  import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
@@ -44,6 +44,8 @@ var MessageChannelTransport = class {
44
44
  onmessage;
45
45
  #port;
46
46
  #allowedOrigins;
47
+ /** 用户显式传入 allowedOrigins(区别于 window 环境自动推导):空 origin 默认拒绝 */
48
+ #explicitOrigins;
47
49
  #strictOrigin;
48
50
  #connectionTimeoutMs;
49
51
  #state = "idle";
@@ -53,6 +55,7 @@ var MessageChannelTransport = class {
53
55
  this.#port = port;
54
56
  this.#strictOrigin = options.strictOrigin ?? false;
55
57
  this.#connectionTimeoutMs = options.connectionTimeoutMs ?? 0;
58
+ this.#explicitOrigins = options.allowedOrigins !== void 0;
56
59
  if (options.allowedOrigins !== void 0) this.#allowedOrigins = options.allowedOrigins;
57
60
  else {
58
61
  const origin = currentOrigin();
@@ -92,7 +95,10 @@ var MessageChannelTransport = class {
92
95
  #originAllowed(origin) {
93
96
  if (this.#allowedOrigins === void 0) return true;
94
97
  if (this.#allowedOrigins.includes("*")) return true;
95
- if (origin === void 0 || origin === "") return !this.#strictOrigin;
98
+ if (origin === void 0 || origin === "") {
99
+ if (this.#explicitOrigins) return false;
100
+ return !this.#strictOrigin;
101
+ }
96
102
  return this.#allowedOrigins.includes(origin);
97
103
  }
98
104
  #onInbound(event) {
package/dist/node.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { E as SKILL_MANIFEST_FILE, H as SkillsLockfile, L as SkillManifest, P as SkillInstallSource, T as SKILLS_LOCKFILE, W as VerifyResult } from "./types-CgNC-oQu-DYrxhD3z.js";
2
- import { ft as createScriptContext } from "./index-BSS3EWY-.js";
3
- import { _ as readArchiveManifest, a as LlmEnvConfig, c as OxcSchemaInferer, d as SandboxedScriptExecutor, f as SkillManager, g as probeLlmCapabilities, h as loadLlmConfigFromEnv, i as LlmCapabilities, l as ProviderEnvConfig, m as loadGoogleConfigFromEnv, n as FileArtifactStore, o as NodeFS, p as loadAnthropicConfigFromEnv, r as FileMemoryStore, s as NodeScriptExecutor, t as CliUiBridge, u as SandboxOptions } from "./index-npFMt2Zw.js";
1
+ import { D as SKILLS_LOCKFILE, I as SkillInstallSource, K as VerifyResult, O as SKILL_MANIFEST_FILE, W as SkillsLockfile, z as SkillManifest } from "./types-CgNC-oQu-DEcIBJKG.js";
2
+ import { pt as createScriptContext } from "./index-COuOu6gw.js";
3
+ import { _ as readArchiveManifest, a as LlmEnvConfig, c as OxcSchemaInferer, d as SandboxedScriptExecutor, f as SkillManager, g as probeLlmCapabilities, h as loadLlmConfigFromEnv, i as LlmCapabilities, l as ProviderEnvConfig, m as loadGoogleConfigFromEnv, n as FileArtifactStore, o as NodeFS, p as loadAnthropicConfigFromEnv, r as FileMemoryStore, s as NodeScriptExecutor, t as CliUiBridge, u as SandboxOptions } from "./index-Bun1aEf4.js";
4
4
  export { CliUiBridge, FileArtifactStore, FileMemoryStore, type LlmCapabilities, type LlmEnvConfig, NodeFS, NodeScriptExecutor, OxcSchemaInferer, type ProviderEnvConfig, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, type SandboxOptions, SandboxedScriptExecutor, type SkillInstallSource, SkillManager, type SkillManifest, type SkillsLockfile, type VerifyResult, createScriptContext, loadAnthropicConfigFromEnv, loadGoogleConfigFromEnv, loadLlmConfigFromEnv, probeLlmCapabilities, readArchiveManifest };
package/dist/node.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SKILLS_LOCKFILE, r as SKILL_MANIFEST_FILE } from "./dist-DvoBsChX.js";
2
- import { w as createScriptContext } from "./dist-DAn07zHu.js";
3
- import { a as NodeScriptExecutor, c as SkillManager, d as loadLlmConfigFromEnv, f as probeLlmCapabilities, i as NodeFS, l as loadAnthropicConfigFromEnv, n as FileArtifactStore, o as OxcSchemaInferer, p as readArchiveManifest, r as FileMemoryStore, s as SandboxedScriptExecutor, t as CliUiBridge, u as loadGoogleConfigFromEnv } from "./dist-BVXZF7H_.js";
1
+ import { i as SKILL_MANIFEST_FILE, r as SKILLS_LOCKFILE } from "./dist-fZFZaf43.js";
2
+ import { w as createScriptContext } from "./dist-DuGN5x0v.js";
3
+ import { a as NodeScriptExecutor, c as SkillManager, d as loadLlmConfigFromEnv, f as probeLlmCapabilities, i as NodeFS, l as loadAnthropicConfigFromEnv, n as FileArtifactStore, o as OxcSchemaInferer, p as readArchiveManifest, r as FileMemoryStore, s as SandboxedScriptExecutor, t as CliUiBridge, u as loadGoogleConfigFromEnv } from "./dist-LIFS3ZjI.js";
4
4
 
5
5
  export { CliUiBridge, FileArtifactStore, FileMemoryStore, NodeFS, NodeScriptExecutor, OxcSchemaInferer, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SandboxedScriptExecutor, SkillManager, createScriptContext, loadAnthropicConfigFromEnv, loadGoogleConfigFromEnv, loadLlmConfigFromEnv, probeLlmCapabilities, readArchiveManifest };
@@ -1,6 +1,9 @@
1
1
  import { register } from "node:module";
2
+ import path from "node:path";
3
+ import { tmpdir } from "node:os";
2
4
  import { pathToFileURL } from "node:url";
3
5
  import { isMainThread, parentPort, workerData } from "node:worker_threads";
6
+ import { mkdtemp, rm, writeFile } from "node:fs/promises";
4
7
 
5
8
  //#region ../node/dist/executor/sandboxWorkerEntry.js
6
9
  /**
@@ -47,7 +50,21 @@ function callCapability(kind, payload) {
47
50
  return r.value;
48
51
  });
49
52
  }
50
- async function loadModule(scriptPath) {
53
+ async function loadModule(scriptPath, scriptSource) {
54
+ if (scriptPath.endsWith(".js") && scriptSource !== void 0) return await import(`data:text/javascript;charset=utf-8,${encodeURIComponent(`${scriptSource}\n//# ${Date.now()}`)}`);
55
+ if (scriptPath.endsWith(".ts") && scriptSource !== void 0) {
56
+ const dir = await mkdtemp(path.join(tmpdir(), "webskill-ts-"));
57
+ try {
58
+ const file = path.join(dir, "script.ts");
59
+ await writeFile(file, scriptSource);
60
+ return await import(`${pathToFileURL(file).href}?t=${Date.now()}`);
61
+ } finally {
62
+ await rm(dir, {
63
+ recursive: true,
64
+ force: true
65
+ });
66
+ }
67
+ }
51
68
  return await import(`${pathToFileURL(scriptPath).href}?t=${Date.now()}`);
52
69
  }
53
70
  function post(message) {
@@ -129,7 +146,7 @@ async function main() {
129
146
  });
130
147
  if (task.mode === "load") {
131
148
  try {
132
- const mod = await loadModule(task.scriptPath);
149
+ const mod = await loadModule(task.scriptPath, task.scriptSource);
133
150
  post({
134
151
  type: "load-result",
135
152
  ok: true,
@@ -163,7 +180,7 @@ async function main() {
163
180
  console.log = console.info = console.debug = (...args) => stdout.push(args.map(String).join(" "));
164
181
  console.warn = console.error = (...args) => stderr.push(args.map(String).join(" "));
165
182
  try {
166
- const mod = await loadModule(task.scriptPath);
183
+ const mod = await loadModule(task.scriptPath, task.scriptSource);
167
184
  if (typeof mod["run"] !== "function") throw new Error("Script does not export a run function");
168
185
  const context = {
169
186
  skillName: task.skillName ?? "",
@@ -1,4 +1,4 @@
1
- import { l as WebSkillError } from "./dist-DvoBsChX.js";
1
+ import { u as WebSkillError } from "./dist-fZFZaf43.js";
2
2
 
3
3
  //#region ../runtime/dist/testing.js
4
4
  /**
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as LlmClient, d as LlmResponse, f as LlmStreamEvent, h as MemoryStore, l as LlmCompleteInput, n as ArtifactStore, o as InteractionRequest, s as InteractionResponse, t as Artifact, v as UiBridge } from "./types-CgNC-oQu-DYrxhD3z.js";
1
+ import { c as LlmClient, d as LlmResponse, f as LlmStreamEvent, h as MemoryStore, l as LlmCompleteInput, n as ArtifactStore, o as InteractionRequest, s as InteractionResponse, t as Artifact, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.js";
2
2
  //#region ../runtime/dist/testing.d.ts
3
3
  //#region src/llm/mockLlmClient.d.ts
4
4
  type MockLlmHandler = (input: LlmCompleteInput) => LlmResponse | Promise<LlmResponse>;
package/dist/testing.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { t as MemoryArtifactStore } from "./memoryArtifactStore-C9lFVqPF-yFz6yJj0.js";
2
- import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-S8SN9Lc6.js";
2
+ import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-BmR48Pn1.js";
3
3
 
4
4
  export { InMemoryStore, MemoryArtifactStore, MockLlmClient, MockUiBridge };
@@ -74,7 +74,12 @@ interface SkillsLockfile {
74
74
  }
75
75
  interface VerifyResult {
76
76
  ok: boolean;
77
+ /** 清单与实际均存在但 sha256 不一致的文件 */
77
78
  mismatches: string[];
79
+ /** 实际目录存在但清单未登记的文件(有 extra 即 ok:false) */
80
+ extras: string[];
81
+ /** 清单登记但实际目录缺失的文件 */
82
+ missing: string[];
78
83
  }
79
84
  /** 技能目录内的安装清单文件名(不参与 files 列表与 digest) */
80
85
  declare const SKILL_MANIFEST_FILE = "webskill.skill-manifest.json";
@@ -95,8 +100,8 @@ declare function buildManifest(input: {
95
100
  files: SkillManifest['files'];
96
101
  sha256: Sha256Fn;
97
102
  }): Promise<SkillManifest>;
98
- /** 按 manifest.files 比对实际 hash(调用方负责计算 actualHashes) */
99
- declare function verifyManifest(manifest: SkillManifest, actualHashes: Map<string, string>): VerifyResult;
103
+ /** 按 manifest.files 比对实际 hash 与文件集(mismatches/extras/missing 三类全空才 ok) */
104
+ declare function verifyManifest(manifest: SkillManifest, actualHashes: Map<string, string>, actualFiles?: string[]): VerifyResult;
100
105
  //#endregion
101
106
  //#region src/fs/types.d.ts
102
107
  interface FileStat {
@@ -279,6 +284,27 @@ declare function exportSkills(fs: FileSystemProvider, input: {
279
284
  /** 包级清单解析 + 形状校验;损坏 → INSTALL_FAILED(安装侧保证零残留) */
280
285
  declare function parseSkillPackManifest(text: string): SkillPackManifest;
281
286
  //#endregion
287
+ //#region src/skill/zipLimits.d.ts
288
+ /**
289
+ * 归档体积三重上限(node/browser 共用单一来源):
290
+ * 下载(Content-Length + 流式累计)、单条目解压后大小、总解压体积。
291
+ * fflate 流式 Unzip 逐 chunk 计量,超限即中止(zip bomb 在计量点截断)。
292
+ */
293
+ interface ArchiveLimits {
294
+ /** 下载字节上限(默认 64MB) */
295
+ maxDownloadBytes?: number;
296
+ /** 单条目解压后上限(默认 64MB) */
297
+ maxEntryBytes?: number;
298
+ /** 总解压体积上限(默认 256MB) */
299
+ maxTotalBytes?: number;
300
+ }
301
+ declare const DEFAULT_ARCHIVE_LIMITS: Required<ArchiveLimits>;
302
+ declare function resolveArchiveLimits(limits?: ArchiveLimits): Required<ArchiveLimits>;
303
+ /** 流式解 zip(单条目/总双重上限);返回 [path, content][](目录条目以 / 结尾、内容为空) */
304
+ declare function unzipWithLimits(data: Uint8Array, limits?: ArchiveLimits): Promise<Array<[string, Uint8Array]>>;
305
+ /** 下载响应体:Content-Length 预检 + 流式累计上限 */
306
+ declare function readResponseWithLimit(res: Response, limits?: ArchiveLimits): Promise<Uint8Array>;
307
+ //#endregion
282
308
  //#region src/skill/discovery.d.ts
283
309
  interface DiscoveryResult {
284
310
  entries: SkillCatalogEntry[];
@@ -546,4 +572,4 @@ interface MemoryStore {
546
572
  clear(scope?: string): Promise<void>;
547
573
  }
548
574
  //#endregion
549
- export { escapeXml as $, SkillCatalog as A, SkillReader as B, JsonSchema as C, SKILL_NAME_MAX_LENGTH as D, SKILL_MANIFEST_FILE as E, SkillIssue as F, WebSkillError as G, SkillsLockfile as H, SkillLocation as I, buildCatalog as J, WebSkillErrorCode as K, SkillManifest as L, SkillDiscovery as M, SkillDocument as N, SKILL_NAME_PATTERN as O, SkillInstallSource as P, computeDigest as Q, SkillMetadata as R, FileSystemProvider as S, SKILLS_LOCKFILE as T, ValidationReport as U, SkillSource as V, VerifyResult as W, checkDependencyCycles as X, buildManifest as Y, checkSkillRules as Z, RenderResultRequest as _, InteractionPolicy as a, parseSkillPackManifest as at, DiscoveryResult as b, LlmClient as c, resolveInsideRoot as ct, LlmResponse as d, xmlRenderer as dt, exportSkills as et, LlmStreamEvent as f, RenderBlock as g, MemoryStore as h, FormField as i, parseSkillMarkdown as it, SkillCatalogEntry as j, SKILL_PACK_FILE as k, LlmCompleteInput as l, validateSkills as lt, LlmToolSpec as m, ArtifactStore as n, jsonRenderer as nt, InteractionRequest as o, renderAvailableSkillsXml as ot, LlmToolCall as p, assertSafePathSegment as q, ChartSpec as r, normalizePath as rt, InteractionResponse as s, renderCatalogJson as st, Artifact as t, isValidSkillName as tt, LlmMessage as u, verifyManifest as ut, UiBridge as v, MemoryFS as w, FileStat as x, CatalogRenderer as y, SkillPackManifest as z };
575
+ export { checkSkillRules as $, SKILL_NAME_PATTERN as A, SkillMetadata as B, FileStat as C, SKILLS_LOCKFILE as D, MemoryFS as E, SkillDocument as F, ValidationReport as G, SkillReader as H, SkillInstallSource as I, WebSkillErrorCode as J, VerifyResult as K, SkillIssue as L, SkillCatalog as M, SkillCatalogEntry as N, SKILL_MANIFEST_FILE as O, SkillDiscovery as P, checkDependencyCycles as Q, SkillLocation as R, DiscoveryResult as S, JsonSchema as T, SkillSource as U, SkillPackManifest as V, SkillsLockfile as W, buildCatalog as X, assertSafePathSegment as Y, buildManifest as Z, RenderResultRequest as _, InteractionPolicy as a, normalizePath as at, CatalogRenderer as b, LlmClient as c, readResponseWithLimit as ct, LlmResponse as d, resolveArchiveLimits as dt, computeDigest as et, LlmStreamEvent as f, resolveInsideRoot as ft, RenderBlock as g, xmlRenderer as gt, MemoryStore as h, verifyManifest as ht, FormField as i, jsonRenderer as it, SKILL_PACK_FILE as j, SKILL_NAME_MAX_LENGTH as k, LlmCompleteInput as l, renderAvailableSkillsXml as lt, LlmToolSpec as m, validateSkills as mt, ArtifactStore as n, exportSkills as nt, InteractionRequest as o, parseSkillMarkdown as ot, LlmToolCall as p, unzipWithLimits as pt, WebSkillError as q, ChartSpec as r, isValidSkillName as rt, InteractionResponse as s, parseSkillPackManifest as st, Artifact as t, escapeXml as tt, LlmMessage as u, renderCatalogJson as ut, UiBridge as v, FileSystemProvider as w, DEFAULT_ARCHIVE_LIMITS as x, ArchiveLimits as y, SkillManifest as z };
@@ -1,4 +1,4 @@
1
- import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DYrxhD3z.js";
1
+ import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.js";
2
2
  //#region ../ui-react/dist/index.d.ts
3
3
  //#region src/bridgeState.d.ts
4
4
  /**
package/dist/ui-react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-MTc2KB03.js";
1
+ import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-CfBOjJ4p.js";
2
2
  import { useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
 
package/dist/ui-vue.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DYrxhD3z.js";
1
+ import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.js";
2
2
  import { PropType } from "vue";
3
3
  //#region ../ui-vue/dist/index.d.ts
4
4
  //#region src/bridgeState.d.ts
package/dist/ui-vue.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-MTc2KB03.js";
1
+ import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-CfBOjJ4p.js";
2
2
  import { defineComponent, h, reactive, ref } from "vue";
3
3
 
4
4
  //#region ../ui-vue/dist/index.js
package/dist/ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as RenderResultRequest, g as RenderBlock, o as InteractionRequest, r as ChartSpec, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DYrxhD3z.js";
2
- import { dt as buildRenderResult } from "./index-BSS3EWY-.js";
1
+ import { _ as RenderResultRequest, g as RenderBlock, o as InteractionRequest, r as ChartSpec, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.js";
2
+ import { ft as buildRenderResult } from "./index-COuOu6gw.js";
3
3
  //#region ../ui/dist/index.d.ts
4
4
  //#region src/model/formModel.d.ts
5
5
  interface FormModel {
package/dist/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as buildRenderResult } from "./dist-DAn07zHu.js";
2
- import { C as renderRenderResult, D as toVercelToolInvocation, E as toOpenUiLang, S as renderMiniMarkdown, T as toA2uiMessages, _ as fromOpenUiAction, a as CHART_PALETTE, b as renderBlocks, c as OPENUI_SUBMIT_ACTION, d as WEBSKILL_STYLES_CSS, f as WebFormBridge, g as fromA2uiAction, h as ensureStyles, i as A2UI_VERSION, l as VERCEL_INTERACTION_TOOL_NAME, m as collectValues, n as A2UI_CANCEL_ACTION, o as LitRendererBridge, p as chartToTable, r as A2UI_SUBMIT_ACTION, s as OPENUI_CANCEL_ACTION, t as A2UI_BASIC_CATALOG_ID, u as VercelUiBridge, v as fromVercelToolResult, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-MTc2KB03.js";
1
+ import { C as buildRenderResult } from "./dist-DuGN5x0v.js";
2
+ import { C as renderRenderResult, D as toVercelToolInvocation, E as toOpenUiLang, S as renderMiniMarkdown, T as toA2uiMessages, _ as fromOpenUiAction, a as CHART_PALETTE, b as renderBlocks, c as OPENUI_SUBMIT_ACTION, d as WEBSKILL_STYLES_CSS, f as WebFormBridge, g as fromA2uiAction, h as ensureStyles, i as A2UI_VERSION, l as VERCEL_INTERACTION_TOOL_NAME, m as collectValues, n as A2UI_CANCEL_ACTION, o as LitRendererBridge, p as chartToTable, r as A2UI_SUBMIT_ACTION, s as OPENUI_CANCEL_ACTION, t as A2UI_BASIC_CATALOG_ID, u as VercelUiBridge, v as fromVercelToolResult, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-CfBOjJ4p.js";
3
3
 
4
4
  export { A2UI_BASIC_CATALOG_ID, A2UI_CANCEL_ACTION, A2UI_SUBMIT_ACTION, A2UI_VERSION, CHART_PALETTE, LitRendererBridge, OPENUI_CANCEL_ACTION, OPENUI_SUBMIT_ACTION, VERCEL_INTERACTION_TOOL_NAME, VercelUiBridge, WEBSKILL_STYLES_CSS, WebFormBridge, buildRenderResult, chartToTable, collectValues, ensureStyles, fromA2uiAction, fromOpenUiAction, fromVercelToolResult, interactionToFormModel, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, shapeInteractionValue, toA2uiMessages, toOpenUiLang, toVercelToolInvocation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webskill/sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "WebSkill — browser/Node agent skill runtime (skills, tools, MCP, governance, UI)",
5
5
  "license": "MIT",
6
6
  "type": "module",