@webskill/sdk 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/browser.d.ts +151 -4
- package/dist/browser.js +250 -25
- package/dist/{catalogComponents-Dr5dFMAb-DKH_7VPI.js → catalogComponents-DfxxfUvn-D55Gbb2l.js} +3435 -437
- package/dist/{dist-8oQRa8Xz.js → dist-59XlqDuv.js} +93 -6
- package/dist/{dist-DnYG2-eY.js → dist-CJqQsIm9.js} +498 -118
- package/dist/{dist-D0qW6e40.js → dist-DmI5SBBF.js} +192 -17
- package/dist/{eventTypes-DjIQpt8Y-Bj3vghj4.js → eventTypes-g1BXL6x5-CibcOftR.js} +7 -2
- package/dist/governance.d.ts +16 -3
- package/dist/governance.js +24 -5
- package/dist/{index-DkbABR43.d.ts → index-K-eewlGL.d.ts} +138 -75
- package/dist/{index-BwsK9lGk.d.ts → index-P9J2LTfU.d.ts} +163 -6
- package/dist/{index-Ba3xFtfz.d.ts → index-fLskQfAS.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/mcp.d.ts +8 -2
- package/dist/mcp.js +12 -2
- package/dist/{memoryArtifactStore-52Zn9npI-BMPYwvoy.js → memoryArtifactStore-52Zn9npI-upv5OWYf.js} +1 -1
- package/dist/node.d.ts +3 -3
- package/dist/node.js +3 -3
- package/dist/{openUiLibrary-Bdrji9qK-D2LxmM-a.js → openUiLibrary-DURlAxjk-CU6AzfSW.js} +3 -3
- package/dist/{skillVersionStore-Bl-ElD45-CWPvGvoq.d.ts → skillVersionStore-Bl-ElD45-gRfSaAby.d.ts} +1 -1
- package/dist/{testing-CYTFqkDm.js → testing-BCUO5gZR.js} +2 -2
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/dist/{types-CcxRLdJG-DCXyw1US.d.ts → types-B3n0cMZu-BdcqQ35O.d.ts} +46 -6
- package/dist/ui-react.d.ts +13 -6
- package/dist/ui-react.js +153 -84
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +2 -2
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +3 -3
- package/dist/{webskillLitCatalog-_mugzRHx-B_54vxum.js → webskillLitCatalog-DwTwSBFt-DiXXpNZA.js} +22 -3
- package/package.json +2 -2
package/dist/mcp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as JsonSchema,
|
|
2
|
-
import {
|
|
1
|
+
import { R as JsonSchema, g as LlmToolSpec, it as SkillDocument, nt as SkillCatalogEntry } from "./types-B3n0cMZu-BdcqQ35O.js";
|
|
2
|
+
import { O as ExternalSkillProvider, Pn as mergeCatalogEntries, Yt as ToolResult, k as ExternalToolSource } from "./index-K-eewlGL.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";
|
|
@@ -245,6 +245,12 @@ declare class ExperimentalWebMcpAdapter {
|
|
|
245
245
|
enabled?: boolean;
|
|
246
246
|
});
|
|
247
247
|
isAvailable(): boolean;
|
|
248
|
+
isEnabled(): boolean;
|
|
249
|
+
/**
|
|
250
|
+
* 宿主把开关交给用户时必须走这里:适配器是工具是否对 LLM 可见的**唯一闸门**。
|
|
251
|
+
* 宿主自己另存一份开关态而不同步到这里,会出现「界面上关了、模型照样能调」。
|
|
252
|
+
*/
|
|
253
|
+
setEnabled(on: boolean): void;
|
|
248
254
|
/** 工具清单(getTools 缺失时返回 undefined;调用失败时告警后返回 undefined) */
|
|
249
255
|
listTools(): Promise<WebMcpToolDescriptor[] | undefined>;
|
|
250
256
|
/** 工具名清单(getTools 缺失/失败时返回 undefined) */
|
package/dist/mcp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as messageOf, h as assertRemoteUrlAllowed, m as WebSkillError } from "./dist-59XlqDuv.js";
|
|
2
|
+
import { it as mergeCatalogEntries, lt as normalizeToolContent } from "./dist-DmI5SBBF.js";
|
|
3
3
|
|
|
4
4
|
//#region ../mcp/dist/index.js
|
|
5
5
|
/**
|
|
@@ -445,6 +445,16 @@ var ExperimentalWebMcpAdapter = class {
|
|
|
445
445
|
const api = this.#resolveApi();
|
|
446
446
|
return this.#enabled && typeof api?.executeTool === "function";
|
|
447
447
|
}
|
|
448
|
+
isEnabled() {
|
|
449
|
+
return this.#enabled;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* 宿主把开关交给用户时必须走这里:适配器是工具是否对 LLM 可见的**唯一闸门**。
|
|
453
|
+
* 宿主自己另存一份开关态而不同步到这里,会出现「界面上关了、模型照样能调」。
|
|
454
|
+
*/
|
|
455
|
+
setEnabled(on) {
|
|
456
|
+
this.#enabled = on;
|
|
457
|
+
}
|
|
448
458
|
/** 工具清单(getTools 缺失时返回 undefined;调用失败时告警后返回 undefined) */
|
|
449
459
|
async listTools() {
|
|
450
460
|
const api = this.#resolveApi();
|
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
|
|
2
|
-
import { Et as ScriptExecutor,
|
|
3
|
-
import { a as AuditLog, p as CandidateStore, r as ApprovalPolicy, u as CandidateSkill, v as SkillVersionStore } from "./skillVersionStore-Bl-ElD45-
|
|
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 TrustedKeyStore, at as SkillInstallSource, c as InteractionResponse, ct as SkillManagerPort, ht as SkillsLockfile, lt as SkillManifest, s as InteractionRequest, x as UiBridge, xt as VerifyResult, y as RenderResultRequest, yt as UnsignedPolicy } from "./types-B3n0cMZu-BdcqQ35O.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-K-eewlGL.js";
|
|
3
|
+
import { a as AuditLog, p as CandidateStore, r as ApprovalPolicy, u as CandidateSkill, v as SkillVersionStore } from "./skillVersionStore-Bl-ElD45-gRfSaAby.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
|
|
2
|
-
import { B as bridgeError, H as createScriptContext, L as WebSkillRuntime, c as CapabilityApproval,
|
|
1
|
+
import { A as messageOf, D as isValidSkillName, E as exportSkills, F as readSkillSignature, G as verifyManifest, K as verifySkillSignature, M as parseSkillMarkdown, N as parseSkillPackManifest, P as readResponseWithLimit, R as resolveArchiveLimits, U as unzipWithLimits, W as validateSkills, _ as atomicWriteText, g as assertSafePathSegment, h as assertRemoteUrlAllowed, m as WebSkillError, o as SKILLS_LOCKFILE, r as MANIFEST_EXCLUDED_FILES, s as SKILL_MANIFEST_FILE, u as SKILL_PACK_FILE, y as buildManifest, z as resolveInsideRoot } from "./dist-59XlqDuv.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-DmI5SBBF.js";
|
|
3
3
|
import { i as probeLlmCapabilities } from "./env-8cY40DXB-CGnEVZby.js";
|
|
4
|
-
import { t as AUDIT_EVENT_TYPES } from "./eventTypes-
|
|
4
|
+
import { t as AUDIT_EVENT_TYPES } from "./eventTypes-g1BXL6x5-CibcOftR.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { unzipSync, zipSync } from "fflate";
|
|
7
7
|
import { existsSync, promises, realpathSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as CatalogNode } from "./catalogComponents-
|
|
1
|
+
import { ft as uiCatalog } from "./dist-CJqQsIm9.js";
|
|
2
|
+
import { t as CatalogNode } from "./catalogComponents-DfxxfUvn-D55Gbb2l.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-
|
|
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 与描述,
|
package/dist/{skillVersionStore-Bl-ElD45-CWPvGvoq.d.ts → skillVersionStore-Bl-ElD45-gRfSaAby.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as PageQuery, I as FileSystemProvider, V as Page,
|
|
1
|
+
import { H as PageQuery, I as FileSystemProvider, V as Page, lt as SkillManifest, nt as SkillCatalogEntry } from "./types-B3n0cMZu-BdcqQ35O.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-
|
|
2
|
-
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-
|
|
1
|
+
import { m as WebSkillError } from "./dist-59XlqDuv.js";
|
|
2
|
+
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-upv5OWYf.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-
|
|
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-BdcqQ35O.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-
|
|
1
|
+
import { t as MemoryArtifactStore } from "./memoryArtifactStore-52Zn9npI-upv5OWYf.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-
|
|
3
|
+
import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-BCUO5gZR.js";
|
|
4
4
|
|
|
5
5
|
export { InMemoryStore, MemoryArtifactStore, MockLlmClient, MockUiBridge, loadAnthropicConfigFromEnv, loadGoogleConfigFromEnv, loadLlmConfigFromEnv };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
//#region ../core/dist/index.d.ts
|
|
2
2
|
//#region src/errors.d.ts
|
|
3
|
-
type WebSkillErrorCode = 'FS_NOT_FOUND' | 'FS_PATH_OUTSIDE_ROOT' | 'SKILL_NOT_FOUND' | 'SKILL_INVALID_METADATA' | 'SKILL_INVALID_NAME' | 'SKILL_DUPLICATE_NAME' | 'SKILL_UNSUPPORTED_SCRIPT' | 'VALIDATION_FAILED' | 'TOOL_NOT_FOUND' | 'TOOL_EXECUTION_FAILED' | 'NETWORK_BLOCKED' | 'TOOL_UNSUPPORTED' | 'TOOL_NOT_ALLOWED' | 'TOOL_SCHEMA_UNAVAILABLE' | 'TOOL_RESOLUTION_EXHAUSTED' | 'RUN_TIMEOUT' | 'RUN_MAX_TURNS_EXCEEDED' | 'RUN_FAILED' | 'RUN_CANCELLED' | 'RUN_INTERACTION_TIMEOUT' |
|
|
3
|
+
type WebSkillErrorCode = 'FS_NOT_FOUND' | 'FS_PATH_OUTSIDE_ROOT' | 'SKILL_NOT_FOUND' | 'SKILL_INVALID_METADATA' | 'SKILL_INVALID_NAME' | 'SKILL_DUPLICATE_NAME' | 'SKILL_UNSUPPORTED_SCRIPT' | 'SKILL_MANIFEST_PROTECTED' | 'VALIDATION_FAILED' | 'TOOL_NOT_FOUND' | 'TOOL_EXECUTION_FAILED' | 'NETWORK_BLOCKED' | 'TOOL_UNSUPPORTED' | 'TOOL_NOT_ALLOWED' | 'TOOL_SCHEMA_UNAVAILABLE' | 'TOOL_RESOLUTION_EXHAUSTED' | 'RUN_TIMEOUT' | 'RUN_MAX_TURNS_EXCEEDED' | 'RUN_FAILED' | 'RUN_CANCELLED' | 'RUN_INTERACTION_TIMEOUT' |
|
|
4
|
+
/** 历史里有未应答的工具调用,但当初为何中断已无从得知(分册 11 读取侧补齐) */
|
|
5
|
+
'RUN_INTERRUPTED' | 'UI_UNAVAILABLE' | 'LLM_UNAVAILABLE' | 'LLM_REQUEST_FAILED' | 'INSTALL_FAILED' | 'UNINSTALL_FAILED' | 'EXPORT_FAILED' | 'INTEGRITY_FAILED' | 'FS_PERMISSION_DENIED' | 'MCP_ENDPOINT_UNAVAILABLE' | 'MCP_TOOL_NOT_FOUND' | 'CANDIDATE_INVALID' | 'APPROVAL_REQUIRED' | 'SKILL_QUARANTINED' | 'SKILL_DISABLED' | 'SKILL_UNKNOWN_ALLOWED_TOOL' | 'SKILL_UNKNOWN_DEPENDENCY' | 'SKILL_CIRCULAR_DEPENDENCY' | 'GOVERNANCE_FAILED' | 'RUN_SNAPSHOT_NOT_FOUND' | 'RUN_SNAPSHOT_EXPIRED' | 'RUN_SNAPSHOT_INCOMPATIBLE' | 'RUN_SNAPSHOT_SCHEMA_UNSUPPORTED' | 'RUN_TRACE_INCOMPATIBLE' | 'SESSION_INCOMPATIBLE' | 'SIGNATURE_MISSING' | 'SIGNATURE_MALFORMED' | 'SIGNATURE_UNTRUSTED_KEY' | 'SIGNATURE_MISMATCH' | 'SIGNATURE_UNSUPPORTED' | 'MCP_STDIO_SPAWN_FAILED' | 'MCP_STDIO_EXITED' | 'MCP_STDIO_TIMEOUT' | 'MCP_OAUTH_REQUIRED' | 'MCP_OAUTH_FAILED' | 'MCP_OAUTH_NOT_CONFIGURED' | 'PAGE_ACTION_OUT_OF_SCOPE' | 'PAGE_ACTION_STALE_REF' | 'PAGE_ACTION_DECLINED' | 'TS_RESOURCE_URL_REJECTED' | 'TS_TRANSPILER_UNAVAILABLE' | 'TS_TRANSPILE_FAILED' | 'TODO_LIST_INVALID' | 'TODO_ITEM_NOT_FOUND' | 'SKILL_GENERATION_DISABLED' | 'SKILL_GENERATION_LIMIT_EXCEEDED' | 'SKILL_GENERATION_VALIDATION_FAILED' | 'DELEGATION_UNAVAILABLE' | 'DELEGATION_IN_PROGRESS' | 'DELEGATION_BUDGET_EXCEEDED' | 'PROFILE_IMPORT_INVALID' | 'PROFILE_IMPORT_VERSION_UNSUPPORTED' | 'PROFILE_IMPORT_CREDENTIAL_REJECTED' | 'PROFILE_KEY_UNAVAILABLE' | 'DICTATION_UNAVAILABLE' | 'DICTATION_PERMISSION_DENIED' | 'DICTATION_FAILED' | 'PERCEPTION_NOT_ENABLED' | 'PERCEPTION_FAILED' | 'MODEL_IMAGE_UNSUPPORTED' | 'MODEL_TOOLS_UNSUPPORTED' | 'ATTACHMENT_TOO_LARGE' | 'ATTACHMENT_TYPE_REJECTED';
|
|
4
6
|
/**
|
|
5
7
|
* 所有公开 API 抛出的结构化错误,code 供上层可编程处理
|
|
6
8
|
* @stable
|
|
@@ -471,6 +473,36 @@ declare function checkDependencyCycles(adjacency: Map<string, string[]>): {
|
|
|
471
473
|
involved: Set<string>;
|
|
472
474
|
};
|
|
473
475
|
//#endregion
|
|
476
|
+
//#region src/skill/archiveShape.d.ts
|
|
477
|
+
/**
|
|
478
|
+
* 归档的三种合法形态。本轮 bug 的成因是「安装认三种、预览只认扁平」,
|
|
479
|
+
* 抽出后不允许再分叉(设计 19 §2.1)。
|
|
480
|
+
*/
|
|
481
|
+
type SkillArchiveShape = 'pack-set' | 'flat' | 'nested-single' | 'invalid';
|
|
482
|
+
interface SkillArchiveDetection {
|
|
483
|
+
shape: SkillArchiveShape;
|
|
484
|
+
/** nested-single 时的顶层目录名(不含尾部斜杠),其余形态为 undefined */
|
|
485
|
+
rootDir?: string;
|
|
486
|
+
/** 无法判定时的原因,面向调用方,英文 */
|
|
487
|
+
reason?: string;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* 按归档条目表判定包结构。
|
|
491
|
+
*
|
|
492
|
+
* 入参是条目表而不是文件系统:预览侧只有解压后的 entries,没有落盘的目录。
|
|
493
|
+
* 只看路径,不读内容——内容合法性由 checkSkillRules 负责,两者不重叠。
|
|
494
|
+
*/
|
|
495
|
+
declare function detectSkillArchiveShape(entries: Iterable<string>): SkillArchiveDetection;
|
|
496
|
+
/** nested-single 时剥掉顶层目录,其余形态原样返回 */
|
|
497
|
+
declare function stripArchiveRoot<T>(entries: Record<string, T>, detection: SkillArchiveDetection): Record<string, T>;
|
|
498
|
+
/**
|
|
499
|
+
* 文件系统入口:安装管线拿到的是解压后的目录,不是条目表。
|
|
500
|
+
*
|
|
501
|
+
* 只探测判定所需的少量路径(不递归全量列举),再交给上面的纯函数——
|
|
502
|
+
* 判定规则仍然只有一份,这正是 S7 的目的。
|
|
503
|
+
*/
|
|
504
|
+
declare function detectSkillArchiveShapeFromFs(fs: FileSystemProvider, contentDir: string): Promise<SkillArchiveDetection>;
|
|
505
|
+
//#endregion
|
|
474
506
|
//#region src/skill/skillPack.d.ts
|
|
475
507
|
/**
|
|
476
508
|
* 技能包集(skill pack)格式与打包逻辑(node/browser 共用单一来源):
|
|
@@ -529,7 +561,9 @@ interface DiscoveryResult {
|
|
|
529
561
|
}
|
|
530
562
|
declare class SkillDiscovery {
|
|
531
563
|
#private;
|
|
532
|
-
constructor(fs: FileSystemProvider, roots: string[]
|
|
564
|
+
constructor(fs: FileSystemProvider, roots: string[], options?: {
|
|
565
|
+
extraKnownSkillNames?: readonly string[];
|
|
566
|
+
});
|
|
533
567
|
discover(): Promise<DiscoveryResult>;
|
|
534
568
|
catalog(): Promise<{
|
|
535
569
|
catalog: SkillCatalog;
|
|
@@ -548,8 +582,13 @@ interface ValidationReport {
|
|
|
548
582
|
/**
|
|
549
583
|
* 合规校验。内部直接复用 SkillDiscovery 的扫描逻辑,
|
|
550
584
|
* 规则判定同样落在 checkSkillRules 单一来源上。
|
|
585
|
+
*
|
|
586
|
+
* `extraKnownSkillNames`:扫描范围之外已存在的技能名。安装时只扫刚解出来的那一个目录,
|
|
587
|
+
* 不告诉它库里还有谁,任何指向包外的 dependencies 都会被判成不存在。
|
|
551
588
|
*/
|
|
552
|
-
declare function validateSkills(fs: FileSystemProvider, roots: string[]
|
|
589
|
+
declare function validateSkills(fs: FileSystemProvider, roots: string[], options?: {
|
|
590
|
+
extraKnownSkillNames?: readonly string[];
|
|
591
|
+
}): Promise<ValidationReport>;
|
|
553
592
|
//#endregion
|
|
554
593
|
//#region src/skill/reader.d.ts
|
|
555
594
|
/** 按技能名读取技能根目录内的文件,全部读取强制经过路径安全检查 */
|
|
@@ -582,7 +621,7 @@ declare function escapeXml(text: string): string;
|
|
|
582
621
|
declare function renderAvailableSkillsXml(catalog: SkillCatalog): string;
|
|
583
622
|
declare const xmlRenderer: CatalogRenderer;
|
|
584
623
|
//#endregion
|
|
585
|
-
//#region ../runtime/dist/types-
|
|
624
|
+
//#region ../runtime/dist/types-B3n0cMZu.d.ts
|
|
586
625
|
//#region src/llm/streamTypes.d.ts
|
|
587
626
|
/** 流式 LLM 事件(OpenAI SSE / Vercel fullStream 统一映射) */
|
|
588
627
|
type LlmStreamEvent = {
|
|
@@ -927,7 +966,8 @@ interface UiBridge {
|
|
|
927
966
|
interface FormField {
|
|
928
967
|
name: string;
|
|
929
968
|
label: string;
|
|
930
|
-
|
|
969
|
+
/** `password` 的值不进 paramHistory、不进行为记录、不落会话(FR-23.7) */
|
|
970
|
+
type: 'text' | 'number' | 'boolean' | 'select' | 'textarea' | 'file' | 'password';
|
|
931
971
|
required?: boolean;
|
|
932
972
|
description?: string;
|
|
933
973
|
defaultValue?: unknown;
|
|
@@ -969,4 +1009,4 @@ interface MemoryStore {
|
|
|
969
1009
|
transaction?<T>(scope: string, fn: (inner: MemoryStore) => Promise<T>): Promise<T>;
|
|
970
1010
|
}
|
|
971
1011
|
//#endregion
|
|
972
|
-
export {
|
|
1012
|
+
export { SkillArchiveDetection as $, validateSkills as $t, ArchiveLimits as A, checkSkillRules as At, MemoryFS as B, normalizePath as Bt, UiSpecDrafts as C, WebSkillErrorCode as Ct, UiSurfaceActionRequest as D, buildCatalog as Dt, UiSpecSnapshot as E, atomicWriteText as Et, FileStat as F, exportSkills as Ft, SKILLS_LOCKFILE as G, renderAvailableSkillsXml as Gt, PageQuery as H, parseSkillPackManifest as Ht, FileSystemProvider as I, isValidSkillName as It, SKILL_NAME_PATTERN as J, resolveInsideRoot as Jt, SKILL_MANIFEST_FILE as K, renderCatalogJson as Kt, FsTrustedKeyStore as L, jsonRenderer as Lt, CryptoKeyLike as M, detectSkillArchiveShape as Mt, DEFAULT_ARCHIVE_LIMITS as N, detectSkillArchiveShapeFromFs as Nt, UiSurfaceActionResponse as O, buildManifest as Ot, DiscoveryResult as P, escapeXml as Pt, SignatureVerdict as Q, unzipWithLimits as Qt, JsonSchema as R, keyIdOf as Rt, UiSpecActionCapability as S, WebSkillError as St, UiSpecPatch as T, assertSafePathSegment as Tt, RemoteUrlPolicy as U, readResponseWithLimit as Ut, Page as V, parseSkillMarkdown as Vt, SIGNATURE_SCHEMA_VERSION as W, readSkillSignature as Wt, SKILL_SIGNATURE_FILE as X, signaturePayloadBytes as Xt, SKILL_PACK_FILE as Y, signSkill as Yt, SignatureAuditSink as Z, stripArchiveRoot as Zt, MemoryStore as _, TrustedKeyStore as _t, InteractionOrigin as a, SkillInstallSource as at, SkillCandidateMarker as b, ValidationReport as bt, InteractionResponse as c, SkillManagerPort as ct, LlmContentPart as d, SkillPackManifest as dt, verifyManifest as en, SkillArchiveShape as et, LlmMessage as f, SkillReader as ft, LlmToolSpec as g, TrustedKey as gt, LlmToolCall as h, SkillsLockfile as ht, FormField as i, SkillDocument as it, CatalogRenderer as j, computeDigest as jt, extractSkillCandidate as k, checkDependencyCycles as kt, LlmClient as l, SkillManifest as lt, LlmStreamEvent as m, SkillSource as mt, ArtifactStore as n, xmlRenderer as nn, SkillCatalogEntry as nt, InteractionPolicy as o, SkillIssue as ot, LlmResponse as p, SkillSignature as pt, SKILL_NAME_MAX_LENGTH as q, resolveArchiveLimits as qt, ChartSpec as r, SkillDiscovery as rt, InteractionRequest as s, SkillLocation as st, Artifact as t, verifySkillSignature as tn, SkillCatalog as tt, LlmCompleteInput as u, SkillMetadata as ut, RenderBlock as v, UiSpecNode as vt, UiSpecEvent as w, assertRemoteUrlAllowed as wt, UiBridge as x, VerifyResult as xt, RenderResultRequest as y, UnsignedPolicy as yt, MANIFEST_EXCLUDED_FILES as z, messageOf as zt };
|
package/dist/ui-react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as UiSpecDrafts, D as UiSurfaceActionRequest, E as UiSpecSnapshot, O as UiSurfaceActionResponse, S as UiSpecActionCapability, c as InteractionResponse,
|
|
2
|
-
import {
|
|
1
|
+
import { C as UiSpecDrafts, D as UiSurfaceActionRequest, E as UiSpecSnapshot, O as UiSurfaceActionResponse, S as UiSpecActionCapability, c as InteractionResponse, s as InteractionRequest, vt as UiSpecNode, w as UiSpecEvent, x as UiBridge, y as RenderResultRequest } from "./types-B3n0cMZu-BdcqQ35O.js";
|
|
2
|
+
import { E as InteractionSpecLabels, R as SurfaceFormTexts } from "./index-P9J2LTfU.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { ComponentType, ReactNode } from "react";
|
|
4
|
+
import React$1, { ComponentType, ReactNode } from "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@json-render+core@0.19.0_zod@4.4.3/node_modules/@json-render/core/dist/store-utils-D98Czbil.d.ts
|
|
7
7
|
/**
|
|
@@ -433,7 +433,7 @@ interface JsonRenderSpecSurfaceProps {
|
|
|
433
433
|
* `vercel` 档:同一份 catalog 声明树交给 json-render 的 Registry 渲染。
|
|
434
434
|
* `@json-render/*` 是 optional peer,未安装时给出英文说明而不是空白。
|
|
435
435
|
*/
|
|
436
|
-
declare function JsonRenderSpecSurface({ spec, surfaceId, actions, onAction }: JsonRenderSpecSurfaceProps): import("react").JSX.Element
|
|
436
|
+
declare function JsonRenderSpecSurface({ spec, surfaceId, actions, onAction }: JsonRenderSpecSurfaceProps): import("react").JSX.Element;
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/catalog/jsonRenderRegistry.d.ts
|
|
439
439
|
/** catalog 的 action 名与 `UiSpecActionCapability['intent']` 一一对应 */
|
|
@@ -497,7 +497,7 @@ interface OpenUiSpecSurfaceProps {
|
|
|
497
497
|
* `openui` 档:同一份 catalog 声明树经 openui-lang 交给 OpenUI 的 Renderer。
|
|
498
498
|
* `@openuidev/react-lang` 是 optional peer,未安装时给出英文说明而不是空白。
|
|
499
499
|
*/
|
|
500
|
-
declare function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }: OpenUiSpecSurfaceProps): import("react").JSX.Element
|
|
500
|
+
declare function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }: OpenUiSpecSurfaceProps): import("react").JSX.Element;
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region src/catalog/catalogComponents.d.ts
|
|
503
503
|
type CatalogNodeProps = {
|
|
@@ -511,4 +511,11 @@ type CatalogNodeProps = {
|
|
|
511
511
|
*/
|
|
512
512
|
declare const catalogComponentImpls: Record<string, (input: CatalogNodeProps) => ReactNode>;
|
|
513
513
|
//#endregion
|
|
514
|
-
|
|
514
|
+
//#region src/catalog/surfaceFormTexts.d.ts
|
|
515
|
+
declare function useSurfaceFormTexts(): SurfaceFormTexts;
|
|
516
|
+
declare function SurfaceFormTextsProvider({ texts, children }: {
|
|
517
|
+
texts?: Partial<SurfaceFormTexts> | undefined;
|
|
518
|
+
children: ReactNode;
|
|
519
|
+
}): import("react").JSX.Element;
|
|
520
|
+
//#endregion
|
|
521
|
+
export { type CatalogNodeProps, type CustomSurfaceActionEvent, type DroppedSurfaceActionWarning, InteractionForm, type JsonRenderActionDispatch, JsonRenderSpecSurface, type JsonRenderSpecSurfaceProps, NATIVE_SPEC_COMPONENTS, NativeSpecSurface, type NativeSpecSurfaceProps, OpenUiSpecSurface, type OpenUiSpecSurfaceProps, ReactBridgeState, type ReactBridgeStateOptions, type RegisteredSurfaceProps, ResultBlocks, SpecInteractionChannel, type SpecInteractionSession, StreamingText, SurfaceFormTextsProvider, type SurfaceRegistration, SurfaceRegistry, type UiSurfaceActionEvent, UiSurfaceList, type UiSurfaceListProps, UiSurfaceSnapshotList, type UiSurfaceSnapshotListProps, UiSurfaceStore, catalogComponentImpls, createJsonRenderRegistry, probeJsonRenderAvailability, useSurfaceFormTexts };
|