@deeeed/metamask-harness 0.6.3 → 0.7.1

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 (37) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/adapters/core/inject.sh +7 -2
  3. package/adapters/extension/inject.mjs +14 -2
  4. package/adapters/extension/start-watch.sh +11 -17
  5. package/adapters/manifest.json +57 -9
  6. package/adapters/mobile/inject.sh +7 -2
  7. package/adapters/mobile/lib/tmux-viewer.sh +31 -10
  8. package/adapters/mobile/open-device.sh +14 -1
  9. package/adapters/mobile/stop-metro.sh +1 -1
  10. package/adapters/mobile/yarn-setup.sh +15 -1
  11. package/adapters/shared/activate-repo-ruby.sh +124 -0
  12. package/adapters/shared/open-log-window.sh +55 -0
  13. package/adapters/shared/resolve-farmslot-ports-core.mjs +3 -205
  14. package/adapters/shared/resolve-farmslot-ports.mjs +4 -19
  15. package/adapters/shared/resolve-farmslot-ports.sh +6 -104
  16. package/adapters/shared/resolve-slot-ports-core.mjs +213 -0
  17. package/adapters/shared/resolve-slot-ports.mjs +20 -0
  18. package/adapters/shared/resolve-slot-ports.sh +110 -0
  19. package/adapters/shared/tmux-session.sh +35 -0
  20. package/dist/adapters/mobile/provision.js +25 -2
  21. package/dist/adapters/{resolve-farmslot-ports.js → resolve-slot-ports.js} +4 -2
  22. package/dist/adapters/slot-ports.js +8 -10
  23. package/dist/cli-commands.js +3 -3
  24. package/dist/commands/call.js +5 -0
  25. package/dist/commands/doctor.js +55 -2
  26. package/dist/commands/fixtures.js +5 -3
  27. package/dist/commands/launch/extension.js +18 -0
  28. package/dist/commands/launch/index.js +11 -4
  29. package/dist/commands/list-executables.js +48 -0
  30. package/dist/commands/logs.js +25 -2
  31. package/dist/commands/manifest.js +27 -7
  32. package/dist/commands/parse-args.js +2 -0
  33. package/dist/commands/run.js +3 -4
  34. package/dist/live-adapter-contract.js +30 -9
  35. package/dist/mm-harness-cli.js +16 -1
  36. package/dist/paths.js +4 -1
  37. package/package.json +1 -1
