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,67 @@
|
|
|
1
|
+
type LiveProfileForComparison = {
|
|
2
|
+
label: string;
|
|
3
|
+
runDir: string;
|
|
4
|
+
runId: string;
|
|
5
|
+
scenarioId: string;
|
|
6
|
+
};
|
|
7
|
+
type ComparisonMetricStatus = 'better' | 'worse' | 'unchanged' | 'inconclusive';
|
|
8
|
+
type ComparisonMetricHighlight = {
|
|
9
|
+
baseline: number | boolean | null;
|
|
10
|
+
current: number | boolean | null;
|
|
11
|
+
delta: number | null;
|
|
12
|
+
name: string;
|
|
13
|
+
status: Exclude<ComparisonMetricStatus, 'unchanged'>;
|
|
14
|
+
unit: string;
|
|
15
|
+
};
|
|
16
|
+
type ComparisonMetricSummary = {
|
|
17
|
+
counts: Record<ComparisonMetricStatus, number>;
|
|
18
|
+
notableMetrics: ComparisonMetricHighlight[];
|
|
19
|
+
};
|
|
20
|
+
type LiveComparisonResult = {
|
|
21
|
+
baselineDir: string | null;
|
|
22
|
+
comparisonDir: string | null;
|
|
23
|
+
label: string;
|
|
24
|
+
metricSummary?: ComparisonMetricSummary;
|
|
25
|
+
reason: string | null;
|
|
26
|
+
runId: string;
|
|
27
|
+
scenarioId: string;
|
|
28
|
+
status: 'better' | 'worse' | 'unchanged' | 'mixed' | 'inconclusive' | 'skipped';
|
|
29
|
+
summaryPath: string | null;
|
|
30
|
+
};
|
|
31
|
+
type CompareLiveProfilesOptions = {
|
|
32
|
+
outputDir: string;
|
|
33
|
+
profiles: LiveProfileForComparison[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Checks whether a parsed CLI flag is enabled.
|
|
37
|
+
*
|
|
38
|
+
* @param {unknown} value
|
|
39
|
+
* @returns {boolean}
|
|
40
|
+
*/
|
|
41
|
+
declare function isEnabledFlag(value: unknown): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Builds a compact agent-readable summary from a detailed comparison artifact.
|
|
44
|
+
*
|
|
45
|
+
* @param {Record<string, unknown>} comparison
|
|
46
|
+
* @returns {ComparisonMetricSummary | undefined}
|
|
47
|
+
*/
|
|
48
|
+
declare function buildComparisonMetricSummary(comparison: Record<string, unknown>): ComparisonMetricSummary | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Writes comparison artifacts for one already-passed live profile.
|
|
51
|
+
*
|
|
52
|
+
* @param {{outputDir: string, profile: LiveProfileForComparison}} options
|
|
53
|
+
* @returns {Promise<LiveComparisonResult>}
|
|
54
|
+
*/
|
|
55
|
+
declare function compareLiveProfileToLatest({ outputDir, profile, }: {
|
|
56
|
+
outputDir: string;
|
|
57
|
+
profile: LiveProfileForComparison;
|
|
58
|
+
}): Promise<LiveComparisonResult>;
|
|
59
|
+
/**
|
|
60
|
+
* Compares live proof profiles against the latest trusted prior run for each scenario.
|
|
61
|
+
*
|
|
62
|
+
* @param {CompareLiveProfilesOptions} options
|
|
63
|
+
* @returns {Promise<LiveComparisonResult[]>}
|
|
64
|
+
*/
|
|
65
|
+
declare function compareLiveProfilesToLatest({ outputDir, profiles, }: CompareLiveProfilesOptions): Promise<LiveComparisonResult[]>;
|
|
66
|
+
export { buildComparisonMetricSummary, compareLiveProfileToLatest, compareLiveProfilesToLatest, isEnabledFlag, };
|
|
67
|
+
export type { CompareLiveProfilesOptions, LiveComparisonResult, LiveProfileForComparison, ComparisonMetricHighlight, ComparisonMetricSummary, };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildComparisonMetricSummary = buildComparisonMetricSummary;
|
|
4
|
+
exports.compareLiveProfileToLatest = compareLiveProfileToLatest;
|
|
5
|
+
exports.compareLiveProfilesToLatest = compareLiveProfilesToLatest;
|
|
6
|
+
exports.isEnabledFlag = isEnabledFlag;
|
|
7
|
+
const path = require('node:path');
|
|
8
|
+
const { createArtifactLayout } = require('../core/artifact-layout');
|
|
9
|
+
const { buildAgentSummaryMarkdown } = require('../core/agent-summary');
|
|
10
|
+
const { readRunArtifacts } = require('../core/comparison');
|
|
11
|
+
const { writeJsonArtifact, writeTextArtifact } = require('../core/artifact-writer');
|
|
12
|
+
const { SCHEMAS } = require('../core/schema-validator');
|
|
13
|
+
const { compareLatestTrustedRun } = require('./compare-latest');
|
|
14
|
+
/**
|
|
15
|
+
* Checks whether a parsed CLI flag is enabled.
|
|
16
|
+
*
|
|
17
|
+
* @param {unknown} value
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
function isEnabledFlag(value) {
|
|
21
|
+
return value === true || value === 'true';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Reports whether compare-latest failed only because no baseline exists yet.
|
|
25
|
+
*
|
|
26
|
+
* @param {unknown} error
|
|
27
|
+
* @returns {error is Error}
|
|
28
|
+
*/
|
|
29
|
+
function isMissingPriorRunError(error) {
|
|
30
|
+
return error instanceof Error && error.message.startsWith('No trusted prior run found');
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Builds a compact agent-readable summary from a detailed comparison artifact.
|
|
34
|
+
*
|
|
35
|
+
* @param {Record<string, unknown>} comparison
|
|
36
|
+
* @returns {ComparisonMetricSummary | undefined}
|
|
37
|
+
*/
|
|
38
|
+
function buildComparisonMetricSummary(comparison) {
|
|
39
|
+
if (!Array.isArray(comparison.metricComparisons)) {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
const counts = {
|
|
43
|
+
better: 0,
|
|
44
|
+
worse: 0,
|
|
45
|
+
unchanged: 0,
|
|
46
|
+
inconclusive: 0,
|
|
47
|
+
};
|
|
48
|
+
const notableMetrics = [];
|
|
49
|
+
for (const metric of comparison.metricComparisons) {
|
|
50
|
+
if (!metric || typeof metric !== 'object') {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const record = metric;
|
|
54
|
+
const status = record.status;
|
|
55
|
+
if (status !== 'better' && status !== 'worse' && status !== 'unchanged' && status !== 'inconclusive') {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
counts[status] += 1;
|
|
59
|
+
if (status === 'unchanged') {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
notableMetrics.push({
|
|
63
|
+
baseline: typeof record.baseline === 'number' || typeof record.baseline === 'boolean' ? record.baseline : null,
|
|
64
|
+
current: typeof record.current === 'number' || typeof record.current === 'boolean' ? record.current : null,
|
|
65
|
+
delta: typeof record.delta === 'number' ? record.delta : null,
|
|
66
|
+
name: typeof record.name === 'string' ? record.name : 'unknown metric',
|
|
67
|
+
status,
|
|
68
|
+
unit: typeof record.unit === 'string' ? record.unit : 'unknown',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
counts,
|
|
73
|
+
notableMetrics,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Writes comparison artifacts for one already-passed live profile.
|
|
78
|
+
*
|
|
79
|
+
* @param {{outputDir: string, profile: LiveProfileForComparison}} options
|
|
80
|
+
* @returns {Promise<LiveComparisonResult>}
|
|
81
|
+
*/
|
|
82
|
+
async function compareLiveProfileToLatest({ outputDir, profile, }) {
|
|
83
|
+
try {
|
|
84
|
+
const result = compareLatestTrustedRun({
|
|
85
|
+
currentDir: profile.runDir,
|
|
86
|
+
rootDir: outputDir,
|
|
87
|
+
scenarioId: profile.scenarioId,
|
|
88
|
+
});
|
|
89
|
+
const comparisonDir = path.join(outputDir, 'comparisons', profile.scenarioId, profile.runId);
|
|
90
|
+
const layout = createArtifactLayout({ outputDir: comparisonDir });
|
|
91
|
+
await writeJsonArtifact({
|
|
92
|
+
filePath: layout.comparison,
|
|
93
|
+
value: result.comparison,
|
|
94
|
+
schema: SCHEMAS.comparison,
|
|
95
|
+
label: 'Comparison artifact',
|
|
96
|
+
});
|
|
97
|
+
const current = readRunArtifacts(profile.runDir);
|
|
98
|
+
await writeTextArtifact({
|
|
99
|
+
filePath: layout.agentSummary,
|
|
100
|
+
content: buildAgentSummaryMarkdown({
|
|
101
|
+
health: current.health,
|
|
102
|
+
verdict: current.verdict,
|
|
103
|
+
comparison: result.comparison,
|
|
104
|
+
}),
|
|
105
|
+
});
|
|
106
|
+
const metricSummary = buildComparisonMetricSummary(result.comparison);
|
|
107
|
+
return {
|
|
108
|
+
baselineDir: result.baselineDir,
|
|
109
|
+
comparisonDir,
|
|
110
|
+
label: profile.label,
|
|
111
|
+
...(metricSummary ? { metricSummary } : {}),
|
|
112
|
+
reason: null,
|
|
113
|
+
runId: profile.runId,
|
|
114
|
+
scenarioId: profile.scenarioId,
|
|
115
|
+
status: String(result.comparison.comparisonStatus),
|
|
116
|
+
summaryPath: layout.agentSummary,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
if (!isMissingPriorRunError(error)) {
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
baselineDir: null,
|
|
125
|
+
comparisonDir: null,
|
|
126
|
+
label: profile.label,
|
|
127
|
+
reason: error.message,
|
|
128
|
+
runId: profile.runId,
|
|
129
|
+
scenarioId: profile.scenarioId,
|
|
130
|
+
status: 'skipped',
|
|
131
|
+
summaryPath: null,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Compares live proof profiles against the latest trusted prior run for each scenario.
|
|
137
|
+
*
|
|
138
|
+
* @param {CompareLiveProfilesOptions} options
|
|
139
|
+
* @returns {Promise<LiveComparisonResult[]>}
|
|
140
|
+
*/
|
|
141
|
+
async function compareLiveProfilesToLatest({ outputDir, profiles, }) {
|
|
142
|
+
const comparisons = [];
|
|
143
|
+
for (const profile of profiles) {
|
|
144
|
+
comparisons.push(await compareLiveProfileToLatest({ outputDir, profile }));
|
|
145
|
+
}
|
|
146
|
+
return comparisons;
|
|
147
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
type CliArgs = import('./ios-simctl').CliArgs;
|
|
3
|
+
type IosGenericLiveOptions = {
|
|
4
|
+
agentDeviceExecutor?: import('./agent-device').CommandExecutor;
|
|
5
|
+
argentExecutor?: import('./argent').CommandExecutor;
|
|
6
|
+
delay?: (ms: number) => Promise<void>;
|
|
7
|
+
executor?: import('./ios-simctl').CommandExecutor;
|
|
8
|
+
};
|
|
9
|
+
type IosGenericLiveResult = {
|
|
10
|
+
aggregateSummary: import('./live-proof-summary').LiveProofSummaryResult;
|
|
11
|
+
outputDir: string;
|
|
12
|
+
preflightDir: string;
|
|
13
|
+
profileDir: string;
|
|
14
|
+
};
|
|
15
|
+
type SkippedInteractionProof = import('./live-proof-summary').LiveProofSkippedInteractionProofPointer;
|
|
16
|
+
/**
|
|
17
|
+
* Prints CLI usage.
|
|
18
|
+
*
|
|
19
|
+
* @param {{write: (message: string) => unknown}} [output]
|
|
20
|
+
* @returns {void}
|
|
21
|
+
*/
|
|
22
|
+
declare function usage(output?: {
|
|
23
|
+
write: (message: string) => unknown;
|
|
24
|
+
}): void;
|
|
25
|
+
/**
|
|
26
|
+
* Reads a JSON object from disk.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} filePath
|
|
29
|
+
* @returns {Record<string, unknown>}
|
|
30
|
+
*/
|
|
31
|
+
declare function readJson(filePath: string): Record<string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Resolves a stable scenario id from a scenario file.
|
|
34
|
+
*
|
|
35
|
+
* @param {{scenario: Record<string, unknown>, scenarioPath: string}} options
|
|
36
|
+
* @returns {string}
|
|
37
|
+
*/
|
|
38
|
+
declare function resolveScenarioId({ scenario, scenarioPath, }: {
|
|
39
|
+
scenario: Record<string, unknown>;
|
|
40
|
+
scenarioPath: string;
|
|
41
|
+
}): string;
|
|
42
|
+
/**
|
|
43
|
+
* Resolves the iOS bundle id from explicit input or ASL config.
|
|
44
|
+
*
|
|
45
|
+
* @param {{args: CliArgs, config: Record<string, unknown>}} options
|
|
46
|
+
* @returns {string | null}
|
|
47
|
+
*/
|
|
48
|
+
declare function resolveIosBundleId({ args, config, }: {
|
|
49
|
+
args: CliArgs;
|
|
50
|
+
config: Record<string, unknown>;
|
|
51
|
+
}): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Converts an optional run suffix into a path-safe segment.
|
|
54
|
+
*
|
|
55
|
+
* @param {unknown} value
|
|
56
|
+
* @returns {string | null}
|
|
57
|
+
*/
|
|
58
|
+
declare function normalizeRunSuffix(value: unknown): string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Applies an optional suffix to deterministic run ids.
|
|
61
|
+
*
|
|
62
|
+
* @param {string} baseRunId
|
|
63
|
+
* @param {string | null} suffix
|
|
64
|
+
* @returns {string}
|
|
65
|
+
*/
|
|
66
|
+
declare function buildRunId(baseRunId: string, suffix: string | null): string;
|
|
67
|
+
/**
|
|
68
|
+
* Throws if a profile or interaction proof failed before aggregate writing.
|
|
69
|
+
*
|
|
70
|
+
* @param {{kind: string, runDir: string, health: Record<string, unknown>, verdict?: Record<string, unknown>}} options
|
|
71
|
+
* @returns {void}
|
|
72
|
+
*/
|
|
73
|
+
declare function assertPassedRun({ health, kind, runDir, verdict, }: {
|
|
74
|
+
health: Record<string, unknown>;
|
|
75
|
+
kind: string;
|
|
76
|
+
runDir: string;
|
|
77
|
+
verdict?: Record<string, unknown>;
|
|
78
|
+
}): void;
|
|
79
|
+
/**
|
|
80
|
+
* Reports whether profile evidence is trusted enough to run sidecar interaction proofs.
|
|
81
|
+
*
|
|
82
|
+
* @param {{health: Record<string, unknown>, verdict: Record<string, unknown>}} run
|
|
83
|
+
* @returns {boolean}
|
|
84
|
+
*/
|
|
85
|
+
declare function isTrustedProfileRun({ health, verdict, }: {
|
|
86
|
+
health: Record<string, unknown>;
|
|
87
|
+
verdict: Record<string, unknown>;
|
|
88
|
+
}): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Builds skipped sidecar pointers for requested runners when the profile gate failed.
|
|
91
|
+
*
|
|
92
|
+
* @param {{requestedRunners: string[], runIdsByRunner: Record<string, string>, scenarioId: string, profileHealthStatus: unknown, profileVerdictStatus: unknown}} options
|
|
93
|
+
* @returns {SkippedInteractionProof[]}
|
|
94
|
+
*/
|
|
95
|
+
declare function buildSkippedInteractionProofs({ profileHealthStatus, profileVerdictStatus, requestedRunners, runIdsByRunner, scenarioId, }: {
|
|
96
|
+
profileHealthStatus: unknown;
|
|
97
|
+
profileVerdictStatus: unknown;
|
|
98
|
+
requestedRunners: string[];
|
|
99
|
+
runIdsByRunner: Record<string, string>;
|
|
100
|
+
scenarioId: string;
|
|
101
|
+
}): SkippedInteractionProof[];
|
|
102
|
+
/**
|
|
103
|
+
* Throws after aggregate writing when the live proof itself failed.
|
|
104
|
+
*
|
|
105
|
+
* @param {IosGenericLiveResult} result
|
|
106
|
+
* @returns {void}
|
|
107
|
+
*/
|
|
108
|
+
declare function assertAggregatePassed(result: IosGenericLiveResult): void;
|
|
109
|
+
/**
|
|
110
|
+
* Throws after aggregate proof writing when fail-on-regression should gate the run.
|
|
111
|
+
*
|
|
112
|
+
* @param {{result: IosGenericLiveResult, comparisons: Array<{label: string, status: string}>}} options
|
|
113
|
+
* @returns {void}
|
|
114
|
+
*/
|
|
115
|
+
declare function assertNoRegressedComparisons({ comparisons, result, }: {
|
|
116
|
+
comparisons: Array<{
|
|
117
|
+
label: string;
|
|
118
|
+
status: string;
|
|
119
|
+
}>;
|
|
120
|
+
result: IosGenericLiveResult;
|
|
121
|
+
}): void;
|
|
122
|
+
/**
|
|
123
|
+
* Runs a generic one-scenario iOS live proof.
|
|
124
|
+
*
|
|
125
|
+
* @param {CliArgs} args
|
|
126
|
+
* @param {IosGenericLiveOptions} [options]
|
|
127
|
+
* @returns {Promise<IosGenericLiveResult>}
|
|
128
|
+
*/
|
|
129
|
+
declare function runIosLiveProof(args: CliArgs, options?: IosGenericLiveOptions): Promise<IosGenericLiveResult>;
|
|
130
|
+
/**
|
|
131
|
+
* Runs the generic iOS live CLI.
|
|
132
|
+
*
|
|
133
|
+
* @returns {Promise<void>}
|
|
134
|
+
*/
|
|
135
|
+
declare function main(): Promise<void>;
|
|
136
|
+
export { assertNoRegressedComparisons, assertAggregatePassed, assertPassedRun, buildRunId, buildSkippedInteractionProofs, isTrustedProfileRun, main, normalizeRunSuffix, readJson, resolveIosBundleId, resolveScenarioId, runIosLiveProof, usage, };
|
|
137
|
+
export type { IosGenericLiveOptions, IosGenericLiveResult, };
|