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.
Files changed (87) hide show
  1. package/README.md +9 -9
  2. package/app/profile-session.ts +352 -12
  3. package/dist/core/agent-summary.d.ts +3 -2
  4. package/dist/core/agent-summary.js +44 -2
  5. package/dist/core/artifact-contract.d.ts +28 -8
  6. package/dist/core/artifact-contract.js +676 -26
  7. package/dist/core/comparison.d.ts +57 -3
  8. package/dist/core/comparison.js +113 -1
  9. package/dist/core/planner.d.ts +32 -1
  10. package/dist/core/planner.js +144 -0
  11. package/dist/core/run-index.d.ts +4 -0
  12. package/dist/core/run-index.js +55 -1
  13. package/dist/core/schema-validator.d.ts +2 -0
  14. package/dist/core/schema-validator.js +2 -0
  15. package/dist/runner/android-adb-driver.d.ts +7 -2
  16. package/dist/runner/android-adb-driver.js +7 -1
  17. package/dist/runner/android-adb.d.ts +40 -5
  18. package/dist/runner/android-adb.js +1046 -664
  19. package/dist/runner/compare-latest.d.ts +8 -4
  20. package/dist/runner/compare-latest.js +24 -5
  21. package/dist/runner/example-android-live.d.ts +10 -1
  22. package/dist/runner/example-android-live.js +55 -0
  23. package/dist/runner/example-ios-live.d.ts +10 -1
  24. package/dist/runner/example-ios-live.js +55 -0
  25. package/dist/runner/ios-simctl.d.ts +6 -0
  26. package/dist/runner/ios-simctl.js +7 -0
  27. package/dist/runner/live-comparison.d.ts +2 -2
  28. package/dist/runner/live-comparison.js +2 -1
  29. package/dist/runner/live-proof-summary.d.ts +5 -4
  30. package/dist/runner/live-proof-summary.js +12 -2
  31. package/dist/runner/live-proof.d.ts +3 -2
  32. package/dist/runner/live-proof.js +9 -2
  33. package/dist/runner/profile-android.d.ts +16 -1
  34. package/dist/runner/profile-android.js +364 -26
  35. package/dist/runner/profile-ios.d.ts +13 -2
  36. package/dist/runner/profile-ios.js +341 -19
  37. package/dist/runner/profile-mobile.d.ts +39 -3
  38. package/dist/runner/profile-mobile.js +1054 -42
  39. package/dist/runner/validate-project.js +3 -0
  40. package/dist/scripts/consumer-rehearsal.d.ts +119 -0
  41. package/dist/scripts/consumer-rehearsal.js +757 -0
  42. package/dist/scripts/downstream-local-package-gate.d.ts +2 -0
  43. package/dist/scripts/downstream-local-package-gate.js +264 -0
  44. package/dist/scripts/package-smoke.d.ts +96 -0
  45. package/dist/scripts/package-smoke.js +2282 -0
  46. package/dist/scripts/release-readiness.d.ts +2 -0
  47. package/dist/scripts/release-readiness.js +520 -0
  48. package/docs/adapters.md +7 -1
  49. package/docs/api.md +2 -2
  50. package/docs/architecture.md +90 -0
  51. package/docs/authoring.md +39 -3
  52. package/docs/concepts.md +3 -24
  53. package/docs/consumer-rehearsal.md +31 -1
  54. package/docs/contracts.md +45 -101
  55. package/docs/external-adapter-protocol.md +219 -0
  56. package/docs/live-proofs.md +86 -3
  57. package/docs/principles.md +9 -15
  58. package/examples/mobile-app/README.md +12 -0
  59. package/examples/mobile-app/runner-manifests/evidence-provider.json +3 -3
  60. package/examples/mobile-app/runner-manifests/primary-runner.json +1 -0
  61. package/examples/mobile-app/scripts/asl-capture-profiler-provider.mjs +25 -0
  62. package/examples/runners/README.md +4 -3
  63. package/examples/runners/adb-android.json +1 -0
  64. package/examples/runners/agent-device-android.json +1 -0
  65. package/examples/runners/agent-device-ios.json +1 -0
  66. package/examples/runners/argent-android.json +1 -0
  67. package/examples/runners/argent-ios.json +1 -0
  68. package/examples/runners/axe-accessibility-provider.json +2 -2
  69. package/examples/runners/script-accessibility-provider.json +2 -2
  70. package/examples/runners/script-memory-provider.json +2 -2
  71. package/examples/runners/script-network-provider.json +2 -2
  72. package/examples/runners/script-profiler-provider.json +2 -2
  73. package/examples/runners/xcodebuildmcp-ios.json +1 -0
  74. package/package.json +12 -3
  75. package/schemas/causal-run.schema.json +85 -2
  76. package/schemas/comparison.schema.json +130 -2
  77. package/schemas/external-adapter-message.schema.json +693 -0
  78. package/schemas/health.schema.json +72 -0
  79. package/schemas/live-proof-set.schema.json +1 -1
  80. package/schemas/live-proof.schema.json +14 -6
  81. package/schemas/manifest.schema.json +515 -4
  82. package/schemas/profiler.schema.json +243 -0
  83. package/schemas/runner-capabilities.schema.json +28 -2
  84. package/schemas/scenario.schema.json +34 -2
  85. package/templates/evidence-provider.json +3 -3
  86. package/templates/primary-runner.json +1 -0
  87. package/templates/scripts/asl-capture-profiler-provider.mjs +20 -0
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "comparisonStatus": {
35
35
  "type": "string",
36
- "enum": ["better", "worse", "unchanged", "mixed", "inconclusive"]
36
+ "enum": ["better", "worse", "unchanged", "mixed", "inconclusive", "low_confidence"]
37
37
  },
