agent-scenario-loop 0.1.2 → 0.1.4
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/README.md +9 -9
- package/app/profile-session.ts +352 -12
- package/dist/core/agent-summary.d.ts +3 -2
- package/dist/core/agent-summary.js +44 -2
- package/dist/core/artifact-contract.d.ts +28 -8
- package/dist/core/artifact-contract.js +676 -26
- package/dist/core/comparison.d.ts +57 -3
- package/dist/core/comparison.js +113 -1
- package/dist/core/planner.d.ts +32 -1
- package/dist/core/planner.js +144 -0
- package/dist/core/run-index.d.ts +4 -0
- package/dist/core/run-index.js +55 -1
- package/dist/core/schema-validator.d.ts +2 -0
- package/dist/core/schema-validator.js +2 -0
- package/dist/runner/android-adb-driver.d.ts +7 -2
- package/dist/runner/android-adb-driver.js +7 -1
- package/dist/runner/android-adb.d.ts +40 -5
- package/dist/runner/android-adb.js +1046 -664
- package/dist/runner/compare-latest.d.ts +8 -4
- package/dist/runner/compare-latest.js +24 -5
- package/dist/runner/example-android-live.d.ts +10 -1
- package/dist/runner/example-android-live.js +55 -0
- package/dist/runner/example-ios-live.d.ts +10 -1
- package/dist/runner/example-ios-live.js +55 -0
- package/dist/runner/ios-simctl.d.ts +6 -0
- package/dist/runner/ios-simctl.js +7 -0
- package/dist/runner/live-comparison.d.ts +2 -2
- package/dist/runner/live-comparison.js +2 -1
- package/dist/runner/live-proof-summary.d.ts +5 -4
- package/dist/runner/live-proof-summary.js +12 -2
- package/dist/runner/live-proof.d.ts +3 -2
- package/dist/runner/live-proof.js +9 -2
- package/dist/runner/profile-android.d.ts +16 -1
- package/dist/runner/profile-android.js +364 -26
- package/dist/runner/profile-ios.d.ts +13 -2
- package/dist/runner/profile-ios.js +341 -19
- package/dist/runner/profile-mobile.d.ts +39 -3
- package/dist/runner/profile-mobile.js +1054 -42
- package/dist/runner/validate-project.js +3 -0
- package/dist/scripts/consumer-rehearsal.d.ts +119 -0
- package/dist/scripts/consumer-rehearsal.js +757 -0
- package/dist/scripts/downstream-local-package-gate.d.ts +2 -0
- package/dist/scripts/downstream-local-package-gate.js +264 -0
- package/dist/scripts/package-smoke.d.ts +96 -0
- package/dist/scripts/package-smoke.js +2282 -0
- package/dist/scripts/release-readiness.d.ts +2 -0
- package/dist/scripts/release-readiness.js +520 -0
- package/docs/adapters.md +7 -1
- package/docs/api.md +2 -2
- package/docs/architecture.md +90 -0
- package/docs/authoring.md +39 -3
- package/docs/concepts.md +3 -24
- package/docs/consumer-rehearsal.md +31 -1
- package/docs/contracts.md +45 -101
- package/docs/external-adapter-protocol.md +219 -0
- package/docs/live-proofs.md +86 -3
- package/docs/principles.md +9 -15
- package/examples/mobile-app/README.md +12 -0
- package/examples/mobile-app/runner-manifests/evidence-provider.json +3 -3
- package/examples/mobile-app/runner-manifests/primary-runner.json +1 -0
- package/examples/mobile-app/scripts/asl-capture-profiler-provider.mjs +25 -0
- package/examples/runners/README.md +4 -3
- package/examples/runners/adb-android.json +1 -0
- package/examples/runners/agent-device-android.json +1 -0
- package/examples/runners/agent-device-ios.json +1 -0
- package/examples/runners/argent-android.json +1 -0
- package/examples/runners/argent-ios.json +1 -0
- package/examples/runners/axe-accessibility-provider.json +2 -2
- package/examples/runners/script-accessibility-provider.json +2 -2
- package/examples/runners/script-memory-provider.json +2 -2
- package/examples/runners/script-network-provider.json +2 -2
- package/examples/runners/script-profiler-provider.json +2 -2
- package/examples/runners/xcodebuildmcp-ios.json +1 -0
- package/package.json +12 -3
- package/schemas/causal-run.schema.json +85 -2
- package/schemas/comparison.schema.json +130 -2
- package/schemas/external-adapter-message.schema.json +693 -0
- package/schemas/health.schema.json +72 -0
- package/schemas/live-proof-set.schema.json +1 -1
- package/schemas/live-proof.schema.json +14 -6
- package/schemas/manifest.schema.json +515 -4
- package/schemas/profiler.schema.json +243 -0
- package/schemas/runner-capabilities.schema.json +28 -2
- package/schemas/scenario.schema.json +34 -2
- package/templates/evidence-provider.json +3 -3
- package/templates/primary-runner.json +1 -0
- package/templates/scripts/asl-capture-profiler-provider.mjs +20 -0
|
@@ -8,6 +8,12 @@ type ProfileEvent = ArtifactRecord & {
|
|
|
8
8
|
atMs?: number;
|
|
9
9
|
timestamp?: number | string;
|
|
10
10
|
};
|
|
11
|
+
type ProfileSessionEntry = ArtifactRecord & {
|
|
12
|
+
kind?: string;
|
|
13
|
+
scenario?: string;
|
|
14
|
+
runId?: string;
|
|
15
|
+
timestamp?: number | string;
|
|
16
|
+
};
|
|
11
17
|
type BudgetCheck = {
|
|
12
18
|
name: string;
|
|
13
19
|
actual: unknown;
|
|
@@ -36,13 +42,24 @@ declare function extractProfileEvents(logText: string, filters?: {
|
|
|
36
42
|
runId?: string;
|
|
37
43
|
scenario?: string;
|
|
38
44
|
}): ProfileEvent[];
|
|
45
|
+
/**
|
|
46
|
+
* Extracts structured profile-session entries from device logs.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} logText
|
|
49
|
+
* @param {{runId?: string, scenario?: string}} [filters]
|
|
50
|
+
* @returns {Record<string, unknown>[]}
|
|
51
|
+
*/
|
|
52
|
+
declare function extractProfileSessionEntries(logText: string, filters?: {
|
|
53
|
+
runId?: string;
|
|
54
|
+
scenario?: string;
|
|
55
|
+
}): ProfileSessionEntry[];
|
|
39
56
|
/**
|
|
40
57
|
* Builds timing metrics from app-emitted profile events.
|
|
41
58
|
*
|
|
42
|
-
* @param {{scenario: string, runId: string, events: Record<string, unknown>[], expectedIterations: number, timeoutCount?: number, artifacts?: Record<string, unknown>, cycleEventNames?: Record<string, string> | null, budgets?: Record<string, unknown> | null}} options
|
|
59
|
+
* @param {{scenario: string, runId: string, events: Record<string, unknown>[], expectedIterations: number, timeoutCount?: number, artifacts?: Record<string, unknown>, cycleEventNames?: Record<string, string> | null, milestoneEventsPerIteration?: number, budgets?: Record<string, unknown> | null}} options
|
|
43
60
|
* @returns {Record<string, unknown>}
|
|
44
61
|
*/
|
|
45
|
-
declare function buildMetricsFromProfileEvents({ scenario, runId, events, expectedIterations, timeoutCount, artifacts, cycleEventNames, budgets, }: {
|
|
62
|
+
declare function buildMetricsFromProfileEvents({ scenario, runId, events, expectedIterations, timeoutCount, artifacts, cycleEventNames, milestoneEventsPerIteration, budgets, }: {
|
|
46
63
|
scenario: string;
|
|
47
64
|
runId: string;
|
|
48
65
|
events: ProfileEvent[];
|
|
@@ -50,17 +67,19 @@ declare function buildMetricsFromProfileEvents({ scenario, runId, events, expect
|
|
|
50
67
|
timeoutCount?: number;
|
|
51
68
|
artifacts?: ArtifactRecord;
|
|
52
69
|
cycleEventNames?: ArtifactRecord | null;
|
|
70
|
+
milestoneEventsPerIteration?: number;
|
|
53
71
|
budgets?: ArtifactRecord | null;
|
|
54
72
|
}): ArtifactRecord;
|
|
55
73
|
/**
|
|
56
74
|
* Evaluates configured profile budgets against generated metrics.
|
|
57
75
|
*
|
|
58
|
-
* @param {{metrics: Record<string, unknown>, budgets?: Record<string, unknown> | null}} options
|
|
76
|
+
* @param {{metrics: Record<string, unknown>, budgets?: Record<string, unknown> | null, extraChecks?: BudgetCheck[]}} options
|
|
59
77
|
* @returns {Record<string, unknown> | null}
|
|
60
78
|
*/
|
|
61
|
-
declare function evaluateProfileBudgets({ metrics, budgets }: {
|
|
79
|
+
declare function evaluateProfileBudgets({ metrics, budgets, extraChecks, }: {
|
|
62
80
|
metrics: ArtifactRecord;
|
|
63
81
|
budgets?: ArtifactRecord | null;
|
|
82
|
+
extraChecks?: BudgetCheck[];
|
|
64
83
|
}): ArtifactRecord | null;
|
|
65
84
|
/**
|
|
66
85
|
* Recursively sorts object keys and array values for stable JSON artifacts.
|
|
@@ -75,8 +94,9 @@ declare function sortValue(value: any): any;
|
|
|
75
94
|
* @param {{events: Record<string, unknown>[], startedAt?: string, phaseMap?: Record<string, string> | null, owner?: string | null}} options
|
|
76
95
|
* @returns {Record<string, unknown>[]}
|
|
77
96
|
*/
|
|
78
|
-
declare function buildCausalTimeline({ events, startedAt, phaseMap, owner, }: {
|
|
97
|
+
declare function buildCausalTimeline({ events, sessionEntries, startedAt, phaseMap, owner, }: {
|
|
79
98
|
events: ProfileEvent[];
|
|
99
|
+
sessionEntries?: ProfileSessionEntry[];
|
|
80
100
|
startedAt?: string;
|
|
81
101
|
phaseMap?: ArtifactRecord | null;
|
|
82
102
|
owner?: string | null;
|
|
@@ -107,7 +127,7 @@ declare function buildCausalRun({ scenario, flowId, runId, platform, buildFlavor
|
|
|
107
127
|
* @param {Record<string, unknown>} options
|
|
108
128
|
* @returns {Record<string, unknown>}
|
|
109
129
|
*/
|
|
110
|
-
declare function buildManifest({ scenario, scenarioHash, runId, platform, status, startedAt, endedAt, interactionDriver, comparisonLane, simulator, bundleId, gitSha, toolVersions, artifacts, failureReason, }: ArtifactRecord): ArtifactRecord;
|
|
130
|
+
declare function buildManifest({ scenario, scenarioHash, runId, attemptId, attemptNumber, maxAttempts, retryOfAttemptId, retryReason, platform, status, terminalState, startedAt, endedAt, interactionDriver, comparisonLane, classification, cleanup, partialArtifacts, preconditions, postconditions, simulator, bundleId, gitSha, toolVersions, cohort, artifacts, failureReason, }: ArtifactRecord): ArtifactRecord;
|
|
111
131
|
/**
|
|
112
132
|
* Builds the human-readable profile summary.
|
|
113
133
|
*
|
|
@@ -147,5 +167,5 @@ declare function evaluateUiContract({ rawDescription, requiredIdentifierPatterns
|
|
|
147
167
|
checks: ArtifactRecord[];
|
|
148
168
|
missingPatterns: string[];
|
|
149
169
|
};
|
|
150
|
-
export { PROFILE_EVENT_PREFIX, buildBudgetVerdict, buildCausalRun, buildCausalTimeline, buildManifest, buildMetricsFromProfileEvents, buildSummaryMarkdown, evaluateUiContract, evaluateProfileBudgets, extractCandidateIdentifiers, extractProfileEvents, findMatchingIdentifier, percentile, sortValue, };
|
|
151
|
-
export type { ArtifactRecord, BudgetCheck, ProfileEvent, };
|
|
170
|
+
export { PROFILE_EVENT_PREFIX, buildBudgetVerdict, buildCausalRun, buildCausalTimeline, buildManifest, buildMetricsFromProfileEvents, buildSummaryMarkdown, evaluateUiContract, evaluateProfileBudgets, extractCandidateIdentifiers, extractProfileEvents, extractProfileSessionEntries, findMatchingIdentifier, percentile, sortValue, };
|
|
171
|
+
export type { ArtifactRecord, BudgetCheck, ProfileEvent, ProfileSessionEntry, };
|