@webskill/sdk 0.16.0 → 0.18.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/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { $ as SKILLS_LOCKFILE, $t as messageOf, A as extractSkillCandidate, At as ValidationReport, B as DiscoveryResult, Bt as checkDependencyCycles, C as UiSpecActionCapability, Ct as SkillsLockfile, D as UiSpecSnapshot, Dt as UNTRUSTED_LINE_LIMIT, E as UiSpecPatch, Et as TrustedKeyStore, F as CatalogRenderer, Ft as assertRemoteUrlAllowed, G as IMAGE_MIME_TYPES, Gt as detectSkillArchiveShapeFromFs, H as FileStat, Ht as classifyAttachment, I as ChatAttachmentKind, It as assertSafePathSegment, J as MemoryFS, Jt as formatAttachmentText, K as JsonSchema, Kt as escapeXml, L as CryptoKeyLike, Lt as atomicWriteText, M as ATTACHMENT_TEXT_LIMIT, Mt as WebSkillError, N as ArchiveLimits, Nt as WebSkillErrorCode, O as UiSurfaceActionRequest, Ot as UiSpecNode, P as AttachmentTextInput, Pt as XLSX_MIME, Q as SIGNATURE_SCHEMA_VERSION, Qt as keyIdOf, R as DEFAULT_ARCHIVE_LIMITS, Rt as buildCatalog, S as UiBridge, St as SkillSource, T as UiSpecEvent, Tt as TrustedKey, U as FileSystemProvider, Ut as computeDigest, V as FILE_MIME_TYPES, Vt as checkSkillRules, W as FsTrustedKeyStore, Wt as detectSkillArchiveShape, X as PageQuery, Xt as isValidSkillName, Y as Page, Yt as isAtomicTempPath, Z as RemoteUrlPolicy, Zt as jsonRenderer, _ as LlmToolSpec, _n as xmlRenderer, _t as SkillManifest, a as InteractionOrigin, an as renderAvailableSkillsXml, at as SignatureAuditSink, b as RenderResultRequest, bt as SkillReader, c as InteractionResponse, cn as resolveInsideRoot, ct as SkillArchiveShape, d as LlmContentPart, dn as signaturePayloadBytes, dt as SkillDiscovery, en as normalizePath, et as SKILL_MANIFEST_FILE, f as LlmMessage, fn as stripArchiveRoot, ft as SkillDocument, g as LlmToolCall, gn as verifySkillSignature, gt as SkillManagerPort, h as LlmTokenUsage, hn as verifyManifest, ht as SkillLocation, i as FormField, in as readSkillSignature, it as SKILL_SIGNATURE_FILE, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as VerifyResult, k as UiSurfaceActionResponse, kt as UnsignedPolicy, l as LlmClient, ln as sanitizeUntrustedLine, lt as SkillCatalog, m as LlmStreamEvent, mn as validateSkills, mt as SkillIssue, n as ArtifactStore, nn as parseSkillPackManifest, nt as SKILL_NAME_PATTERN, o as InteractionPolicy, on as renderCatalogJson, ot as SignatureVerdict, p as LlmResponse, pn as unzipWithLimits, pt as SkillInstallSource, q as MANIFEST_EXCLUDED_FILES, qt as exportSkills, r as ChartSpec, rn as readResponseWithLimit, rt as SKILL_PACK_FILE, s as InteractionRequest, sn as resolveArchiveLimits, st as SkillArchiveDetection, t as Artifact, tn as parseSkillMarkdown, tt as SKILL_NAME_MAX_LENGTH, u as LlmCompleteInput, un as signSkill, 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 buildManifest } from "./types-C3V6lAeO-BUpcRLER.js";
2
- import { $ as IntegrityVerdict, $n as diffUserProfile, $t as SessionMeta, A as DEFAULT_USER_PROFILE_LIMITS, An as USER_PROFILE_EXPORT_VERSION, Ar as schemaSourceLabel, At as RunToolCall, B as FS_SESSION_PAGE_SIZE, Bn as UserProfileImportDiff, Br as toVercelToolSpecs, Bt as RuntimeSession, C as CapabilityApproval, Cn as ToolStepTrust, Cr as readProfileEntries, Ct as RouteResult, D as DEFAULT_MAX_DOCUMENT_BYTES, Dn as TraceRecorder, Dr as renderUserProfileContext, Dt as RunSnapshotListEntry, E as DEFAULT_MAX_DATA_SOURCE_BYTES, En as TraceEventType, Er as refineUserProfile, Et as RunSnapshot, F as EMPTY_USER_PROFILE, Fn as UnsupportedRunSnapshot, Fr as summarizeToolCalls, Ft as RunTraceSummary, G as FsSessionStore, Gn as WebSkillRuntimeDeps, Gt as SchemaInferer, H as FsMemoryStore, Hn as VercelToolSpec, Hr as validateUiSpecNode, Ht as SENSITIVE_ANNOTATION, I as EventBus, In as UploadFileInfo, Ir as textParts, It as RunUploadFiles, J as GoogleGenAiClient, Jn as applyUserProfileImport, Jt as SealOptions, K as FsToolStepStore, Kn as XlsxTextExtractor, Kt as ScriptExecutionContext, L as ExecuteLifecycleData, Ln as UserProfile, Lr as toBase64, Lt as RunUsageSummary, M as DocumentSurfaceHost, Mn as USER_PROFILE_NO_INVENTION_RULE, Mr as scriptToolName, Mt as RunTraceFilter, N as DocumentSurfacePort, Nn as USER_PROFILE_PROMPT_HEADER, Nr as sealToolCallPairs, Nt as RunTraceMetrics, O as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, On as UNSUPPORTED_DOCUMENT_MESSAGE, Or as resolveToolName, Ot as RunSnapshotStore, P as DocxTextExtractor, Pn as USER_PROFILE_REFINE_PROMPT, Pr as summarizeRunUsage, Pt as RunTraceStore, Q as InstalledSkillManifest, Qn as createWebSkillApi, Qt as SessionListPage, R as ExternalSkillProvider, Rn as UserProfileEntry, Rr as toLlmToolSpec, Rt as RuntimePhase, S as BridgeResponse, Sn as ToolStepStore, Sr as readBehaviorRecords, St as RouteLifecycleData, T as DEFAULT_LOOP_LIMITS, Tn as TraceEvent, Tr as redactToolStepArgs, Tt as RunResult, U as FsRunSnapshotStore, Un as WebSkillApi, Ut as SESSION_SCHEMA_VERSION, V as FsArtifactStore, Vn as UserProfileLimits, Vr as validateUiSpecEvent, Vt as RuntimeSessionHandle, W as FsRunTraceStore, Wn as WebSkillRuntime, Wt as SUPPORTED_DOCUMENT_MIME, X as HookRunner, Xn as buildRenderResult, Xt as SealResult, Y as GoogleGenAiClientConfig, Yn as bridgeError, Yt as SealRecord, Z as HookRunnerOptions, Zn as createScriptContext, Zt as SerializingMemoryStore, _ as BehaviorRecordKind, _n as ToolDisclosure, _r as normalizeToolContent, _t as READ_SKILL_FILE_TOOL_NAME, a as ASK_USER_TOOL, an as SkillRouter, ar as formatSkillScriptManifest, at as LifecycleListener, b as BridgeCapability, bn as ToolStepReader, br as parseUserProfileExport, bt as RedactedArgs, c as AgentLoop, cn as SkillStateGuard, cr as interruptedToolResult, ct as NetworkPolicy, d as AnthropicClient, dn as TerminalLifecycleData, dr as listSkillScripts, dt as PdfTextExtractor, en as SessionRecord, er as exportUserProfile, et as InteractLifecycleData, f as AnthropicClientConfig, fn as TextualToolContent, fr as mergeCatalogEntries, ft as ProgressiveRouter, g as BehaviorRecord, gn as ToolDefinition, gr as normalizeErrorCode, gt as READ_SKILL_FILE_TOOL, h as BEHAVIOR_RECORDS_KEY, hn as ToolContent, hr as networkUrlHost, ht as READ_SKILL_FILE_INPUT_SCHEMA, i as ASK_USER_MAX_FIELDS, in as SkillOutcomeReporter, ir as findUnpairedToolCalls, it as LifecycleHookContext, j as DataSourceInfo, jn as USER_PROFILE_KEY, jr as schemaToForm, jt as RunTraceFile, k as DEFAULT_MAX_UPLOAD_FILE_BYTES, kn as UPLOAD_FILES_UNAVAILABLE, kr as sampleBehaviorRecords, kt as RunTerminationReason, l as AgentLoopConfig, ln as SkillSuccessReport, lr as isNetworkAllowed, lt as OpenAiCompatibleClient, m as ApprovalScope, mn as ToolCallContext, mr as networkPolicyLibSource, mt as READ_LINKED_DOCUMENT_TOOL_NAME, n as ASK_USER_FIELD_TYPES, nn as SkillFailureReport, nr as extractTodoTraceEvents, nt as LifecycleEventInit, o as ASK_USER_TOOL_NAME, on as SkillScriptDescriptor, or as fromVercelResult, ot as LinkedDocumentReader, p as ApprovalDecision, pn as TodoTraceEvent, pr as mergeProfileEntries, pt as READ_LINKED_DOCUMENT_TOOL, q as FullDisclosureRouter, qn as appendBehaviorRecords, qt as ScriptExecutor, r as ASK_USER_INPUT_SCHEMA, rn as SkillIntegrityGuard, rr as extractUiSpecEvents, rt as LifecycleHook, s as ActivateLifecycleData, sn as SkillScriptSchemaSource, sr as fromVercelStreamPart, st as MAX_TOOL_STEP_ARG_BYTES, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as SessionStore, tr as extractChartSpec, tt as LifecycleEvent, u as AgentLoopDeps, un as TEXT_BUDGETED_CONTENT_TYPES, ur as isUnsupportedRunSnapshot, ut as OpenAiCompatibleClientConfig, v as BehaviorScene, vn as ToolResolution, vr as normalizeToolError, vt as RUN_SNAPSHOT_SCHEMA_VERSION, w as CapabilityMode, wn as TraceClock, wr as readUserProfile, wt as RunLimitErrorDetails, x as BridgeRequest, xn as ToolStepRecord, xr as partsToText, xt as RefineUserProfileInput, y as BridgeCapabilities, yn as ToolResult, yr as parseBridgeRequest, yt as RUN_TRACE_SCHEMA_VERSION, z as ExternalToolSource, zn as UserProfileExport, zr as toRecordDigests, zt as RuntimeRun } from "./index-DbVqg2V3.js";
1
+ import { $ as SKILLS_LOCKFILE, $t as messageOf, A as extractSkillCandidate, At as ValidationReport, B as DiscoveryResult, Bt as checkDependencyCycles, C as UiSpecActionCapability, Ct as SkillsLockfile, D as UiSpecSnapshot, Dt as UNTRUSTED_LINE_LIMIT, E as UiSpecPatch, Et as TrustedKeyStore, F as CatalogRenderer, Ft as assertRemoteUrlAllowed, G as IMAGE_MIME_TYPES, Gt as detectSkillArchiveShapeFromFs, H as FileStat, Ht as classifyAttachment, I as ChatAttachmentKind, It as assertSafePathSegment, J as MemoryFS, Jt as formatAttachmentText, K as JsonSchema, Kt as escapeXml, L as CryptoKeyLike, Lt as atomicWriteText, M as ATTACHMENT_TEXT_LIMIT, Mt as WebSkillError, N as ArchiveLimits, Nt as WebSkillErrorCode, O as UiSurfaceActionRequest, Ot as UiSpecNode, P as AttachmentTextInput, Pt as XLSX_MIME, Q as SIGNATURE_SCHEMA_VERSION, Qt as keyIdOf, R as DEFAULT_ARCHIVE_LIMITS, Rt as buildCatalog, S as UiBridge, St as SkillSource, T as UiSpecEvent, Tt as TrustedKey, U as FileSystemProvider, Ut as computeDigest, V as FILE_MIME_TYPES, Vt as checkSkillRules, W as FsTrustedKeyStore, Wt as detectSkillArchiveShape, X as PageQuery, Xt as isValidSkillName, Y as Page, Yt as isAtomicTempPath, Z as RemoteUrlPolicy, Zt as jsonRenderer, _ as LlmToolSpec, _n as xmlRenderer, _t as SkillManifest, a as InteractionOrigin, an as renderAvailableSkillsXml, at as SignatureAuditSink, b as RenderResultRequest, bt as SkillReader, c as InteractionResponse, cn as resolveInsideRoot, ct as SkillArchiveShape, d as LlmContentPart, dn as signaturePayloadBytes, dt as SkillDiscovery, en as normalizePath, et as SKILL_MANIFEST_FILE, f as LlmMessage, fn as stripArchiveRoot, ft as SkillDocument, g as LlmToolCall, gn as verifySkillSignature, gt as SkillManagerPort, h as LlmTokenUsage, hn as verifyManifest, ht as SkillLocation, i as FormField, in as readSkillSignature, it as SKILL_SIGNATURE_FILE, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as VerifyResult, k as UiSurfaceActionResponse, kt as UnsignedPolicy, l as LlmClient, ln as sanitizeUntrustedLine, lt as SkillCatalog, m as LlmStreamEvent, mn as validateSkills, mt as SkillIssue, n as ArtifactStore, nn as parseSkillPackManifest, nt as SKILL_NAME_PATTERN, o as InteractionPolicy, on as renderCatalogJson, ot as SignatureVerdict, p as LlmResponse, pn as unzipWithLimits, pt as SkillInstallSource, q as MANIFEST_EXCLUDED_FILES, qt as exportSkills, r as ChartSpec, rn as readResponseWithLimit, rt as SKILL_PACK_FILE, s as InteractionRequest, sn as resolveArchiveLimits, st as SkillArchiveDetection, t as Artifact, tn as parseSkillMarkdown, tt as SKILL_NAME_MAX_LENGTH, u as LlmCompleteInput, un as signSkill, 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 buildManifest } from "./types-Btpdd1y--BcxQ10Fa.js";
2
+ import { $ as IntegrityVerdict, $n as diffUserProfile, $t as SessionMeta, A as DEFAULT_USER_PROFILE_LIMITS, An as USER_PROFILE_EXPORT_VERSION, Ar as schemaSourceLabel, At as RunToolCall, B as FS_SESSION_PAGE_SIZE, Bn as UserProfileImportDiff, Br as toVercelToolSpecs, Bt as RuntimeSession, C as CapabilityApproval, Cn as ToolStepTrust, Cr as readProfileEntries, Ct as RouteResult, D as DEFAULT_MAX_DOCUMENT_BYTES, Dn as TraceRecorder, Dr as renderUserProfileContext, Dt as RunSnapshotListEntry, E as DEFAULT_MAX_DATA_SOURCE_BYTES, En as TraceEventType, Er as refineUserProfile, Et as RunSnapshot, F as EMPTY_USER_PROFILE, Fn as UnsupportedRunSnapshot, Fr as summarizeToolCalls, Ft as RunTraceSummary, G as FsSessionStore, Gn as WebSkillRuntimeDeps, Gt as SchemaInferer, H as FsMemoryStore, Hn as VercelToolSpec, Hr as validateUiSpecNode, Ht as SENSITIVE_ANNOTATION, I as EventBus, In as UploadFileInfo, Ir as textParts, It as RunUploadFiles, J as GoogleGenAiClient, Jn as applyUserProfileImport, Jt as SealOptions, K as FsToolStepStore, Kn as XlsxTextExtractor, Kt as ScriptExecutionContext, L as ExecuteLifecycleData, Ln as UserProfile, Lr as toBase64, Lt as RunUsageSummary, M as DocumentSurfaceHost, Mn as USER_PROFILE_NO_INVENTION_RULE, Mr as scriptToolName, Mt as RunTraceFilter, N as DocumentSurfacePort, Nn as USER_PROFILE_PROMPT_HEADER, Nr as sealToolCallPairs, Nt as RunTraceMetrics, O as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, On as UNSUPPORTED_DOCUMENT_MESSAGE, Or as resolveToolName, Ot as RunSnapshotStore, P as DocxTextExtractor, Pn as USER_PROFILE_REFINE_PROMPT, Pr as summarizeRunUsage, Pt as RunTraceStore, Q as InstalledSkillManifest, Qn as createWebSkillApi, Qt as SessionListPage, R as ExternalSkillProvider, Rn as UserProfileEntry, Rr as toLlmToolSpec, Rt as RuntimePhase, S as BridgeResponse, Sn as ToolStepStore, Sr as readBehaviorRecords, St as RouteLifecycleData, T as DEFAULT_LOOP_LIMITS, Tn as TraceEvent, Tr as redactToolStepArgs, Tt as RunResult, U as FsRunSnapshotStore, Un as WebSkillApi, Ut as SESSION_SCHEMA_VERSION, V as FsArtifactStore, Vn as UserProfileLimits, Vr as validateUiSpecEvent, Vt as RuntimeSessionHandle, W as FsRunTraceStore, Wn as WebSkillRuntime, Wt as SUPPORTED_DOCUMENT_MIME, X as HookRunner, Xn as buildRenderResult, Xt as SealResult, Y as GoogleGenAiClientConfig, Yn as bridgeError, Yt as SealRecord, Z as HookRunnerOptions, Zn as createScriptContext, Zt as SerializingMemoryStore, _ as BehaviorRecordKind, _n as ToolDisclosure, _r as normalizeToolContent, _t as READ_SKILL_FILE_TOOL_NAME, a as ASK_USER_TOOL, an as SkillRouter, ar as formatSkillScriptManifest, at as LifecycleListener, b as BridgeCapability, bn as ToolStepReader, br as parseUserProfileExport, bt as RedactedArgs, c as AgentLoop, cn as SkillStateGuard, cr as interruptedToolResult, ct as NetworkPolicy, d as AnthropicClient, dn as TerminalLifecycleData, dr as listSkillScripts, dt as PdfTextExtractor, en as SessionRecord, er as exportUserProfile, et as InteractLifecycleData, f as AnthropicClientConfig, fn as TextualToolContent, fr as mergeCatalogEntries, ft as ProgressiveRouter, g as BehaviorRecord, gn as ToolDefinition, gr as normalizeErrorCode, gt as READ_SKILL_FILE_TOOL, h as BEHAVIOR_RECORDS_KEY, hn as ToolContent, hr as networkUrlHost, ht as READ_SKILL_FILE_INPUT_SCHEMA, i as ASK_USER_MAX_FIELDS, in as SkillOutcomeReporter, ir as findUnpairedToolCalls, it as LifecycleHookContext, j as DataSourceInfo, jn as USER_PROFILE_KEY, jr as schemaToForm, jt as RunTraceFile, k as DEFAULT_MAX_UPLOAD_FILE_BYTES, kn as UPLOAD_FILES_UNAVAILABLE, kr as sampleBehaviorRecords, kt as RunTerminationReason, l as AgentLoopConfig, ln as SkillSuccessReport, lr as isNetworkAllowed, lt as OpenAiCompatibleClient, m as ApprovalScope, mn as ToolCallContext, mr as networkPolicyLibSource, mt as READ_LINKED_DOCUMENT_TOOL_NAME, n as ASK_USER_FIELD_TYPES, nn as SkillFailureReport, nr as extractTodoTraceEvents, nt as LifecycleEventInit, o as ASK_USER_TOOL_NAME, on as SkillScriptDescriptor, or as fromVercelResult, ot as LinkedDocumentReader, p as ApprovalDecision, pn as TodoTraceEvent, pr as mergeProfileEntries, pt as READ_LINKED_DOCUMENT_TOOL, q as FullDisclosureRouter, qn as appendBehaviorRecords, qt as ScriptExecutor, r as ASK_USER_INPUT_SCHEMA, rn as SkillIntegrityGuard, rr as extractUiSpecEvents, rt as LifecycleHook, s as ActivateLifecycleData, sn as SkillScriptSchemaSource, sr as fromVercelStreamPart, st as MAX_TOOL_STEP_ARG_BYTES, t as ALLOWED_TOOLS_EXCLUSION_REASON, tn as SessionStore, tr as extractChartSpec, tt as LifecycleEvent, u as AgentLoopDeps, un as TEXT_BUDGETED_CONTENT_TYPES, ur as isUnsupportedRunSnapshot, ut as OpenAiCompatibleClientConfig, v as BehaviorScene, vn as ToolResolution, vr as normalizeToolError, vt as RUN_SNAPSHOT_SCHEMA_VERSION, w as CapabilityMode, wn as TraceClock, wr as readUserProfile, wt as RunLimitErrorDetails, x as BridgeRequest, xn as ToolStepRecord, xr as partsToText, xt as RefineUserProfileInput, y as BridgeCapabilities, yn as ToolResult, yr as parseBridgeRequest, yt as RUN_TRACE_SCHEMA_VERSION, z as ExternalToolSource, zn as UserProfileExport, zr as toRecordDigests, zt as RuntimeRun } from "./index-BDyXe-a5.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.16.0";
9
+ declare const SDK_VERSION = "0.18.0";
10
10
  //#endregion
