@deeeed/metamask-harness 0.28.0 → 0.29.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 +19 -0
- package/README.md +41 -0
- package/adapters/extension/build-lavamoat.sh +2 -1
- package/adapters/extension/ensure-browser.sh +82 -9
- package/adapters/extension/inject.mjs +1 -0
- package/adapters/extension/launch-browser.cjs +83 -1
- package/adapters/extension/lib/chrome-args.cjs +325 -1
- package/adapters/extension/lib/playwright-cdp.cjs +34 -0
- package/adapters/extension/lib/slot-title.cjs +2 -4
- package/adapters/extension/lib/validation-launch-supervisor.cjs +292 -0
- package/adapters/extension/lib/validation-process-ownership.cjs +69 -0
- package/adapters/extension/reattach.sh +2 -1
- package/adapters/extension/sidepanel-toggle.sh +14 -96
- package/adapters/extension/wallet-fixture-state.cjs +8 -31
- package/adapters/manifest.json +16 -0
- package/adapters/shared/private-atomic-write.cjs +47 -0
- package/adapters/shared/setup-base.sh +864 -0
- package/dist/adapters/extension/runtime.js +367 -24
- package/dist/adapters/extension/validation-process-ownership.js +10 -0
- package/dist/cli-commands.js +1 -0
- package/dist/command-contract.js +12 -0
- package/dist/commands/launch/extension.js +130 -19
- package/dist/commands/setup-base.js +24 -0
- package/dist/mm-harness-cli.js +28 -2
- package/library/actions/extension/analytics/consent.mjs +203 -0
- package/library/actions/extension/analytics/set_consent.mjs +19 -143
- package/library/actions/extension/perps/perps.mjs +2 -16
- package/library/actions/extension/perps/state.mjs +20 -0
- package/library/actions/extension/wallet/list_accounts.mjs +3 -25
- package/library/actions/extension/wallet/read_state.mjs +3 -23
- package/library/actions/extension/wallet/select_account.mjs +6 -33
- package/library/actions/extension/wallet/setup.mjs +2 -20
- package/library/actions/extension/wallet/state.mjs +111 -0
- package/library/recipes/runner/action-validation.extension.recipe.json +1 -1
- package/library/recipes/runner/action-validation.mobile.recipe.json +1 -1
- package/package.json +7 -4
- package/scripts/site-contrast.mjs +538 -0
- package/site/architecture.html +415 -0
- package/site/assets/progress.mjs +272 -0
- package/site/assets/style.css +808 -0
- package/site/cheatsheet.html +305 -0
- package/site/index.html +643 -0
- package/site/recipes.html +396 -0
- package/site/reviewers.html +374 -0
- package/site/tutorials/index.html +180 -0
- package/site/tutorials/v1.html +211 -0
- package/site/tutorials/v2.html +207 -0
- package/site/tutorials/v3.html +214 -0
- package/site/tutorials/v4.html +195 -0
- package/site/tutorials/v5.html +163 -0
- package/site/tutorials/v6.html +165 -0
- package/site/tutorials/v7.html +184 -0
|
@@ -0,0 +1,184 @@
|
|
|
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>V7 — A ticket end to end</title>
|
|
7
|
+
<meta name="description" content="One real ticket from assignment to a pull request that carries proof, and what the reviewer sees.">
|
|
8
|
+
<link rel="stylesheet" href="../assets/style.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body data-progress-page="v7">
|
|
11
|
+
<a class="skip" href="#steps">Skip to the checklist</a>
|
|
12
|
+
|
|
13
|
+
<header class="topbar">
|
|
14
|
+
<div class="wrap topbar-inner">
|
|
15
|
+
<a class="brand" href="../index.html">
|
|
16
|
+
<span class="brand-mark" aria-hidden="true"></span>
|
|
17
|
+
<span class="brand-name">mm-harness</span>
|
|
18
|
+
</a>
|
|
19
|
+
<nav class="nav" aria-label="Main">
|
|
20
|
+
<a href="../index.html">Start Here</a>
|
|
21
|
+
<a href="../recipes.html">Recipes</a>
|
|
22
|
+
<a href="../cheatsheet.html">Cheatsheet</a>
|
|
23
|
+
<a href="../architecture.html">Architecture</a>
|
|
24
|
+
<a href="index.html" aria-current="page">Tutorials</a>
|
|
25
|
+
<a href="../reviewers.html">For Reviewers</a>
|
|
26
|
+
</nav>
|
|
27
|
+
</div>
|
|
28
|
+
</header>
|
|
29
|
+
|
|
30
|
+
<div class="progress-rail">
|
|
31
|
+
<div class="wrap progress-inner">
|
|
32
|
+
<div class="progress-track" role="progressbar" aria-label="Tutorial progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
|
|
33
|
+
<div class="progress-fill"></div>
|
|
34
|
+
</div>
|
|
35
|
+
<span class="progress-label">0/6 steps</span>
|
|
36
|
+
<button type="button" class="progress-reset">Reset</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<main>
|
|
41
|
+
<section class="wrap hero" style="padding-bottom:1rem">
|
|
42
|
+
<span class="eyebrow">Tutorial V7 · 10 minutes</span>
|
|
43
|
+
<h1>A ticket end to end</h1>
|
|
44
|
+
<p class="lede">
|
|
45
|
+
How the pieces combine on ordinary work: one ticket, implemented, proven, and opened as a pull
|
|
46
|
+
request a reviewer can check without rebuilding it themselves.
|
|
47
|
+
</p>
|
|
48
|
+
<div class="hero-meta">
|
|
49
|
+
<span>prerequisites: <a href="v3.html">V3</a> and <a href="v4.html">V4</a></span>
|
|
50
|
+
</div>
|
|
51
|
+
</section>
|
|
52
|
+
|
|
53
|
+
<section class="wrap">
|
|
54
|
+
<div class="vid-thumb" style="border-radius:var(--radius);border:1px solid var(--line);margin-bottom:1.5rem">
|
|
55
|
+
<div style="text-align:center;padding:1rem">
|
|
56
|
+
<div class="vid-id" style="font-size:2.6rem">V7</div>
|
|
57
|
+
<p style="color:var(--text-dim);margin:.5rem 0 0;font-size:.92rem">Video recording in progress</p>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div class="doctrine">
|
|
62
|
+
<p>
|
|
63
|
+
<span class="k">The through-line:</span> you steered at every gate, the system did the labour, and
|
|
64
|
+
the pull request carries proof instead of claims.
|
|
65
|
+
</p>
|
|
66
|
+
</div>
|
|
67
|
+
</section>
|
|
68
|
+
|
|
69
|
+
<section class="wrap">
|
|
70
|
+
<h2 id="steps">The walkthrough</h2>
|
|
71
|
+
|
|
72
|
+
<ol class="steps">
|
|
73
|
+
<li class="step" data-step="setup">
|
|
74
|
+
<div class="step-head">
|
|
75
|
+
<input type="checkbox" class="step-check" id="v7-setup" aria-labelledby="t7-setup">
|
|
76
|
+
<h3 class="step-title" id="t7-setup">Start from a working checkout</h3>
|
|
77
|
+
</div>
|
|
78
|
+
<p class="step-why">Current harness, library declared, app reachable.</p>
|
|
79
|
+
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness update
|
|
80
|
+
<span class="p">$ </span>mm-harness doctor
|
|
81
|
+
<span class="p">$ </span>mm-harness run --list</code></pre></div>
|
|
82
|
+
<p class="step-why">
|
|
83
|
+
If your team's recipes are not in that list, fix it now rather than mid-task —
|
|
84
|
+
<a href="v3.html#steps">V3</a> covers it.
|
|
85
|
+
</p>
|
|
86
|
+
</li>
|
|
87
|
+
|
|
88
|
+
<li class="step" data-step="criteria">
|
|
89
|
+
<div class="step-head">
|
|
90
|
+
<input type="checkbox" class="step-check" id="v7-criteria" aria-labelledby="t7-criteria">
|
|
91
|
+
<h3 class="step-title" id="t7-criteria">Read the ticket for what is observable</h3>
|
|
92
|
+
</div>
|
|
93
|
+
<p class="step-why">
|
|
94
|
+
Separate the criteria that describe behaviour someone could watch happen from the ones that
|
|
95
|
+
describe intent. The first kind is what a recipe can prove. Naming that split up front decides
|
|
96
|
+
the shape of everything after it.
|
|
97
|
+
</p>
|
|
98
|
+
</li>
|
|
99
|
+
|
|
100
|
+
<li class="step" data-step="implement">
|
|
101
|
+
<div class="step-head">
|
|
102
|
+
<input type="checkbox" class="step-check" id="v7-implement" aria-labelledby="t7-implement">
|
|
103
|
+
<h3 class="step-title" id="t7-implement">Implement, using the harness to look</h3>
|
|
104
|
+
</div>
|
|
105
|
+
<p class="step-why">
|
|
106
|
+
<code>call</code> is the fast loop while developing — one action against the running app, no
|
|
107
|
+
recipe needed. This is the same execution path a recipe uses, so what works here works there.
|
|
108
|
+
</p>
|
|
109
|
+
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness call read_state
|
|
110
|
+
<span class="p">$ </span>mm-harness call navigate page=perps
|
|
111
|
+
<span class="p">$ </span>mm-harness logs</code></pre></div>
|
|
112
|
+
</li>
|
|
113
|
+
|
|
114
|
+
<li class="step" data-step="cook">
|
|
115
|
+
<div class="step-head">
|
|
116
|
+
<input type="checkbox" class="step-check" id="v7-cook" aria-labelledby="t7-cook">
|
|
117
|
+
<h3 class="step-title" id="t7-cook">Cook the proof for the criteria</h3>
|
|
118
|
+
</div>
|
|
119
|
+
<p class="step-why">
|
|
120
|
+
<a href="v4.html">V4's</a> flow, pointed at this ticket. Author against the discovered actions,
|
|
121
|
+
validate with <code>--plan</code>, run it.
|
|
122
|
+
</p>
|
|
123
|
+
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness run ./proof.json --plan
|
|
124
|
+
<span class="p">$ </span>mm-harness run ./proof.json --artifacts-dir ./proof-artifacts</code></pre></div>
|
|
125
|
+
<p class="step-why">
|
|
126
|
+
Then revert your change and run it again. Green after a revert means the recipe is not testing
|
|
127
|
+
your work.
|
|
128
|
+
</p>
|
|
129
|
+
</li>
|
|
130
|
+
|
|
131
|
+
<li class="step" data-step="pr">
|
|
132
|
+
<div class="step-head">
|
|
133
|
+
<input type="checkbox" class="step-check" id="v7-pr" aria-labelledby="t7-pr">
|
|
134
|
+
<h3 class="step-title" id="t7-pr">Open the pull request with the evidence</h3>
|
|
135
|
+
</div>
|
|
136
|
+
<p class="step-why">
|
|
137
|
+
Check your diff before you push, then link the criteria to the nodes that prove them. A reviewer
|
|
138
|
+
should not have to guess which part of the bundle answers which criterion.
|
|
139
|
+
</p>
|
|
140
|
+
<div class="cmd"><pre><code><span class="p">$ </span>mm-harness check diff --profile fast</code></pre></div>
|
|
141
|
+
<p class="step-why">
|
|
142
|
+
The recipe is the durable half. It stays in the library and fails later if someone breaks the
|
|
143
|
+
behaviour — the difference between evidence and a regression test is only whether you keep it.
|
|
144
|
+
</p>
|
|
145
|
+
</li>
|
|
146
|
+
|
|
147
|
+
<li class="step" data-step="review">
|
|
148
|
+
<div class="step-head">
|
|
149
|
+
<input type="checkbox" class="step-check" id="v7-review" aria-labelledby="t7-review">
|
|
150
|
+
<h3 class="step-title" id="t7-review">Look at it as the reviewer</h3>
|
|
151
|
+
</div>
|
|
152
|
+
<p class="step-why">
|
|
153
|
+
Open your own bundle the way <a href="v2.html">V2</a> does: read the intents in order and ask
|
|
154
|
+
whether they add up to the claim in the description. Anything you cannot answer from the trace is
|
|
155
|
+
something you are asking a colleague to take on trust.
|
|
156
|
+
</p>
|
|
157
|
+
<div class="cmd"><pre><code><span class="p">$ </span>cat proof-artifacts/report.md</code></pre></div>
|
|
158
|
+
<p class="step-why">
|
|
159
|
+
If the agent's checklist asked for learnings, they are written beside the evidence — worth
|
|
160
|
+
reading before you close the ticket, and the raw material for what eventually reaches
|
|
161
|
+
<a href="../architecture.html#loop">the team's shared knowledge</a>.
|
|
162
|
+
</p>
|
|
163
|
+
</li>
|
|
164
|
+
</ol>
|
|
165
|
+
|
|
166
|
+
<hr class="sep">
|
|
167
|
+
<div class="btn-row">
|
|
168
|
+
<a class="btn btn-primary" href="index.html">Back to the series</a>
|
|
169
|
+
<a class="btn btn-ghost" href="../reviewers.html">The reviewer's guide</a>
|
|
170
|
+
<a class="btn btn-ghost" href="../cheatsheet.html">Cheatsheet</a>
|
|
171
|
+
</div>
|
|
172
|
+
</section>
|
|
173
|
+
</main>
|
|
174
|
+
|
|
175
|
+
<footer class="footer">
|
|
176
|
+
<div class="wrap">
|
|
177
|
+
<p>Internal getting-started guide for the MetaMask agentic coding workflow. Not official MetaMask product documentation.</p>
|
|
178
|
+
<p>Verified against mm-harness 0.26+.</p>
|
|
179
|
+
</div>
|
|
180
|
+
</footer>
|
|
181
|
+
|
|
182
|
+
<script type="module" src="../assets/progress.mjs"></script>
|
|
183
|
+
</body>
|
|
184
|
+
</html>
|