@webskill/sdk 0.29.0 → 0.30.0-next.1

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/browser.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { G as FileStat, It as VerifyResult, K as FileSystemProvider, Lt as WebSkillError, N as ArchiveLimits, Ot as SkillsLockfile, Pt as UnsignedPolicy, S as UiBridge, St as SkillManifest, b as RenderResultRequest, c as InteractionResponse, jt as TrustedKeyStore, l as LlmClient, m as LlmStreamEvent, o as InteractionPolicy, p as LlmResponse, q as FileWriteStream, s as InteractionRequest, u as LlmCompleteInput, v as MemoryStore, vt as SkillInstallSource } from "./types-wKp3YBSM-D7w-ZbsB.js";
2
- import { $ as ImageOmission, B as ExternalToolSource, C as BridgeResponse, N as DocumentSurfaceHost, Pn as ToolResult, S as BridgeRequest, Sr as bridgeError, Yr as parseBridgeRequest, b as BridgeCapabilities, ct as LinkedDocumentReader, en as ScriptExecutionContext, jn as ToolDefinition, m as ApprovalScope, mr as WebSkillApi, sr as ViewerImageFact, tn as ScriptExecutor, ut as NetworkPolicy, z as ExternalSkillProvider } from "./index-Cngzg2WS.js";
3
- import { In as PerceptionScopeInput, K as DocxDocumentContent, Ln as PptxDocumentContent, Pn as PerceptionResult, Rn as PptxDocumentReader, Tn as PdfDocumentReader, Ut as NestedFrameRef, cn as PageActionRequest, dn as PageActionTarget, ii as XlsxDocumentReader, in as PageActionOutcome, jn as PerceptionCaptureOptions, kn as PerceivedNode, mn as PageAuditSink, nn as PageActionExecutor, q as DocxDocumentReader, ri as XlsxDocumentContent, si as XlsxTableReader, u as ConsentUi, un as PageActionScopeInput, xn as PagePerceptionReader, yn as PagePerceptionPolicy, yr as SubtreeRejection } from "./index-B5zHZDNA.js";
1
+ import { G as FileStat, It as VerifyResult, K as FileSystemProvider, Lt as WebSkillError, N as ArchiveLimits, Ot as SkillsLockfile, Pt as UnsignedPolicy, S as UiBridge, St as SkillManifest, b as RenderResultRequest, c as InteractionResponse, jt as TrustedKeyStore, l as LlmClient, m as LlmStreamEvent, o as InteractionPolicy, p as LlmResponse, q as FileWriteStream, s as InteractionRequest, u as LlmCompleteInput, v as MemoryStore, vt as SkillInstallSource } from "./types-wKp3YBSM-CSeFUL9R.js";
2
+ import { $ as ImageOmission, B as ExternalToolSource, C as BridgeResponse, N as DocumentSurfaceHost, Pn as ToolResult, S as BridgeRequest, Sr as bridgeError, Yr as parseBridgeRequest, b as BridgeCapabilities, ct as LinkedDocumentReader, en as ScriptExecutionContext, jn as ToolDefinition, m as ApprovalScope, mr as WebSkillApi, sr as ViewerImageFact, tn as ScriptExecutor, ut as NetworkPolicy, z as ExternalSkillProvider } from "./index-UbNuzd2a.js";
3
+ import { In as PerceptionScopeInput, K as DocxDocumentContent, Ln as PptxDocumentContent, Pn as PerceptionResult, Rn as PptxDocumentReader, Tn as PdfDocumentReader, Ut as NestedFrameRef, cn as PageActionRequest, dn as PageActionTarget, ii as XlsxDocumentReader, in as PageActionOutcome, jn as PerceptionCaptureOptions, kn as PerceivedNode, mn as PageAuditSink, nn as PageActionExecutor, q as DocxDocumentReader, ri as XlsxDocumentContent, si as XlsxTableReader, u as ConsentUi, un as PageActionScopeInput, xn as PagePerceptionReader, yn as PagePerceptionPolicy, yr as SubtreeRejection } from "./index-Cj2HedfL.js";
4
4
  //#region ../browser/dist/index.d.ts
5
5
  //#region src/fs/featureDetection.d.ts
6
6
  /** 检测当前环境是否可用 OPFS(navigator.storage.getDirectory) */
