@webskill/sdk 0.26.1 → 0.27.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.
@@ -240,7 +240,7 @@ function asReadMode(raw) {
240
240
  const READ_DOCUMENT_TOOL = "read_document";
241
241
  /** 大图的门槛:低于它的是页眉 logo、印章、项目符号,投它们等于白烧一次多模态请求 @experimental */
242
242
  const PDF_LARGE_IMAGE_RATIO = .15;
243
- const DESCRIPTION = "Read a PDF, Word (.docx), Excel (.xlsx) or PowerPoint (.pptx) document the user attached or downloaded, one batch of units at a time. Pages that have no usable text layer (scans) are rendered as images, so their content is never lost. Pictures on pages whose text is readable are listed under \"deferred\" instead of being returned, because reading them costs an extra round trip; call again with mode=\"images\" to fetch those.";
243
+ const DESCRIPTION = "Read a PDF, Word (.docx), Excel (.xlsx) or PowerPoint (.pptx) document the user attached or downloaded, one batch of units at a time. Pages that have no usable text layer (scans) are rendered as images, so their content is never lost. Pictures on pages whose text is readable are listed under \"deferred\" instead of being returned, because reading them costs an extra round trip; call again with mode=\"images\" to fetch those. Excel pictures are the exception: all of them are returned inline with their rows.";
244
244
  const INPUT_SCHEMA = {
245
245
  type: "object",
246
246
  properties: {
@@ -288,7 +288,7 @@ const INPUT_SCHEMA = {
288
288
  required: ["id"],
289
289
  additionalProperties: false
290
290
  };
291
- const SYSTEM_PROMPT = "read_document reads an attached or downloaded PDF/Word/Excel/PowerPoint document in batches. It returns a \"next\" cursor whenever the document is not finished: keep calling read_document with that cursor until the result has no \"next\", otherwise you have only seen part of the document. Read the text first and answer from it; a result that carries \"deferred\" means those units hold pictures that were not read yet. Fetch them with mode=\"images\" only when the answer depends on what they show, and tell the user the pictures have not been looked at when you answer without them. Never guess an id, and never claim you read a document you only read part of.";
291
+ const SYSTEM_PROMPT = "read_document reads an attached or downloaded PDF/Word/Excel/PowerPoint document in batches. It returns a \"next\" cursor whenever the document is not finished: keep calling read_document with that cursor until the result has no \"next\", otherwise you have only seen part of the document. Read the text first and answer from it; a result that carries \"deferred\" means those units hold pictures that were not read yet. Fetch them with mode=\"images\" only when the answer depends on what they show, and tell the user the pictures have not been looked at when you answer without them. Excel pictures are returned inline; do not skip them just because they are small. Never guess an id, and never claim you read a document you only read part of.";
292
292
  function toolError(e) {
293
293
  return {
294
294
  ok: false,
@@ -462,7 +462,7 @@ async function readXlsx(reader, bytes, from, mode, budget, signal) {
462
462
  sheet: flat[index].sheet,
463
463
  sheetName: flat[index].sheetName,
464
464
  row: flat[index].row
465
- }));
465
+ }), true);
466
466
  const stop = flat[taken.stopped];
467
467
  return {
468
468
  units: taken.units,
@@ -513,7 +513,7 @@ async function readPptx(reader, bytes, from, mode, budget, signal) {
513
513
  } } : {}
514
514
  };
515
515
  }
