@webskill/sdk 0.23.0 → 0.25.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 +33 -10
- package/dist/browser.d.ts +60 -6
- package/dist/browser.js +280 -24
- package/dist/governance.d.ts +3 -3
- package/dist/governance.js +12 -2
- package/dist/{index-V76_OFj2.d.ts → index-B3rMAUWB.d.ts} +49 -10
- package/dist/{index-7No55dRb.d.ts → index-Bq299VnF.d.ts} +1 -1
- package/dist/{index-ShvCB5I9.d.ts → index-mKgZU7cG.d.ts} +62 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/node.d.ts +3 -3
- package/dist/{openUiLibrary-B7j3rLrm.js → openUiLibrary-CxtrnX54.js} +1 -1
- package/dist/{openUiSpecLang-BSYYnjay.js → openUiSpecLang-DIcLcybq.js} +148 -13
- package/dist/{skillVersionStore-S4_HJ_Fl-Cvy9LqVu.d.ts → skillVersionStore-S4_HJ_Fl-Ds97pwm5.d.ts} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{types-CpDRZ0rA-BiZBXGm4.d.ts → types-CpDRZ0rA-CFQ-vdKz.d.ts} +4 -0
- package/dist/ui-react.d.ts +11 -4
- package/dist/ui-react.js +48 -6
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +6 -6
- 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 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-
|
|
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.25.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, 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
|
@@ -1012,7 +1012,7 @@ var FsToolStepStore = class {
|
|
|
1012
1012
|
* Version of the published `@webskill/sdk` package, injected at build time.
|
|
1013
1013
|
* @stable
|
|
1014
1014
|
*/
|
|
1015
|
-
const SDK_VERSION = "0.
|
|
1015
|
+
const SDK_VERSION = "0.25.0";
|
|
1016
1016
|
|
|
1017
1017
|
//#endregion
|
|
1018
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 };
|
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, f as CandidateSkill, h as CandidateStore, r as ApprovalPolicy, x as SkillVersionStore } from "./skillVersionStore-S4_HJ_Fl-
|
|
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
|
|
@@ -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";
|
|
@@ -45,6 +45,88 @@ function resolveChartFontSizes(sizes) {
|
|
|
45
45
|
...sizes
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* 颜色回落值的**全仓唯一来源**:逐项照抄 echarts 6 的现行默认
|
|
50
|
+
* (primary `#3c3c41`、secondary/axisLabel `#54555a`、axisSplitLine `#dbdee4`)。
|
|
51
|
+
*
|
|
52
|
+
* 照抄而不是另调一套,是为了让「读不到计算样式」这条路径与 0.24.0 之前逐像素相同。
|
|
53
|
+
*/
|
|
54
|
+
const DEFAULT_CHART_COLORS = {
|
|
55
|
+
title: "#3c3c41",
|
|
56
|
+
axisLabel: "#54555a",
|
|
57
|
+
legend: "#54555a",
|
|
58
|
+
axisLine: "#54555a",
|
|
59
|
+
splitLine: "#dbdee4"
|
|
60
|
+
};
|
|
61
|
+
/** 逐字段兜底:宿主通常只想改其中一两项 */
|
|
62
|
+
function resolveChartColors(colors) {
|
|
63
|
+
return {
|
|
64
|
+
...DEFAULT_CHART_COLORS,
|
|
65
|
+
...colors
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 两个 alpha 不是拍的,是从 echarts 默认反推的:黑字浅底下
|
|
70
|
+
* 0.65 合成 `#595959`(对 `#54555a`)、0.15 合成 `#d9d9d9`(对 `#dbdee4`)。
|
|
71
|
+
* 取这两个值,浅色宿主上的轴线与网格线几乎与以往一样,深色宿主上自动变成同色低透明度。
|
|
72
|
+
*/
|
|
73
|
+
const AXIS_LINE_ALPHA = .65;
|
|
74
|
+
const SPLIT_LINE_ALPHA = .15;
|
|
75
|
+
/** 计算值是 `rgb()` / `rgba()` 时的快路径;认不出返回 undefined,**不猜** */
|
|
76
|
+
function parseRgb(value) {
|
|
77
|
+
if (typeof value !== "string") return void 0;
|
|
78
|
+
const match = /^rgba?\(([^)]+)\)$/.exec(value.trim());
|
|
79
|
+
if (!match) return void 0;
|
|
80
|
+
const parts = match[1].split(/[,\s/]+/).map((part) => part.trim()).filter((part) => part !== "");
|
|
81
|
+
if (parts.length < 3) return void 0;
|
|
82
|
+
const channels = parts.slice(0, 3).map((part) => Number.parseFloat(part));
|
|
83
|
+
if (channels.some((channel) => !Number.isFinite(channel))) return void 0;
|
|
84
|
+
return channels;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 计算值不是 `rgb()` 写法时的慢路径:让浏览器自己画一个像素再读回来。
|
|
88
|
+
*
|
|
89
|
+
* CSSOM 早年确实只吐 `rgb()`,但主题变量现在普遍是 `oklch()`(Tailwind v4 即是),
|
|
90
|
+
* 计算值会**原样保留**那种写法。只认 `rgb()` 的话,暗色主题下整张图会悄悄回落到
|
|
91
|
+
* 浅灰默认色——正是分册 14 要修的「看不清」。
|
|
92
|
+
* 这里不自己写色彩空间换算:换算表抄错一位没人看得出来,而 canvas 用的就是
|
|
93
|
+
* 浏览器那份实现,认得出的颜色它都认得。
|
|
94
|
+
*/
|
|
95
|
+
function probeRgb(container, value) {
|
|
96
|
+
if (typeof value !== "string" || value.trim() === "") return void 0;
|
|
97
|
+
const view = container.ownerDocument?.defaultView;
|
|
98
|
+
if (typeof view?.CSS?.supports === "function" && !view.CSS.supports("color", value)) return void 0;
|
|
99
|
+
const canvas = container.ownerDocument?.createElement("canvas");
|
|
100
|
+
if (!canvas) return void 0;
|
|
101
|
+
canvas.width = 1;
|
|
102
|
+
canvas.height = 1;
|
|
103
|
+
const ctx = canvas.getContext("2d");
|
|
104
|
+
if (!ctx) return void 0;
|
|
105
|
+
ctx.fillStyle = value;
|
|
106
|
+
ctx.fillRect(0, 0, 1, 1);
|
|
107
|
+
const pixel = ctx.getImageData(0, 0, 1, 1).data;
|
|
108
|
+
if (pixel[3] === 0) return void 0;
|
|
109
|
+
return [
|
|
110
|
+
pixel[0],
|
|
111
|
+
pixel[1],
|
|
112
|
+
pixel[2]
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
/** 画布够不到 CSS,所以把容器的计算 `color` 当作这张图的取色依据(需求 14 §2.1) */
|
|
116
|
+
function chartColorsFromContainer(container) {
|
|
117
|
+
const computed = container.ownerDocument?.defaultView?.getComputedStyle(container);
|
|
118
|
+
const rgb = parseRgb(computed?.color) ?? probeRgb(container, computed?.color);
|
|
119
|
+
if (!rgb) return void 0;
|
|
120
|
+
const [r, g, b] = rgb;
|
|
121
|
+
const at = (alpha) => `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
122
|
+
return {
|
|
123
|
+
title: at(1),
|
|
124
|
+
legend: at(1),
|
|
125
|
+
axisLabel: at(1),
|
|
126
|
+
axisLine: at(AXIS_LINE_ALPHA),
|
|
127
|
+
splitLine: at(SPLIT_LINE_ALPHA)
|
|
128
|
+
};
|
|
129
|
+
}
|
|
48
130
|
/** echarts 的图例条目来源:饼图按标签分项,其余按系列名 */
|
|
49
131
|
const legendEntries = (chart) => chart.kind === "pie" ? chart.labels : seriesNames(chart);
|
|
50
132
|
/**
|
|
@@ -68,32 +150,52 @@ const SERIES_SHAPE = {
|
|
|
68
150
|
const FALLBACK_KIND = "bar";
|
|
69
151
|
const fallbackNotice = (kind) => kind === "" ? `Missing chart type; rendered as a ${FALLBACK_KIND} chart.` : `Unsupported chart type "${kind}"; rendered as a ${FALLBACK_KIND} chart.`;
|
|
70
152
|
/** `ChartSpec` → ECharts option:图表类型、数据系列、图例的唯一定义处 */
|
|
71
|
-
function toEchartsOption(chart, fontSizes) {
|
|
153
|
+
function toEchartsOption(chart, fontSizes, colors) {
|
|
72
154
|
const font = resolveChartFontSizes(fontSizes);
|
|
155
|
+
const color = resolveChartColors(colors);
|
|
73
156
|
const known = KINDS.has(chart.kind);
|
|
74
157
|
const shape = SERIES_SHAPE[known ? chart.kind : FALLBACK_KIND];
|
|
75
158
|
const notice = known ? void 0 : fallbackNotice(chart.kind);
|
|
76
159
|
const valueAxis = {
|
|
77
160
|
type: "value",
|
|
78
|
-
axisLabel: {
|
|
161
|
+
axisLabel: {
|
|
162
|
+
fontSize: font.axisLabel,
|
|
163
|
+
color: color.axisLabel
|
|
164
|
+
},
|
|
165
|
+
axisLine: { lineStyle: { color: color.axisLine } },
|
|
166
|
+
splitLine: { lineStyle: { color: color.splitLine } }
|
|
79
167
|
};
|
|
80
168
|
return {
|
|
81
169
|
animation: false,
|
|
82
170
|
title: chart.title || notice ? {
|
|
83
171
|
text: chart.title ?? "",
|
|
84
172
|
left: "center",
|
|
85
|
-
textStyle: {
|
|
86
|
-
|
|
173
|
+
textStyle: {
|
|
174
|
+
fontSize: font.title,
|
|
175
|
+
color: color.title
|
|
176
|
+
},
|
|
177
|
+
...notice ? {
|
|
178
|
+
subtext: notice,
|
|
179
|
+
subtextStyle: { color: color.axisLabel }
|
|
180
|
+
} : {}
|
|
87
181
|
} : void 0,
|
|
88
182
|
tooltip: { trigger: chart.kind === "pie" ? "item" : "axis" },
|
|
89
183
|
legend: {
|
|
90
184
|
bottom: 0,
|
|
91
|
-
textStyle: {
|
|
185
|
+
textStyle: {
|
|
186
|
+
fontSize: font.legend,
|
|
187
|
+
color: color.legend
|
|
188
|
+
}
|
|
92
189
|
},
|
|
93
190
|
xAxis: chart.kind === "pie" ? void 0 : {
|
|
94
191
|
type: "category",
|
|
95
192
|
data: chart.labels,
|
|
96
|
-
axisLabel: {
|
|
193
|
+
axisLabel: {
|
|
194
|
+
fontSize: font.axisLabel,
|
|
195
|
+
color: color.axisLabel
|
|
196
|
+
},
|
|
197
|
+
axisLine: { lineStyle: { color: color.axisLine } },
|
|
198
|
+
splitLine: { lineStyle: { color: color.splitLine } }
|
|
97
199
|
},
|
|
98
200
|
yAxis: chart.kind === "pie" ? void 0 : chart.kind === "dual-axis" ? [valueAxis, { ...valueAxis }] : valueAxis,
|
|
99
201
|
series: chart.kind === "pie" ? chart.series.map((series) => ({
|
|
@@ -128,6 +230,7 @@ function applyChartDomContract(container, chart) {
|
|
|
128
230
|
*/
|
|
129
231
|
let echartsModule;
|
|
130
232
|
const loadEcharts = () => echartsModule ??= import("./echarts-BE7oV_Dl.js");
|
|
233
|
+
const sameColors = (a, b) => a === b || a !== void 0 && b !== void 0 && a.title === b.title && a.axisLabel === b.axisLabel && a.legend === b.legend && a.axisLine === b.axisLine && a.splitLine === b.splitLine;
|
|
131
234
|
/**
|
|
132
235
|
* 框架无关的 echarts 挂载点:三档的 React 组件与 A2UI 档的 Lit 元素共用同一实现,
|
|
133
236
|
* 图表不再因档位而异。echarts 走动态 import,不打进首屏。
|
|
@@ -137,12 +240,40 @@ function mountEchart(container) {
|
|
|
137
240
|
let instance;
|
|
138
241
|
let queued;
|
|
139
242
|
let observer;
|
|
140
|
-
|
|
141
|
-
|
|
243
|
+
let themeObserver;
|
|
244
|
+
let inherited;
|
|
245
|
+
const apply = (chart, fontSizes, colors) => {
|
|
246
|
+
inherited = chartColorsFromContainer(container);
|
|
247
|
+
const effective = colors ? {
|
|
248
|
+
...inherited,
|
|
249
|
+
...colors
|
|
250
|
+
} : inherited;
|
|
251
|
+
instance?.setOption(toEchartsOption(chart, fontSizes, effective), {
|
|
142
252
|
notMerge: true,
|
|
143
253
|
lazyUpdate: true
|
|
144
254
|
});
|
|
145
255
|
};
|
|
256
|
+
/**
|
|
257
|
+
* 主题切换改的是祖先链上的 class(ThemeScope)或根节点属性(扩展 viewer),
|
|
258
|
+
* 两者都表现为祖先的属性变更。观察一条从容器到 documentElement 的链,
|
|
259
|
+
* 命中就重算一次颜色;颜色没变则什么都不做(避免无谓重绘)。
|
|
260
|
+
*/
|
|
261
|
+
const watchAncestors = () => {
|
|
262
|
+
if (typeof MutationObserver === "undefined") return;
|
|
263
|
+
themeObserver = new MutationObserver(() => {
|
|
264
|
+
if (disposed || queued === void 0) return;
|
|
265
|
+
if (sameColors(chartColorsFromContainer(container), inherited)) return;
|
|
266
|
+
apply(queued.chart, queued.fontSizes, queued.colors);
|
|
267
|
+
});
|
|
268
|
+
for (let node = container; node; node = node.parentElement) themeObserver.observe(node, {
|
|
269
|
+
attributes: true,
|
|
270
|
+
attributeFilter: [
|
|
271
|
+
"class",
|
|
272
|
+
"style",
|
|
273
|
+
"data-theme"
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
};
|
|
146
277
|
loadEcharts().then((echarts) => {
|
|
147
278
|
if (disposed) return;
|
|
148
279
|
instance = echarts.init(container);
|
|
@@ -150,21 +281,25 @@ function mountEchart(container) {
|
|
|
150
281
|
observer = new ResizeObserver(() => instance?.resize());
|
|
151
282
|
observer.observe(container);
|
|
152
283
|
}
|
|
153
|
-
|
|
284
|
+
watchAncestors();
|
|
285
|
+
if (queued) apply(queued.chart, queued.fontSizes, queued.colors);
|
|
154
286
|
});
|
|
155
287
|
return {
|
|
156
|
-
setChart(chart, fontSizes) {
|
|
288
|
+
setChart(chart, fontSizes, colors) {
|
|
157
289
|
applyChartDomContract(container, chart);
|
|
158
290
|
queued = {
|
|
159
291
|
chart,
|
|
160
|
-
...fontSizes ? { fontSizes } : {}
|
|
292
|
+
...fontSizes ? { fontSizes } : {},
|
|
293
|
+
...colors ? { colors } : {}
|
|
161
294
|
};
|
|
162
|
-
apply(chart, fontSizes);
|
|
295
|
+
apply(chart, fontSizes, colors);
|
|
163
296
|
},
|
|
164
297
|
dispose() {
|
|
165
298
|
disposed = true;
|
|
166
299
|
observer?.disconnect();
|
|
167
300
|
observer = void 0;
|
|
301
|
+
themeObserver?.disconnect();
|
|
302
|
+
themeObserver = void 0;
|
|
168
303
|
instance?.dispose();
|
|
169
304
|
instance = void 0;
|
|
170
305
|
}
|
|
@@ -1900,4 +2035,4 @@ function toOpenUiSpecLang(spec, catalog = uiCatalog) {
|
|
|
1900
2035
|
}
|
|
1901
2036
|
|
|
1902
2037
|
//#endregion
|
|
1903
|
-
export {
|
|
2038
|
+
export { DEFAULT_CHART_COLORS as C, resolveChartColors as D, mountEchart as E, resolveChartFontSizes as O, gaugePercent as S, chartSpecFromProps as T, defineUiCatalog as _, SPEC_TABLE_MIN_COLUMN_VAR as a, CATALOG_SCHEMA_MAX as b, resolveColumnWidths as c, collectFormScopes as d, collectScopedValues as f, uiCatalog as g, UI_CATALOG_PROMPT_BUDGET_BYTES as h, normalizeFieldOptions as i, toEchartsOption as k, MAX_CONDITION_DEPTH as l, UI_CATALOG_GROUPS as m, interactionToUiSpec as n, SPEC_TABLE_MIN_COLUMN_WIDTH as o, qualifyFieldName as p, toJsonRenderSpec as r, normalizeColumnWidths as s, toOpenUiSpecLang as t, evaluateFieldCondition as u, CATALOG_BUDGET_STAGE as v, DEFAULT_CHART_FONT_SIZES as w, PLANNED_INCREMENT as x, CATALOG_PROMPT_MAX as y };
|
package/dist/{skillVersionStore-S4_HJ_Fl-Cvy9LqVu.d.ts → skillVersionStore-S4_HJ_Fl-Ds97pwm5.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as FileSystemProvider, St as SkillManifest, et as Page, ht as SkillCatalogEntry, tt as PageQuery } from "./types-CpDRZ0rA-
|
|
1
|
+
import { K as FileSystemProvider, St as SkillManifest, et as Page, ht as SkillCatalogEntry, tt as PageQuery } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
2
|
//#region ../governance/dist/skillVersionStore-S4_HJ_Fl.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-CpDRZ0rA-
|
|
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-CpDRZ0rA-CFQ-vdKz.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
|
|
@@ -46,6 +46,10 @@ type WebSkillErrorCode = 'FS_NOT_FOUND' | 'FS_PATH_OUTSIDE_ROOT' | 'SKILL_NOT_FO
|
|
|
46
46
|
'TEMPLATE_ROW_INSERT_RANGE' |
|
|
47
47
|
/** 目标格由模板的公式算出,写值会把它摧毁(FR-42.28) */
|
|
48
48
|
'TEMPLATE_CELL_IS_FORMULA' |
|
|
49
|
+
/** 目标格落在合并区内且不是左上角:写进去 Excel 不显示(0.24.0 FR-17.6) */
|
|
50
|
+
'TEMPLATE_CELL_IS_COVERED' |
|
|
51
|
+
/** 请求了若干格,一条都没写成——那不是部分成功,是整个填错了地方(0.24.0 FR-17.10) */
|
|
52
|
+
'TEMPLATE_FILL_REJECTED' |
|
|
49
53
|
/** 用户拒绝了这次工具调用(0.14.0 分册 20) */
|
|
50
54
|
'TOOL_DENIED';
|
|
51
55
|
/**
|
package/dist/ui-react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as UiSpecActionCapability, D as UiSpecSnapshot, Nt as UiSpecNode, O as UiSurfaceActionRequest, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-CpDRZ0rA-
|
|
2
|
-
import { P as DocumentSurfacePort } from "./index-
|
|
3
|
-
import {
|
|
1
|
+
import { C as UiSpecActionCapability, D as UiSpecSnapshot, Nt as UiSpecNode, O as UiSurfaceActionRequest, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-CpDRZ0rA-CFQ-vdKz.js";
|
|
2
|
+
import { P as DocumentSurfacePort } from "./index-Bq299VnF.js";
|
|
3
|
+
import { L as InteractionSpecLabels, X as SurfaceFormTexts, Z as SurfaceHostControlTexts, v as ChartColors, y as ChartFontSizes } from "./index-mKgZU7cG.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import React$1, { ComponentType, ReactNode } from "react";
|
|
6
6
|
import "react/jsx-runtime";
|
|
@@ -555,4 +555,11 @@ declare function ChartFontSizesProvider({ sizes, children }: {
|
|
|
555
555
|
children: ReactNode;
|
|
556
556
|
}): import("react").JSX.Element;
|
|
557
557
|
//#endregion
|
|
558
|
-
|
|
558
|
+
//#region src/components/chartColors.d.ts
|
|
559
|
+
declare function useChartColors(): Partial<ChartColors> | undefined;
|
|
560
|
+
declare function ChartColorsProvider({ colors, children }: {
|
|
561
|
+
colors?: Partial<ChartColors> | undefined;
|
|
562
|
+
children: ReactNode;
|
|
563
|
+
}): import("react").JSX.Element;
|
|
564
|
+
//#endregion
|
|
565
|
+
export { type CatalogNodeProps, ChartColorsProvider, ChartFontSizesProvider, type CustomSurfaceActionEvent, type DroppedSurfaceActionWarning, InteractionForm, type JsonRenderActionDispatch, JsonRenderSpecSurface, type JsonRenderSpecSurfaceProps, NATIVE_SPEC_COMPONENTS, NativeSpecSurface, type NativeSpecSurfaceProps, OpenUiSpecSurface, type OpenUiSpecSurfaceProps, ReactBridgeState, type ReactBridgeStateOptions, type RegisteredSurfaceProps, ResultBlocks, SpecInteractionChannel, type SpecInteractionSession, StreamingText, SurfaceFormTextsProvider, type SurfaceRegistration, SurfaceRegistry, type UiSurfaceActionEvent, UiSurfaceList, type UiSurfaceListProps, UiSurfaceSnapshotList, type UiSurfaceSnapshotListProps, UiSurfaceStore, catalogComponentImpls, createJsonRenderRegistry, probeJsonRenderAvailability, useChartColors, useChartFontSizes, useSurfaceFormTexts, useSurfaceHostControlTexts };
|
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-D0nYMzz8.js";
|
|
5
|
-
import {
|
|
5
|
+
import { E as mountEchart, O as resolveChartFontSizes, S as gaugePercent, T as chartSpecFromProps, c as resolveColumnWidths, d as collectFormScopes, f as collectScopedValues, g as uiCatalog, i as normalizeFieldOptions, n as interactionToUiSpec, p as qualifyFieldName, r as toJsonRenderSpec, s as normalizeColumnWidths, t as toOpenUiSpecLang, u as evaluateFieldCondition, w as DEFAULT_CHART_FONT_SIZES } from "./openUiSpecLang-DIcLcybq.js";
|
|
6
6
|
import minpath from "node:path";
|
|
7
7
|
import { fileURLToPath as urlToPath } from "node:url";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -124766,14 +124766,52 @@ function ChartFontSizesProvider({ sizes, children }) {
|
|
|
124766
124766
|
});
|
|
124767
124767
|
}
|
|
124768
124768
|
|
|
124769
|
+
//#endregion
|
|
124770
|
+
//#region ../ui-react/src/components/chartColors.tsx
|
|
124771
|
+
/**
|
|
124772
|
+
* 画布内取色的注入口(0.24.0 分册 14 FR-14.8)。与 `ChartFontSizesProvider` 同构,
|
|
124773
|
+
* 只有缺省来源不同:字号缺省是常量,颜色缺省是**不注入**——
|
|
124774
|
+
* 那样 `mountEchart` 会去读容器的计算 `color`,图表因此跟着宿主主题走。
|
|
124775
|
+
* 所以这里的 context 缺省值是 `undefined` 而不是 `DEFAULT_CHART_COLORS`:
|
|
124776
|
+
* 填上常量就等于把所有图表钉死在浅色默认上,正是本册要修的毛病。
|
|
124777
|
+
*/
|
|
124778
|
+
const ChartColorsContext = createContext(void 0);
|
|
124779
|
+
function useChartColors() {
|
|
124780
|
+
return useContext(ChartColorsContext);
|
|
124781
|
+
}
|
|
124782
|
+
function ChartColorsProvider({ colors, children }) {
|
|
124783
|
+
const { title, axisLabel, legend, axisLine, splitLine } = colors ?? {};
|
|
124784
|
+
const absent = colors === void 0;
|
|
124785
|
+
const value = useMemo(() => absent ? void 0 : {
|
|
124786
|
+
title,
|
|
124787
|
+
axisLabel,
|
|
124788
|
+
legend,
|
|
124789
|
+
axisLine,
|
|
124790
|
+
splitLine
|
|
124791
|
+
}, [
|
|
124792
|
+
absent,
|
|
124793
|
+
title,
|
|
124794
|
+
axisLabel,
|
|
124795
|
+
legend,
|
|
124796
|
+
axisLine,
|
|
124797
|
+
splitLine
|
|
124798
|
+
]);
|
|
124799
|
+
return /* @__PURE__ */ jsx(ChartColorsContext.Provider, {
|
|
124800
|
+
value,
|
|
124801
|
+
children
|
|
124802
|
+
});
|
|
124803
|
+
}
|
|
124804
|
+
|
|
124769
124805
|
//#endregion
|
|
124770
124806
|
//#region ../ui-react/src/components/EChart.tsx
|
|
124771
124807
|
/** echarts 挂载点:surface 图表与 catalog 声明树的 Chart 节点共用,实现在 `@webskill/ui`,与 A2UI 档同一份 */
|
|
124772
|
-
function EChart({ chart, fontSizes }) {
|
|
124808
|
+
function EChart({ chart, fontSizes, colors }) {
|
|
124773
124809
|
const containerRef = useRef(null);
|
|
124774
124810
|
const handleRef = useRef(void 0);
|
|
124775
124811
|
const inherited = useChartFontSizes();
|
|
124776
124812
|
const effective = fontSizes ?? inherited;
|
|
124813
|
+
const inheritedColors = useChartColors();
|
|
124814
|
+
const effectiveColors = colors ?? inheritedColors;
|
|
124777
124815
|
useEffect(() => {
|
|
124778
124816
|
const container = containerRef.current;
|
|
124779
124817
|
if (!container) return;
|
|
@@ -124785,8 +124823,12 @@ function EChart({ chart, fontSizes }) {
|
|
|
124785
124823
|
};
|
|
124786
124824
|
}, []);
|
|
124787
124825
|
useEffect(() => {
|
|
124788
|
-
handleRef.current?.setChart(chart, effective);
|
|
124789
|
-
}, [
|
|
124826
|
+
handleRef.current?.setChart(chart, effective, effectiveColors);
|
|
124827
|
+
}, [
|
|
124828
|
+
chart,
|
|
124829
|
+
effective,
|
|
124830
|
+
effectiveColors
|
|
124831
|
+
]);
|
|
124790
124832
|
return /* @__PURE__ */ jsx("div", {
|
|
124791
124833
|
className: "webskill-surface__chart",
|
|
124792
124834
|
ref: containerRef
|
|
@@ -135003,7 +135045,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
|
|
|
135003
135045
|
const [unavailable, setUnavailable] = useState(false);
|
|
135004
135046
|
useEffect(() => {
|
|
135005
135047
|
let cancelled = false;
|
|
135006
|
-
import("./openUiLibrary-
|
|
135048
|
+
import("./openUiLibrary-CxtrnX54.js").then((loaded) => {
|
|
135007
135049
|
if (!cancelled) setModule(loaded);
|
|
135008
135050
|
}).catch(() => {
|
|
135009
135051
|
if (!cancelled) setUnavailable(true);
|
|
@@ -135042,4 +135084,4 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
|
|
|
135042
135084
|
}
|
|
135043
135085
|
|
|
135044
135086
|
//#endregion
|
|
135045
|
-
export { ChartFontSizesProvider, InteractionForm, JsonRenderSpecSurface, NATIVE_SPEC_COMPONENTS, NativeSpecSurface, OpenUiSpecSurface, ReactBridgeState, ResultBlocks, SpecInteractionChannel, StreamingText, SurfaceFormTextsProvider, SurfaceRegistry, UiSurfaceList, UiSurfaceSnapshotList, UiSurfaceStore, catalogComponentImpls, createJsonRenderRegistry, probeJsonRenderAvailability, CatalogNode as t, useChartFontSizes, useSurfaceFormTexts, useSurfaceHostControlTexts };
|
|
135087
|
+
export { ChartColorsProvider, ChartFontSizesProvider, InteractionForm, JsonRenderSpecSurface, NATIVE_SPEC_COMPONENTS, NativeSpecSurface, OpenUiSpecSurface, ReactBridgeState, ResultBlocks, SpecInteractionChannel, StreamingText, SurfaceFormTextsProvider, SurfaceRegistry, UiSurfaceList, UiSurfaceSnapshotList, UiSurfaceStore, catalogComponentImpls, createJsonRenderRegistry, probeJsonRenderAvailability, CatalogNode as t, useChartColors, useChartFontSizes, useSurfaceFormTexts, useSurfaceHostControlTexts };
|