@deeeed/metamask-harness 0.31.0 → 0.32.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 (24) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/adapters/extension/verify.sh +16 -4
  3. package/dist/commands/self-test.js +1 -1
  4. package/docs/RECIPES.md +5 -2
  5. package/package.json +2 -2
  6. /package/library/recipes/{perps/clean-market-testnet.core.recipe.json → core/perps/clean-market-testnet.recipe.json} +0 -0
  7. /package/library/recipes/{perps/order-lifecycle.core.recipe.json → core/perps/order-lifecycle.recipe.json} +0 -0
  8. /package/library/recipes/{perps/read-markets.core.recipe.json → core/perps/read-markets.recipe.json} +0 -0
  9. /package/library/recipes/{perps/smoke.core.recipe.json → core/perps/smoke.recipe.json} +0 -0
  10. /package/library/recipes/{perps/trading-lifecycle.core.recipe.json → core/perps/trading-lifecycle.recipe.json} +0 -0
  11. /package/library/recipes/{runner/smoke.core.recipe.json → core/runner/smoke.recipe.json} +0 -0
  12. /package/library/recipes/{perps/smoke.extension.recipe.json → extension/perps/smoke.recipe.json} +0 -0
  13. /package/library/recipes/{runner/action-validation.extension.recipe.json → extension/runner/action-validation.recipe.json} +0 -0
  14. /package/library/recipes/{runner/smoke.extension.recipe.json → extension/runner/smoke.recipe.json} +0 -0
  15. /package/library/recipes/{wallet/smoke.extension.recipe.json → extension/wallet/smoke.recipe.json} +0 -0
  16. /package/library/recipes/{app/lifecycle.android-smoke.mobile.recipe.json → mobile/app/lifecycle.android-smoke.recipe.json} +0 -0
  17. /package/library/recipes/{perps/performance.background-resume.mobile.recipe.json → mobile/perps/performance.background-resume.recipe.json} +0 -0
  18. /package/library/recipes/{perps/performance.cold-start.mobile.recipe.json → mobile/perps/performance.cold-start.recipe.json} +0 -0
  19. /package/library/recipes/{perps/performance.mobile.recipe.json → mobile/perps/performance.recipe.json} +0 -0
  20. /package/library/recipes/{perps/performance.warm-start.mobile.recipe.json → mobile/perps/performance.warm-start.recipe.json} +0 -0
  21. /package/library/recipes/{perps/smoke.mobile.recipe.json → mobile/perps/smoke.recipe.json} +0 -0
  22. /package/library/recipes/{runner/action-validation.mobile.recipe.json → mobile/runner/action-validation.recipe.json} +0 -0
  23. /package/library/recipes/{runner/smoke.mobile.recipe.json → mobile/runner/smoke.recipe.json} +0 -0
  24. /package/library/recipes/{wallet/smoke.mobile.recipe.json → mobile/wallet/smoke.recipe.json} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.32.0 - 2026-08-02
6
+
7
+ ### Changed
8
+
9
+ - Organize bundled platform recipe variants under `library/recipes/<adapter>/` while retaining temporary compatibility with legacy filename suffixes.
10
+
5
11
  ## 0.31.0 - 2026-08-02
6
12
 
7
13
  ### Added
@@ -88,7 +88,7 @@ RUNNER_BIN="$HARNESS_DIR/runner/bin/mm-harness"
88
88
  # --out (optional): a task-local recipes dir. Resolve it safely within the target
89
89
  # (resolve_harness_out rejects absolute/.. escapes) and prefer its smoke recipe so
90
90
  # `live --out <dir>` does not silently fall back to the installed default.
91
- SMOKE_RECIPE="$HARNESS_DIR/runner/recipes/runner/smoke.extension.recipe.json"
91
+ SMOKE_RECIPE="$HARNESS_DIR/runner/recipes/extension/runner/smoke.recipe.json"
92
92
  if [ -n "$OUT" ]; then
93
93
  # Fail fast on a task-local --out that does not contain the requested recipe.
94
94
  # Silently falling back to the installed default would validate a different
@@ -98,11 +98,23 @@ if [ -n "$OUT" ]; then
98
98
  echo "extension verify: --out '$OUT' did not resolve to a safe path under the target." >&2
99
99
  exit 2
100
100
  fi
