@deeeed/metamask-harness 0.17.4 → 0.17.5
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 +6 -103
- package/README.md +136 -96
- package/adapters/extension/console-tail.mjs +24 -55
- package/adapters/extension/ensure-browser.sh +7 -1
- package/adapters/extension/inject.mjs +15 -5
- package/adapters/extension/launch-browser.cjs +4 -3
- package/adapters/extension/launch.sh +11 -8
- package/adapters/extension/lib/chrome-args.cjs +24 -0
- package/adapters/extension/live.sh +1 -2
- package/adapters/extension/reattach.sh +0 -1
- package/adapters/extension/seed-fixture.sh +12 -4
- package/adapters/extension/sidepanel-toggle.sh +1 -4
- package/adapters/extension/start-watch.sh +4 -17
- package/adapters/extension/stop-viewers.sh +1 -1
- package/adapters/extension/verify.sh +1 -1
- package/adapters/manifest.json +45 -53
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +0 -16
- package/adapters/mobile/bridge-runtime/console-forwarder.cjs +1 -1
- package/adapters/mobile/bridge-runtime/lib/match-bridge-target.cjs +1 -3
- package/adapters/mobile/bridge-runtime/lib/target-discovery.cjs +3 -2
- package/adapters/mobile/cleanup.sh +176 -16
- package/adapters/mobile/inject.sh +671 -90
- package/adapters/mobile/overlay/app/dev-tools/AgenticService/AgentStepHud.tsx.patch +185 -0
- package/adapters/mobile/overlay/app/dev-tools/AgenticService/AgenticService.ts.patch +1662 -0
- package/adapters/mobile/overlay/compat/README.md +28 -0
- package/adapters/mobile/overlay/compat/rn81-message-event-source.patch +42 -0
- package/adapters/mobile/start-metro.sh +41 -0
- package/adapters/mobile/verify.sh +61 -4
- package/adapters/mobile/wait-for-bridge.sh +8 -22
- package/adapters/shared/harness-source-fingerprint.mjs +49 -0
- package/adapters/shared/install-repo-deps.sh +1 -5
- package/adapters/shared/open-debug.mjs +184 -103
- package/adapters/shared/resolve-farmslot-ports-core.mjs +3 -0
- package/adapters/shared/resolve-farmslot-ports.mjs +5 -0
- package/adapters/shared/resolve-farmslot-ports.sh +7 -0
- package/adapters/shared/resolve-slot-ports-core.mjs +6 -0
- package/adapters/shared/resolve-slot-ports.sh +7 -2
- package/bin/mm-harness +0 -7
- package/dist/adapters/extension/harness-freshness.js +39 -0
- package/dist/adapters/extension/runtime-decision.js +4 -73
- package/dist/adapters/extension/surface.js +2 -3
- package/dist/adapters/mobile/perps-env.js +3 -43
- package/dist/adapters/mobile/prepare.js +7 -22
- package/dist/adapters/mobile/source-freshness.js +26 -41
- package/dist/adapters/mobile/surface.js +1 -1
- package/dist/adapters/resolve-slot-ports.js +2 -0
- package/dist/adapters/slot-ports.js +0 -16
- package/dist/adapters.js +5 -12
- package/dist/cli-commands.js +1 -1
- package/dist/cli.js +12 -6
- package/dist/commands/call.js +22 -56
- package/dist/commands/check.js +3 -9
- package/dist/commands/checklist.js +4 -1
- package/dist/commands/debug.js +31 -38
- package/dist/commands/device-target.js +12 -27
- package/dist/commands/doctor.js +23 -77
- package/dist/commands/fixtures.js +17 -27
- package/dist/commands/launch/extension.js +2 -0
- package/dist/commands/launch/index.js +59 -167
- package/dist/commands/logs.js +6 -8
- package/dist/commands/manifest.js +25 -151
- package/dist/commands/parse-args.js +0 -2
- package/dist/commands/provision.js +3 -10
- package/dist/commands/run-engine.js +69 -71
- package/dist/commands/run-report.js +3 -12
- package/dist/commands/run.js +35 -245
- package/dist/commands/shared.js +3 -55
- package/dist/commands/status-probe.js +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/stop.js +2 -7
- package/dist/commands/update.js +28 -16
- package/dist/doctor.js +4 -1
- package/dist/harness.js +134 -43
- package/dist/heal-bounds.js +1 -1
- package/dist/live-adapter-contract.js +20 -6
- package/dist/mm-harness-cli.js +48 -123
- package/dist/paths.js +5 -2
- package/dist/runner.js +2 -37
- package/dist/runtime-context.js +8 -26
- package/docs/ADAPTER-SURFACE.md +112 -19
- package/docs/CHEATSHEET.md +52 -39
- package/docs/CLI-SPEC.md +1098 -0
- package/docs/CODE-MAP.md +1 -1
- package/docs/DEBUG-HANDOVER.md +36 -0
- package/docs/MENTAL-MODEL.md +295 -0
- package/docs/UX-PRINCIPLES.md +1 -3
- package/docs/architecture.md +375 -65
- package/docs/live-adapter-contract.md +2 -4
- package/docs/recipe-libraries.md +275 -45
- package/library/README.md +0 -4
- package/library/actions/core/perps/_controller.mjs +55 -10
- package/library/actions/mobile/platform/bridge.mjs +1 -5
- package/library/manifests/core.action-manifest.json +7 -7
- package/library/manifests/mobile.action-manifest.json +3 -28
- package/package.json +1 -4
- package/adapters/extension/launch-webpack.cjs +0 -83
- package/adapters/extension/stamp-runtime-title.cjs +0 -58
- package/adapters/extension/sync-webpack-dist.cjs +0 -107
- package/adapters/mobile/launch-console-forwarder.cjs +0 -39
- package/adapters/mobile/start-console-forwarder.sh +0 -70
- package/adapters/shared/update-check-worker.mjs +0 -43
- package/dist/adapters/extension/console-capture.js +0 -93
- package/dist/command-contract.js +0 -441
- package/dist/command-journal.js +0 -225
- package/dist/commands/last.js +0 -52
- package/dist/json-stream.js +0 -57
- package/dist/run-diagnostics.js +0 -261
- package/docs/CLI-ERGONOMICS-AUDIT.md +0 -32
- package/docs/CLI-ERGONOMICS-HUMAN-QA.md +0 -64
- package/docs/VIDEO-DEMO-VALIDATION.md +0 -74
- package/library/recipes/runner/smoke.core.recipe.json +0 -27
- package/library/recipes/wallet/smoke.extension.recipe.json +0 -42
- package/library/recipes/wallet/smoke.mobile.recipe.json +0 -42
- package/scripts/validate-human-outcomes.mjs +0 -169
package/docs/CHEATSHEET.md
CHANGED
|
@@ -1,48 +1,61 @@
|
|
|
1
|
-
# mm-harness cheatsheet
|
|
1
|
+
# mm-harness — user cheatsheet
|
|
2
2
|
|
|
3
|
-
Run inside
|
|
4
|
-
auto-detected.
|
|
3
|
+
`mm-harness <command> [target] [flags]` · Run from inside any MetaMask checkout · Platform auto-detected
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
---
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Daily loop
|
|
8
|
+
|
|
9
|
+
| Situation | Command |
|
|
9
10
|
|---|---|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
Extension log sources: `extension`, `dapp`, `webpack`, `watcher`, `rebuild`.
|
|
20
|
-
Mobile log sources: `app`, `metro`.
|
|
21
|
-
|
|
22
|
-
## Discover and prove
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
mm-harness actions positions
|
|
26
|
-
mm-harness actions --action metamask.wallet.ensure_unlocked
|
|
27
|
-
mm-harness call metamask.wallet.ensure_unlocked
|
|
28
|
-
mm-harness flows
|
|
29
|
-
mm-harness run recipe.json --plan
|
|
30
|
-
mm-harness run recipe.json --artifacts-dir temp/recipe-proof
|
|
31
|
-
```
|
|
11
|
+
| Start / relaunch iOS | `mm-harness launch ios` |
|
|
12
|
+
| Start / relaunch Android | `mm-harness launch android` |
|
|
13
|
+
| Launch extension (fullscreen) | `mm-harness launch` |
|
|
14
|
+
| Launch extension in sidepanel | `mm-harness launch --sidepanel` |
|
|
15
|
+
| Native code changed — rebuild first | `mm-harness launch ios --build` |
|
|
16
|
+
| Tail Metro / webpack logs | `mm-harness logs` |
|
|
17
|
+
| Open DevTools / RN inspector | `mm-harness debug` |
|
|
18
|
+
| Seed wallet from fixture — no typing | `mm-harness fixtures set` |
|
|
19
|
+
| Refresh wallet fixture files on slot | `mm-harness fixtures sync` |
|
|
32
20
|
|
|
33
|
-
|
|
34
|
-
`
|
|
21
|
+
`launch` auto-installs the overlay on first use.
|
|
22
|
+
`fixtures set` reads the password **from** the fixture — never typed.
|
|
35
23
|
|
|
36
|
-
|
|
24
|
+
---
|
|
37
25
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
mm-harness cleanup
|
|
43
|
-
mm-harness update
|
|
26
|
+
## Proof loop
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
actions → call <action> → flows → run recipe.json --plan → run recipe.json
|
|
44
30
|
```
|
|
45
31
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
| Command | What it does |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `mm-harness actions` | Action vocabulary for this adapter |
|
|
35
|
+
| `mm-harness call unlock` | One action through the real engine (fuzzy name ok) |
|
|
36
|
+
| `mm-harness flows` | Reusable flows (personal > team > canonical) |
|
|
37
|
+
| `mm-harness run recipe.json --plan` | Validate + print plan, no device touched; exit 5 if invalid |
|
|
38
|
+
| `mm-harness run recipe.json` | Execute + write evidence (summary / trace / artifacts) |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Health
|
|
43
|
+
|
|
44
|
+
| Command | What it does |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `mm-harness doctor` | Full readiness check — fixture, runtime context, overlay. No launch. |
|
|
47
|
+
| `mm-harness doctor --fix` | Repair overlay + runtime context without launching the app. |
|
|
48
|
+
| `mm-harness verify` | Check overlay/runtime is present and healthy. No launch. |
|
|
49
|
+
| `mm-harness cleanup` | Remove the overlay and restore the checkout. |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## For agents and scripts
|
|
54
|
+
|
|
55
|
+
**`--json`** — machine-readable output on every command; includes `recovered[]`, `mutations[]`, `schemaVersion`.
|
|
56
|
+
|
|
57
|
+
**`--heal`** — `off` (fail fast, repro-preserving) · `infra-only` (heal transport, never wallet; `run`/`call` default) · `auto` (auto-ensure overlay + heal; `launch` default).
|
|
58
|
+
|
|
59
|
+
**Exit codes** — `0` success · `1` recipe/action failed · `2` bad args / missing target · `5` validation failure (fix recipe).
|
|
60
|
+
|
|
61
|
+
**Tab completion** — `mm-harness completions install` prints the lines to add to `~/.zshrc` / `~/.bashrc`.
|