@webskill/sdk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +3 -3
- package/dist/{dist-D5fsiETF.js → dist-DRsnVw6A.js} +44 -20
- package/dist/{memoryArtifactStore-C9lFVqPF-U8nXvqL9.js → dist-DS1sfgHa.js} +1 -48
- package/dist/dist-DxGyAznR.js +1058 -0
- package/dist/{dist-Cc3Mqi3_.js → dist-SarUS8EP.js} +2 -2
- package/dist/governance.d.ts +2 -2
- package/dist/governance.js +2 -2
- package/dist/{index-Dc4X2N54.d.ts → index-DkPK44Ji.d.ts} +1 -1
- package/dist/{index-oG5Nzgb9.d.ts → index-fjRF4H5o.d.ts} +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/mcp.d.ts +6 -1
- package/dist/mcp.js +5 -3
- package/dist/memoryArtifactStore-C9lFVqPF-yFz6yJj0.js +48 -0
- package/dist/node.d.ts +2 -2
- package/dist/node.js +3 -3
- package/dist/{testing-pn3NhXSV.js → testing-CbM6rJ-E.js} +1 -1
- package/dist/testing.js +2 -2
- package/dist/ui-react.js +1 -1
- package/dist/ui-vue.js +1 -1
- package/dist/ui.d.ts +2 -11
- package/dist/ui.js +2 -2
- package/package.json +1 -1
- package/dist/dist-Dv4a1Jkm.js +0 -15628
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as normalizeToolContent, D as isNetworkAllowed, a as CapabilityApproval, b as bridgeError, c as FsMemoryStore, j as parseBridgeRequest, k as networkUrlHost, s as FsArtifactStore } from "./dist-
|
|
1
|
+
import { E as verifyManifest, T as validateSkills, _ as isValidSkillName, b as parseSkillMarkdown, d as buildManifest, g as exportSkills, l as WebSkillError, n as SKILLS_LOCKFILE, o as SKILL_PACK_FILE, r as SKILL_MANIFEST_FILE, w as resolveInsideRoot, x as parseSkillPackManifest } from "./dist-DS1sfgHa.js";
|
|
2
|
+
import { A as normalizeToolContent, D as isNetworkAllowed, a as CapabilityApproval, b as bridgeError, c as FsMemoryStore, j as parseBridgeRequest, k as networkUrlHost, s as FsArtifactStore } from "./dist-DRsnVw6A.js";
|
|
3
3
|
import { unzipSync, zipSync } from "fflate";
|
|
4
4
|
import { existsSync, promises, readFileSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
package/dist/governance.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as SkillManifest, N as SkillDocument, S as FileSystemProvider, c as LlmClient, j as SkillCatalogEntry, u as LlmMessage, v as UiBridge } from "./types-CgNC-oQu-Dq_A1yA-.js";
|
|
2
|
-
import { U as RuntimeRun, it as WebSkillRuntime } from "./index-
|
|
3
|
-
import { d as SkillManager } from "./index-
|
|
2
|
+
import { U as RuntimeRun, it as WebSkillRuntime } from "./index-fjRF4H5o.js";
|
|
3
|
+
import { d as SkillManager } from "./index-DkPK44Ji.js";
|
|
4
4
|
//#region ../governance/dist/index.d.ts
|
|
5
5
|
//#region src/types.d.ts
|
|
6
6
|
type CandidateStatus = 'draft' | 'pending-review' | 'approved' | 'published' | 'rejected';
|
package/dist/governance.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as NodeFS } from "./dist-
|
|
1
|
+
import { T as validateSkills, _ as isValidSkillName, l as WebSkillError, w as resolveInsideRoot } from "./dist-DS1sfgHa.js";
|
|
2
|
+
import { i as NodeFS } from "./dist-SarUS8EP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { mkdtemp } from "node:fs/promises";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as JsonSchema, H as SkillsLockfile, L as SkillManifest, P as SkillInstallSource, S as FileSystemProvider, W as VerifyResult, _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge, x as FileStat } from "./types-CgNC-oQu-Dq_A1yA-.js";
|
|
2
|
-
import { G as SchemaInferer, K as ScriptExecutionContext, Y as ToolDefinition, Z as ToolResult, c as ApprovalScope, k as NetworkPolicy, l as BridgeCapabilities, q as ScriptExecutor, v as FsArtifactStore, y as FsMemoryStore } from "./index-
|
|
2
|
+
import { G as SchemaInferer, K as ScriptExecutionContext, Y as ToolDefinition, Z as ToolResult, c as ApprovalScope, k as NetworkPolicy, l as BridgeCapabilities, q as ScriptExecutor, v as FsArtifactStore, y as FsMemoryStore } from "./index-fjRF4H5o.js";
|
|
3
3
|
import { Readable, Writable } from "node:stream";
|
|
4
4
|
//#region ../node/dist/index.d.ts
|
|
5
5
|
//#region src/fs/nodeFs.d.ts
|
|
@@ -174,6 +174,8 @@ declare function createScriptContext(deps: {
|
|
|
174
174
|
confirm?: (message: string) => Promise<boolean>;
|
|
175
175
|
/** 宿主侧降级 warning 出口(网络阻断等;引擎接线到 run.warning trace) */
|
|
176
176
|
onWarning?: (message: string) => void;
|
|
177
|
+
/** writeArtifact 创建产物后的回调(引擎记录新产物 ID,执行后单次 listArtifacts 过滤) */
|
|
178
|
+
onArtifactCreated?: (artifact: Artifact) => void;
|
|
177
179
|
}): ScriptExecutionContext;
|
|
178
180
|
//#endregion
|
|
179
181
|
//#region src/lifecycle/types.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { $ as exportSkills, 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 buildManifest, K as WebSkillErrorCode, L as SkillManifest, M as SkillDiscovery, N as SkillDocument, O as SKILL_NAME_PATTERN, P as SkillInstallSource, Q as escapeXml, R as SkillMetadata, S as FileSystemProvider, T as SKILLS_LOCKFILE, U as ValidationReport, V as SkillSource, W as VerifyResult, X as checkSkillRules, Y as checkDependencyCycles, Z as computeDigest, _ as RenderResultRequest, a as InteractionPolicy, at as renderAvailableSkillsXml, b as DiscoveryResult, c as LlmClient, ct as validateSkills, d as LlmResponse, et as isValidSkillName, f as LlmStreamEvent, g as RenderBlock, h as MemoryStore, i as FormField, it as parseSkillPackManifest, j as SkillCatalogEntry, k as SKILL_PACK_FILE, l as LlmCompleteInput, lt as verifyManifest, m as LlmToolSpec, n as ArtifactStore, nt as normalizePath, o as InteractionRequest, ot as renderCatalogJson, p as LlmToolCall, q as buildCatalog, r as ChartSpec, rt as parseSkillMarkdown, s as InteractionResponse, st as resolveInsideRoot, t as Artifact, tt as jsonRenderer, u as LlmMessage, ut as xmlRenderer, v as UiBridge, w as MemoryFS, x as FileStat, y as CatalogRenderer, z as SkillPackManifest } from "./types-CgNC-oQu-Dq_A1yA-.js";
|
|
2
|
-
import { $ as TraceEvent, A as OpenAiCompatibleClient, B as RunSnapshotStore, C as HookRunnerOptions, D as LifecycleHookContext, E as LifecycleHook, F as READ_SKILL_FILE_TOOL_NAME, G as SchemaInferer, H as RuntimePhase, I as RUN_SNAPSHOT_SCHEMA_VERSION, J as SkillRouter, K as ScriptExecutionContext, L as RouteResult, M as ProgressiveRouter, N as READ_SKILL_FILE_INPUT_SCHEMA, O as LifecycleListener, P as READ_SKILL_FILE_TOOL, Q as TraceClock, R as RunResult, S as HookRunner, T as LifecycleEvent, U as RuntimeRun, V as RunTerminationReason, W as RuntimeSession, X as ToolResolution, Y as ToolDefinition, Z as ToolResult, _ as ExternalToolSource, _t as parseBridgeRequest, a as AgentLoopConfig, at as WebSkillRuntimeDeps, b as FsRunSnapshotStore, bt as toLlmToolSpec, c as ApprovalScope, ct as createScriptContext, d as BridgeRequest, dt as fromVercelResult, et as TraceEventType, f as BridgeResponse, ft as fromVercelStreamPart, g as ExternalSkillProvider, gt as normalizeToolContent, h as EventBus, ht as networkUrlHost, i as AgentLoop, it as WebSkillRuntime, j as OpenAiCompatibleClientConfig, k as NetworkPolicy, l as BridgeCapabilities, lt as createWebSkillApi, m as CapabilityMode, mt as mergeCatalogEntries, n as ASK_USER_TOOL, nt as VercelToolSpec, o as AgentLoopDeps, ot as bridgeError, p as CapabilityApproval, pt as isNetworkAllowed, q as ScriptExecutor, r as ASK_USER_TOOL_NAME, rt as WebSkillApi, s as ApprovalDecision, st as buildRenderResult, t as ASK_USER_INPUT_SCHEMA, tt as TraceRecorder, u as BridgeCapability, ut as extractChartSpec, v as FsArtifactStore, vt as resolveToolName, w as InstalledSkillManifest, x as FullDisclosureRouter, xt as toVercelToolSpecs, y as FsMemoryStore, yt as schemaToForm, z as RunSnapshot } from "./index-
|
|
2
|
+
import { $ as TraceEvent, A as OpenAiCompatibleClient, B as RunSnapshotStore, C as HookRunnerOptions, D as LifecycleHookContext, E as LifecycleHook, F as READ_SKILL_FILE_TOOL_NAME, G as SchemaInferer, H as RuntimePhase, I as RUN_SNAPSHOT_SCHEMA_VERSION, J as SkillRouter, K as ScriptExecutionContext, L as RouteResult, M as ProgressiveRouter, N as READ_SKILL_FILE_INPUT_SCHEMA, O as LifecycleListener, P as READ_SKILL_FILE_TOOL, Q as TraceClock, R as RunResult, S as HookRunner, T as LifecycleEvent, U as RuntimeRun, V as RunTerminationReason, W as RuntimeSession, X as ToolResolution, Y as ToolDefinition, Z as ToolResult, _ as ExternalToolSource, _t as parseBridgeRequest, a as AgentLoopConfig, at as WebSkillRuntimeDeps, b as FsRunSnapshotStore, bt as toLlmToolSpec, c as ApprovalScope, ct as createScriptContext, d as BridgeRequest, dt as fromVercelResult, et as TraceEventType, f as BridgeResponse, ft as fromVercelStreamPart, g as ExternalSkillProvider, gt as normalizeToolContent, h as EventBus, ht as networkUrlHost, i as AgentLoop, it as WebSkillRuntime, j as OpenAiCompatibleClientConfig, k as NetworkPolicy, l as BridgeCapabilities, lt as createWebSkillApi, m as CapabilityMode, mt as mergeCatalogEntries, n as ASK_USER_TOOL, nt as VercelToolSpec, o as AgentLoopDeps, ot as bridgeError, p as CapabilityApproval, pt as isNetworkAllowed, q as ScriptExecutor, r as ASK_USER_TOOL_NAME, rt as WebSkillApi, s as ApprovalDecision, st as buildRenderResult, t as ASK_USER_INPUT_SCHEMA, tt as TraceRecorder, u as BridgeCapability, ut as extractChartSpec, v as FsArtifactStore, vt as resolveToolName, w as InstalledSkillManifest, x as FullDisclosureRouter, xt as toVercelToolSpecs, y as FsMemoryStore, yt as schemaToForm, z as RunSnapshot } from "./index-fjRF4H5o.js";
|
|
3
3
|
export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, 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, 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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { A as normalizeToolContent, C as createWebSkillApi, D as isNetworkAllowed, E as fromVercelStreamPart, F as toVercelToolSpecs, M as resolveToolName, N as schemaToForm, O as mergeCatalogEntries, P as toLlmToolSpec, S as createScriptContext, T as fromVercelResult, _ as RUN_SNAPSHOT_SCHEMA_VERSION, a as CapabilityApproval, b as bridgeError, c as FsMemoryStore, d as HookRunner, f as OpenAiCompatibleClient, g as READ_SKILL_FILE_TOOL_NAME, h as READ_SKILL_FILE_TOOL, i as AgentLoop, j as parseBridgeRequest, k as networkUrlHost, l as FsRunSnapshotStore, m as READ_SKILL_FILE_INPUT_SCHEMA, n as ASK_USER_TOOL, o as EventBus, p as ProgressiveRouter, r as ASK_USER_TOOL_NAME, s as FsArtifactStore, t as ASK_USER_INPUT_SCHEMA, u as FullDisclosureRouter, v as TraceRecorder, w as extractChartSpec, x as buildRenderResult, y as WebSkillRuntime } from "./dist-
|
|
1
|
+
import { C as renderCatalogJson, D as xmlRenderer, E as verifyManifest, S as renderAvailableSkillsXml, T as validateSkills, _ as isValidSkillName, a as SKILL_NAME_PATTERN, b as parseSkillMarkdown, c as SkillReader, d as buildManifest, f as checkDependencyCycles, g as exportSkills, h as escapeXml, i as SKILL_NAME_MAX_LENGTH, l as WebSkillError, m as computeDigest, n as SKILLS_LOCKFILE, o as SKILL_PACK_FILE, p as checkSkillRules, r as SKILL_MANIFEST_FILE, s as SkillDiscovery, t as MemoryFS, u as buildCatalog, v as jsonRenderer, w as resolveInsideRoot, x as parseSkillPackManifest, y as normalizePath } from "./dist-DS1sfgHa.js";
|
|
2
|
+
import { A as normalizeToolContent, C as createWebSkillApi, D as isNetworkAllowed, E as fromVercelStreamPart, F as toVercelToolSpecs, M as resolveToolName, N as schemaToForm, O as mergeCatalogEntries, P as toLlmToolSpec, S as createScriptContext, T as fromVercelResult, _ as RUN_SNAPSHOT_SCHEMA_VERSION, a as CapabilityApproval, b as bridgeError, c as FsMemoryStore, d as HookRunner, f as OpenAiCompatibleClient, g as READ_SKILL_FILE_TOOL_NAME, h as READ_SKILL_FILE_TOOL, i as AgentLoop, j as parseBridgeRequest, k as networkUrlHost, l as FsRunSnapshotStore, m as READ_SKILL_FILE_INPUT_SCHEMA, n as ASK_USER_TOOL, o as EventBus, p as ProgressiveRouter, r as ASK_USER_TOOL_NAME, s as FsArtifactStore, t as ASK_USER_INPUT_SCHEMA, u as FullDisclosureRouter, v as TraceRecorder, w as extractChartSpec, x as buildRenderResult, y as WebSkillRuntime } from "./dist-DRsnVw6A.js";
|
|
3
3
|
|
|
4
4
|
export { ASK_USER_INPUT_SCHEMA, ASK_USER_TOOL, ASK_USER_TOOL_NAME, AgentLoop, CapabilityApproval, EventBus, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FullDisclosureRouter, 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, 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 };
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as JsonSchema, N as SkillDocument, j as SkillCatalogEntry, m as LlmToolSpec } from "./types-CgNC-oQu-Dq_A1yA-.js";
|
|
2
|
-
import { Z as ToolResult, _ as ExternalToolSource, g as ExternalSkillProvider, mt as mergeCatalogEntries } from "./index-
|
|
2
|
+
import { Z as ToolResult, _ as ExternalToolSource, g as ExternalSkillProvider, mt as mergeCatalogEntries } from "./index-fjRF4H5o.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";
|
|
@@ -35,6 +35,11 @@ type TransportState = 'idle' | 'listening' | 'connected' | 'closed' | 'failed';
|
|
|
35
35
|
interface MessageChannelTransportOptions {
|
|
36
36
|
/** 缺省 = 当前 origin(无 window 环境时不校验);显式 ['*'] 才全放行 */
|
|
37
37
|
allowedOrigins?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* 严格 origin 模式(window 场景建议开启):开启后空/undefined origin 一律拒绝;
|
|
40
|
+
* 默认 false(兼容无 origin 概念的 MessagePort)
|
|
41
|
+
*/
|
|
42
|
+
strictOrigin?: boolean;
|
|
38
43
|
/** start 后等待首个合法消息的超时;0/缺省 = 不超时 */
|
|
39
44
|
connectionTimeoutMs?: number;
|
|
40
45
|
}
|
package/dist/mcp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as normalizeToolContent, O as mergeCatalogEntries } from "./dist-
|
|
1
|
+
import { l as WebSkillError } from "./dist-DS1sfgHa.js";
|
|
2
|
+
import { A as normalizeToolContent, O as mergeCatalogEntries } from "./dist-DRsnVw6A.js";
|
|
3
3
|
import { fromJSONSchema } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region ../mcp/dist/index.js
|
|
@@ -41,12 +41,14 @@ var MessageChannelTransport = class {
|
|
|
41
41
|
onmessage;
|
|
42
42
|
#port;
|
|
43
43
|
#allowedOrigins;
|
|
44
|
+
#strictOrigin;
|
|
44
45
|
#connectionTimeoutMs;
|
|
45
46
|
#state = "idle";
|
|
46
47
|
#listener;
|
|
47
48
|
#connectionTimer;
|
|
48
49
|
constructor(port, options = {}) {
|
|
49
50
|
this.#port = port;
|
|
51
|
+
this.#strictOrigin = options.strictOrigin ?? false;
|
|
50
52
|
this.#connectionTimeoutMs = options.connectionTimeoutMs ?? 0;
|
|
51
53
|
if (options.allowedOrigins !== void 0) this.#allowedOrigins = options.allowedOrigins;
|
|
52
54
|
else {
|
|
@@ -87,7 +89,7 @@ var MessageChannelTransport = class {
|
|
|
87
89
|
#originAllowed(origin) {
|
|
88
90
|
if (this.#allowedOrigins === void 0) return true;
|
|
89
91
|
if (this.#allowedOrigins.includes("*")) return true;
|
|
90
|
-
if (origin === void 0 || origin === "") return
|
|
92
|
+
if (origin === void 0 || origin === "") return !this.#strictOrigin;
|
|
91
93
|
return this.#allowedOrigins.includes(origin);
|
|
92
94
|
}
|
|
93
95
|
#onInbound(event) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//#region ../runtime/dist/memoryArtifactStore-C9lFVqPF.js
|
|
2
|
+
/** 内存 ArtifactStore:测试与浏览器降级用;索引随进程生命周期存在 */
|
|
3
|
+
var MemoryArtifactStore = class {
|
|
4
|
+
#byRun = /* @__PURE__ */ new Map();
|
|
5
|
+
#seq = 0;
|
|
6
|
+
async createTextArtifact(input) {
|
|
7
|
+
return this.#record({
|
|
8
|
+
runId: input.runId,
|
|
9
|
+
path: input.path,
|
|
10
|
+
type: "text",
|
|
11
|
+
size: new TextEncoder().encode(input.content).length,
|
|
12
|
+
mimeType: input.mimeType,
|
|
13
|
+
metadata: input.metadata
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
async createBinaryArtifact(input) {
|
|
17
|
+
return this.#record({
|
|
18
|
+
runId: input.runId,
|
|
19
|
+
path: input.path,
|
|
20
|
+
type: "binary",
|
|
21
|
+
size: input.content.length,
|
|
22
|
+
mimeType: input.mimeType,
|
|
23
|
+
metadata: input.metadata
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async listArtifacts(runId) {
|
|
27
|
+
return [...this.#byRun.get(runId) ?? []];
|
|
28
|
+
}
|
|
29
|
+
#record(input) {
|
|
30
|
+
const artifact = {
|
|
31
|
+
id: `art-${++this.#seq}`,
|
|
32
|
+
runId: input.runId,
|
|
33
|
+
path: input.path,
|
|
34
|
+
type: input.type,
|
|
35
|
+
mimeType: input.mimeType,
|
|
36
|
+
size: input.size,
|
|
37
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
38
|
+
metadata: input.metadata
|
|
39
|
+
};
|
|
40
|
+
const list = this.#byRun.get(input.runId) ?? [];
|
|
41
|
+
list.push(artifact);
|
|
42
|
+
this.#byRun.set(input.runId, list);
|
|
43
|
+
return artifact;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { MemoryArtifactStore as t };
|
package/dist/node.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
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-Dq_A1yA-.js";
|
|
2
|
-
import { ct as createScriptContext } from "./index-
|
|
3
|
-
import { a as LlmEnvConfig, c as OxcSchemaInferer, d as SkillManager, f as loadLlmConfigFromEnv, i as LlmCapabilities, l as SandboxOptions, m as readArchiveManifest, n as FileArtifactStore, o as NodeFS, p as probeLlmCapabilities, r as FileMemoryStore, s as NodeScriptExecutor, t as CliUiBridge, u as SandboxedScriptExecutor } from "./index-
|
|
2
|
+
import { ct as createScriptContext } from "./index-fjRF4H5o.js";
|
|
3
|
+
import { a as LlmEnvConfig, c as OxcSchemaInferer, d as SkillManager, f as loadLlmConfigFromEnv, i as LlmCapabilities, l as SandboxOptions, m as readArchiveManifest, n as FileArtifactStore, o as NodeFS, p as probeLlmCapabilities, r as FileMemoryStore, s as NodeScriptExecutor, t as CliUiBridge, u as SandboxedScriptExecutor } from "./index-DkPK44Ji.js";
|
|
4
4
|
export { CliUiBridge, FileArtifactStore, FileMemoryStore, type LlmCapabilities, type LlmEnvConfig, NodeFS, NodeScriptExecutor, OxcSchemaInferer, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, type SandboxOptions, SandboxedScriptExecutor, type SkillInstallSource, SkillManager, type SkillManifest, type SkillsLockfile, type VerifyResult, createScriptContext, loadLlmConfigFromEnv, probeLlmCapabilities, readArchiveManifest };
|
package/dist/node.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as createScriptContext } from "./dist-
|
|
3
|
-
import { a as NodeScriptExecutor, c as SkillManager, d as readArchiveManifest, i as NodeFS, l as loadLlmConfigFromEnv, n as FileArtifactStore, o as OxcSchemaInferer, r as FileMemoryStore, s as SandboxedScriptExecutor, t as CliUiBridge, u as probeLlmCapabilities } from "./dist-
|
|
1
|
+
import { n as SKILLS_LOCKFILE, r as SKILL_MANIFEST_FILE } from "./dist-DS1sfgHa.js";
|
|
2
|
+
import { S as createScriptContext } from "./dist-DRsnVw6A.js";
|
|
3
|
+
import { a as NodeScriptExecutor, c as SkillManager, d as readArchiveManifest, i as NodeFS, l as loadLlmConfigFromEnv, n as FileArtifactStore, o as OxcSchemaInferer, r as FileMemoryStore, s as SandboxedScriptExecutor, t as CliUiBridge, u as probeLlmCapabilities } from "./dist-SarUS8EP.js";
|
|
4
4
|
|
|
5
5
|
export { CliUiBridge, FileArtifactStore, FileMemoryStore, NodeFS, NodeScriptExecutor, OxcSchemaInferer, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SandboxedScriptExecutor, SkillManager, createScriptContext, loadLlmConfigFromEnv, probeLlmCapabilities, readArchiveManifest };
|
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MemoryArtifactStore } from "./memoryArtifactStore-C9lFVqPF-
|
|
2
|
-
import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-
|
|
1
|
+
import { t as MemoryArtifactStore } from "./memoryArtifactStore-C9lFVqPF-yFz6yJj0.js";
|
|
2
|
+
import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-CbM6rJ-E.js";
|
|
3
3
|
|
|
4
4
|
export { InMemoryStore, MemoryArtifactStore, MockLlmClient, MockUiBridge };
|
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-
|
|
1
|
+
import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-DxGyAznR.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.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-
|
|
1
|
+
import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-DxGyAznR.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
1
|
import { _ as RenderResultRequest, g as RenderBlock, o as InteractionRequest, r as ChartSpec, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-Dq_A1yA-.js";
|
|
2
|
-
import { st as buildRenderResult } from "./index-
|
|
2
|
+
import { st as buildRenderResult } from "./index-fjRF4H5o.js";
|
|
3
3
|
//#region ../ui/dist/index.d.ts
|
|
4
4
|
//#region src/model/formModel.d.ts
|
|
5
5
|
interface FormModel {
|
|
@@ -174,16 +174,7 @@ declare function toA2uiMessages(request: InteractionRequest): A2uiMessage[];
|
|
|
174
174
|
declare function fromA2uiAction(event: unknown): InteractionResponse;
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region src/a2uiRuntime/litRendererBridge.d.ts
|
|
177
|
-
/**
|
|
178
|
-
* A2UI 运行时桥(Lit 渲染器路径):
|
|
179
|
-
* InteractionRequest →(7A 转换器)→ A2UI v0.9.1 消息序列 →
|
|
180
|
-
* @a2ui/web_core MessageProcessor 处理 → @a2ui/lit 渲染到容器 →
|
|
181
|
-
* action 事件(合并双向绑定的表单数据模型)→ fromA2uiAction → InteractionResponse。
|
|
182
|
-
*
|
|
183
|
-
* 版本对齐:渲染器 @a2ui/lit@0.10.x 经 v0_9 入口同时接受 v0.9 / v0.9.1 消息
|
|
184
|
-
* (schema 枚举 ['v0.9','v0.9.1']),与 7A v0.9.1 转换产物直接兼容。
|
|
185
|
-
* @experimental
|
|
186
|
-
*/
|
|
177
|
+
/** @experimental */
|
|
187
178
|
declare class LitRendererBridge implements UiBridge {
|
|
188
179
|
#private;
|
|
189
180
|
constructor(deps: {
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as buildRenderResult } from "./dist-
|
|
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-
|
|
1
|
+
import { x as buildRenderResult } from "./dist-DRsnVw6A.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-DxGyAznR.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 };
|