@webskill/sdk 0.22.0 → 0.24.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 +200 -54
- package/dist/{approval-DWQlDPbY.js → approval-7CuZS3Z4.js} +3 -3
- package/dist/browser.d.ts +52 -7
- package/dist/browser.js +615 -59
- package/dist/{geometry-wx5ZTYzi.js → geometry-CRhuySKV.js} +8 -1
- package/dist/governance.d.ts +22 -4
- package/dist/governance.js +112 -12
- package/dist/{index-CjwdZQOS.d.ts → index-B3rMAUWB.d.ts} +138 -19
- package/dist/{index-YPd8ZSEa.d.ts → index-Bq299VnF.d.ts} +6 -3
- package/dist/{index-BiO9_XRk.d.ts → index-mKgZU7cG.d.ts} +62 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -8
- package/dist/{linkedDocument-CIuh_Yp0.js → linkedDocument-CZZOl9cO.js} +44 -4
- package/dist/mcp.d.ts +2 -2
- package/dist/node.d.ts +3 -3
- package/dist/node.js +12 -5
- package/dist/{openUiLibrary-B7j3rLrm.js → openUiLibrary-CxtrnX54.js} +1 -1
- package/dist/{openUiSpecLang-BSYYnjay.js → openUiSpecLang-DIcLcybq.js} +148 -13
- package/dist/{pathSecurity-B1owvJAF.js → pathSecurity-CirkQwWP.js} +12 -1
- package/dist/{skill-CAJMsLod.js → skill-WSUDp6A1.js} +1 -1
- package/dist/{skillVersionStore-B24Jjjry-BY1H7Krp.d.ts → skillVersionStore-S4_HJ_Fl-Ds97pwm5.d.ts} +35 -4
- package/dist/testing.d.ts +1 -1
- package/dist/{types-CpDRZ0rA-BM5FI9oN.d.ts → types-CpDRZ0rA-CFQ-vdKz.d.ts} +12 -1
- package/dist/ui-react.d.ts +11 -4
- package/dist/ui-react.js +76 -25
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +6 -6
- package/dist/{webSkillApi-Dy-Zjv0y.js → webSkillApi-D5VMUnrv.js} +2 -2
- package/dist/{webskillLitCatalog-D5BCiMCU.js → webskillLitCatalog-BPyjYuRT.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as UiSpecActionCapability, D as UiSpecSnapshot, Nt as UiSpecNode, S as UiBridge, X as JsonSchema, b as RenderResultRequest, c as InteractionResponse, r as ChartSpec, s as InteractionRequest, y as RenderBlock } from "./types-CpDRZ0rA-
|
|
2
|
-
import { B as ExternalToolSource } from "./index-
|
|
1
|
+
import { C as UiSpecActionCapability, D as UiSpecSnapshot, Nt as UiSpecNode, S as UiBridge, X as JsonSchema, b as RenderResultRequest, c as InteractionResponse, r as ChartSpec, s as InteractionRequest, y as RenderBlock } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
|
+
import { B as ExternalToolSource } from "./index-Bq299VnF.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
5
|
//#region ../ui/dist/index.d.ts
|
|
@@ -173,15 +173,36 @@ interface ChartFontSizes {
|
|
|
173
173
|
declare const DEFAULT_CHART_FONT_SIZES: ChartFontSizes;
|
|
174
174
|
/** 逐字段兜底:宿主通常只想调大其中一两项 */
|
|
175
175
|
declare function resolveChartFontSizes(sizes?: Partial<ChartFontSizes>): ChartFontSizes;
|
|
176
|
+
/** 画布内的取色面。系列色板不在内(0.24.0 需求 14 §2.6)——那是另一件事 */
|
|
177
|
+
interface ChartColors {
|
|
178
|
+
title: string;
|
|
179
|
+
axisLabel: string;
|
|
180
|
+
legend: string;
|
|
181
|
+
axisLine: string;
|
|
182
|
+
splitLine: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* 颜色回落值的**全仓唯一来源**:逐项照抄 echarts 6 的现行默认
|
|
186
|
+
* (primary `#3c3c41`、secondary/axisLabel `#54555a`、axisSplitLine `#dbdee4`)。
|
|
187
|
+
*
|
|
188
|
+
* 照抄而不是另调一套,是为了让「读不到计算样式」这条路径与 0.24.0 之前逐像素相同。
|
|
189
|
+
*/
|
|
190
|
+
declare const DEFAULT_CHART_COLORS: ChartColors;
|
|
191
|
+
/** 逐字段兜底:宿主通常只想改其中一两项 */
|
|
192
|
+
declare function resolveChartColors(colors?: Partial<ChartColors>): ChartColors;
|
|
176
193
|
/** `ChartSpec` → ECharts option:图表类型、数据系列、图例的唯一定义处 */
|
|
177
|
-
declare function toEchartsOption(chart: ChartSpec, fontSizes?: Partial<ChartFontSizes>): {
|
|
194
|
+
declare function toEchartsOption(chart: ChartSpec, fontSizes?: Partial<ChartFontSizes>, colors?: Partial<ChartColors>): {
|
|
178
195
|
animation: boolean;
|
|
179
196
|
title: {
|
|
180
197
|
subtext?: string | undefined;
|
|
198
|
+
subtextStyle?: {
|
|
199
|
+
color: string;
|
|
200
|
+
} | undefined;
|
|
181
201
|
text: string;
|
|
182
202
|
left: string;
|
|
183
203
|
textStyle: {
|
|
184
204
|
fontSize: number;
|
|
205
|
+
color: string;
|
|
185
206
|
};
|
|
186
207
|
} | undefined;
|
|
187
208
|
tooltip: {
|
|
@@ -191,6 +212,7 @@ declare function toEchartsOption(chart: ChartSpec, fontSizes?: Partial<ChartFont
|
|
|
191
212
|
bottom: number;
|
|
192
213
|
textStyle: {
|
|
193
214
|
fontSize: number;
|
|
215
|
+
color: string;
|
|
194
216
|
};
|
|
195
217
|
};
|
|
196
218
|
xAxis: {
|
|
@@ -198,17 +220,50 @@ declare function toEchartsOption(chart: ChartSpec, fontSizes?: Partial<ChartFont
|
|
|
198
220
|
data: string[];
|
|
199
221
|
axisLabel: {
|
|
200
222
|
fontSize: number;
|
|
223
|
+
color: string;
|
|
224
|
+
};
|
|
225
|
+
axisLine: {
|
|
226
|
+
lineStyle: {
|
|
227
|
+
color: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
splitLine: {
|
|
231
|
+
lineStyle: {
|
|
232
|
+
color: string;
|
|
233
|
+
};
|
|
201
234
|
};
|
|
202
235
|
} | undefined;
|
|
203
236
|
yAxis: {
|
|
204
237
|
type: string;
|
|
205
238
|
axisLabel: {
|
|
206
239
|
fontSize: number;
|
|
240
|
+
color: string;
|
|
241
|
+
};
|
|
242
|
+
axisLine: {
|
|
243
|
+
lineStyle: {
|
|
244
|
+
color: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
splitLine: {
|
|
248
|
+
lineStyle: {
|
|
249
|
+
color: string;
|
|
250
|
+
};
|
|
207
251
|
};
|
|
208
252
|
} | {
|
|
209
253
|
type: string;
|
|
210
254
|
axisLabel: {
|
|
211
255
|
fontSize: number;
|
|
256
|
+
color: string;
|
|
257
|
+
};
|
|
258
|
+
axisLine: {
|
|
259
|
+
lineStyle: {
|
|
260
|
+
color: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
splitLine: {
|
|
264
|
+
lineStyle: {
|
|
265
|
+
color: string;
|
|
266
|
+
};
|
|
212
267
|
};
|
|
213
268
|
}[] | undefined;
|
|
214
269
|
series: {
|
|
@@ -228,7 +283,7 @@ declare function toEchartsOption(chart: ChartSpec, fontSizes?: Partial<ChartFont
|
|
|
228
283
|
}[];
|
|
229
284
|
};
|
|
230
285
|
interface EchartHandle {
|
|
231
|
-
setChart(chart: ChartSpec, fontSizes?: Partial<ChartFontSizes>): void;
|
|
286
|
+
setChart(chart: ChartSpec, fontSizes?: Partial<ChartFontSizes>, colors?: Partial<ChartColors>): void;
|
|
232
287
|
dispose(): void;
|
|
233
288
|
}
|
|
234
289
|
/**
|
|
@@ -264,6 +319,8 @@ interface ViewerComponentsHandle {
|
|
|
264
319
|
/** 宿主的呈现偏好;挂在本次挂载上,不做模块级全局 */
|
|
265
320
|
interface ViewerComponentsOptions {
|
|
266
321
|
fontSizes?: Partial<ChartFontSizes>;
|
|
322
|
+
/** 不传则图表继承容器的计算 `color`(0.24.0 需求 14) */
|
|
323
|
+
colors?: Partial<ChartColors>;
|
|
267
324
|
}
|
|
268
325
|
/**
|
|
269
326
|
* 扫描 `root` 下的占位并挂载预置组件。
|
|
@@ -983,4 +1040,4 @@ interface LoadedOpenUiPeers {
|
|
|
983
1040
|
*/
|
|
984
1041
|
declare function loadOpenUiPeers(): Promise<LoadedOpenUiPeers>;
|
|
985
1042
|
//#endregion
|
|
986
|
-
export {
|
|
1043
|
+
export { UI_CATALOG_PROMPT_BUDGET_BYTES as $, mountEchart as $t, DocumentComponentName as A, a2uiComponentSchema as At, LoadedOpenUiPeers as B, createUiCatalogToolSource as Bt, DEFAULT_CHART_COLORS as C, uiPreset as Cn, ViewerComponentsHandle as Ct, DEFAULT_SURFACE_HOST_CONTROL_TEXTS as D, WEBSKILL_SURFACE_ACTION as Dt, DEFAULT_SURFACE_FORM_TEXTS as E, WEBSKILL_STYLES_CSS as Et, FieldOption as F, chartToTable as Ft, PLANNED_INCREMENT as G, fromA2uiSurfaceAction as Gt, NormalizedColumnWidths as H, ensureStyles as Ht, FormModel as I, collectFormScopes as It, SPEC_TABLE_MIN_COLUMN_WIDTH as J, gaugePercent as Jt, RENDER_UI_TOOL as K, fromUiSurfaceActionDispatch as Kt, InteractionSpecLabels as L, collectScopedValues as Lt, EvaluateFieldConditionOptions as M, applySuggestion as Mt, FieldCondition as N, buildA2uiCatalogDefinition as Nt, DESCRIBE_UI_PRESET_TOOL as O, WebFormBridge as Ot, FieldConditionResult as P, chartSpecFromProps as Pt, UI_CATALOG_GROUPS as Q, loadWebSkillLitCatalog as Qt, InteractionTexts as R, collectSpecActions as Rt, ControlModel as S, uiCatalog as Sn, VercelUiBridge as St, DEFAULT_INTERACTION_TEXTS as T, WEBSKILL_A2UI_CATALOG_ID as Tt, OpenUiRendererProps as U, evaluateFieldCondition as Ut, MAX_CONDITION_DEPTH as V, defineUiCatalog as Vt, OpenUiRuntime as W, fromA2uiSpecAction as Wt, SurfaceFormTexts as X, interactionToUiSpec as Xt, SpecColumnMeta as Y, interactionToFormModel as Yt, SurfaceHostControlTexts as Z, loadOpenUiPeers as Zt, CHART_PALETTE as _, toEchartsOption as _n, VERCEL_INTERACTION_TOOL_NAME as _t, A2UI_SURFACE_ACTION as a, renderMiniChart as an, UiCatalogPromptOptions as at, CollectedValues as b, toUiSurfaceActionDispatch as bn, VIEWER_PROPS_ATTR as bt, A2uiCatalogDefinition as c, resolveChartColors as cn, UiFormScope as ct, A2uiMessage as d, resolveInteractionTexts as dn, UiSpecDegradation as dt, mountViewerComponents as en, UI_PRESETS as et, A2uiSpecActionEvent as f, resolveSurfaceFormTexts as fn, UiSpecDegradationCode as ft, CATALOG_SCHEMA_MAX as g, toA2uiSurfaceAction as gn, UiSurfaceActionDispatch as gt, CATALOG_PROMPT_MAX as h, toA2uiSpecMessages as hn, UiSpecValidation as ht, A2UI_SPEC_FORM_PATH as i, renderBlocks as in, UiCatalogInput as it, EchartHandle as j, a2uiComponentShapes as jt, DOCUMENT_COMPONENTS as k, ZodRuntime as kt, A2uiCatalogHandle as l, resolveChartFontSizes as ln, UiPreset as lt, CATALOG_BUDGET_STAGE as m, shapeInteractionValue as mn, UiSpecSanitization as mt, A2UI_COMMON_TYPES as n, normalizeFieldOptions as nn, UiActionDef as nt, A2UI_VERSION as o, renderMiniMarkdown as on, UiCatalogToolSourceOptions as ot, A2uiSpecMessageOptions as p, resolveSurfaceHostControlTexts as pn, UiSpecIssue as pt, SPEC_TABLE_MIN_COLUMN_VAR as q, fromVercelToolResult as qt, A2UI_SPEC_ACTION as r, qualifyFieldName as rn, UiCatalog as rt, A2uiCatalogComponent as s, renderRenderResult as sn, UiComponentDef as st, A2UI_BASIC_CATALOG_ID as t, normalizeColumnWidths as tn, UI_PRESET_NAMES as tt, A2uiComponentShape as u, resolveColumnWidths as un, UiPresetName as ut, ChartColors as v, toJsonRenderSpec as vn, VIEWER_COMPONENT_ATTR as vt, DEFAULT_CHART_FONT_SIZES as w, ViewerComponentsOptions as wt, ColumnWidthsRejection as x, toVercelToolInvocation as xn, VercelToolInvocation as xt, ChartFontSizes as y, toOpenUiSpecLang as yn, VIEWER_FALLBACK_ATTR as yt, JsonRenderSpec as z, collectValues as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as PPTX_MIME, $t as
|
|
2
|
-
import { $ as ImageOmission, $n as UserProfileEntry, $r as readProfileEntries, $t as SchemaInferer, A as DEFAULT_MAX_UPLOAD_FILE_BYTES, An as ToolContent, Ar as extractChartSpec, At as RunResult, B as ExternalToolSource, Bn as TraceEvent, Br as isUnsupportedRunSnapshot, Bt as RunTraceSummary, C as BridgeResponse, Cn as SpreadsheetSheet, Cr as buildRenderResult, Ct as RedactedArgs, D as DEFAULT_MAX_DATA_SOURCE_BYTES, Dn as TextualToolContent, Dr as diffUserProfile, Dt as RunBinaryEntry, E as DEFAULT_LOOP_LIMITS, En as TerminalLifecycleData, Er as createWebSkillApi, Et as RouteResult, F as DocxTextExtractor, Fn as ToolStepReader, Fr as fromVercelResult, Ft as RunToolCall, G as FsRunTraceStore, Gn as USER_PROFILE_EXPORT_VERSION, Gr as networkUrlHost, Gt as RuntimeSession, H as FsArtifactStore, Hn as TraceRecorder, Hr as mergeCatalogEntries, Ht as RunUsageSummary, I as EMPTY_USER_PROFILE, In as ToolStepRecord, Ir as fromVercelStreamPart, It as RunTraceFile, J as FullDisclosureRouter, Jn as USER_PROFILE_PROMPT_HEADER, Jr as normalizeToolError, Jt as SESSION_SCHEMA_VERSION, K as FsSessionStore, Kn as USER_PROFILE_KEY, Kr as normalizeErrorCode, Kt as RuntimeSessionHandle, L as EventBus, Ln as ToolStepStore, Lr as interruptedToolResult, Lt as RunTraceFilter, M as DataSourceInfo, Mn as ToolDisclosure, Mr as extractUiSpecEvents, Mt as RunSnapshotListEntry, N as DocumentSurfaceHost, Nn as ToolResolution, Nr as findUnpairedToolCalls, Nt as RunSnapshotStore, O as DEFAULT_MAX_DOCUMENT_BYTES, On as TodoTraceEvent, Or as encodeSpreadsheet, Ot as RunBinaryStore, P as DocumentSurfacePort, Pn as ToolResult, Pr as formatSkillScriptManifest, Pt as RunTerminationReason, Q as HookRunnerOptions, Qn as UserProfile, Qr as readBehaviorRecords, Qt as SUPPORTED_DOCUMENT_MIME, R as ExecuteLifecycleData, Rn as ToolStepTrust, Rr as isBytesOnlyDocument, Rt as RunTraceMetrics, S as BridgeRequest, Sn as SpreadsheetImageResolver, Sr as bridgeError, St as RUN_TRACE_SCHEMA_VERSION, T as CapabilityMode, Tn as TEXT_BUDGETED_CONTENT_TYPES, Tr as createScriptContext, Tt as RouteLifecycleData, U as FsMemoryStore, Un as UNSUPPORTED_DOCUMENT_MESSAGE, Ur as mergeProfileEntries, Ut as RuntimePhase, V as FS_SESSION_PAGE_SIZE, Vn as TraceEventType, Vr as listSkillScripts, Vt as RunUploadFiles, W as FsRunSnapshotStore, Wn as UPLOAD_FILES_UNAVAILABLE, Wr as networkPolicyLibSource, Wt as RuntimeRun, X as GoogleGenAiClientConfig, Xn as UnsupportedRunSnapshot, Xr as parseUserProfileExport, Xt as SPREADSHEET_LIMITS, Y as GoogleGenAiClient, Yn as USER_PROFILE_REFINE_PROMPT, Yr as parseBridgeRequest, Yt as SPREADSHEET_EXTENSION, Z as HookRunner, Zn as UploadFileInfo, Zr as partsToText, Zt as SPREADSHEET_MIME_TYPE, _ as BehaviorRecord, _i as toVercelToolSpecs, _n as SkillSuccessReport, _r as XLSX_UNSUPPORTED, _t as READ_LINKED_DOCUMENT_TOOL_NAME, a as ASK_USER_TOOL, ai as runVisionBatch, an as SerializingMemoryStore, ar as VISION_SLOW_THRESHOLD_MS, at as LifecycleHook, b as BridgeCapabilities, bn as SpreadsheetImageAnchor, br as appendBehaviorRecords, bt as READ_SKILL_FILE_TOOL_NAME, c as AgentLoop, ci as schemaToForm, cn as SessionRecord, cr as VisionBatchOptions, ct as LinkedDocumentReader, d as AnthropicClient, di as summarizeRunUsage, dn as SkillIntegrityGuard, dr as VisionDelegateImage, dt as OpenAiCompatibleClient, ei as readUserProfile, en as ScriptExecutionContext, er as UserProfileExport, et as InstalledSkillManifest, f as AnthropicClientConfig, fi as summarizeToolCalls, fn as SkillOutcomeReporter, fr as VisionDelegateRequest, ft as OpenAiCompatibleClientConfig, g as BYTES_ONLY_DOCUMENT_MIME, gi as toRecordDigests, gn as SkillStateGuard, gr as WebSkillRuntimeDeps, gt as READ_LINKED_DOCUMENT_TOOL, h as BEHAVIOR_RECORDS_KEY, hi as toLlmToolSpec, hn as SkillScriptSchemaSource, hr as WebSkillRuntime, ht as ProgressiveRouter, i as ASK_USER_MAX_FIELDS, ii as resolveToolName, in as SealResult, ir as VISION_MAX_CONCURRENCY, it as LifecycleEventInit, j as DEFAULT_USER_PROFILE_LIMITS, jn as ToolDefinition, jr as extractTodoTraceEvents, jt as RunSnapshot, k as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, kn as ToolCallContext, kr as exportUserProfile, kt as RunLimitErrorDetails, l as AgentLoopConfig, li as scriptToolName, ln as SessionStore, lr as VisionBatchOutcome, lt as MAX_TOOL_STEP_ARG_BYTES, m as ApprovalScope, mi as toBase64, mn as SkillScriptDescriptor, mr as WebSkillApi, mt as PptxTextExtractor, n as ASK_USER_FIELD_TYPES, ni as refineUserProfile, nn as SealOptions, nr as UserProfileLimits, nt as InteractLifecycleData, o as ASK_USER_TOOL_NAME, oi as sampleBehaviorRecords, on as SessionListPage, or as VercelToolSpec, ot as LifecycleHookContext, p as ApprovalDecision, pi as textParts, pn as SkillRouter, pr as VisionDelegateResult, pt as PdfTextExtractor, q as FsToolStepStore, qn as USER_PROFILE_NO_INVENTION_RULE, qr as normalizeToolContent, qt as SENSITIVE_ANNOTATION, r as ASK_USER_INPUT_SCHEMA, ri as renderUserProfileContext, rn as SealRecord, rr as VISION_DEFAULT_CONCURRENCY, rt as LifecycleEvent, s as ActivateLifecycleData, si as schemaSourceLabel, sn as SessionMeta, sr as ViewerImageFact, st as LifecycleListener, t as ALLOWED_TOOLS_EXCLUSION_REASON, ti as redactToolStepArgs, tn as ScriptExecutor, tr as UserProfileImportDiff, tt as IntegrityVerdict, u as AgentLoopDeps, ui as sealToolCallPairs, un as SkillFailureReport, ur as VisionDelegate, ut as NetworkPolicy, v as BehaviorRecordKind, vi as validateUiSpecEvent, vn as SpreadsheetCell, vr as XlsxTextExtractor, vt as READ_SKILL_FILE_INPUT_SCHEMA, w as CapabilityApproval, wn as SpreadsheetSpec, wr as clampVisionConcurrency, wt as RefineUserProfileInput, x as BridgeCapability, xn as SpreadsheetImageBytes, xr as applyUserProfileImport, xt as RUN_SNAPSHOT_SCHEMA_VERSION, y as BehaviorScene, yi as validateUiSpecNode, yn as SpreadsheetImage, yr as XlsxUnsupportedFeature, yt as READ_SKILL_FILE_TOOL, z as ExternalSkillProvider, zn as TraceClock, zr as isNetworkAllowed, zt as RunTraceStore } from "./index-
|
|
1
|
+
import { $ as PPTX_MIME, $t as exportSkills, A as extractSkillCandidate, At as TrustedKey, B as DOCX_MIME, Bt as assertRemoteUrlAllowed, C as UiSpecActionCapability, Cn as verifySkillSignature, Ct as SkillMetadata, D as UiSpecSnapshot, Dt as SkillSource, E as UiSpecPatch, Et as SkillSignature, F as BINARY_EXTENSIONS, Ft as ValidationReport, G as FileStat, Gt as buildManifest, H as DiscoveryResult, Ht as atomicWriteBinary, I as CatalogRenderer, It as VerifyResult, J as FsTrustedKeyStore, Jt as classifyAttachment, K as FileSystemProvider, Kt as checkDependencyCycles, L as ChatAttachmentKind, Lt as WebSkillError, M as ATTACHMENT_TEXT_LIMIT, Mt as UNTRUSTED_LINE_LIMIT, N as ArchiveLimits, Nt as UiSpecNode, O as UiSurfaceActionRequest, Ot as SkillsLockfile, P as AttachmentTextInput, Pt as UnsignedPolicy, Q as MemoryFS, Qt as escapeXml, R as CryptoKeyLike, Rt as WebSkillErrorCode, S as UiBridge, Sn as verifyManifest, St as SkillManifest, T as UiSpecEvent, Tt as SkillReader, U as ExtractedDocumentFormat, Ut as atomicWriteText, V as DWG_MIME_TYPES, Vt as assertSafePathSegment, W as FILE_MIME_TYPES, Wt as buildCatalog, X as JsonSchema, Xt as detectSkillArchiveShape, Y as IMAGE_MIME_TYPES, Yt as computeDigest, Z as MANIFEST_EXCLUDED_FILES, Zt as detectSkillArchiveShapeFromFs, _ as LlmToolSpec, _n as signSkill, _t as SkillDocument, a as InteractionOrigin, an as keyIdOf, at as SKILL_MANIFEST_FILE, b as RenderResultRequest, bn as unzipWithLimits, bt as SkillLocation, c as InteractionResponse, cn as parseSkillMarkdown, ct as SKILL_PACK_FILE, d as LlmContentPart, dn as readSkillSignature, dt as SignatureVerdict, en as extractedDocumentFormat, et as Page, f as LlmMessage, fn as renderAvailableSkillsXml, ft as SkillArchiveDetection, g as LlmToolCall, gn as sanitizeUntrustedLine, gt as SkillDiscovery, h as LlmTokenUsage, hn as resolveInsideRoot, ht as SkillCatalogEntry, i as FormField, in as jsonRenderer, it as SKILLS_LOCKFILE, j as ATOMIC_TMP_SUFFIX_PATTERN, jt as TrustedKeyStore, k as UiSurfaceActionResponse, kt as TEXT_EXTENSIONS, l as LlmClient, ln as parseSkillPackManifest, lt as SKILL_SIGNATURE_FILE, m as LlmStreamEvent, mn as resolveArchiveLimits, mt as SkillCatalog, n as ArtifactStore, nn as isAtomicTempPath, nt as RemoteUrlPolicy, o as InteractionPolicy, on as messageOf, ot as SKILL_NAME_MAX_LENGTH, p as LlmResponse, pn as renderCatalogJson, pt as SkillArchiveShape, q as FileWriteStream, qt as checkSkillRules, r as ChartSpec, rn as isValidSkillName, rt as SIGNATURE_SCHEMA_VERSION, s as InteractionRequest, sn as normalizePath, st as SKILL_NAME_PATTERN, t as Artifact, tn as formatAttachmentText, tt as PageQuery, u as LlmCompleteInput, un as readResponseWithLimit, ut as SignatureAuditSink, v as MemoryStore, vn as signaturePayloadBytes, vt as SkillInstallSource, w as UiSpecDrafts, wn as xmlRenderer, wt as SkillPackManifest, x as SkillCandidateMarker, xn as validateSkills, xt as SkillManagerPort, y as RenderBlock, yn as stripArchiveRoot, yt as SkillIssue, z as DEFAULT_ARCHIVE_LIMITS, zt as XLSX_MIME } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
|
+
import { $ as ImageOmission, $n as UserProfileEntry, $r as readProfileEntries, $t as SchemaInferer, A as DEFAULT_MAX_UPLOAD_FILE_BYTES, An as ToolContent, Ar as extractChartSpec, At as RunResult, B as ExternalToolSource, Bn as TraceEvent, Br as isUnsupportedRunSnapshot, Bt as RunTraceSummary, C as BridgeResponse, Cn as SpreadsheetSheet, Cr as buildRenderResult, Ct as RedactedArgs, D as DEFAULT_MAX_DATA_SOURCE_BYTES, Dn as TextualToolContent, Dr as diffUserProfile, Dt as RunBinaryEntry, E as DEFAULT_LOOP_LIMITS, En as TerminalLifecycleData, Er as createWebSkillApi, Et as RouteResult, F as DocxTextExtractor, Fn as ToolStepReader, Fr as fromVercelResult, Ft as RunToolCall, G as FsRunTraceStore, Gn as USER_PROFILE_EXPORT_VERSION, Gr as networkUrlHost, Gt as RuntimeSession, H as FsArtifactStore, Hn as TraceRecorder, Hr as mergeCatalogEntries, Ht as RunUsageSummary, I as EMPTY_USER_PROFILE, In as ToolStepRecord, Ir as fromVercelStreamPart, It as RunTraceFile, J as FullDisclosureRouter, Jn as USER_PROFILE_PROMPT_HEADER, Jr as normalizeToolError, Jt as SESSION_SCHEMA_VERSION, K as FsSessionStore, Kn as USER_PROFILE_KEY, Kr as normalizeErrorCode, Kt as RuntimeSessionHandle, L as EventBus, Ln as ToolStepStore, Lr as interruptedToolResult, Lt as RunTraceFilter, M as DataSourceInfo, Mn as ToolDisclosure, Mr as extractUiSpecEvents, Mt as RunSnapshotListEntry, N as DocumentSurfaceHost, Nn as ToolResolution, Nr as findUnpairedToolCalls, Nt as RunSnapshotStore, O as DEFAULT_MAX_DOCUMENT_BYTES, On as TodoTraceEvent, Or as encodeSpreadsheet, Ot as RunBinaryStore, P as DocumentSurfacePort, Pn as ToolResult, Pr as formatSkillScriptManifest, Pt as RunTerminationReason, Q as HookRunnerOptions, Qn as UserProfile, Qr as readBehaviorRecords, Qt as SUPPORTED_DOCUMENT_MIME, R as ExecuteLifecycleData, Rn as ToolStepTrust, Rr as isBytesOnlyDocument, Rt as RunTraceMetrics, S as BridgeRequest, Sn as SpreadsheetImageResolver, Sr as bridgeError, St as RUN_TRACE_SCHEMA_VERSION, T as CapabilityMode, Tn as TEXT_BUDGETED_CONTENT_TYPES, Tr as createScriptContext, Tt as RouteLifecycleData, U as FsMemoryStore, Un as UNSUPPORTED_DOCUMENT_MESSAGE, Ur as mergeProfileEntries, Ut as RuntimePhase, V as FS_SESSION_PAGE_SIZE, Vn as TraceEventType, Vr as listSkillScripts, Vt as RunUploadFiles, W as FsRunSnapshotStore, Wn as UPLOAD_FILES_UNAVAILABLE, Wr as networkPolicyLibSource, Wt as RuntimeRun, X as GoogleGenAiClientConfig, Xn as UnsupportedRunSnapshot, Xr as parseUserProfileExport, Xt as SPREADSHEET_LIMITS, Y as GoogleGenAiClient, Yn as USER_PROFILE_REFINE_PROMPT, Yr as parseBridgeRequest, Yt as SPREADSHEET_EXTENSION, Z as HookRunner, Zn as UploadFileInfo, Zr as partsToText, Zt as SPREADSHEET_MIME_TYPE, _ as BehaviorRecord, _i as toVercelToolSpecs, _n as SkillSuccessReport, _r as XLSX_UNSUPPORTED, _t as READ_LINKED_DOCUMENT_TOOL_NAME, a as ASK_USER_TOOL, ai as runVisionBatch, an as SerializingMemoryStore, ar as VISION_SLOW_THRESHOLD_MS, at as LifecycleHook, b as BridgeCapabilities, bn as SpreadsheetImageAnchor, br as appendBehaviorRecords, bt as READ_SKILL_FILE_TOOL_NAME, c as AgentLoop, ci as schemaToForm, cn as SessionRecord, cr as VisionBatchOptions, ct as LinkedDocumentReader, d as AnthropicClient, di as summarizeRunUsage, dn as SkillIntegrityGuard, dr as VisionDelegateImage, dt as OpenAiCompatibleClient, ei as readUserProfile, en as ScriptExecutionContext, er as UserProfileExport, et as InstalledSkillManifest, f as AnthropicClientConfig, fi as summarizeToolCalls, fn as SkillOutcomeReporter, fr as VisionDelegateRequest, ft as OpenAiCompatibleClientConfig, g as BYTES_ONLY_DOCUMENT_MIME, gi as toRecordDigests, gn as SkillStateGuard, gr as WebSkillRuntimeDeps, gt as READ_LINKED_DOCUMENT_TOOL, h as BEHAVIOR_RECORDS_KEY, hi as toLlmToolSpec, hn as SkillScriptSchemaSource, hr as WebSkillRuntime, ht as ProgressiveRouter, i as ASK_USER_MAX_FIELDS, ii as resolveToolName, in as SealResult, ir as VISION_MAX_CONCURRENCY, it as LifecycleEventInit, j as DEFAULT_USER_PROFILE_LIMITS, jn as ToolDefinition, jr as extractTodoTraceEvents, jt as RunSnapshot, k as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, kn as ToolCallContext, kr as exportUserProfile, kt as RunLimitErrorDetails, l as AgentLoopConfig, li as scriptToolName, ln as SessionStore, lr as VisionBatchOutcome, lt as MAX_TOOL_STEP_ARG_BYTES, m as ApprovalScope, mi as toBase64, mn as SkillScriptDescriptor, mr as WebSkillApi, mt as PptxTextExtractor, n as ASK_USER_FIELD_TYPES, ni as refineUserProfile, nn as SealOptions, nr as UserProfileLimits, nt as InteractLifecycleData, o as ASK_USER_TOOL_NAME, oi as sampleBehaviorRecords, on as SessionListPage, or as VercelToolSpec, ot as LifecycleHookContext, p as ApprovalDecision, pi as textParts, pn as SkillRouter, pr as VisionDelegateResult, pt as PdfTextExtractor, q as FsToolStepStore, qn as USER_PROFILE_NO_INVENTION_RULE, qr as normalizeToolContent, qt as SENSITIVE_ANNOTATION, r as ASK_USER_INPUT_SCHEMA, ri as renderUserProfileContext, rn as SealRecord, rr as VISION_DEFAULT_CONCURRENCY, rt as LifecycleEvent, s as ActivateLifecycleData, si as schemaSourceLabel, sn as SessionMeta, sr as ViewerImageFact, st as LifecycleListener, t as ALLOWED_TOOLS_EXCLUSION_REASON, ti as redactToolStepArgs, tn as ScriptExecutor, tr as UserProfileImportDiff, tt as IntegrityVerdict, u as AgentLoopDeps, ui as sealToolCallPairs, un as SkillFailureReport, ur as VisionDelegate, ut as NetworkPolicy, v as BehaviorRecordKind, vi as validateUiSpecEvent, vn as SpreadsheetCell, vr as XlsxTextExtractor, vt as READ_SKILL_FILE_INPUT_SCHEMA, w as CapabilityApproval, wn as SpreadsheetSpec, wr as clampVisionConcurrency, wt as RefineUserProfileInput, x as BridgeCapability, xn as SpreadsheetImageBytes, xr as applyUserProfileImport, xt as RUN_SNAPSHOT_SCHEMA_VERSION, y as BehaviorScene, yi as validateUiSpecNode, yn as SpreadsheetImage, yr as XlsxUnsupportedFeature, yt as READ_SKILL_FILE_TOOL, z as ExternalSkillProvider, zn as TraceClock, zr as isNetworkAllowed, zt as RunTraceStore } from "./index-Bq299VnF.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.24.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, 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, BINARY_EXTENSIONS, BYTES_ONLY_DOCUMENT_MIME, 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, DWG_MIME_TYPES, type DataSourceInfo, type DiscoveryResult, type DocumentSurfaceHost, type DocumentSurfacePort, type DocxTextExtractor, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, type ExtractedDocumentFormat, FILE_MIME_TYPES, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FileWriteStream, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, IMAGE_MIME_TYPES, type ImageOmission, 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, PPTX_MIME, type Page, type PageQuery, type PdfTextExtractor, type PptxTextExtractor, 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 RunBinaryEntry, type RunBinaryStore, 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, SPREADSHEET_EXTENSION, SPREADSHEET_LIMITS, SPREADSHEET_MIME_TYPE, 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, type SpreadsheetCell, type SpreadsheetImage, type SpreadsheetImageAnchor, type SpreadsheetImageBytes, type SpreadsheetImageResolver, type SpreadsheetSheet, type SpreadsheetSpec, 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, VISION_DEFAULT_CONCURRENCY, VISION_MAX_CONCURRENCY, VISION_SLOW_THRESHOLD_MS, type ValidationReport, type VercelToolSpec, type VerifyResult, type ViewerImageFact, type VisionBatchOptions, type VisionBatchOutcome, type VisionDelegate, type VisionDelegateImage, type VisionDelegateRequest, type VisionDelegateResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, XLSX_MIME, XLSX_UNSUPPORTED, type XlsxTextExtractor, type XlsxUnsupportedFeature, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clampVisionConcurrency, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, encodeSpreadsheet, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, extractedDocumentFormat, findUnpairedToolCalls, formatAttachmentText, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isBytesOnlyDocument, 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, runVisionBatch, sampleBehaviorRecords, sanitizeUntrustedLine, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, 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, BINARY_EXTENSIONS, BYTES_ONLY_DOCUMENT_MIME, 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, DWG_MIME_TYPES, type DataSourceInfo, type DiscoveryResult, type DocumentSurfaceHost, type DocumentSurfacePort, type DocxTextExtractor, EMPTY_USER_PROFILE, EventBus, type ExecuteLifecycleData, type ExternalSkillProvider, type ExternalToolSource, type ExtractedDocumentFormat, FILE_MIME_TYPES, FS_SESSION_PAGE_SIZE, type FileStat, type FileSystemProvider, type FileWriteStream, type FormField, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FsToolStepStore, FsTrustedKeyStore, FullDisclosureRouter, GoogleGenAiClient, type GoogleGenAiClientConfig, HookRunner, type HookRunnerOptions, IMAGE_MIME_TYPES, type ImageOmission, 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, PPTX_MIME, type Page, type PageQuery, type PdfTextExtractor, type PptxTextExtractor, 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 RunBinaryEntry, type RunBinaryStore, 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, SPREADSHEET_EXTENSION, SPREADSHEET_LIMITS, SPREADSHEET_MIME_TYPE, 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, type SpreadsheetCell, type SpreadsheetImage, type SpreadsheetImageAnchor, type SpreadsheetImageBytes, type SpreadsheetImageResolver, type SpreadsheetSheet, type SpreadsheetSpec, 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, VISION_DEFAULT_CONCURRENCY, VISION_MAX_CONCURRENCY, VISION_SLOW_THRESHOLD_MS, type ValidationReport, type VercelToolSpec, type VerifyResult, type ViewerImageFact, type VisionBatchOptions, type VisionBatchOutcome, type VisionDelegate, type VisionDelegateImage, type VisionDelegateRequest, type VisionDelegateResult, type WebSkillApi, WebSkillError, type WebSkillErrorCode, WebSkillRuntime, type WebSkillRuntimeDeps, XLSX_MIME, XLSX_UNSUPPORTED, type XlsxTextExtractor, type XlsxUnsupportedFeature, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteBinary, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clampVisionConcurrency, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, encodeSpreadsheet, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, extractedDocumentFormat, findUnpairedToolCalls, formatAttachmentText, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isBytesOnlyDocument, 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, runVisionBatch, 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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
2
|
-
import { A as SKILL_MANIFEST_FILE, C as keyIdOf, D as verifySkillSignature, E as signaturePayloadBytes, M as buildManifest, N as computeDigest, O as MANIFEST_EXCLUDED_FILES, P as verifyManifest, S as SIGNATURE_SCHEMA_VERSION, T as signSkill, _ as SKILL_NAME_MAX_LENGTH, a as DEFAULT_ARCHIVE_LIMITS, b as parseSkillMarkdown, c as unzipWithLimits, d as stripArchiveRoot, f as SKILL_PACK_FILE, g as checkSkillRules, h as checkDependencyCycles, i as buildCatalog, j as SKILL_SIGNATURE_FILE, k as SKILLS_LOCKFILE, l as detectSkillArchiveShape, m as parseSkillPackManifest, n as SkillDiscovery, o as readResponseWithLimit, p as exportSkills, r as SkillReader, s as resolveArchiveLimits, t as validateSkills, u as detectSkillArchiveShapeFromFs, v as SKILL_NAME_PATTERN, w as readSkillSignature, x as FsTrustedKeyStore, y as isValidSkillName } from "./skill-
|
|
3
|
-
import { a as
|
|
2
|
+
import { A as SKILL_MANIFEST_FILE, C as keyIdOf, D as verifySkillSignature, E as signaturePayloadBytes, M as buildManifest, N as computeDigest, O as MANIFEST_EXCLUDED_FILES, P as verifyManifest, S as SIGNATURE_SCHEMA_VERSION, T as signSkill, _ as SKILL_NAME_MAX_LENGTH, a as DEFAULT_ARCHIVE_LIMITS, b as parseSkillMarkdown, c as unzipWithLimits, d as stripArchiveRoot, f as SKILL_PACK_FILE, g as checkSkillRules, h as checkDependencyCycles, i as buildCatalog, j as SKILL_SIGNATURE_FILE, k as SKILLS_LOCKFILE, l as detectSkillArchiveShape, m as parseSkillPackManifest, n as SkillDiscovery, o as readResponseWithLimit, p as exportSkills, r as SkillReader, s as resolveArchiveLimits, t as validateSkills, u as detectSkillArchiveShapeFromFs, v as SKILL_NAME_PATTERN, w as readSkillSignature, x as FsTrustedKeyStore, y as isValidSkillName } from "./skill-WSUDp6A1.js";
|
|
3
|
+
import { a as atomicWriteBinary, i as ATOMIC_TMP_SUFFIX_PATTERN, n as normalizePath, o as atomicWriteText, r as resolveInsideRoot, s as isAtomicTempPath, t as assertSafePathSegment } from "./pathSecurity-CirkQwWP.js";
|
|
4
4
|
import { t as assertRemoteUrlAllowed } from "./urlSafety-CiSuCJvX.js";
|
|
5
5
|
import { n as sanitizeUntrustedLine, t as UNTRUSTED_LINE_LIMIT } from "./untrustedText-BIaRvPZK.js";
|
|
6
6
|
import { a as FILE_MIME_TYPES, c as TEXT_EXTENSIONS, d as extractedDocumentFormat, f as formatAttachmentText, i as DWG_MIME_TYPES, l as XLSX_MIME, n as BINARY_EXTENSIONS, o as IMAGE_MIME_TYPES, r as DOCX_MIME, s as PPTX_MIME, t as ATTACHMENT_TEXT_LIMIT, u as classifyAttachment } from "./kind-Dc8x0HWz.js";
|
|
7
|
-
import { $ as READ_SKILL_FILE_TOOL, A as BEHAVIOR_RECORDS_KEY, B as renderUserProfileContext, C as extractTodoTraceEvents, D as VISION_SLOW_THRESHOLD_MS, E as VISION_MAX_CONCURRENCY, F as readProfileEntries, G as schemaToForm, H as EMPTY_USER_PROFILE, I as readUserProfile, J as ASK_USER_INPUT_SCHEMA, K as createScriptContext, L as sampleBehaviorRecords, M as appendBehaviorRecords, N as mergeProfileEntries, O as clampVisionConcurrency, P as readBehaviorRecords, Q as READ_SKILL_FILE_INPUT_SCHEMA, R as USER_PROFILE_NO_INVENTION_RULE, S as extractSkillCandidate, T as VISION_DEFAULT_CONCURRENCY, U as SerializingMemoryStore, V as DEFAULT_USER_PROFILE_LIMITS, W as EventBus, X as ASK_USER_TOOL, Y as ASK_USER_MAX_FIELDS, Z as ASK_USER_TOOL_NAME, _ as FsRunSnapshotStore, a as networkPolicyLibSource, at as scriptToolName, b as DEFAULT_LOOP_LIMITS, c as bridgeError, ct as ProgressiveRouter, d as FsMemoryStore, dt as xmlRenderer, et as READ_SKILL_FILE_TOOL_NAME, f as WebSkillRuntime, g as redactToolStepArgs, h as SENSITIVE_ANNOTATION, i as isNetworkAllowed, it as schemaSourceLabel, j as USER_PROFILE_KEY, k as runVisionBatch, l as parseBridgeRequest, lt as escapeXml, m as AgentLoop, n as normalizeErrorCode, nt as formatSkillScriptManifest, o as networkUrlHost, ot as resolveToolName, p as summarizeRunUsage, q as ASK_USER_FIELD_TYPES, r as normalizeToolError, rt as listSkillScripts, s as UPLOAD_FILES_UNAVAILABLE, st as toLlmToolSpec, t as CapabilityApproval, tt as ALLOWED_TOOLS_EXCLUSION_REASON, u as FsArtifactStore, ut as renderAvailableSkillsXml, v as RUN_SNAPSHOT_SCHEMA_VERSION, w as TraceRecorder, x as MAX_TOOL_STEP_ARG_BYTES, y as isUnsupportedRunSnapshot, z as USER_PROFILE_PROMPT_HEADER } from "./approval-
|
|
7
|
+
import { $ as READ_SKILL_FILE_TOOL, A as BEHAVIOR_RECORDS_KEY, B as renderUserProfileContext, C as extractTodoTraceEvents, D as VISION_SLOW_THRESHOLD_MS, E as VISION_MAX_CONCURRENCY, F as readProfileEntries, G as schemaToForm, H as EMPTY_USER_PROFILE, I as readUserProfile, J as ASK_USER_INPUT_SCHEMA, K as createScriptContext, L as sampleBehaviorRecords, M as appendBehaviorRecords, N as mergeProfileEntries, O as clampVisionConcurrency, P as readBehaviorRecords, Q as READ_SKILL_FILE_INPUT_SCHEMA, R as USER_PROFILE_NO_INVENTION_RULE, S as extractSkillCandidate, T as VISION_DEFAULT_CONCURRENCY, U as SerializingMemoryStore, V as DEFAULT_USER_PROFILE_LIMITS, W as EventBus, X as ASK_USER_TOOL, Y as ASK_USER_MAX_FIELDS, Z as ASK_USER_TOOL_NAME, _ as FsRunSnapshotStore, a as networkPolicyLibSource, at as scriptToolName, b as DEFAULT_LOOP_LIMITS, c as bridgeError, ct as ProgressiveRouter, d as FsMemoryStore, dt as xmlRenderer, et as READ_SKILL_FILE_TOOL_NAME, f as WebSkillRuntime, g as redactToolStepArgs, h as SENSITIVE_ANNOTATION, i as isNetworkAllowed, it as schemaSourceLabel, j as USER_PROFILE_KEY, k as runVisionBatch, l as parseBridgeRequest, lt as escapeXml, m as AgentLoop, n as normalizeErrorCode, nt as formatSkillScriptManifest, o as networkUrlHost, ot as resolveToolName, p as summarizeRunUsage, q as ASK_USER_FIELD_TYPES, r as normalizeToolError, rt as listSkillScripts, s as UPLOAD_FILES_UNAVAILABLE, st as toLlmToolSpec, t as CapabilityApproval, tt as ALLOWED_TOOLS_EXCLUSION_REASON, u as FsArtifactStore, ut as renderAvailableSkillsXml, v as RUN_SNAPSHOT_SCHEMA_VERSION, w as TraceRecorder, x as MAX_TOOL_STEP_ARG_BYTES, y as isUnsupportedRunSnapshot, z as USER_PROFILE_PROMPT_HEADER } from "./approval-7CuZS3Z4.js";
|
|
8
8
|
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";
|
|
9
|
-
import { _ as DEFAULT_MAX_UPLOAD_FILE_BYTES, a as UNSUPPORTED_DOCUMENT_MESSAGE, c as toBase64, d as SPREADSHEET_LIMITS, f as SPREADSHEET_MIME_TYPE, g as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, h as DEFAULT_MAX_DOCUMENT_BYTES, i as SUPPORTED_DOCUMENT_MIME, l as encodeSpreadsheet, m as DEFAULT_MAX_DATA_SOURCE_BYTES, n as READ_LINKED_DOCUMENT_TOOL, p as XLSX_UNSUPPORTED, r as READ_LINKED_DOCUMENT_TOOL_NAME, s as isBytesOnlyDocument, t as BYTES_ONLY_DOCUMENT_MIME, u as SPREADSHEET_EXTENSION, v as TEXT_BUDGETED_CONTENT_TYPES } from "./linkedDocument-
|
|
9
|
+
import { _ as DEFAULT_MAX_UPLOAD_FILE_BYTES, a as UNSUPPORTED_DOCUMENT_MESSAGE, c as toBase64, d as SPREADSHEET_LIMITS, f as SPREADSHEET_MIME_TYPE, g as DEFAULT_MAX_DOCUMENT_TEXT_BYTES, h as DEFAULT_MAX_DOCUMENT_BYTES, i as SUPPORTED_DOCUMENT_MIME, l as encodeSpreadsheet, m as DEFAULT_MAX_DATA_SOURCE_BYTES, n as READ_LINKED_DOCUMENT_TOOL, p as XLSX_UNSUPPORTED, r as READ_LINKED_DOCUMENT_TOOL_NAME, s as isBytesOnlyDocument, t as BYTES_ONLY_DOCUMENT_MIME, u as SPREADSHEET_EXTENSION, v as TEXT_BUDGETED_CONTENT_TYPES } from "./linkedDocument-CZZOl9cO.js";
|
|
10
10
|
import { n as normalizeToolContent, t as mergeCatalogEntries } from "./external-_ZRQe-V9.js";
|
|
11
11
|
import { n as extractChartSpec, t as buildRenderResult } from "./renderResult-D9Q-Vu2x.js";
|
|
12
12
|
import { n as validateUiSpecEvent, r as validateUiSpecNode, t as extractUiSpecEvents } from "./surface-DVGiCmwq.js";
|
|
13
|
-
import { t as createWebSkillApi } from "./webSkillApi-
|
|
13
|
+
import { t as createWebSkillApi } from "./webSkillApi-D5VMUnrv.js";
|
|
14
14
|
|
|
15
15
|
//#region ../core/src/fs/memoryFs.ts
|
|
16
16
|
const ROOT = "/";
|
|
@@ -873,8 +873,10 @@ var FsSessionStore = class {
|
|
|
873
873
|
console.warn(`[webskill] ${skipped.length} session file(s) under ${this.#root} are unreadable (possible data loss from an interrupted write): ${skipped.join(", ")}`);
|
|
874
874
|
}
|
|
875
875
|
metas.sort((a, b) => a.createdAt.localeCompare(b.createdAt));
|
|
876
|
+
const page = takeTailPage(metas, options, "session");
|
|
876
877
|
return {
|
|
877
|
-
...
|
|
878
|
+
...page,
|
|
879
|
+
items: [...page.items].reverse(),
|
|
878
880
|
source: "ok",
|
|
879
881
|
skipped
|
|
880
882
|
};
|
|
@@ -1010,7 +1012,7 @@ var FsToolStepStore = class {
|
|
|
1010
1012
|
* Version of the published `@webskill/sdk` package, injected at build time.
|
|
1011
1013
|
* @stable
|
|
1012
1014
|
*/
|
|
1013
|
-
const SDK_VERSION = "0.
|
|
1015
|
+
const SDK_VERSION = "0.24.0";
|
|
1014
1016
|
|
|
1015
1017
|
//#endregion
|
|
1016
|
-
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, BINARY_EXTENSIONS, BYTES_ONLY_DOCUMENT_MIME, 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, DWG_MIME_TYPES, 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, PPTX_MIME, 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, SPREADSHEET_EXTENSION, SPREADSHEET_LIMITS, SPREADSHEET_MIME_TYPE, 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, VISION_DEFAULT_CONCURRENCY, VISION_MAX_CONCURRENCY, VISION_SLOW_THRESHOLD_MS, WebSkillError, WebSkillRuntime, XLSX_MIME, XLSX_UNSUPPORTED, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clampVisionConcurrency, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, encodeSpreadsheet, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, extractedDocumentFormat, findUnpairedToolCalls, formatAttachmentText, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isBytesOnlyDocument, 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, runVisionBatch, sampleBehaviorRecords, sanitizeUntrustedLine, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
|
1018
|
+
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, BINARY_EXTENSIONS, BYTES_ONLY_DOCUMENT_MIME, 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, DWG_MIME_TYPES, 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, PPTX_MIME, 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, SPREADSHEET_EXTENSION, SPREADSHEET_LIMITS, SPREADSHEET_MIME_TYPE, 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, VISION_DEFAULT_CONCURRENCY, VISION_MAX_CONCURRENCY, VISION_SLOW_THRESHOLD_MS, WebSkillError, WebSkillRuntime, XLSX_MIME, XLSX_UNSUPPORTED, appendBehaviorRecords, applyUserProfileImport, assertRemoteUrlAllowed, assertSafePathSegment, atomicWriteBinary, atomicWriteText, bridgeError, buildCatalog, buildManifest, buildRenderResult, checkDependencyCycles, checkSkillRules, clampVisionConcurrency, classifyAttachment, computeDigest, createScriptContext, createWebSkillApi, detectSkillArchiveShape, detectSkillArchiveShapeFromFs, diffUserProfile, encodeSpreadsheet, escapeXml, exportSkills, exportUserProfile, extractChartSpec, extractSkillCandidate, extractTodoTraceEvents, extractUiSpecEvents, extractedDocumentFormat, findUnpairedToolCalls, formatAttachmentText, formatSkillScriptManifest, fromVercelResult, fromVercelStreamPart, interruptedToolResult, isAtomicTempPath, isBytesOnlyDocument, 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, runVisionBatch, sampleBehaviorRecords, sanitizeUntrustedLine, schemaSourceLabel, schemaToForm, scriptToolName, sealToolCallPairs, signSkill, signaturePayloadBytes, stripArchiveRoot, summarizeRunUsage, summarizeToolCalls, textParts, toBase64, toLlmToolSpec, toRecordDigests, toVercelToolSpecs, unzipWithLimits, validateSkills, validateUiSpecEvent, validateUiSpecNode, verifyManifest, verifySkillSignature, xmlRenderer };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
2
|
+
import { unzipSync, zipSync } from "fflate";
|
|
2
3
|
import writeXlsxFile from "write-excel-file/universal";
|
|
3
4
|
|
|
4
5
|
//#region ../runtime/src/tools/types.ts
|
|
@@ -120,6 +121,40 @@ const ROW_PADDING_PT = 4;
|
|
|
120
121
|
*/
|
|
121
122
|
const COLUMN_CHAR_PX = 7;
|
|
122
123
|
const COLUMN_PADDING_PX = 5;
|
|
124
|
+
/**
|
|
125
|
+
* 归档里写死的时间戳(0.23.0 分册 24 FR-24.2)。
|
|
126
|
+
*
|
|
127
|
+
* `write-excel-file` 调 fflate 的 `zip(files, callback)` 时不传 options,
|
|
128
|
+
* mtime 于是缺省成 `new Date()`——同一份规格在不同时刻编出的字节因此不同。
|
|
129
|
+
* ZIP 的时间戳只有 2 秒精度,所以这件事表现为「偶发」而不是「必现」。
|
|
130
|
+
*
|
|
131
|
+
* 取值约束:ZIP 的纪元是 1980 而不是 Unix 的 1970,且 fflate 拒绝纪元 0,
|
|
132
|
+
* 因此必须用本地时区构造,不能用 `Date.UTC`。
|
|
133
|
+
* `verify/scripts/documents.mjs` 里有同值的一份(两处不共享实现——那些脚本
|
|
134
|
+
* 一个仓内包都不引;一致性由 `test/spreadsheetMtimeSingleSource.test.ts` 钉住)。
|
|
135
|
+
*
|
|
136
|
+
* 不导出:它是实现细节,导出就进 api-snapshot,而本册的准入标准是零契约变更。
|
|
137
|
+
*/
|
|
138
|
+
const XLSX_ZIP_MTIME = new Date(1980, 0, 1, 0, 0, 0);
|
|
139
|
+
/**
|
|
140
|
+
* 解包再用固定 mtime 重打包。
|
|
141
|
+
*
|
|
142
|
+
* 不直接改 ZIP 字节里的时间戳字段:那要手写本地文件头与中央目录的偏移解析,
|
|
143
|
+
* 而时间戳在两处各存一份,漏一处就是坏档,坏档还不一定报错(FR-24.4 明令禁止)。
|
|
144
|
+
* `unzipSync` 保留中央目录的条目顺序,`zipSync` 按对象键顺序写回,
|
|
145
|
+
* 所以 OOXML 要求的 `[Content_Types].xml` 居首不会被打乱。
|
|
146
|
+
*/
|
|
147
|
+
function withFixedTimestamps(bytes) {
|
|
148
|
+
return zipSync(unzipSync(bytes), {
|
|
149
|
+
level: 6,
|
|
150
|
+
mtime: XLSX_ZIP_MTIME
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/** 字节数是唯一无法预先算出的上限,只能编码后查 */
|
|
154
|
+
function assertWithinByteLimit(length) {
|
|
155
|
+
if (length <= SPREADSHEET_LIMITS.bytes) return;
|
|
156
|
+
throw invalid(`The encoded spreadsheet is ${length} bytes (max ${SPREADSHEET_LIMITS.bytes}); reduce the number of rows, sheets or images.`);
|
|
157
|
+
}
|
|
123
158
|
function invalid(message) {
|
|
124
159
|
return new WebSkillError("VALIDATION_FAILED", message);
|
|
125
160
|
}
|
|
@@ -311,8 +346,11 @@ function applyImageSizing(data, images) {
|
|
|
311
346
|
/**
|
|
312
347
|
* 把表格规格编码为 xlsx 字节。
|
|
313
348
|
*
|
|
314
|
-
* 纯函数——不认识产物、run
|
|
315
|
-
*
|
|
349
|
+
* 纯函数——不认识产物、run 与工具,因此工具、脚本能力、测试三个消费面共用同一份实现。
|
|
350
|
+
*
|
|
351
|
+
* 「纯函数」只保证三个消费面走的是同一条代码路径,**不足以**保证输出逐字节相同:
|
|
352
|
+
* 归档格式本身会把编码时刻写进字节。AC-10.8「双消费面逐字节相同」靠的是
|
|
353
|
+
* `withFixedTimestamps()` 把那个时刻拿掉(0.23.0 分册 24)。
|
|
316
354
|
*
|
|
317
355
|
* `resolveImage` 是图片引用的解析出口(0.22.0 分册 20 FR-20.3)。它同样不破坏纯函数性:
|
|
318
356
|
* 给定相同的规格与相同的解析结果,输出逐字节相同。规格里有图片却没给它,是
|
|
@@ -340,8 +378,10 @@ async function encodeSpreadsheet(spec, resolveImage) {
|
|
|
340
378
|
});
|
|
341
379
|
}
|
|
342
380
|
const blob = await writeXlsxFile(payload).toBlob();
|
|
343
|
-
const
|
|
344
|
-
|
|
381
|
+
const encoded = new Uint8Array(await blob.arrayBuffer());
|
|
382
|
+
assertWithinByteLimit(encoded.length);
|
|
383
|
+
const bytes = withFixedTimestamps(encoded);
|
|
384
|
+
assertWithinByteLimit(bytes.length);
|
|
345
385
|
return bytes;
|
|
346
386
|
}
|
|
347
387
|
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X as JsonSchema, _ as LlmToolSpec, _t as SkillDocument, ht as SkillCatalogEntry } from "./types-CpDRZ0rA-
|
|
2
|
-
import { B as ExternalToolSource, Hr as mergeCatalogEntries, Mn as ToolDisclosure, Pn as ToolResult, z as ExternalSkillProvider } from "./index-
|
|
1
|
+
import { X as JsonSchema, _ as LlmToolSpec, _t as SkillDocument, ht as SkillCatalogEntry } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
|
+
import { B as ExternalToolSource, Hr as mergeCatalogEntries, Mn as ToolDisclosure, Pn as ToolResult, z as ExternalSkillProvider } from "./index-Bq299VnF.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 { G as FileStat, It as VerifyResult, K as FileSystemProvider, N as ArchiveLimits, Ot as SkillsLockfile, Pt as UnsignedPolicy, S as UiBridge, St as SkillManifest, X as JsonSchema, at as SKILL_MANIFEST_FILE, b as RenderResultRequest, c as InteractionResponse, it as SKILLS_LOCKFILE, jt as TrustedKeyStore, q as FileWriteStream, s as InteractionRequest, ut as SignatureAuditSink, vt as SkillInstallSource, xt as SkillManagerPort } from "./types-CpDRZ0rA-
|
|
2
|
-
import { $t as SchemaInferer, H as FsArtifactStore, Pn as ToolResult, Tr as createScriptContext, U as FsMemoryStore, b as BridgeCapabilities, en as ScriptExecutionContext, gr as WebSkillRuntimeDeps, hr as WebSkillRuntime, jn as ToolDefinition, m as ApprovalScope, tn as ScriptExecutor, ut as NetworkPolicy } from "./index-
|
|
3
|
-
import { a as AuditLog,
|
|
1
|
+
import { G as FileStat, It as VerifyResult, K as FileSystemProvider, N as ArchiveLimits, Ot as SkillsLockfile, Pt as UnsignedPolicy, S as UiBridge, St as SkillManifest, X as JsonSchema, at as SKILL_MANIFEST_FILE, b as RenderResultRequest, c as InteractionResponse, it as SKILLS_LOCKFILE, jt as TrustedKeyStore, q as FileWriteStream, s as InteractionRequest, ut as SignatureAuditSink, vt as SkillInstallSource, xt as SkillManagerPort } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
|
+
import { $t as SchemaInferer, H as FsArtifactStore, Pn as ToolResult, Tr as createScriptContext, U as FsMemoryStore, b as BridgeCapabilities, en as ScriptExecutionContext, gr as WebSkillRuntimeDeps, hr as WebSkillRuntime, jn as ToolDefinition, m as ApprovalScope, tn as ScriptExecutor, ut as NetworkPolicy } from "./index-Bq299VnF.js";
|
|
3
|
+
import { a as AuditLog, f as CandidateSkill, h as CandidateStore, r as ApprovalPolicy, x as SkillVersionStore } from "./skillVersionStore-S4_HJ_Fl-Ds97pwm5.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,9 +1,9 @@
|
|
|
1
1
|
import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
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-
|
|
3
|
-
import { a as
|
|
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-WSUDp6A1.js";
|
|
3
|
+
import { a as atomicWriteBinary, o as atomicWriteText, r as resolveInsideRoot, s as isAtomicTempPath, t as assertSafePathSegment } from "./pathSecurity-CirkQwWP.js";
|
|
4
4
|
import { t as assertRemoteUrlAllowed } from "./urlSafety-CiSuCJvX.js";
|
|
5
|
-
import { K 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-
|
|
6
|
-
import { f as SPREADSHEET_MIME_TYPE } from "./linkedDocument-
|
|
5
|
+
import { K 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-7CuZS3Z4.js";
|
|
6
|
+
import { f as SPREADSHEET_MIME_TYPE } from "./linkedDocument-CZZOl9cO.js";
|
|
7
7
|
import { n as normalizeToolContent } from "./external-_ZRQe-V9.js";
|
|
8
8
|
import { i as probeLlmCapabilities } from "./env-Bj1MI2Ww.js";
|
|
9
9
|
import { t as AUDIT_EVENT_TYPES } from "./eventTypes-DcTQXSV1.js";
|
|
@@ -2469,7 +2469,14 @@ var ApprovalWorkflow = class {
|
|
|
2469
2469
|
const stagingRoot = (await mkdtemp(path.join(tmpdir(), "webskill-candidate-"))).split(path.sep).join("/");
|
|
2470
2470
|
try {
|
|
2471
2471
|
const skillDir = `${stagingRoot}/${candidate.name}`;
|
|
2472
|
-
for (const file of candidate.files)
|
|
2472
|
+
for (const file of candidate.files) {
|
|
2473
|
+
const target = resolveInsideRoot(skillDir, file.path);
|
|
2474
|
+
if (file.binary === void 0) {
|
|
2475
|
+
await atomicWriteText(this.#fs, target, file.content);
|
|
2476
|
+
continue;
|
|
2477
|
+
}
|
|
2478
|
+
await atomicWriteBinary(this.#fs, target, await this.#store.readCandidateBinary(candidate.id, file.binary.file));
|
|
2479
|
+
}
|
|
2473
2480
|
const report = await validateSkills(this.#fs, [stagingRoot]);
|
|
2474
2481
|
if (!report.ok) {
|
|
2475
2482
|
const errors = report.issues.filter((i) => i.severity === "error");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as uiCatalog } from "./openUiSpecLang-
|
|
1
|
+
import { g as uiCatalog } from "./openUiSpecLang-DIcLcybq.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";
|