package/dist/browser.js CHANGED
@@ -7,7 +7,8 @@ import { _ as FsRunSnapshotStore, a as networkPolicyLibSource, c as bridgeError,
7
7
  import { a as GoogleGenAiClient, o as AnthropicClient, s as OpenAiCompatibleClient, t as MockLlmClient } from "./llm-eIQNO9tr.js";
8
8
  import { n as normalizeToolContent, t as mergeCatalogEntries } from "./external-_ZRQe-V9.js";
9
9
  import { t as createWebSkillApi } from "./webSkillApi-TeWPPFDn.js";
10
- import { A as frameSteps, D as SCROLL_DIRECTIONS, E as toActionFrameScopes, O as toFrameScopes, _ as defersImage, a as columnWidthToPixels, b as isPdfTextTrustworthy, c as isRangeTopLeft, d as rangeContains, f as readImageSize, k as frameLabel, l as parseCellAddress, n as EMU_PER_POINT, o as fitWithin, p as PDF_LARGE_IMAGE_RATIO, r as EMU_PER_TWIP$1, s as formatCellAddress, t as EMU_PER_PIXEL, u as parseCellRange, v as takesImage } from "./geometry-QmrkJw1_.js";
10
+ import { T as frameSteps, _ as defersImage, a as columnWidthToPixels, b as isPdfTextTrustworthy, c as isRangeTopLeft, d as rangeContains, f as readImageSize, l as parseCellAddress, n as EMU_PER_POINT, o as fitWithin, p as PDF_LARGE_IMAGE_RATIO, r as EMU_PER_TWIP$1, s as formatCellAddress, t as EMU_PER_PIXEL, u as parseCellRange, v as takesImage, w as frameLabel } from "./geometry-1xQbK4hB.js";
11
+ import { a as toFrameScopes, i as SCROLL_DIRECTIONS, r as toActionFrameScopes } from "./types-BXRIoabj.js";
11
12
  import { Unzip, UnzipInflate, zipSync } from "fflate";
12
13
  import { SaxesParser } from "saxes";
13
14
 
@@ -0,0 +1,88 @@
1
+ import { Bt as LIST_PAGE_TABS_TOOL, Jt as PAGE_ACTION_TOOL, Qt as PERCEIVE_PAGE_TOOL, jt as FOCUS_PAGE_TAB_TOOL, s as CLOSE_PAGE_TAB_TOOL } from "./index-Cj2HedfL.js";
2
+ import { A as PairConfirmResult, B as WebSocketLike, C as InvocationMeta, D as OriginsParams, E as Origin, F as PingResult, I as Principal, L as ProtocolVersion, M as PairStartParams, N as PairStartResult, O as PairApprovedParams, P as PingParams, R as ReadyParams, S as HumanControlParams, T as JsonRpcRequest, _ as ControllerPairingCode, a as AuthRenewParams, b as HelloParams, c as Base64Url, d as ControllerAuditEvent, f as ControllerDevice, g as ControllerPairingApproval, h as ControllerDeviceStore, i as AuthPresentResult, j as PairRejectedParams, k as PairConfirmParams, l as BoundedString, m as ControllerDeviceState, n as AuthChallengeResult, o as AuthRenewResult, p as ControllerDeviceOptions, r as AuthPresentParams, s as AuthRevokedParams, t as AuthChallengeParams, u as ByeParams, v as ControllerPairingRecord, w as IsoDateTime, x as HelloResult, y as ControllerWriteState, z as WebSocketConstructor } from "./types-DmcXN3qR-Dy7ZDstc.js";
3
+ //#region ../controller/dist/index.d.ts
4
+ //#region src/constants.d.ts
5
+ /** @stable */
6
+ declare const CONTROLLER_PROTOCOL_VERSION: "0.1";
7
+ /** @experimental */
8
+ type ControllerToolName = 'browser_status' | typeof PERCEIVE_PAGE_TOOL | typeof PAGE_ACTION_TOOL | typeof LIST_PAGE_TABS_TOOL | typeof FOCUS_PAGE_TAB_TOOL | typeof CLOSE_PAGE_TAB_TOOL;
9
+ /** @experimental */
10
+ declare const CONTROLLER_TOOL_NAMES: readonly ControllerToolName[];
11
+ interface ControllerProtocolLimits {
12
+ readonly maxMessageBytes: number;
13
+ readonly oversizeWindowMs: number;
14
+ readonly oversizeThreshold: number;
15
+ readonly invocationContextMaxBytes: number;
16
+ readonly pairingCodeTtlMaxMs: number;
17
+ readonly pairingAttemptsMax: number;
18
+ readonly deviceConfirmTimeoutMs: number;
19
+ readonly grantTtlMaxMs: number;
20
+ readonly heartbeatIntervalMs: number;
21
+ readonly heartbeatTimeoutMs: number;
22
+ readonly reconnectMaxDelayMs: number;
23
+ readonly localAuthorizationTimeoutMs: number;
24
+ readonly idempotencyCacheEntries: number;
25
+ readonly idempotencyCacheTtlMs: number;
26
+ }
27
+ /** @experimental */
28
+ declare const CONTROLLER_PROTOCOL_LIMITS: ControllerProtocolLimits;
29
+ //#endregion
30
+ //#region src/validate.d.ts
31
+ /** @experimental */
32
+ interface ControllerValidation {
33
+ readonly valid: boolean;
34
+ readonly errors: readonly string[];
35
+ }
36
+ /** @experimental */
37
+ declare const CONTROLLER_PROTOCOL_SCHEMA: Readonly<Record<string, unknown>>;
38
+ /** @experimental */
39
+ declare function validateControllerMessage(method: string, kind: 'params' | 'result', value: unknown): ControllerValidation;
40
+ //#endregion
41
+ //#region src/transport.d.ts
42
+ /** @experimental */
43
+ type ControllerRequestHandler = (method: string, params: unknown) => Promise<unknown> | unknown;
44
+ /** @experimental */
45
+ type ControllerNotificationHandler = (method: string, params: unknown) => void | Promise<void>;
46
+ /** @experimental */
47
+ type McpMessageHandler = (message: JsonRpcRequest) => void;
48
+ /** @experimental */
49
+ interface ControllerTransportOptions {
50
+ readonly url: string;
51
+ readonly socket?: WebSocketLike;
52
+ readonly WebSocket?: WebSocketConstructor;
53
+ readonly isAuthorized?: () => boolean;
54
+ readonly maxMessageBytes?: number;
55
+ readonly requestTimeoutMs?: number;
56
+ onControlRequest?: ControllerRequestHandler;
57
+ onControlNotification?: ControllerNotificationHandler;
58
+ onmessage?: McpMessageHandler;
59
+ onerror?: (error: Error) => void;
60
+ onclose?: () => void;
61
+ }
62
+ /** @experimental */
63
+ interface ControllerTransport {
64
+ readonly connected: boolean;
65
+ onControlRequest?: ControllerRequestHandler;
66
+ onControlNotification?: ControllerNotificationHandler;
67
+ onmessage?: McpMessageHandler;
68
+ onerror?: (error: Error) => void;
69
+ onclose?: () => void;
70
+ connect(): Promise<void>;
71
+ start(): Promise<void>;
72
+ request<T = unknown>(method: string, params?: unknown, timeoutMs?: number): Promise<T>;
73
+ notify(method: string, params?: unknown): Promise<void>;
74
+ send(message: JsonRpcRequest): Promise<void>;
75
+ close(code?: number, reason?: string): Promise<void>;
76
+ }
77
+ /** @experimental */
78
+ declare function createWebSocketControllerTransport(options: ControllerTransportOptions): ControllerTransport;
79
+ //#endregion
80
+ //#region src/device/crypto.d.ts
81
+ /** @experimental */
82
+ declare function instanceFingerprint(instanceId: string): Promise<string>;
83
+ //#endregion
84
+ //#region src/device/index.d.ts
85
+ /** @experimental */
86
+ declare function createControllerDevice(options: ControllerDeviceOptions): ControllerDevice;
87
+ //#endregion
88
+ export { type AuthChallengeParams, type AuthChallengeResult, type AuthPresentParams, type AuthPresentResult, type AuthRenewParams, type AuthRenewResult, type AuthRevokedParams, type Base64Url, type BoundedString, type ByeParams, CONTROLLER_PROTOCOL_LIMITS, CONTROLLER_PROTOCOL_SCHEMA, CONTROLLER_PROTOCOL_VERSION, CONTROLLER_TOOL_NAMES, type ControllerAuditEvent, type ControllerDevice, type ControllerDeviceOptions, type ControllerDeviceState, type ControllerDeviceStore, ControllerNotificationHandler, type ControllerPairingApproval, type ControllerPairingCode, type ControllerPairingRecord, type ControllerProtocolLimits, ControllerRequestHandler, type ControllerToolName, ControllerTransport, ControllerTransportOptions, ControllerValidation, type ControllerWriteState, type HelloParams, type HelloResult, type HumanControlParams, type InvocationMeta, type IsoDateTime, McpMessageHandler, type Origin, type OriginsParams, type PairApprovedParams, type PairConfirmParams, type PairConfirmResult, type PairRejectedParams, type PairStartParams, type PairStartResult, type PingParams, type PingResult, type Principal, type ProtocolVersion, type ReadyParams, createControllerDevice, createWebSocketControllerTransport, instanceFingerprint, validateControllerMessage };
@@ -0,0 +1,3 @@
1
+ import { a as createWebSocketControllerTransport, d as CONTROLLER_PROTOCOL_VERSION, f as CONTROLLER_TOOL_NAMES, o as CONTROLLER_PROTOCOL_SCHEMA, r as instanceFingerprint, s as validateControllerMessage, t as createControllerDevice, u as CONTROLLER_PROTOCOL_LIMITS } from "./device-DMUgqNzr.js";
2
+
3
+ export { CONTROLLER_PROTOCOL_LIMITS, CONTROLLER_PROTOCOL_SCHEMA, CONTROLLER_PROTOCOL_VERSION, CONTROLLER_TOOL_NAMES, createControllerDevice, createWebSocketControllerTransport, instanceFingerprint, validateControllerMessage };