38
38
  "healthStatus": {
39
39
  "type": "string",
@@ -46,6 +46,9 @@
46
46
  "comparisonBasis": {
47
47
  "$ref": "#/$defs/comparisonBasis"
48
48
  },
49
+ "measurementPolicy": {
50
+ "$ref": "#/$defs/measurementPolicy"
51
+ },
49
52
  "metricComparisons": {
50
53
  "type": "array",
51
54
  "items": {
@@ -135,6 +138,10 @@
135
138
  "type": "string",
136
139
  "pattern": "^[a-f0-9]{64}$"
137
140
  },
141
+ "cohortHash": {
142
+ "type": "string",
143
+ "pattern": "^[a-f0-9]{64}$"
144
+ },
138
145
  "selectedRunDir": {
139
146
  "type": "string"
140
147
  },
@@ -159,6 +166,10 @@
159
166
  "trustedScenarioContractCandidates": {
160
167
  "type": "integer",
161
168
  "minimum": 0
169
+ },
170
+ "trustedCohortCandidates": {
171
+ "type": "integer",
172
+ "minimum": 0
162
173
  }
163
174
  }
164
175
  },
@@ -185,12 +196,129 @@
185
196
  },
186
197
  "status": {
187
198
  "type": "string",
188
- "enum": ["better", "worse", "unchanged", "inconclusive"]
199
+ "enum": ["better", "worse", "unchanged", "inconclusive", "low_confidence"]
189
200
  },
190
201
  "notes": {
191
202
  "type": "string"
192
203
  }
193
204
  }
205
+ },
206
+ "measurementPolicy": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "required": ["baselineSelection", "samples", "tolerance", "confidence"],
210
+ "properties": {
211
+ "baselineSelection": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": ["mode", "poisoningProtection"],
215
+ "properties": {
216
+ "mode": {
217
+ "type": "string",
218
+ "enum": ["explicit", "latestTrustedPrior"]
219
+ },
220
+ "poisoningProtection": {
221
+ "type": "object",
222
+ "additionalProperties": false,
223
+ "required": ["requirePassedHealth", "requirePassedVerdict", "requireMatchingScenarioId"],
224
+ "properties": {
225
+ "requirePassedHealth": {
226
+ "type": "boolean"
227
+ },
228
+ "requirePassedVerdict": {
229
+ "type": "boolean"
230
+ },
231
+ "requireMatchingScenarioId": {
232
+ "type": "boolean"
233
+ },
234
+ "comparisonLane": {
235
+ "type": "string"
236
+ },
237
+ "scenarioHash": {
238
+ "type": "string",
239
+ "pattern": "^[a-f0-9]{64}$"
240
+ },
241
+ "cohortHash": {
242
+ "type": "string",
243
+ "pattern": "^[a-f0-9]{64}$"
244
+ }
245
+ }
246
+ }
247
+ }
248
+ },
249
+ "samples": {
250
+ "type": "object",
251
+ "additionalProperties": false,
252
+ "required": ["baseline", "current"],
253
+ "properties": {
254
+ "baseline": {
255
+ "$ref": "#/$defs/samplePolicy"
256
+ },
257
+ "current": {
258
+ "$ref": "#/$defs/samplePolicy"
259
+ }
260
+ }
261
+ },
262
+ "tolerance": {
263
+ "type": "object",
264
+ "additionalProperties": false,
265
+ "required": ["timing"],
266
+ "properties": {
267
+ "timing": {
268
+ "type": "object",
269
+ "additionalProperties": false,
270
+ "required": ["absoluteMs", "relative"],
271
+ "properties": {
272
+ "absoluteMs": {
273
+ "type": "number",
274
+ "minimum": 0
275
+ },
276
+ "relative": {
277
+ "type": "number",
278
+ "minimum": 0
279
+ }
280
+ }
281
+ }
282
+ }
283
+ },
284
+ "confidence": {
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "required": ["level", "minValidSamples"],
288
+ "properties": {
289
+ "level": {
290
+ "type": "string",
291
+ "enum": ["single_run", "multi_sample", "insufficient", "low_confidence"]
292
+ },
293
+ "minValidSamples": {
294
+ "type": "integer",
295
+ "minimum": 1
296
+ },
297
+ "reason": {
298
+ "type": "string"
299
+ }
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "samplePolicy": {
305
+ "type": "object",
306
+ "additionalProperties": false,
307
+ "required": ["validSamples", "warmupSamples", "outliersExcluded"],
308
+ "properties": {
309
+ "validSamples": {
310
+ "type": "integer",
311
+ "minimum": 0
312
+ },
313
+ "warmupSamples": {
314
+ "type": "integer",
315
+ "minimum": 0
316
+ },
317
+ "outliersExcluded": {
318
+ "type": "integer",
319
+ "minimum": 0
320
+ }
321
+ }
194
322
  }
195
323
  }
196
324
  }