@deeeed/metamask-harness 0.19.1 → 0.21.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 (42) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/adapters/core/inject.sh +1 -3
  3. package/adapters/extension/ensure-browser.sh +6 -4
  4. package/adapters/extension/inject.mjs +1 -1
  5. package/adapters/extension/launch-browser.cjs +6 -1
  6. package/adapters/extension/lib/chrome-args.cjs +11 -1
  7. package/adapters/extension/start-watch.sh +1 -1
  8. package/adapters/extension/verify.sh +17 -0
  9. package/adapters/mobile/inject.sh +1 -1
  10. package/adapters/mobile/open-device.sh +12 -1
  11. package/adapters/mobile/wait-for-bridge.sh +1 -1
  12. package/dist/adapters/extension/ensure-ready.js +7 -2
  13. package/dist/adapters/extension/runtime-decision.js +4 -6
  14. package/dist/adapters/extension/runtime.js +114 -17
  15. package/dist/adapters/mobile/prepare.js +40 -6
  16. package/dist/command-contract.js +58 -5
  17. package/dist/commands/call.js +7 -4
  18. package/dist/commands/check.js +9 -2
  19. package/dist/commands/checklist.js +117 -14
  20. package/dist/commands/launch/extension.js +8 -3
  21. package/dist/commands/launch/index.js +38 -25
  22. package/dist/commands/launch/mobile.js +2 -2
  23. package/dist/commands/manifest.js +86 -25
  24. package/dist/commands/run-engine.js +7 -2
  25. package/dist/heal-bounds.js +1 -1
  26. package/dist/manifest.js +85 -101
  27. package/dist/metamask-action-validation.js +45 -0
  28. package/dist/mm-harness-cli.js +7 -4
  29. package/dist/runner.js +9 -4
  30. package/docs/CONTRIBUTING.md +8 -0
  31. package/docs/RECIPES.md +2 -11
  32. package/library/actions/extension/platform/cdp.mjs +8 -3
  33. package/library/actions/extension/ui/navigate.mjs +239 -16
  34. package/library/actions/mobile/ui/navigate.mjs +1 -1
  35. package/library/manifests/core.action-manifest.json +357 -489
  36. package/library/manifests/extension.action-manifest.json +616 -885
  37. package/library/manifests/mobile.action-manifest.json +647 -931
  38. package/library/recipes/perps/lifecycle.recipe.json +3 -9
  39. package/library/recipes/runner/action-validation.extension.recipe.json +5 -4
  40. package/package.json +5 -4
  41. package/scripts/completions.sh +2 -2
  42. package/library/library.json +0 -7
@@ -40,20 +40,14 @@
40
40
  "action": "ui.navigate",
41
41
  "intent": "Show the Perps home surface",
42
42
  "next": "navigate-market",
43
- "route": "PerpsMarketListView",
44
- "hash": "#/?tab=perps"
43
+ "page": "perps"
45
44
  },
46
45
  "navigate-market": {
47
46
  "action": "ui.navigate",
48
47
  "intent": "Show the ETH Perps market details",
49
48
  "next": "start-state",
50
- "route": "PerpsMarketDetails",
51
- "params": {
52
- "market": {
53
- "symbol": "ETH"
54
- }
55
- },
56
- "hash": "#/perps/market/ETH"
49
+ "page": "perps-market",
50
+ "market": "ETH"
57
51
  },
58
52
  "start-state": {
59
53
  "action": "metamask.perps.start_state",
@@ -116,7 +116,7 @@
116
116
  "action": "ui.navigate",
117
117
  "next": "ui-wait-perps",
118
118
  "intent": "Open the Perps tab",
119
- "hash": "#/?tab=perps"
119
+ "page": "perps"
120
120
  },
121
121
  "ui-wait-perps": {
122
122
  "action": "ui.wait_for",
@@ -148,19 +148,20 @@
148
148
  "action": "ui.navigate",
149
149
  "next": "perps-navigate-home",
150
150
  "intent": "Show the Perps home surface",
151
- "hash": "#/?tab=perps"
151
+ "page": "perps"
152
152
  },
