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
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agent-scenario-loop.dev/schemas/profiler.schema.json",
|
|
4
|
+
"title": "Agent Scenario Loop Profiler Evidence",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": ["schemaVersion", "providerId", "platform", "runId", "scenarioId"],
|
|
8
|
+
"anyOf": [
|
|
9
|
+
{ "required": ["summary"] },
|
|
10
|
+
{ "required": ["samples"] },
|
|
11
|
+
{ "required": ["metrics"] },
|
|
12
|
+
{ "required": ["events"] },
|
|
13
|
+
{ "required": ["traces"] },
|
|
14
|
+
{ "required": ["profile"] },
|
|
15
|
+
{ "required": ["attachments"] }
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
},
|
|
22
|
+
"providerId": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1
|
|
25
|
+
},
|
|
26
|
+
"platform": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"enum": ["android", "ios", "unknown"]
|
|
29
|
+
},
|
|
30
|
+
"runId": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1
|
|
33
|
+
},
|
|
34
|
+
"scenarioId": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"tool": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": true,
|
|
41
|
+
"properties": {
|
|
42
|
+
"name": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
},
|
|
46
|
+
"version": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"capturedAt": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1
|
|
55
|
+
},
|
|
56
|
+
"durationMs": {
|
|
57
|
+
"type": "number",
|
|
58
|
+
"minimum": 0
|
|
59
|
+
},
|
|
60
|
+
"clockDomain": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"captureMode": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": ["passive-report", "session", "inline", "afterCapture", "postRun", "rehydrated", "unknown"]
|
|
67
|
+
},
|
|
68
|
+
"profileKind": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": ["raw-profile", "cpu-summary", "render-summary", "commit-log", "trace", "native-trace", "diagnostic-summary", "mixed", "unknown"]
|
|
71
|
+
},
|
|
72
|
+
"dataClasses": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["cpu-samples", "react-commits", "render-events", "js-thread-stalls", "native-trace", "network", "memory", "frames", "unknown"]
|
|
77
|
+
},
|
|
78
|
+
"uniqueItems": true
|
|
79
|
+
},
|
|
80
|
+
"completenessStatus": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"enum": ["complete", "partial", "truncated", "failed", "unknown"]
|
|
83
|
+
},
|
|
84
|
+
"comparability": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": true,
|
|
87
|
+
"required": ["status"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"status": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": ["comparable", "diagnostic-only", "captured-not-comparable", "low-confidence", "incomplete", "unknown"]
|
|
92
|
+
},
|
|
93
|
+
"reason": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"minLength": 1
|
|
96
|
+
},
|
|
97
|
+
"policy": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"lifecycle": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": true,
|
|
106
|
+
"properties": {
|
|
107
|
+
"phase": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"enum": ["beforeRun", "activeLoop", "afterCapture", "postRun", "rehydrated", "unknown"]
|
|
110
|
+
},
|
|
111
|
+
"startedAt": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1
|
|
114
|
+
},
|
|
115
|
+
"endedAt": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"minLength": 1
|
|
118
|
+
},
|
|
119
|
+
"durationMs": {
|
|
120
|
+
"type": "number",
|
|
121
|
+
"minimum": 0
|
|
122
|
+
},
|
|
123
|
+
"perturbsTiming": {
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
},
|
|
126
|
+
"events": {
|
|
127
|
+
"type": "array",
|
|
128
|
+
"items": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": true,
|
|
131
|
+
"required": ["name"],
|
|
132
|
+
"properties": {
|
|
133
|
+
"name": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1
|
|
136
|
+
},
|
|
137
|
+
"at": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"minLength": 1
|
|
140
|
+
},
|
|
141
|
+
"atMs": {
|
|
142
|
+
"type": "number",
|
|
143
|
+
"minimum": 0
|
|
144
|
+
},
|
|
145
|
+
"status": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"targetBinding": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": true,
|
|
157
|
+
"required": ["status"],
|
|
158
|
+
"properties": {
|
|
159
|
+
"status": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"enum": ["verified", "ambiguous", "unverified", "mismatch", "unknown"]
|
|
162
|
+
},
|
|
163
|
+
"deviceId": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"minLength": 1
|
|
166
|
+
},
|
|
167
|
+
"appId": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1
|
|
170
|
+
},
|
|
171
|
+
"source": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"minLength": 1
|
|
174
|
+
},
|
|
175
|
+
"reason": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"minLength": 1
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"summary": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1
|
|
184
|
+
},
|
|
185
|
+
"samples": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"additionalProperties": true
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"events": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"items": {
|
|
195
|
+
"type": "object",
|
|
196
|
+
"additionalProperties": true
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"traces": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"items": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"additionalProperties": true
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"metrics": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"additionalProperties": {
|
|
209
|
+
"type": ["number", "integer", "string", "boolean", "null"]
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"profile": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"additionalProperties": true
|
|
215
|
+
},
|
|
216
|
+
"attachments": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"required": ["kind", "path"],
|
|
222
|
+
"properties": {
|
|
223
|
+
"kind": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"minLength": 1
|
|
226
|
+
},
|
|
227
|
+
"path": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"minLength": 1
|
|
230
|
+
},
|
|
231
|
+
"sha256": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"minLength": 1
|
|
234
|
+
},
|
|
235
|
+
"sizeBytes": {
|
|
236
|
+
"type": "integer",
|
|
237
|
+
"minimum": 0
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
@@ -60,6 +60,13 @@
|
|
|
60
60
|
"$ref": "#/$defs/driverAction"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
+
"uiContexts": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"uniqueItems": true,
|
|
66
|
+
"items": {
|
|
67
|
+
"$ref": "#/$defs/uiContext"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
63
70
|
"artifactOutputs": {
|
|
64
71
|
"type": "array",
|
|
65
72
|
"uniqueItems": true,
|
|
@@ -83,7 +90,9 @@
|
|
|
83
90
|
"finalize",
|
|
84
91
|
"startWindow",
|
|
85
92
|
"capture",
|
|
86
|
-
"stopWindow"
|
|
93
|
+
"stopWindow",
|
|
94
|
+
"afterCapture",
|
|
95
|
+
"postRun"
|
|
87
96
|
]
|
|
88
97
|
}
|
|
89
98
|
},
|
|
@@ -143,6 +152,19 @@
|
|
|
143
152
|
"collectPerfSignals"
|
|
144
153
|
]
|
|
145
154
|
},
|
|
155
|
+
"uiContext": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": [
|
|
158
|
+
"app",
|
|
159
|
+
"systemDialog",
|
|
160
|
+
"notificationShade",
|
|
161
|
+
"externalBrowser",
|
|
162
|
+
"webView",
|
|
163
|
+
"shareSheet",
|
|
164
|
+
"picker",
|
|
165
|
+
"otherApp"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
146
168
|
"providerCommand": {
|
|
147
169
|
"type": "object",
|
|
148
170
|
"additionalProperties": false,
|
|
@@ -154,7 +176,7 @@
|
|
|
154
176
|
},
|
|
155
177
|
"phase": {
|
|
156
178
|
"type": "string",
|
|
157
|
-
"enum": ["prepare", "startWindow", "capture", "stopWindow", "finalize"]
|
|
179
|
+
"enum": ["prepare", "startWindow", "capture", "stopWindow", "afterCapture", "postRun", "finalize"]
|
|
158
180
|
},
|
|
159
181
|
"command": {
|
|
160
182
|
"type": "string",
|
|
@@ -210,6 +232,10 @@
|
|
|
210
232
|
"path": {
|
|
211
233
|
"type": "string",
|
|
212
234
|
"minLength": 1
|
|
235
|
+
},
|
|
236
|
+
"required": {
|
|
237
|
+
"type": "boolean",
|
|
238
|
+
"description": "Marks this provider output as required evidence for diagnostic inventory and health evaluation when the output is not captured."
|
|
213
239
|
}
|
|
214
240
|
}
|
|
215
241
|
}
|
|
@@ -159,6 +159,20 @@
|
|
|
159
159
|
"stopOnFailure": {
|
|
160
160
|
"type": "boolean",
|
|
161
161
|
"default": true
|
|
162
|
+
},
|
|
163
|
+
"setupStepIds": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"uniqueItems": true,
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"bodyStepIds": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"uniqueItems": true,
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
}
|
|
162
176
|
}
|
|
163
177
|
}
|
|
164
178
|
},
|
|
@@ -287,10 +301,12 @@
|
|
|
287
301
|
"type": ["number", "integer", "boolean"]
|
|
288
302
|
},
|
|
289
303
|
"fromMilestone": {
|
|
290
|
-
"type": "string"
|
|
304
|
+
"type": "string",
|
|
305
|
+
"description": "Optional start milestone for interval timing. When paired with toMilestone on a milestone timing budget, ASL measures toMilestone - fromMilestone for each iteration."
|
|
291
306
|
},
|
|
292
307
|
"toMilestone": {
|
|
293
|
-
"type": "string"
|
|
308
|
+
"type": "string",
|
|
309
|
+
"description": "Target milestone for milestone timing. Without fromMilestone, ASL measures elapsed time from the run or session clock origin to this milestone occurrence."
|
|
294
310
|
},
|
|
295
311
|
"artifact": {
|
|
296
312
|
"$ref": "#/$defs/artifactKind"
|
|
@@ -331,6 +347,9 @@
|
|
|
331
347
|
"selector": {
|
|
332
348
|
"$ref": "#/$defs/selector"
|
|
333
349
|
},
|
|
350
|
+
"uiContext": {
|
|
351
|
+
"$ref": "#/$defs/uiContext"
|
|
352
|
+
},
|
|
334
353
|
"timeoutMs": {
|
|
335
354
|
"type": "integer",
|
|
336
355
|
"minimum": 1
|
|
@@ -361,6 +380,19 @@
|
|
|
361
380
|
"collectPerfSignals"
|
|
362
381
|
]
|
|
363
382
|
},
|
|
383
|
+
"uiContext": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"enum": [
|
|
386
|
+
"app",
|
|
387
|
+
"systemDialog",
|
|
388
|
+
"notificationShade",
|
|
389
|
+
"externalBrowser",
|
|
390
|
+
"webView",
|
|
391
|
+
"shareSheet",
|
|
392
|
+
"picker",
|
|
393
|
+
"otherApp"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
364
396
|
"selector": {
|
|
365
397
|
"type": "object",
|
|
366
398
|
"additionalProperties": false,
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"capabilities": ["accessibility", "memory", "network", "profiler"],
|
|
7
7
|
"driverActions": ["collectPerfSignals"],
|
|
8
8
|
"artifactOutputs": ["accessibility", "memory", "network", "profiler", "signals"],
|
|
9
|
-
"lifecycle": ["prepare", "startWindow", "capture", "stopWindow", "finalize"],
|
|
9
|
+
"lifecycle": ["prepare", "startWindow", "capture", "stopWindow", "afterCapture", "finalize"],
|
|
10
10
|
"providerCommands": [
|
|
11
11
|
{
|
|
12
12
|
"id": "capture-accessibility",
|
|
13
|
-
"phase": "
|
|
13
|
+
"phase": "afterCapture",
|
|
14
14
|
"command": "node",
|
|
15
15
|
"cwd": "..",
|
|
16
16
|
"args": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"id": "capture-profiler",
|
|
37
|
-
"phase": "
|
|
37
|
+
"phase": "afterCapture",
|
|
38
38
|
"command": "node",
|
|
39
39
|
"cwd": "..",
|
|
40
40
|
"args": [
|
|
@@ -80,6 +80,26 @@ function writeProviderEvidence({
|
|
|
80
80
|
|
|
81
81
|
writeJsonArtifact(outPath, {
|
|
82
82
|
...shared,
|
|
83
|
+
captureMode: 'afterCapture',
|
|
84
|
+
completenessStatus: 'partial',
|
|
85
|
+
comparability: {
|
|
86
|
+
status: 'diagnostic-only',
|
|
87
|
+
reason: 'Scaffold evidence is collected after the profile window and is not comparable timing data.',
|
|
88
|
+
},
|
|
89
|
+
dataClasses: ['unknown'],
|
|
90
|
+
lifecycle: {
|
|
91
|
+
phase: 'afterCapture',
|
|
92
|
+
perturbsTiming: false,
|
|
93
|
+
},
|
|
94
|
+
profileKind: 'diagnostic-summary',
|
|
95
|
+
targetBinding: {
|
|
96
|
+
status: 'unverified',
|
|
97
|
+
reason: 'Replace this scaffold provider with a project-local profiler that verifies its target device and app.',
|
|
98
|
+
},
|
|
99
|
+
tool: {
|
|
100
|
+
name: 'agent-scenario-loop scaffold profiler',
|
|
101
|
+
version: '1.0.0',
|
|
102
|
+
},
|
|
83
103
|
samples: [],
|
|
84
104
|
summary: 'Replace this scaffold provider with a project-local profiler command when real profiler data is available.',
|
|
85
105
|
});
|