@deeeed/metamask-harness 0.75.0 → 0.77.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 (49) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/adapters/shared/reap-checkout-metros.sh +9 -0
  3. package/dist/adapters/core/overlay.js +34 -0
  4. package/dist/adapters/core/readiness.js +8 -0
  5. package/dist/adapters/core/surface.js +7 -0
  6. package/dist/adapters/extension/doctor-checks.js +135 -0
  7. package/dist/adapters/extension/fixtures.js +103 -0
  8. package/dist/adapters/extension/overlay.js +55 -0
  9. package/dist/adapters/extension/readiness.js +32 -0
  10. package/dist/adapters/extension/reload.js +40 -0
  11. package/dist/adapters/extension/surface.js +22 -1
  12. package/dist/adapters/harness-freshness.js +4 -2
  13. package/dist/adapters/mobile/devices.js +21 -0
  14. package/dist/adapters/mobile/doctor-checks.js +40 -0
  15. package/dist/adapters/mobile/fixtures.js +141 -0
  16. package/dist/adapters/mobile/overlay.js +27 -0
  17. package/dist/adapters/mobile/prepare-target.js +38 -0
  18. package/dist/adapters/mobile/readiness.js +39 -0
  19. package/dist/adapters/mobile/reload.js +15 -0
  20. package/dist/adapters/mobile/surface.js +28 -1
  21. package/dist/adapters/terminal/doctor-checks.js +22 -0
  22. package/dist/adapters/terminal/overlay.js +18 -0
  23. package/dist/adapters/terminal/readiness.js +11 -0
  24. package/dist/adapters/terminal/surface.js +15 -2
  25. package/dist/cli.js +3 -1
  26. package/dist/commands/call.js +3 -7
  27. package/dist/commands/debug.js +6 -25
  28. package/dist/commands/device-target.js +2 -1
  29. package/dist/commands/doctor.js +26 -137
  30. package/dist/commands/fixtures.js +13 -217
  31. package/dist/commands/list-executables.js +12 -22
  32. package/dist/commands/logs.js +1 -1
  33. package/dist/commands/manifest.js +11 -133
  34. package/dist/commands/parse-args.js +9 -4
  35. package/dist/commands/prepare.js +23 -53
  36. package/dist/commands/provision.js +3 -7
  37. package/dist/commands/reload.js +8 -47
  38. package/dist/commands/run.js +2 -5
  39. package/dist/commands/runtime-decision.js +5 -27
  40. package/dist/commands/self-test.js +1 -3
  41. package/dist/commands/status.js +20 -28
  42. package/dist/commands/stop.js +1 -1
  43. package/dist/doctor.js +9 -119
  44. package/dist/harness.js +31 -100
  45. package/dist/mm-harness-cli.js +3 -2
  46. package/dist/paths.js +8 -2
  47. package/dist/runtime-context.js +12 -17
  48. package/docs/CONTRIBUTING.md +27 -17
  49. package/package.json +2 -2
@@ -62,25 +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. 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.
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.
72
73
 
73
74
  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).
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).
84
94
 
85
95
  Each checkout owns:
86
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeeed/metamask-harness",
3
- "version": "0.75.0",
3
+ "version": "0.77.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mm-harness": "bin/mm-harness"
@@ -25,7 +25,7 @@
25
25
  "@farmslot/expo-recipe": "0.13.1",
26
26
  "@farmslot/handoff": "^0.3.1",
27
27
  "@farmslot/protocol": "0.34.0",
28
- "@farmslot/recipe-cli": "0.1.1",
28
+ "@farmslot/recipe-cli": "0.1.2",
29
29
  "@farmslot/recipe-harness": "0.22.1",
30
30
  "agent-device": "0.19.3",
31
31
  "commander": "^12.0.0",