@deeeed/metamask-harness 0.74.0 → 0.75.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 +17 -1
- package/README.md +1 -1
- package/adapters/shared/ensure-runner-deps.sh +15 -3
- 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/run.js +54 -0
- package/dist/adapters/core/surface.js +5 -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/launch.js +315 -0
- package/dist/adapters/extension/launched-browser.js +51 -0
- package/dist/adapters/extension/run.js +105 -0
- package/dist/adapters/extension/surface.js +9 -2
- package/dist/adapters/mobile/actions.js +54 -0
- package/dist/adapters/mobile/launch.js +192 -0
- package/dist/adapters/mobile/lifecycle.js +300 -0
- package/dist/adapters/mobile/run.js +156 -0
- package/dist/adapters/mobile/runtime-identity.js +34 -0
- package/dist/adapters/mobile/surface.js +11 -2
- 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/run.js +30 -0
- package/dist/adapters/terminal/surface.js +6 -1
- package/dist/adapters.js +32 -824
- package/dist/cli-commands.js +1 -0
- package/dist/command-contract.js +3 -0
- package/dist/commands/call.js +2 -5
- 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/pin.js +226 -0
- 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/doctor.js +3 -1
- package/dist/execution-provenance.js +3 -2
- package/dist/harness-pin.js +10 -0
- 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 +27 -2
- package/dist/network-observation.js +10 -3
- 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/docs/CONTRIBUTING.md +19 -7
- package/package.json +2 -1
- package/scripts/completions.sh +2 -1
package/docs/CONTRIBUTING.md
CHANGED
|
@@ -62,13 +62,25 @@ 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. A platform registered the same
|
|
66
|
+
way is reached by `launch`, by the `run`/`call` engine and by the runner's
|
|
67
|
+
action set with no edit to shared code (`tests/fixtures/example-adapter.ts`).
|
|
68
|
+
The CLI front door still validates `--adapter` against the four built-ins
|
|
69
|
+
(`src/command-contract.ts`), and the other commands still branch on the name,
|
|
70
|
+
so a new platform reaches `bin/mm-harness` only when those families move and a
|
|
71
|
+
plugin loader registers it.
|
|
72
|
+
|
|
73
|
+
Extend `AdapterSurface` when a platform owns the behavior; members a platform
|
|
74
|
+
does not need are optional (`actions` is required: every platform has an
|
|
75
|
+
action set), and Core reports headless/N/A explicitly. Put each platform's
|
|
76
|
+
implementation under `src/adapters/<adapter>/` (`launch.ts`, `run.ts`,
|
|
77
|
+
`actions.ts`). Do not add command-local platform ladders for surface-owned
|
|
78
|
+
behavior: `launch` dispatches through `AdapterSurface.launch` (the device
|
|
79
|
+
platforms share `src/commands/launch/device.ts` through a
|
|
80
|
+
`DeviceLaunchProfile`), `run`/`call` read `run`, `recording`, `diagnostics`,
|
|
81
|
+
`observation` and `sourceFingerprint`, and the runner reads `actions`
|
|
82
|
+
(manifest, bundled semantic actions, live adapter scripts, `cdp.target`, the
|
|
83
|
+
`ui.*` transport, adapter wrappers, input checks).
|
|
72
84
|
|
|
73
85
|
Each checkout owns:
|
|
74
86
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deeeed/metamask-harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.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" ;;
|