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.
Files changed (170) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/app/profile-session.ts +812 -0
  4. package/core/config-template.json +41 -0
  5. package/dist/core/agent-summary.d.ts +15 -0
  6. package/dist/core/agent-summary.js +177 -0
  7. package/dist/core/artifact-contract.d.ts +151 -0
  8. package/dist/core/artifact-contract.js +897 -0
  9. package/dist/core/artifact-layout.d.ts +56 -0
  10. package/dist/core/artifact-layout.js +61 -0
  11. package/dist/core/artifact-writer.d.ts +44 -0
  12. package/dist/core/artifact-writer.js +55 -0
  13. package/dist/core/comparison.d.ts +133 -0
  14. package/dist/core/comparison.js +294 -0
  15. package/dist/core/evidence-interpreter.d.ts +28 -0
  16. package/dist/core/evidence-interpreter.js +69 -0
  17. package/dist/core/execution-plan.d.ts +44 -0
  18. package/dist/core/execution-plan.js +95 -0
  19. package/dist/core/planner.d.ts +132 -0
  20. package/dist/core/planner.js +812 -0
  21. package/dist/core/ports.d.ts +198 -0
  22. package/dist/core/ports.js +146 -0
  23. package/dist/core/run-index.d.ts +62 -0
  24. package/dist/core/run-index.js +143 -0
  25. package/dist/core/schema-validator.d.ts +86 -0
  26. package/dist/core/schema-validator.js +407 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.js +27 -0
  29. package/dist/runner/agent-device-driver.d.ts +126 -0
  30. package/dist/runner/agent-device-driver.js +168 -0
  31. package/dist/runner/agent-device.d.ts +295 -0
  32. package/dist/runner/agent-device.js +1271 -0
  33. package/dist/runner/android-adb-driver.d.ts +175 -0
  34. package/dist/runner/android-adb-driver.js +399 -0
  35. package/dist/runner/android-adb.d.ts +254 -0
  36. package/dist/runner/android-adb.js +1618 -0
  37. package/dist/runner/argent-driver.d.ts +183 -0
  38. package/dist/runner/argent-driver.js +297 -0
  39. package/dist/runner/argent.d.ts +349 -0
  40. package/dist/runner/argent.js +1211 -0
  41. package/dist/runner/check-plan.d.ts +45 -0
  42. package/dist/runner/check-plan.js +210 -0
  43. package/dist/runner/cli.d.ts +20 -0
  44. package/dist/runner/cli.js +23 -0
  45. package/dist/runner/compare-latest.d.ts +99 -0
  46. package/dist/runner/compare-latest.js +233 -0
  47. package/dist/runner/compare.d.ts +58 -0
  48. package/dist/runner/compare.js +157 -0
  49. package/dist/runner/demo-loop.d.ts +45 -0
  50. package/dist/runner/demo-loop.js +170 -0
  51. package/dist/runner/example-android-live.d.ts +137 -0
  52. package/dist/runner/example-android-live.js +454 -0
  53. package/dist/runner/example-ios-live.d.ts +137 -0
  54. package/dist/runner/example-ios-live.js +471 -0
  55. package/dist/runner/host-doctor.d.ts +131 -0
  56. package/dist/runner/host-doctor.js +628 -0
  57. package/dist/runner/init-project.d.ts +88 -0
  58. package/dist/runner/init-project.js +263 -0
  59. package/dist/runner/ios-simctl-driver.d.ts +69 -0
  60. package/dist/runner/ios-simctl-driver.js +97 -0
  61. package/dist/runner/ios-simctl.d.ts +254 -0
  62. package/dist/runner/ios-simctl.js +1415 -0
  63. package/dist/runner/live-android.d.ts +137 -0
  64. package/dist/runner/live-android.js +539 -0
  65. package/dist/runner/live-comparison.d.ts +67 -0
  66. package/dist/runner/live-comparison.js +147 -0
  67. package/dist/runner/live-ios.d.ts +137 -0
  68. package/dist/runner/live-ios.js +460 -0
  69. package/dist/runner/live-proof-summary.d.ts +263 -0
  70. package/dist/runner/live-proof-summary.js +465 -0
  71. package/dist/runner/live-proof.d.ts +467 -0
  72. package/dist/runner/live-proof.js +920 -0
  73. package/dist/runner/local-env.d.ts +64 -0
  74. package/dist/runner/local-env.js +155 -0
  75. package/dist/runner/profile-android.d.ts +82 -0
  76. package/dist/runner/profile-android.js +671 -0
  77. package/dist/runner/profile-ios.d.ts +108 -0
  78. package/dist/runner/profile-ios.js +532 -0
  79. package/dist/runner/profile-mobile.d.ts +254 -0
  80. package/dist/runner/profile-mobile.js +1307 -0
  81. package/dist/runner/validate-project.d.ts +273 -0
  82. package/dist/runner/validate-project.js +1501 -0
  83. package/docs/adapters.md +145 -0
  84. package/docs/api.md +94 -0
  85. package/docs/authoring.md +196 -0
  86. package/docs/concepts.md +136 -0
  87. package/docs/consumer-rehearsal.md +115 -0
  88. package/docs/contracts.md +267 -0
  89. package/docs/live-proofs.md +270 -0
  90. package/docs/principles.md +46 -0
  91. package/examples/event-logs/app-startup-baseline.log +4 -0
  92. package/examples/event-logs/app-startup-current.log +4 -0
  93. package/examples/minimal-app/README.md +70 -0
  94. package/examples/mobile-app/README.md +302 -0
  95. package/examples/mobile-app/app.json +22 -0
  96. package/examples/mobile-app/asl/package-scripts.json +32 -0
  97. package/examples/mobile-app/asl.config.json +37 -0
  98. package/examples/mobile-app/event-logs/android-app-startup.log +4 -0
  99. package/examples/mobile-app/event-logs/android-open-close-cycle.log +12 -0
  100. package/examples/mobile-app/event-logs/android-scroll-settle.log +12 -0
  101. package/examples/mobile-app/event-logs/app-startup.log +4 -0
  102. package/examples/mobile-app/event-logs/open-close-cycle.log +12 -0
  103. package/examples/mobile-app/event-logs/scroll-settle.log +12 -0
  104. package/examples/mobile-app/index.ts +20 -0
  105. package/examples/mobile-app/metro.config.js +20 -0
  106. package/examples/mobile-app/package.json +62 -0
  107. package/examples/mobile-app/patches/expo-modules-jsi@56.0.10.patch +19 -0
  108. package/examples/mobile-app/plugins/with-ios-build-compat.js +271 -0
  109. package/examples/mobile-app/pnpm-lock.yaml +4440 -0
  110. package/examples/mobile-app/runner-manifests/evidence-provider.json +79 -0
  111. package/examples/mobile-app/runner-manifests/primary-runner.json +19 -0
  112. package/examples/mobile-app/scenarios/android/app-startup-video.json +73 -0
  113. package/examples/mobile-app/scenarios/android/app-startup.json +44 -0
  114. package/examples/mobile-app/scenarios/android/open-close-cycle.json +54 -0
  115. package/examples/mobile-app/scenarios/android/scroll-settle.json +49 -0
  116. package/examples/mobile-app/scenarios/ios/app-startup.json +44 -0
  117. package/examples/mobile-app/scenarios/ios/open-close-cycle.json +54 -0
  118. package/examples/mobile-app/scenarios/ios/scroll-settle.json +49 -0
  119. package/examples/mobile-app/scenarios/mobile/app-startup.json +91 -0
  120. package/examples/mobile-app/scenarios/mobile/open-close-cycle.json +160 -0
  121. package/examples/mobile-app/scenarios/mobile/scroll-settle.json +148 -0
  122. package/examples/mobile-app/scripts/asl-capture-accessibility-provider.mjs +112 -0
  123. package/examples/mobile-app/scripts/asl-capture-profiler-provider.mjs +127 -0
  124. package/examples/mobile-app/src/devtools/profile-session.ts +7 -0
  125. package/examples/mobile-app/src/example-screen.tsx +322 -0
  126. package/examples/mobile-app/tsconfig.json +16 -0
  127. package/examples/mobile-app/tsconfig.typecheck.json +13 -0
  128. package/examples/runners/README.md +44 -0
  129. package/examples/runners/adb-android.json +25 -0
  130. package/examples/runners/agent-device-android.json +27 -0
  131. package/examples/runners/agent-device-ios.json +27 -0
  132. package/examples/runners/argent-android.json +32 -0
  133. package/examples/runners/argent-ios.json +32 -0
  134. package/examples/runners/argent-react-profiler-provider.json +15 -0
  135. package/examples/runners/axe-accessibility-provider.json +24 -0
  136. package/examples/runners/manual-log-ingest.json +9 -0
  137. package/examples/runners/rozenite-profiler-provider.json +9 -0
  138. package/examples/runners/script-accessibility-provider.json +24 -0
  139. package/examples/runners/script-memory-provider.json +24 -0
  140. package/examples/runners/script-network-provider.json +24 -0
  141. package/examples/runners/script-profiler-provider.json +30 -0
  142. package/examples/runners/xcodebuildmcp-ios.json +29 -0
  143. package/examples/scenarios/ios/app-startup.json +28 -0
  144. package/examples/scenarios/ios/open-close-cycle.json +35 -0
  145. package/examples/scenarios/mobile/app-startup.json +72 -0
  146. package/examples/scenarios/mobile/media-open-close.json +141 -0
  147. package/examples/scenarios/mobile/open-close-cycle.json +135 -0
  148. package/examples/scenarios/mobile/scroll-settle.json +106 -0
  149. package/package.json +240 -0
  150. package/schemas/budget-verdict.schema.json +115 -0
  151. package/schemas/causal-run.schema.json +279 -0
  152. package/schemas/comparison.schema.json +196 -0
  153. package/schemas/health.schema.json +108 -0
  154. package/schemas/live-proof-set.schema.json +195 -0
  155. package/schemas/live-proof.schema.json +413 -0
  156. package/schemas/manifest.schema.json +204 -0
  157. package/schemas/metrics.schema.json +137 -0
  158. package/schemas/project-validation.schema.json +343 -0
  159. package/schemas/runner-capabilities.schema.json +217 -0
  160. package/schemas/scenario.schema.json +400 -0
  161. package/schemas/verdict.schema.json +88 -0
  162. package/templates/evidence-provider.json +83 -0
  163. package/templates/gitignore-snippet +9 -0
  164. package/templates/integration-readme.md +125 -0
  165. package/templates/mobile-scenario.json +133 -0
  166. package/templates/package-scripts.json +32 -0
  167. package/templates/primary-runner.json +19 -0
  168. package/templates/project.config.json +37 -0
  169. package/templates/scripts/asl-capture-accessibility-provider.mjs +112 -0
  170. package/templates/scripts/asl-capture-profiler-provider.mjs +127 -0