101
- if [ ! -f "$OUT_ABS/runner/smoke.extension.recipe.json" ]; then
102
- echo "extension verify: --out '$OUT' (resolved: $OUT_ABS) has no runner/smoke.extension.recipe.json. Refusing to fall back to the installed default recipe; place the recipe under --out or omit --out." >&2
101
+ CANONICAL_SMOKE_RECIPE="$OUT_ABS/extension/runner/smoke.recipe.json"
102
+ LEGACY_SMOKE_RECIPE="$OUT_ABS/runner/smoke.extension.recipe.json"
103
+ if [ -f "$CANONICAL_SMOKE_RECIPE" ] && [ -f "$LEGACY_SMOKE_RECIPE" ]; then
104
+ echo "extension verify: --out '$OUT' declares runner.smoke for extension in both canonical and legacy paths." >&2
105
+ echo "Next: Remove $LEGACY_SMOKE_RECIPE and rerun verification." >&2
103
106
  exit 2
104
107
  fi
105
- SMOKE_RECIPE="$OUT_ABS/runner/smoke.extension.recipe.json"
108
+ if [ -f "$CANONICAL_SMOKE_RECIPE" ]; then
109
+ SMOKE_RECIPE="$CANONICAL_SMOKE_RECIPE"
110
+ elif [ -f "$LEGACY_SMOKE_RECIPE" ]; then
111
+ SMOKE_RECIPE="$LEGACY_SMOKE_RECIPE"
112
+ else
113
+ echo "extension verify: --out '$OUT' has no extension runner.smoke recipe." >&2
114
+ echo "Next: Add extension/runner/smoke.recipe.json under $OUT_ABS or omit --out." >&2
115
+ exit 2
116
+ fi
117
+ unset CANONICAL_SMOKE_RECIPE LEGACY_SMOKE_RECIPE
106
118
  fi
107
119
  ARTIFACTS="${ARTIFACTS:-$HARNESS_DIR/verify/$(date -u +%Y%m%dT%H%M%SZ)}"
108
120
  mkdir -p "$ARTIFACTS/logs"
@@ -26,7 +26,7 @@ async function runSelfTest(options) {
26
26
  const manifest = loadActionManifest(adapter);
27
27
  const manifestValidation = await validateManifest(manifest);
28
28
  const smokeRecipe = recipePath(
29
- adapter === "mobile" ? "runner/smoke.mobile.recipe.json" : "runner/smoke.extension.recipe.json"
29
+ adapter === "mobile" ? "mobile/runner/smoke.recipe.json" : "extension/runner/smoke.recipe.json"
30
30
  );
31
31
  const artifactsDir = path.join(root, adapter);
32
32
  const result = await runRecipe(adapter, smokeRecipe, artifactsDir, runnerDir, void 0, {
package/docs/RECIPES.md CHANGED
@@ -116,7 +116,7 @@ The protocol is authoritative:
116
116
  team-recipes/
117
117
  manifests/extension.action-manifest.json
118
118
  actions/extension/wallet/ensure_ready.mjs
119
- recipes/onboarding/smoke.extension.recipe.json
119
+ recipes/extension/onboarding/smoke.recipe.json
120
120
  ```
121
121
 
122
122
  ```bash
@@ -129,7 +129,10 @@ mm-harness run onboarding.smoke --plan
129
129
  Use `--library wallet=/path/to/library` for one command. The alias is the
130
130
  source name; without one, the directory name is used. Resolution follows the
131
131
  explicit library order, then bundled MetaMask. Adapter-specific variants are
132
- selected deterministically. Every run records the root recipe, exact resolved
132
+ selected deterministically from `recipes/<adapter>/<domain>/`. Legacy
133
+ `*.<adapter>.recipe.json` paths remain readable during migration, but new and
134
+ migrated libraries use the adapter-first layout. A file cannot declare its
135
+ adapter through both forms. Every run records the root recipe, exact resolved
133
136
  dependency documents, their digests, call edges, selected sources, and shadows.
134
137
 
135
138
  ## Direct product access
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeeed/metamask-harness",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mm-harness": "bin/mm-harness"
@@ -23,7 +23,7 @@
23
23
  "@farmslot/agent-runtime": "0.5.1",
24
24
  "@farmslot/handoff": "^0.3.1",
25
25
  "@farmslot/protocol": "0.16.0",
26
- "@farmslot/recipe-harness": "0.12.1",
26
+ "@farmslot/recipe-harness": "0.13.0",
27
27
  "commander": "^12.0.0",
28
28
  "es-module-lexer": "2.3.1",
29
29
  "esbuild": "0.28.1",