@deeeed/metamask-harness 0.17.0 → 0.17.2
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 +34 -0
- package/README.md +90 -140
- package/adapters/core/cleanup.sh +0 -0
- package/adapters/core/inject.sh +0 -0
- package/adapters/extension/cleanup.mjs +0 -0
- package/adapters/extension/console-tail.mjs +51 -24
- package/adapters/extension/ensure-browser.sh +0 -0
- package/adapters/extension/inject.mjs +5 -9
- package/adapters/extension/launch-browser.cjs +0 -0
- package/adapters/extension/launch-webpack.cjs +83 -0
- package/adapters/extension/launch.sh +8 -11
- package/adapters/extension/live.sh +2 -0
- package/adapters/extension/readiness.mjs +0 -0
- package/adapters/extension/reattach.sh +1 -0
- package/adapters/extension/refresh-build.sh +0 -0
- package/adapters/extension/seed-fixture.sh +4 -12
- package/adapters/extension/sidepanel-toggle.sh +4 -1
- package/adapters/extension/snapshot-dist.sh +0 -0
- package/adapters/extension/stamp-runtime-title.cjs +49 -0
- package/adapters/extension/start-watch.sh +16 -4
- package/adapters/extension/stop-viewers.sh +1 -1
- package/adapters/extension/sync-webpack-dist.cjs +105 -0
- package/adapters/extension/verify.sh +1 -1
- package/adapters/extension/wallet-fixture-state.cjs +0 -0
- package/adapters/manifest.json +46 -38
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +0 -0
- package/adapters/mobile/bridge-runtime/console-forwarder.cjs +1 -1
- package/adapters/mobile/bridge-runtime/lib/target-discovery.cjs +2 -3
- package/adapters/mobile/bridge-runtime/setup-wallet.sh +0 -0
- package/adapters/mobile/cleanup.sh +16 -176
- package/adapters/mobile/inject.sh +88 -671
- package/adapters/mobile/launch-console-forwarder.cjs +39 -0
- package/adapters/mobile/lib/metro-listener.sh +0 -0
- package/adapters/mobile/lib/tmux-viewer.sh +0 -0
- package/adapters/mobile/open-device.sh +0 -0
- package/adapters/mobile/prewarm-bundle.sh +0 -0
- package/adapters/mobile/start-console-forwarder.sh +70 -0
- package/adapters/mobile/start-metro.sh +0 -41
- package/adapters/mobile/stop-metro.sh +0 -0
- package/adapters/mobile/verify.sh +4 -61
- package/adapters/mobile/wait-for-bridge.sh +0 -0
- package/adapters/mobile/yarn-setup.sh +0 -0
- package/adapters/shared/activate-repo-node.sh +0 -0
- package/adapters/shared/activate-repo-ruby.sh +0 -0
- package/adapters/shared/cli-ux.sh +0 -0
- package/adapters/shared/ensure-runner-deps.sh +0 -0
- package/adapters/shared/harness-path.sh +0 -0
- package/adapters/shared/hash-helpers.sh +0 -0
- package/adapters/shared/install-repo-deps.sh +0 -0
- package/adapters/shared/json-field.sh +0 -0
- package/adapters/shared/open-debug.mjs +90 -36
- package/adapters/shared/open-log-window.sh +0 -0
- package/adapters/shared/reap-checkout-metros.sh +0 -0
- package/adapters/shared/resolve-slot-ports-core.mjs +0 -6
- package/adapters/shared/resolve-slot-ports.mjs +0 -0
- package/adapters/shared/resolve-slot-ports.sh +0 -5
- package/adapters/shared/sync-wallet-fixture.sh +0 -0
- package/adapters/shared/tmux-session.sh +0 -0
- package/adapters/shared/tmux-viewer.sh +0 -0
- package/adapters/shared/update-check-worker.mjs +37 -0
- package/dist/adapters/extension/console-capture.js +84 -0
- package/dist/adapters/extension/runtime-decision.js +14 -2
- package/dist/adapters/extension/surface.js +3 -2
- package/dist/adapters/mobile/prepare.js +22 -7
- package/dist/adapters/mobile/surface.js +1 -1
- package/dist/adapters/resolve-slot-ports.js +0 -2
- package/dist/adapters/slot-ports.js +8 -0
- package/dist/cli.js +3 -11
- package/dist/commands/call.js +9 -4
- package/dist/commands/debug.js +38 -31
- package/dist/commands/fixtures.js +18 -10
- package/dist/commands/launch/index.js +10 -0
- package/dist/commands/logs.js +8 -6
- package/dist/commands/manifest.js +5 -17
- package/dist/commands/run-engine.js +1 -32
- package/dist/commands/run-report.js +1 -1
- package/dist/commands/run.js +50 -3
- package/dist/commands/status-probe.js +1 -1
- package/dist/commands/update.js +15 -28
- package/dist/doctor.js +1 -4
- package/dist/harness.js +5 -123
- package/dist/live-adapter-contract.js +6 -20
- package/dist/mm-harness-cli.js +6 -43
- package/dist/paths.js +2 -5
- package/dist/run-diagnostics.js +35 -40
- package/dist/runtime-context.js +26 -8
- package/docs/CHEATSHEET.md +39 -52
- package/docs/CLI-ERGONOMICS-HUMAN-QA.md +48 -104
- package/docs/CODE-MAP.md +1 -1
- package/docs/VIDEO-DEMO-VALIDATION.md +62 -0
- package/docs/architecture.md +65 -375
- package/docs/live-adapter-contract.md +3 -1
- package/library/actions/core/perps/_controller.mjs +10 -55
- package/library/manifests/mobile.action-manifest.json +1 -1
- package/package.json +2 -2
- package/scripts/completions.sh +0 -0
- package/scripts/install-completions.sh +0 -0
- package/adapters/mobile/overlay/app/dev-tools/AgenticService/AgentStepHud.tsx.patch +0 -185
- package/adapters/mobile/overlay/app/dev-tools/AgenticService/AgenticService.ts.patch +0 -1662
- package/adapters/mobile/overlay/compat/README.md +0 -28
- package/adapters/mobile/overlay/compat/rn81-message-event-source.patch +0 -42
- package/adapters/shared/resolve-farmslot-ports-core.mjs +0 -3
- package/adapters/shared/resolve-farmslot-ports.mjs +0 -5
- package/adapters/shared/resolve-farmslot-ports.sh +0 -7
- package/docs/CLI-SPEC.md +0 -1142
- package/docs/MENTAL-MODEL.md +0 -295
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Compatibility overlays (historical-commit replay)
|
|
2
|
-
|
|
3
|
-
NOT dead code. These overlays exist for replay/eval runs against OLD product
|
|
4
|
-
commits — e.g. re-running a historical task on a fixed baseline to validate
|
|
5
|
-
prompt or harness changes. A "zero current references" scan will always come
|
|
6
|
-
up empty here by design: the feature's purpose is non-current checkouts.
|
|
7
|
-
|
|
8
|
-
- Purpose: make historical product checkouts bootable/bridgeable under the
|
|
9
|
-
current local toolchain so Recipe v1 evals can replay against them.
|
|
10
|
-
- When it applies: mobile checkouts predating React Native 0.81 polyfill fixes.
|
|
11
|
-
- How it is applied: MANUALLY (no automatic apply logic in this repo).
|
|
12
|
-
The operator or the `/recipe-harness` skill applies the patch reversibly
|
|
13
|
-
before a historical rebuild (`git apply <patch>` in the product checkout,
|
|
14
|
-
`git apply -R` to remove) and records the overlay path in validation
|
|
15
|
-
evidence. `adapters/mobile/inject.sh` does NOT apply these.
|
|
16
|
-
|
|
17
|
-
Kept in the external runner repository, not Farmslot root scripts, so a
|
|
18
|
-
`/recipe-harness` skill can apply the same reversible overlay before a
|
|
19
|
-
historical rebuild and record the overlay path in validation evidence.
|
|
20
|
-
|
|
21
|
-
Listed in adapters/manifest.json (kind: compat-overlay) so the doctor
|
|
22
|
-
verifies the surface and this directory is never flagged as unused again.
|
|
23
|
-
|
|
24
|
-
## Patches
|
|
25
|
-
|
|
26
|
-
- `rn81-message-event-source.patch`: adds a read-only `MessageEvent.prototype.source`
|
|
27
|
-
getter for React Native 0.81 historical checkouts whose bundled polyfill omits
|
|
28
|
-
it while CDP websocket clients expect browser-compatible `MessageEvent` shape.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
compat-overlay: rn81-message-event-source (historical-checkout replay support)
|
|
2
|
-
|
|
3
|
-
What: patches metamask-mobile shim.js to add a read-only
|
|
4
|
-
MessageEvent.prototype.source getter.
|
|
5
|
-
Why: the harness CDP bridge expects browser-compatible MessageEvent shape;
|
|
6
|
-
pre-RN-0.81 checkouts ship a polyfill that omits .source, so the bridge
|
|
7
|
-
cannot attach when replaying tasks on those historical commits.
|
|
8
|
-
When: only when replaying/evaluating against mobile checkouts older than the
|
|
9
|
-
RN 0.81 upgrade (pre-RN-0.81 checkouts). Never needed on current main.
|
|
10
|
-
How: applied MANUALLY in the historical product checkout —
|
|
11
|
-
git apply <this file> (and `git apply -R` to remove)
|
|
12
|
-
No automatic apply logic exists in this repo. See ../README.md.
|
|
13
|
-
|
|
14
|
-
diff --git a/shim.js b/shim.js
|
|
15
|
-
--- a/shim.js
|
|
16
|
-
+++ b/shim.js
|
|
17
|
-
@@
|
|
18
|
-
if (typeof global.MessageEvent === 'undefined') {
|
|
19
|
-
global.MessageEvent =
|
|
20
|
-
require('react-native/src/private/webapis/html/events/MessageEvent').default;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
+// Historical runner compatibility: React Native 0.81's MessageEvent polyfill
|
|
24
|
-
+// can omit the browser `source` getter expected by CDP websocket clients under
|
|
25
|
-
+// newer Xcode/Hermes toolchains. Keep the getter read-only and null, matching
|
|
26
|
-
+// browser MessageEvent semantics for non-window messages.
|
|
27
|
-
+if (
|
|
28
|
-
+ global.MessageEvent?.prototype &&
|
|
29
|
-
+ !Object.getOwnPropertyDescriptor(global.MessageEvent.prototype, 'source')
|
|
30
|
-
+) {
|
|
31
|
-
+ Object.defineProperty(global.MessageEvent.prototype, 'source', {
|
|
32
|
-
+ configurable: true,
|
|
33
|
-
+ enumerable: true,
|
|
34
|
-
+ get() {
|
|
35
|
-
+ return null;
|
|
36
|
-
+ },
|
|
37
|
-
+ });
|
|
38
|
-
+}
|
|
39
|
-
+
|
|
40
|
-
class AbortError extends Error {
|
|
41
|
-
constructor(message) {
|
|
42
|
-
super(message);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Back-compat shim: this leaf is now resolve-slot-ports.mjs. Delegates to it for one
|
|
3
|
-
// release so `node resolve-farmslot-ports.mjs <fn> <repo>` keeps working (the new CLI
|
|
4
|
-
// reads the same argv positions on import).
|
|
5
|
-
import './resolve-slot-ports.mjs';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Back-compat shim: this wrapper is now resolve-slot-ports.sh. Sources it for one
|
|
3
|
-
# release so old callers keep the same sourced function names (including the
|
|
4
|
-
# resolve_farmslot_ports_by_repo alias defined there).
|
|
5
|
-
_SHIM_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
-
# shellcheck disable=SC1091
|
|
7
|
-
. "$_SHIM_DIR/resolve-slot-ports.sh"
|