@aperant/framework 0.8.4 → 0.8.7
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/CHANGELOG.md +185 -0
- package/agents/apt-planner.md +34 -3
- package/dist/cli/commands/coverage-check.d.mts.map +1 -1
- package/dist/cli/commands/coverage-check.mjs +74 -7
- package/dist/cli/commands/coverage-check.mjs.map +1 -1
- package/dist/cli/commands/detect-runtime.d.mts.map +1 -1
- package/dist/cli/commands/detect-runtime.mjs +18 -12
- package/dist/cli/commands/detect-runtime.mjs.map +1 -1
- package/dist/cli/coverage-check/user-outcomes.d.mts +84 -0
- package/dist/cli/coverage-check/user-outcomes.d.mts.map +1 -0
- package/dist/cli/coverage-check/user-outcomes.mjs +265 -0
- package/dist/cli/coverage-check/user-outcomes.mjs.map +1 -0
- package/dist/cli/host/detect.mjs +1 -1
- package/dist/cli/host/detect.mjs.map +1 -1
- package/dist/cli/install/install-from-source.mjs +3 -3
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +2 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/install/manifest.d.mts +13 -0
- package/dist/cli/install/manifest.d.mts.map +1 -1
- package/dist/cli/install/manifest.mjs +5 -0
- package/dist/cli/install/manifest.mjs.map +1 -1
- package/dist/cli/install/pipeline.d.mts +15 -0
- package/dist/cli/install/pipeline.d.mts.map +1 -1
- package/dist/cli/install/pipeline.mjs +27 -0
- package/dist/cli/install/pipeline.mjs.map +1 -1
- package/dist/cli/install/transforms/codex.d.mts +1 -1
- package/dist/cli/install/transforms/codex.d.mts.map +1 -1
- package/dist/cli/install/transforms/codex.mjs +43 -2
- package/dist/cli/install/transforms/codex.mjs.map +1 -1
- package/dist/cli/install/version-header.d.mts.map +1 -1
- package/dist/cli/install/version-header.mjs +7 -1
- package/dist/cli/install/version-header.mjs.map +1 -1
- package/dist/cli/verify-proof/idl/index.d.mts +1 -1
- package/dist/cli/verify-proof/idl/index.mjs +7 -8
- package/dist/cli/verify-proof/idl/index.mjs.map +1 -1
- package/dist/cli/verify-proof/idl/types.d.ts +5 -4
- package/dist/cli/verify-proof/idl/types.d.ts.map +1 -1
- package/dist/cli/verify-proof/idl/types.js +4 -3
- package/dist/cli/verify-proof/idl/types.js.map +1 -1
- package/dist/cli/verify-proof/resolver.d.mts +63 -1
- package/dist/cli/verify-proof/resolver.d.mts.map +1 -1
- package/dist/cli/verify-proof/resolver.mjs +164 -4
- package/dist/cli/verify-proof/resolver.mjs.map +1 -1
- package/dist/cli/verify-proof/runtime-detect.d.mts +6 -3
- package/dist/cli/verify-proof/runtime-detect.d.mts.map +1 -1
- package/dist/cli/verify-proof/runtime-detect.mjs +104 -11
- package/dist/cli/verify-proof/runtime-detect.mjs.map +1 -1
- package/dist/cli/verify-proof/trust.d.mts +1 -1
- package/dist/cli/verify-proof/trust.d.mts.map +1 -1
- package/dist/cli/verify-proof/trust.mjs +1 -1
- package/dist/driver-sdk/conformance.d.ts +41 -0
- package/dist/driver-sdk/conformance.d.ts.map +1 -0
- package/dist/driver-sdk/conformance.js +123 -0
- package/dist/driver-sdk/conformance.js.map +1 -0
- package/dist/driver-sdk/errors.d.ts +75 -0
- package/dist/driver-sdk/errors.d.ts.map +1 -0
- package/dist/driver-sdk/errors.js +80 -0
- package/dist/driver-sdk/errors.js.map +1 -0
- package/dist/driver-sdk/idl.d.ts +221 -0
- package/dist/driver-sdk/idl.d.ts.map +1 -0
- package/dist/driver-sdk/idl.js +140 -0
- package/dist/driver-sdk/idl.js.map +1 -0
- package/dist/driver-sdk/index.d.ts +28 -0
- package/dist/driver-sdk/index.d.ts.map +1 -0
- package/dist/driver-sdk/index.js +28 -0
- package/dist/driver-sdk/index.js.map +1 -0
- package/dist/driver-sdk/manifest.d.ts +93 -0
- package/dist/driver-sdk/manifest.d.ts.map +1 -0
- package/dist/driver-sdk/manifest.js +12 -0
- package/dist/driver-sdk/manifest.js.map +1 -0
- package/dist/driver-sdk/retry.d.ts +33 -0
- package/dist/driver-sdk/retry.d.ts.map +1 -0
- package/dist/driver-sdk/retry.js +50 -0
- package/dist/driver-sdk/retry.js.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +2 -1
- package/dist/plugin/agents/apt-planner.md +34 -3
- package/dist/plugin/skills/apt-plan/SKILL.md +50 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +1 -1
- package/dist/plugin/skills/apt-research/SKILL.md +526 -0
- package/dist/plugin/skills/apt-research/appendices/budget-loop.md +397 -0
- package/dist/plugin/skills/apt-research/appendices/claim-graph-schema.md +206 -0
- package/dist/plugin/skills/apt-research/appendices/domain-tools.md +236 -0
- package/dist/plugin/skills/apt-spar/SKILL.md +19 -7
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +41 -2
- package/dist/schemas/quick-task.d.ts +17 -17
- package/drivers/.gitkeep +0 -0
- package/drivers/api/README.md +40 -0
- package/drivers/api/driver.mjs +59 -0
- package/drivers/api/manifest.json +26 -0
- package/drivers/browser/README.md +105 -0
- package/drivers/browser/driver.mjs +134 -0
- package/drivers/browser/manifest.json +35 -0
- package/drivers/cli/README.md +44 -0
- package/drivers/cli/driver.mjs +62 -0
- package/drivers/cli/manifest.json +28 -0
- package/drivers/electron/README.md +64 -0
- package/drivers/electron/driver.mjs +87 -0
- package/drivers/electron/manifest.json +37 -0
- package/package.json +7 -3
- package/skills/apt-plan/SKILL.md +50 -0
- package/skills/apt-planner.md +16 -0
- package/skills/apt-pr-review/SKILL.md +1 -1
- package/skills/apt-research/SKILL.md +526 -0
- package/skills/apt-research/appendices/budget-loop.md +397 -0
- package/skills/apt-research/appendices/claim-graph-schema.md +206 -0
- package/skills/apt-research/appendices/domain-tools.md +236 -0
- package/skills/apt-spar/SKILL.md +19 -7
- package/skills/apt-verify-proof/SKILL.md +41 -2
- package/src/cli/commands/coverage-check.mjs +126 -44
- package/src/cli/commands/detect-runtime.mjs +23 -14
- package/src/cli/coverage-check/user-outcomes.mjs +273 -0
- package/src/cli/host/detect.mjs +1 -1
- package/src/cli/install/install-from-source.mjs +3 -3
- package/src/cli/install/legacy-paths.mjs +2 -0
- package/src/cli/install/manifest.mjs +5 -0
- package/src/cli/install/pipeline.mjs +28 -0
- package/src/cli/install/transforms/codex.mjs +51 -2
- package/src/cli/install/version-header.mjs +7 -1
- package/src/cli/verify-proof/idl/index.mjs +7 -8
- package/src/cli/verify-proof/idl/types.ts +5 -4
- package/src/cli/verify-proof/manifest-schema.json +2 -1
- package/src/cli/verify-proof/resolver.mjs +171 -4
- package/src/cli/verify-proof/runtime-detect.mjs +99 -10
- package/src/cli/verify-proof/trust.mjs +1 -1
- package/templates/proof-verification.md +32 -3
- package/workflows/verify-proof.md +78 -9
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* idl.ts — verify-proof IDL v1 verb definitions + arg/return shapes.
|
|
3
|
+
*
|
|
4
|
+
* Wire contract per ID-01: workflow prose, the resolver, verification.json,
|
|
5
|
+
* and third-party drivers all refer to IDL verbs (`click`, `screenshot`,
|
|
6
|
+
* `assert_visible`, ...) and NEVER to concrete MCP tool names. The mapping
|
|
7
|
+
* from a verb to a transport (mcp_server_id / local_command / http_endpoint /
|
|
8
|
+
* builtin) lives in the driver's manifest + driver.mjs, not here.
|
|
9
|
+
*
|
|
10
|
+
* Five verb families:
|
|
11
|
+
* - lifecycle: launch / teardown
|
|
12
|
+
* - interaction: click / type / key / navigate / select / upload_file /
|
|
13
|
+
* drag_drop / swipe / switch_context / execute_js / wait_for_event /
|
|
14
|
+
* wait_for_idle
|
|
15
|
+
* - evidence: screenshot / record_video / capture_logs / dump_state /
|
|
16
|
+
* dom_dump
|
|
17
|
+
* - assertion: assert_visible / assert_text / assert_output /
|
|
18
|
+
* assert_network
|
|
19
|
+
* - async: trigger / await_signal
|
|
20
|
+
*/
|
|
21
|
+
/** How a driver locates a UI element. `screen_coord` is last-resort. */
|
|
22
|
+
export type TargetKind = 'aria_role' | 'test_id' | 'css' | 'xpath' | 'screen_coord';
|
|
23
|
+
/** A locator the driver translates into a transport-specific selector. */
|
|
24
|
+
export interface Target {
|
|
25
|
+
readonly kind: TargetKind;
|
|
26
|
+
readonly value: string;
|
|
27
|
+
}
|
|
28
|
+
export interface LaunchArgs {
|
|
29
|
+
readonly entrypoint?: string;
|
|
30
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
31
|
+
readonly cwd?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface Handle {
|
|
34
|
+
readonly handle_id: string;
|
|
35
|
+
}
|
|
36
|
+
export interface TeardownArgs {
|
|
37
|
+
readonly handle: Handle;
|
|
38
|
+
}
|
|
39
|
+
export interface ClickArgs {
|
|
40
|
+
readonly target: Target;
|
|
41
|
+
readonly button?: 'left' | 'right' | 'middle';
|
|
42
|
+
}
|
|
43
|
+
export interface TypeArgs {
|
|
44
|
+
readonly target: Target;
|
|
45
|
+
readonly text: string;
|
|
46
|
+
readonly clear_first?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface KeyArgs {
|
|
49
|
+
readonly target?: Target;
|
|
50
|
+
readonly key: string;
|
|
51
|
+
}
|
|
52
|
+
export interface NavigateArgs {
|
|
53
|
+
readonly url: string;
|
|
54
|
+
}
|
|
55
|
+
export interface SelectArgs {
|
|
56
|
+
readonly target: Target;
|
|
57
|
+
readonly value: string;
|
|
58
|
+
}
|
|
59
|
+
export interface UploadFileArgs {
|
|
60
|
+
readonly target: Target;
|
|
61
|
+
readonly file_path: string;
|
|
62
|
+
}
|
|
63
|
+
export interface DragDropArgs {
|
|
64
|
+
readonly source: Target;
|
|
65
|
+
readonly destination: Target;
|
|
66
|
+
}
|
|
67
|
+
export interface SwipeArgs {
|
|
68
|
+
readonly target: Target;
|
|
69
|
+
readonly direction: 'up' | 'down' | 'left' | 'right';
|
|
70
|
+
}
|
|
71
|
+
export interface SwitchContextArgs {
|
|
72
|
+
readonly handle: Handle;
|
|
73
|
+
}
|
|
74
|
+
export interface ExecuteJsArgs {
|
|
75
|
+
readonly script: string;
|
|
76
|
+
/** Optional args passed positionally into the script. */
|
|
77
|
+
readonly args?: readonly unknown[];
|
|
78
|
+
}
|
|
79
|
+
export interface WaitForEventArgs {
|
|
80
|
+
readonly event: string;
|
|
81
|
+
readonly timeout_ms?: number;
|
|
82
|
+
}
|
|
83
|
+
export interface WaitForIdleArgs {
|
|
84
|
+
readonly timeout_ms?: number;
|
|
85
|
+
}
|
|
86
|
+
export interface ScreenshotArgs {
|
|
87
|
+
readonly target?: Target;
|
|
88
|
+
readonly output_path: string;
|
|
89
|
+
}
|
|
90
|
+
export interface RecordVideoArgs {
|
|
91
|
+
readonly duration_seconds: number;
|
|
92
|
+
readonly fps?: number;
|
|
93
|
+
readonly output_path: string;
|
|
94
|
+
}
|
|
95
|
+
export interface CaptureLogsArgs {
|
|
96
|
+
readonly source: 'console' | 'stdout' | 'stderr' | 'all';
|
|
97
|
+
readonly output_path?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface DumpStateArgs {
|
|
100
|
+
readonly output_path: string;
|
|
101
|
+
}
|
|
102
|
+
export interface DomDumpArgs {
|
|
103
|
+
readonly output_path: string;
|
|
104
|
+
}
|
|
105
|
+
export interface AssertVisibleArgs {
|
|
106
|
+
readonly target: Target;
|
|
107
|
+
}
|
|
108
|
+
export interface AssertTextArgs {
|
|
109
|
+
readonly target: Target;
|
|
110
|
+
readonly expected: string;
|
|
111
|
+
readonly match?: 'exact' | 'contains' | 'regex';
|
|
112
|
+
}
|
|
113
|
+
export interface AssertOutputArgs {
|
|
114
|
+
readonly source: 'stdout' | 'stderr' | 'console';
|
|
115
|
+
readonly expected: string;
|
|
116
|
+
readonly match?: 'exact' | 'contains' | 'regex';
|
|
117
|
+
}
|
|
118
|
+
export interface AssertNetworkArgs {
|
|
119
|
+
readonly url_pattern: string;
|
|
120
|
+
readonly method?: string;
|
|
121
|
+
readonly expected_status?: number;
|
|
122
|
+
}
|
|
123
|
+
export interface TriggerArgs {
|
|
124
|
+
readonly event: string;
|
|
125
|
+
readonly payload?: unknown;
|
|
126
|
+
}
|
|
127
|
+
export interface AwaitSignalArgs {
|
|
128
|
+
readonly signal: string;
|
|
129
|
+
readonly timeout_ms?: number;
|
|
130
|
+
}
|
|
131
|
+
export interface VerbResult {
|
|
132
|
+
readonly status: 'success' | 'fail' | 'skip';
|
|
133
|
+
readonly evidence_paths: readonly string[];
|
|
134
|
+
readonly duration_ms: number;
|
|
135
|
+
readonly retry_count: number;
|
|
136
|
+
readonly error?: string;
|
|
137
|
+
}
|
|
138
|
+
/** Lifecycle verbs. */
|
|
139
|
+
export declare const LIFECYCLE_VERBS: readonly ["launch", "teardown"];
|
|
140
|
+
/** Interaction verbs. */
|
|
141
|
+
export declare const INTERACTION_VERBS: readonly ["click", "type", "key", "navigate", "select", "upload_file", "drag_drop", "swipe", "switch_context", "execute_js", "wait_for_event", "wait_for_idle"];
|
|
142
|
+
/** Evidence verbs. */
|
|
143
|
+
export declare const EVIDENCE_VERBS: readonly ["screenshot", "record_video", "capture_logs", "dump_state", "dom_dump"];
|
|
144
|
+
/** Assertion verbs. */
|
|
145
|
+
export declare const ASSERTION_VERBS: readonly ["assert_visible", "assert_text", "assert_output", "assert_network"];
|
|
146
|
+
/** Async verbs. */
|
|
147
|
+
export declare const ASYNC_VERBS: readonly ["trigger", "await_signal"];
|
|
148
|
+
/** Every IDL v1 verb name, flat array — the canonical list. */
|
|
149
|
+
export declare const IDL_VERB_NAMES: readonly string[];
|
|
150
|
+
/** The union type of every verb name. */
|
|
151
|
+
export type IdlVerbName = (typeof LIFECYCLE_VERBS)[number] | (typeof INTERACTION_VERBS)[number] | (typeof EVIDENCE_VERBS)[number] | (typeof ASSERTION_VERBS)[number] | (typeof ASYNC_VERBS)[number];
|
|
152
|
+
/**
|
|
153
|
+
* Per-verb arg metadata. `required` lists keys that MUST be present on the
|
|
154
|
+
* args object; `optional` lists keys that MAY be present. Bundled drivers
|
|
155
|
+
* and third-party drivers both consume this through validateVerbArgs() so
|
|
156
|
+
* the SDK is the single source of truth (ID-04).
|
|
157
|
+
*
|
|
158
|
+
* Frozen so consumers don't mutate the registry by accident.
|
|
159
|
+
*/
|
|
160
|
+
export declare const IDL_VERB_ARGS: Readonly<Record<string, {
|
|
161
|
+
readonly required: readonly string[];
|
|
162
|
+
readonly optional: readonly string[];
|
|
163
|
+
}>>;
|
|
164
|
+
/**
|
|
165
|
+
* VerbResult return-shape predicate. Drivers MUST return an object with
|
|
166
|
+
* `status` ∈ {success,fail,skip}, `evidence_paths` (array), `duration_ms`
|
|
167
|
+
* (number), and `retry_count` (number). The conformance kit + framework
|
|
168
|
+
* resolver call this to validate runtime return shapes.
|
|
169
|
+
*/
|
|
170
|
+
export declare function isVerbResult(value: unknown): boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Validate a verb's args object against the IDL_VERB_ARGS registry. Returns
|
|
173
|
+
* `{valid: true}` when every required key is present; otherwise returns
|
|
174
|
+
* `{valid: false, missing: [...keys]}` where `missing` includes the keys
|
|
175
|
+
* that were absent (or `['unknown verb: <name>']` for unknown verbs).
|
|
176
|
+
*/
|
|
177
|
+
export declare function validateVerbArgs(verb: string, args: unknown): {
|
|
178
|
+
valid: true;
|
|
179
|
+
} | {
|
|
180
|
+
valid: false;
|
|
181
|
+
missing: string[];
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Driver-shaped interface — a driver exports a subset of these functions
|
|
185
|
+
* keyed by IDL verb name. The resolver introspects this surface to validate
|
|
186
|
+
* `manifest.capabilities[]` matches the runtime exports.
|
|
187
|
+
*
|
|
188
|
+
* Every method is async + returns VerbResult. Drivers MAY omit verbs they
|
|
189
|
+
* don't implement — the manifest's `capabilities[]` array is the source of
|
|
190
|
+
* truth for what each driver claims.
|
|
191
|
+
*/
|
|
192
|
+
export interface DriverModule {
|
|
193
|
+
readonly launch?: (args: LaunchArgs) => Promise<VerbResult & {
|
|
194
|
+
handle?: Handle;
|
|
195
|
+
}>;
|
|
196
|
+
readonly teardown?: (args: TeardownArgs) => Promise<VerbResult>;
|
|
197
|
+
readonly click?: (args: ClickArgs) => Promise<VerbResult>;
|
|
198
|
+
readonly type?: (args: TypeArgs) => Promise<VerbResult>;
|
|
199
|
+
readonly key?: (args: KeyArgs) => Promise<VerbResult>;
|
|
200
|
+
readonly navigate?: (args: NavigateArgs) => Promise<VerbResult>;
|
|
201
|
+
readonly select?: (args: SelectArgs) => Promise<VerbResult>;
|
|
202
|
+
readonly upload_file?: (args: UploadFileArgs) => Promise<VerbResult>;
|
|
203
|
+
readonly drag_drop?: (args: DragDropArgs) => Promise<VerbResult>;
|
|
204
|
+
readonly swipe?: (args: SwipeArgs) => Promise<VerbResult>;
|
|
205
|
+
readonly switch_context?: (args: SwitchContextArgs) => Promise<VerbResult>;
|
|
206
|
+
readonly execute_js?: (args: ExecuteJsArgs) => Promise<VerbResult>;
|
|
207
|
+
readonly wait_for_event?: (args: WaitForEventArgs) => Promise<VerbResult>;
|
|
208
|
+
readonly wait_for_idle?: (args: WaitForIdleArgs) => Promise<VerbResult>;
|
|
209
|
+
readonly screenshot?: (args: ScreenshotArgs) => Promise<VerbResult>;
|
|
210
|
+
readonly record_video?: (args: RecordVideoArgs) => Promise<VerbResult>;
|
|
211
|
+
readonly capture_logs?: (args: CaptureLogsArgs) => Promise<VerbResult>;
|
|
212
|
+
readonly dump_state?: (args: DumpStateArgs) => Promise<VerbResult>;
|
|
213
|
+
readonly dom_dump?: (args: DomDumpArgs) => Promise<VerbResult>;
|
|
214
|
+
readonly assert_visible?: (args: AssertVisibleArgs) => Promise<VerbResult>;
|
|
215
|
+
readonly assert_text?: (args: AssertTextArgs) => Promise<VerbResult>;
|
|
216
|
+
readonly assert_output?: (args: AssertOutputArgs) => Promise<VerbResult>;
|
|
217
|
+
readonly assert_network?: (args: AssertNetworkArgs) => Promise<VerbResult>;
|
|
218
|
+
readonly trigger?: (args: TriggerArgs) => Promise<VerbResult>;
|
|
219
|
+
readonly await_signal?: (args: Await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AA;IACpE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IACxE,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IAC1E,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IAC7D,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;CACtE"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* idl.ts — verify-proof IDL v1 verb definitions + arg/return shapes.
|
|
3
|
+
*
|
|
4
|
+
* Wire contract per ID-01: workflow prose, the resolver, verification.json,
|
|
5
|
+
* and third-party drivers all refer to IDL verbs (`click`, `screenshot`,
|
|
6
|
+
* `assert_visible`, ...) and NEVER to concrete MCP tool names. The mapping
|
|
7
|
+
* from a verb to a transport (mcp_server_id / local_command / http_endpoint /
|
|
8
|
+
* builtin) lives in the driver's manifest + driver.mjs, not here.
|
|
9
|
+
*
|
|
10
|
+
* Five verb families:
|
|
11
|
+
* - lifecycle: launch / teardown
|
|
12
|
+
* - interaction: click / type / key / navigate / select / upload_file /
|
|
13
|
+
* drag_drop / swipe / switch_context / execute_js / wait_for_event /
|
|
14
|
+
* wait_for_idle
|
|
15
|
+
* - evidence: screenshot / record_video / capture_logs / dump_state /
|
|
16
|
+
* dom_dump
|
|
17
|
+
* - assertion: assert_visible / assert_text / assert_output /
|
|
18
|
+
* assert_network
|
|
19
|
+
* - async: trigger / await_signal
|
|
20
|
+
*/
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
// Runtime registry — the verb names IDL v1 ships, by family.
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
/** Lifecycle verbs. */
|
|
25
|
+
export const LIFECYCLE_VERBS = ['launch', 'teardown'];
|
|
26
|
+
/** Interaction verbs. */
|
|
27
|
+
export const INTERACTION_VERBS = [
|
|
28
|
+
'click',
|
|
29
|
+
'type',
|
|
30
|
+
'key',
|
|
31
|
+
'navigate',
|
|
32
|
+
'select',
|
|
33
|
+
'upload_file',
|
|
34
|
+
'drag_drop',
|
|
35
|
+
'swipe',
|
|
36
|
+
'switch_context',
|
|
37
|
+
'execute_js',
|
|
38
|
+
'wait_for_event',
|
|
39
|
+
'wait_for_idle',
|
|
40
|
+
];
|
|
41
|
+
/** Evidence verbs. */
|
|
42
|
+
export const EVIDENCE_VERBS = [
|
|
43
|
+
'screenshot',
|
|
44
|
+
'record_video',
|
|
45
|
+
'capture_logs',
|
|
46
|
+
'dump_state',
|
|
47
|
+
'dom_dump',
|
|
48
|
+
];
|
|
49
|
+
/** Assertion verbs. */
|
|
50
|
+
export const ASSERTION_VERBS = [
|
|
51
|
+
'assert_visible',
|
|
52
|
+
'assert_text',
|
|
53
|
+
'assert_output',
|
|
54
|
+
'assert_network',
|
|
55
|
+
];
|
|
56
|
+
/** Async verbs. */
|
|
57
|
+
export const ASYNC_VERBS = ['trigger', 'await_signal'];
|
|
58
|
+
/** Every IDL v1 verb name, flat array — the canonical list. */
|
|
59
|
+
export const IDL_VERB_NAMES = [
|
|
60
|
+
...LIFECYCLE_VERBS,
|
|
61
|
+
...INTERACTION_VERBS,
|
|
62
|
+
...EVIDENCE_VERBS,
|
|
63
|
+
...ASSERTION_VERBS,
|
|
64
|
+
...ASYNC_VERBS,
|
|
65
|
+
];
|
|
66
|
+
/**
|
|
67
|
+
* Per-verb arg metadata. `required` lists keys that MUST be present on the
|
|
68
|
+
* args object; `optional` lists keys that MAY be present. Bundled drivers
|
|
69
|
+
* and third-party drivers both consume this through validateVerbArgs() so
|
|
70
|
+
* the SDK is the single source of truth (ID-04).
|
|
71
|
+
*
|
|
72
|
+
* Frozen so consumers don't mutate the registry by accident.
|
|
73
|
+
*/
|
|
74
|
+
export const IDL_VERB_ARGS = Object.freeze({
|
|
75
|
+
launch: { required: [], optional: ['entrypoint', 'env', 'cwd'] },
|
|
76
|
+
teardown: { required: ['handle'], optional: [] },
|
|
77
|
+
click: { required: ['target'], optional: ['button'] },
|
|
78
|
+
type: { required: ['target', 'text'], optional: ['clear_first'] },
|
|
79
|
+
key: { required: ['key'], optional: ['target'] },
|
|
80
|
+
navigate: { required: ['url'], optional: [] },
|
|
81
|
+
select: { required: ['target', 'value'], optional: [] },
|
|
82
|
+
upload_file: { required: ['target', 'file_path'], optional: [] },
|
|
83
|
+
drag_drop: { required: ['source', 'destination'], optional: [] },
|
|
84
|
+
swipe: { required: ['target', 'direction'], optional: [] },
|
|
85
|
+
switch_context: { required: ['handle'], optional: [] },
|
|
86
|
+
execute_js: { required: ['script'], optional: ['args'] },
|
|
87
|
+
wait_for_event: { required: ['event'], optional: ['timeout_ms'] },
|
|
88
|
+
wait_for_idle: { required: [], optional: ['timeout_ms'] },
|
|
89
|
+
screenshot: { required: ['output_path'], optional: ['target'] },
|
|
90
|
+
record_video: { required: ['duration_seconds', 'output_path'], optional: ['fps'] },
|
|
91
|
+
capture_logs: { required: ['source'], optional: ['output_path'] },
|
|
92
|
+
dump_state: { required: ['output_path'], optional: [] },
|
|
93
|
+
dom_dump: { required: ['output_path'], optional: [] },
|
|
94
|
+
assert_visible: { required: ['target'], optional: [] },
|
|
95
|
+
assert_text: { required: ['target', 'expected'], optional: ['match'] },
|
|
96
|
+
assert_output: { required: ['source', 'expected'], optional: ['match'] },
|
|
97
|
+
assert_network: { required: ['url_pattern'], optional: ['method', 'expected_status'] },
|
|
98
|
+
trigger: { required: ['event'], optional: ['payload'] },
|
|
99
|
+
await_signal: { required: ['signal'], optional: ['timeout_ms'] },
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* VerbResult return-shape predicate. Drivers MUST return an object with
|
|
103
|
+
* `status` ∈ {success,fail,skip}, `evidence_paths` (array), `duration_ms`
|
|
104
|
+
* (number), and `retry_count` (number). The conformance kit + framework
|
|
105
|
+
* resolver call this to validate runtime return shapes.
|
|
106
|
+
*/
|
|
107
|
+
export function isVerbResult(value) {
|
|
108
|
+
if (value === null || typeof value !== 'object')
|
|
109
|
+
return false;
|
|
110
|
+
const v = value;
|
|
111
|
+
if (v.status !== 'success' && v.status !== 'fail' && v.status !== 'skip')
|
|
112
|
+
return false;
|
|
113
|
+
if (!Array.isArray(v.evidence_paths))
|
|
114
|
+
return false;
|
|
115
|
+
if (typeof v.duration_ms !== 'number')
|
|
116
|
+
return false;
|
|
117
|
+
if (typeof v.retry_count !== 'number')
|
|
118
|
+
return false;
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Validate a verb's args object against the IDL_VERB_ARGS registry. Returns
|
|
123
|
+
* `{valid: true}` when every required key is present; otherwise returns
|
|
124
|
+
* `{valid: false, missing: [...keys]}` where `missing` includes the keys
|
|
125
|
+
* that were absent (or `['unknown verb: <name>']` for unknown verbs).
|
|
126
|
+
*/
|
|
127
|
+
export function validateVerbArgs(verb, args) {
|
|
128
|
+
const meta = IDL_VERB_ARGS[verb];
|
|
129
|
+
if (meta === undefined)
|
|
130
|
+
return { valid: false, missing: [`unknown verb: ${verb}`] };
|
|
131
|
+
if (args === null || typeof args !== 'object' || Array.isArray(args)) {
|
|
132
|
+
return { valid: false, missing: [...meta.required] };
|
|
133
|
+
}
|
|
134
|
+
const obj = args;
|
|
135
|
+
const missing = meta.required.filter((k) => !(k in obj));
|
|
136
|
+
if (missing.length === 0)
|
|
137
|
+
return { valid: true };
|
|
138
|
+
return { valid: false, missing: [...missing] };
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=idl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idl.js","sourceRoot":"","sources":["../../src/driver-sdk/idl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;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ant/framework@0.8.5).
|
|
3
|
+
*
|
|
4
|
+
* Originally shipped as the standalone `@aperant/driver-sdk` package; the
|
|
5
|
+
* 0.8.4 publish failed because workspace:* rewrote to an unpublished
|
|
6
|
+
* 0.1.0 spec, leaving framework consumers with a 404. The 0.8.5 inline
|
|
7
|
+
* folds 875 LOC of zero-dep SDK into the framework tarball; the
|
|
8
|
+
* subdirectory boundary is enforced by __tests__/import-direction.test.ts
|
|
9
|
+
* so re-extraction stays mechanical if/when a real third-party driver
|
|
10
|
+
* author asks for a standalone install.
|
|
11
|
+
*
|
|
12
|
+
* Framework consumers import these symbols via the
|
|
13
|
+
* `@aperant/framework/driver-sdk` subpath export (declared in
|
|
14
|
+
* packages/framework/package.json:exports) — Node resolves through the
|
|
15
|
+
* framework's self-symlinked node_modules to the compiled dist output,
|
|
16
|
+
* matching how `@aperant/framework/cost`, `./schemas`, `./standalone`
|
|
17
|
+
* already work. Public surface enumerated in
|
|
18
|
+
* __tests__/public-api-lock.test.ts.
|
|
19
|
+
*/
|
|
20
|
+
export type { ConformanceCheck, ConformanceReport } from './conformance.js';
|
|
21
|
+
export { runConformanceKit } from './conformance.js';
|
|
22
|
+
export { DriverConfigError, DriverEvidenceCaptureError, DriverInvocationError, DriverManifestSchemaError, DriverNotApprovedError, DriverPreflightError, UnsatisfiedRequiredCapabilityError, } from './errors.js';
|
|
23
|
+
export type { AssertNetworkArgs, AssertOutputArgs, AssertTextArgs, AssertVisibleArgs, AwaitSignalArgs, CaptureLogsArgs, ClickArgs, DomDumpArgs, DragDropArgs, DriverModule, DumpStateArgs, ExecuteJsArgs, Handle, IdlVerbName, KeyArgs, LaunchArgs, NavigateArgs, RecordVideoArgs, ScreenshotArgs, SelectArgs, SwipeArgs, SwitchContextArgs, Target, TargetKind, TeardownArgs, TriggerArgs, TypeArgs, UploadFileArgs, VerbResult, WaitForEventArgs, WaitForIdleArgs, } from './idl.js';
|
|
24
|
+
export { ASSERTION_VERBS, ASYNC_VERBS, EVIDENCE_VERBS, IDL_VERB_ARGS, IDL_VERB_NAMES, INTERACTION_VERBS, isVerbResult, LIFECYCLE_VERBS, validateVerbArgs, } from './idl.js';
|
|
25
|
+
export type { AuditBlock, DriverManifest, Integrity, LocalCommand, NetworkPosture, PreflightCheck, Provenance, Publisher, SandboxProfile, SecurityBlock, Stability, Transport, TrustBlock, TrustTier, } from './manifest.js';
|
|
26
|
+
export type { RetryOptions } from './retry.js';
|
|
27
|
+
export { retryWithBackoff } from './retry.js';
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/driver-sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EACN,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,kCAAkC,GAClC,MAAM,aAAa,CAAA;AACpB,YAAY,EACX,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,MAAM,EACN,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,eAAe,EACf,cAAc,EACd,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,MAAM,EACN,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,eAAe,GACf,MAAM,UAAU,CAAA;AAEjB,OAAO,EACN,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,gBAAgB,GAChB,MAAM,UAAU,CAAA;AAEjB,YAAY,EACX,UAAU,EACV,cAAc,EACd,SAAS,EACT,YAAY,EACZ,cAAc,EACd,cAAc,EACd,UAAU,EACV,SAAS,EACT,cAAc,EACd,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,GACT,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* driver-sdk — public surface (inlined into @aperant/framework@0.8.5).
|
|
3
|
+
*
|
|
4
|
+
* Originally shipped as the standalone `@aperant/driver-sdk` package; the
|
|
5
|
+
* 0.8.4 publish failed because workspace:* rewrote to an unpublished
|
|
6
|
+
* 0.1.0 spec, leaving framework consumers with a 404. The 0.8.5 inline
|
|
7
|
+
* folds 875 LOC of zero-dep SDK into the framework tarball; the
|
|
8
|
+
* subdirectory boundary is enforced by __tests__/import-direction.test.ts
|
|
9
|
+
* so re-extraction stays mechanical if/when a real third-party driver
|
|
10
|
+
* author asks for a standalone install.
|
|
11
|
+
*
|
|
12
|
+
* Framework consumers import these symbols via the
|
|
13
|
+
* `@aperant/framework/driver-sdk` subpath export (declared in
|
|
14
|
+
* packages/framework/package.json:exports) — Node resolves through the
|
|
15
|
+
* framework's self-symlinked node_modules to the compiled dist output,
|
|
16
|
+
* matching how `@aperant/framework/cost`, `./schemas`, `./standalone`
|
|
17
|
+
* already work. Public surface enumerated in
|
|
18
|
+
* __tests__/public-api-lock.test.ts.
|
|
19
|
+
*/
|
|
20
|
+
// conformance.ts — shared driver conformance kit
|
|
21
|
+
export { runConformanceKit } from './conformance.js';
|
|
22
|
+
// errors.ts — error taxonomy
|
|
23
|
+
export { DriverConfigError, DriverEvidenceCaptureError, DriverInvocationError, DriverManifestSchemaError, DriverNotApprovedError, DriverPreflightError, UnsatisfiedRequiredCapabilityError, } from './errors.js';
|
|
24
|
+
// idl.ts — runtime verb name registry + driver interface types + arg validation
|
|
25
|
+
export { ASSERTION_VERBS, ASYNC_VERBS, EVIDENCE_VERBS, IDL_VERB_ARGS, IDL_VERB_NAMES, INTERACTION_VERBS, isVerbResult, LIFECYCLE_VERBS, validateVerbArgs, } from './idl.js';
|
|
26
|
+
// retry.ts — exponential backoff helper
|
|
27
|
+
export { retryWithBackoff } from './retry.js';
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/driver-sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,6BAA6B;AAC7B,OAAO,EACN,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,kCAAkC,GAClC,MAAM,aAAa,CAAA;AAkCpB,gFAAgF;AAChF,OAAO,EACN,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,gBAAgB,GAChB,MAAM,UAAU,CAAA;AAmBjB,wCAAwC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* manifest.ts — TypeScript shape of a driver manifest.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `packages/framework/src/cli/verify-proof/manifest-schema.json`
|
|
5
|
+
* (ST03) one-to-one. The JSON Schema is the runtime validator (publish-
|
|
6
|
+
* time + load-time); this TS type is what third-party driver authors
|
|
7
|
+
* `import type` to author manifests with intellisense.
|
|
8
|
+
*
|
|
9
|
+
* Spec authority: spec.md §ID-03 (trust tiers) + §ID-04 (driver layout).
|
|
10
|
+
*/
|
|
11
|
+
export type TrustTier = 'first_party_signed' | 'community_verified' | 'community_unverified' | 'local_unverified';
|
|
12
|
+
export type Stability = 'experimental' | 'beta' | 'ga';
|
|
13
|
+
export type SandboxProfile = 'read_only' | 'workspace_write' | 'system_write';
|
|
14
|
+
export type NetworkPosture = 'deny' | 'allowlist' | 'allow';
|
|
15
|
+
/** Structured local-command — strings are NEVER accepted (ID-03). */
|
|
16
|
+
export interface LocalCommand {
|
|
17
|
+
readonly binary: string;
|
|
18
|
+
readonly args: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
/** Transport — exactly one of the variants. */
|
|
21
|
+
export type Transport = {
|
|
22
|
+
readonly mcp_server_id: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly local_command: LocalCommand;
|
|
25
|
+
} | {
|
|
26
|
+
readonly http_endpoint: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly npm_package: string;
|
|
29
|
+
} | {
|
|
30
|
+
readonly builtin: true;
|
|
31
|
+
};
|
|
32
|
+
export interface Publisher {
|
|
33
|
+
readonly name: string;
|
|
34
|
+
readonly npm_scope?: string;
|
|
35
|
+
readonly github_org?: string;
|
|
36
|
+
readonly verified?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface Provenance {
|
|
39
|
+
readonly scheme?: 'sigstore' | 'npm-provenance' | 'gpg' | 'none';
|
|
40
|
+
readonly identity?: string;
|
|
41
|
+
readonly signature?: string;
|
|
42
|
+
readonly certificate?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface Integrity {
|
|
45
|
+
readonly manifest_sha256?: string;
|
|
46
|
+
readonly artifact_digest?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface TrustBlock {
|
|
49
|
+
readonly tier: TrustTier;
|
|
50
|
+
readonly publisher?: Publisher;
|
|
51
|
+
readonly provenance?: Provenance;
|
|
52
|
+
readonly integrity?: Integrity;
|
|
53
|
+
}
|
|
54
|
+
export interface SecurityBlock {
|
|
55
|
+
readonly sandbox_profile: SandboxProfile;
|
|
56
|
+
readonly network: NetworkPosture;
|
|
57
|
+
readonly allowed_executables?: readonly string[];
|
|
58
|
+
readonly allow_shell?: boolean;
|
|
59
|
+
readonly requires_user_approval?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface AuditBlock {
|
|
62
|
+
readonly log_invocations: boolean;
|
|
63
|
+
readonly log_manifest_hash: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface PreflightCheck {
|
|
66
|
+
readonly name: string;
|
|
67
|
+
readonly command?: LocalCommand;
|
|
68
|
+
readonly required: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface DriverManifest {
|
|
71
|
+
readonly driverId: string;
|
|
72
|
+
readonly version: string;
|
|
73
|
+
readonly targets: readonly string[];
|
|
74
|
+
readonly capabilities: readonly string[];
|
|
75
|
+
readonly evidence_capabilities?: readonly string[];
|
|
76
|
+
readonly frameworkApiRange: string;
|
|
77
|
+
readonly requires?: {
|
|
78
|
+
readonly allOf?: readonly string[];
|
|
79
|
+
readonly anyOf?: readonly string[];
|
|
80
|
+
};
|
|
81
|
+
readonly os?: readonly string[];
|
|
82
|
+
readonly arch?: readonly string[];
|
|
83
|
+
readonly container_support?: boolean;
|
|
84
|
+
readonly conflicts_with?: readonly string[];
|
|
85
|
+
readonly priority: number;
|
|
86
|
+
readonly stability: Stability;
|
|
87
|
+
readonly trust: TrustBlock;
|
|
88
|
+
readonly security: SecurityBlock;
|
|
89
|
+
readonly audit?: AuditBlock;
|
|
90
|
+
readonly preflight?: readonly PreflightCheck[];
|
|
91
|
+
readonly transport: Transport;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/driver-sdk/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,SAAS,GAClB,oBAAoB,GACpB,o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;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACnB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;QAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;KAClC,CAAA;IACD,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IACpC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAA;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,CAAA;IAC9C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;CAC7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* manifest.ts — TypeScript shape of a driver manifest.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `packages/framework/src/cli/verify-proof/manifest-schema.json`
|
|
5
|
+
* (ST03) one-to-one. The JSON Schema is the runtime validator (publish-
|
|
6
|
+
* time + load-time); this TS type is what third-party driver authors
|
|
7
|
+
* `import type` to author manifests with intellisense.
|
|
8
|
+
*
|
|
9
|
+
* Spec authority: spec.md §ID-03 (trust tiers) + §ID-04 (driver layout).
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/driver-sdk/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* retry.ts — exponential backoff helper with abort signal.
|
|
3
|
+
*
|
|
4
|
+
* Used by driver implementations that want to retry transient transport
|
|
5
|
+
* failures (DriverInvocationError) before giving up. Pure, dependency-free.
|
|
6
|
+
*/
|
|
7
|
+
export interface RetryOptions {
|
|
8
|
+
/** Total maximum attempts including the first. Default 3. */
|
|
9
|
+
readonly max_attempts?: number;
|
|
10
|
+
/** Initial delay in ms before the second attempt. Default 100. */
|
|
11
|
+
readonly base_delay_ms?: number;
|
|
12
|
+
/** Cap each delay at this many ms. Default 5000. */
|
|
13
|
+
readonly max_delay_ms?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Multiplier applied to delay after each failed attempt. Default 2 →
|
|
16
|
+
* 100ms, 200ms, 400ms, 800ms, …
|
|
17
|
+
*/
|
|
18
|
+
readonly multiplier?: number;
|
|
19
|
+
/** Optional AbortSignal — abort short-circuits the retry loop. */
|
|
20
|
+
readonly signal?: AbortSignal;
|
|
21
|
+
/**
|
|
22
|
+
* Optional predicate. When provided, only retry when shouldRetry(err) is
|
|
23
|
+
* true; otherwise re-throw immediately. Default: retry every error.
|
|
24
|
+
*/
|
|
25
|
+
readonly shouldRetry?: (err: unknown) => boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Run `fn` with exponential backoff. Returns the result of the first
|
|
29
|
+
* successful call. If every attempt fails (or the signal aborts), throws
|
|
30
|
+
* the last error.
|
|
31
|
+
*/
|
|
32
|
+
export declare function retryWithBackoff<T>(fn: () => Promise<T>, opts?: RetryOptions): Promise<T>;
|
|
33
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/driver-sdk/retry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,oDAAoD;IACpD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;IAC7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAA;CAChD;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACvC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,GAAE,YAAiB,GACrB,OAAO,CAAC,CAAC,CAAC,CAqCZ"}
|