516
- function takeBlocks(blocks, start, mode, budget, signal, locate) {
516
+ function takeBlocks(blocks, start, mode, budget, signal, locate, inlineImages = false) {
517
517
  const units = [];
518
518
  const deferred = [];
519
519
  let chars = 0;
@@ -527,8 +527,8 @@ function takeBlocks(blocks, start, mode, budget, signal, locate) {
527
527
  skippedImages += 1;
528
528
  continue;
529
529
  }
530
- if (!(block.kind === "text" ? mode !== "images" : takesImage(mode, "illustration"))) {
531
- if (block.kind === "image" && defersImage(mode, "illustration")) deferred.push(locate(index));
530
+ if (!(block.kind === "text" ? mode !== "images" : inlineImages || takesImage(mode, "illustration"))) {
531
+ if (block.kind === "image" && !inlineImages && defersImage(mode, "illustration")) deferred.push(locate(index));
532
532
  continue;
533
533
  }
534
534
  const nextChars = chars + (block.kind === "text" ? block.text.length : 0);
@@ -575,6 +575,16 @@ interface NestedFrameRef {
575
575
  */
576
576
  interface PerceptionResult {
577
577
  nodes: readonly PerceivedNode[];
578
+ /**
579
+ * 读到的是哪一页(0.27.0 分册 22 FR-22.1):当前文档的绝对地址;`title` 为空则不带。
580
+ *
581
+ * 拿不到地址时**整个键不存在**,不塞空串(FR-22.8)。它是**读出来**的信息,
582
+ * 不是可填的目的地——SC-1 不受影响。
583
+ */
584
+ page?: {
585
+ url: string;
586
+ title?: string;
587
+ };
578
588
  /** 被跳过的帧及原因;调用方据此告警(FR-24.2 / FR-24.3) */
579
589
  frameNotes?: readonly FrameNote[];
580
590
  /** 本次范围内发现、可供外壳继续下钻的嵌套帧(分册 16 FR-16.1) */
@@ -720,6 +730,10 @@ declare class PagePerceptionPolicy {
720
730
  images: readonly PerceivedImage[];
721
731
  imagesOmitted: number;
722
732
  record: PerceptionRecord;
733
+ page?: {
734
+ url: string;
735
+ title?: string;
736
+ };
723
737
  }>;
724
738
  }
725
739
  //#endregion
@@ -1298,6 +1312,20 @@ interface PageActionOutcome {
1298
1312
  atEnd: boolean;
1299
1313
  movedBy: number;
1300
1314
  };
1315
+ /**
1316
+ * 动作使用的旧 ref 已不在,但按签名唯一恢复到同一元素时出现(0.27.0 分册 17)。
1317
+ * 只描述动作结果;不保证旧 ref 在后续调用中一直可用。
1318
+ */
1319
+ recovered?: boolean;
1320
+ /**
1321
+ * 本次成功动作引发的 DOM 变化摘要(0.27.0 分册 18)。
1322
+ * 没有可报告变化、失败、`noop` 或 `navigated` 时不带;状态文本最多 200 字符。
1323
+ */
1324
+ changes?: {
1325
+ added: number;
1326
+ removed: number;
1327
+ status?: string;
1328
+ };
1301
1329
  /** 失败原因(英文) */
1302
1330
  reason?: string;
1303
1331
  }
@@ -1624,6 +1652,7 @@ declare class TabWorksetPolicy {
1624
1652
  list(): Promise<WorksetTabView[]>;
1625
1653
  focus(handle: string): Promise<{
1626
1654
  focused: string;
1655
+ url?: string;
1627
1656
  }>;
1628
1657
  close(handle: string): Promise<{
1629
1658
  closed: string;
@@ -1667,7 +1696,7 @@ declare function createTabWorksetToolSource(options: TabWorksetToolSourceOptions
1667
1696
  * 第三段是最要紧的:模型若以为切换会让用户看到那一页,
1668
1697
  * 就会写出「我已经帮你打开了详情页」这种与事实不符的话。
1669
1698
  */
1670
- declare const TAB_WORKSET_SYSTEM_PROMPT = "You can work across several pages within one task.\n\n- `list_page_tabs` shows the pages available to you. The first one is the user's own page; you can read and act on it, but you can never close it.\n- `focus_page_tab` decides which page `perceive_page` and `act_on_page` talk to next. Element references are per-page: a reference from one page will be rejected on another, so perceive after every switch.\n- New pages only join this set when an action you took opened them. You cannot open a page by URL, and pages the user opens on their own are not yours to touch.\n- Close a detail page with `close_page_tab` once you have read what you needed. Leaving them open uses up the page budget and will eventually block new ones.\n\nSwitching pages does not change what the user sees. Their browser stays exactly where they left it, so never tell them you have \"opened\" or \"switched to\" a page for them.";
1699
+ declare const TAB_WORKSET_SYSTEM_PROMPT = "You can work across several pages within one task.\n\n- `list_page_tabs` shows the pages available to you, each with its current address. The first one is the user's own page; you can read and act on it, but you can never close it. When a task asks you to share a link to a page you are on, take that address from this list — you cannot type an address yourself.\n- `focus_page_tab` decides which page `perceive_page` and `act_on_page` talk to next. Element references are per-page: a reference from one page will be rejected on another, so perceive after every switch.\n- New pages only join this set when an action you took opened them. You cannot open a page by URL, and pages the user opens on their own are not yours to touch.\n- Close a detail page with `close_page_tab` once you have read what you needed. Leaving them open uses up the page budget and will eventually block new ones.\n\nSwitching pages does not change what the user sees. Their browser stays exactly where they left it, so never tell them you have \"opened\" or \"switched to\" a page for them.";
1671
1700
  //#endregion
1672
1701
  //#region src/downloads/types.d.ts
1673
1702
  /**
@@ -1941,7 +1970,8 @@ interface DocxDocumentContent {
1941
1970
  blocks: readonly DocumentBlock[];
1942
1971
  }
1943
1972
  /**
1944
- * xlsx → 逐表的行序列。图按 `xdr:twoCellAnchor` 的锚点行号插进行流。
1973
+ * xlsx → 逐表的行序列。图按标准 DrawingML 锚点插回:`twoCellAnchor` / `oneCellAnchor`
1974
+ * 用 `from` 行;`absoluteAnchor` 追加到表尾。0.27.0 起不按尺寸或跨列/跨行阈值过滤。
1945
1975
  * @experimental
1946
1976
  */
1947
1977
  interface XlsxDocumentReader {
package/dist/index.d.ts CHANGED
@@ -6,6 +6,6 @@ import { $ as ImageOmission, $n as UserProfileEntry, $r as readProfileEntries, $
6
6
  * Version of the published `@webskill/sdk` package, injected at build time.
7
7
  * @stable
8
8
  */
9
- declare const SDK_VERSION = "0.26.1";
9
+ declare const SDK_VERSION = "0.27.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
@@ -4,13 +4,13 @@ import { a as atomicWriteBinary, i as ATOMIC_TMP_SUFFIX_PATTERN, n as normalizeP
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-DpiP0GVH.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-BSwffz8P.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
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-0iiVPd5t.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-DLwJmmm-.js";
13
+ import { t as createWebSkillApi } from "./webSkillApi-C_7CTwtB.js";
14
14
 
15
15
  //#region ../core/src/fs/memoryFs.ts
16
16
  const ROOT = "/";
@@ -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.26.1";
1015
+ const SDK_VERSION = "0.27.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/node.js CHANGED
@@ -2,7 +2,7 @@ import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
2
2
  import { A as SKILL_MANIFEST_FILE, D as verifySkillSignature, M as buildManifest, O as MANIFEST_EXCLUDED_FILES, P as verifyManifest, b as parseSkillMarkdown, c as unzipWithLimits, f as SKILL_PACK_FILE, k as SKILLS_LOCKFILE, m as parseSkillPackManifest, o as readResponseWithLimit, p as exportSkills, s as resolveArchiveLimits, t as validateSkills, w as readSkillSignature, y as isValidSkillName } from "./skill-WSUDp6A1.js";
3
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-DpiP0GVH.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-BSwffz8P.js";
6
6
  import { f as SPREADSHEET_MIME_TYPE } from "./linkedDocument-0iiVPd5t.js";
7
7
  import { n as normalizeToolContent } from "./external-_ZRQe-V9.js";
8
8
  import { i as probeLlmCapabilities } from "./env-Bj1MI2Ww.js";
@@ -1,6 +1,6 @@
1
1
  import { t as WebSkillError } from "./errors-BDZNpC13.js";
2
2
  import { b as parseSkillMarkdown, i as buildCatalog, n as SkillDiscovery, t as validateSkills } from "./skill-WSUDp6A1.js";
3
- import { f as WebSkillRuntime } from "./approval-DpiP0GVH.js";
3
+ import { f as WebSkillRuntime } from "./approval-BSwffz8P.js";
4
4
 
5
5
  //#region ../runtime/src/facade/webSkillApi.ts
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webskill/sdk",
3
- "version": "0.26.1",
3
+ "version": "0.27.0",
4
4
  "description": "WebSkill — browser/Node agent skill runtime (skills, tools, MCP, governance, UI)",
5
5
  "license": "MIT",
6
6
  "type": "module",