@deeeed/metamask-harness 0.74.0 → 0.76.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.
- package/CHANGELOG.md +39 -1
- package/README.md +1 -1
- package/adapters/shared/ensure-runner-deps.sh +15 -3
- package/adapters/shared/reap-checkout-metros.sh +9 -0
- package/dist/action-values.js +15 -0
- package/dist/adapters/core/actions.js +20 -0
- package/dist/adapters/core/live-script-env.js +36 -0
- package/dist/adapters/core/overlay.js +34 -0
- package/dist/adapters/core/readiness.js +8 -0
- package/dist/adapters/core/run.js +54 -0
- package/dist/adapters/core/surface.js +12 -1
- package/dist/adapters/extension/action-inputs.js +206 -0
- package/dist/adapters/extension/actions.js +51 -0
- package/dist/adapters/extension/console-capture.js +13 -1
- package/dist/adapters/extension/doctor-checks.js +135 -0
- package/dist/adapters/extension/fixtures.js +103 -0
- package/dist/adapters/extension/launch.js +315 -0
- package/dist/adapters/extension/launched-browser.js +51 -0
- package/dist/adapters/extension/overlay.js +55 -0
- package/dist/adapters/extension/readiness.js +32 -0
- package/dist/adapters/extension/reload.js +40 -0
- package/dist/adapters/extension/run.js +105 -0
- package/dist/adapters/extension/surface.js +31 -3
- package/dist/adapters/harness-freshness.js +4 -2
- package/dist/adapters/mobile/actions.js +54 -0
- package/dist/adapters/mobile/devices.js +21 -0
- package/dist/adapters/mobile/doctor-checks.js +40 -0
- package/dist/adapters/mobile/fixtures.js +141 -0
- package/dist/adapters/mobile/launch.js +192 -0
- package/dist/adapters/mobile/lifecycle.js +300 -0
- package/dist/adapters/mobile/overlay.js +27 -0
- package/dist/adapters/mobile/prepare-target.js +38 -0
- package/dist/adapters/mobile/readiness.js +39 -0
- package/dist/adapters/mobile/reload.js +15 -0
- package/dist/adapters/mobile/run.js +156 -0
- package/dist/adapters/mobile/runtime-identity.js +34 -0
- package/dist/adapters/mobile/surface.js +39 -3
- package/dist/adapters/mobile/ui.js +701 -0
- package/dist/adapters/performance/cdp-trace.js +24 -6
- package/dist/adapters/performance/device-platform.js +10 -0
- package/dist/adapters/registry.js +1 -1
- package/dist/adapters/terminal/actions.js +43 -0
- package/dist/adapters/terminal/console-capture.js +14 -1
- package/dist/adapters/terminal/doctor-checks.js +22 -0
- package/dist/adapters/terminal/overlay.js +18 -0
- package/dist/adapters/terminal/readiness.js +11 -0
- package/dist/adapters/terminal/run.js +30 -0
- package/dist/adapters/terminal/surface.js +21 -3
- package/dist/adapters.js +32 -824
- package/dist/cli-commands.js +1 -0
- package/dist/cli.js +3 -1
- package/dist/command-contract.js +3 -0
- package/dist/commands/call.js +2 -5
- package/dist/commands/debug.js +6 -25
- package/dist/commands/device-target.js +2 -1
- package/dist/commands/doctor.js +26 -137
- package/dist/commands/fixtures.js +13 -217
- package/dist/commands/launch/device.js +2 -6
- package/dist/commands/launch/extension.js +3 -303
- package/dist/commands/launch/index.js +1 -1
- package/dist/commands/launch/mobile.js +2 -190
- package/dist/commands/launch/quote.js +7 -0
- package/dist/commands/logs.js +1 -1
- package/dist/commands/parse-args.js +9 -4
- package/dist/commands/pin.js +226 -0
- package/dist/commands/prepare.js +23 -53
- package/dist/commands/provision.js +3 -7
- package/dist/commands/reload.js +8 -47
- package/dist/commands/run-engine.js +38 -138
- package/dist/commands/run-report.js +4 -48
- package/dist/commands/run.js +6 -48
- package/dist/commands/runtime-decision.js +5 -27
- package/dist/commands/self-test.js +1 -3
- package/dist/commands/status.js +20 -28
- package/dist/commands/stop.js +1 -1
- package/dist/doctor.js +12 -120
- package/dist/execution-provenance.js +3 -2
- package/dist/harness-pin.js +10 -0
- package/dist/harness.js +31 -100
- package/dist/heal-bounds.js +3 -2
- package/dist/live-adapter-contract.js +8 -34
- package/dist/manifest.js +3 -5
- package/dist/metamask-action-validation.js +5 -196
- package/dist/mm-harness-cli.js +30 -4
- package/dist/network-observation.js +10 -3
- package/dist/paths.js +8 -2
- package/dist/performance-observation.js +15 -22
- package/dist/pr-body/render.js +3 -1
- package/dist/recording-target.js +4 -39
- package/dist/run-diagnostics.js +21 -60
- package/dist/run-recording.js +5 -4
- package/dist/runner.js +20 -368
- package/dist/runtime-context.js +12 -17
- package/docs/CONTRIBUTING.md +29 -7
- package/package.json +2 -1
- package/scripts/completions.sh +2 -1
package/docs/CONTRIBUTING.md
CHANGED
|
@@ -62,13 +62,35 @@ exits.
|
|
|
62
62
|
|
|
63
63
|
Commands resolve shared platform behavior through
|
|
64
64
|
`src/adapters/surface.ts`. Each platform's surface registers itself in
|
|
65
|
-
`src/adapters/registry.ts` when its module loads
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
`
|
|
71
|
-
|
|
65
|
+
`src/adapters/registry.ts` when its module loads, and commands look adapters up
|
|
66
|
+
in the registry, so a platform registered the same way is reached by the
|
|
67
|
+
commands that take `--adapter` with no edit to shared code
|
|
68
|
+
(`tests/fixtures/example-adapter.ts`); `status` detects the adapter from the
|
|
69
|
+
checkout.
|
|
70
|
+
The CLI contract (`src/command-contract.ts`) still lists the four built-ins for
|
|
71
|
+
`--adapter`, so a new platform reaches `bin/mm-harness` once a plugin loader
|
|
72
|
+
registers it and extends that list.
|
|
73
|
+
|
|
74
|
+
Extend `AdapterSurface` when a platform owns the behavior; members a platform
|
|
75
|
+
does not need are optional, and Core reports headless/N/A explicitly. Put each
|
|
76
|
+
platform's implementation under `src/adapters/<adapter>/`: `launch.ts`,
|
|
77
|
+
`run.ts`, `actions.ts`, `overlay.ts` (install/verify/cleanup, the runtime
|
|
78
|
+
context, prepare) and `readiness.ts` (doctor and status). Do not add
|
|
79
|
+
command-local platform ladders for surface-owned behavior:
|
|
80
|
+
- `launch` dispatches through `AdapterSurface.launch` (the device platforms
|
|
81
|
+
share `src/commands/launch/device.ts` through a `DeviceLaunchProfile`);
|
|
82
|
+
- `run`/`call` read `run`, `recording`, `diagnostics`, `observation` and
|
|
83
|
+
`sourceFingerprint`;
|
|
84
|
+
- the runner reads `actions` (manifest, bundled semantic actions, live adapter
|
|
85
|
+
scripts, `cdp.target`, the `ui.*` transport, adapter wrappers, input checks);
|
|
86
|
+
- `install`/`verify`/`cleanup` read `harness`, `agentic-runtime.json` reads
|
|
87
|
+
`runtimeContext`, `doctor`/`status` read `readiness`, and `fixtures`,
|
|
88
|
+
`prepare`, `debug`, `reload` and `runtime-decision` read their own members.
|
|
89
|
+
|
|
90
|
+
A few comparisons remain where a command exists for one platform
|
|
91
|
+
(`runtime-health`, `resolve-extension`, `ensure-ready`, `runtime-launch`) or
|
|
92
|
+
code compares a platform's own data (`review/knowledge.ts`, the Core jest
|
|
93
|
+
grouping in `check.ts`, the Mobile release-artifact state file).
|
|
72
94
|
|
|
73
95
|
Each checkout owns:
|
|
74
96
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deeeed/metamask-harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mm-harness": "bin/mm-harness"
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@vitest/coverage-v8": "^4.1.10",
|
|
46
46
|
"eslint": "^9",
|
|
47
47
|
"globals": "^17.7.0",
|
|
48
|
+
"proper-lockfile": "^4.1.2",
|
|
48
49
|
"tsx": "^4.23.0",
|
|
49
50
|
"typescript": "^5.6.0",
|
|
50
51
|
"typescript-eslint": "^8",
|
package/scripts/completions.sh
CHANGED
|
@@ -29,13 +29,14 @@ _mmh_bin() {
|
|
|
29
29
|
return 1
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
_mmh_commands="launch stop logs debug reload fixtures actions call run doctor check checklist execution-template recipe-quality install verify cleanup completions"
|
|
32
|
+
_mmh_commands="launch stop logs debug reload fixtures actions call run doctor check checklist execution-template recipe-quality install verify cleanup pin completions"
|
|
33
33
|
|
|
34
34
|
# Per-command flags (static, from the mm-harness surface).
|
|
35
35
|
_mmh_flags_for() {
|
|
36
36
|
case "$1" in
|
|
37
37
|
launch) printf '%s' "--build --watch --verify --sidepanel --fullscreen --runway --device --cdp-port --watcher-port --heal --adapter --target --json" ;;
|
|
38
38
|
stop) printf '%s' "--port --target --json" ;;
|
|
39
|
+
pin) printf '%s' "--json" ;;
|
|
39
40
|
logs) printf '%s' "--full --events --source --adapter --target --json" ;;
|
|
40
41
|
debug) printf '%s' "--worker --dev-menu --adapter --target --json" ;;
|
|
41
42
|
reload) printf '%s' "--adapter --platform --target --json" ;;
|