@webskill/sdk 0.28.1 → 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/agent.d.ts +2 -2
- package/dist/agent.js +32 -766
- package/dist/{approval-5BmspsRi.js → approval-DnUytrkq.js} +6 -1
- package/dist/browser.d.ts +9 -9
- package/dist/browser.js +131 -38
- package/dist/controller.d.ts +88 -0
- package/dist/controller.js +3 -0
- package/dist/device-DMUgqNzr.js +1782 -0
- package/dist/{dist-CTsxblSD.js → dist-Ww6TChcf.js} +2 -2
- package/dist/{geometry-BXMPNuM6.js → geometry-1xQbK4hB.js} +14 -78
- package/dist/governance.d.ts +3 -3
- package/dist/{index-DJeYqzlE.d.ts → index-1ASrUwzn.d.ts} +2 -2
- package/dist/{index-CkauSvus.d.ts → index-Cj2HedfL.d.ts} +4 -3
- package/dist/{index-DU8sKyQq.d.ts → index-UbNuzd2a.d.ts} +4 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -6
- package/dist/{linkedDocument-0iiVPd5t.js → linkedDocument-GE-VV_Gj.js} +112 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/node.d.ts +3 -3
- package/dist/node.js +2 -2
- package/dist/{openUiLibrary-BnhYUlqY.js → openUiLibrary-BjRDYyTe.js} +1 -1
- package/dist/{skillVersionStore-S4_HJ_Fl-DzZM_UIw.d.ts → skillVersionStore-S4_HJ_Fl-5K8jrAg_.d.ts} +1 -1
- package/dist/testing.d.ts +88 -2
- package/dist/testing.js +1287 -1
- package/dist/toolSource-DMCTnSVg.js +743 -0
- package/dist/types-BXRIoabj.js +76 -0
- package/dist/types-DmcXN3qR-Dy7ZDstc.d.ts +265 -0
- package/dist/{types-wKp3YBSM-167azx1H.d.ts → types-wKp3YBSM-CSeFUL9R.d.ts} +3 -2
- package/dist/ui-react.css +2687 -0
- package/dist/ui-react.d.ts +1045 -5
- package/dist/ui-react.js +5878 -820
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +1 -1
- package/dist/{webSkillApi-rX2e3SVB.js → webSkillApi-TeWPPFDn.js} +1 -1
- package/package.json +18 -4
- package/dist/kind-Dc8x0HWz.js +0 -110
package/dist/testing.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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-wKp3YBSM-
|
|
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-wKp3YBSM-CSeFUL9R.js";
|
|
2
|
+
import { _ as ControllerPairingCode, d as ControllerAuditEvent, f as ControllerDevice } from "./types-DmcXN3qR-Dy7ZDstc.js";
|
|
2
3
|
import { a as loadGoogleConfigFromEnv, i as loadAnthropicConfigFromEnv, n as LlmEnvConfig, o as loadLlmConfigFromEnv, r as ProviderEnvConfig } from "./env-AK3cSMEA-Dli6QU5E.js";
|
|
3
4
|
//#region ../runtime/dist/testing.d.ts
|
|
4
5
|
//#region src/llm/mockLlmClient.d.ts
|
|
@@ -72,4 +73,89 @@ declare class MemoryArtifactStore implements ArtifactStore {
|
|
|
72
73
|
readArtifact(runId: string, path: string): Promise<Uint8Array>;
|
|
73
74
|
}
|
|
74
75
|
//#endregion
|
|
75
|
-
|
|
76
|
+
//#region ../controller/dist/testing.d.ts
|
|
77
|
+
//#region src/testing/referenceController.d.ts
|
|
78
|
+
interface ReferenceControllerOptions {
|
|
79
|
+
readonly instanceId?: string;
|
|
80
|
+
readonly controllerName?: string;
|
|
81
|
+
readonly allowedProtocolVersions?: readonly string[];
|
|
82
|
+
readonly excludedOrigins?: readonly string[];
|
|
83
|
+
readonly allowCodeReuse?: boolean;
|
|
84
|
+
readonly allowCrossSessionApproval?: boolean;
|
|
85
|
+
readonly allowUnauthenticatedApproval?: boolean;
|
|
86
|
+
readonly allowDeviceSubstitution?: boolean;
|
|
87
|
+
readonly omitPrincipal?: boolean;
|
|
88
|
+
readonly skipDeviceSignatureVerification?: boolean;
|
|
89
|
+
readonly ignoreReady?: boolean;
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/testing/conformance.d.ts
|
|
93
|
+
/** @experimental */
|
|
94
|
+
interface ControllerConformanceCheck {
|
|
95
|
+
readonly id: string;
|
|
96
|
+
readonly passed: boolean;
|
|
97
|
+
/** 未实际执行的条款;须同时保持 passed=false,并在 message 中说明原因。 */
|
|
98
|
+
readonly skipped?: boolean;
|
|
99
|
+
readonly message?: string;
|
|
100
|
+
}
|
|
101
|
+
/** @experimental */
|
|
102
|
+
interface ControllerConformanceReport {
|
|
103
|
+
readonly passed: boolean;
|
|
104
|
+
readonly checks: readonly ControllerConformanceCheck[];
|
|
105
|
+
}
|
|
106
|
+
/** @experimental */
|
|
107
|
+
interface ControllerConformanceFixtures {
|
|
108
|
+
readonly deviceName?: string;
|
|
109
|
+
readonly hostVersion?: string;
|
|
110
|
+
readonly principal?: string;
|
|
111
|
+
readonly startPairing?: () => ControllerPairingCode | Promise<ControllerPairingCode>;
|
|
112
|
+
readonly confirmPairing?: (accept: boolean) => void | Promise<void>;
|
|
113
|
+
readonly setHumanInControl?: (inControl: boolean) => void | Promise<void>;
|
|
114
|
+
readonly resolveAuthorization?: (outcome: 'approve' | 'deny' | 'timeout' | 'remember' | 'takeover', settled?: Promise<unknown>) => void | Promise<void>;
|
|
115
|
+
readonly prepareAuthorization?: (outcome: 'approve' | 'deny' | 'timeout' | 'remember' | 'takeover') => void | Promise<void>;
|
|
116
|
+
readonly toolArguments?: (tool: string, invocationId: string, callTool: (tool: string, args: Record<string, unknown>) => Promise<Record<string, unknown>>) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
117
|
+
readonly pageCounter?: () => number | Promise<number>;
|
|
118
|
+
readonly maxActiveWrites?: () => number | Promise<number>;
|
|
119
|
+
readonly setWriteDelayMs?: (delayMs: number) => void | Promise<void>;
|
|
120
|
+
readonly setOversizeRead?: (enabled: boolean) => void | Promise<void>;
|
|
121
|
+
readonly setAuditDelayMs?: (delayMs: number) => void | Promise<void>;
|
|
122
|
+
readonly failCompletionAudit?: (enabled: boolean) => void | Promise<void>;
|
|
123
|
+
readonly auditWarning?: () => boolean | Promise<boolean>;
|
|
124
|
+
readonly userError?: () => {
|
|
125
|
+
code: string;
|
|
126
|
+
message: string;
|
|
127
|
+
} | undefined | Promise<{
|
|
128
|
+
code: string;
|
|
129
|
+
message: string;
|
|
130
|
+
} | undefined>;
|
|
131
|
+
readonly interruptConnection?: () => void | Promise<void>;
|
|
132
|
+
readonly hasPairingRecord?: () => boolean | Promise<boolean>;
|
|
133
|
+
readonly auditEvents?: () => readonly ControllerAuditEvent[] | Promise<readonly ControllerAuditEvent[]>;
|
|
134
|
+
readonly approve?: (input: {
|
|
135
|
+
code: string;
|
|
136
|
+
sessionId?: string;
|
|
137
|
+
principal?: string;
|
|
138
|
+
authenticated?: boolean;
|
|
139
|
+
}) => void | Promise<void>;
|
|
140
|
+
readonly approveUnauthenticated?: (input: {
|
|
141
|
+
code: string;
|
|
142
|
+
sessionId?: string;
|
|
143
|
+
}) => void | Promise<void>;
|
|
144
|
+
readonly substituteDeviceKey?: (code: string) => void | Promise<void>;
|
|
145
|
+
readonly attemptInvalidCode?: (sessionId: string) => void | Promise<void>;
|
|
146
|
+
/** 仅在内部反例中注入故障;不改变生产设备的授权闸门。 */
|
|
147
|
+
readonly breakMcpGate?: (device: ControllerDevice) => void | Promise<void>;
|
|
148
|
+
}
|
|
149
|
+
/** @experimental */
|
|
150
|
+
interface ControllerConformanceOptions {
|
|
151
|
+
readonly role: 'controller' | 'device';
|
|
152
|
+
readonly url: string;
|
|
153
|
+
readonly device?: ControllerDevice;
|
|
154
|
+
readonly fixtures?: ControllerConformanceFixtures;
|
|
155
|
+
readonly only?: readonly string[];
|
|
156
|
+
readonly controllerOptions?: ReferenceControllerOptions;
|
|
157
|
+
}
|
|
158
|
+
/** @experimental */
|
|
159
|
+
declare function runControllerConformance(options: ControllerConformanceOptions): Promise<ControllerConformanceReport>;
|
|
160
|
+
//#endregion
|
|
161
|
+
export { type ControllerConformanceCheck, type ControllerConformanceFixtures, type ControllerConformanceOptions, type ControllerConformanceReport, InMemoryStore, type LlmEnvConfig, MemoryArtifactStore, MockLlmClient, type MockLlmHandler, type MockLlmQueueItem, type MockUiAnswer, MockUiBridge, type ProviderEnvConfig, loadAnthropicConfigFromEnv, loadGoogleConfigFromEnv, loadLlmConfigFromEnv, runControllerConformance };
|