agent-scenario-loop 0.1.3 → 0.1.5

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.
Files changed (52) hide show
  1. package/app/profile-session.ts +263 -17
  2. package/dist/core/artifact-contract.d.ts +6 -4
  3. package/dist/core/artifact-contract.js +164 -15
  4. package/dist/core/artifact-layout.d.ts +2 -0
  5. package/dist/core/artifact-layout.js +2 -0
  6. package/dist/core/planner.js +4 -3
  7. package/dist/core/schema-validator.d.ts +1 -0
  8. package/dist/core/schema-validator.js +1 -0
  9. package/dist/runner/android-adb-driver.d.ts +7 -2
  10. package/dist/runner/android-adb-driver.js +7 -1
  11. package/dist/runner/android-adb.d.ts +40 -5
  12. package/dist/runner/android-adb.js +1046 -664
  13. package/dist/runner/ios-simctl.d.ts +1 -0
  14. package/dist/runner/ios-simctl.js +1 -0
  15. package/dist/runner/profile-android.d.ts +11 -1
  16. package/dist/runner/profile-android.js +266 -25
  17. package/dist/runner/profile-ios.d.ts +3 -2
  18. package/dist/runner/profile-ios.js +252 -22
  19. package/dist/runner/profile-mobile.d.ts +63 -4
  20. package/dist/runner/profile-mobile.js +1002 -20
  21. package/dist/runner/validate-project.js +3 -0
  22. package/dist/scripts/consumer-rehearsal.d.ts +127 -0
  23. package/dist/scripts/consumer-rehearsal.js +774 -0
  24. package/dist/scripts/downstream-local-package-gate.d.ts +2 -0
  25. package/dist/scripts/downstream-local-package-gate.js +264 -0
  26. package/dist/scripts/package-smoke.d.ts +104 -0
  27. package/dist/scripts/package-smoke.js +2304 -0
  28. package/dist/scripts/release-check.d.ts +47 -0
  29. package/dist/scripts/release-check.js +117 -0
  30. package/dist/scripts/release-readiness.d.ts +2 -0
  31. package/dist/scripts/release-readiness.js +539 -0
  32. package/docs/adapters.md +3 -1
  33. package/docs/api.md +2 -2
  34. package/docs/authoring.md +34 -2
  35. package/docs/consumer-rehearsal.md +33 -1
  36. package/docs/contracts.md +16 -2
  37. package/docs/live-proofs.md +12 -4
  38. package/examples/mobile-app/runner-manifests/evidence-provider.json +3 -3
  39. package/examples/mobile-app/scripts/asl-capture-profiler-provider.mjs +25 -0
  40. package/examples/runners/README.md +3 -3
  41. package/examples/runners/axe-accessibility-provider.json +2 -2
  42. package/examples/runners/script-accessibility-provider.json +2 -2
  43. package/examples/runners/script-memory-provider.json +2 -2
  44. package/examples/runners/script-network-provider.json +2 -2
  45. package/examples/runners/script-profiler-provider.json +2 -2
  46. package/package.json +12 -4
  47. package/schemas/manifest.schema.json +73 -3
  48. package/schemas/profiler.schema.json +243 -0
  49. package/schemas/runner-capabilities.schema.json +8 -2
  50. package/schemas/scenario.schema.json +18 -2
  51. package/templates/evidence-provider.json +3 -3
  52. 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
+ }
@@ -90,7 +90,9 @@
90
90
  "finalize",
91
91
  "startWindow",
92
92
  "capture",
93
- "stopWindow"
93
+ "stopWindow",
94
+ "afterCapture",
95
+ "postRun"
94
96
  ]
95
97
  }
96
98
  },
@@ -174,7 +176,7 @@
174
176
  },
175
177
  "phase": {
176
178
  "type": "string",
177
- "enum": ["prepare", "startWindow", "capture", "stopWindow", "finalize"]
179
+ "enum": ["prepare", "startWindow", "capture", "stopWindow", "afterCapture", "postRun", "finalize"]
178
180
  },
179
181
  "command": {
180
182
  "type": "string",
@@ -230,6 +232,10 @@
230
232
  "path": {
231
233
  "type": "string",
232
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."
233
239
  }
234
240
  }
235
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"
@@ -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": "capture",
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": "capture",
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
  });