@deeeed/metamask-harness 0.34.4 → 0.36.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.
- package/CHANGELOG.md +25 -0
- package/README.md +9 -1
- package/adapters/core/inject.sh +3 -3
- package/adapters/extension/check-infura-readiness.cjs +102 -0
- package/adapters/extension/inject.mjs +4 -4
- package/adapters/extension/live.sh +25 -10
- package/adapters/extension/start-watch.sh +15 -0
- package/adapters/extension/wallet-fixture-state.cjs +3 -1
- package/adapters/manifest.json +16 -0
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +73 -42
- package/adapters/mobile/inject.sh +4 -3
- package/adapters/mobile/reset-app-data.sh +154 -0
- package/adapters/mobile/verify.sh +37 -0
- package/dist/adapters/extension/product-config.js +29 -1
- package/dist/adapters/extension/runtime.js +60 -15
- package/dist/adapters/extension/surface.js +6 -1
- package/dist/adapters/mobile/surface.js +6 -1
- package/dist/adapters.js +18 -0
- package/dist/cli-commands.js +1 -1
- package/dist/cli.js +2 -2
- package/dist/command-contract.js +1 -1
- package/dist/commands/device-target.js +5 -0
- package/dist/commands/fixtures.js +106 -31
- package/dist/commands/launch/extension.js +39 -3
- package/dist/commands/launch/index.js +13 -0
- package/dist/doctor.js +30 -1
- package/dist/mm-harness-cli.js +6 -3
- package/dist/recipe-security.js +3 -0
- package/docs/RECIPES.md +29 -0
- package/library/actions/extension/wallet/import.mjs +234 -0
- package/library/actions/extension/wallet/reset.mjs +98 -0
- package/library/actions/extension/wallet/state.mjs +1 -0
- package/library/actions/mobile/analytics/consent-settings.mjs +112 -0
- package/library/actions/mobile/analytics/set_consent.mjs +4 -112
- package/library/actions/mobile/platform/bridge.mjs +8 -0
- package/library/actions/mobile/wallet/import.mjs +259 -0
- package/library/actions/mobile/wallet/reset-helper.mjs +99 -0
- package/library/actions/mobile/wallet/reset.mjs +7 -0
- package/library/actions/shared/wallet/import-source.mjs +101 -0
- package/library/manifests/extension.action-manifest.json +112 -0
- package/library/manifests/mobile.action-manifest.json +108 -0
- package/library/recipes/wallet/import.recipe.json +83 -0
- package/library/recipes/wallet/reset-import.recipe.json +88 -0
- package/package.json +1 -1
- package/scripts/completions.sh +2 -2
- package/scripts/site-contrast.mjs +7 -0
- package/site/architecture.html +14 -7
- package/site/assets/metamask-fox.svg +24 -0
- package/site/assets/progress.mjs +6 -0
- package/site/assets/style.css +88 -29
- package/site/cheatsheet.html +5 -6
- package/site/ecosystem.html +162 -0
- package/site/how-it-works.html +8 -9
- package/site/index.html +17 -12
- package/site/perps.html +103 -45
- package/site/recipes.html +5 -6
- package/site/reviewers.html +5 -6
- package/site/tutorials/index.html +5 -6
- package/site/tutorials/v1.html +5 -6
- package/site/tutorials/v2.html +6 -8
- package/site/tutorials/v3.html +5 -6
- package/site/tutorials/v4.html +5 -6
- package/site/tutorials/v5.html +5 -6
- package/site/tutorials/v6.html +5 -6
- package/site/tutorials/v7.html +5 -6
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Ecosystem — which repo is which</title>
|
|
7
|
+
<meta name="description" content="A dependency map of the repositories and packages behind the recipe workflow: skills, mm-harness, the spec and engine, team recipe libraries, the product repos, and the learnings inbox.">
|
|
8
|
+
<link rel="icon" href="assets/metamask-fox.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="stylesheet" href="assets/style.css?v=4">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<a class="skip" href="#map">Skip to the map</a>
|
|
13
|
+
|
|
14
|
+
<header class="topbar">
|
|
15
|
+
<div class="wrap topbar-inner">
|
|
16
|
+
<a class="brand" href="index.html">
|
|
17
|
+
<img class="brand-mark" src="assets/metamask-fox.svg" alt="" width="22" height="22">
|
|
18
|
+
<span class="brand-name">recipes</span>
|
|
19
|
+
</a>
|
|
20
|
+
<nav class="nav" aria-label="Main">
|
|
21
|
+
<a class="nav-cta" href="index.html#prompt">Quick start</a>
|
|
22
|
+
<a href="how-it-works.html">How it works</a>
|
|
23
|
+
<a href="perps.html">Team / Perps</a>
|
|
24
|
+
<a href="cheatsheet.html">Cheatsheet</a>
|
|
25
|
+
<a href="architecture.html">Architecture</a>
|
|
26
|
+
<a href="tutorials/index.html">Tutorials</a>
|
|
27
|
+
</nav>
|
|
28
|
+
</div>
|
|
29
|
+
</header>
|
|
30
|
+
|
|
31
|
+
<main>
|
|
32
|
+
<section class="wrap hero" style="padding-bottom:0.5rem">
|
|
33
|
+
<span class="eyebrow">Repositories</span>
|
|
34
|
+
<h1>Which repo is which</h1>
|
|
35
|
+
<p class="lede">
|
|
36
|
+
Six things sit behind a recipe run, and it is not obvious from the outside which one you install,
|
|
37
|
+
which one you contribute to, and which one is just a dependency. This is the dependency map — not
|
|
38
|
+
a pitch.
|
|
39
|
+
</p>
|
|
40
|
+
</section>
|
|
41
|
+
|
|
42
|
+
<section class="wrap-wide">
|
|
43
|
+
<div class="map" id="map">
|
|
44
|
+
|
|
45
|
+
<article class="node">
|
|
46
|
+
<span class="node-tag">You invoke this</span>
|
|
47
|
+
<h2 class="node-name">Skills</h2>
|
|
48
|
+
<p class="node-what">
|
|
49
|
+
The workflows — <code>mms-recipe-cook</code>, <code>mms-recipe-pr-qa-review</code> and the rest.
|
|
50
|
+
They call <code>mm-harness</code>; they are not a dependency of it.
|
|
51
|
+
</p>
|
|
52
|
+
<a class="node-url" href="https://github.com/Consensys/skills">github.com/Consensys/skills</a>
|
|
53
|
+
<span class="badge">internal</span>
|
|
54
|
+
</article>
|
|
55
|
+
|
|
56
|
+
<p class="map-edge">calls ↓</p>
|
|
57
|
+
|
|
58
|
+
<article class="node node-key">
|
|
59
|
+
<span class="node-tag">The runner</span>
|
|
60
|
+
<h2 class="node-name">mm-harness</h2>
|
|
61
|
+
<p class="node-what">
|
|
62
|
+
Launch, typed actions, graph execution, artifacts. Installed from npm as
|
|
63
|
+
<code>@deeeed/metamask-harness</code>; the MetaMask-specific layer lives here.
|
|
64
|
+
</p>
|
|
65
|
+
<a class="node-url" href="https://github.com/MetaMask/experimental-metamask-harness">github.com/MetaMask/experimental-metamask-harness</a>
|
|
66
|
+
<span class="badge">private</span>
|
|
67
|
+
<span class="badge">npm @deeeed/metamask-harness</span>
|
|
68
|
+
</article>
|
|
69
|
+
|
|
70
|
+
<div class="map-split">
|
|
71
|
+
<p class="map-edge">depends on ↓</p>
|
|
72
|
+
<p class="map-edge">runs recipes from ↓</p>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="map-row">
|
|
76
|
+
<article class="node">
|
|
77
|
+
<span class="node-tag">Spec & engine</span>
|
|
78
|
+
<h2 class="node-name">farmslot packages</h2>
|
|
79
|
+
<p class="node-what">
|
|
80
|
+
The recipe protocol and the execution engine, as pinned by mm-harness.
|
|
81
|
+
<code>recipe-harness</code> depends on <code>protocol</code>.
|
|
82
|
+
</p>
|
|
83
|
+
<ul class="node-list">
|
|
84
|
+
<li><code>@farmslot/protocol</code> 0.18.0</li>
|
|
85
|
+
<li><code>@farmslot/recipe-harness</code> 0.14.0</li>
|
|
86
|
+
<li><code>@farmslot/agent-runtime</code> 0.7.0</li>
|
|
87
|
+
<li><code>@farmslot/handoff</code> 0.3.1</li>
|
|
88
|
+
<li><code>@farmslot/expo-recipe</code> 0.7.1</li>
|
|
89
|
+
</ul>
|
|
90
|
+
<span class="badge">npm</span>
|
|
91
|
+
</article>
|
|
92
|
+
|
|
93
|
+
<article class="node">
|
|
94
|
+
<span class="node-tag">Your customization</span>
|
|
95
|
+
<h2 class="node-name">Recipe libraries</h2>
|
|
96
|
+
<p class="node-what">
|
|
97
|
+
One per team, pointed at with <code>RECIPE_LIBRARY_PATH</code>, resolved ahead of the small
|
|
98
|
+
bundled MetaMask library. Perps is the worked example.
|
|
99
|
+
</p>
|
|
100
|
+
<a class="node-url" href="https://github.com/MetaMask/experimental-metamask-recipe-perps">github.com/MetaMask/experimental-metamask-recipe-perps</a>
|
|
101
|
+
<span class="badge">private</span>
|
|
102
|
+
<a class="node-more" href="perps.html">How to point at one →</a>
|
|
103
|
+
</article>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<p class="map-edge">drives ↓</p>
|
|
107
|
+
|
|
108
|
+
<article class="node">
|
|
109
|
+
<span class="node-tag">What gets proved</span>
|
|
110
|
+
<h2 class="node-name">Product repos</h2>
|
|
111
|
+
<p class="node-what">
|
|
112
|
+
The real builds a recipe drives. Each also installs the skills — every one of the three has a
|
|
113
|
+
<code>skills</code> script running <code>metamask-skills sync</code>.
|
|
114
|
+
</p>
|
|
115
|
+
<a class="node-url" href="https://github.com/MetaMask/metamask-extension">github.com/MetaMask/metamask-extension</a>
|
|
116
|
+
<a class="node-url" href="https://github.com/MetaMask/metamask-mobile">github.com/MetaMask/metamask-mobile</a>
|
|
117
|
+
<a class="node-url" href="https://github.com/MetaMask/core">github.com/MetaMask/core</a>
|
|
118
|
+
<span class="badge">public</span>
|
|
119
|
+
</article>
|
|
120
|
+
|
|
121
|
+
<p class="map-edge">promoted learnings, via <code>@farmslot/handoff</code> ↓</p>
|
|
122
|
+
|
|
123
|
+
<article class="node">
|
|
124
|
+
<span class="node-tag">Opt-in output</span>
|
|
125
|
+
<h2 class="node-name">Learnings inbox</h2>
|
|
126
|
+
<p class="node-what">
|
|
127
|
+
Scrubbed learning packages staged from finished runs, for later review. A terminal mark stages
|
|
128
|
+
locally; sharing centrally is a separate, explicit step.
|
|
129
|
+
</p>
|
|
130
|
+
<a class="node-url" href="https://github.com/MetaMask/experimental-distributed-learnings">github.com/MetaMask/experimental-distributed-learnings</a>
|
|
131
|
+
<span class="badge">private</span>
|
|
132
|
+
</article>
|
|
133
|
+
|
|
134
|
+
</div>
|
|
135
|
+
</section>
|
|
136
|
+
|
|
137
|
+
<section class="wrap">
|
|
138
|
+
<div class="note">
|
|
139
|
+
<span class="note-title">Standing disclosure</span>
|
|
140
|
+
<p>
|
|
141
|
+
The farmslot <strong>control plane</strong> is experimental and sole-maintained. What is adopted
|
|
142
|
+
here is the spec and the engine — the npm packages above — not the control plane. Weigh that
|
|
143
|
+
before depending on anything beyond them.
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="btn-row">
|
|
148
|
+
<a class="btn btn-primary" href="perps.html">Customize it for your team →</a>
|
|
149
|
+
<a class="btn btn-ghost" href="architecture.html">How the layers fit</a>
|
|
150
|
+
</div>
|
|
151
|
+
</section>
|
|
152
|
+
</main>
|
|
153
|
+
|
|
154
|
+
<footer class="footer">
|
|
155
|
+
<div class="wrap">
|
|
156
|
+
<p>Internal getting-started guide for proving MetaMask changes with recipes. Not official MetaMask product documentation.</p>
|
|
157
|
+
<p>Versions are the ones mm-harness pins today; check <code>package.json</code> over this page.</p>
|
|
158
|
+
</div>
|
|
159
|
+
</footer>
|
|
160
|
+
<script type="module" src="assets/progress.mjs?v=4"></script>
|
|
161
|
+
</body>
|
|
162
|
+
</html>
|
package/site/how-it-works.html
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>How it works — proving a change with a recipe</title>
|
|
7
7
|
<meta name="description" content="How a recipe proves a change on a real MetaMask build, checks itself before handoff, and stays behind as a regression guard. The full walkthrough, step by step.">
|
|
8
|
-
<link rel="
|
|
8
|
+
<link rel="icon" href="assets/metamask-fox.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="stylesheet" href="assets/style.css?v=4">
|
|
9
10
|
</head>
|
|
10
11
|
<body data-progress-page="start">
|
|
11
12
|
<a class="skip" href="#steps">Skip to the walkthrough</a>
|
|
@@ -13,18 +14,16 @@
|
|
|
13
14
|
<header class="topbar">
|
|
14
15
|
<div class="wrap topbar-inner">
|
|
15
16
|
<a class="brand" href="index.html">
|
|
16
|
-
<
|
|
17
|
+
<img class="brand-mark" src="assets/metamask-fox.svg" alt="" width="22" height="22">
|
|
17
18
|
<span class="brand-name">recipes</span>
|
|
18
19
|
</a>
|
|
19
20
|
<nav class="nav" aria-label="Main">
|
|
20
21
|
<a class="nav-cta" href="index.html#prompt">Quick start</a>
|
|
21
22
|
<a href="how-it-works.html" aria-current="page">How it works</a>
|
|
22
|
-
<a href="
|
|
23
|
-
<a href="perps.html">Perps</a>
|
|
23
|
+
<a href="perps.html">Team / Perps</a>
|
|
24
24
|
<a href="cheatsheet.html">Cheatsheet</a>
|
|
25
25
|
<a href="architecture.html">Architecture</a>
|
|
26
26
|
<a href="tutorials/index.html">Tutorials</a>
|
|
27
|
-
<a href="reviewers.html">For Reviewers</a>
|
|
28
27
|
</nav>
|
|
29
28
|
</div>
|
|
30
29
|
</header>
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
<span>progress saves in this browser</span>
|
|
56
55
|
</div>
|
|
57
56
|
<p style="margin-top:.9rem;opacity:.7;font-size:.9rem;max-width:60ch">
|
|
58
|
-
A proposal for how agents can code at MetaMask — offered for teams to try
|
|
57
|
+
A proposal for how agents can code at MetaMask — offered for teams to try.
|
|
59
58
|
</p>
|
|
60
59
|
</section>
|
|
61
60
|
|
|
@@ -663,9 +662,9 @@ artifacts (6):
|
|
|
663
662
|
<h2>Next</h2>
|
|
664
663
|
<div class="grid grid-3">
|
|
665
664
|
<div class="card">
|
|
666
|
-
<h3>
|
|
665
|
+
<h3>Recipe anatomy</h3>
|
|
667
666
|
<p>The graph, the intents, the assertions, and the test of whether yours is worth keeping.</p>
|
|
668
|
-
<p><a href="recipes.html">
|
|
667
|
+
<p><a href="recipes.html">Read the anatomy →</a></p>
|
|
669
668
|
</div>
|
|
670
669
|
<div class="card">
|
|
671
670
|
<h3>Your team's library</h3>
|
|
@@ -688,6 +687,6 @@ artifacts (6):
|
|
|
688
687
|
</div>
|
|
689
688
|
</footer>
|
|
690
689
|
|
|
691
|
-
<script type="module" src="assets/progress.mjs"></script>
|
|
690
|
+
<script type="module" src="assets/progress.mjs?v=4"></script>
|
|
692
691
|
</body>
|
|
693
692
|
</html>
|
package/site/index.html
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>Recipes — build with proof, not hope</title>
|
|
7
7
|
<meta name="description" content="A skill drives the change. The recipe proves it on a real MetaMask build as it is written, self-checked in the same context and kept as a regression guard.">
|
|
8
|
-
<link rel="
|
|
8
|
+
<link rel="icon" href="assets/metamask-fox.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="stylesheet" href="assets/style.css?v=4">
|
|
9
10
|
</head>
|
|
10
11
|
<body>
|
|
11
12
|
<a class="skip" href="#prompt">Skip to the prompt</a>
|
|
12
13
|
|
|
13
14
|
<main class="lobby">
|
|
14
15
|
<div class="lobby-inner">
|
|
15
|
-
<
|
|
16
|
+
<img class="lobby-mark" src="assets/metamask-fox.svg" alt="" width="52" height="52">
|
|
16
17
|
<span class="eyebrow">Proven as it's built</span>
|
|
17
18
|
|
|
18
19
|
<h1>Build agentically, with confidence.</h1>
|
|
@@ -64,14 +65,18 @@ instead of improvising.
|
|
|
64
65
|
`--preflight-mode` is an internal adapter flag, not a public launch flag.
|
|
65
66
|
6. On Extension run `mm-harness fixtures set`. On Mobile include the same
|
|
66
67
|
`--device <UUID-or-serial>` used for launch. Wait for it to succeed.
|
|
67
|
-
7. Install the skills — they are how the work actually gets driven.
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
7. Install the skills — they are how the work actually gets driven. First
|
|
69
|
+
inspect `METAMASK_SKILLS_DIR` and `CONSENSYS_SKILLS_DIR`, then check the
|
|
70
|
+
expected local layout below. Reuse every valid existing clone. For each
|
|
71
|
+
missing source, show me the proposed path and ask before cloning:
|
|
70
72
|
`git clone https://github.com/MetaMask/skills.git ~/dev/metamask/skills`
|
|
71
|
-
`export METAMASK_SKILLS_DIR=~/dev/metamask/skills`
|
|
72
|
-
Then the internal overlay, which needs access to the Consensys org:
|
|
73
73
|
`git clone git@github.com:Consensys/skills.git ~/dev/Consensys/skills`
|
|
74
|
+
The internal overlay needs access to the Consensys org. Export the paths in
|
|
75
|
+
the current shell for setup:
|
|
76
|
+
`export METAMASK_SKILLS_DIR=~/dev/metamask/skills`
|
|
74
77
|
`export CONSENSYS_SKILLS_DIR=~/dev/Consensys/skills`
|
|
78
|
+
Never edit `.zshrc`, `.bashrc`, or another shell startup file unless I
|
|
79
|
+
explicitly consent; ask separately if I want these exports persisted.
|
|
75
80
|
If that clone fails, tell me — I may not have access, and the next step
|
|
76
81
|
depends on it. Then, from inside the checkout:
|
|
77
82
|
`yarn metamask-skills list --maturity experimental` everything installable
|
|
@@ -107,7 +112,7 @@ exact error.</code></pre></div>
|
|
|
107
112
|
</p>
|
|
108
113
|
|
|
109
114
|
<div class="tabs">
|
|
110
|
-
<div class="tablist" role="tablist" aria-label="Choose what to do">
|
|
115
|
+
<div class="tablist" role="tablist" aria-label="Choose what to do" hidden>
|
|
111
116
|
<button type="button" role="tab" id="tab-review" class="tab" aria-controls="panel-review" aria-selected="true" tabindex="0">Review a PR</button>
|
|
112
117
|
<button type="button" role="tab" id="tab-fix" class="tab" aria-controls="panel-fix" aria-selected="false" tabindex="-1">Fix a bug</button>
|
|
113
118
|
<button type="button" role="tab" id="tab-build" class="tab" aria-controls="panel-build" aria-selected="false" tabindex="-1">Build a feature</button>
|
|
@@ -128,7 +133,7 @@ per-AC verdict table, the overall verdict, and the artifact paths. Do not post
|
|
|
128
133
|
anything on the PR.</code></pre></div>
|
|
129
134
|
</div>
|
|
130
135
|
|
|
131
|
-
<div class="qs-panel" role="tabpanel" id="panel-fix" aria-labelledby="tab-fix" tabindex="0"
|
|
136
|
+
<div class="qs-panel" role="tabpanel" id="panel-fix" aria-labelledby="tab-fix" tabindex="0">
|
|
132
137
|
<p class="qs-panel-why">
|
|
133
138
|
<code>mms-recipe-cook</code>, classified as <code>fix-bug</code>. It lists the
|
|
134
139
|
compatible checklist templates and stops for your pick, then works on a local task
|
|
@@ -144,7 +149,7 @@ Then fix it and re-run the same recipe until it passes. Show me the recipe
|
|
|
144
149
|
status, the per-node results, and the artifact paths.</code></pre></div>
|
|
145
150
|
</div>
|
|
146
151
|
|
|
147
|
-
<div class="qs-panel" role="tabpanel" id="panel-build" aria-labelledby="tab-build" tabindex="0"
|
|
152
|
+
<div class="qs-panel" role="tabpanel" id="panel-build" aria-labelledby="tab-build" tabindex="0">
|
|
148
153
|
<p class="qs-panel-why">
|
|
149
154
|
<code>mms-recipe-cook</code>, classified as <code>dev</code>. Same flow: it lists the
|
|
150
155
|
compatible templates, stops for your pick, and keeps the diff uncommitted until you
|
|
@@ -169,11 +174,11 @@ results, and the artifact paths.</code></pre></div>
|
|
|
169
174
|
</div>
|
|
170
175
|
|
|
171
176
|
<p class="lobby-fine">
|
|
172
|
-
A proposal for how agents can code at MetaMask — offered for teams to try
|
|
177
|
+
A proposal for how agents can code at MetaMask — offered for teams to try.
|
|
173
178
|
</p>
|
|
174
179
|
</div>
|
|
175
180
|
</main>
|
|
176
181
|
|
|
177
|
-
<script type="module" src="assets/progress.mjs"></script>
|
|
182
|
+
<script type="module" src="assets/progress.mjs?v=4"></script>
|
|
178
183
|
</body>
|
|
179
184
|
</html>
|
package/site/perps.html
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Perps
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<link rel="
|
|
6
|
+
<title>Team / Perps — customize the harness for your team</title>
|
|
7
|
+
<meta name="description" content="Every team points the harness at its own recipe library. The MetaMask Perps library is the worked example: recipes, actions, checklist templates, and the team's own knowledge.">
|
|
8
|
+
<link rel="icon" href="assets/metamask-fox.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="stylesheet" href="assets/style.css?v=4">
|
|
9
10
|
</head>
|
|
10
11
|
<body>
|
|
11
12
|
<a class="skip" href="#setup">Skip to setup</a>
|
|
@@ -13,42 +14,43 @@
|
|
|
13
14
|
<header class="topbar">
|
|
14
15
|
<div class="wrap topbar-inner">
|
|
15
16
|
<a class="brand" href="index.html">
|
|
16
|
-
<
|
|
17
|
+
<img class="brand-mark" src="assets/metamask-fox.svg" alt="" width="22" height="22">
|
|
17
18
|
<span class="brand-name">recipes</span>
|
|
18
19
|
</a>
|
|
19
20
|
<nav class="nav" aria-label="Main">
|
|
20
21
|
<a class="nav-cta" href="index.html#prompt">Quick start</a>
|
|
21
22
|
<a href="how-it-works.html">How it works</a>
|
|
22
|
-
<a href="
|
|
23
|
-
<a href="perps.html" aria-current="page">Perps</a>
|
|
23
|
+
<a href="perps.html" aria-current="page">Team / Perps</a>
|
|
24
24
|
<a href="cheatsheet.html">Cheatsheet</a>
|
|
25
25
|
<a href="architecture.html">Architecture</a>
|
|
26
26
|
<a href="tutorials/index.html">Tutorials</a>
|
|
27
|
-
<a href="reviewers.html">For Reviewers</a>
|
|
28
27
|
</nav>
|
|
29
28
|
</div>
|
|
30
29
|
</header>
|
|
31
30
|
|
|
32
31
|
<main>
|
|
33
32
|
<section class="wrap hero" style="padding-bottom:1rem">
|
|
34
|
-
<span class="eyebrow">
|
|
35
|
-
<h1>
|
|
33
|
+
<span class="eyebrow">Customization</span>
|
|
34
|
+
<h1>Make it your team's harness</h1>
|
|
36
35
|
<p class="lede">
|
|
37
|
-
The
|
|
38
|
-
|
|
36
|
+
The harness ships an execution standard and a deliberately small bundled library. Everything that
|
|
37
|
+
is specific to what <em>you</em> work on — the journeys, the assertions, the checklists, the review
|
|
38
|
+
knowledge — lives in a library you own and point the harness at. MetaMask Perps is the worked
|
|
39
|
+
example on this page.
|
|
39
40
|
</p>
|
|
40
41
|
<div class="hero-meta">
|
|
41
|
-
<span>
|
|
42
|
-
<span>
|
|
43
|
-
<span>
|
|
42
|
+
<span>per team</span>
|
|
43
|
+
<span>per engineer</span>
|
|
44
|
+
<span>one env var</span>
|
|
44
45
|
</div>
|
|
45
46
|
</section>
|
|
46
47
|
|
|
47
48
|
<section class="wrap">
|
|
48
49
|
<div class="doctrine">
|
|
49
50
|
<p>
|
|
50
|
-
<span class="k">The harness supplies the execution standard;
|
|
51
|
-
|
|
51
|
+
<span class="k">The harness supplies the execution standard; your library supplies the domain.</span>
|
|
52
|
+
A team shares one library. An engineer can add their own on top. Neither requires a change to
|
|
53
|
+
the harness.
|
|
52
54
|
</p>
|
|
53
55
|
</div>
|
|
54
56
|
|
|
@@ -60,11 +62,11 @@
|
|
|
60
62
|
<tr>
|
|
61
63
|
<td><code>mm-harness</code></td>
|
|
62
64
|
<td>Launch, typed actions, graph execution, screenshots, video, traces, and artifact contracts.</td>
|
|
63
|
-
<td>
|
|
65
|
+
<td>Anything specific to one team's domain.</td>
|
|
64
66
|
</tr>
|
|
65
67
|
<tr>
|
|
66
|
-
<td
|
|
67
|
-
<td>Reusable
|
|
68
|
+
<td>Your library</td>
|
|
69
|
+
<td>Reusable setup, journeys, assertions, cleanup, platform variants, and checklist templates.</td>
|
|
68
70
|
<td>Wallet credentials, generated evidence, or product source.</td>
|
|
69
71
|
</tr>
|
|
70
72
|
<tr>
|
|
@@ -78,56 +80,102 @@
|
|
|
78
80
|
</section>
|
|
79
81
|
|
|
80
82
|
<section class="wrap">
|
|
81
|
-
<h2 id="setup">
|
|
83
|
+
<h2 id="setup">Point the harness at a library</h2>
|
|
82
84
|
<p>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
One environment variable does it. The Perps library is private, so start by asking its owners for
|
|
86
|
+
access — a clone failure means your GitHub account does not have it yet.
|
|
85
87
|
</p>
|
|
86
88
|
|
|
87
|
-
<div class="cmd"><pre><code><span class="p">$ </span>
|
|
88
|
-
<span class="p">$ </span>git clone git@github.com:MetaMask/experimental-metamask-recipe-perps.git \
|
|
89
|
+
<div class="cmd"><pre><code><span class="p">$ </span>git clone git@github.com:MetaMask/experimental-metamask-recipe-perps.git \
|
|
89
90
|
"$HOME/shared-library/metamask-recipe-perps"
|
|
90
|
-
<span class="p">$ </span>
|
|
91
|
-
|
|
91
|
+
<span class="p">$ </span>export RECIPE_LIBRARY_PATH="perps=$HOME/shared-library/metamask-recipe-perps"
|
|
92
|
+
<span class="p">$ </span>mm-harness run --list</code></pre></div>
|
|
92
93
|
|
|
93
94
|
<p>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
command so separate tool shells do not lose an exported variable.
|
|
95
|
+
<code>name=path</code> gives the source its alias; without one the directory name is used. Separate
|
|
96
|
+
several libraries with <code>:</code> — order is precedence, first wins:
|
|
97
97
|
</p>
|
|
98
98
|
|
|
99
|
+
<div class="cmd"><pre><code><span class="p">$ </span>export RECIPE_LIBRARY_PATH="mine=$HOME/my-recipes:perps=$HOME/shared-library/metamask-recipe-perps"</code></pre></div>
|
|
100
|
+
|
|
101
|
+
<p>
|
|
102
|
+
Use <code>--library name=/path</code> for a single command instead — useful when a tool shell loses
|
|
103
|
+
an exported variable. Resolution follows your library order, then the bundled MetaMask library.
|
|
104
|
+
</p>
|
|
105
|
+
|
|
106
|
+
<div class="note blue">
|
|
107
|
+
<span class="note-title">Your own library, with no configuration</span>
|
|
108
|
+
<p>
|
|
109
|
+
A directory at <code>~/.farmslot/recipe-library</code> is picked up automatically as
|
|
110
|
+
<code>personal</code> when you set no library at all. It is a fallback, not an addition: as soon
|
|
111
|
+
as <code>RECIPE_LIBRARY_PATH</code> or <code>--library</code> is set, only those sources are used.
|
|
112
|
+
List it explicitly to keep both.
|
|
113
|
+
</p>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
99
116
|
<div class="note blue">
|
|
100
117
|
<span class="note-title">Discovery is adapter-aware</span>
|
|
101
118
|
<p>
|
|
102
119
|
The list shows only recipes runnable in the current product checkout. A recipe marked
|
|
103
|
-
<code>[perps]</code> came from
|
|
120
|
+
<code>[perps]</code> came from that library; <code>[metamask]</code> means it ships with the
|
|
104
121
|
harness. Read the selected platform variant with <code>--describe</code> before running it.
|
|
105
122
|
</p>
|
|
106
123
|
</div>
|
|
107
124
|
</section>
|
|
108
125
|
|
|
126
|
+
<section class="wrap">
|
|
127
|
+
<h2>What a team library actually holds</h2>
|
|
128
|
+
<p>
|
|
129
|
+
Every path below is real, from the Perps library. Copy the shape, not the contents — it is the
|
|
130
|
+
reference structure for a MetaMask team building its own.
|
|
131
|
+
</p>
|
|
132
|
+
|
|
133
|
+
<div class="cmd"><pre><code>manifests/extension.action-manifest.json types the actions you add
|
|
134
|
+
actions/extension/perps/ domain actions the product needs
|
|
135
|
+
recipes/mobile/perps/ per-adapter journeys
|
|
136
|
+
recipes/extension/perps/
|
|
137
|
+
recipes/core/perps/
|
|
138
|
+
checklists/dev/ your own Recipe Cook checklist templates
|
|
139
|
+
checklists/fix-bug/
|
|
140
|
+
docs/ the knowledge: authoring rules,
|
|
141
|
+
performance evidence, analytics</code></pre></div>
|
|
142
|
+
|
|
143
|
+
<p>
|
|
144
|
+
The <code>docs/</code> and <code>checklists/</code> directories are the part teams underestimate.
|
|
145
|
+
They are how a team's hard-won conventions — how performance evidence is gathered here, which
|
|
146
|
+
analytics events matter, what a finished task looks like — stop living in one engineer's head.
|
|
147
|
+
</p>
|
|
148
|
+
|
|
149
|
+
<div class="note">
|
|
150
|
+
<span class="note-title">Review knowledge lives with the skills</span>
|
|
151
|
+
<p>
|
|
152
|
+
One team surface sits outside the recipe library: the static antipattern packs the PR QA review
|
|
153
|
+
reads, which ship with the skills as
|
|
154
|
+
<code>references/antipatterns/<repo>/<pack>.md</code>. Today there is a
|
|
155
|
+
<code>perps</code> pack for Mobile, Extension, and Core, and a Mobile-only
|
|
156
|
+
<code>unit-vs-cv</code> pack. A pack is advisory: it never changes an acceptance-criterion
|
|
157
|
+
verdict.
|
|
158
|
+
</p>
|
|
159
|
+
</div>
|
|
160
|
+
</section>
|
|
161
|
+
|
|
109
162
|
<section class="wrap">
|
|
110
163
|
<h2>Your first live proof</h2>
|
|
111
164
|
<p>
|
|
112
165
|
Complete <a href="how-it-works.html#steps">the walkthrough</a> first so the app, device, and wallet fixture are
|
|
113
|
-
ready.
|
|
166
|
+
ready. With <code>RECIPE_LIBRARY_PATH</code> exported, the library's recipes are just names.
|
|
114
167
|
</p>
|
|
115
168
|
|
|
116
169
|
<h3>Extension or Mobile</h3>
|
|
117
|
-
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness run perps.open-market --describe
|
|
118
|
-
|
|
119
|
-
<span class="p">$ </span>mm-harness run perps.open-market network=testnet market=BTC --plan \
|
|
120
|
-
--library "perps=$HOME/shared-library/metamask-recipe-perps"
|
|
170
|
+
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness run perps.open-market --describe
|
|
171
|
+
<span class="p">$ </span>mm-harness run perps.open-market network=testnet market=BTC --plan
|
|
121
172
|
<span class="p">$ </span>mm-harness run perps.open-market network=testnet market=BTC \
|
|
122
|
-
--record-video=full-run --artifacts-dir ./perps-open-market-evidence
|
|
123
|
-
--library "perps=$HOME/shared-library/metamask-recipe-perps"</code></pre></div>
|
|
173
|
+
--record-video=full-run --artifacts-dir ./perps-open-market-evidence</code></pre></div>
|
|
124
174
|
|
|
125
175
|
<h3>Core</h3>
|
|
126
|
-
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness run perps.snapshot-market --describe
|
|
127
|
-
--library "perps=$HOME/shared-library/metamask-recipe-perps"
|
|
176
|
+
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness run perps.snapshot-market --describe
|
|
128
177
|
<span class="p">$ </span>mm-harness run perps.snapshot-market network=testnet market=BTC \
|
|
129
|
-
--artifacts-dir ./perps-market-evidence
|
|
130
|
-
--library "perps=$HOME/shared-library/metamask-recipe-perps"</code></pre></div>
|
|
178
|
+
--artifacts-dir ./perps-market-evidence</code></pre></div>
|
|
131
179
|
|
|
132
180
|
<p>
|
|
133
181
|
A passing run writes <code>summary.json</code>, per-node results in <code>trace.json</code>, and an
|
|
@@ -137,7 +185,11 @@
|
|
|
137
185
|
</section>
|
|
138
186
|
|
|
139
187
|
<section class="wrap">
|
|
140
|
-
<h2>
|
|
188
|
+
<h2>What the Perps team put in theirs</h2>
|
|
189
|
+
<p>
|
|
190
|
+
A sample of the library's recipes, as an idea of the granularity that works: small, parameterized,
|
|
191
|
+
composed rather than duplicated.
|
|
192
|
+
</p>
|
|
141
193
|
<div class="table-scroll">
|
|
142
194
|
<table>
|
|
143
195
|
<thead><tr><th>Claim</th><th>Recipe</th><th>Platforms</th></tr></thead>
|
|
@@ -164,8 +216,9 @@
|
|
|
164
216
|
</section>
|
|
165
217
|
|
|
166
218
|
<section class="wrap">
|
|
167
|
-
<h2>
|
|
219
|
+
<h2>Starting your team's library</h2>
|
|
168
220
|
<ol>
|
|
221
|
+
<li>Create a repository with the directory shape above. It holds no accounts, fixtures, credentials, or generated evidence.</li>
|
|
169
222
|
<li>Parameterize stable choices such as market, side, order type, and network.</li>
|
|
170
223
|
<li>Compose existing setup, assertion, and cleanup recipes before adding a new top-level recipe.</li>
|
|
171
224
|
<li>Add a platform variant only when the products genuinely differ.</li>
|
|
@@ -177,10 +230,15 @@
|
|
|
177
230
|
<li>Re-run every caller after a shared node changes and attach the fresh evidence.</li>
|
|
178
231
|
</ol>
|
|
179
232
|
|
|
233
|
+
<p>
|
|
234
|
+
Keep it small. Compose or repair the closest recipe before creating another one — a library that
|
|
235
|
+
grows a scenario per ticket stops being maintainable faster than the product does.
|
|
236
|
+
</p>
|
|
237
|
+
|
|
180
238
|
<div class="btn-row">
|
|
181
239
|
<a class="btn btn-primary" href="tutorials/v3.html">Install skills and the library →</a>
|
|
240
|
+
<a class="btn btn-ghost" href="ecosystem.html">Where this sits in the stack</a>
|
|
182
241
|
<a class="btn btn-ghost" href="recipes.html">How recipes prove claims</a>
|
|
183
|
-
<a class="btn btn-ghost" href="reviewers.html">How to review evidence</a>
|
|
184
242
|
</div>
|
|
185
243
|
</section>
|
|
186
244
|
</main>
|
|
@@ -191,6 +249,6 @@
|
|
|
191
249
|
<p>Written against the shared MetaMask Perps recipe library. Sample output moves between releases; trust your terminal over this page.</p>
|
|
192
250
|
</div>
|
|
193
251
|
</footer>
|
|
194
|
-
<script type="module" src="assets/progress.mjs"></script>
|
|
252
|
+
<script type="module" src="assets/progress.mjs?v=4"></script>
|
|
195
253
|
</body>
|
|
196
254
|
</html>
|
package/site/recipes.html
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>What is a recipe?</title>
|
|
7
7
|
<meta name="description" content="The anatomy of a recipe: a JSON graph of typed actions, human-authored intent, first-class assertions, and a verdict derived from the trace.">
|
|
8
|
-
<link rel="
|
|
8
|
+
<link rel="icon" href="assets/metamask-fox.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="stylesheet" href="assets/style.css?v=4">
|
|
9
10
|
</head>
|
|
10
11
|
<body data-progress-page="recipes">
|
|
11
12
|
<a class="skip" href="#anatomy">Skip to the anatomy</a>
|
|
@@ -13,18 +14,16 @@
|
|
|
13
14
|
<header class="topbar">
|
|
14
15
|
<div class="wrap topbar-inner">
|
|
15
16
|
<a class="brand" href="index.html">
|
|
16
|
-
<
|
|
17
|
+
<img class="brand-mark" src="assets/metamask-fox.svg" alt="" width="22" height="22">
|
|
17
18
|
<span class="brand-name">recipes</span>
|
|
18
19
|
</a>
|
|
19
20
|
<nav class="nav" aria-label="Main">
|
|
20
21
|
<a class="nav-cta" href="index.html#prompt">Quick start</a>
|
|
21
22
|
<a href="how-it-works.html">How it works</a>
|
|
22
|
-
<a href="
|
|
23
|
-
<a href="perps.html">Perps</a>
|
|
23
|
+
<a href="perps.html">Team / Perps</a>
|
|
24
24
|
<a href="cheatsheet.html">Cheatsheet</a>
|
|
25
25
|
<a href="architecture.html">Architecture</a>
|
|
26
26
|
<a href="tutorials/index.html">Tutorials</a>
|
|
27
|
-
<a href="reviewers.html">For Reviewers</a>
|
|
28
27
|
</nav>
|
|
29
28
|
</div>
|
|
30
29
|
</header>
|
|
@@ -419,6 +418,6 @@
|
|
|
419
418
|
</div>
|
|
420
419
|
</footer>
|
|
421
420
|
|
|
422
|
-
<script type="module" src="assets/progress.mjs"></script>
|
|
421
|
+
<script type="module" src="assets/progress.mjs?v=4"></script>
|
|
423
422
|
</body>
|
|
424
423
|
</html>
|