11
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_MAX_UPLOAD_FILE_BYTES, DEFAULT_USER_PROFILE_LIMITS, DOCX_MIME, type DataSourceInfo, type DiscoveryResult, type DocumentSurfaceHost, type DocumentSurfacePort, 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 RunUploadFiles, 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, UNTRUSTED_LINE_LIMIT, UPLOAD_FILES_UNAVAILABLE, 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 UploadFileInfo, 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, sanitizeUntrustedLine, 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
@@ -3,13 +3,13 @@ import { A as SKILL_MANIFEST_FILE, C as keyIdOf, D as verifySkillSignature, E as
3
3
  import { a as atomicWriteText, i as ATOMIC_TMP_SUFFIX_PATTERN, n as normalizePath, o as isAtomicTempPath, r as resolveInsideRoot, t as assertSafePathSegment } from "./pathSecurity-B1owvJAF.js";
4
4
  import { t as assertRemoteUrlAllowed } from "./urlSafety-CiSuCJvX.js";
5
5
  import { a as TEXT_EXTENSIONS, c as formatAttachmentText, i as IMAGE_MIME_TYPES, l as UNTRUSTED_LINE_LIMIT, n as DOCX_MIME, o as XLSX_MIME, r as FILE_MIME_TYPES, s as classifyAttachment, t as ATTACHMENT_TEXT_LIMIT, u as sanitizeUntrustedLine } from "./kind-DxgS8LM-.js";
6
- import { $ as scriptToolName, A as readUserProfile, B as createScriptContext, C as TraceRecorder, D as mergeProfileEntries, E as appendBehaviorRecords, F as DEFAULT_USER_PROFILE_LIMITS, G as ASK_USER_TOOL_NAME, H as ASK_USER_INPUT_SCHEMA, I as EMPTY_USER_PROFILE, J as READ_SKILL_FILE_TOOL_NAME, K as READ_SKILL_FILE_INPUT_SCHEMA, L as SerializingMemoryStore, M as USER_PROFILE_NO_INVENTION_RULE, N as USER_PROFILE_PROMPT_HEADER, O as readBehaviorRecords, P as renderUserProfileContext, Q as schemaSourceLabel, R as EventBus, S as extractTodoTraceEvents, T as USER_PROFILE_KEY, U as ASK_USER_MAX_FIELDS, V as ASK_USER_FIELD_TYPES, W as ASK_USER_TOOL, X as formatSkillScriptManifest, Y as ALLOWED_TOOLS_EXCLUSION_REASON, Z as listSkillScripts, _ as RUN_SNAPSHOT_SCHEMA_VERSION, a as networkPolicyLibSource, at as xmlRenderer, b as MAX_TOOL_STEP_ARG_BYTES, c as bridgeError, d as FsMemoryStore, et as resolveToolName, f as WebSkillRuntime, g as FsRunSnapshotStore, h as redactToolStepArgs, i as isNetworkAllowed, it as renderAvailableSkillsXml, j as sampleBehaviorRecords, k as readProfileEntries, l as parseBridgeRequest, m as SENSITIVE_ANNOTATION, n as normalizeErrorCode, nt as ProgressiveRouter, o as networkUrlHost, p as AgentLoop, q as READ_SKILL_FILE_TOOL, r as normalizeToolError, rt as escapeXml, s as UPLOAD_FILES_UNAVAILABLE, t as CapabilityApproval, tt as toLlmToolSpec, u as FsArtifactStore, v as isUnsupportedRunSnapshot, w as BEHAVIOR_RECORDS_KEY, x as extractSkillCandidate, y as DEFAULT_LOOP_LIMITS, z as schemaToForm } from "./approval-BnLLCOG0.js";
7
- import { a as GoogleGenAiClient, c as findUnpairedToolCalls, d as partsToText, f as promptText, i as toVercelToolSpecs, l as interruptedToolResult, n as fromVercelResult, o as AnthropicClient, p as textParts, r as fromVercelStreamPart, s as OpenAiCompatibleClient, u as sealToolCallPairs } from "./llm-B7lLH0ZI.js";
6
+ import { $ as scriptToolName, A as readUserProfile, B as createScriptContext, C as TraceRecorder, D as mergeProfileEntries, E as appendBehaviorRecords, F as DEFAULT_USER_PROFILE_LIMITS, G as ASK_USER_TOOL_NAME, H as ASK_USER_INPUT_SCHEMA, I as EMPTY_USER_PROFILE, J as READ_SKILL_FILE_TOOL_NAME, K as READ_SKILL_FILE_INPUT_SCHEMA, L as SerializingMemoryStore, M as USER_PROFILE_NO_INVENTION_RULE, N as USER_PROFILE_PROMPT_HEADER, O as readBehaviorRecords, P as renderUserProfileContext, Q as schemaSourceLabel, R as EventBus, S as extractTodoTraceEvents, T as USER_PROFILE_KEY, U as ASK_USER_MAX_FIELDS, V as ASK_USER_FIELD_TYPES, W as ASK_USER_TOOL, X as formatSkillScriptManifest, Y as ALLOWED_TOOLS_EXCLUSION_REASON, Z as listSkillScripts, _ as RUN_SNAPSHOT_SCHEMA_VERSION, a as networkPolicyLibSource, at as xmlRenderer, b as MAX_TOOL_STEP_ARG_BYTES, c as bridgeError, d as FsMemoryStore, et as resolveToolName, f as WebSkillRuntime, g as FsRunSnapshotStore, h as redactToolStepArgs, i as isNetworkAllowed, it as renderAvailableSkillsXml, j as sampleBehaviorRecords, k as readProfileEntries, l as parseBridgeRequest, m as SENSITIVE_ANNOTATION, n as normalizeErrorCode, nt as ProgressiveRouter, o as networkUrlHost, p as AgentLoop, q as READ_SKILL_FILE_TOOL, r as normalizeToolError, rt as escapeXml, s as UPLOAD_FILES_UNAVAILABLE, t as CapabilityApproval, tt as toLlmToolSpec, u as FsArtifactStore, v as isUnsupportedRunSnapshot, w as BEHAVIOR_RECORDS_KEY, x as extractSkillCandidate, y as DEFAULT_LOOP_LIMITS, z as schemaToForm } from "./approval-B7GW86u2.js";
7
+ import { a as GoogleGenAiClient, c as findUnpairedToolCalls, d as partsToText, f as promptText, i as toVercelToolSpecs, l as interruptedToolResult, n as fromVercelResult, o as AnthropicClient, p as textParts, r as fromVercelStreamPart, s as OpenAiCompatibleClient, u as sealToolCallPairs } from "./llm-eIQNO9tr.js";
8
8
  import { c as DEFAULT_MAX_DOCUMENT_BYTES, d as TEXT_BUDGETED_CONTENT_TYPES, i as UNSUPPORTED_DOCUMENT_MESSAGE, l as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, n as READ_LINKED_DOCUMENT_TOOL_NAME, o as toBase64, r as SUPPORTED_DOCUMENT_MIME, s as DEFAULT_MAX_DATA_SOURCE_BYTES, t as READ_LINKED_DOCUMENT_TOOL, u as DEFAULT_MAX_UPLOAD_FILE_BYTES } from "./linkedDocument-xNXF-z8n.js";
9
9
  import { n as normalizeToolContent, t as mergeCatalogEntries } from "./external-_ZRQe-V9.js";
10
10
  import { n as extractChartSpec, t as buildRenderResult } from "./renderResult-D9Q-Vu2x.js";
11
11
  import { n as validateUiSpecEvent, r as validateUiSpecNode, t as extractUiSpecEvents } from "./surface-DVGiCmwq.js";
12
- import { t as createWebSkillApi } from "./webSkillApi-DOOyz2G5.js";
12
+ import { t as createWebSkillApi } from "./webSkillApi-DMENIqW0.js";
13
13
 
14
14
  //#region ../core/src/fs/memoryFs.ts
15
15
  const ROOT = "/";
@@ -1004,7 +1004,7 @@ var FsToolStepStore = class {
1004
1004
  * Version of the published `@webskill/sdk` package, injected at build time.
1005
1005
  * @stable
1006
1006
  */
1007
- const SDK_VERSION = "0.16.0";
1007
+ const SDK_VERSION = "0.18.0";
1008
1008
 
1009
1009
  //#endregion
1010
1010
  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_MAX_UPLOAD_FILE_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, UNTRUSTED_LINE_LIMIT, UPLOAD_FILES_UNAVAILABLE, 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, sanitizeUntrustedLine, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
@@ -809,6 +809,44 @@ const toOpenAiTools = (tools) => tools.map((tool) => ({
809
809
  }
810
810
  }));
811
811
  const errorMessage$2 = (e) => e instanceof Error ? e.message : String(e);
812
+ /** 错误正文只给能定位问题的开头一段,整份上游响应仍在 cause 里 */
813
+ const DETAIL_LIMIT = 500;
814
+ /**
815
+ * 2xx 响应体里的业务错误文本。兼容端点在「HTTP 成功但业务失败」时的三种常见形态:
816
+ * OpenAI `{error:{message}}`、Ollama `{error:"..."}`、vLLM `{object:"error",message:"..."}`。
817
+ */
818
+ const upstreamErrorText = (data) => {
819
+ if (typeof data !== "object" || data === null) return void 0;
820
+ const record = data;
821
+ const error = record["error"];
822
+ if (typeof error === "string" && error !== "") return error;
823
+ if (typeof error === "object" && error !== null) {
824
+ const message = error["message"];
825
+ if (typeof message === "string" && message !== "") return message;
826
+ }
827
+ const top = record["message"];
828
+ if (record["object"] === "error" && typeof top === "string" && top !== "") return top;
829
+ };
830
+ const parseJsonOrUndefined = (text) => {
831
+ try {
832
+ return JSON.parse(text);
833
+ } catch {
834
+ return;
835
+ }
836
+ };
837
+ /**
838
+ * 错误正文会进 trace 与控制台,而网关形态的 baseUrl 里常带凭据
839
+ * (`https://user:pass@host`、`?api-key=...`)。报 URL 只为了让宿主认出自己指错了地方,
840
+ * origin + pathname 已经够;解不出来的就原样给回(那就不是一个能藏凭据的 URL)。
841
+ */
842
+ const redactUrl = (url) => {
843
+ try {
844
+ const parsed = new URL(url);
845
+ return `${parsed.origin}${parsed.pathname}`;
846
+ } catch {
847
+ return url;
848
+ }
849
+ };
812
850
  /** OpenAI chat completions 协议客户端(兼容端点通用) */
813
851
  var OpenAiCompatibleClient = class {
814
852
  #config;
@@ -827,19 +865,19 @@ var OpenAiCompatibleClient = class {
827
865
  };
828
866
  }
829
867
  async complete(input) {
830
- const res = await this.#postChat(input, false);
868
+ const { res, endpoint } = await this.#postChat(input, false);
831
869
  let data;
832
870
  try {
833
871
  data = await res.json();
834
872
  } catch (e) {
835
- throw new WebSkillError("LLM_REQUEST_FAILED", `Failed to parse LLM response: ${errorMessage$2(e)}`, e);
873
+ throw new WebSkillError("LLM_REQUEST_FAILED", `Failed to parse the LLM response from ${endpoint}: ${errorMessage$2(e)}`, e);
836
874
  }
837
- return this.#parseResponse(data);
875
+ return this.#parseResponse(data, endpoint);
838
876
  }
839
877
  /** SSE 流式:fetch + ReadableStream 按行解析 data: 帧(Node/浏览器通用) */
840
878
  async *stream(input) {
841
- const res = await this.#postChat(input, true);
842
- if (!res.body) throw new WebSkillError("LLM_REQUEST_FAILED", "LLM streaming response has no body");
879
+ const { res, endpoint } = await this.#postChat(input, true);
880
+ if (!res.body) throw new WebSkillError("LLM_REQUEST_FAILED", `The LLM streaming response from ${endpoint} has no body`);
843
881
  const toolCallsByIndex = /* @__PURE__ */ new Map();
844
882
  const decoder = new TextDecoder();
845
883
  const reader = res.body.getReader();
@@ -847,6 +885,8 @@ var OpenAiCompatibleClient = class {
847
885
  const think = createThinkTagSplitter();
848
886
  let done = false;
849
887
  let usage;
888
+ let sawFrame = false;
889
+ let head = "";
850
890
  const handleFrame = function* (data) {
851
891
  if (data === "[DONE]") {
852
892
  done = true;
@@ -897,7 +937,10 @@ var OpenAiCompatibleClient = class {
897
937
  try {
898
938
  for (;;) {
899
939
  const { value, done: readerDone } = await reader.read();
900
- const payloads = readerDone ? frames.flush() : frames.push(decoder.decode(value, { stream: true }));
940
+ const text = readerDone ? "" : decoder.decode(value, { stream: true });
941
+ const payloads = readerDone ? frames.flush() : frames.push(text);
942
+ if (payloads.length > 0) sawFrame = true;
943
+ else if (!sawFrame && head.length < DETAIL_LIMIT) head += text;
901
944
  for (const payload of payloads) {
902
945
  yield* handleFrame(payload);
903
946
  if (done) break;
@@ -907,6 +950,10 @@ var OpenAiCompatibleClient = class {
907
950
  } finally {
908
951
  reader.releaseLock();
909
952
  }
953
+ if (!sawFrame) {
954
+ const upstream = upstreamErrorText(parseJsonOrUndefined(head));
955
+ throw new WebSkillError("LLM_REQUEST_FAILED", upstream === void 0 ? `The LLM stream from ${endpoint} carried no data frames; the endpoint answered HTTP 200 but not an event stream${head === "" ? "" : `: ${head.slice(0, DETAIL_LIMIT)}`}` : `The endpoint ${endpoint} answered HTTP 200 with an error instead of a stream: ${upstream.slice(0, DETAIL_LIMIT)}`, head);
956
+ }
910
957
  const tail = think.flush();
911
958
  if (tail.thinking !== "") yield {
912
959
  type: "thinking-delta",
@@ -955,9 +1002,11 @@ var OpenAiCompatibleClient = class {
955
1002
  body["stream"] = true;
956
1003
  body["stream_options"] = { include_usage: true };
957
1004
  }
1005
+ const endpoint = `${baseUrl}/chat/completions`;
1006
+ const shown = redactUrl(endpoint);
958
1007
  let res;
959
1008
  try {
960
- res = await this.#fetch(`${baseUrl}/chat/completions`, {
1009
+ res = await this.#fetch(endpoint, {
961
1010
  method: "POST",
962
1011
  headers: {
963
1012
  "content-type": "application/json",
@@ -967,13 +1016,16 @@ var OpenAiCompatibleClient = class {
967
1016
  signal: input.signal ?? (this.#config.requestTimeoutMs ? AbortSignal.timeout(this.#config.requestTimeoutMs) : null)
968
1017
  });
969
1018
  } catch (e) {
970
- throw new WebSkillError("LLM_REQUEST_FAILED", `LLM request failed: ${errorMessage$2(e)}`, e);
1019
+ throw new WebSkillError("LLM_REQUEST_FAILED", `The LLM request to ${shown} failed: ${errorMessage$2(e)}`, e);
971
1020
  }
972
1021
  if (!res.ok) {
973
1022
  const detail = await res.text().catch(() => "");
974
- throw new WebSkillError("LLM_REQUEST_FAILED", `LLM request failed with HTTP ${res.status}${detail ? `: ${detail.slice(0, 500)}` : ""}`, { status: res.status });
1023
+ throw new WebSkillError("LLM_REQUEST_FAILED", `The LLM request to ${shown} failed with HTTP ${res.status}${detail ? `: ${detail.slice(0, DETAIL_LIMIT)}` : ""}`, { status: res.status });
975
1024
  }
976
- return res;
1025
+ return {
1026
+ res,
1027
+ endpoint: shown
1028
+ };
977
1029
  }
978
1030
  /** 轻量探测(GET /models),集成测试据此决定 skip */
979
1031
  async checkAvailability() {
@@ -984,10 +1036,13 @@ var OpenAiCompatibleClient = class {
984
1036
  return false;
985
1037
  }
986
1038
  }
987
- #parseResponse(data) {
1039
+ #parseResponse(data, endpoint) {
988
1040
  try {
989
1041
  const choice = data.choices?.[0]?.message;
990
- if (!choice) throw new Error("response has no choices[0].message");
1042
+ if (!choice) {
1043
+ const upstream = upstreamErrorText(data);
1044
+ throw new Error(upstream === void 0 ? `the response from ${endpoint} has no choices[0].message` : `the endpoint ${endpoint} answered HTTP 200 with an error instead of a completion: ${upstream.slice(0, DETAIL_LIMIT)}`);
1045
+ }
991
1046
  const toolCalls = choice["tool_calls"]?.map((tc) => {
992
1047
  let args = {};
993
1048
  let parseError;
package/dist/mcp.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { K as JsonSchema, _ as LlmToolSpec, ft as SkillDocument, ut as SkillCatalogEntry } from "./types-C3V6lAeO-BUpcRLER.js";
2
- import { R as ExternalSkillProvider, _n as ToolDisclosure, fr as mergeCatalogEntries, yn as ToolResult, z as ExternalToolSource } from "./index-DbVqg2V3.js";
1
+ import { K as JsonSchema, _ as LlmToolSpec, ft as SkillDocument, ut as SkillCatalogEntry } from "./types-Btpdd1y--BcxQ10Fa.js";
2
+ import { R as ExternalSkillProvider, _n as ToolDisclosure, fr as mergeCatalogEntries, yn as ToolResult, z as ExternalToolSource } from "./index-BDyXe-a5.js";
3
3
  import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
4
4
  import { JSONRPCMessage } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/dist/node.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as SKILLS_LOCKFILE, Ct as SkillsLockfile, Et as TrustedKeyStore, H as FileStat, K as JsonSchema, N as ArchiveLimits, 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, jt as VerifyResult, kt as UnsignedPolicy, pt as SkillInstallSource, s as InteractionRequest } from "./types-C3V6lAeO-BUpcRLER.js";
2
- import { Gn as WebSkillRuntimeDeps, Gt as SchemaInferer, H as FsMemoryStore, Kt as ScriptExecutionContext, V as FsArtifactStore, Wn as WebSkillRuntime, Zn as createScriptContext, ct as NetworkPolicy, gn as ToolDefinition, m as ApprovalScope, qt as ScriptExecutor, y as BridgeCapabilities, yn as ToolResult } from "./index-DbVqg2V3.js";
3
- import { a as AuditLog, b as SkillVersionStore, d as CandidateSkill, m as CandidateStore, r as ApprovalPolicy } from "./skillVersionStore-B24Jjjry-CsbzF7Oe.js";
1
+ import { $ as SKILLS_LOCKFILE, Ct as SkillsLockfile, Et as TrustedKeyStore, H as FileStat, K as JsonSchema, N as ArchiveLimits, 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, jt as VerifyResult, kt as UnsignedPolicy, pt as SkillInstallSource, s as InteractionRequest } from "./types-Btpdd1y--BcxQ10Fa.js";
2
+ import { Gn as WebSkillRuntimeDeps, Gt as SchemaInferer, H as FsMemoryStore, Kt as ScriptExecutionContext, V as FsArtifactStore, Wn as WebSkillRuntime, Zn as createScriptContext, ct as NetworkPolicy, gn as ToolDefinition, m as ApprovalScope, qt as ScriptExecutor, y as BridgeCapabilities, yn as ToolResult } from "./index-BDyXe-a5.js";
3
+ import { a as AuditLog, b as SkillVersionStore, d as CandidateSkill, m as CandidateStore, r as ApprovalPolicy } from "./skillVersionStore-B24Jjjry-v2CCU0Xo.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
@@ -2,7 +2,7 @@ import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
2
2
  import { A as SKILL_MANIFEST_FILE, D as verifySkillSignature, M as buildManifest, O as MANIFEST_EXCLUDED_FILES, P as verifyManifest, b as parseSkillMarkdown, c as unzipWithLimits, f as SKILL_PACK_FILE, k as SKILLS_LOCKFILE, m as parseSkillPackManifest, o as readResponseWithLimit, p as exportSkills, s as resolveArchiveLimits, t as validateSkills, w as readSkillSignature, y as isValidSkillName } from "./skill-CAJMsLod.js";
3
3
  import { a as atomicWriteText, o as isAtomicTempPath, r as resolveInsideRoot, t as assertSafePathSegment } from "./pathSecurity-B1owvJAF.js";
4
4
  import { t as assertRemoteUrlAllowed } from "./urlSafety-CiSuCJvX.js";
5
- import { B as createScriptContext, a as networkPolicyLibSource, c as bridgeError, d as FsMemoryStore, f as WebSkillRuntime, l as parseBridgeRequest, r as normalizeToolError, s as UPLOAD_FILES_UNAVAILABLE, t as CapabilityApproval, u as FsArtifactStore } from "./approval-BnLLCOG0.js";
5
+ import { B as createScriptContext, a as networkPolicyLibSource, c as bridgeError, d as FsMemoryStore, f as WebSkillRuntime, l as parseBridgeRequest, r as normalizeToolError, s as UPLOAD_FILES_UNAVAILABLE, t as CapabilityApproval, u as FsArtifactStore } from "./approval-B7GW86u2.js";
6
6
  import { n as normalizeToolContent } from "./external-_ZRQe-V9.js";
7
7
  import { i as probeLlmCapabilities } from "./env-Bj1MI2Ww.js";
8
8
  import { t as AUDIT_EVENT_TYPES } from "./eventTypes-CwciaqCU.js";
@@ -500,13 +500,16 @@ var SandboxedScriptExecutor = class {
500
500
  }
501
501
  /** 能力桥宿主侧处理:能力关闭/授权拒绝即 TOOL_UNSUPPORTED;判定逻辑共用 runtime/sandbox/approval */
502
502
  async #handleBridge(request, context) {
503
- const gate = async (capability, message, details) => {
503
+ const gate = async (capability, message, details = {}) => {
504
504
  const decision = await this.#approval.authorize({
505
505
  runId: context.runId,
506
506
  capability,
507
507
  mode: this.#capabilities[capability],
508
508
  message,
509
- ...details !== void 0 ? { details } : {}
509
+ details: {
510
+ skill: context.skillName,
511
+ ...details
512
+ }
510
513
  });
511
514
  if (decision === "allowed") return void 0;
512
515
  return bridgeError(request.id, "TOOL_UNSUPPORTED", decision === "disabled" ? `Capability "${capability}" is disabled by the sandbox capability settings` : `Capability "${capability}" was denied by the user`);
@@ -564,7 +567,7 @@ var SandboxedScriptExecutor = class {
564
567
  }
565
568
  case "confirm": {
566
569
  if (!context.confirm) return bridgeError(request.id, "TOOL_UNSUPPORTED", "Capability \"confirm\" is disabled");
567
- const denied = await gate("confirm", `Script "${context.skillName}" asks for confirmation: ${request.message}`);
570
+ const denied = await gate("confirm", `Script "${context.skillName}" asks for confirmation: ${request.message}`, { question: request.message });
568
571
  if (denied) return denied;
569
572
  return {
570
573
  id: request.id,
@@ -895,13 +898,16 @@ var ProcessSandboxExecutor = class {
895
898
  }
896
899
  /** 能力桥宿主侧处理:与 worker_threads 沙箱同一判定(runtime/sandbox/approval 单一来源) */
897
900
  async #handleBridge(request, context) {
898
- const gate = async (capability, message, details) => {
901
+ const gate = async (capability, message, details = {}) => {
899
902
  const decision = await this.#approval.authorize({
900
903
  runId: context.runId,
901
904
  capability,
902
905
  mode: this.#capabilities[capability],
903
906
  message,
904
- ...details !== void 0 ? { details } : {}
907
+ details: {
908
+ skill: context.skillName,
909
+ ...details
910
+ }
905
911
  });
906
912
  if (decision === "allowed") return void 0;
907
913
  return bridgeError(request.id, "TOOL_UNSUPPORTED", decision === "disabled" ? `Capability "${capability}" is disabled by the sandbox capability settings` : `Capability "${capability}" was denied by the user`);
@@ -959,7 +965,7 @@ var ProcessSandboxExecutor = class {
959
965
  }
960
966
  case "confirm": {
961
967
  if (!context.confirm) return bridgeError(request.id, "TOOL_UNSUPPORTED", "Capability \"confirm\" is disabled");
962
- const denied = await gate("confirm", `Script "${context.skillName}" asks for confirmation: ${request.message}`);
968
+ const denied = await gate("confirm", `Script "${context.skillName}" asks for confirmation: ${request.message}`, { question: request.message });
963
969
  if (denied) return denied;
964
970
  return {
965
971
  id: request.id,
@@ -1,4 +1,4 @@
1
- import { h as uiCatalog } from "./openUiSpecLang-BIK6CWlW.js";
1
+ import { h as uiCatalog } from "./openUiSpecLang-B4QQ9Tfo.js";
2
2
  import { t as CatalogNode } from "./ui-react.js";
3
3
  import { Renderer, createLibrary, defineComponent } from "./dist-CTsxblSD.js";
4
4
  import { z } from "zod";
@@ -1800,12 +1800,13 @@ function interactionToUiSpec(request, labels = {}) {
1800
1800
  },
1801
1801
  children: model.controls.map(toField)
1802
1802
  };
1803
- if (model.controls.length > 0 || !model.message) return form;
1803
+ const message = labels.message ?? model.message;
1804
+ if (model.controls.length > 0 || !message) return form;
1804
1805
  return {
1805
1806
  component: "Stack",
1806
1807
  children: [{
1807
1808
  component: "Text",
1808
- props: { text: model.message }
1809
+ props: { text: message }
1809
1810
  }, form]
1810
1811
  };
1811
1812
  }
@@ -1,4 +1,4 @@
1
- import { U as FileSystemProvider, X as PageQuery, Y as Page, _t as SkillManifest, ut as SkillCatalogEntry } from "./types-C3V6lAeO-BUpcRLER.js";
1
+ import { U as FileSystemProvider, X as PageQuery, Y as Page, _t as SkillManifest, ut as SkillCatalogEntry } from "./types-Btpdd1y--BcxQ10Fa.js";
2
2
  //#region ../governance/dist/skillVersionStore-B24Jjjry.d.ts
3
3
  //#region src/types.d.ts
4
4
  type CandidateStatus = 'draft' | 'pending-review' | 'approved' | 'published' | 'rejected';
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-C3V6lAeO-BUpcRLER.js";
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-Btpdd1y--BcxQ10Fa.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,4 +1,4 @@
1
- import { t as MockLlmClient } from "./llm-B7lLH0ZI.js";
1
+ import { t as MockLlmClient } from "./llm-eIQNO9tr.js";
2
2
  import { t as MemoryArtifactStore } from "./memoryArtifactStore-D6dLeY55.js";
3
3
  import { n as loadGoogleConfigFromEnv, r as loadLlmConfigFromEnv, t as loadAnthropicConfigFromEnv } from "./env-Bj1MI2Ww.js";
4
4
 
@@ -17,7 +17,7 @@ type WebSkillErrorCode = 'FS_NOT_FOUND' | 'FS_PATH_OUTSIDE_ROOT' | 'SKILL_NOT_FO
17
17
  /** 0.11.0 分册 18:用户拒绝把数据交给文档投放面 */
18
18
  'DOCUMENT_SURFACE_DECLINED' |
19
19
  /** 0.11.0 分册 18:viewer 未在期限内回报就绪(路由挂了 / 外壳脚本没跑起来) */
20
- 'DOCUMENT_SURFACE_UNAVAILABLE' | '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_DOCUMENT_UNSUPPORTED' | 'MODEL_TOOLS_UNSUPPORTED' | 'ATTACHMENT_TOO_LARGE' | 'ATTACHMENT_TYPE_REJECTED' |
20
+ 'DOCUMENT_SURFACE_UNAVAILABLE' | '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' | 'CAMERA_UNAVAILABLE' | 'CAMERA_PERMISSION_DENIED' | 'CAMERA_CAPTURE_FAILED' | 'PERCEPTION_NOT_ENABLED' | 'PERCEPTION_FAILED' | 'MODEL_IMAGE_UNSUPPORTED' | 'MODEL_DOCUMENT_UNSUPPORTED' | 'MODEL_TOOLS_UNSUPPORTED' | 'ATTACHMENT_TOO_LARGE' | 'ATTACHMENT_TYPE_REJECTED' |
21
21
  /** 脚本取了宿主未声明的数据源;拒绝发生在发出任何请求之前(0.11.0 分册 16) */
22
22
  'DATA_SOURCE_NOT_FOUND' |
23
23
  /** 取数结果超预算。与 ATTACHMENT_TOO_LARGE 同口径:拒绝而不截断 */
@@ -716,7 +716,7 @@ declare function escapeXml(text: string): string;
716
716
  declare function renderAvailableSkillsXml(catalog: SkillCatalog): string;
717
717
  declare const xmlRenderer: CatalogRenderer;
718
718
  //#endregion
719
- //#region ../runtime/dist/types-C3V6lAeO.d.ts
719
+ //#region ../runtime/dist/types-Btpdd1y-.d.ts
720
720
  //#region src/llm/streamTypes.d.ts
721
721
  /** 流式 LLM 事件(OpenAI SSE / Vercel fullStream 统一映射) */
722
722
  type LlmStreamEvent = {
@@ -939,8 +939,14 @@ type InteractionRequest = {
939
939
  id: string;
940
940
  capability: 'readReference' | 'readAsset' | 'writeArtifact' | 'confirm' | 'fetchData' | 'pageAction' | 'readLinkedDocument' |
941
941
  /** 读取本机下载目录(0.14.0 分册 20) */
942
- 'readDownloadedFile';
942
+ 'readDownloadedFile' |
943
+ /** 读取本轮上传的文件(0.15.0 分册 17;0.17.0 分册 19 从 `confirm` 改到这里) */
944
+ 'readUploadFile';
943
945
  message: string;
946
+ /**
947
+ * 结构化载荷。`message` 是无字典层的英文兜底,持有字典的宿主据本字段重写正文
948
+ * (分册 19 FR-19.6):只发散文的话,本地化在渲染层无从下手。
949
+ */
944
950
  details?: unknown;
945
951
  });
946
952
  interface InteractionResponse {
@@ -58,12 +58,12 @@ function toActionFrameScopes(scope) {
58
58
  }];
59
59
  }
60
60
  /**
61
- * 本版的操作集(FR-25.1 / 0.16.0 FR-13.6)。拖拽、滚动仍不在内;
61
+ * 本版的操作集(FR-25.1 / 0.16.0 FR-13.6 / 0.18.0 FR-10.1)。拖拽仍不在内(D64);
62
62
  * 导航只有 `back` 一个,且它**不接受地址**——可达面被浏览器历史封死(SC-1)。
63
63
  *
64
- * `select`/`set`/`attach` 与既有三个走**同一条** policy 路径,
64
+ * `select`/`set`/`attach`/`scroll` 与既有几个走**同一条** policy 路径,
65
65
  * 范围白名单、逐次确认、审计三条硬约束因此天然覆盖到它们——
66
- * 前提是新动作不绕过 policy 直接调执行器(AC-25.4 守这一点)。
66
+ * 前提是新动作不绕过 policy 直调执行器(AC-25.4 守这一点)。
67
67
  * @experimental
68
68
  */
69
69
  const PAGE_ACTION_KINDS = [
@@ -73,6 +73,7 @@ const PAGE_ACTION_KINDS = [
73
73
  "select",
74
74
  "set",
75
75
  "attach",
76
+ "scroll",
76
77
  "back"
77
78
  ];
78
79
  /**
@@ -1,6 +1,6 @@
1
- import { C as UiSpecActionCapability, D as UiSpecSnapshot, O as UiSurfaceActionRequest, Ot as UiSpecNode, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-C3V6lAeO-BUpcRLER.js";
2
- import { N as DocumentSurfacePort } from "./index-DbVqg2V3.js";
3
- import { J as SurfaceHostControlTexts, P as InteractionSpecLabels, q as SurfaceFormTexts, v as ChartFontSizes } from "./index-DeXgdtHa.js";
1
+ import { C as UiSpecActionCapability, D as UiSpecSnapshot, O as UiSurfaceActionRequest, Ot as UiSpecNode, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-Btpdd1y--BcxQ10Fa.js";
2
+ import { N as DocumentSurfacePort } from "./index-BDyXe-a5.js";
3
+ import { J as SurfaceHostControlTexts, P as InteractionSpecLabels, q as SurfaceFormTexts, v as ChartFontSizes } from "./index-CaLsVI-m.js";
4
4
  import { z } from "zod";
5
5
  import React$1, { ComponentType, ReactNode } from "react";
6
6
  import "react/jsx-runtime";
package/dist/ui-react.js CHANGED
@@ -2,7 +2,7 @@ import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __
2
2
  import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
3
3
  import { n as validateUiSpecEvent, r as validateUiSpecNode } from "./surface-DVGiCmwq.js";
4
4
  import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-lauNtZu8.js";
5
- import { C as chartSpecFromProps, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, d as collectScopedValues, f as qualifyFieldName, h as uiCatalog, l as evaluateFieldCondition, n as interactionToUiSpec, o as normalizeColumnWidths, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, w as mountEchart, x as gaugePercent } from "./openUiSpecLang-BIK6CWlW.js";
5
+ import { C as chartSpecFromProps, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, d as collectScopedValues, f as qualifyFieldName, h as uiCatalog, l as evaluateFieldCondition, n as interactionToUiSpec, o as normalizeColumnWidths, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, w as mountEchart, x as gaugePercent } from "./openUiSpecLang-B4QQ9Tfo.js";
6
6
  import minpath from "node:path";
7
7
  import { fileURLToPath as urlToPath } from "node:url";
8
8
  import { z } from "zod";
@@ -131337,7 +131337,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
131337
131337
  const [unavailable, setUnavailable] = useState(false);
131338
131338
  useEffect(() => {
131339
131339
  let cancelled = false;
131340
- import("./openUiLibrary-BWEBU9P-.js").then((loaded) => {
131340
+ import("./openUiLibrary-BJtCG5B1.js").then((loaded) => {
131341
131341
  if (!cancelled) setModule(loaded);
131342
131342
  }).catch(() => {
131343
131343
  if (!cancelled) setUnavailable(true);
package/dist/ui-vue.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-C3V6lAeO-BUpcRLER.js";
1
+ import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-Btpdd1y--BcxQ10Fa.js";
2
2
  import { PropType } from "vue";
3
3
  //#region ../ui-vue/dist/index.d.ts
4
4
  //#region src/bridgeState.d.ts
package/dist/ui.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Ot as UiSpecNode } from "./types-C3V6lAeO-BUpcRLER.js";
2
- import { Xn as buildRenderResult } from "./index-DbVqg2V3.js";
3
- import { $ as UiActionDef, $t as qualifyFieldName, A as EvaluateFieldConditionOptions, At as buildA2uiCatalogDefinition, B as OpenUiRendererProps, Bt as evaluateFieldCondition, C as DEFAULT_INTERACTION_TEXTS, Ct as WEBSKILL_STYLES_CSS, D as DOCUMENT_COMPONENTS, Dt as a2uiComponentSchema, E as DESCRIBE_UI_PRESET_TOOL, Et as ZodRuntime, F as InteractionTexts, Ft as collectSpecActions, G as SPEC_TABLE_MIN_COLUMN_WIDTH, Gt as gaugePercent, H as PLANNED_INCREMENT, Ht as fromA2uiSurfaceAction, I as JsonRenderSpec, It as collectValues, J as SurfaceHostControlTexts, Jt as loadOpenUiPeers, K as SpecColumnMeta, Kt as interactionToFormModel, L as LoadedOpenUiPeers, Lt as createUiCatalogToolSource, M as FieldConditionResult, Mt as chartToTable, N as FormModel, Nt as collectFormScopes, O as DocumentComponentName, Ot as a2uiComponentShapes, P as InteractionSpecLabels, Pt as collectScopedValues, Q as UI_PRESET_NAMES, Qt as normalizeColumnWidths, R as MAX_CONDITION_DEPTH, Rt as defineUiCatalog, S as DEFAULT_CHART_FONT_SIZES, St as WEBSKILL_A2UI_CATALOG_ID, T as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, Tt as WebFormBridge, U as RENDER_UI_TOOL, Ut as fromUiSurfaceActionDispatch, V as OpenUiRuntime, Vt as fromA2uiSpecAction, W as SPEC_TABLE_MIN_COLUMN_VAR, Wt as fromVercelToolResult, X as UI_CATALOG_PROMPT_BUDGET_BYTES, Xt as mountEchart, Y as UI_CATALOG_GROUPS, Yt as loadWebSkillLitCatalog, Z as UI_PRESETS, Zt as mountViewerComponents, _ as CHART_PALETTE, _n as uiCatalog, _t as VIEWER_PROPS_ATTR, a as A2UI_SURFACE_ACTION, an as resolveColumnWidths, at as UiFormScope, b as ColumnWidthsRejection, bt as ViewerComponentsHandle, c as A2uiCatalogDefinition, cn as resolveSurfaceHostControlTexts, ct as UiSpecDegradation, d as A2uiMessage, dn as toA2uiSurfaceAction, dt as UiSpecSanitization, en as renderBlocks, et as UiCatalog, f as A2uiSpecActionEvent, fn as toEchartsOption, ft as UiSpecValidation, g as CATALOG_SCHEMA_MAX, gn as toVercelToolInvocation, gt as VIEWER_FALLBACK_ATTR, h as CATALOG_PROMPT_MAX, hn as toUiSurfaceActionDispatch, ht as VIEWER_COMPONENT_ATTR, i as A2UI_SPEC_FORM_PATH, in as resolveChartFontSizes, it as UiComponentDef, j as FieldCondition, jt as chartSpecFromProps, k as EchartHandle, kt as applySuggestion, l as A2uiCatalogHandle, ln as shapeInteractionValue, lt as UiSpecDegradationCode, m as CATALOG_BUDGET_STAGE, mn as toOpenUiSpecLang, mt as VERCEL_INTERACTION_TOOL_NAME, n as A2UI_COMMON_TYPES, nn as renderMiniMarkdown, nt as UiCatalogPromptOptions, o as A2UI_VERSION, on as resolveInteractionTexts, ot as UiPreset, p as A2uiSpecMessageOptions, pn as toJsonRenderSpec, pt as UiSurfaceActionDispatch, q as SurfaceFormTexts, qt as interactionToUiSpec, r as A2UI_SPEC_ACTION, rn as renderRenderResult, rt as UiCatalogToolSourceOptions, s as A2uiCatalogComponent, sn as resolveSurfaceFormTexts, st as UiPresetName, t as A2UI_BASIC_CATALOG_ID, tn as renderMiniChart, tt as UiCatalogInput, u as A2uiComponentShape, un as toA2uiSpecMessages, ut as UiSpecIssue, v as ChartFontSizes, vn as uiPreset, vt as VercelToolInvocation, w as DEFAULT_SURFACE_FORM_TEXTS, wt as WEBSKILL_SURFACE_ACTION, x as ControlModel, xt as ViewerComponentsOptions, y as CollectedValues, yt as VercelUiBridge, z as NormalizedColumnWidths, zt as ensureStyles } from "./index-DeXgdtHa.js";
1
+ import { Ot as UiSpecNode } from "./types-Btpdd1y--BcxQ10Fa.js";
2
+ import { Xn as buildRenderResult } from "./index-BDyXe-a5.js";
3
+ import { $ as UiActionDef, $t as qualifyFieldName, A as EvaluateFieldConditionOptions, At as buildA2uiCatalogDefinition, B as OpenUiRendererProps, Bt as evaluateFieldCondition, C as DEFAULT_INTERACTION_TEXTS, Ct as WEBSKILL_STYLES_CSS, D as DOCUMENT_COMPONENTS, Dt as a2uiComponentSchema, E as DESCRIBE_UI_PRESET_TOOL, Et as ZodRuntime, F as InteractionTexts, Ft as collectSpecActions, G as SPEC_TABLE_MIN_COLUMN_WIDTH, Gt as gaugePercent, H as PLANNED_INCREMENT, Ht as fromA2uiSurfaceAction, I as JsonRenderSpec, It as collectValues, J as SurfaceHostControlTexts, Jt as loadOpenUiPeers, K as SpecColumnMeta, Kt as interactionToFormModel, L as LoadedOpenUiPeers, Lt as createUiCatalogToolSource, M as FieldConditionResult, Mt as chartToTable, N as FormModel, Nt as collectFormScopes, O as DocumentComponentName, Ot as a2uiComponentShapes, P as InteractionSpecLabels, Pt as collectScopedValues, Q as UI_PRESET_NAMES, Qt as normalizeColumnWidths, R as MAX_CONDITION_DEPTH, Rt as defineUiCatalog, S as DEFAULT_CHART_FONT_SIZES, St as WEBSKILL_A2UI_CATALOG_ID, T as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, Tt as WebFormBridge, U as RENDER_UI_TOOL, Ut as fromUiSurfaceActionDispatch, V as OpenUiRuntime, Vt as fromA2uiSpecAction, W as SPEC_TABLE_MIN_COLUMN_VAR, Wt as fromVercelToolResult, X as UI_CATALOG_PROMPT_BUDGET_BYTES, Xt as mountEchart, Y as UI_CATALOG_GROUPS, Yt as loadWebSkillLitCatalog, Z as UI_PRESETS, Zt as mountViewerComponents, _ as CHART_PALETTE, _n as uiCatalog, _t as VIEWER_PROPS_ATTR, a as A2UI_SURFACE_ACTION, an as resolveColumnWidths, at as UiFormScope, b as ColumnWidthsRejection, bt as ViewerComponentsHandle, c as A2uiCatalogDefinition, cn as resolveSurfaceHostControlTexts, ct as UiSpecDegradation, d as A2uiMessage, dn as toA2uiSurfaceAction, dt as UiSpecSanitization, en as renderBlocks, et as UiCatalog, f as A2uiSpecActionEvent, fn as toEchartsOption, ft as UiSpecValidation, g as CATALOG_SCHEMA_MAX, gn as toVercelToolInvocation, gt as VIEWER_FALLBACK_ATTR, h as CATALOG_PROMPT_MAX, hn as toUiSurfaceActionDispatch, ht as VIEWER_COMPONENT_ATTR, i as A2UI_SPEC_FORM_PATH, in as resolveChartFontSizes, it as UiComponentDef, j as FieldCondition, jt as chartSpecFromProps, k as EchartHandle, kt as applySuggestion, l as A2uiCatalogHandle, ln as shapeInteractionValue, lt as UiSpecDegradationCode, m as CATALOG_BUDGET_STAGE, mn as toOpenUiSpecLang, mt as VERCEL_INTERACTION_TOOL_NAME, n as A2UI_COMMON_TYPES, nn as renderMiniMarkdown, nt as UiCatalogPromptOptions, o as A2UI_VERSION, on as resolveInteractionTexts, ot as UiPreset, p as A2uiSpecMessageOptions, pn as toJsonRenderSpec, pt as UiSurfaceActionDispatch, q as SurfaceFormTexts, qt as interactionToUiSpec, r as A2UI_SPEC_ACTION, rn as renderRenderResult, rt as UiCatalogToolSourceOptions, s as A2uiCatalogComponent, sn as resolveSurfaceFormTexts, st as UiPresetName, t as A2UI_BASIC_CATALOG_ID, tn as renderMiniChart, tt as UiCatalogInput, u as A2uiComponentShape, un as toA2uiSpecMessages, ut as UiSpecIssue, v as ChartFontSizes, vn as uiPreset, vt as VercelToolInvocation, w as DEFAULT_SURFACE_FORM_TEXTS, wt as WEBSKILL_SURFACE_ACTION, x as ControlModel, xt as ViewerComponentsOptions, y as CollectedValues, yt as VercelUiBridge, z as NormalizedColumnWidths, zt as ensureStyles } from "./index-CaLsVI-m.js";
4
4
  export { A2UI_BASIC_CATALOG_ID, A2UI_COMMON_TYPES, A2UI_SPEC_ACTION, A2UI_SPEC_FORM_PATH, A2UI_SURFACE_ACTION, A2UI_VERSION, type A2uiCatalogComponent, type A2uiCatalogDefinition, type A2uiCatalogHandle, type A2uiComponentShape, type A2uiMessage, type A2uiSpecActionEvent, type A2uiSpecMessageOptions, CATALOG_BUDGET_STAGE, CATALOG_PROMPT_MAX, CATALOG_SCHEMA_MAX, CHART_PALETTE, type ChartFontSizes, type CollectedValues, type ColumnWidthsRejection, type ControlModel, DEFAULT_CHART_FONT_SIZES, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DEFAULT_SURFACE_HOST_CONTROL_TEXTS, DESCRIBE_UI_PRESET_TOOL, DOCUMENT_COMPONENTS, type DocumentComponentName, type EchartHandle, type EvaluateFieldConditionOptions, type FieldCondition, type FieldConditionResult, type FormModel, type InteractionSpecLabels, type InteractionTexts, type JsonRenderSpec, type LoadedOpenUiPeers, MAX_CONDITION_DEPTH, type NormalizedColumnWidths, type OpenUiRendererProps, type OpenUiRuntime, PLANNED_INCREMENT, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, type SpecColumnMeta, type SurfaceFormTexts, type SurfaceHostControlTexts, UI_CATALOG_GROUPS, UI_CATALOG_PROMPT_BUDGET_BYTES, UI_PRESETS, UI_PRESET_NAMES, type UiActionDef, type UiCatalog, type UiCatalogInput, type UiCatalogPromptOptions, type UiCatalogToolSourceOptions, type UiComponentDef, type UiFormScope, type UiPreset, type UiPresetName, type UiSpecDegradation, type UiSpecDegradationCode, type UiSpecIssue, type UiSpecNode, type UiSpecSanitization, type UiSpecValidation, type UiSurfaceActionDispatch, VERCEL_INTERACTION_TOOL_NAME, VIEWER_COMPONENT_ATTR, VIEWER_FALLBACK_ATTR, VIEWER_PROPS_ATTR, type VercelToolInvocation, VercelUiBridge, type ViewerComponentsHandle, type ViewerComponentsOptions, WEBSKILL_A2UI_CATALOG_ID, WEBSKILL_STYLES_CSS, WEBSKILL_SURFACE_ACTION, WebFormBridge, type ZodRuntime, a2uiComponentSchema, a2uiComponentShapes, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountViewerComponents, normalizeColumnWidths, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toEchartsOption, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
package/dist/ui.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as WebSkillError } from "./errors-BDZNpC13.js";
2
2
  import { t as buildRenderResult } from "./renderResult-D9Q-Vu2x.js";
3
3
  import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, d as resolveInteractionTexts, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, n as chartToTable, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, s as DEFAULT_INTERACTION_TEXTS, t as CHART_PALETTE, u as interactionToFormModel } from "./miniChart-lauNtZu8.js";
4
- import { C as chartSpecFromProps, E as toEchartsOption, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, _ as CATALOG_BUDGET_STAGE, a as SPEC_TABLE_MIN_COLUMN_WIDTH, b as PLANNED_INCREMENT, c as MAX_CONDITION_DEPTH, d as collectScopedValues, f as qualifyFieldName, g as defineUiCatalog, h as uiCatalog, i as SPEC_TABLE_MIN_COLUMN_VAR, l as evaluateFieldCondition, m as UI_CATALOG_PROMPT_BUDGET_BYTES, n as interactionToUiSpec, o as normalizeColumnWidths, p as UI_CATALOG_GROUPS, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, v as CATALOG_PROMPT_MAX, w as mountEchart, x as gaugePercent, y as CATALOG_SCHEMA_MAX } from "./openUiSpecLang-BIK6CWlW.js";
4
+ import { C as chartSpecFromProps, E as toEchartsOption, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, _ as CATALOG_BUDGET_STAGE, a as SPEC_TABLE_MIN_COLUMN_WIDTH, b as PLANNED_INCREMENT, c as MAX_CONDITION_DEPTH, d as collectScopedValues, f as qualifyFieldName, g as defineUiCatalog, h as uiCatalog, i as SPEC_TABLE_MIN_COLUMN_VAR, l as evaluateFieldCondition, m as UI_CATALOG_PROMPT_BUDGET_BYTES, n as interactionToUiSpec, o as normalizeColumnWidths, p as UI_CATALOG_GROUPS, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, v as CATALOG_PROMPT_MAX, w as mountEchart, x as gaugePercent, y as CATALOG_SCHEMA_MAX } from "./openUiSpecLang-B4QQ9Tfo.js";
5
5
 
6
6
  //#region ../ui/src/web/resultRenderer.ts
7
7
  /** RenderBlock → DOM(markdown/json/table/image/file/chart 六种) */
@@ -1224,7 +1224,7 @@ function fromA2uiSpecAction(event) {
1224
1224
  */
1225
1225
  async function loadWebSkillLitCatalog() {
1226
1226
  try {
1227
- const { webskillLitCatalog } = await import("./webskillLitCatalog-poL1qhBp.js");
1227
+ const { webskillLitCatalog } = await import("./webskillLitCatalog-BBkQjKuN.js");
1228
1228
  return webskillLitCatalog();
1229
1229
  } catch (cause) {
1230
1230
  throw new WebSkillError("UI_UNAVAILABLE", "The WebSkill A2UI catalog is unavailable; install @a2ui/lit, @a2ui/web_core and lit to render catalog surfaces with A2UI", cause);
@@ -1,6 +1,6 @@
1
1
  import { t as WebSkillError } from "./errors-BDZNpC13.js";
2
2
  import { b as parseSkillMarkdown, i as buildCatalog, n as SkillDiscovery, t as validateSkills } from "./skill-CAJMsLod.js";
3
- import { f as WebSkillRuntime } from "./approval-BnLLCOG0.js";
3
+ import { f as WebSkillRuntime } from "./approval-B7GW86u2.js";
4
4
 
5
5
  //#region ../runtime/src/facade/webSkillApi.ts
6
6
  /**
@@ -1,5 +1,5 @@
1
1
  import { c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown } from "./miniChart-lauNtZu8.js";
2
- import { C as chartSpecFromProps, h as uiCatalog, w as mountEchart } from "./openUiSpecLang-BIK6CWlW.js";
2
+ import { C as chartSpecFromProps, h as uiCatalog, w as mountEchart } from "./openUiSpecLang-B4QQ9Tfo.js";
3
3
  import { WEBSKILL_A2UI_CATALOG_ID, a2uiComponentShapes, t as A2UI_CHILDREN_PROP } from "./ui.js";
4
4
  import { A2uiController, A2uiLitElement } from "@a2ui/lit/v0_9";
5
5
  import { Catalog } from "@a2ui/web_core/v0_9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webskill/sdk",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "WebSkill — browser/Node agent skill runtime (skills, tools, MCP, governance, UI)",
5
5
  "license": "MIT",
6
6
  "type": "module",