@deeeed/metamask-harness 0.34.2 → 0.34.3
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 +11 -0
- package/dist/adapters.js +5 -2
- package/dist/recipe-security.js +1 -0
- package/library/actions/core/perps/_controller.mjs +75 -23
- package/library/actions/core/perps/read_account.mjs +6 -12
- package/library/actions/core/perps/read_snapshot.mjs +66 -0
- package/library/actions/extension/performance/_navigation-memory.mjs +372 -0
- package/library/actions/extension/performance/compare_idle_navigation_memory.mjs +18 -0
- package/library/actions/extension/performance/measure_detached_dom.mjs +18 -0
- package/library/actions/extension/performance/measure_navigation_memory.mjs +18 -0
- package/library/actions/mobile/app/network-control.mjs +24 -12
- package/library/manifests/core.action-manifest.json +55 -0
- package/library/manifests/extension.action-manifest.json +100 -0
- package/library/recipes/core/perps/snapshot.recipe.json +25 -0
- package/library/recipes/extension/performance/navigation-memory.recipe.json +175 -0
- package/package.json +1 -1
- package/scripts/site-contrast.mjs +39 -3
- package/site/architecture.html +22 -16
- package/site/assets/progress.mjs +1 -1
- package/site/assets/style.css +113 -1
- package/site/cheatsheet.html +14 -12
- package/site/how-it-works.html +693 -0
- package/site/index.html +70 -640
- package/site/perps.html +7 -6
- package/site/recipes.html +23 -17
- package/site/reviewers.html +7 -6
- package/site/tutorials/index.html +7 -6
- package/site/tutorials/v1.html +12 -11
- package/site/tutorials/v2.html +7 -6
- package/site/tutorials/v3.html +15 -11
- package/site/tutorials/v4.html +6 -5
- package/site/tutorials/v5.html +6 -5
- package/site/tutorials/v6.html +6 -5
- package/site/tutorials/v7.html +6 -5
package/site/assets/style.css
CHANGED
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
|
|
38
38
|
*, *::before, *::after { box-sizing: border-box; }
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
/* Clears the sticky bar plus the progress rail (114px together), so an anchor
|
|
41
|
+
never parks its heading underneath them. */
|
|
42
|
+
html { scroll-behavior: smooth; scroll-padding-top: 116px; }
|
|
41
43
|
|
|
42
44
|
body {
|
|
43
45
|
margin: 0;
|
|
@@ -158,6 +160,11 @@ main { padding-bottom: 6rem; }
|
|
|
158
160
|
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
|
|
159
161
|
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
|
|
160
162
|
|
|
163
|
+
/* The way back to the setup prompt. It leads the nav and stays visible when the
|
|
164
|
+
rest of the bar scrolls, because it is the one link every page owes a reader. */
|
|
165
|
+
.nav a.nav-cta { color: var(--accent); border: 1px solid var(--accent-line); }
|
|
166
|
+
.nav a.nav-cta:hover { background: var(--accent-soft); color: var(--accent); }
|
|
167
|
+
|
|
161
168
|
/* ---------- progress rail ---------- */
|
|
162
169
|
|
|
163
170
|
.progress-rail {
|
|
@@ -248,6 +255,101 @@ main { padding-bottom: 6rem; }
|
|
|
248
255
|
color: var(--text-faint);
|
|
249
256
|
}
|
|
250
257
|
|
|
258
|
+
/* ---------- lobby (front page) ----------
|
|
259
|
+
The entry page carries one idea and one call to action: no nav, no rail, no
|
|
260
|
+
checklist. Everything else in the site hangs off the single button below. */
|
|
261
|
+
|
|
262
|
+
.lobby {
|
|
263
|
+
display: flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
min-height: 100vh;
|
|
266
|
+
padding: 3rem 0 4rem;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.lobby-inner {
|
|
270
|
+
width: min(760px, calc(100% - 3rem));
|
|
271
|
+
margin: 0 auto;
|
|
272
|
+
text-align: center;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.lobby-mark {
|
|
276
|
+
display: block;
|
|
277
|
+
width: 26px;
|
|
278
|
+
height: 26px;
|
|
279
|
+
margin: 0 auto 2rem;
|
|
280
|
+
border-radius: 7px;
|
|
281
|
+
background: linear-gradient(145deg, var(--accent) 0%, var(--accent-deep) 100%);
|
|
282
|
+
transform: rotate(45deg);
|
|
283
|
+
box-shadow: 0 0 0 1px rgba(246, 133, 27, 0.3), 0 4px 18px rgba(246, 133, 27, 0.25);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.lobby h1 {
|
|
287
|
+
font-size: clamp(2rem, 4.6vw, 2.85rem);
|
|
288
|
+
max-width: 24ch;
|
|
289
|
+
margin: 0 auto 0.7rem;
|
|
290
|
+
/* Break at the comma rather than orphaning the last word. */
|
|
291
|
+
text-wrap: balance;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.lobby-lede {
|
|
295
|
+
font-size: 1.11rem;
|
|
296
|
+
line-height: 1.62;
|
|
297
|
+
color: var(--text-dim);
|
|
298
|
+
max-width: 60ch;
|
|
299
|
+
margin: 0 auto 1.1rem;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.lobby-sub {
|
|
303
|
+
font-size: 0.95rem;
|
|
304
|
+
color: var(--text-faint);
|
|
305
|
+
max-width: 54ch;
|
|
306
|
+
margin: 0 auto 1.5rem;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Code is never centred, even when its surroundings are. */
|
|
310
|
+
.lobby .cmd { text-align: left; }
|
|
311
|
+
|
|
312
|
+
/* The prompt is meant to be copied, not read: keep it short enough that the
|
|
313
|
+
button under it stays in view, and say so with a fade at the cut. */
|
|
314
|
+
/* Wider right gutter than the shared block: the copy control is bigger here. */
|
|
315
|
+
.lobby .cmd-hero pre { max-height: 15rem; font-size: 0.8rem; padding-right: 5rem; }
|
|
316
|
+
|
|
317
|
+
.lobby .cmd-hero::after {
|
|
318
|
+
content: "";
|
|
319
|
+
position: absolute;
|
|
320
|
+
left: 0;
|
|
321
|
+
right: 0;
|
|
322
|
+
bottom: 0;
|
|
323
|
+
height: 2.6rem;
|
|
324
|
+
pointer-events: none;
|
|
325
|
+
background: linear-gradient(to bottom, rgba(11, 12, 16, 0), #0b0c10);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* Copying is the call to action here, so the control is a button, not a hint. */
|
|
329
|
+
.lobby .cmd-hero .copy {
|
|
330
|
+
font-size: 0.78rem;
|
|
331
|
+
font-weight: 600;
|
|
332
|
+
padding: 0.38rem 0.85rem;
|
|
333
|
+
color: #17120b;
|
|
334
|
+
background: var(--accent);
|
|
335
|
+
border-color: var(--accent);
|
|
336
|
+
}
|
|
337
|
+
.lobby .cmd-hero .copy:hover { color: #17120b; background: #ff9630; border-color: #ff9630; }
|
|
338
|
+
.lobby .cmd-hero .copy[data-copied="1"] {
|
|
339
|
+
color: #0a1a10;
|
|
340
|
+
background: var(--pass);
|
|
341
|
+
border-color: var(--pass);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.lobby-cta { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.6rem; }
|
|
345
|
+
|
|
346
|
+
.lobby-fine {
|
|
347
|
+
margin: 2.4rem auto 0;
|
|
348
|
+
max-width: 56ch;
|
|
349
|
+
font-size: 0.86rem;
|
|
350
|
+
color: var(--text-faint);
|
|
351
|
+
}
|
|
352
|
+
|
|
251
353
|
/* ---------- cards ---------- */
|
|
252
354
|
|
|
253
355
|
.card {
|
|
@@ -639,6 +741,16 @@ tr[hidden], .filter-hidden { display: none !important; }
|
|
|
639
741
|
|
|
640
742
|
.stack { display: flex; flex-direction: column; gap: 0.55rem; margin: 1.8rem 0; }
|
|
641
743
|
|
|
744
|
+
/* Names which end of the diagram is the one you touch. */
|
|
745
|
+
.stack-caption {
|
|
746
|
+
font-family: var(--mono);
|
|
747
|
+
font-size: 0.78rem;
|
|
748
|
+
letter-spacing: 0.04em;
|
|
749
|
+
color: var(--text-faint);
|
|
750
|
+
margin: 1.6rem 0 0.55rem;
|
|
751
|
+
}
|
|
752
|
+
.stack-caption + .stack { margin-top: 0; }
|
|
753
|
+
|
|
642
754
|
.layer {
|
|
643
755
|
width: 100%;
|
|
644
756
|
text-align: left;
|
package/site/cheatsheet.html
CHANGED
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
<div class="wrap-wide topbar-inner">
|
|
15
15
|
<a class="brand" href="index.html">
|
|
16
16
|
<span class="brand-mark" aria-hidden="true"></span>
|
|
17
|
-
<span class="brand-name">
|
|
17
|
+
<span class="brand-name">recipes</span>
|
|
18
18
|
</a>
|
|
19
19
|
<nav class="nav" aria-label="Main">
|
|
20
|
-
<a href="index.html">
|
|
21
|
-
<a href="
|
|
20
|
+
<a class="nav-cta" href="index.html#prompt">Quick start</a>
|
|
21
|
+
<a href="how-it-works.html">How it works</a>
|
|
22
|
+
<a href="recipes.html">Recipe anatomy</a>
|
|
22
23
|
<a href="perps.html">Perps</a>
|
|
23
24
|
<a href="cheatsheet.html" aria-current="page">Cheatsheet</a>
|
|
24
25
|
<a href="architecture.html">Architecture</a>
|
|
@@ -30,17 +31,18 @@
|
|
|
30
31
|
|
|
31
32
|
<main>
|
|
32
33
|
<section class="wrap-wide hero" style="padding-bottom:1rem">
|
|
33
|
-
<span class="eyebrow">
|
|
34
|
+
<span class="eyebrow">Runner reference</span>
|
|
34
35
|
<h1>Cheatsheet</h1>
|
|
35
36
|
<p class="lede">
|
|
36
|
-
<code>mm-harness
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
<code>mm-harness</code> is the runner; these are its commands.
|
|
38
|
+
<code>mm-harness <command> [target] [flags]</code>, from inside any MetaMask checkout. The
|
|
39
|
+
product is auto-detected; the positional target forces it; everything else is a flag on the same
|
|
40
|
+
command. Filter by what you actually work on.
|
|
39
41
|
</p>
|
|
40
42
|
<div class="hero-meta">
|
|
41
|
-
<span>mm-harness 0.
|
|
43
|
+
<span>mm-harness 0.34+</span>
|
|
42
44
|
<span>one bin, 21 commands</span>
|
|
43
|
-
<span>--json on
|
|
45
|
+
<span>--json on most commands</span>
|
|
44
46
|
</div>
|
|
45
47
|
</section>
|
|
46
48
|
|
|
@@ -230,7 +232,7 @@
|
|
|
230
232
|
<table>
|
|
231
233
|
<thead><tr><th>Flag / concept</th><th>What it does</th></tr></thead>
|
|
232
234
|
<tbody>
|
|
233
|
-
<tr data-platforms="all"><td><code>--json</code></td><td>Machine-readable output on
|
|
235
|
+
<tr data-platforms="all"><td><code>--json</code></td><td>Machine-readable output on most commands. This is the agent contract.</td></tr>
|
|
234
236
|
<tr data-platforms="all"><td><code>--json-stream</code></td><td>Line-flushed JSONL progress plus a terminal event, on <code>run</code> and <code>launch</code>.</td></tr>
|
|
235
237
|
<tr data-platforms="all"><td><code>--heal off</code></td><td>Fail fast, preserve the repro. Nothing is repaired under you.</td></tr>
|
|
236
238
|
<tr data-platforms="all"><td><code>--heal infra-only</code></td><td>Heal transport, never wallet state. Default for <code>run</code> and <code>call</code>.</td></tr>
|
|
@@ -296,8 +298,8 @@
|
|
|
296
298
|
|
|
297
299
|
<footer class="footer">
|
|
298
300
|
<div class="wrap-wide">
|
|
299
|
-
<p>Internal getting-started guide for
|
|
300
|
-
<p>
|
|
301
|
+
<p>Internal getting-started guide for proving MetaMask changes with recipes. Not official MetaMask product documentation.</p>
|
|
302
|
+
<p>Sample output moves between releases; trust your terminal over this page.</p>
|
|
301
303
|
</div>
|
|
302
304
|
</footer>
|
|
303
305
|
|