@webskill/sdk 0.12.0 → 0.14.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 +3 -3
- package/dist/agent.js +3 -3
- package/dist/browser.d.ts +250 -9
- package/dist/browser.js +1257 -95
- package/dist/{catalogComponents-BgAJN0p8-C3K8klJd.js → catalogComponents-BgAJN0p8-Cr55ouOg.js} +348 -14
- package/dist/{dist-sdKFgERo.js → dist-Bfga1TmS.js} +368 -34
- package/dist/{dist-DU9KDAuR.js → dist-BnqAkSS6.js} +965 -49
- package/dist/{dist-DqcL6jKO.js → dist-CiaDIqkV.js} +2 -2
- package/dist/{dist-Bev6i6Ip.js → dist-D5YhlCdY.js} +59 -1
- package/dist/governance.d.ts +3 -3
- package/dist/governance.js +2 -2
- package/dist/{index-C9pzXLKy.d.ts → index-CWoKOFBP.d.ts} +86 -5
- package/dist/{index-DFhU1uks.d.ts → index-DQwGvHAI.d.ts} +447 -22
- package/dist/{index-3fCHc1mQ.d.ts → index-sd-gVKey.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/mcp.d.ts +77 -3
- package/dist/mcp.js +78 -4
- package/dist/{memoryArtifactStore-52Zn9npI-LbCQaqyx.js → memoryArtifactStore-52Zn9npI-BxtUkrgV.js} +1 -1
- package/dist/node.d.ts +3 -3
- package/dist/node.js +6 -6
- package/dist/{openUiLibrary-BKXW7Iwx-DaymVubt.js → openUiLibrary-BKXW7Iwx-DjvEnMlJ.js} +2 -2
- package/dist/{skillVersionStore-D-qHk9ZE-DheTIwAB.d.ts → skillVersionStore-D-qHk9ZE-C0OFDTQY.d.ts} +1 -1
- package/dist/{testing-WPTyXQYt.js → testing-Cm8MseLF.js} +2 -2
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/dist/{types-DLctJep_-B5G4uk2u.d.ts → types-C3V6lAeO-BgeOvc1Y.d.ts} +63 -4
- package/dist/ui-react.d.ts +2 -2
- package/dist/ui-react.js +13 -11
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +2 -2
- package/dist/{webskillLitCatalog-D_zCqeQF-C9lrvvMr.js → webskillLitCatalog-D_zCqeQF-swXsWoAe.js} +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as
|
|
1
|
+
import { $ as SKILLS_LOCKFILE, $t as normalizePath, A as extractSkillCandidate, At as VerifyResult, B as DiscoveryResult, Bt as checkSkillRules, C as UiSpecActionCapability, Ct as SkillsLockfile, D as UiSpecSnapshot, Dt as UiSpecNode, E as UiSpecPatch, Et as TrustedKeyStore, F as CatalogRenderer, Ft as assertSafePathSegment, G as IMAGE_MIME_TYPES, Gt as escapeXml, H as FileStat, Ht as computeDigest, I as ChatAttachmentKind, It as atomicWriteText, J as MemoryFS, Jt as isAtomicTempPath, K as JsonSchema, Kt as exportSkills, L as CryptoKeyLike, Lt as buildCatalog, M as ATTACHMENT_TEXT_LIMIT, Mt as WebSkillErrorCode, N as ArchiveLimits, Nt as XLSX_MIME, O as UiSurfaceActionRequest, Ot as UnsignedPolicy, P as AttachmentTextInput, Pt as assertRemoteUrlAllowed, Q as SIGNATURE_SCHEMA_VERSION, Qt as messageOf, R as DEFAULT_ARCHIVE_LIMITS, Rt as buildManifest, S as UiBridge, St as SkillSource, T as UiSpecEvent, Tt as TrustedKey, U as FileSystemProvider, Ut as detectSkillArchiveShape, V as FILE_MIME_TYPES, Vt as classifyAttachment, W as FsTrustedKeyStore, Wt as detectSkillArchiveShapeFromFs, X as PageQuery, Xt as jsonRenderer, Y as Page, Yt as isValidSkillName, Z as RemoteUrlPolicy, Zt as keyIdOf, _ as LlmToolSpec, _t as SkillManifest, a as InteractionOrigin, an as renderCatalogJson, at as SignatureAuditSink, b as RenderResultRequest, bt as SkillReader, c as InteractionResponse, cn as signSkill, ct as SkillArchiveShape, d as LlmContentPart, dn as unzipWithLimits, dt as SkillDiscovery, en as parseSkillMarkdown, et as SKILL_MANIFEST_FILE, f as LlmMessage, fn as validateSkills, ft as SkillDocument, g as LlmToolCall, gt as SkillManagerPort, h as LlmTokenUsage, hn as xmlRenderer, ht as SkillLocation, i as FormField, in as renderAvailableSkillsXml, it as SKILL_SIGNATURE_FILE, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as WebSkillError, k as UiSurfaceActionResponse, kt as ValidationReport, l as LlmClient, ln as signaturePayloadBytes, lt as SkillCatalog, m as LlmStreamEvent, mn as verifySkillSignature, mt as SkillIssue, n as ArtifactStore, nn as readResponseWithLimit, nt as SKILL_NAME_PATTERN, o as InteractionPolicy, on as resolveArchiveLimits, ot as SignatureVerdict, p as LlmResponse, pn as verifyManifest, pt as SkillInstallSource, q as MANIFEST_EXCLUDED_FILES, qt as formatAttachmentText, r as ChartSpec, rn as readSkillSignature, rt as SKILL_PACK_FILE, s as InteractionRequest, sn as resolveInsideRoot, st as SkillArchiveDetection, t as Artifact, tn as parseSkillPackManifest, tt as SKILL_NAME_MAX_LENGTH, u as LlmCompleteInput, un as stripArchiveRoot, ut as SkillCatalogEntry, v as MemoryStore, vt as SkillMetadata, w as UiSpecDrafts, wt as TEXT_EXTENSIONS, x as SkillCandidateMarker, xt as SkillSignature, y as RenderBlock, yt as SkillPackManifest, z as DOCX_MIME, zt as checkDependencyCycles } from "./types-C3V6lAeO-BgeOvc1Y.js";
|
|
2
|
+
import { $ as LifecycleEventInit, $n as formatSkillScriptManifest, $t as SkillIntegrityGuard, A as DataSourceInfo, An as UnsupportedRunSnapshot, Ar as textParts, At as RunTraceMetrics, B as FsRunSnapshotStore, Bn as XlsxTextExtractor, Bt as SUPPORTED_DOCUMENT_MIME, C as CapabilityApproval, Cn as TraceRecorder, Cr as sampleBehaviorRecords, Ct as RunSnapshot, D as DEFAULT_MAX_DOCUMENT_BYTES, Dn as USER_PROFILE_NO_INVENTION_RULE, Dr as sealToolCallPairs, Dt as RunToolCall, E as DEFAULT_MAX_DATA_SOURCE_BYTES, En as USER_PROFILE_KEY, Er as scriptToolName, Et as RunTerminationReason, F as ExternalSkillProvider, Fn as UserProfileLimits, Fr as validateUiSpecEvent, Ft as RuntimeRun, G as GoogleGenAiClient, Gn as createScriptContext, Gt as SealRecord, H as FsSessionStore, Hn as applyUserProfileImport, Ht as ScriptExecutionContext, I as ExternalToolSource, In as VercelToolSpec, Ir as validateUiSpecNode, It as RuntimeSession, J as HookRunnerOptions, Jn as exportUserProfile, Jt as SessionListPage, K as GoogleGenAiClientConfig, Kn as createWebSkillApi, Kt as SealResult, L as FS_SESSION_PAGE_SIZE, Ln as WebSkillApi, Lt as RuntimeSessionHandle, M as EMPTY_USER_PROFILE, Mn as UserProfileEntry, Mr as toLlmToolSpec, Mt as RunTraceSummary, N as EventBus, Nn as UserProfileExport, Nr as toRecordDigests, Nt as RunUsageSummary, O as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, On as USER_PROFILE_PROMPT_HEADER, Or as summarizeRunUsage, Ot as RunTraceFile, P as ExecuteLifecycleData, Pn as UserProfileImportDiff, Pr as toVercelToolSpecs, Pt as RuntimePhase, Q as LifecycleEvent, Qn as findUnpairedToolCalls, Qt as SkillFailureReport, R as FsArtifactStore, Rn as WebSkillRuntime, Rt as SENSITIVE_ANNOTATION, S as BridgeResponse, Sn as TraceEventType, Sr as resolveToolName, St as RunResult, T as DEFAULT_LOOP_LIMITS, Tn as USER_PROFILE_EXPORT_VERSION, Tr as schemaToForm, Tt as RunSnapshotStore, U as FsToolStepStore, Un as bridgeError, Ut as ScriptExecutor, V as FsRunTraceStore, Vn as appendBehaviorRecords, Vt as SchemaInferer, W as FullDisclosureRouter, Wn as buildRenderResult, Wt as SealOptions, X as IntegrityVerdict, Xn as extractTodoTraceEvents, Xt as SessionRecord, Y as InstalledSkillManifest, Yn as extractChartSpec, Yt as SessionMeta, Z as InteractLifecycleData, Zn as extractUiSpecEvents, Zt as SessionStore, _ as BehaviorRecordKind, _n as ToolStepRecord, _r as readProfileEntries, _t as RedactedArgs, a as ASK_USER_TOOL, an as SkillSuccessReport, ar as listSkillScripts, at as NetworkPolicy, b as BridgeCapability, bn as TraceClock, br as refineUserProfile, bt as RouteResult, c as AgentLoop, cn as TextualToolContent, cr as networkPolicyLibSource, ct as PdfTextExtractor, d as AnthropicClient, dn as ToolContent, dr as normalizeToolContent, dt as READ_LINKED_DOCUMENT_TOOL_NAME, en as SkillOutcomeReporter, er as fromVercelResult, et as LifecycleHook, f as AnthropicClientConfig, fn as ToolDefinition, fr as normalizeToolError, ft as READ_SKILL_FILE_INPUT_SCHEMA, g as BehaviorRecord, gn as ToolStepReader, gr as readBehaviorRecords, gt as RUN_TRACE_SCHEMA_VERSION, h as BEHAVIOR_RECORDS_KEY, hn as ToolResult, hr as partsToText, ht as RUN_SNAPSHOT_SCHEMA_VERSION, i as ASK_USER_MAX_FIELDS, in as SkillStateGuard, ir as isUnsupportedRunSnapshot, it as MAX_TOOL_STEP_ARG_BYTES, j as DocxTextExtractor, jn as UserProfile, jr as toBase64, jt as RunTraceStore, k as DEFAULT_USER_PROFILE_LIMITS, kn as USER_PROFILE_REFINE_PROMPT, kr as summarizeToolCalls, kt as RunTraceFilter, l as AgentLoopConfig, ln as TodoTraceEvent, lr as networkUrlHost, lt as ProgressiveRouter, m as ApprovalScope, mn as ToolResolution, mr as parseUserProfileExport, mt as READ_SKILL_FILE_TOOL_NAME, n as ASK_USER_FIELD_TYPES, nn as SkillScriptDescriptor, nr as interruptedToolResult, nt as LifecycleListener, o as ASK_USER_TOOL_NAME, on as TEXT_BUDGETED_CONTENT_TYPES, or as mergeCatalogEntries, ot as OpenAiCompatibleClient, p as ApprovalDecision, pn as ToolDisclosure, pr as parseBridgeRequest, pt as READ_SKILL_FILE_TOOL, q as HookRunner, qn as diffUserProfile, qt as SerializingMemoryStore, r as ASK_USER_INPUT_SCHEMA, rn as SkillScriptSchemaSource, rr as isNetworkAllowed, rt as LinkedDocumentReader, s as ActivateLifecycleData, sn as TerminalLifecycleData, sr as mergeProfileEntries, st as OpenAiCompatibleClientConfig, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as SkillRouter, tr as fromVercelStreamPart, tt as LifecycleHookContext, u as AgentLoopDeps, un as ToolCallContext, ur as normalizeErrorCode, ut as READ_LINKED_DOCUMENT_TOOL, v as BehaviorScene, vn as ToolStepStore, vr as readUserProfile, vt as RefineUserProfileInput, w as CapabilityMode, wn as UNSUPPORTED_DOCUMENT_MESSAGE, wr as schemaSourceLabel, wt as RunSnapshotListEntry, x as BridgeRequest, xn as TraceEvent, xr as renderUserProfileContext, xt as RunLimitErrorDetails, y as BridgeCapabilities, yn as ToolStepTrust, yr as redactToolStepArgs, yt as RouteLifecycleData, z as FsMemoryStore, zn as WebSkillRuntimeDeps, zt as SESSION_SCHEMA_VERSION } from "./index-CWoKOFBP.js";
|
|
3
3
|
//#region src/version.d.ts
|
|
4
4
|
/** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
|
|
5
5
|
/**
|
|
6
6
|
* Version of the published `@webskill/sdk` package, injected at build time.
|
|
7
7
|
* @stable
|
|
8
8
|
*/
|
|
9
|
-
declare const SDK_VERSION = "0.
|
|
9
|
+
declare const SDK_VERSION = "0.14.0";
|
|
10
10
|
//#endregion
|
|
11
|
-
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_FIELD_TYPES, ASK_USER_INPUT_SCHEMA, ASK_USER_MAX_FIELDS, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, BEHAVIOR_RECORDS_KEY, type BehaviorRecord, type BehaviorRecordKind, type BehaviorScene, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, DEFAULT_USER_PROFILE_LIMITS, type DiscoveryResult, type DocxTextExtractor, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionOrigin, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LinkedDocumentReader, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmTokenUsage, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, ProgressiveRouter, READ_LINKED_DOCUMENT_TOOL, READ_LINKED_DOCUMENT_TOOL_NAME, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RedactedArgs, type RefineUserProfileInput, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunLimitErrorDetails, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RunUsageSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SDK_VERSION, SENSITIVE_ANNOTATION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SUPPORTED_DOCUMENT_MIME, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, type SealOptions, type SealRecord, type SealResult, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillArchiveDetection, type SkillArchiveShape, type SkillCandidateMarker, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillSuccessReport, type SkillsLockfile, TEXT_BUDGETED_CONTENT_TYPES, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolContent, type ToolDefinition, type ToolResolution, type ToolResult, type ToolStepReader, type ToolStepRecord, type ToolStepStore, type ToolStepTrust, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, UNSUPPORTED_DOCUMENT_MESSAGE, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type UserProfile, type UserProfileEntry, type UserProfileExport, type UserProfileImportDiff, type UserProfileLimits, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, redactToolStepArgs, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
|
11
|
+
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_FIELD_TYPES, ASK_USER_INPUT_SCHEMA, ASK_USER_MAX_FIELDS, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, ATTACHMENT_TEXT_LIMIT, type ActivateLifecycleData, AgentLoop, type AgentLoopConfig, type AgentLoopDeps, AnthropicClient, type AnthropicClientConfig, type ApprovalDecision, type ApprovalScope, type ArchiveLimits, type Artifact, type ArtifactStore, type AttachmentTextInput, BEHAVIOR_RECORDS_KEY, type BehaviorRecord, type BehaviorRecordKind, type BehaviorScene, type BridgeCapabilities, type BridgeCapability, type BridgeRequest, type BridgeResponse, CapabilityApproval, type CapabilityMode, type CatalogRenderer, type ChartSpec, type ChatAttachmentKind, type CryptoKeyLike, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, DEFAULT_USER_PROFILE_LIMITS, DOCX_MIME, type DataSourceInfo, type DiscoveryResult, type DocxTextExtractor, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, FILE_MIME_TYPES, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, IMAGE_MIME_TYPES, type InstalledSkillManifest, type IntegrityVerdict, type InteractLifecycleData, type InteractionOrigin, type InteractionPolicy, type InteractionRequest, type InteractionResponse, type JsonSchema, type LifecycleEvent, type LifecycleEventInit, type LifecycleHook, type LifecycleHookContext, type LifecycleListener, type LinkedDocumentReader, type LlmClient, type LlmCompleteInput, type LlmContentPart, type LlmMessage, type LlmResponse, type LlmStreamEvent, type LlmTokenUsage, type LlmToolCall, type LlmToolSpec, MANIFEST_EXCLUDED_FILES, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, type MemoryStore, type NetworkPolicy, OpenAiCompatibleClient, type OpenAiCompatibleClientConfig, type Page, type PageQuery, type PdfTextExtractor, ProgressiveRouter, READ_LINKED_DOCUMENT_TOOL, READ_LINKED_DOCUMENT_TOOL_NAME, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, type RedactedArgs, type RefineUserProfileInput, type RemoteUrlPolicy, type RenderBlock, type RenderResultRequest, type RouteLifecycleData, type RouteResult, type RunLimitErrorDetails, type RunResult, type RunSnapshot, type RunSnapshotListEntry, type RunSnapshotStore, type RunTerminationReason, type RunToolCall, type RunTraceFile, type RunTraceFilter, type RunTraceMetrics, type RunTraceStore, type RunTraceSummary, type RunUsageSummary, type RuntimePhase, type RuntimeRun, type RuntimeSession, type RuntimeSessionHandle, SDK_VERSION, SENSITIVE_ANNOTATION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SUPPORTED_DOCUMENT_MIME, type SchemaInferer, type ScriptExecutionContext, type ScriptExecutor, type SealOptions, type SealRecord, type SealResult, SerializingMemoryStore, type SessionListPage, type SessionMeta, type SessionRecord, type SessionStore, type SignatureAuditSink, type SignatureVerdict, type SkillArchiveDetection, type SkillArchiveShape, type SkillCandidateMarker, type SkillCatalog, type SkillCatalogEntry, SkillDiscovery, type SkillDocument, type SkillFailureReport, type SkillInstallSource, type SkillIntegrityGuard, type SkillIssue, type SkillLocation, type SkillManagerPort, type SkillManifest, type SkillMetadata, type SkillOutcomeReporter, type SkillPackManifest, SkillReader, type SkillRouter, type SkillScriptDescriptor, type SkillScriptSchemaSource, type SkillSignature, type SkillSource, type SkillStateGuard, type SkillSuccessReport, type SkillsLockfile, TEXT_BUDGETED_CONTENT_TYPES, TEXT_EXTENSIONS, type TerminalLifecycleData, type TextualToolContent, type TodoTraceEvent, type ToolCallContext, type ToolContent, type ToolDefinition, type ToolDisclosure, type ToolResolution, type ToolResult, type ToolStepReader, type ToolStepRecord, type ToolStepStore, type ToolStepTrust, type TraceClock, type TraceEvent, type TraceEventType, TraceRecorder, type TrustedKey, type TrustedKeyStore, UNSUPPORTED_DOCUMENT_MESSAGE, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, type UiBridge, type UiSpecActionCapability, type UiSpecDrafts, type UiSpecEvent, type UiSpecNode, type UiSpecPatch, type UiSpecSnapshot, type UiSurfaceActionRequest, type UiSurfaceActionResponse, type UnsignedPolicy, type UnsupportedRunSnapshot, type UserProfile, type UserProfileEntry, type UserProfileExport, type UserProfileImportDiff, type UserProfileLimits, type ValidationReport, type VercelToolSpec, type VerifyResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, XLSX_MIME, type XlsxTextExtractor, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatAttachmentText, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, redactToolStepArgs, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-
|
|
3
|
-
import { $ as bridgeError, A as ProgressiveRouter, At as refineUserProfile, B as SUPPORTED_DOCUMENT_MIME, Bt as
|
|
1
|
+
import { $ as unzipWithLimits, A as computeDigest, B as messageOf, C as assertSafePathSegment, D as checkDependencyCycles, E as buildManifest, F as formatAttachmentText, G as readSkillSignature, H as parseSkillMarkdown, I as isAtomicTempPath, J as resolveArchiveLimits, K as renderAvailableSkillsXml, L as isValidSkillName, M as detectSkillArchiveShapeFromFs, N as escapeXml, O as checkSkillRules, P as exportSkills, Q as stripArchiveRoot, R as jsonRenderer, S as assertRemoteUrlAllowed, T as buildCatalog, U as parseSkillPackManifest, V as normalizePath, W as readResponseWithLimit, X as signSkill, Y as resolveInsideRoot, Z as signaturePayloadBytes, _ as SkillDiscovery, a as FILE_MIME_TYPES, b as WebSkillError, c as MANIFEST_EXCLUDED_FILES, d as SKILLS_LOCKFILE, et as validateSkills, f as SKILL_MANIFEST_FILE, g as SKILL_SIGNATURE_FILE, h as SKILL_PACK_FILE, i as DOCX_MIME, j as detectSkillArchiveShape, k as classifyAttachment, l as MemoryFS, m as SKILL_NAME_PATTERN, n as ATTACHMENT_TEXT_LIMIT, nt as verifySkillSignature, o as FsTrustedKeyStore, p as SKILL_NAME_MAX_LENGTH, q as renderCatalogJson, r as DEFAULT_ARCHIVE_LIMITS, rt as xmlRenderer, s as IMAGE_MIME_TYPES, t as ATOMIC_TMP_SUFFIX_PATTERN, tt as verifyManifest, u as SIGNATURE_SCHEMA_VERSION, v as SkillReader, w as atomicWriteText, x as XLSX_MIME, y as TEXT_EXTENSIONS, z as keyIdOf } from "./dist-D5YhlCdY.js";
|
|
2
|
+
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-BxtUkrgV.js";
|
|
3
|
+
import { $ as bridgeError, A as ProgressiveRouter, At as refineUserProfile, B as SUPPORTED_DOCUMENT_MIME, Bt as toBase64, C as FsSessionStore, Ct as normalizeToolError, D as HookRunner, Dt as readProfileEntries, E as GoogleGenAiClient, Et as readBehaviorRecords, F as READ_SKILL_FILE_TOOL_NAME, Ft as schemaToForm, G as USER_PROFILE_EXPORT_VERSION, Gt as validateUiSpecNode, H as TEXT_BUDGETED_CONTENT_TYPES, Ht as toRecordDigests, I as RUN_SNAPSHOT_SCHEMA_VERSION, It as scriptToolName, J as USER_PROFILE_PROMPT_HEADER, K as USER_PROFILE_KEY, L as RUN_TRACE_SCHEMA_VERSION, Lt as sealToolCallPairs, M as READ_LINKED_DOCUMENT_TOOL_NAME, Mt as resolveToolName, N as READ_SKILL_FILE_INPUT_SCHEMA, Nt as sampleBehaviorRecords, O as MAX_TOOL_STEP_ARG_BYTES, Ot as readUserProfile, P as READ_SKILL_FILE_TOOL, Pt as schemaSourceLabel, Q as applyUserProfileImport, R as SENSITIVE_ANNOTATION, Rt as summarizeRunUsage, S as FsRunTraceStore, St as normalizeToolContent, T as FullDisclosureRouter, Tt as parseUserProfileExport, U as TraceRecorder, Ut as toVercelToolSpecs, V as SerializingMemoryStore, Vt as toLlmToolSpec, W as UNSUPPORTED_DOCUMENT_MESSAGE, Wt as validateUiSpecEvent, X as WebSkillRuntime, Y as USER_PROFILE_REFINE_PROMPT, Z as appendBehaviorRecords, _ as EventBus, _t as mergeCatalogEntries, a as ASK_USER_TOOL, at as extractChartSpec, b as FsMemoryStore, bt as networkUrlHost, c as AnthropicClient, ct as extractUiSpecEvents, d as DEFAULT_LOOP_LIMITS, dt as fromVercelResult, et as buildRenderResult, f as DEFAULT_MAX_DATA_SOURCE_BYTES, ft as fromVercelStreamPart, g as EMPTY_USER_PROFILE, gt as listSkillScripts, h as DEFAULT_USER_PROFILE_LIMITS, ht as isUnsupportedRunSnapshot, i as ASK_USER_MAX_FIELDS, it as exportUserProfile, j as READ_LINKED_DOCUMENT_TOOL, jt as renderUserProfileContext, k as OpenAiCompatibleClient, kt as redactToolStepArgs, l as BEHAVIOR_RECORDS_KEY, lt as findUnpairedToolCalls, m as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, mt as isNetworkAllowed, n as ASK_USER_FIELD_TYPES, nt as createWebSkillApi, o as ASK_USER_TOOL_NAME, ot as extractSkillCandidate, p as DEFAULT_MAX_DOCUMENT_BYTES, pt as interruptedToolResult, q as USER_PROFILE_NO_INVENTION_RULE, r as ASK_USER_INPUT_SCHEMA, rt as diffUserProfile, s as AgentLoop, st as extractTodoTraceEvents, t as ALLOWED_TOOLS_EXCLUSION_REASON, tt as createScriptContext, u as CapabilityApproval, ut as formatSkillScriptManifest, v as FS_SESSION_PAGE_SIZE, vt as mergeProfileEntries, w as FsToolStepStore, wt as parseBridgeRequest, x as FsRunSnapshotStore, xt as normalizeErrorCode, y as FsArtifactStore, yt as networkPolicyLibSource, z as SESSION_SCHEMA_VERSION, zt as summarizeToolCalls } from "./dist-Bfga1TmS.js";
|
|
4
4
|
|
|
5
5
|
//#region src/version.ts
|
|
6
6
|
/** Generated by scripts/syncVersionConstant.mjs from packages/sdk/package.json. Do not edit by hand. */
|
|
@@ -8,7 +8,7 @@ import { $ as bridgeError, A as ProgressiveRouter, At as refineUserProfile, B as
|
|
|
8
8
|
* Version of the published `@webskill/sdk` package, injected at build time.
|
|
9
9
|
* @stable
|
|
10
10
|
*/
|
|
11
|
-
const SDK_VERSION = "0.
|
|
11
|
+
const SDK_VERSION = "0.14.0";
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
|
-
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_FIELD_TYPES, ASK_USER_INPUT_SCHEMA, ASK_USER_MAX_FIELDS, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, DEFAULT_USER_PROFILE_LIMITS, EMPTY_USER_PROFILE, EventBus, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, MANIFEST_EXCLUDED_FILES, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_LINKED_DOCUMENT_TOOL, READ_LINKED_DOCUMENT_TOOL_NAME, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SDK_VERSION, SENSITIVE_ANNOTATION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SUPPORTED_DOCUMENT_MIME, SerializingMemoryStore, SkillDiscovery, SkillReader, TEXT_BUDGETED_CONTENT_TYPES, TraceRecorder, UNSUPPORTED_DOCUMENT_MESSAGE, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, WebSkillError, WebSkillRuntime, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, redactToolStepArgs, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
|
14
|
+
export { ALLOWED_TOOLS_EXCLUSION_REASON, ASK_USER_FIELD_TYPES, ASK_USER_INPUT_SCHEMA, ASK_USER_MAX_FIELDS, ASK_USER_TOOL, ASK_USER_TOOL_NAME, ATOMIC_TMP_SUFFIX_PATTERN, ATTACHMENT_TEXT_LIMIT, AgentLoop, AnthropicClient, BEHAVIOR_RECORDS_KEY, CapabilityApproval, DEFAULT_ARCHIVE_LIMITS, DEFAULT_LOOP_LIMITS, DEFAULT_MAX_DATA_SOURCE_BYTES, DEFAULT_MAX_DOCUMENT_BYTES, DEFAULT_MAX_DOCUMENT_TEXT_BYTES, DEFAULT_USER_PROFILE_LIMITS, DOCX_MIME, EMPTY_USER_PROFILE, EventBus, FILE_MIME_TYPES, FS_SESSION_PAGE_SIZE, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, HookRunner, IMAGE_MIME_TYPES, MANIFEST_EXCLUDED_FILES, MAX_TOOL_STEP_ARG_BYTES, MemoryFS, OpenAiCompatibleClient, ProgressiveRouter, READ_LINKED_DOCUMENT_TOOL, READ_LINKED_DOCUMENT_TOOL_NAME, READ_SKILL_FILE_INPUT_SCHEMA, READ_SKILL_FILE_TOOL, READ_SKILL_FILE_TOOL_NAME, RUN_SNAPSHOT_SCHEMA_VERSION, RUN_TRACE_SCHEMA_VERSION, SDK_VERSION, SENSITIVE_ANNOTATION, SESSION_SCHEMA_VERSION, SIGNATURE_SCHEMA_VERSION, SKILLS_LOCKFILE, SKILL_MANIFEST_FILE, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_PACK_FILE, SKILL_SIGNATURE_FILE, SUPPORTED_DOCUMENT_MIME, SerializingMemoryStore, SkillDiscovery, SkillReader, TEXT_BUDGETED_CONTENT_TYPES, TEXT_EXTENSIONS, TraceRecorder, UNSUPPORTED_DOCUMENT_MESSAGE, USER_PROFILE_EXPORT_VERSION, USER_PROFILE_KEY, USER_PROFILE_NO_INVENTION_RULE, USER_PROFILE_PROMPT_HEADER, USER_PROFILE_REFINE_PROMPT, WebSkillError, WebSkillRuntime, XLSX_MIME, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, findUnpairedToolCalls, formatAttachmentText, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isNetworkAllowed, isUnsupportedRunSnapshot, isValidSkillName, jsonRenderer, keyIdOf, listSkillScripts, mergeCatalogEntries, mergeProfileEntries, messageOf, networkPolicyLibSource, networkUrlHost, normalizeErrorCode, normalizePath, normalizeToolContent, normalizeToolError, parseBridgeRequest, parseSkillMarkdown, parseSkillPackManifest, parseUserProfileExport, partsToText, readBehaviorRecords, readProfileEntries, readResponseWithLimit, readSkillSignature, readUserProfile, redactToolStepArgs, refineUserProfile, renderAvailableSkillsXml, renderCatalogJson, renderUserProfileContext, resolveArchiveLimits, resolveInsideRoot, resolveToolName, sampleBehaviorRecords, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { F as
|
|
1
|
+
import { K as JsonSchema, _ as LlmToolSpec, ft as SkillDocument, ut as SkillCatalogEntry } from "./types-C3V6lAeO-BgeOvc1Y.js";
|
|
2
|
+
import { F as ExternalSkillProvider, I as ExternalToolSource, hn as ToolResult, or as mergeCatalogEntries, pn as ToolDisclosure } from "./index-CWoKOFBP.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";
|
|
@@ -75,6 +75,59 @@ declare class EndpointRegistry<TClient> {
|
|
|
75
75
|
waitFor(endpoint: string, timeoutMs: number): Promise<TClient>;
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
|
+
//#region src/pageHost/pageHostAnchor.d.ts
|
|
79
|
+
/**
|
|
80
|
+
* 页面宿主握手(分册 18 FR-18.1)。
|
|
81
|
+
*
|
|
82
|
+
* 页面与宿主(浏览器扩展)是两个进程,各自持有一份 `EndpointRegistry`。
|
|
83
|
+
* 页面注册的端点如果不主动交出去,宿主那边永远是空的。本模块就是那个交接口。
|
|
84
|
+
*
|
|
85
|
+
* ## 只在宿主先落位时才交
|
|
86
|
+
*
|
|
87
|
+
* 锚点由宿主在**页面脚本运行之前**植入(扩展的 `document_start` 内容脚本)。
|
|
88
|
+
* 页面没被宿主接管时锚点不存在,本模块除了一次全局属性读取之外什么都不做——
|
|
89
|
+
* 默认态是「不暴露」,不是「对全网开放」(D-18-3)。
|
|
90
|
+
*
|
|
91
|
+
* ## 挡不住同世界的脚本,这一点不粉饰
|
|
92
|
+
*
|
|
93
|
+
* 锚点在页面自己的 JS 世界里,页面上任何脚本都读得到它、也能调它的 `register()`
|
|
94
|
+
* 塞进一个假端点。nonce、私有字段、闭包**都挡不住**同世界的脚本,这在 MAIN world
|
|
95
|
+
* 里无解。因此宿主必须把握手拿到的一切当作不可信内容(FR-18.7 第 1 条)。
|
|
96
|
+
* 反过来,握手也没给页面新权限:页面脚本本来就能调用页面自己的端点。
|
|
97
|
+
*/
|
|
98
|
+
/** 宿主植入的锚点契约。SDK 只消费,不生产,也不假设宿主是浏览器扩展 */
|
|
99
|
+
interface PageHostAnchor {
|
|
100
|
+
version: 1;
|
|
101
|
+
register(endpoint: string, client: unknown): void;
|
|
102
|
+
unregister(endpoint: string): void;
|
|
103
|
+
/**
|
|
104
|
+
* 0.14.0 分册 21:页面自荐可用的数据源。宿主可不实现,页面据此判断本宿主支不支持。
|
|
105
|
+
*
|
|
106
|
+
* 入参是 `unknown[]` 而不是结构化类型:这段内容来自页面,
|
|
107
|
+
* 标成结构化类型会让宿主侧读代码的人以为它已经被验证过了。
|
|
108
|
+
* @experimental
|
|
109
|
+
*/
|
|
110
|
+
declareDataSources?(sources: readonly unknown[]): void;
|
|
111
|
+
}
|
|
112
|
+
/** 全局属性名。宿主侧写死同一个串,改这里必须同时改宿主 */
|
|
113
|
+
declare const PAGE_HOST_ANCHOR_KEY = "__webskillPageHost";
|
|
114
|
+
/**
|
|
115
|
+
* 向宿主登记 / 注销一个端点。
|
|
116
|
+
*
|
|
117
|
+
* 全程吞异常是**刻意的**:握手是附加行为,宿主那边出任何问题都不能让页面自己的
|
|
118
|
+
* 端点注册失败。把这个 catch 去掉,一个坏掉的扩展就能让页面的 chatbot 一起坏掉。
|
|
119
|
+
*/
|
|
120
|
+
declare function notifyPageHost(kind: 'register', endpoint: string, client: unknown): void;
|
|
121
|
+
declare function notifyPageHost(kind: 'unregister', endpoint: string): void;
|
|
122
|
+
/**
|
|
123
|
+
* 向宿主自荐本页可用的数据源(0.14.0 分册 21)。
|
|
124
|
+
*
|
|
125
|
+
* 宿主不实现该方法即静默返回:页面无从得知宿主支不支持,这正是「不知道 ≠ 没有」。
|
|
126
|
+
* 提议**不等于**可用——宿主那边它只是候选,用户点头前谁都取不到数。
|
|
127
|
+
* @experimental
|
|
128
|
+
*/
|
|
129
|
+
declare function declareDataSourcesToPageHost(sources: readonly unknown[]): void;
|
|
130
|
+
//#endregion
|
|
78
131
|
//#region src/resolver/mcpToolResolver.d.ts
|
|
79
132
|
/** MCP Client 最小接口(SDK Client 结构兼容,测试可纯对象替身) */
|
|
80
133
|
interface McpClientLike {
|
|
@@ -288,6 +341,13 @@ declare class ExperimentalWebMcpAdapter {
|
|
|
288
341
|
}
|
|
289
342
|
//#endregion
|
|
290
343
|
//#region src/plugin/mcpRuntimePlugin.d.ts
|
|
344
|
+
/**
|
|
345
|
+
* 披露层级(分册 19)。与 runtime 的 `ToolDisclosure` 同义,保留 mcp 侧命名以便宿主按包对齐。
|
|
346
|
+
*
|
|
347
|
+
* 它与启停(`McpToolVisibility` 的三个 boolean 回调)作用面不同:
|
|
348
|
+
* 禁用同时管暴露与调用,`on-demand` **只管暴露**——没被点名的按需工具照样调得动。
|
|
349
|
+
*/
|
|
350
|
+
type McpToolDisclosure = ToolDisclosure;
|
|
291
351
|
/**
|
|
292
352
|
* 工具可见性策略(0.10.0 UI-UX5 #50.3):端点禁用 ∨ 工具禁用 ⇒ 不进 LLM tool spec,
|
|
293
353
|
* 调用侧同样拦截(模型找不到这些工具)。各判定缺省视为启用。
|
|
@@ -304,6 +364,15 @@ interface McpToolVisibility {
|
|
|
304
364
|
* 宿主按来源关 → 该组全灭;按工具关 → 只灭一个。
|
|
305
365
|
*/
|
|
306
366
|
isWebMcpToolEnabled?(tool: string, sourceId?: string): boolean;
|
|
367
|
+
/**
|
|
368
|
+
* 端点级披露层级(分册 19 / FR-19.1);该端点全部工具的默认值。
|
|
369
|
+
* 返回 `undefined` = 不表态(最终落到 `always`)。
|
|
370
|
+
*/
|
|
371
|
+
endpointDisclosure?(endpoint: string): McpToolDisclosure | undefined;
|
|
372
|
+
/** 端点工具级披露层级;返回 `undefined` 才继承端点级(就近覆盖) */
|
|
373
|
+
endpointToolDisclosure?(endpoint: string, tool: string): McpToolDisclosure | undefined;
|
|
374
|
+
/** WebMCP 工具级披露层级;`sourceId` 为空即未命名来源 */
|
|
375
|
+
webMcpToolDisclosure?(tool: string, sourceId?: string): McpToolDisclosure | undefined;
|
|
307
376
|
}
|
|
308
377
|
/**
|
|
309
378
|
* 参数留存的宿主侧信任声明(分册 30 / FR-30.6)。
|
|
@@ -338,6 +407,11 @@ declare class McpRuntimePlugin implements ExternalToolSource {
|
|
|
338
407
|
/** endpoint 不可用时的告警出口(默认 console.warn) */
|
|
339
408
|
onWarning?(message: string): void;
|
|
340
409
|
});
|
|
410
|
+
/**
|
|
411
|
+
* 工具的披露层级(分册 19 / FR-19.2)。本方法只**如实回答层级**,不做过滤——
|
|
412
|
+
* 「有没有技能点名」是 run 状态,mcp 包看不到,过滤发生在 agentLoop 的暴露点。
|
|
413
|
+
*/
|
|
414
|
+
disclosure(llmToolName: string): McpToolDisclosure;
|
|
341
415
|
/**
|
|
342
416
|
* 参数留存的信任判定(分册 30 / FR-30.6)。
|
|
343
417
|
* 只按宿主配置里的 endpoint / sourceId 判,服务器传回的内容进不了这条路径。
|
|
@@ -494,4 +568,4 @@ interface RemoteEndpointHandle {
|
|
|
494
568
|
*/
|
|
495
569
|
declare function connectRemoteEndpoint(registry: EndpointRegistry<McpClientLike>, config: RemoteEndpointConfig): Promise<RemoteEndpointHandle>;
|
|
496
570
|
//#endregion
|
|
497
|
-
export { type BrowserModelContextLike, EndpointRegistry, ExperimentalWebMcpAdapter, type McpClientLike, type McpOAuthClient, type McpOAuthConfig, type McpOAuthHandshake, type McpOAuthHandshakeStore, type McpOAuthProvider, type McpOAuthStage, type McpOAuthTokenStore, type McpOAuthTokens, McpRuntimePlugin, type McpSourceTrust, McpToolResolver, type McpToolVisibility, MessageChannelTransport, type MessageChannelTransportOptions, type MessagePortLike, type RemoteEndpointConfig, type RemoteEndpointHandle, type ServedSkill, TemporarySkillProvider, type TransportState, WEB_MCP_SOURCE_ID_MAX, type WebMcpToolDescriptor, type WebMcpToolLike, catalogMerge, connectRemoteEndpoint, createMemoryOAuthStores, createOAuthProvider, endpointToolLlmName, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };
|
|
571
|
+
export { type BrowserModelContextLike, EndpointRegistry, ExperimentalWebMcpAdapter, type McpClientLike, type McpOAuthClient, type McpOAuthConfig, type McpOAuthHandshake, type McpOAuthHandshakeStore, type McpOAuthProvider, type McpOAuthStage, type McpOAuthTokenStore, type McpOAuthTokens, McpRuntimePlugin, type McpSourceTrust, type McpToolDisclosure, McpToolResolver, type McpToolVisibility, MessageChannelTransport, type MessageChannelTransportOptions, type MessagePortLike, PAGE_HOST_ANCHOR_KEY, type PageHostAnchor, type RemoteEndpointConfig, type RemoteEndpointHandle, type ServedSkill, TemporarySkillProvider, type TransportState, WEB_MCP_SOURCE_ID_MAX, type WebMcpToolDescriptor, type WebMcpToolLike, catalogMerge, connectRemoteEndpoint, createMemoryOAuthStores, createOAuthProvider, declareDataSourcesToPageHost, endpointToolLlmName, notifyPageHost, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };
|
package/dist/mcp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { St as normalizeToolContent, _t as mergeCatalogEntries } from "./dist-
|
|
1
|
+
import { B as messageOf, S as assertRemoteUrlAllowed, b as WebSkillError } from "./dist-D5YhlCdY.js";
|
|
2
|
+
import { St as normalizeToolContent, _t as mergeCatalogEntries } from "./dist-Bfga1TmS.js";
|
|
3
3
|
|
|
4
4
|
//#region ../mcp/dist/index.js
|
|
5
5
|
/**
|
|
@@ -112,6 +112,36 @@ var MessageChannelTransport = class {
|
|
|
112
112
|
this.onmessage?.(event.data);
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
+
/** 全局属性名。宿主侧写死同一个串,改这里必须同时改宿主 */
|
|
116
|
+
const PAGE_HOST_ANCHOR_KEY = "__webskillPageHost";
|
|
117
|
+
function readAnchor() {
|
|
118
|
+
const raw = globalThis[PAGE_HOST_ANCHOR_KEY];
|
|
119
|
+
if (typeof raw !== "object" || raw === null) return void 0;
|
|
120
|
+
const candidate = raw;
|
|
121
|
+
if (candidate.version !== 1) return void 0;
|
|
122
|
+
if (typeof candidate.register !== "function" || typeof candidate.unregister !== "function") return void 0;
|
|
123
|
+
return candidate;
|
|
124
|
+
}
|
|
125
|
+
function notifyPageHost(kind, endpoint, client) {
|
|
126
|
+
try {
|
|
127
|
+
const anchor = readAnchor();
|
|
128
|
+
if (anchor === void 0) return;
|
|
129
|
+
if (kind === "register") anchor.register(endpoint, client);
|
|
130
|
+
else anchor.unregister(endpoint);
|
|
131
|
+
} catch {}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 向宿主自荐本页可用的数据源(0.14.0 分册 21)。
|
|
135
|
+
*
|
|
136
|
+
* 宿主不实现该方法即静默返回:页面无从得知宿主支不支持,这正是「不知道 ≠ 没有」。
|
|
137
|
+
* 提议**不等于**可用——宿主那边它只是候选,用户点头前谁都取不到数。
|
|
138
|
+
* @experimental
|
|
139
|
+
*/
|
|
140
|
+
function declareDataSourcesToPageHost(sources) {
|
|
141
|
+
try {
|
|
142
|
+
readAnchor()?.declareDataSources?.(sources);
|
|
143
|
+
} catch {}
|
|
144
|
+
}
|
|
115
145
|
/** endpoint 名 → client 注册表;单调版本号,事件驱动等待(禁止轮询) */
|
|
116
146
|
var EndpointRegistry = class {
|
|
117
147
|
#clients = /* @__PURE__ */ new Map();
|
|
@@ -124,12 +154,14 @@ var EndpointRegistry = class {
|
|
|
124
154
|
this.#clients.set(endpoint, client);
|
|
125
155
|
this.#versions.set(endpoint, (this.#versions.get(endpoint) ?? 0) + 1);
|
|
126
156
|
this.#flushWaiters(endpoint);
|
|
157
|
+
notifyPageHost("register", endpoint, client);
|
|
127
158
|
}
|
|
128
159
|
/** 热替换 client,版本号 +1 */
|
|
129
160
|
set(endpoint, client) {
|
|
130
161
|
this.#clients.set(endpoint, client);
|
|
131
162
|
this.#versions.set(endpoint, (this.#versions.get(endpoint) ?? 0) + 1);
|
|
132
163
|
this.#flushWaiters(endpoint);
|
|
164
|
+
notifyPageHost("register", endpoint, client);
|
|
133
165
|
}
|
|
134
166
|
get(endpoint) {
|
|
135
167
|
const client = this.#clients.get(endpoint);
|
|
@@ -138,6 +170,7 @@ var EndpointRegistry = class {
|
|
|
138
170
|
}
|
|
139
171
|
unregister(endpoint) {
|
|
140
172
|
this.#clients.delete(endpoint);
|
|
173
|
+
notifyPageHost("unregister", endpoint);
|
|
141
174
|
}
|
|
142
175
|
version(endpoint) {
|
|
143
176
|
return this.#versions.get(endpoint) ?? 0;
|
|
@@ -311,6 +344,15 @@ const textOfContent = (content) => {
|
|
|
311
344
|
return "";
|
|
312
345
|
};
|
|
313
346
|
/**
|
|
347
|
+
* 端点不提供 prompts 等于「没有临时技能」,不是加载失败。
|
|
348
|
+
* 两条路径都要认:客户端本地能力断言,以及服务端回的 JSON-RPC -32601。
|
|
349
|
+
*/
|
|
350
|
+
const isPromptsUnsupported = (e) => {
|
|
351
|
+
if (typeof e !== "object" || e === null) return false;
|
|
352
|
+
if (e.code === -32601) return true;
|
|
353
|
+
return /does not support prompts/i.test(messageOf(e));
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
314
356
|
* 消费端:endpoint 的 prompts → 临时技能(source:'mcp',随 endpoint 生灭);
|
|
315
357
|
* resources → 可读 references(readFile 的 path 即 resource URI)。
|
|
316
358
|
*/
|
|
@@ -329,7 +371,10 @@ var TemporarySkillProvider = class {
|
|
|
329
371
|
} catch {
|
|
330
372
|
return [];
|
|
331
373
|
}
|
|
332
|
-
const { prompts } = await client.listPrompts()
|
|
374
|
+
const { prompts } = await client.listPrompts().catch((e) => {
|
|
375
|
+
if (isPromptsUnsupported(e)) return { prompts: [] };
|
|
376
|
+
throw e;
|
|
377
|
+
});
|
|
333
378
|
const resources = await client.listResources().catch(() => ({ resources: [] }));
|
|
334
379
|
return prompts.map((p) => ({
|
|
335
380
|
name: p.name,
|
|
@@ -626,6 +671,35 @@ var McpRuntimePlugin = class {
|
|
|
626
671
|
}
|
|
627
672
|
}
|
|
628
673
|
/**
|
|
674
|
+
* 披露层级求值。**刻意不复用 `#visible()`**:那个的返回值同时喂给 `listToolSpecs` 与 `call`,
|
|
675
|
+
* 合并会让按需工具被 `disabledResult()` 拦住——把「只省 token」变成「限制访问」。
|
|
676
|
+
*
|
|
677
|
+
* 返回 `undefined` = 该级不表态,交由上一级决定;异常直接按 `always` 定案(不再回落),
|
|
678
|
+
* 判不出来时多给一个工具,比整轮工具集塌陷、模型转而幻觉的代价小。
|
|
679
|
+
*/
|
|
680
|
+
#disclosureOf(probe) {
|
|
681
|
+
try {
|
|
682
|
+
return probe();
|
|
683
|
+
} catch (e) {
|
|
684
|
+
this.#onWarning(`[webskill] MCP disclosure callback failed; treating the tool as always disclosed: ${e instanceof Error ? e.message : String(e)}`);
|
|
685
|
+
return "always";
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* 工具的披露层级(分册 19 / FR-19.2)。本方法只**如实回答层级**,不做过滤——
|
|
690
|
+
* 「有没有技能点名」是 run 状态,mcp 包看不到,过滤发生在 agentLoop 的暴露点。
|
|
691
|
+
*/
|
|
692
|
+
disclosure(llmToolName) {
|
|
693
|
+
const parsed = parseWebMcpToolLlmName(llmToolName, this.#sourceIds());
|
|
694
|
+
if (parsed !== void 0) return this.#disclosureOf(() => this.#visibility?.webMcpToolDisclosure?.(parsed.toolName, parsed.sourceId)) ?? "always";
|
|
695
|
+
for (const endpoint of this.#endpoints()) {
|
|
696
|
+
const toolName = parseEndpointToolLlmName(endpoint, llmToolName);
|
|
697
|
+
if (toolName === void 0) continue;
|
|
698
|
+
return this.#disclosureOf(() => this.#visibility?.endpointToolDisclosure?.(endpoint, toolName)) ?? this.#disclosureOf(() => this.#visibility?.endpointDisclosure?.(endpoint)) ?? "always";
|
|
699
|
+
}
|
|
700
|
+
return "always";
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
629
703
|
* 参数留存的信任判定(分册 30 / FR-30.6)。
|
|
630
704
|
* 只按宿主配置里的 endpoint / sourceId 判,服务器传回的内容进不了这条路径。
|
|
631
705
|
*/
|
|
@@ -996,4 +1070,4 @@ async function connectRemoteEndpoint(registry, config) {
|
|
|
996
1070
|
}
|
|
997
1071
|
|
|
998
1072
|
//#endregion
|
|
999
|
-
export { EndpointRegistry, ExperimentalWebMcpAdapter, McpRuntimePlugin, McpToolResolver, MessageChannelTransport, TemporarySkillProvider, WEB_MCP_SOURCE_ID_MAX, catalogMerge, connectRemoteEndpoint, createMemoryOAuthStores, createOAuthProvider, endpointToolLlmName, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };
|
|
1073
|
+
export { EndpointRegistry, ExperimentalWebMcpAdapter, McpRuntimePlugin, McpToolResolver, MessageChannelTransport, PAGE_HOST_ANCHOR_KEY, TemporarySkillProvider, WEB_MCP_SOURCE_ID_MAX, catalogMerge, connectRemoteEndpoint, createMemoryOAuthStores, createOAuthProvider, declareDataSourcesToPageHost, endpointToolLlmName, notifyPageHost, parseEndpointToolLlmName, parseWebMcpToolLlmName, serveSkillAsMcp, validateJsonRpcMessage, webMcpToolLlmName };
|
package/dist/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import { a as AuditLog, b as SkillVersionStore, d as CandidateSkill, m as CandidateStore, r as ApprovalPolicy } from "./skillVersionStore-D-qHk9ZE-
|
|
1
|
+
import { $ as SKILLS_LOCKFILE, At as VerifyResult, Ct as SkillsLockfile, Et as TrustedKeyStore, H as FileStat, K as JsonSchema, N as ArchiveLimits, Ot as UnsignedPolicy, S as UiBridge, U as FileSystemProvider, _t as SkillManifest, at as SignatureAuditSink, b as RenderResultRequest, c as InteractionResponse, et as SKILL_MANIFEST_FILE, gt as SkillManagerPort, pt as SkillInstallSource, s as InteractionRequest } from "./types-C3V6lAeO-BgeOvc1Y.js";
|
|
2
|
+
import { Gn as createScriptContext, Ht as ScriptExecutionContext, R as FsArtifactStore, Rn as WebSkillRuntime, Ut as ScriptExecutor, Vt as SchemaInferer, at as NetworkPolicy, fn as ToolDefinition, hn as ToolResult, m as ApprovalScope, y as BridgeCapabilities, z as FsMemoryStore, zn as WebSkillRuntimeDeps } from "./index-CWoKOFBP.js";
|
|
3
|
+
import { a as AuditLog, b as SkillVersionStore, d as CandidateSkill, m as CandidateStore, r as ApprovalPolicy } from "./skillVersionStore-D-qHk9ZE-C0OFDTQY.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,5 +1,5 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { $ as bridgeError, Ct as normalizeToolError, St as normalizeToolContent, X as WebSkillRuntime, b as FsMemoryStore, tt as createScriptContext, u as CapabilityApproval, wt as parseBridgeRequest, y as FsArtifactStore, yt as networkPolicyLibSource } from "./dist-
|
|
1
|
+
import { $ as unzipWithLimits, B as messageOf, C as assertSafePathSegment, E as buildManifest, G as readSkillSignature, H as parseSkillMarkdown, I as isAtomicTempPath, J as resolveArchiveLimits, L as isValidSkillName, P as exportSkills, S as assertRemoteUrlAllowed, U as parseSkillPackManifest, W as readResponseWithLimit, Y as resolveInsideRoot, b as WebSkillError, c as MANIFEST_EXCLUDED_FILES, d as SKILLS_LOCKFILE, et as validateSkills, f as SKILL_MANIFEST_FILE, h as SKILL_PACK_FILE, nt as verifySkillSignature, tt as verifyManifest, w as atomicWriteText } from "./dist-D5YhlCdY.js";
|
|
2
|
+
import { $ as bridgeError, Ct as normalizeToolError, St as normalizeToolContent, X as WebSkillRuntime, b as FsMemoryStore, tt as createScriptContext, u as CapabilityApproval, wt as parseBridgeRequest, y as FsArtifactStore, yt as networkPolicyLibSource } from "./dist-Bfga1TmS.js";
|
|
3
3
|
import { i as probeLlmCapabilities } from "./env-8cY40DXB-CGnEVZby.js";
|
|
4
4
|
import { t as AUDIT_EVENT_TYPES } from "./eventTypes-FllCrX-Z-DNDeHWoG.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
@@ -498,7 +498,7 @@ var SandboxedScriptExecutor = class {
|
|
|
498
498
|
...details !== void 0 ? { details } : {}
|
|
499
499
|
});
|
|
500
500
|
if (decision === "allowed") return void 0;
|
|
501
|
-
return bridgeError(request.id, "TOOL_UNSUPPORTED", decision === "disabled" ? `Capability "${capability}" is disabled` : `Capability "${capability}" was denied by the user`);
|
|
501
|
+
return bridgeError(request.id, "TOOL_UNSUPPORTED", decision === "disabled" ? `Capability "${capability}" is disabled by the sandbox capability settings` : `Capability "${capability}" was denied by the user`);
|
|
502
502
|
};
|
|
503
503
|
try {
|
|
504
504
|
switch (request.kind) {
|
|
@@ -525,7 +525,7 @@ var SandboxedScriptExecutor = class {
|
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
527
|
case "fetchData": {
|
|
528
|
-
if (!context.fetchData) return bridgeError(request.id, "TOOL_UNSUPPORTED", "Capability \"fetchData\" is
|
|
528
|
+
if (!context.fetchData) return bridgeError(request.id, "TOOL_UNSUPPORTED", "Capability \"fetchData\" is unavailable: this host wired no data source access at all. This is not the capability switch being off — a data source has to be declared in the host settings first.");
|
|
529
529
|
const denied = await gate("fetchData", `Script "${context.skillName}" wants to fetch data source "${request.sourceId}"`, { sourceId: request.sourceId });
|
|
530
530
|
if (denied) return denied;
|
|
531
531
|
return {
|
|
@@ -875,7 +875,7 @@ var ProcessSandboxExecutor = class {
|
|
|
875
875
|
...details !== void 0 ? { details } : {}
|
|
876
876
|
});
|
|
877
877
|
if (decision === "allowed") return void 0;
|
|
878
|
-
return bridgeError(request.id, "TOOL_UNSUPPORTED", decision === "disabled" ? `Capability "${capability}" is disabled` : `Capability "${capability}" was denied by the user`);
|
|
878
|
+
return bridgeError(request.id, "TOOL_UNSUPPORTED", decision === "disabled" ? `Capability "${capability}" is disabled by the sandbox capability settings` : `Capability "${capability}" was denied by the user`);
|
|
879
879
|
};
|
|
880
880
|
try {
|
|
881
881
|
switch (request.kind) {
|
|
@@ -902,7 +902,7 @@ var ProcessSandboxExecutor = class {
|
|
|
902
902
|
};
|
|
903
903
|
}
|
|
904
904
|
case "fetchData": {
|
|
905
|
-
if (!context.fetchData) return bridgeError(request.id, "TOOL_UNSUPPORTED", "Capability \"fetchData\" is
|
|
905
|
+
if (!context.fetchData) return bridgeError(request.id, "TOOL_UNSUPPORTED", "Capability \"fetchData\" is unavailable: this host wired no data source access at all. This is not the capability switch being off — a data source has to be declared in the host settings first.");
|
|
906
906
|
const denied = await gate("fetchData", `Script "${context.skillName}" wants to fetch data source "${request.sourceId}"`, { sourceId: request.sourceId });
|
|
907
907
|
if (denied) return denied;
|
|
908
908
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dt as uiCatalog } from "./dist-
|
|
2
|
-
import { t as CatalogNode } from "./catalogComponents-BgAJN0p8-
|
|
1
|
+
import { Dt as uiCatalog } from "./dist-CiaDIqkV.js";
|
|
2
|
+
import { t as CatalogNode } from "./catalogComponents-BgAJN0p8-Cr55ouOg.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";
|
package/dist/{skillVersionStore-D-qHk9ZE-DheTIwAB.d.ts → skillVersionStore-D-qHk9ZE-C0OFDTQY.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as FileSystemProvider, X as PageQuery, Y as Page, _t as SkillManifest, ut as SkillCatalogEntry } from "./types-C3V6lAeO-BgeOvc1Y.js";
|
|
2
2
|
//#region ../governance/dist/skillVersionStore-D-qHk9ZE.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 {
|
|
2
|
-
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-
|
|
1
|
+
import { b as WebSkillError } from "./dist-D5YhlCdY.js";
|
|
2
|
+
import { a as textParts, n as partsToText } from "./memoryArtifactStore-52Zn9npI-BxtUkrgV.js";
|
|
3
3
|
|
|
4
4
|
//#region ../runtime/dist/testing.js
|
|
5
5
|
/**
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as UiBridge, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, v as MemoryStore } from "./types-
|
|
1
|
+
import { S as UiBridge, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, v as MemoryStore } from "./types-C3V6lAeO-BgeOvc1Y.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-BxtUkrgV.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-Cm8MseLF.js";
|
|
4
4
|
|
|
5
5
|
export { InMemoryStore, MemoryArtifactStore, MockLlmClient, MockUiBridge, loadAnthropicConfigFromEnv, loadGoogleConfigFromEnv, loadLlmConfigFromEnv };
|