agent-scenario-loop 0.1.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/LICENSE +21 -0
- package/README.md +119 -0
- package/app/profile-session.ts +812 -0
- package/core/config-template.json +41 -0
- package/dist/core/agent-summary.d.ts +15 -0
- package/dist/core/agent-summary.js +177 -0
- package/dist/core/artifact-contract.d.ts +151 -0
- package/dist/core/artifact-contract.js +897 -0
- package/dist/core/artifact-layout.d.ts +56 -0
- package/dist/core/artifact-layout.js +61 -0
- package/dist/core/artifact-writer.d.ts +44 -0
- package/dist/core/artifact-writer.js +55 -0
- package/dist/core/comparison.d.ts +133 -0
- package/dist/core/comparison.js +294 -0
- package/dist/core/evidence-interpreter.d.ts +28 -0
- package/dist/core/evidence-interpreter.js +69 -0
- package/dist/core/execution-plan.d.ts +44 -0
- package/dist/core/execution-plan.js +95 -0
- package/dist/core/planner.d.ts +132 -0
- package/dist/core/planner.js +812 -0
- package/dist/core/ports.d.ts +198 -0
- package/dist/core/ports.js +146 -0
- package/dist/core/run-index.d.ts +62 -0
- package/dist/core/run-index.js +143 -0
- package/dist/core/schema-validator.d.ts +86 -0
- package/dist/core/schema-validator.js +407 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +27 -0
- package/dist/runner/agent-device-driver.d.ts +126 -0
- package/dist/runner/agent-device-driver.js +168 -0
- package/dist/runner/agent-device.d.ts +295 -0
- package/dist/runner/agent-device.js +1271 -0
- package/dist/runner/android-adb-driver.d.ts +175 -0
- package/dist/runner/android-adb-driver.js +399 -0
- package/dist/runner/android-adb.d.ts +254 -0
- package/dist/runner/android-adb.js +1618 -0
- package/dist/runner/argent-driver.d.ts +183 -0
- package/dist/runner/argent-driver.js +297 -0
- package/dist/runner/argent.d.ts +349 -0
- package/dist/runner/argent.js +1211 -0
- package/dist/runner/check-plan.d.ts +45 -0
- package/dist/runner/check-plan.js +210 -0
- package/dist/runner/cli.d.ts +20 -0
- package/dist/runner/cli.js +23 -0
- package/dist/runner/compare-latest.d.ts +99 -0
- package/dist/runner/compare-latest.js +233 -0
- package/dist/runner/compare.d.ts +58 -0
- package/dist/runner/compare.js +157 -0
- package/dist/runner/demo-loop.d.ts +45 -0
- package/dist/runner/demo-loop.js +170 -0
- package/dist/runner/example-android-live.d.ts +137 -0
- package/dist/runner/example-android-live.js +454 -0
- package/dist/runner/example-ios-live.d.ts +137 -0
- package/dist/runner/example-ios-live.js +471 -0
- package/dist/runner/host-doctor.d.ts +131 -0
- package/dist/runner/host-doctor.js +628 -0
- package/dist/runner/init-project.d.ts +88 -0
- package/dist/runner/init-project.js +263 -0
- package/dist/runner/ios-simctl-driver.d.ts +69 -0
- package/dist/runner/ios-simctl-driver.js +97 -0
- package/dist/runner/ios-simctl.d.ts +254 -0
- package/dist/runner/ios-simctl.js +1415 -0
- package/dist/runner/live-android.d.ts +137 -0
- package/dist/runner/live-android.js +539 -0
- package/dist/runner/live-comparison.d.ts +67 -0
- package/dist/runner/live-comparison.js +147 -0
- package/dist/runner/live-ios.d.ts +137 -0
- package/dist/runner/live-ios.js +460 -0
- package/dist/runner/live-proof-summary.d.ts +263 -0
- package/dist/runner/live-proof-summary.js +465 -0
- package/dist/runner/live-proof.d.ts +467 -0
- package/dist/runner/live-proof.js +920 -0
- package/dist/runner/local-env.d.ts +64 -0
- package/dist/runner/local-env.js +155 -0
- package/dist/runner/profile-android.d.ts +82 -0
- package/dist/runner/profile-android.js +671 -0
- package/dist/runner/profile-ios.d.ts +108 -0
- package/dist/runner/profile-ios.js +532 -0
- package/dist/runner/profile-mobile.d.ts +254 -0
- package/dist/runner/profile-mobile.js +1307 -0
- package/dist/runner/validate-project.d.ts +273 -0
- package/dist/runner/validate-project.js +1501 -0
- package/docs/adapters.md +145 -0
- package/docs/api.md +94 -0
- package/docs/authoring.md +196 -0
- package/docs/concepts.md +136 -0
- package/docs/consumer-rehearsal.md +115 -0
- package/docs/contracts.md +267 -0
- package/docs/live-proofs.md +270 -0
- package/docs/principles.md +46 -0
- package/examples/event-logs/app-startup-baseline.log +4 -0
- package/examples/event-logs/app-startup-current.log +4 -0
- package/examples/minimal-app/README.md +70 -0
- package/examples/mobile-app/README.md +302 -0
- package/examples/mobile-app/app.json +22 -0
- package/examples/mobile-app/asl/package-scripts.json +32 -0
- package/examples/mobile-app/asl.config.json +37 -0
- package/examples/mobile-app/event-logs/android-app-startup.log +4 -0
- package/examples/mobile-app/event-logs/android-open-close-cycle.log +12 -0
- package/examples/mobile-app/event-logs/android-scroll-settle.log +12 -0
- package/examples/mobile-app/event-logs/app-startup.log +4 -0
- package/examples/mobile-app/event-logs/open-close-cycle.log +12 -0
- package/examples/mobile-app/event-logs/scroll-settle.log +12 -0
- package/examples/mobile-app/index.ts +20 -0
- package/examples/mobile-app/metro.config.js +20 -0
- package/examples/mobile-app/package.json +62 -0
- package/examples/mobile-app/patches/expo-modules-jsi@56.0.10.patch +19 -0
- package/examples/mobile-app/plugins/with-ios-build-compat.js +271 -0
- package/examples/mobile-app/pnpm-lock.yaml +4440 -0
- package/examples/mobile-app/runner-manifests/evidence-provider.json +79 -0
- package/examples/mobile-app/runner-manifests/primary-runner.json +19 -0
- package/examples/mobile-app/scenarios/android/app-startup-video.json +73 -0
- package/examples/mobile-app/scenarios/android/app-startup.json +44 -0
- package/examples/mobile-app/scenarios/android/open-close-cycle.json +54 -0
- package/examples/mobile-app/scenarios/android/scroll-settle.json +49 -0
- package/examples/mobile-app/scenarios/ios/app-startup.json +44 -0
- package/examples/mobile-app/scenarios/ios/open-close-cycle.json +54 -0
- package/examples/mobile-app/scenarios/ios/scroll-settle.json +49 -0
- package/examples/mobile-app/scenarios/mobile/app-startup.json +91 -0
- package/examples/mobile-app/scenarios/mobile/open-close-cycle.json +160 -0
- package/examples/mobile-app/scenarios/mobile/scroll-settle.json +148 -0
- package/examples/mobile-app/scripts/asl-capture-accessibility-provider.mjs +112 -0
- package/examples/mobile-app/scripts/asl-capture-profiler-provider.mjs +127 -0
- package/examples/mobile-app/src/devtools/profile-session.ts +7 -0
- package/examples/mobile-app/src/example-screen.tsx +322 -0
- package/examples/mobile-app/tsconfig.json +16 -0
- package/examples/mobile-app/tsconfig.typecheck.json +13 -0
- package/examples/runners/README.md +44 -0
- package/examples/runners/adb-android.json +25 -0
- package/examples/runners/agent-device-android.json +27 -0
- package/examples/runners/agent-device-ios.json +27 -0
- package/examples/runners/argent-android.json +32 -0
- package/examples/runners/argent-ios.json +32 -0
- package/examples/runners/argent-react-profiler-provider.json +15 -0
- package/examples/runners/axe-accessibility-provider.json +24 -0
- package/examples/runners/manual-log-ingest.json +9 -0
- package/examples/runners/rozenite-profiler-provider.json +9 -0
- package/examples/runners/script-accessibility-provider.json +24 -0
- package/examples/runners/script-memory-provider.json +24 -0
- package/examples/runners/script-network-provider.json +24 -0
- package/examples/runners/script-profiler-provider.json +30 -0
- package/examples/runners/xcodebuildmcp-ios.json +29 -0
- package/examples/scenarios/ios/app-startup.json +28 -0
- package/examples/scenarios/ios/open-close-cycle.json +35 -0
- package/examples/scenarios/mobile/app-startup.json +72 -0
- package/examples/scenarios/mobile/media-open-close.json +141 -0
- package/examples/scenarios/mobile/open-close-cycle.json +135 -0
- package/examples/scenarios/mobile/scroll-settle.json +106 -0
- package/package.json +240 -0
- package/schemas/budget-verdict.schema.json +115 -0
- package/schemas/causal-run.schema.json +279 -0
- package/schemas/comparison.schema.json +196 -0
- package/schemas/health.schema.json +108 -0
- package/schemas/live-proof-set.schema.json +195 -0
- package/schemas/live-proof.schema.json +413 -0
- package/schemas/manifest.schema.json +204 -0
- package/schemas/metrics.schema.json +137 -0
- package/schemas/project-validation.schema.json +343 -0
- package/schemas/runner-capabilities.schema.json +217 -0
- package/schemas/scenario.schema.json +400 -0
- package/schemas/verdict.schema.json +88 -0
- package/templates/evidence-provider.json +83 -0
- package/templates/gitignore-snippet +9 -0
- package/templates/integration-readme.md +125 -0
- package/templates/mobile-scenario.json +133 -0
- package/templates/package-scripts.json +32 -0
- package/templates/primary-runner.json +19 -0
- package/templates/project.config.json +37 -0
- package/templates/scripts/asl-capture-accessibility-provider.mjs +112 -0
- package/templates/scripts/asl-capture-profiler-provider.mjs +127 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
type CliArgs = {
|
|
3
|
+
app?: string | boolean;
|
|
4
|
+
'app-flag'?: string | boolean;
|
|
5
|
+
argent?: string | boolean;
|
|
6
|
+
'base-args'?: string | boolean;
|
|
7
|
+
check?: string | boolean;
|
|
8
|
+
'command-timeout-ms'?: string | boolean;
|
|
9
|
+
device?: string | boolean;
|
|
10
|
+
'device-flag'?: string | boolean;
|
|
11
|
+
'ios-simctl-screenshot-fallback'?: string | boolean;
|
|
12
|
+
out?: string | boolean;
|
|
13
|
+
platform?: string | boolean;
|
|
14
|
+
'run-id'?: string | boolean;
|
|
15
|
+
scenario?: string | boolean;
|
|
16
|
+
serial?: string | boolean;
|
|
17
|
+
'screen-height'?: string | boolean;
|
|
18
|
+
'screen-width'?: string | boolean;
|
|
19
|
+
udid?: string | boolean;
|
|
20
|
+
'wait-ms'?: string | boolean;
|
|
21
|
+
xcrun?: string | boolean;
|
|
22
|
+
[key: string]: string | boolean | undefined;
|
|
23
|
+
};
|
|
24
|
+
type CommandResult = {
|
|
25
|
+
args: string[];
|
|
26
|
+
command: string;
|
|
27
|
+
exitCode: number;
|
|
28
|
+
stderr: string;
|
|
29
|
+
stdout: string;
|
|
30
|
+
};
|
|
31
|
+
type CommandExecutor = (command: string, args: string[]) => Promise<CommandResult>;
|
|
32
|
+
type ScenarioExecutionStep = import('../core/execution-plan').ScenarioExecutionStep;
|
|
33
|
+
type ArgentAvailabilityOptions = {
|
|
34
|
+
argentCommand?: string;
|
|
35
|
+
baseArgs?: string[];
|
|
36
|
+
commandTimeoutMs?: number;
|
|
37
|
+
executor?: CommandExecutor;
|
|
38
|
+
requiredTools?: string[];
|
|
39
|
+
};
|
|
40
|
+
type ArgentAvailabilityCheck = {
|
|
41
|
+
args: string[];
|
|
42
|
+
code: string;
|
|
43
|
+
command: string;
|
|
44
|
+
exitCode: number;
|
|
45
|
+
metadata?: Record<string, string | number | boolean | null>;
|
|
46
|
+
message: string;
|
|
47
|
+
name: string;
|
|
48
|
+
stderrPreview?: string;
|
|
49
|
+
status: 'failed' | 'passed';
|
|
50
|
+
stdoutPreview?: string;
|
|
51
|
+
};
|
|
52
|
+
type ArgentAvailabilityResult = {
|
|
53
|
+
argentCommand: string;
|
|
54
|
+
baseArgs: string[];
|
|
55
|
+
checks: ArgentAvailabilityCheck[];
|
|
56
|
+
requiredTools: string[];
|
|
57
|
+
status: 'failed' | 'passed';
|
|
58
|
+
};
|
|
59
|
+
type ArgentAvailabilityArtifactOptions = {
|
|
60
|
+
outputDir: string;
|
|
61
|
+
result: ArgentAvailabilityResult;
|
|
62
|
+
runId?: string;
|
|
63
|
+
};
|
|
64
|
+
type ArgentDriverStep = {
|
|
65
|
+
appId?: string;
|
|
66
|
+
captureFileName?: string;
|
|
67
|
+
driverAction: 'assertVisible' | 'inspectTree' | 'launch' | 'screenshot' | 'scroll' | 'tap';
|
|
68
|
+
durationMs?: number;
|
|
69
|
+
endX?: number;
|
|
70
|
+
endY?: number;
|
|
71
|
+
rawFileName: string;
|
|
72
|
+
required: boolean;
|
|
73
|
+
screenSize?: import('./argent-driver').ArgentScreenSize;
|
|
74
|
+
selector?: import('./argent-driver').ArgentSelector;
|
|
75
|
+
startX?: number;
|
|
76
|
+
startY?: number;
|
|
77
|
+
stepId: string;
|
|
78
|
+
waitMs: number;
|
|
79
|
+
x?: number;
|
|
80
|
+
y?: number;
|
|
81
|
+
};
|
|
82
|
+
type ArgentCaptureOptions = {
|
|
83
|
+
app?: string | null;
|
|
84
|
+
appFlag?: string;
|
|
85
|
+
argentCommand?: string;
|
|
86
|
+
baseArgs?: string[];
|
|
87
|
+
commandTimeoutMs?: number;
|
|
88
|
+
delay?: (ms: number) => Promise<void>;
|
|
89
|
+
deviceFlag?: string;
|
|
90
|
+
deviceId: string;
|
|
91
|
+
executor?: CommandExecutor;
|
|
92
|
+
iosSimctlExecutor?: CommandExecutor;
|
|
93
|
+
iosSimctlScreenshotFallback?: boolean;
|
|
94
|
+
outputDir?: string;
|
|
95
|
+
platform: 'android' | 'ios';
|
|
96
|
+
resolveBootedIosSimulatorUdid?: () => Promise<string | null>;
|
|
97
|
+
runId?: string;
|
|
98
|
+
scenario: Record<string, unknown>;
|
|
99
|
+
screenSize?: import('./argent-driver').ArgentScreenSize;
|
|
100
|
+
waitMs?: number;
|
|
101
|
+
xcrunPath?: string;
|
|
102
|
+
};
|
|
103
|
+
type ArgentCaptureResult = {
|
|
104
|
+
agentSummary: string;
|
|
105
|
+
captures: {
|
|
106
|
+
screenshots: string[];
|
|
107
|
+
};
|
|
108
|
+
health: Record<string, unknown>;
|
|
109
|
+
metadata: Record<string, unknown>;
|
|
110
|
+
raw: Record<string, string>;
|
|
111
|
+
runDir: string;
|
|
112
|
+
verdict: Record<string, unknown>;
|
|
113
|
+
};
|
|
114
|
+
type IosSimctlScreenshotFallbackResult = {
|
|
115
|
+
capturePath?: string;
|
|
116
|
+
rawFileName: string;
|
|
117
|
+
result: CommandResult;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Prints CLI usage.
|
|
121
|
+
*
|
|
122
|
+
* @param {{write: (message: string) => unknown}} output
|
|
123
|
+
* @returns {void}
|
|
124
|
+
*/
|
|
125
|
+
declare function usage(output?: {
|
|
126
|
+
write: (message: string) => unknown;
|
|
127
|
+
}): void;
|
|
128
|
+
/**
|
|
129
|
+
* Parses `--key value` CLI arguments.
|
|
130
|
+
*
|
|
131
|
+
* @param {string[]} argv
|
|
132
|
+
* @returns {CliArgs}
|
|
133
|
+
*/
|
|
134
|
+
declare function parseArgs(argv: string[]): CliArgs;
|
|
135
|
+
/**
|
|
136
|
+
* Runs a command and captures stdout, stderr, and exit code without throwing.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} command
|
|
139
|
+
* @param {string[]} args
|
|
140
|
+
* @returns {Promise<CommandResult>}
|
|
141
|
+
*/
|
|
142
|
+
declare function execFileCommand(command: string, args: string[]): Promise<CommandResult>;
|
|
143
|
+
/**
|
|
144
|
+
* Runs a command with a bounded timeout and captures stdout, stderr, and exit code without throwing.
|
|
145
|
+
*
|
|
146
|
+
* @param {string} command
|
|
147
|
+
* @param {string[]} args
|
|
148
|
+
* @param {number} [timeoutMs]
|
|
149
|
+
* @returns {Promise<CommandResult>}
|
|
150
|
+
*/
|
|
151
|
+
declare function execFileCommandWithTimeout(command: string, args: string[], timeoutMs?: number): Promise<CommandResult>;
|
|
152
|
+
/**
|
|
153
|
+
* Returns adapter options for an Argent-backed step.
|
|
154
|
+
*
|
|
155
|
+
* @param {ScenarioExecutionStep} step
|
|
156
|
+
* @returns {Record<string, unknown>}
|
|
157
|
+
*/
|
|
158
|
+
declare function readArgentStepOptions(step: ScenarioExecutionStep): Record<string, unknown>;
|
|
159
|
+
/**
|
|
160
|
+
* Returns true when a normalized step has a portable selector.
|
|
161
|
+
*
|
|
162
|
+
* @param {unknown} value
|
|
163
|
+
* @returns {value is import('./argent-driver').ArgentSelector}
|
|
164
|
+
*/
|
|
165
|
+
declare function isArgentSelector(value: unknown): value is import('./argent-driver').ArgentSelector;
|
|
166
|
+
/**
|
|
167
|
+
* Returns the default raw file name for one Argent action.
|
|
168
|
+
*
|
|
169
|
+
* @param {{driverAction: ArgentDriverStep['driverAction'], index: number}} options
|
|
170
|
+
* @returns {string}
|
|
171
|
+
*/
|
|
172
|
+
declare function defaultArgentRawFileName({ driverAction, index, }: {
|
|
173
|
+
driverAction: ArgentDriverStep['driverAction'];
|
|
174
|
+
index: number;
|
|
175
|
+
}): string;
|
|
176
|
+
/**
|
|
177
|
+
* Converts a scenario step id into a safe artifact filename segment.
|
|
178
|
+
*
|
|
179
|
+
* @param {string} value
|
|
180
|
+
* @returns {string}
|
|
181
|
+
*/
|
|
182
|
+
declare function sanitizeArtifactFileSegment(value: string): string;
|
|
183
|
+
/**
|
|
184
|
+
* Returns the simctl fallback screenshot filename for an Argent screenshot step.
|
|
185
|
+
*
|
|
186
|
+
* @param {ArgentDriverStep} driverStep
|
|
187
|
+
* @returns {string}
|
|
188
|
+
*/
|
|
189
|
+
declare function defaultIosSimctlFallbackScreenshotFileName(driverStep: ArgentDriverStep): string;
|
|
190
|
+
/**
|
|
191
|
+
* Expands normalized scenario steps into Argent driver actions.
|
|
192
|
+
*
|
|
193
|
+
* @param {Record<string, unknown>} scenario
|
|
194
|
+
* @param {import('./argent-driver').ArgentScreenSize | undefined} screenSize
|
|
195
|
+
* @returns {ArgentDriverStep[]}
|
|
196
|
+
*/
|
|
197
|
+
declare function resolveArgentDriverSteps(scenario: Record<string, any>, screenSize?: import('./argent-driver').ArgentScreenSize): ArgentDriverStep[];
|
|
198
|
+
/**
|
|
199
|
+
* Returns profile-time validation errors for Argent driver steps.
|
|
200
|
+
*
|
|
201
|
+
* @param {ArgentDriverStep[]} driverSteps
|
|
202
|
+
* @param {{app?: string | null}} options
|
|
203
|
+
* @returns {string[]}
|
|
204
|
+
*/
|
|
205
|
+
declare function validateArgentDriverSteps(driverSteps: ArgentDriverStep[], options?: {
|
|
206
|
+
app?: string | null;
|
|
207
|
+
}): string[];
|
|
208
|
+
/**
|
|
209
|
+
* Builds scalar health metadata for one portable selector.
|
|
210
|
+
*
|
|
211
|
+
* @param {import('./argent-driver').ArgentSelector | undefined} selector
|
|
212
|
+
* @returns {Record<string, string>}
|
|
213
|
+
*/
|
|
214
|
+
declare function buildArgentSelectorHealthMetadata(selector?: import('./argent-driver').ArgentSelector): Record<string, string>;
|
|
215
|
+
/**
|
|
216
|
+
* Runs one Argent driver action.
|
|
217
|
+
*
|
|
218
|
+
* @param {{driver: import('./argent-driver').ArgentDriver, driverStep: ArgentDriverStep}} options
|
|
219
|
+
* @returns {Promise<import('./argent-driver').ArgentCommandResult>}
|
|
220
|
+
*/
|
|
221
|
+
declare function runArgentDriverStep({ driver, driverStep, }: {
|
|
222
|
+
driver: import('./argent-driver').ArgentDriver;
|
|
223
|
+
driverStep: ArgentDriverStep;
|
|
224
|
+
}): Promise<import('./argent-driver').ArgentCommandResult>;
|
|
225
|
+
/**
|
|
226
|
+
* Captures an iOS screenshot through simctl when Argent's iOS screenshot backend is unavailable.
|
|
227
|
+
*
|
|
228
|
+
* @param {{capturesDir: string, deviceId: string, driverStep: ArgentDriverStep, executor?: CommandExecutor, xcrunPath: string}} options
|
|
229
|
+
* @returns {Promise<IosSimctlScreenshotFallbackResult>}
|
|
230
|
+
*/
|
|
231
|
+
declare function runIosSimctlScreenshotFallback({ capturesDir, deviceId, driverStep, executor, xcrunPath, }: {
|
|
232
|
+
capturesDir: string;
|
|
233
|
+
deviceId: string;
|
|
234
|
+
driverStep: ArgentDriverStep;
|
|
235
|
+
executor?: CommandExecutor;
|
|
236
|
+
xcrunPath: string;
|
|
237
|
+
}): Promise<IosSimctlScreenshotFallbackResult>;
|
|
238
|
+
/**
|
|
239
|
+
* Builds a stable health code suffix for one Argent driver action.
|
|
240
|
+
*
|
|
241
|
+
* @param {ArgentDriverStep['driverAction']} driverAction
|
|
242
|
+
* @returns {string}
|
|
243
|
+
*/
|
|
244
|
+
declare function argentDriverActionCode(driverAction: ArgentDriverStep['driverAction']): string;
|
|
245
|
+
/**
|
|
246
|
+
* Builds a health artifact from Argent capture checks.
|
|
247
|
+
*
|
|
248
|
+
* @param {{flowId?: string, runId: string, scenarioId: string, checks: Record<string, unknown>[]}} options
|
|
249
|
+
* @returns {Record<string, unknown>}
|
|
250
|
+
*/
|
|
251
|
+
declare function buildArgentHealth({ checks, flowId, runId, scenarioId, }: {
|
|
252
|
+
checks: Record<string, unknown>[];
|
|
253
|
+
flowId?: string;
|
|
254
|
+
runId: string;
|
|
255
|
+
scenarioId: string;
|
|
256
|
+
}): Record<string, unknown>;
|
|
257
|
+
/**
|
|
258
|
+
* Builds a verdict artifact for Argent capture readiness.
|
|
259
|
+
*
|
|
260
|
+
* @param {{health: Record<string, unknown>, runId: string, scenarioId: string, flowId?: string}} options
|
|
261
|
+
* @returns {Record<string, unknown>}
|
|
262
|
+
*/
|
|
263
|
+
declare function buildArgentVerdict({ flowId, health, runId, scenarioId, }: {
|
|
264
|
+
flowId?: string;
|
|
265
|
+
health: Record<string, unknown>;
|
|
266
|
+
runId: string;
|
|
267
|
+
scenarioId: string;
|
|
268
|
+
}): Record<string, unknown>;
|
|
269
|
+
/**
|
|
270
|
+
* Splits CLI base args without invoking a shell.
|
|
271
|
+
*
|
|
272
|
+
* @param {unknown} value
|
|
273
|
+
* @returns {string[] | undefined}
|
|
274
|
+
*/
|
|
275
|
+
declare function parseBaseArgs(value: unknown): string[] | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* Returns root-level Argent args from an `argent run` command shape.
|
|
278
|
+
*
|
|
279
|
+
* @param {string[]} baseArgs
|
|
280
|
+
* @returns {string[]}
|
|
281
|
+
*/
|
|
282
|
+
declare function deriveArgentRootArgs(baseArgs: string[]): string[];
|
|
283
|
+
/**
|
|
284
|
+
* Writes ASL artifacts for an Argent command-surface availability check.
|
|
285
|
+
*
|
|
286
|
+
* @param {ArgentAvailabilityArtifactOptions} options
|
|
287
|
+
* @returns {Promise<{agentSummary: string, health: Record<string, unknown>, runDir: string, verdict: Record<string, unknown>}>}
|
|
288
|
+
*/
|
|
289
|
+
declare function writeArgentAvailabilityArtifacts({ outputDir, result, runId, }: ArgentAvailabilityArtifactOptions): Promise<{
|
|
290
|
+
agentSummary: string;
|
|
291
|
+
health: Record<string, unknown>;
|
|
292
|
+
runDir: string;
|
|
293
|
+
verdict: Record<string, unknown>;
|
|
294
|
+
}>;
|
|
295
|
+
/**
|
|
296
|
+
* Builds one availability check result from an Argent command execution.
|
|
297
|
+
*
|
|
298
|
+
* @param {{code: string, expectedPattern: RegExp, name: string, result: CommandResult}} options
|
|
299
|
+
* @returns {ArgentAvailabilityCheck}
|
|
300
|
+
*/
|
|
301
|
+
declare function buildArgentAvailabilityCheck({ code, expectedPattern, name, result, }: {
|
|
302
|
+
code: string;
|
|
303
|
+
expectedPattern: RegExp;
|
|
304
|
+
name: string;
|
|
305
|
+
result: CommandResult;
|
|
306
|
+
}): ArgentAvailabilityCheck;
|
|
307
|
+
/**
|
|
308
|
+
* Verifies that the configured Argent command can invoke the ASL-required tool surface.
|
|
309
|
+
*
|
|
310
|
+
* @param {ArgentAvailabilityOptions} options
|
|
311
|
+
* @returns {Promise<ArgentAvailabilityResult>}
|
|
312
|
+
*/
|
|
313
|
+
declare function checkArgentAvailability({ argentCommand, baseArgs, commandTimeoutMs, executor, requiredTools, }?: ArgentAvailabilityOptions): Promise<ArgentAvailabilityResult>;
|
|
314
|
+
/**
|
|
315
|
+
* Returns a screen size from CLI values when both dimensions are present.
|
|
316
|
+
*
|
|
317
|
+
* @param {{width?: unknown, height?: unknown}} options
|
|
318
|
+
* @returns {import('./argent-driver').ArgentScreenSize | undefined}
|
|
319
|
+
*/
|
|
320
|
+
declare function readScreenSize({ height, width, }: {
|
|
321
|
+
height?: unknown;
|
|
322
|
+
width?: unknown;
|
|
323
|
+
}): import('./argent-driver').ArgentScreenSize | undefined;
|
|
324
|
+
/**
|
|
325
|
+
* Copies a screenshot produced by Argent into the stable ASL captures folder.
|
|
326
|
+
*
|
|
327
|
+
* @param {{capturesDir: string, capturePath: string, preferredFileName?: string}} options
|
|
328
|
+
* @returns {Promise<string | null>}
|
|
329
|
+
*/
|
|
330
|
+
declare function copyArgentCapture({ capturePath, capturesDir, preferredFileName, }: {
|
|
331
|
+
capturePath: string;
|
|
332
|
+
capturesDir: string;
|
|
333
|
+
preferredFileName?: string;
|
|
334
|
+
}): Promise<string | null>;
|
|
335
|
+
/**
|
|
336
|
+
* Runs scenario-declared portable actions through Argent and writes ASL artifacts.
|
|
337
|
+
*
|
|
338
|
+
* @param {ArgentCaptureOptions} options
|
|
339
|
+
* @returns {Promise<ArgentCaptureResult>}
|
|
340
|
+
*/
|
|
341
|
+
declare function runArgentCapture({ app, appFlag, argentCommand, baseArgs, commandTimeoutMs, delay: wait, deviceFlag, deviceId, executor, iosSimctlExecutor, iosSimctlScreenshotFallback, outputDir, platform, resolveBootedIosSimulatorUdid: resolveBooted, runId, scenario, screenSize, waitMs, xcrunPath, }: ArgentCaptureOptions): Promise<ArgentCaptureResult>;
|
|
342
|
+
/**
|
|
343
|
+
* Runs the Argent capture CLI.
|
|
344
|
+
*
|
|
345
|
+
* @returns {Promise<void>}
|
|
346
|
+
*/
|
|
347
|
+
declare function main(): Promise<void>;
|
|
348
|
+
export { argentDriverActionCode, buildArgentHealth, buildArgentAvailabilityCheck, buildArgentSelectorHealthMetadata, buildArgentVerdict, checkArgentAvailability, copyArgentCapture, defaultArgentRawFileName, defaultIosSimctlFallbackScreenshotFileName, deriveArgentRootArgs, execFileCommand, execFileCommandWithTimeout, isArgentSelector, main, parseArgs, parseBaseArgs, readArgentStepOptions, readScreenSize, resolveArgentDriverSteps, runArgentCapture, runArgentDriverStep, runIosSimctlScreenshotFallback, sanitizeArtifactFileSegment, usage, validateArgentDriverSteps, writeArgentAvailabilityArtifacts, };
|
|
349
|
+
export type { ArgentAvailabilityCheck, ArgentAvailabilityOptions, ArgentAvailabilityResult, ArgentCaptureOptions, ArgentCaptureResult, ArgentDriverStep, CliArgs, CommandExecutor, CommandResult, };
|