@@ -18,6 +18,7 @@ const REAL = [
18
18
 
19
19
  List the action vocabulary + field schemas for the checkout adapter.
20
20
 
21
+ --action <name> Describe one action; fuzzy-resolves like call (short or full name)
21
22
  --adapter <mobile|extension|core> Target adapter (auto-detected inside a checkout)
22
23
  --target <path> Checkout path (default: cwd)
23
24
  --raw Dump raw action registry JSON
@@ -25,6 +26,7 @@ const REAL = [
25
26
 
26
27
  Example:
27
28
  mm-harness actions --adapter mobile
29
+ mm-harness actions --adapter mobile --action assert_orders
28
30
  mm-harness actions --adapter extension --raw`
29
31
  },
30
32
  {
@@ -41,6 +43,7 @@ Example:
41
43
  core headless \u2014 no dev server to stop (teaching error)
42
44
 
43
45
  --port <port> Dev-server port (default: the checkout's slot context)
46
+ --adapter <mobile|extension|core> Target adapter (auto-detected inside a checkout)
44
47
  --target <path> Checkout path (default: cwd)
45
48
  --json Machine-readable output
46
49
 
@@ -59,11 +62,13 @@ Example:
59
62
  if unique; ambiguous = exit 2. Actions differ per adapter \u2014 list this checkout's
60
63
  with: mm-harness actions.
61
64
 
65
+ --list List everything invocable for the adapter (actions + flows); no <action> needed
62
66
  --arg k=v Action field value (repeatable)
63
67
  --adapter <mobile|extension|core> Target adapter (auto-detected inside a checkout)
64
68
  --target <path> Checkout path (default: cwd)
65
69
  --artifacts-dir <dir> Where to write evidence (default: temp dir)
66
70
  --action-manifest <path> Override the action manifest
71
+ --library <name=path> Add/override a recipe-library source (repeatable)
67
72
  --heal <off|infra-only|auto> Healing policy (default: infra-only); auto-ensures the overlay
68
73
  --json Machine-readable output
69
74
 
@@ -96,10 +101,13 @@ Example:
96
101
 
97
102
  Validate + run a recipe and write evidence (summary / trace / artifacts).
98
103
 
104
+ --list List everything invocable for the adapter (actions + flows); no <recipe> needed
99
105
  --plan Validate + print execution plan, touching nothing. Exit 5 if invalid.
100
106
  --adapter <mobile|extension|core> Target adapter (auto-detected inside a checkout)
101
107
  --target <path> Checkout path (default: cwd)
102
108
  --artifacts-dir <dir> Where to write evidence (required unless --plan)
109
+ --action-manifest <path> Override the action manifest
110
+ --library <name=path> Add/override a recipe-library source (repeatable)
103
111
  --heal <off|infra-only|auto> Healing policy (default: infra-only); auto-ensures the overlay
104
112
  --json Machine-readable output
105
113
  --record-video=full-run Record a video of the run
@@ -118,13 +126,17 @@ Example:
118
126
  sections so there is no hunting for files.
119
127
 
120
128
  --fix Repair the overlay/runtime-context WITHOUT launching (no fixture reseed); --json adds fixed[]/failed[]
129
+ --expect-live Exit 0 iff the runtime is live (extension: watcher+CDP; mobile: Metro+bridge; core: deps), non-zero + teaching escape otherwise
130
+ --cdp-port <port> Extension CDP port for the liveness probe (env: CDP_PORT / RECIPE_CDP_PORT)
121
131
  --adapter <mobile|extension|core> Target adapter (auto-detected inside a checkout)
122
132
  --target <path> Checkout path (default: cwd)
133
+ --runtime-dir <dir> Runtime dir containing agentic-runtime.json (relative to target)
123
134
  --json Machine-readable output
124
135
 
125
136
  Example:
126
137
  mm-harness doctor
127
138
  mm-harness doctor --fix --json
139
+ mm-harness doctor --adapter extension --target /path/to/checkout --cdp-port 6662 --expect-live
128
140
  mm-harness doctor --adapter mobile --target /path/to/checkout`
129
141
  },
130
142
  {
@@ -238,6 +250,7 @@ Example:
238
250
  --runway Post-launch runway check (mobile only; teaching error elsewhere)
239
251
  --watch Persistent webpack watcher then relaunch (extension only)
240
252
  --sidepanel | --fullscreen Extension display mode (default --fullscreen)
253
+ --url <dapp-url> Open a dapp in the main tab beside the sidepanel (extension only)
241
254
  --heal <off|infra-only|auto> Healing policy (default auto); bounds always enforced
242
255
  --device <udid|name> Target simulator/device (env: IOS_SIMULATOR / ADB_SERIAL)
243
256
  --cdp-port <port> Extension CDP port (env: CDP_PORT / RECIPE_CDP_PORT)
@@ -261,6 +274,7 @@ Example:
261
274
  Teaching error if nothing is running (points at launch).
262
275
 
263
276
  --full Raw log tail (default = compact) (env: RECIPE_LOG_UI)
277
+ --window (Re)open the read-only tmux tail window for the resolved dev-server port (leaves the process untouched)
264
278
  --events <n> Compact event count (default 10) (env: RECIPE_LOG_EVENTS)
265
279
  --source <label> Log source per adapter \u2014 mobile: metro|app (default metro);
266
280
  extension: webpack|watcher|rebuild|app (default webpack).
@@ -271,7 +285,8 @@ Example:
271
285
 
272
286
  Example:
273
287
  mm-harness logs
274
- mm-harness logs --full`
288
+ mm-harness logs --full
289
+ mm-harness logs --window`
275
290
  },
276
291
  {
277
292
  name: "debug",
package/dist/paths.js CHANGED
@@ -47,6 +47,9 @@ function recipeWatchLogCandidates() {
47
47
  }
48
48
  function resolveLocalProtocolRoot() {
49
49
  const candidates = [
50
+ // Orchestrator-neutral name is primary; FARMSLOT_ROOT stays a back-compat alias
51
+ // for one release (the installer injects METAMASK_RUNNER_PROTOCOL_ROOT).
52
+ process.env.METAMASK_RUNNER_PROTOCOL_ROOT,
50
53
  process.env.FARMSLOT_ROOT,
51
54
  readConfiguredProtocolRoot(),
52
55
  findProtocolRoot(runnerDir),
@@ -59,7 +62,7 @@ function resolveRequiredLocalProtocolRoot(reason) {
59
62
  const root = resolveLocalProtocolRoot();
60
63
  if (!root) {
61
64
  throw new Error(
62
- `${reason} requires a local protocol/runtime checkout. Set FARMSLOT_ROOT or create .farmslot-root for this dev-only path.`
65
+ `${reason} requires a local protocol/runtime checkout. Set METAMASK_RUNNER_PROTOCOL_ROOT (or the legacy FARMSLOT_ROOT), or create .farmslot-root for this dev-only path.`
63
66
  );
64
67
  }
65
68
  return root;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeeed/metamask-harness",
3
- "version": "0.6.3",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mm-harness": "bin/mm-harness"