153
153
  "perps-navigate-home": {
154
154
  "action": "ui.navigate",
155
155
  "next": "perps-navigate-market",
156
156
  "intent": "Show the Perps home surface",
157
- "hash": "#/?tab=perps"
157
+ "page": "perps"
158
158
  },
159
159
  "perps-navigate-market": {
160
160
  "action": "ui.navigate",
161
161
  "next": "start-state",
162
162
  "intent": "Show the ETH Perps market details",
163
- "hash": "#/perps/market/ETH"
163
+ "page": "perps-market",
164
+ "market": "ETH"
164
165
  },
165
166
  "ensure-clean": {
166
167
  "action": "metamask.perps.ensure_positions",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeeed/metamask-harness",
3
- "version": "0.19.1",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mm-harness": "bin/mm-harness"
@@ -19,9 +19,10 @@
19
19
  "check:syntax": "find . -name '*.mjs' -print0 | xargs -0 -n1 node --check"
20
20
  },
21
21
  "dependencies": {
22
- "@farmslot/agent-runtime": "^0.2.0",
23
- "@farmslot/protocol": "^0.11.0",
24
- "@farmslot/recipe-harness": "^0.9.1",
22
+ "@farmslot/agent-runtime": "^0.3.1",
23
+ "@farmslot/handoff": "^0.3.1",
24
+ "@farmslot/protocol": "^0.12.0",
25
+ "@farmslot/recipe-harness": "^0.10.0",
25
26
  "commander": "^12.0.0",
26
27
  "es-module-lexer": "2.3.1",
27
28
  "esbuild": "0.28.1",
@@ -77,7 +77,7 @@ if [ -n "${BASH_VERSION:-}" ]; then
77
77
  case "$cmd" in
78
78
  launch) [ "$cword" -eq 2 ] && COMPREPLY=($(compgen -W "ios android" -- "$cur")) ;;
79
79
  fixtures) [ "$cword" -eq 2 ] && COMPREPLY=($(compgen -W "init sync set generate finalize" -- "$cur")) ;;
80
- checklist) [ "$cword" -eq 2 ] && COMPREPLY=($(compgen -W "mark" -- "$cur")) ;;
80
+ checklist) [ "$cword" -eq 2 ] && COMPREPLY=($(compgen -W "mark closeout" -- "$cur")) ;;
81
81
  completions) [ "$cword" -eq 2 ] && COMPREPLY=($(compgen -W "install bash zsh status" -- "$cur")) ;;
82
82
  call) [ "$cword" -eq 2 ] && COMPREPLY=($(compgen -W "$(_mmh_actions)" -- "$cur")) ;;
83
83
  run) COMPREPLY=($(compgen -f -- "$cur"; compgen -W "$(_mmh_recipes)" -- "$cur")) ;;
@@ -111,7 +111,7 @@ if [ -n "${ZSH_VERSION:-}" ]; then
111
111
  case "$cmd" in
112
112
  launch) (( CURRENT == 3 )) && { candidates=(ios android); compadd -a candidates; } ;;
113
113
  fixtures) (( CURRENT == 3 )) && { candidates=(init sync set generate finalize); compadd -a candidates; } ;;
114
- checklist) (( CURRENT == 3 )) && { candidates=(mark); compadd -a candidates; } ;;
114
+ checklist) (( CURRENT == 3 )) && { candidates=(mark closeout); compadd -a candidates; } ;;
115
115
  completions) (( CURRENT == 3 )) && { candidates=(install bash zsh status); compadd -a candidates; } ;;
116
116
  call) (( CURRENT == 3 )) && { candidates=("${(@f)$(_mmh_actions)}"); compadd -a candidates; } ;;
117
117
  run) candidates=("${(@f)$(_mmh_recipes)}"); compadd -a candidates; _files ;;
@@ -1,7 +0,0 @@
1
- {
2
- "kind": "recipe-library",
3
- "schema_version": 1,
4
- "name": "metamask",
5
- "owner": "mm-harness-runner",
6
- "description": "Canonical MetaMask library of reusable, parameterized recipes. Team and personal libraries layer on top and win resolution by default."
7
- }