package/package.json ADDED
@@ -0,0 +1,240 @@
1
+ {
2
+ "name": "agent-scenario-loop",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "description": "Scenario orchestration and evidence collection for agent-driven software development. Bring your own runner. Keep your scenarios. Keep your evidence.",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/gmemmy/agent-scenario-loop.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/gmemmy/agent-scenario-loop/issues"
13
+ },
14
+ "homepage": "https://github.com/gmemmy/agent-scenario-loop#readme",
15
+ "keywords": [
16
+ "agent",
17
+ "automation",
18
+ "evidence",
19
+ "mobile",
20
+ "profiling",
21
+ "react-native",
22
+ "scenario"
23
+ ],
24
+ "type": "commonjs",
25
+ "main": "dist/index.js",
26
+ "types": "dist/index.d.ts",
27
+ "packageManager": "pnpm@10.28.0",
28
+ "engines": {
29
+ "node": ">=20"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "bin": {
35
+ "asl-agent-device": "dist/runner/agent-device.js",
36
+ "asl-android-adb": "dist/runner/android-adb.js",
37
+ "asl-argent": "dist/runner/argent.js",
38
+ "agent-scenario-loop": "dist/runner/check-plan.js",
39
+ "asl-compare": "dist/runner/compare.js",
40
+ "asl-compare-latest": "dist/runner/compare-latest.js",
41
+ "asl-check-plan": "dist/runner/check-plan.js",
42
+ "asl-demo-loop": "dist/runner/demo-loop.js",
43
+ "asl-example-android-live": "dist/runner/example-android-live.js",
44
+ "asl-example-ios-live": "dist/runner/example-ios-live.js",
45
+ "asl-host-doctor": "dist/runner/host-doctor.js",
46
+ "asl-init": "dist/runner/init-project.js",
47
+ "asl-ios-simctl": "dist/runner/ios-simctl.js",
48
+ "asl-live-android": "dist/runner/live-android.js",
49
+ "asl-live-ios": "dist/runner/live-ios.js",
50
+ "asl-live-proof": "dist/runner/live-proof.js",
51
+ "asl-profile-android": "dist/runner/profile-android.js",
52
+ "asl-profile-ios": "dist/runner/profile-ios.js",
53
+ "asl-validate-project": "dist/runner/validate-project.js"
54
+ },
55
+ "exports": {
56
+ ".": {
57
+ "types": "./dist/index.d.ts",
58
+ "require": "./dist/index.js"
59
+ },
60
+ "./runner/android-adb": {
61
+ "types": "./dist/runner/android-adb.d.ts",
62
+ "require": "./dist/runner/android-adb.js"
63
+ },
64
+ "./runner/android-adb-driver": {
65
+ "types": "./dist/runner/android-adb-driver.d.ts",
66
+ "require": "./dist/runner/android-adb-driver.js"
67
+ },
68
+ "./runner/agent-device-driver": {
69
+ "types": "./dist/runner/agent-device-driver.d.ts",
70
+ "require": "./dist/runner/agent-device-driver.js"
71
+ },
72
+ "./runner/argent-driver": {
73
+ "types": "./dist/runner/argent-driver.d.ts",
74
+ "require": "./dist/runner/argent-driver.js"
75
+ },
76
+ "./runner/agent-device": {
77
+ "types": "./dist/runner/agent-device.d.ts",
78
+ "require": "./dist/runner/agent-device.js"
79
+ },
80
+ "./runner/argent": {
81
+ "types": "./dist/runner/argent.d.ts",
82
+ "require": "./dist/runner/argent.js"
83
+ },
84
+ "./runner/check-plan": {
85
+ "types": "./dist/runner/check-plan.d.ts",
86
+ "require": "./dist/runner/check-plan.js"
87
+ },
88
+ "./runner/compare": {
89
+ "types": "./dist/runner/compare.d.ts",
90
+ "require": "./dist/runner/compare.js"
91
+ },
92
+ "./runner/compare-latest": {
93
+ "types": "./dist/runner/compare-latest.d.ts",
94
+ "require": "./dist/runner/compare-latest.js"
95
+ },
96
+ "./runner/demo-loop": {
97
+ "types": "./dist/runner/demo-loop.d.ts",
98
+ "require": "./dist/runner/demo-loop.js"
99
+ },
100
+ "./runner/example-android-live": {
101
+ "types": "./dist/runner/example-android-live.d.ts",
102
+ "require": "./dist/runner/example-android-live.js"
103
+ },
104
+ "./runner/example-ios-live": {
105
+ "types": "./dist/runner/example-ios-live.d.ts",
106
+ "require": "./dist/runner/example-ios-live.js"
107
+ },
108
+ "./runner/host-doctor": {
109
+ "types": "./dist/runner/host-doctor.d.ts",
110
+ "require": "./dist/runner/host-doctor.js"
111
+ },
112
+ "./runner/init-project": {
113
+ "types": "./dist/runner/init-project.d.ts",
114
+ "require": "./dist/runner/init-project.js"
115
+ },
116
+ "./runner/ios-simctl": {
117
+ "types": "./dist/runner/ios-simctl.d.ts",
118
+ "require": "./dist/runner/ios-simctl.js"
119
+ },
120
+ "./runner/ios-simctl-driver": {
121
+ "types": "./dist/runner/ios-simctl-driver.d.ts",
122
+ "require": "./dist/runner/ios-simctl-driver.js"
123
+ },
124
+ "./runner/live-android": {
125
+ "types": "./dist/runner/live-android.d.ts",
126
+ "require": "./dist/runner/live-android.js"
127
+ },
128
+ "./runner/live-ios": {
129
+ "types": "./dist/runner/live-ios.d.ts",
130
+ "require": "./dist/runner/live-ios.js"
131
+ },
132
+ "./runner/live-proof": {
133
+ "types": "./dist/runner/live-proof.d.ts",
134
+ "require": "./dist/runner/live-proof.js"
135
+ },
136
+ "./runner/profile-ios": {
137
+ "types": "./dist/runner/profile-ios.d.ts",
138
+ "require": "./dist/runner/profile-ios.js"
139
+ },
140
+ "./runner/profile-android": {
141
+ "types": "./dist/runner/profile-android.d.ts",
142
+ "require": "./dist/runner/profile-android.js"
143
+ },
144
+ "./runner/validate-project": {
145
+ "types": "./dist/runner/validate-project.d.ts",
146
+ "require": "./dist/runner/validate-project.js"
147
+ },
148
+ "./schemas/*": "./schemas/*",
149
+ "./examples/*": "./examples/*",
150
+ "./templates/*": "./templates/*",
151
+ "./package.json": "./package.json"
152
+ },
153
+ "files": [
154
+ "app/profile-session.ts",
155
+ "core/config-template.json",
156
+ "dist",
157
+ "!dist/scripts",
158
+ "docs",
159
+ "examples",
160
+ "!examples/mobile-app/.expo",
161
+ "!examples/mobile-app/.expo/**",
162
+ "!examples/mobile-app/android",
163
+ "!examples/mobile-app/android/**",
164
+ "!examples/mobile-app/artifacts",
165
+ "!examples/mobile-app/artifacts/**",
166
+ "!examples/mobile-app/ios",
167
+ "!examples/mobile-app/ios/**",
168
+ "!examples/mobile-app/node_modules",
169
+ "!examples/mobile-app/node_modules/**",
170
+ "schemas",
171
+ "templates",
172
+ "README.md",
173
+ "LICENSE"
174
+ ],
175
+ "scripts": {
176
+ "build": "tsc -p tsconfig.build.json",
177
+ "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
178
+ "prepack": "npm run clean && npm run build",
179
+ "consumer:rehearse": "pnpm build && node dist/scripts/consumer-rehearsal.js",
180
+ "package:smoke": "pnpm build && node dist/scripts/package-smoke.js",
181
+ "prepublishOnly": "pnpm release:check",
182
+ "release:check": "pnpm test && pnpm release:readiness && pnpm package:smoke && pnpm consumer:rehearse",
183
+ "release:readiness": "pnpm build && node dist/scripts/release-readiness.js",
184
+ "typecheck": "tsc -p tsconfig.json --noEmit",
185
+ "test": "pnpm clean && pnpm typecheck && pnpm exec tsc -p tsconfig.json && node --test dist/core/__tests__/*.test.js dist/runner/__tests__/*.test.js",
186
+ "android:logcat": "pnpm build && node dist/runner/android-adb.js --capture-logcat",
187
+ "android:preflight": "pnpm build && node dist/runner/android-adb.js",
188
+ "compare": "pnpm build && node dist/runner/compare.js",
189
+ "compare:latest": "pnpm build && node dist/runner/compare-latest.js",
190
+ "check-plan": "pnpm build && node dist/runner/check-plan.js",
191
+ "demo:loop": "pnpm build && node dist/runner/demo-loop.js",
192
+ "host:doctor": "pnpm build && node dist/runner/host-doctor.js --out artifacts/host-doctor",
193
+ "agent-device:check": "pnpm build && node dist/runner/agent-device.js --check --out artifacts/agent-device-check",
194
+ "argent:check": "pnpm build && node dist/runner/argent.js --check --out artifacts/argent-check",
195
+ "example:profile:open-close": "pnpm build && node dist/runner/profile-ios.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/open-close-cycle.json --events examples/mobile-app/event-logs/open-close-cycle.log --out artifacts/example-mobile-app/ios --run-id example-open-close",
196
+ "example:profile:scroll": "pnpm build && node dist/runner/profile-ios.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/scroll-settle.json --events examples/mobile-app/event-logs/scroll-settle.log --out artifacts/example-mobile-app/ios --run-id example-scroll",
197
+ "example:profile:startup": "pnpm build && node dist/runner/profile-ios.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/app-startup.json --events examples/mobile-app/event-logs/app-startup.log --out artifacts/example-mobile-app/ios --run-id example-startup",
198
+ "example:profile:ios:live:open-close": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm build && node dist/runner/profile-ios.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/open-close-cycle.json --simctl-capture --profile-session --profile-session-storage --launch --out artifacts/example-mobile-app/ios --run-id ios-live-open-close",
199
+ "example:profile:ios:live:scroll": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm build && node dist/runner/profile-ios.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/scroll-settle.json --simctl-capture --profile-session --profile-session-storage --launch --out artifacts/example-mobile-app/ios --run-id ios-live-scroll",
200
+ "example:profile:ios:live:startup": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm build && node dist/runner/profile-ios.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/app-startup.json --simctl-capture --profile-session --profile-session-storage --launch --out artifacts/example-mobile-app/ios --run-id ios-live-startup",
201
+ "example:profile:android:open-close": "pnpm build && node dist/runner/profile-android.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/open-close-cycle.json --events examples/mobile-app/event-logs/android-open-close-cycle.log --out artifacts/example-mobile-app/android --run-id android-example-open-close",
202
+ "example:profile:android:scroll": "pnpm build && node dist/runner/profile-android.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/scroll-settle.json --events examples/mobile-app/event-logs/android-scroll-settle.log --out artifacts/example-mobile-app/android --run-id android-example-scroll",
203
+ "example:profile:android:startup": "pnpm build && node dist/runner/profile-android.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/app-startup.json --events examples/mobile-app/event-logs/android-app-startup.log --out artifacts/example-mobile-app/android --run-id android-example-startup",
204
+ "example:profile:android:live:open-close": "pnpm build && node dist/runner/profile-android.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/open-close-cycle.json --adb-capture --profile-session --react-native-debug-host localhost:8097 --clear-logcat --launch --launch-wait-ms 1500 --out artifacts/example-mobile-app/android --run-id android-live-open-close",
205
+ "example:profile:android:live:scroll": "pnpm build && node dist/runner/profile-android.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/scroll-settle.json --adb-capture --profile-session --react-native-debug-host localhost:8097 --clear-logcat --launch --launch-wait-ms 1500 --out artifacts/example-mobile-app/android --run-id android-live-scroll",
206
+ "example:profile:android:live:startup": "pnpm build && node dist/runner/profile-android.js --config examples/mobile-app/asl.config.json --scenario examples/mobile-app/scenarios/mobile/app-startup.json --adb-capture --profile-session --react-native-debug-host localhost:8097 --clear-logcat --launch --launch-wait-ms 1500 --out artifacts/example-mobile-app/android --run-id android-live-startup",
207
+ "example:android:preflight": "pnpm build && node dist/runner/android-adb.js --package dev.agentscenarioloop.example --out artifacts/example-mobile-app/android-live-preflight --run-id android-live-preflight",
208
+ "example:agent-device:check": "ASL_AGENT_DEVICE_REQUIRED_PLATFORMS=${ASL_AGENT_DEVICE_REQUIRED_PLATFORMS:-ios,android} pnpm agent-device:check",
209
+ "example:agent-device:ios:startup": "pnpm build && node dist/runner/agent-device.js --platform ios ${ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION:+--session $ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION} ${ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION_MODE:+--session-mode $ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION_MODE} ${ASL_EXAMPLE_IOS_UDID:+--udid $ASL_EXAMPLE_IOS_UDID} ${ASL_AGENT_DEVICE_COMMAND_TIMEOUT_MS:+--command-timeout-ms $ASL_AGENT_DEVICE_COMMAND_TIMEOUT_MS} --scenario examples/mobile-app/scenarios/mobile/app-startup.json --app ${ASL_EXAMPLE_IOS_APP_ID:-dev.agent-scenario-loop.example} --open --wait-ms ${ASL_EXAMPLE_AGENT_DEVICE_WAIT_MS:-1000} --out artifacts/example-mobile-app/agent-device-ios-startup --run-id agent-device-ios-startup",
210
+ "example:agent-device:android:startup": "pnpm build && node dist/runner/agent-device.js --platform android ${ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION:+--session $ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION} ${ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION_MODE:+--session-mode $ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION_MODE} ${ASL_EXAMPLE_ANDROID_SERIAL:+--serial $ASL_EXAMPLE_ANDROID_SERIAL} ${ASL_AGENT_DEVICE_COMMAND_TIMEOUT_MS:+--command-timeout-ms $ASL_AGENT_DEVICE_COMMAND_TIMEOUT_MS} --scenario examples/mobile-app/scenarios/mobile/app-startup.json --app ${ASL_EXAMPLE_ANDROID_APP_ID:-dev.agentscenarioloop.example} --open --wait-ms ${ASL_EXAMPLE_AGENT_DEVICE_WAIT_MS:-1000} --out artifacts/example-mobile-app/agent-device-android-startup --run-id agent-device-android-startup",
211
+ "example:argent:ios:startup": "pnpm build && node dist/runner/argent.js --platform ios ${ASL_ARGENT_BIN:+--argent $ASL_ARGENT_BIN} ${ASL_ARGENT_BASE_ARGS:+--base-args \"$ASL_ARGENT_BASE_ARGS\"} ${ASL_ARGENT_DEVICE_FLAG:+--device-flag $ASL_ARGENT_DEVICE_FLAG} ${ASL_ARGENT_APP_FLAG:+--app-flag $ASL_ARGENT_APP_FLAG} ${ASL_ARGENT_COMMAND_TIMEOUT_MS:+--command-timeout-ms $ASL_ARGENT_COMMAND_TIMEOUT_MS} ${ASL_ARGENT_IOS_SIMCTL_SCREENSHOT_FALLBACK:+--ios-simctl-screenshot-fallback} ${ASL_XCRUN_PATH:+--xcrun $ASL_XCRUN_PATH} --scenario examples/mobile-app/scenarios/mobile/app-startup.json --app ${ASL_EXAMPLE_IOS_APP_ID:-dev.agent-scenario-loop.example} --device ${ASL_EXAMPLE_IOS_UDID:-booted} --out artifacts/example-mobile-app/argent-ios-startup --run-id argent-ios-startup",
212
+ "example:argent:android:startup": "pnpm build && node dist/runner/argent.js --platform android ${ASL_ARGENT_BIN:+--argent $ASL_ARGENT_BIN} ${ASL_ARGENT_BASE_ARGS:+--base-args \"$ASL_ARGENT_BASE_ARGS\"} ${ASL_ARGENT_DEVICE_FLAG:+--device-flag $ASL_ARGENT_DEVICE_FLAG} ${ASL_ARGENT_APP_FLAG:+--app-flag $ASL_ARGENT_APP_FLAG} ${ASL_ARGENT_COMMAND_TIMEOUT_MS:+--command-timeout-ms $ASL_ARGENT_COMMAND_TIMEOUT_MS} --scenario examples/mobile-app/scenarios/mobile/app-startup.json --app ${ASL_EXAMPLE_ANDROID_APP_ID:-dev.agentscenarioloop.example} --device ${ASL_EXAMPLE_ANDROID_SERIAL:-emulator-5554} --out artifacts/example-mobile-app/argent-android-startup --run-id argent-android-startup",
213
+ "example:android:live": "pnpm build && node dist/runner/example-android-live.js --compare-latest --fail-on-regression",
214
+ "example:android:live:agent-device": "pnpm build && node dist/runner/example-android-live.js ${ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION:+--agent-device-session $ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION} ${ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION_MODE:+--agent-device-session-mode $ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION_MODE} --run-suffix agent-device --agent-device-proof --compare-latest --fail-on-regression",
215
+ "example:android:live:argent": "pnpm build && node dist/runner/example-android-live.js --run-suffix argent --argent-proof --compare-latest --fail-on-regression",
216
+ "example:android:live:runners": "pnpm build && node dist/runner/example-android-live.js ${ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION:+--agent-device-session $ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION} ${ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION_MODE:+--agent-device-session-mode $ASL_EXAMPLE_ANDROID_AGENT_DEVICE_SESSION_MODE} --run-suffix runners --agent-device-proof --argent-proof --compare-latest --fail-on-regression",
217
+ "example:ios:live": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm build && node dist/runner/example-ios-live.js --compare-latest --fail-on-regression",
218
+ "example:ios:live:agent-device": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm build && node dist/runner/example-ios-live.js ${ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION:+--agent-device-session $ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION} ${ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION_MODE:+--agent-device-session-mode $ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION_MODE} --run-suffix agent-device --agent-device-proof --compare-latest --fail-on-regression",
219
+ "example:ios:live:argent": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm build && node dist/runner/example-ios-live.js --run-suffix argent --argent-proof --compare-latest --fail-on-regression",
220
+ "example:ios:live:runners": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm build && node dist/runner/example-ios-live.js ${ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION:+--agent-device-session $ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION} ${ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION_MODE:+--agent-device-session-mode $ASL_EXAMPLE_IOS_AGENT_DEVICE_SESSION_MODE} --run-suffix runners --agent-device-proof --argent-proof --compare-latest --fail-on-regression",
221
+ "example:mobile:live-proof": "pnpm build && node dist/runner/live-proof.js --file ${ASL_EXAMPLE_ANDROID_LIVE_PROOF:-artifacts/example-mobile-app/android/_live-proof/android-live-proof/live-proof.json} --file ${ASL_EXAMPLE_IOS_LIVE_PROOF:-artifacts/example-mobile-app/ios/_live-proof/ios-live-proof/live-proof.json} --require-platforms android,ios --out artifacts/example-mobile-app/live-proof-set --fail-on-regression ${ASL_REQUIRE_LIVE_PROOF_ARTIFACTS:+--require-artifacts}",
222
+ "example:app:android": "pnpm --dir examples/mobile-app android",
223
+ "example:app:ios": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; pnpm --dir examples/mobile-app ios",
224
+ "example:app:ios:prebuild": "pnpm --dir examples/mobile-app ios:prebuild",
225
+ "example:app:android:metro-port": "pnpm build && node dist/runner/android-adb.js --package ${ASL_EXAMPLE_ANDROID_APP_ID:-dev.agentscenarioloop.example} --react-native-debug-host ${ASL_EXAMPLE_ANDROID_DEBUG_HOST:-localhost:8097} --out artifacts/example-mobile-app/android-metro-port --run-id android-metro-port",
226
+ "example:app:ios:metro-port": "if [ -n \"${ASL_EXAMPLE_XCODE_DEVELOPER_DIR:-}\" ]; then export DEVELOPER_DIR=\"$ASL_EXAMPLE_XCODE_DEVELOPER_DIR\"; fi; xcrun simctl spawn ${ASL_EXAMPLE_IOS_DEVICE:-booted} defaults write ${ASL_EXAMPLE_IOS_APP_ID:-dev.agent-scenario-loop.example} RCT_jsLocation ${ASL_EXAMPLE_METRO_HOST:-localhost}:${ASL_EXAMPLE_METRO_PORT:-8097}",
227
+ "example:app:start": "pnpm --dir examples/mobile-app start",
228
+ "example:app:start:isolated": "pnpm --dir examples/mobile-app exec expo start --port 8097 --host localhost --clear",
229
+ "live-proof": "pnpm build && node dist/runner/live-proof.js",
230
+ "profile:android": "pnpm build && node dist/runner/profile-android.js",
231
+ "profile:ios": "pnpm build && node dist/runner/profile-ios.js",
232
+ "profile:ios:startup": "pnpm build && node dist/runner/profile-ios.js --config core/config-template.json --scenario examples/scenarios/ios/app-startup.json",
233
+ "profile:ios:open-close": "pnpm build && node dist/runner/profile-ios.js --config core/config-template.json --scenario examples/scenarios/ios/open-close-cycle.json",
234
+ "validate-project": "pnpm build && node dist/runner/validate-project.js"
235
+ },
236
+ "devDependencies": {
237
+ "@types/node": "^25.9.3",
238
+ "typescript": "^6.0.3"
239
+ }
240
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-scenario-loop.dev/schemas/budget-verdict.schema.json",
4
+ "title": "Agent Scenario Loop Budget Verdict",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "flowId",
10
+ "runId",
11
+ "status",
12
+ "checks"
13
+ ],
14
+ "properties": {
15
+ "schemaVersion": {
16
+ "type": "string",
17
+ "pattern": "^1\\.0\\.0$"
18
+ },
19
+ "flowId": {
20
+ "type": "string"
21
+ },
22
+ "runId": {
23
+ "type": "string"
24
+ },
25
+ "status": {
26
+ "type": "string",
27
+ "enum": ["passed", "failed", "partial"]
28
+ },
29
+ "checks": {
30
+ "type": "array",
31
+ "minItems": 1,
32
+ "items": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["name", "metric", "unit", "expected", "actual", "pass"],
36
+ "properties": {
37
+ "name": {
38
+ "type": "string"
39
+ },
40
+ "metric": {
41
+ "type": "string"
42
+ },
43
+ "unit": {
44
+ "type": "string",
45
+ "enum": ["ms", "count", "bytes", "percent", "boolean"]
46
+ },
47
+ "expected": {
48
+ "type": ["number", "integer", "boolean"]
49
+ },
50
+ "actual": {
51
+ "type": ["number", "integer", "boolean", "null"]
52
+ },
53
+ "pass": {
54
+ "type": "boolean"
55
+ },
56
+ "sourceEvent": {
57
+ "type": "string"
58
+ },
59
+ "notes": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "visualOutcome": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "status": {
70
+ "type": "string",
71
+ "enum": ["passed", "failed", "manual-review-needed"]
72
+ },
73
+ "checks": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["name", "status"],
79
+ "properties": {
80
+ "name": {
81
+ "type": "string"
82
+ },
83
+ "status": {
84
+ "type": "string",
85
+ "enum": ["passed", "failed", "manual-review-needed"]
86
+ },
87
+ "artifact": {
88
+ "type": "string"
89
+ },
90
+ "notes": {
91
+ "type": "string"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "regression": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "baselineRunId": {
103
+ "type": "string"
104
+ },
105
+ "status": {
106
+ "type": "string",
107
+ "enum": ["better", "worse", "unchanged", "unknown"]
108
+ },
109
+ "summary": {
110
+ "type": "string"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,279 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-scenario-loop.dev/schemas/causal-run.schema.json",
4
+ "title": "Agent Scenario Loop Causal Run",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "flowId",
10
+ "runId",
11
+ "platform",
12
+ "buildFlavor",
13
+ "scenario",
14
+ "trigger",
15
+ "budgets",
16
+ "timeline",
17
+ "artifacts"
18
+ ],
19
+ "properties": {
20
+ "schemaVersion": {
21
+ "type": "string",
22
+ "pattern": "^1\\.0\\.0$"
23
+ },
24
+ "flowId": {
25
+ "type": "string",
26
+ "description": "Stable product-flow identifier such as startup, settings-open-close, or composer-open-close."
27
+ },
28
+ "runId": {
29
+ "type": "string",
30
+ "description": "Stable run identifier shared across profile artifacts, app-side signals, and UI Oracle evidence."
31
+ },
32
+ "platform": {
33
+ "type": "string",
34
+ "enum": ["ios", "android"]
35
+ },
36
+ "buildFlavor": {
37
+ "type": "string",
38
+ "enum": ["dev-debug", "dev-release", "prod-release", "unknown"]
39
+ },
40
+ "scenario": {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["id", "driver"],
44
+ "properties": {
45
+ "id": {
46
+ "type": "string"
47
+ },
48
+ "driver": {
49
+ "type": "string"
50
+ },
51
+ "iterations": {
52
+ "type": "integer",
53
+ "minimum": 1
54
+ },
55
+ "route": {
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ "trigger": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["kind", "label"],
64
+ "properties": {
65
+ "kind": {
66
+ "type": "string",
67
+ "enum": ["cold-launch", "resume", "tap", "gesture", "deeplink", "background-foreground", "unknown"]
68
+ },
69
+ "label": {
70
+ "type": "string"
71
+ },
72
+ "targetId": {
73
+ "type": "string"
74
+ },
75
+ "targetType": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ },
80
+ "context": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "properties": {
84
+ "route": {
85
+ "type": "string"
86
+ },
87
+ "authState": {
88
+ "type": "string"
89
+ },
90
+ "networkState": {
91
+ "type": "string"
92
+ },
93
+ "featureFlags": {
94
+ "type": "object",
95
+ "additionalProperties": {
96
+ "type": ["boolean", "string", "number"]
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "budgets": {
102
+ "type": "object",
103
+ "description": "Named budget thresholds the run should be evaluated against.",
104
+ "minProperties": 1,
105
+ "additionalProperties": {
106
+ "$ref": "#/$defs/budgetThreshold"
107
+ }
108
+ },
109
+ "timeline": {
110
+ "type": "array",
111
+ "items": {
112
+ "$ref": "#/$defs/timelineEvent"
113
+ }
114
+ },
115
+ "artifacts": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": ["summary", "signals"],
119
+ "properties": {
120
+ "summary": {
121
+ "type": "string",
122
+ "description": "Path to the human-readable summary for this run."
123
+ },
124
+ "metrics": {
125
+ "type": "string"
126
+ },
127
+ "manifest": {
128
+ "type": "string"
129
+ },
130
+ "video": {
131
+ "type": "string"
132
+ },
133
+ "screenshot": {
134
+ "type": ["string", "null"]
135
+ },
136
+ "nativeTrace": {
137
+ "type": "string"
138
+ },
139
+ "uiOracleRun": {
140
+ "type": "string"
141
+ },
142
+ "signals": {
143
+ "type": "object",
144
+ "additionalProperties": false,
145
+ "properties": {
146
+ "js": {
147
+ "type": "array",
148
+ "items": {
149
+ "type": "string"
150
+ }
151
+ },
152
+ "memory": {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "string"
156
+ }
157
+ },
158
+ "network": {
159
+ "type": "array",
160
+ "items": {
161
+ "type": "string"
162
+ }
163
+ }
164
+ }
165
+ },
166
+ "evidenceAttachments": {
167
+ "type": "array",
168
+ "uniqueItems": true,
169
+ "items": {
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": ["channel", "kind", "path", "sha256", "sizeBytes", "sourceFileName"],
173
+ "properties": {
174
+ "channel": {
175
+ "type": "string",
176
+ "enum": ["capture", "provider", "signal"]
177
+ },
178
+ "kind": {
179
+ "type": "string",
180
+ "enum": ["accessibility", "js", "logs", "memory", "network", "profiler", "screenshot", "uiTree", "video"]
181
+ },
182
+ "path": {
183
+ "type": "string",
184
+ "minLength": 1
185
+ },
186
+ "sha256": {
187
+ "type": "string",
188
+ "pattern": "^[a-f0-9]{64}$"
189
+ },
190
+ "sizeBytes": {
191
+ "type": "integer",
192
+ "minimum": 0
193
+ },
194
+ "sourceFileName": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ },
203
+ "verdicts": {
204
+ "type": "array",
205
+ "items": {
206
+ "$ref": "budget-verdict.schema.json"
207
+ }
208
+ },
209
+ "notes": {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "string"
213
+ }
214
+ }
215
+ },
216
+ "$defs": {
217
+ "budgetThreshold": {
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "required": ["metric", "unit", "limit"],
221
+ "properties": {
222
+ "metric": {
223
+ "type": "string"
224
+ },
225
+ "unit": {
226
+ "type": "string",
227
+ "enum": ["ms", "count", "bytes", "percent", "boolean"]
228
+ },
229
+ "limit": {
230
+ "type": ["number", "integer", "boolean"]
231
+ }
232
+ }
233
+ },
234
+ "timelineEvent": {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "required": ["phase", "name", "atMs"],
238
+ "properties": {
239
+ "phase": {
240
+ "type": "string",
241
+ "enum": [
242
+ "intent",
243
+ "navigation",
244
+ "domain",
245
+ "query",
246
+ "network",
247
+ "render",
248
+ "native",
249
+ "visual",
250
+ "completion"
251
+ ]
252
+ },
253
+ "name": {
254
+ "type": "string"
255
+ },
256
+ "atMs": {
257
+ "type": "number"
258
+ },
259
+ "durationMs": {
260
+ "type": "number"
261
+ },
262
+ "status": {
263
+ "type": "string",
264
+ "enum": ["started", "completed", "failed", "skipped", "observed"]
265
+ },
266
+ "owner": {
267
+ "type": "string",
268
+ "description": "Owning domain or subsystem such as startup, auth, viewer, navigation, or query."
269
+ },
270
+ "metadata": {
271
+ "type": "object",
272
+ "additionalProperties": {
273
+ "type": ["string", "number", "boolean", "null"]
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }