@deeeed/metamask-harness 0.2.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 +161 -0
- package/README.md +140 -0
- package/bin/mm-harness +99 -0
- package/docs/CHEATSHEET.md +61 -0
- package/docs/CLI-SPEC.md +915 -0
- package/docs/MENTAL-MODEL.md +295 -0
- package/docs/architecture.md +367 -0
- package/docs/extension-runtime-commands.md +60 -0
- package/docs/harness-cli.md +43 -0
- package/docs/live-adapter-contract.md +188 -0
- package/docs/package-boundaries.md +47 -0
- package/docs/perps-flow-catalog.md +235 -0
- package/docs/recipe-libraries.md +95 -0
- package/docs/runtime-file-conventions.md +36 -0
- package/library/actions/core/perps/_controller.mjs +727 -0
- package/library/actions/core/perps/assert_orders.mjs +53 -0
- package/library/actions/core/perps/assert_positions.mjs +52 -0
- package/library/actions/core/perps/close_orders.mjs +97 -0
- package/library/actions/core/perps/close_positions.mjs +118 -0
- package/library/actions/core/perps/ensure_orders.mjs +40 -0
- package/library/actions/core/perps/ensure_positions.mjs +37 -0
- package/library/actions/core/perps/place_order.mjs +201 -0
- package/library/actions/core/perps/read_account.mjs +30 -0
- package/library/actions/core/perps/read_orders.mjs +27 -0
- package/library/actions/core/perps/read_positions.mjs +27 -0
- package/library/actions/core/perps/start_state.mjs +92 -0
- package/library/actions/core/perps/teardown_state.mjs +86 -0
- package/library/actions/extension/perps/assert_orders.mjs +11 -0
- package/library/actions/extension/perps/assert_positions.mjs +11 -0
- package/library/actions/extension/perps/close_orders.mjs +8 -0
- package/library/actions/extension/perps/close_positions.mjs +8 -0
- package/library/actions/extension/perps/ensure_orders.mjs +4 -0
- package/library/actions/extension/perps/ensure_positions.mjs +4 -0
- package/library/actions/extension/perps/perps.mjs +730 -0
- package/library/actions/extension/perps/place_order.mjs +7 -0
- package/library/actions/extension/perps/read_orders.mjs +4 -0
- package/library/actions/extension/perps/read_positions.mjs +3 -0
- package/library/actions/extension/platform/cdp.mjs +541 -0
- package/library/actions/extension/ui/navigate.mjs +44 -0
- package/library/actions/extension/wallet/ensure_unlocked.mjs +36 -0
- package/library/actions/extension/wallet/read_state.mjs +27 -0
- package/library/actions/extension/wallet/select_account.mjs +48 -0
- package/library/actions/extension/wallet/setup.mjs +35 -0
- package/library/actions/mobile/app-overlay/app/dev-tools/AgenticService/AgentStepHud.tsx.patch +185 -0
- package/library/actions/mobile/app-overlay/app/dev-tools/AgenticService/AgenticService.ts.patch +1662 -0
- package/library/actions/mobile/bridge-runtime/cdp-bridge.cjs +686 -0
- package/library/actions/mobile/bridge-runtime/lib/cdp-eval.cjs +110 -0
- package/library/actions/mobile/bridge-runtime/lib/config.cjs +39 -0
- package/library/actions/mobile/bridge-runtime/lib/issue-capture.cjs +446 -0
- package/library/actions/mobile/bridge-runtime/lib/target-discovery.cjs +204 -0
- package/library/actions/mobile/bridge-runtime/lib/ws-client.cjs +108 -0
- package/library/actions/mobile/bridge-runtime/setup-wallet.sh +442 -0
- package/library/actions/mobile/perps/assert_orders.mjs +11 -0
- package/library/actions/mobile/perps/assert_positions.mjs +11 -0
- package/library/actions/mobile/perps/close_orders.mjs +8 -0
- package/library/actions/mobile/perps/close_positions.mjs +8 -0
- package/library/actions/mobile/perps/ensure_orders.mjs +4 -0
- package/library/actions/mobile/perps/ensure_positions.mjs +4 -0
- package/library/actions/mobile/perps/perps.mjs +709 -0
- package/library/actions/mobile/perps/place_order.mjs +7 -0
- package/library/actions/mobile/perps/read_orders.mjs +4 -0
- package/library/actions/mobile/perps/read_positions.mjs +3 -0
- package/library/actions/mobile/platform/bridge.mjs +283 -0
- package/library/actions/mobile/ui/navigate.mjs +38 -0
- package/library/actions/mobile/wallet/ensure_unlocked.mjs +107 -0
- package/library/actions/mobile/wallet/home.mjs +35 -0
- package/library/actions/mobile/wallet/read_state.mjs +40 -0
- package/library/actions/mobile/wallet/select_account.mjs +48 -0
- package/library/actions/mobile/wallet/setup.mjs +220 -0
- package/library/flows/perps.flows.json +64 -0
- package/library/library.json +7 -0
- package/library/manifests/core.action-manifest.json +1282 -0
- package/library/manifests/extension.action-manifest.json +1749 -0
- package/library/manifests/mobile.action-manifest.json +1753 -0
- package/library/recipes/action-validation.extension.recipe.json +417 -0
- package/library/recipes/action-validation.mobile.recipe.json +422 -0
- package/library/recipes/order-lifecycle.core.recipe.json +78 -0
- package/library/recipes/perps-lifecycle.recipe.json +194 -0
- package/library/recipes/read-markets.core.recipe.json +38 -0
- package/library/recipes/smoke.extension.recipe.json +31 -0
- package/library/recipes/smoke.mobile.recipe.json +31 -0
- package/library/recipes/trading-lifecycle.core.recipe.json +76 -0
- package/orchestration/compat-overlays/README.md +19 -0
- package/orchestration/compat-overlays/mobile/README.md +13 -0
- package/orchestration/compat-overlays/mobile/rn81-message-event-source.patch +42 -0
- package/orchestration/core/cleanup.sh +37 -0
- package/orchestration/core/inject.sh +154 -0
- package/orchestration/doctor.mjs +72 -0
- package/orchestration/extension/cleanup.mjs +60 -0
- package/orchestration/extension/console-tail.mjs +228 -0
- package/orchestration/extension/ensure-browser.sh +416 -0
- package/orchestration/extension/ensure-ready.ts +185 -0
- package/orchestration/extension/extension-id.ts +107 -0
- package/orchestration/extension/inject.mjs +266 -0
- package/orchestration/extension/launch-browser.cjs +216 -0
- package/orchestration/extension/launch.sh +175 -0
- package/orchestration/extension/live.sh +320 -0
- package/orchestration/extension/pin-remote-flags.cjs +45 -0
- package/orchestration/extension/readiness.mjs +414 -0
- package/orchestration/extension/refresh-build.sh +190 -0
- package/orchestration/extension/runtime-decision.ts +445 -0
- package/orchestration/extension/runtime.ts +407 -0
- package/orchestration/extension/seed-fixture.sh +177 -0
- package/orchestration/extension/sidepanel-toggle.sh +291 -0
- package/orchestration/extension/snapshot-dist.sh +84 -0
- package/orchestration/extension/start-watch.sh +339 -0
- package/orchestration/extension/wallet-fixture-state.cjs +1086 -0
- package/orchestration/lib/activate-repo-node.sh +144 -0
- package/orchestration/lib/cli-color.mjs +84 -0
- package/orchestration/lib/cli-commands.mjs +243 -0
- package/orchestration/lib/cli-home.mjs +354 -0
- package/orchestration/lib/cli-ux.sh +252 -0
- package/orchestration/lib/cli-version.mjs +123 -0
- package/orchestration/lib/ensure-runner-deps.sh +56 -0
- package/orchestration/lib/harness-path.sh +55 -0
- package/orchestration/lib/hash-helpers.sh +44 -0
- package/orchestration/lib/json-field.sh +23 -0
- package/orchestration/lib/log-tui.mjs +304 -0
- package/orchestration/lib/open-debug.mjs +317 -0
- package/orchestration/lib/path-defaults.json +4 -0
- package/orchestration/lib/progress.mjs +107 -0
- package/orchestration/lib/recipe-paths.mjs +26 -0
- package/orchestration/lib/resolve-farmslot-ports.sh +144 -0
- package/orchestration/manifest.json +358 -0
- package/orchestration/mobile/cleanup.sh +192 -0
- package/orchestration/mobile/deps-markers.ts +21 -0
- package/orchestration/mobile/inject.sh +681 -0
- package/orchestration/mobile/launch.sh +137 -0
- package/orchestration/mobile/live.sh +125 -0
- package/orchestration/mobile/runtime-decision.ts +292 -0
- package/orchestration/porcelain/metamask-recipe +99 -0
- package/orchestration/porcelain/mm-recipe +1591 -0
- package/orchestration/porcelain/mme-recipe +1181 -0
- package/package.json +59 -0
- package/runner/extension/verify.sh +511 -0
- package/runner/mobile/verify.sh +501 -0
- package/runner/src/adapters.ts +601 -0
- package/runner/src/cli.ts +1820 -0
- package/runner/src/commands/debug.ts +44 -0
- package/runner/src/commands/fixtures.ts +99 -0
- package/runner/src/commands/launch.ts +397 -0
- package/runner/src/commands/logs.ts +60 -0
- package/runner/src/commands/shared.ts +138 -0
- package/runner/src/completions-cache.ts +86 -0
- package/runner/src/doctor.ts +203 -0
- package/runner/src/harness.ts +516 -0
- package/runner/src/heal-bounds.ts +179 -0
- package/runner/src/index.ts +6 -0
- package/runner/src/live-adapter-contract.ts +274 -0
- package/runner/src/manifest.ts +47 -0
- package/runner/src/mm-harness-cli.ts +488 -0
- package/runner/src/paths.ts +198 -0
- package/runner/src/recording-target.ts +147 -0
- package/runner/src/run-recording.ts +329 -0
- package/runner/src/runner.ts +108 -0
- package/runner/src/types.ts +57 -0
- package/scripts/completions.sh +125 -0
- package/scripts/install-completions.sh +62 -0
|
@@ -0,0 +1,1749 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runner_protocol_version": 1,
|
|
3
|
+
"action_registry_version": 1,
|
|
4
|
+
"supported_official_actions": [
|
|
5
|
+
"command",
|
|
6
|
+
"wait",
|
|
7
|
+
"assert_file",
|
|
8
|
+
"assert_json",
|
|
9
|
+
"assert_exit_code",
|
|
10
|
+
"assert_output",
|
|
11
|
+
"watch_logs",
|
|
12
|
+
"index_artifacts",
|
|
13
|
+
"end",
|
|
14
|
+
"ui.navigate",
|
|
15
|
+
"ui.press",
|
|
16
|
+
"ui.key_press",
|
|
17
|
+
"ui.set_input",
|
|
18
|
+
"ui.scroll",
|
|
19
|
+
"ui.wait_for",
|
|
20
|
+
"ui.screenshot",
|
|
21
|
+
"app.status",
|
|
22
|
+
"app.hud",
|
|
23
|
+
"cdp.target"
|
|
24
|
+
],
|
|
25
|
+
"action_metadata": {
|
|
26
|
+
"command": {
|
|
27
|
+
"description": "Run a shell command from the project root.",
|
|
28
|
+
"examples": [
|
|
29
|
+
{
|
|
30
|
+
"node": {
|
|
31
|
+
"action": "command",
|
|
32
|
+
"cmd": "pwd",
|
|
33
|
+
"intent": "Run a shell command from the project root"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"wait": {
|
|
39
|
+
"description": "Base wait action.",
|
|
40
|
+
"examples": [
|
|
41
|
+
{
|
|
42
|
+
"node": {
|
|
43
|
+
"action": "wait",
|
|
44
|
+
"duration_ms": 1,
|
|
45
|
+
"intent": "Base wait action"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"watch_logs": {
|
|
51
|
+
"description": "Base log assertion/capture action.",
|
|
52
|
+
"examples": [
|
|
53
|
+
{
|
|
54
|
+
"node": {
|
|
55
|
+
"action": "watch_logs",
|
|
56
|
+
"path": "logs/app.log",
|
|
57
|
+
"intent": "Base log assertion/capture action"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"index_artifacts": {
|
|
63
|
+
"description": "Index extra recipe-authored artifacts that already exist on disk. Do not use after ui.screenshot; screenshots are registered by the runner.",
|
|
64
|
+
"examples": [
|
|
65
|
+
{
|
|
66
|
+
"node": {
|
|
67
|
+
"action": "index_artifacts",
|
|
68
|
+
"artifacts": [
|
|
69
|
+
{
|
|
70
|
+
"path": "reports/result.json",
|
|
71
|
+
"type": "report",
|
|
72
|
+
"category": "validation",
|
|
73
|
+
"label": "Validation report"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"intent": "Register a pre-existing report artifact"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"end": {
|
|
82
|
+
"description": "Base terminal action.",
|
|
83
|
+
"examples": [
|
|
84
|
+
{
|
|
85
|
+
"node": {
|
|
86
|
+
"action": "end",
|
|
87
|
+
"status": "pass"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"ui.navigate": {
|
|
93
|
+
"description": "Navigate with either raw extension url/hash/path or a small stable page alias. Discover supported aliases here before hardcoding routes.",
|
|
94
|
+
"schema": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"page": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"enum": [
|
|
100
|
+
"home",
|
|
101
|
+
"perps",
|
|
102
|
+
"perps-market"
|
|
103
|
+
],
|
|
104
|
+
"description": "Small stable page aliases; use raw route/hash when you need a route outside this list."
|
|
105
|
+
},
|
|
106
|
+
"market": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "Market symbol for page=perps-market, e.g. ETH."
|
|
109
|
+
},
|
|
110
|
+
"symbol": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Alias for market."
|
|
113
|
+
},
|
|
114
|
+
"url": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "Raw extension URL."
|
|
117
|
+
},
|
|
118
|
+
"hash": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Raw extension hash, e.g. #/?tab=perps."
|
|
121
|
+
},
|
|
122
|
+
"path": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "Alias for hash."
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"examples": [
|
|
129
|
+
{
|
|
130
|
+
"description": "Open Perps through the stable alias",
|
|
131
|
+
"node": {
|
|
132
|
+
"action": "ui.navigate",
|
|
133
|
+
"page": "perps",
|
|
134
|
+
"intent": "Open Perps"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"description": "Open a Perps market through the stable alias",
|
|
139
|
+
"node": {
|
|
140
|
+
"action": "ui.navigate",
|
|
141
|
+
"page": "perps-market",
|
|
142
|
+
"market": "ETH",
|
|
143
|
+
"intent": "Open ETH Perps market"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"description": "Fallback to a raw extension hash when no alias exists",
|
|
148
|
+
"node": {
|
|
149
|
+
"action": "ui.navigate",
|
|
150
|
+
"hash": "#/?tab=perps",
|
|
151
|
+
"intent": "Open a raw extension route"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"ui.press": {
|
|
157
|
+
"description": "Press/tap/click a UI target through the platform adapter.",
|
|
158
|
+
"examples": [
|
|
159
|
+
{
|
|
160
|
+
"node": {
|
|
161
|
+
"action": "ui.press",
|
|
162
|
+
"target": "Perps",
|
|
163
|
+
"intent": "Press/tap/click a UI target through the platform adapter"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"ui.scroll": {
|
|
169
|
+
"description": "Scroll through the UI through the Farmslot base platform adapter. Supports deltas and scroll_into_view for selector/test-id proof positioning.",
|
|
170
|
+
"examples": [
|
|
171
|
+
{
|
|
172
|
+
"node": {
|
|
173
|
+
"action": "ui.scroll",
|
|
174
|
+
"delta_y": 300,
|
|
175
|
+
"intent": "Scroll through the UI through the Farmslot base platform adapter. Supports deltas and scroll_into_view for selector/test-id proof positioning"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"description": "Bring a web selector into view before screenshot proof",
|
|
180
|
+
"node": {
|
|
181
|
+
"action": "ui.scroll",
|
|
182
|
+
"selector": "[data-testid=\"example\"]",
|
|
183
|
+
"scroll_into_view": true,
|
|
184
|
+
"intent": "Bring a web selector into view before screenshot proof"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"proof_effect": "E2E validation must include a passing ui-scroll-into-view trace event with output.intoView=true."
|
|
189
|
+
},
|
|
190
|
+
"ui.wait_for": {
|
|
191
|
+
"description": "Wait for a UI condition through the Extension CDP adapter.",
|
|
192
|
+
"examples": [
|
|
193
|
+
{
|
|
194
|
+
"node": {
|
|
195
|
+
"action": "ui.wait_for",
|
|
196
|
+
"text": "Perps",
|
|
197
|
+
"intent": "Wait for visible Extension text"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"ui.screenshot": {
|
|
203
|
+
"description": "Capture visual evidence through capture-helper snapshot; the runner registers the screenshot artifact automatically. CDP/DOM-raster fallback is not valid Extension evidence.",
|
|
204
|
+
"examples": [
|
|
205
|
+
{
|
|
206
|
+
"node": {
|
|
207
|
+
"action": "ui.screenshot",
|
|
208
|
+
"path": "screenshots/example.png",
|
|
209
|
+
"intent": "Capture visual evidence after a wait/assert step"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"assert_file": {
|
|
215
|
+
"description": "Assert that a project file exists and optionally contains text.",
|
|
216
|
+
"examples": [
|
|
217
|
+
{
|
|
218
|
+
"node": {
|
|
219
|
+
"action": "assert_file",
|
|
220
|
+
"path": "reports/result.txt",
|
|
221
|
+
"contains": "ok",
|
|
222
|
+
"intent": "Assert that a project file exists and optionally contains text"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"assert_json": {
|
|
228
|
+
"description": "Assert a JSON file value with a JSONPath-style selector.",
|
|
229
|
+
"examples": [
|
|
230
|
+
{
|
|
231
|
+
"node": {
|
|
232
|
+
"action": "assert_json",
|
|
233
|
+
"path": "reports/result.json",
|
|
234
|
+
"assert": {
|
|
235
|
+
"path": "$.status",
|
|
236
|
+
"operator": "eq",
|
|
237
|
+
"value": "ok"
|
|
238
|
+
},
|
|
239
|
+
"intent": "Assert a JSON file value with a JSONPath-style selector"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"assert_exit_code": {
|
|
245
|
+
"description": "Assert the exit code captured from a command node output.",
|
|
246
|
+
"examples": [
|
|
247
|
+
{
|
|
248
|
+
"node": {
|
|
249
|
+
"action": "assert_exit_code",
|
|
250
|
+
"source": "run-tests",
|
|
251
|
+
"expected": 0,
|
|
252
|
+
"intent": "Assert the exit code captured from a command node output"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
"assert_output": {
|
|
258
|
+
"description": "Assert stdout or stderr captured from a command node output.",
|
|
259
|
+
"examples": [
|
|
260
|
+
{
|
|
261
|
+
"node": {
|
|
262
|
+
"action": "assert_output",
|
|
263
|
+
"source": "run-tests",
|
|
264
|
+
"stream": "stdout",
|
|
265
|
+
"contains": "PASS",
|
|
266
|
+
"intent": "Assert stdout or stderr captured from a command node output"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"app.hud": {
|
|
272
|
+
"description": "Display minimal human-readable recipe progress. The intent must explain the current agent goal; debug metadata and flow/domain labels are hidden unless explicitly opted in.",
|
|
273
|
+
"examples": [
|
|
274
|
+
{
|
|
275
|
+
"description": "Default one-intent progress HUD",
|
|
276
|
+
"node": {
|
|
277
|
+
"action": "app.hud",
|
|
278
|
+
"status": "running",
|
|
279
|
+
"intent": "Open a small ETH long position",
|
|
280
|
+
"progress": {
|
|
281
|
+
"current": 12,
|
|
282
|
+
"total": 19
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"safety_notes": "HUD is reviewer feedback only. It must not mutate product state or carry task assertions; trace/artifacts remain authoritative.",
|
|
288
|
+
"schema": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"properties": {
|
|
291
|
+
"status": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"enum": [
|
|
294
|
+
"running",
|
|
295
|
+
"pass",
|
|
296
|
+
"fail"
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
"intent": {
|
|
300
|
+
"type": "string"
|
|
301
|
+
},
|
|
302
|
+
"progress": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"properties": {
|
|
305
|
+
"current": {
|
|
306
|
+
"type": "number"
|
|
307
|
+
},
|
|
308
|
+
"total": {
|
|
309
|
+
"type": "number"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"current",
|
|
314
|
+
"total"
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
"detail": {
|
|
318
|
+
"type": "string"
|
|
319
|
+
},
|
|
320
|
+
"error": {
|
|
321
|
+
"type": "string"
|
|
322
|
+
},
|
|
323
|
+
"display": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"properties": {
|
|
326
|
+
"showDetail": {
|
|
327
|
+
"type": "boolean"
|
|
328
|
+
},
|
|
329
|
+
"showDebug": {
|
|
330
|
+
"type": "boolean"
|
|
331
|
+
},
|
|
332
|
+
"showTitle": {
|
|
333
|
+
"type": "boolean"
|
|
334
|
+
},
|
|
335
|
+
"layout": {
|
|
336
|
+
"type": "string"
|
|
337
|
+
},
|
|
338
|
+
"position": {
|
|
339
|
+
"type": "string"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"clear": {
|
|
344
|
+
"type": "boolean"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"ui.set_input": {
|
|
350
|
+
"description": "Set text on an extension DOM input through the CDP UI transport.",
|
|
351
|
+
"schema": {
|
|
352
|
+
"type": "object",
|
|
353
|
+
"properties": {
|
|
354
|
+
"selector": {
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
"test_id": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
},
|
|
360
|
+
"value": {
|
|
361
|
+
"type": "string"
|
|
362
|
+
},
|
|
363
|
+
"text": {
|
|
364
|
+
"type": "string"
|
|
365
|
+
},
|
|
366
|
+
"next": {
|
|
367
|
+
"type": "string"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"additionalProperties": true
|
|
371
|
+
},
|
|
372
|
+
"examples": [
|
|
373
|
+
{
|
|
374
|
+
"node": {
|
|
375
|
+
"action": "ui.set_input",
|
|
376
|
+
"selector": "[data-testid=multichain-account-list-search] input",
|
|
377
|
+
"value": "Account",
|
|
378
|
+
"intent": "Set text on an extension DOM input through the CDP UI transport"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
"ui.key_press": {
|
|
384
|
+
"description": "Send a trusted keyboard press to the currently focused UI element through the UI transport.",
|
|
385
|
+
"schema": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"properties": {
|
|
388
|
+
"key": {
|
|
389
|
+
"type": "string"
|
|
390
|
+
},
|
|
391
|
+
"next": {
|
|
392
|
+
"type": "string"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"required": [
|
|
396
|
+
"key"
|
|
397
|
+
],
|
|
398
|
+
"additionalProperties": true
|
|
399
|
+
},
|
|
400
|
+
"examples": [
|
|
401
|
+
{
|
|
402
|
+
"node": {
|
|
403
|
+
"action": "ui.key_press",
|
|
404
|
+
"key": "Enter",
|
|
405
|
+
"intent": "Send a trusted Enter key press to the focused UI element"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
]
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"custom_actions": [
|
|
412
|
+
{
|
|
413
|
+
"name": "metamask.wallet.fixture_status",
|
|
414
|
+
"owner": "metamask",
|
|
415
|
+
"description": "extension manifest-declared action metamask.wallet.fixture_status.",
|
|
416
|
+
"schema": {
|
|
417
|
+
"type": "object",
|
|
418
|
+
"properties": {
|
|
419
|
+
"action": {
|
|
420
|
+
"const": "metamask.wallet.fixture_status"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"required": [
|
|
424
|
+
"action"
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
"examples": [
|
|
428
|
+
{
|
|
429
|
+
"description": "Minimal node",
|
|
430
|
+
"node": {
|
|
431
|
+
"action": "metamask.wallet.fixture_status",
|
|
432
|
+
"intent": "Check wallet fixture status"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
437
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"name": "metamask.wallet.setup",
|
|
441
|
+
"owner": "metamask",
|
|
442
|
+
"description": "extension manifest-declared action metamask.wallet.setup.",
|
|
443
|
+
"schema": {
|
|
444
|
+
"type": "object",
|
|
445
|
+
"properties": {
|
|
446
|
+
"action": {
|
|
447
|
+
"const": "metamask.wallet.setup"
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"required": [
|
|
451
|
+
"action"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"examples": [
|
|
455
|
+
{
|
|
456
|
+
"description": "Minimal node",
|
|
457
|
+
"node": {
|
|
458
|
+
"action": "metamask.wallet.setup",
|
|
459
|
+
"intent": "Prepare the wallet fixture for recipe execution"
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
464
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "metamask.wallet.ensure_unlocked",
|
|
468
|
+
"owner": "metamask",
|
|
469
|
+
"description": "extension manifest-declared action metamask.wallet.ensure_unlocked.",
|
|
470
|
+
"schema": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"properties": {
|
|
473
|
+
"action": {
|
|
474
|
+
"const": "metamask.wallet.ensure_unlocked"
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"required": [
|
|
478
|
+
"action"
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
"examples": [
|
|
482
|
+
{
|
|
483
|
+
"description": "Minimal node",
|
|
484
|
+
"node": {
|
|
485
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
486
|
+
"intent": "Ensure the wallet is unlocked before proof steps"
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
491
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"name": "metamask.wallet.select_account",
|
|
495
|
+
"description": "extension action to select a wallet account by address, id, or display name.",
|
|
496
|
+
"schema": {
|
|
497
|
+
"type": "object",
|
|
498
|
+
"properties": {
|
|
499
|
+
"action": {
|
|
500
|
+
"const": "metamask.wallet.select_account"
|
|
501
|
+
},
|
|
502
|
+
"address": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"description": "EVM address of the account to select."
|
|
505
|
+
},
|
|
506
|
+
"id": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"description": "Internal account id to select."
|
|
509
|
+
},
|
|
510
|
+
"name": {
|
|
511
|
+
"type": "string",
|
|
512
|
+
"description": "Display name of the account to select."
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"required": [
|
|
516
|
+
"action"
|
|
517
|
+
],
|
|
518
|
+
"anyOf": [
|
|
519
|
+
{
|
|
520
|
+
"required": [
|
|
521
|
+
"address"
|
|
522
|
+
]
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"required": [
|
|
526
|
+
"id"
|
|
527
|
+
]
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"required": [
|
|
531
|
+
"name"
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
"examples": [
|
|
537
|
+
{
|
|
538
|
+
"description": "Select by deterministic fixture address",
|
|
539
|
+
"node": {
|
|
540
|
+
"action": "metamask.wallet.select_account",
|
|
541
|
+
"address": "0x8dc623e964475d4d669da601fd15ea9125469003",
|
|
542
|
+
"intent": "Select the requested wallet account"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"description": "Select by fixture display name",
|
|
547
|
+
"node": {
|
|
548
|
+
"action": "metamask.wallet.select_account",
|
|
549
|
+
"name": "dev1",
|
|
550
|
+
"intent": "Select the requested wallet account"
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "metamask.wallet.read_state",
|
|
557
|
+
"owner": "metamask",
|
|
558
|
+
"description": "extension manifest-declared action metamask.wallet.read_state.",
|
|
559
|
+
"schema": {
|
|
560
|
+
"type": "object",
|
|
561
|
+
"properties": {
|
|
562
|
+
"action": {
|
|
563
|
+
"const": "metamask.wallet.read_state"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
"required": [
|
|
567
|
+
"action"
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
"examples": [
|
|
571
|
+
{
|
|
572
|
+
"description": "Minimal node",
|
|
573
|
+
"node": {
|
|
574
|
+
"action": "metamask.wallet.read_state",
|
|
575
|
+
"intent": "Read wallet state needed for the proof"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
],
|
|
579
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
580
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "metamask.perps.read_positions",
|
|
584
|
+
"owner": "metamask",
|
|
585
|
+
"description": "extension Read live Perps positions and return the selected subset.",
|
|
586
|
+
"schema": {
|
|
587
|
+
"type": "object",
|
|
588
|
+
"properties": {
|
|
589
|
+
"action": {
|
|
590
|
+
"const": "metamask.perps.read_positions"
|
|
591
|
+
},
|
|
592
|
+
"market": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
595
|
+
},
|
|
596
|
+
"symbol": {
|
|
597
|
+
"type": "string",
|
|
598
|
+
"description": "Alias for market."
|
|
599
|
+
},
|
|
600
|
+
"markets": {
|
|
601
|
+
"type": "array",
|
|
602
|
+
"items": {
|
|
603
|
+
"type": "string"
|
|
604
|
+
},
|
|
605
|
+
"description": "Explicit list of market symbols."
|
|
606
|
+
},
|
|
607
|
+
"symbols": {
|
|
608
|
+
"type": "array",
|
|
609
|
+
"items": {
|
|
610
|
+
"type": "string"
|
|
611
|
+
},
|
|
612
|
+
"description": "Alias for markets."
|
|
613
|
+
},
|
|
614
|
+
"mode": {
|
|
615
|
+
"type": "string",
|
|
616
|
+
"enum": [
|
|
617
|
+
"matching",
|
|
618
|
+
"all"
|
|
619
|
+
],
|
|
620
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
621
|
+
},
|
|
622
|
+
"selector": {
|
|
623
|
+
"type": "object",
|
|
624
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
625
|
+
},
|
|
626
|
+
"side": {
|
|
627
|
+
"type": "string",
|
|
628
|
+
"enum": [
|
|
629
|
+
"long",
|
|
630
|
+
"short"
|
|
631
|
+
],
|
|
632
|
+
"description": "Optional position/order side filter."
|
|
633
|
+
},
|
|
634
|
+
"timeout_ms": {
|
|
635
|
+
"type": "number"
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"required": [
|
|
639
|
+
"action"
|
|
640
|
+
]
|
|
641
|
+
},
|
|
642
|
+
"examples": [
|
|
643
|
+
{
|
|
644
|
+
"description": "Read selected live state",
|
|
645
|
+
"node": {
|
|
646
|
+
"action": "metamask.perps.read_positions",
|
|
647
|
+
"market": "BTC",
|
|
648
|
+
"intent": "Read Perps positions needed for the proof"
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
],
|
|
652
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
653
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"name": "metamask.perps.read_orders",
|
|
657
|
+
"owner": "metamask",
|
|
658
|
+
"description": "extension Read live Perps open orders and return the selected subset.",
|
|
659
|
+
"schema": {
|
|
660
|
+
"type": "object",
|
|
661
|
+
"properties": {
|
|
662
|
+
"action": {
|
|
663
|
+
"const": "metamask.perps.read_orders"
|
|
664
|
+
},
|
|
665
|
+
"market": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
668
|
+
},
|
|
669
|
+
"symbol": {
|
|
670
|
+
"type": "string",
|
|
671
|
+
"description": "Alias for market."
|
|
672
|
+
},
|
|
673
|
+
"markets": {
|
|
674
|
+
"type": "array",
|
|
675
|
+
"items": {
|
|
676
|
+
"type": "string"
|
|
677
|
+
},
|
|
678
|
+
"description": "Explicit list of market symbols."
|
|
679
|
+
},
|
|
680
|
+
"symbols": {
|
|
681
|
+
"type": "array",
|
|
682
|
+
"items": {
|
|
683
|
+
"type": "string"
|
|
684
|
+
},
|
|
685
|
+
"description": "Alias for markets."
|
|
686
|
+
},
|
|
687
|
+
"mode": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"enum": [
|
|
690
|
+
"matching",
|
|
691
|
+
"all"
|
|
692
|
+
],
|
|
693
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
694
|
+
},
|
|
695
|
+
"selector": {
|
|
696
|
+
"type": "object",
|
|
697
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
698
|
+
},
|
|
699
|
+
"side": {
|
|
700
|
+
"type": "string",
|
|
701
|
+
"enum": [
|
|
702
|
+
"long",
|
|
703
|
+
"short"
|
|
704
|
+
],
|
|
705
|
+
"description": "Optional position/order side filter."
|
|
706
|
+
},
|
|
707
|
+
"timeout_ms": {
|
|
708
|
+
"type": "number"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"required": [
|
|
712
|
+
"action"
|
|
713
|
+
]
|
|
714
|
+
},
|
|
715
|
+
"examples": [
|
|
716
|
+
{
|
|
717
|
+
"description": "Read selected live state",
|
|
718
|
+
"node": {
|
|
719
|
+
"action": "metamask.perps.read_orders",
|
|
720
|
+
"market": "BTC",
|
|
721
|
+
"intent": "Read Perps open orders needed for the proof"
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
],
|
|
725
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
726
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"name": "metamask.perps.close_positions",
|
|
730
|
+
"owner": "metamask",
|
|
731
|
+
"description": "extension Default to testnet for Perps mutations; mainnet is read-only unless explicitly requested. Close selected live Perps positions. Use selector/mode params to close matching symbols or all positions.",
|
|
732
|
+
"schema": {
|
|
733
|
+
"type": "object",
|
|
734
|
+
"properties": {
|
|
735
|
+
"action": {
|
|
736
|
+
"const": "metamask.perps.close_positions"
|
|
737
|
+
},
|
|
738
|
+
"market": {
|
|
739
|
+
"type": "string",
|
|
740
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
741
|
+
},
|
|
742
|
+
"symbol": {
|
|
743
|
+
"type": "string",
|
|
744
|
+
"description": "Alias for market."
|
|
745
|
+
},
|
|
746
|
+
"markets": {
|
|
747
|
+
"type": "array",
|
|
748
|
+
"items": {
|
|
749
|
+
"type": "string"
|
|
750
|
+
},
|
|
751
|
+
"description": "Explicit list of market symbols."
|
|
752
|
+
},
|
|
753
|
+
"symbols": {
|
|
754
|
+
"type": "array",
|
|
755
|
+
"items": {
|
|
756
|
+
"type": "string"
|
|
757
|
+
},
|
|
758
|
+
"description": "Alias for markets."
|
|
759
|
+
},
|
|
760
|
+
"mode": {
|
|
761
|
+
"type": "string",
|
|
762
|
+
"enum": [
|
|
763
|
+
"matching",
|
|
764
|
+
"all"
|
|
765
|
+
],
|
|
766
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
767
|
+
},
|
|
768
|
+
"selector": {
|
|
769
|
+
"type": "object",
|
|
770
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
771
|
+
},
|
|
772
|
+
"side": {
|
|
773
|
+
"type": "string",
|
|
774
|
+
"enum": [
|
|
775
|
+
"long",
|
|
776
|
+
"short"
|
|
777
|
+
],
|
|
778
|
+
"description": "Optional position/order side filter."
|
|
779
|
+
},
|
|
780
|
+
"timeout_ms": {
|
|
781
|
+
"type": "number"
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"required": [
|
|
785
|
+
"action"
|
|
786
|
+
]
|
|
787
|
+
},
|
|
788
|
+
"examples": [
|
|
789
|
+
{
|
|
790
|
+
"description": "Close every open position",
|
|
791
|
+
"node": {
|
|
792
|
+
"action": "metamask.perps.close_positions",
|
|
793
|
+
"mode": "all",
|
|
794
|
+
"intent": "Close selected Perps positions before continuing",
|
|
795
|
+
"network": "testnet"
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"description": "Close selected BTC/ETH positions",
|
|
800
|
+
"node": {
|
|
801
|
+
"action": "metamask.perps.close_positions",
|
|
802
|
+
"markets": [
|
|
803
|
+
"BTC",
|
|
804
|
+
"ETH"
|
|
805
|
+
],
|
|
806
|
+
"intent": "Close selected Perps positions before continuing",
|
|
807
|
+
"network": "testnet"
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
],
|
|
811
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
812
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"name": "metamask.perps.close_orders",
|
|
816
|
+
"owner": "metamask",
|
|
817
|
+
"description": "extension Default to testnet for Perps mutations; mainnet is read-only unless explicitly requested. Cancel selected live Perps open orders. Use selector/mode params to cancel matching symbols or all orders.",
|
|
818
|
+
"schema": {
|
|
819
|
+
"type": "object",
|
|
820
|
+
"properties": {
|
|
821
|
+
"action": {
|
|
822
|
+
"const": "metamask.perps.close_orders"
|
|
823
|
+
},
|
|
824
|
+
"market": {
|
|
825
|
+
"type": "string",
|
|
826
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
827
|
+
},
|
|
828
|
+
"symbol": {
|
|
829
|
+
"type": "string",
|
|
830
|
+
"description": "Alias for market."
|
|
831
|
+
},
|
|
832
|
+
"markets": {
|
|
833
|
+
"type": "array",
|
|
834
|
+
"items": {
|
|
835
|
+
"type": "string"
|
|
836
|
+
},
|
|
837
|
+
"description": "Explicit list of market symbols."
|
|
838
|
+
},
|
|
839
|
+
"symbols": {
|
|
840
|
+
"type": "array",
|
|
841
|
+
"items": {
|
|
842
|
+
"type": "string"
|
|
843
|
+
},
|
|
844
|
+
"description": "Alias for markets."
|
|
845
|
+
},
|
|
846
|
+
"mode": {
|
|
847
|
+
"type": "string",
|
|
848
|
+
"enum": [
|
|
849
|
+
"matching",
|
|
850
|
+
"all"
|
|
851
|
+
],
|
|
852
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
853
|
+
},
|
|
854
|
+
"selector": {
|
|
855
|
+
"type": "object",
|
|
856
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
857
|
+
},
|
|
858
|
+
"side": {
|
|
859
|
+
"type": "string",
|
|
860
|
+
"enum": [
|
|
861
|
+
"long",
|
|
862
|
+
"short"
|
|
863
|
+
],
|
|
864
|
+
"description": "Optional position/order side filter."
|
|
865
|
+
},
|
|
866
|
+
"timeout_ms": {
|
|
867
|
+
"type": "number"
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
"required": [
|
|
871
|
+
"action"
|
|
872
|
+
]
|
|
873
|
+
},
|
|
874
|
+
"examples": [
|
|
875
|
+
{
|
|
876
|
+
"description": "Cancel every open order",
|
|
877
|
+
"node": {
|
|
878
|
+
"action": "metamask.perps.close_orders",
|
|
879
|
+
"mode": "all",
|
|
880
|
+
"intent": "Cancel selected Perps orders before continuing",
|
|
881
|
+
"network": "testnet"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"description": "Cancel BTC orders only",
|
|
886
|
+
"node": {
|
|
887
|
+
"action": "metamask.perps.close_orders",
|
|
888
|
+
"market": "BTC",
|
|
889
|
+
"intent": "Cancel selected Perps orders before continuing",
|
|
890
|
+
"network": "testnet"
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
],
|
|
894
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
895
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"name": "metamask.perps.place_order",
|
|
899
|
+
"owner": "metamask",
|
|
900
|
+
"description": "extension Place a Perps order through a supported app/API path. Default to testnet; mainnet order placement requires an explicit user request.",
|
|
901
|
+
"schema": {
|
|
902
|
+
"type": "object",
|
|
903
|
+
"properties": {
|
|
904
|
+
"action": {
|
|
905
|
+
"const": "metamask.perps.place_order"
|
|
906
|
+
},
|
|
907
|
+
"market": {
|
|
908
|
+
"type": "string",
|
|
909
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
910
|
+
},
|
|
911
|
+
"symbol": {
|
|
912
|
+
"type": "string",
|
|
913
|
+
"description": "Alias for market."
|
|
914
|
+
},
|
|
915
|
+
"markets": {
|
|
916
|
+
"type": "array",
|
|
917
|
+
"items": {
|
|
918
|
+
"type": "string"
|
|
919
|
+
},
|
|
920
|
+
"description": "Explicit list of market symbols."
|
|
921
|
+
},
|
|
922
|
+
"symbols": {
|
|
923
|
+
"type": "array",
|
|
924
|
+
"items": {
|
|
925
|
+
"type": "string"
|
|
926
|
+
},
|
|
927
|
+
"description": "Alias for markets."
|
|
928
|
+
},
|
|
929
|
+
"mode": {
|
|
930
|
+
"type": "string",
|
|
931
|
+
"enum": [
|
|
932
|
+
"matching",
|
|
933
|
+
"all"
|
|
934
|
+
],
|
|
935
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
936
|
+
},
|
|
937
|
+
"selector": {
|
|
938
|
+
"type": "object",
|
|
939
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
940
|
+
},
|
|
941
|
+
"side": {
|
|
942
|
+
"type": "string",
|
|
943
|
+
"enum": [
|
|
944
|
+
"long",
|
|
945
|
+
"short"
|
|
946
|
+
],
|
|
947
|
+
"description": "Optional position/order side filter."
|
|
948
|
+
},
|
|
949
|
+
"timeout_ms": {
|
|
950
|
+
"type": "number"
|
|
951
|
+
},
|
|
952
|
+
"amount": {
|
|
953
|
+
"type": "string",
|
|
954
|
+
"description": "USD amount/notional alias."
|
|
955
|
+
},
|
|
956
|
+
"notional": {
|
|
957
|
+
"type": "string",
|
|
958
|
+
"description": "USD notional alias."
|
|
959
|
+
},
|
|
960
|
+
"size": {
|
|
961
|
+
"type": "string",
|
|
962
|
+
"description": "Base asset size when supported."
|
|
963
|
+
},
|
|
964
|
+
"leverage": {
|
|
965
|
+
"type": "number"
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
"required": [
|
|
969
|
+
"action"
|
|
970
|
+
]
|
|
971
|
+
},
|
|
972
|
+
"examples": [
|
|
973
|
+
{
|
|
974
|
+
"description": "Place BTC market order",
|
|
975
|
+
"node": {
|
|
976
|
+
"action": "metamask.perps.place_order",
|
|
977
|
+
"market": "BTC",
|
|
978
|
+
"side": "long",
|
|
979
|
+
"notional": "10",
|
|
980
|
+
"leverage": 2,
|
|
981
|
+
"intent": "Place the requested Perps order",
|
|
982
|
+
"network": "testnet"
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
],
|
|
986
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
987
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"name": "metamask.perps.assert_positions",
|
|
991
|
+
"owner": "metamask",
|
|
992
|
+
"description": "extension Assert selected live Perps positions are present or absent.",
|
|
993
|
+
"schema": {
|
|
994
|
+
"type": "object",
|
|
995
|
+
"properties": {
|
|
996
|
+
"action": {
|
|
997
|
+
"const": "metamask.perps.assert_positions"
|
|
998
|
+
},
|
|
999
|
+
"market": {
|
|
1000
|
+
"type": "string",
|
|
1001
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
1002
|
+
},
|
|
1003
|
+
"symbol": {
|
|
1004
|
+
"type": "string",
|
|
1005
|
+
"description": "Alias for market."
|
|
1006
|
+
},
|
|
1007
|
+
"markets": {
|
|
1008
|
+
"type": "array",
|
|
1009
|
+
"items": {
|
|
1010
|
+
"type": "string"
|
|
1011
|
+
},
|
|
1012
|
+
"description": "Explicit list of market symbols."
|
|
1013
|
+
},
|
|
1014
|
+
"symbols": {
|
|
1015
|
+
"type": "array",
|
|
1016
|
+
"items": {
|
|
1017
|
+
"type": "string"
|
|
1018
|
+
},
|
|
1019
|
+
"description": "Alias for markets."
|
|
1020
|
+
},
|
|
1021
|
+
"mode": {
|
|
1022
|
+
"type": "string",
|
|
1023
|
+
"enum": [
|
|
1024
|
+
"matching",
|
|
1025
|
+
"all"
|
|
1026
|
+
],
|
|
1027
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
1028
|
+
},
|
|
1029
|
+
"selector": {
|
|
1030
|
+
"type": "object",
|
|
1031
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
1032
|
+
},
|
|
1033
|
+
"side": {
|
|
1034
|
+
"type": "string",
|
|
1035
|
+
"enum": [
|
|
1036
|
+
"long",
|
|
1037
|
+
"short"
|
|
1038
|
+
],
|
|
1039
|
+
"description": "Optional position/order side filter."
|
|
1040
|
+
},
|
|
1041
|
+
"timeout_ms": {
|
|
1042
|
+
"type": "number"
|
|
1043
|
+
},
|
|
1044
|
+
"state": {
|
|
1045
|
+
"type": "string",
|
|
1046
|
+
"enum": [
|
|
1047
|
+
"none",
|
|
1048
|
+
"absent",
|
|
1049
|
+
"closed",
|
|
1050
|
+
"open",
|
|
1051
|
+
"present"
|
|
1052
|
+
],
|
|
1053
|
+
"description": "Desired/expected selected collection state."
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"required": [
|
|
1057
|
+
"action"
|
|
1058
|
+
]
|
|
1059
|
+
},
|
|
1060
|
+
"examples": [
|
|
1061
|
+
{
|
|
1062
|
+
"description": "Assert BTC position is open",
|
|
1063
|
+
"node": {
|
|
1064
|
+
"action": "metamask.perps.assert_positions",
|
|
1065
|
+
"state": "open",
|
|
1066
|
+
"market": "BTC",
|
|
1067
|
+
"intent": "Assert the expected Perps position state"
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1072
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"name": "metamask.perps.assert_orders",
|
|
1076
|
+
"owner": "metamask",
|
|
1077
|
+
"description": "extension Assert selected live Perps open orders are present or absent.",
|
|
1078
|
+
"schema": {
|
|
1079
|
+
"type": "object",
|
|
1080
|
+
"properties": {
|
|
1081
|
+
"action": {
|
|
1082
|
+
"const": "metamask.perps.assert_orders"
|
|
1083
|
+
},
|
|
1084
|
+
"market": {
|
|
1085
|
+
"type": "string",
|
|
1086
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
1087
|
+
},
|
|
1088
|
+
"symbol": {
|
|
1089
|
+
"type": "string",
|
|
1090
|
+
"description": "Alias for market."
|
|
1091
|
+
},
|
|
1092
|
+
"markets": {
|
|
1093
|
+
"type": "array",
|
|
1094
|
+
"items": {
|
|
1095
|
+
"type": "string"
|
|
1096
|
+
},
|
|
1097
|
+
"description": "Explicit list of market symbols."
|
|
1098
|
+
},
|
|
1099
|
+
"symbols": {
|
|
1100
|
+
"type": "array",
|
|
1101
|
+
"items": {
|
|
1102
|
+
"type": "string"
|
|
1103
|
+
},
|
|
1104
|
+
"description": "Alias for markets."
|
|
1105
|
+
},
|
|
1106
|
+
"mode": {
|
|
1107
|
+
"type": "string",
|
|
1108
|
+
"enum": [
|
|
1109
|
+
"matching",
|
|
1110
|
+
"all"
|
|
1111
|
+
],
|
|
1112
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
1113
|
+
},
|
|
1114
|
+
"selector": {
|
|
1115
|
+
"type": "object",
|
|
1116
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
1117
|
+
},
|
|
1118
|
+
"side": {
|
|
1119
|
+
"type": "string",
|
|
1120
|
+
"enum": [
|
|
1121
|
+
"long",
|
|
1122
|
+
"short"
|
|
1123
|
+
],
|
|
1124
|
+
"description": "Optional position/order side filter."
|
|
1125
|
+
},
|
|
1126
|
+
"timeout_ms": {
|
|
1127
|
+
"type": "number"
|
|
1128
|
+
},
|
|
1129
|
+
"state": {
|
|
1130
|
+
"type": "string",
|
|
1131
|
+
"enum": [
|
|
1132
|
+
"none",
|
|
1133
|
+
"absent",
|
|
1134
|
+
"closed",
|
|
1135
|
+
"open",
|
|
1136
|
+
"present"
|
|
1137
|
+
],
|
|
1138
|
+
"description": "Desired/expected selected collection state."
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
"required": [
|
|
1142
|
+
"action"
|
|
1143
|
+
]
|
|
1144
|
+
},
|
|
1145
|
+
"examples": [
|
|
1146
|
+
{
|
|
1147
|
+
"description": "Assert no BTC open orders",
|
|
1148
|
+
"node": {
|
|
1149
|
+
"action": "metamask.perps.assert_orders",
|
|
1150
|
+
"state": "none",
|
|
1151
|
+
"market": "BTC",
|
|
1152
|
+
"intent": "Assert the expected Perps open order state"
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
],
|
|
1156
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1157
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"name": "metamask.perps.ensure_positions",
|
|
1161
|
+
"owner": "metamask",
|
|
1162
|
+
"description": "extension Default to testnet for Perps mutations; mainnet is read-only unless explicitly requested. Higher-level wrapper that reads selected positions, closes or places when needed, then asserts final position state.",
|
|
1163
|
+
"schema": {
|
|
1164
|
+
"type": "object",
|
|
1165
|
+
"properties": {
|
|
1166
|
+
"action": {
|
|
1167
|
+
"const": "metamask.perps.ensure_positions"
|
|
1168
|
+
},
|
|
1169
|
+
"market": {
|
|
1170
|
+
"type": "string",
|
|
1171
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
1172
|
+
},
|
|
1173
|
+
"symbol": {
|
|
1174
|
+
"type": "string",
|
|
1175
|
+
"description": "Alias for market."
|
|
1176
|
+
},
|
|
1177
|
+
"markets": {
|
|
1178
|
+
"type": "array",
|
|
1179
|
+
"items": {
|
|
1180
|
+
"type": "string"
|
|
1181
|
+
},
|
|
1182
|
+
"description": "Explicit list of market symbols."
|
|
1183
|
+
},
|
|
1184
|
+
"symbols": {
|
|
1185
|
+
"type": "array",
|
|
1186
|
+
"items": {
|
|
1187
|
+
"type": "string"
|
|
1188
|
+
},
|
|
1189
|
+
"description": "Alias for markets."
|
|
1190
|
+
},
|
|
1191
|
+
"mode": {
|
|
1192
|
+
"type": "string",
|
|
1193
|
+
"enum": [
|
|
1194
|
+
"matching",
|
|
1195
|
+
"all"
|
|
1196
|
+
],
|
|
1197
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
1198
|
+
},
|
|
1199
|
+
"selector": {
|
|
1200
|
+
"type": "object",
|
|
1201
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
1202
|
+
},
|
|
1203
|
+
"side": {
|
|
1204
|
+
"type": "string",
|
|
1205
|
+
"enum": [
|
|
1206
|
+
"long",
|
|
1207
|
+
"short"
|
|
1208
|
+
],
|
|
1209
|
+
"description": "Optional position/order side filter."
|
|
1210
|
+
},
|
|
1211
|
+
"timeout_ms": {
|
|
1212
|
+
"type": "number"
|
|
1213
|
+
},
|
|
1214
|
+
"state": {
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"enum": [
|
|
1217
|
+
"none",
|
|
1218
|
+
"absent",
|
|
1219
|
+
"closed",
|
|
1220
|
+
"open",
|
|
1221
|
+
"present"
|
|
1222
|
+
],
|
|
1223
|
+
"description": "Desired/expected selected collection state."
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
"required": [
|
|
1227
|
+
"action"
|
|
1228
|
+
]
|
|
1229
|
+
},
|
|
1230
|
+
"examples": [
|
|
1231
|
+
{
|
|
1232
|
+
"description": "Ensure no BTC position before proof window",
|
|
1233
|
+
"node": {
|
|
1234
|
+
"action": "metamask.perps.ensure_positions",
|
|
1235
|
+
"state": "none",
|
|
1236
|
+
"market": "BTC",
|
|
1237
|
+
"intent": "Converge Perps positions to the requested state",
|
|
1238
|
+
"network": "testnet"
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
"description": "Ensure any existing positions are closed",
|
|
1243
|
+
"node": {
|
|
1244
|
+
"action": "metamask.perps.ensure_positions",
|
|
1245
|
+
"state": "none",
|
|
1246
|
+
"mode": "all",
|
|
1247
|
+
"intent": "Converge Perps positions to the requested state",
|
|
1248
|
+
"network": "testnet"
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
],
|
|
1252
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1253
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"name": "metamask.perps.ensure_orders",
|
|
1257
|
+
"owner": "metamask",
|
|
1258
|
+
"description": "extension Default to testnet for Perps mutations; mainnet is read-only unless explicitly requested. Higher-level wrapper that reads selected orders, cancels when needed, then asserts final order state.",
|
|
1259
|
+
"schema": {
|
|
1260
|
+
"type": "object",
|
|
1261
|
+
"properties": {
|
|
1262
|
+
"action": {
|
|
1263
|
+
"const": "metamask.perps.ensure_orders"
|
|
1264
|
+
},
|
|
1265
|
+
"market": {
|
|
1266
|
+
"type": "string",
|
|
1267
|
+
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
1268
|
+
},
|
|
1269
|
+
"symbol": {
|
|
1270
|
+
"type": "string",
|
|
1271
|
+
"description": "Alias for market."
|
|
1272
|
+
},
|
|
1273
|
+
"markets": {
|
|
1274
|
+
"type": "array",
|
|
1275
|
+
"items": {
|
|
1276
|
+
"type": "string"
|
|
1277
|
+
},
|
|
1278
|
+
"description": "Explicit list of market symbols."
|
|
1279
|
+
},
|
|
1280
|
+
"symbols": {
|
|
1281
|
+
"type": "array",
|
|
1282
|
+
"items": {
|
|
1283
|
+
"type": "string"
|
|
1284
|
+
},
|
|
1285
|
+
"description": "Alias for markets."
|
|
1286
|
+
},
|
|
1287
|
+
"mode": {
|
|
1288
|
+
"type": "string",
|
|
1289
|
+
"enum": [
|
|
1290
|
+
"matching",
|
|
1291
|
+
"all"
|
|
1292
|
+
],
|
|
1293
|
+
"description": "matching selects requested symbols; all selects every live item returned by the product."
|
|
1294
|
+
},
|
|
1295
|
+
"selector": {
|
|
1296
|
+
"type": "object",
|
|
1297
|
+
"description": "Optional structured selector with mode, symbols/markets, and side."
|
|
1298
|
+
},
|
|
1299
|
+
"side": {
|
|
1300
|
+
"type": "string",
|
|
1301
|
+
"enum": [
|
|
1302
|
+
"long",
|
|
1303
|
+
"short"
|
|
1304
|
+
],
|
|
1305
|
+
"description": "Optional position/order side filter."
|
|
1306
|
+
},
|
|
1307
|
+
"timeout_ms": {
|
|
1308
|
+
"type": "number"
|
|
1309
|
+
},
|
|
1310
|
+
"state": {
|
|
1311
|
+
"type": "string",
|
|
1312
|
+
"enum": [
|
|
1313
|
+
"none",
|
|
1314
|
+
"absent",
|
|
1315
|
+
"closed",
|
|
1316
|
+
"open",
|
|
1317
|
+
"present"
|
|
1318
|
+
],
|
|
1319
|
+
"description": "Desired/expected selected collection state."
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
"required": [
|
|
1323
|
+
"action"
|
|
1324
|
+
]
|
|
1325
|
+
},
|
|
1326
|
+
"examples": [
|
|
1327
|
+
{
|
|
1328
|
+
"description": "Ensure no open orders before proof window",
|
|
1329
|
+
"node": {
|
|
1330
|
+
"action": "metamask.perps.ensure_orders",
|
|
1331
|
+
"state": "none",
|
|
1332
|
+
"mode": "all",
|
|
1333
|
+
"intent": "Converge Perps orders to the requested state",
|
|
1334
|
+
"network": "testnet"
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
],
|
|
1338
|
+
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1339
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"name": "metamask.perps.start_state",
|
|
1343
|
+
"owner": "metamask",
|
|
1344
|
+
"description": "extension Default to testnet for Perps mutations; mainnet is read-only unless explicitly requested. Recommended configurable Perps start state that composes reusable domain operations before the proof window.",
|
|
1345
|
+
"schema": {
|
|
1346
|
+
"type": "object",
|
|
1347
|
+
"properties": {
|
|
1348
|
+
"action": {
|
|
1349
|
+
"const": "metamask.perps.start_state"
|
|
1350
|
+
},
|
|
1351
|
+
"profile": {
|
|
1352
|
+
"type": "string",
|
|
1353
|
+
"description": "Optional profile such as clean_market_testnet, open_position_testnet, open_order_testnet, or provider_mainnet_readonly."
|
|
1354
|
+
},
|
|
1355
|
+
"account": {
|
|
1356
|
+
"type": "string"
|
|
1357
|
+
},
|
|
1358
|
+
"provider": {
|
|
1359
|
+
"type": "string",
|
|
1360
|
+
"description": "Requested Perps provider, e.g. hyperliquid."
|
|
1361
|
+
},
|
|
1362
|
+
"network": {
|
|
1363
|
+
"type": "string",
|
|
1364
|
+
"enum": [
|
|
1365
|
+
"testnet",
|
|
1366
|
+
"mainnet"
|
|
1367
|
+
]
|
|
1368
|
+
},
|
|
1369
|
+
"market": {
|
|
1370
|
+
"type": "string"
|
|
1371
|
+
},
|
|
1372
|
+
"symbol": {
|
|
1373
|
+
"type": "string"
|
|
1374
|
+
},
|
|
1375
|
+
"markets": {
|
|
1376
|
+
"type": "array",
|
|
1377
|
+
"items": {
|
|
1378
|
+
"type": "string"
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
"symbols": {
|
|
1382
|
+
"type": "array",
|
|
1383
|
+
"items": {
|
|
1384
|
+
"type": "string"
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
"page": {
|
|
1388
|
+
"oneOf": [
|
|
1389
|
+
{
|
|
1390
|
+
"type": "string"
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
"const": false
|
|
1394
|
+
}
|
|
1395
|
+
],
|
|
1396
|
+
"description": "Final page target; false skips navigation for teardown."
|
|
1397
|
+
},
|
|
1398
|
+
"positions": {
|
|
1399
|
+
"oneOf": [
|
|
1400
|
+
{
|
|
1401
|
+
"type": "object"
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"const": false
|
|
1405
|
+
}
|
|
1406
|
+
],
|
|
1407
|
+
"description": "Desired position baseline or false to skip."
|
|
1408
|
+
},
|
|
1409
|
+
"orders": {
|
|
1410
|
+
"oneOf": [
|
|
1411
|
+
{
|
|
1412
|
+
"type": "object"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"const": false
|
|
1416
|
+
}
|
|
1417
|
+
],
|
|
1418
|
+
"description": "Desired open-order baseline or false to skip."
|
|
1419
|
+
},
|
|
1420
|
+
"hud": {
|
|
1421
|
+
"type": "object"
|
|
1422
|
+
},
|
|
1423
|
+
"timeout_ms": {
|
|
1424
|
+
"type": "number"
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
"required": [
|
|
1428
|
+
"action"
|
|
1429
|
+
]
|
|
1430
|
+
},
|
|
1431
|
+
"examples": [
|
|
1432
|
+
{
|
|
1433
|
+
"description": "Clean BTC testnet market state",
|
|
1434
|
+
"node": {
|
|
1435
|
+
"action": "metamask.perps.start_state",
|
|
1436
|
+
"profile": "clean_market_testnet",
|
|
1437
|
+
"market": "BTC",
|
|
1438
|
+
"positions": {
|
|
1439
|
+
"state": "none"
|
|
1440
|
+
},
|
|
1441
|
+
"orders": {
|
|
1442
|
+
"state": "none"
|
|
1443
|
+
},
|
|
1444
|
+
"intent": "Prepare the Perps start state for the proof",
|
|
1445
|
+
"network": "testnet"
|
|
1446
|
+
}
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"description": "Start with an open ETH long position",
|
|
1450
|
+
"node": {
|
|
1451
|
+
"action": "metamask.perps.start_state",
|
|
1452
|
+
"profile": "open_position_testnet",
|
|
1453
|
+
"market": "ETH",
|
|
1454
|
+
"side": "long",
|
|
1455
|
+
"positions": {
|
|
1456
|
+
"state": "open",
|
|
1457
|
+
"notional": "10",
|
|
1458
|
+
"leverage": 2
|
|
1459
|
+
},
|
|
1460
|
+
"intent": "Prepare the Perps start state for the proof",
|
|
1461
|
+
"network": "testnet"
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
],
|
|
1465
|
+
"proof_effect": "Runs in setup/teardown phase and must be visible in trace.json; proof videos can keep this as trace-only setup.",
|
|
1466
|
+
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof."
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"name": "metamask.perps.teardown_state",
|
|
1470
|
+
"owner": "metamask",
|
|
1471
|
+
"description": "extension Recommended configurable Perps teardown state that restores the selected environment after proof.",
|
|
1472
|
+
"schema": {
|
|
1473
|
+
"type": "object",
|
|
1474
|
+
"properties": {
|
|
1475
|
+
"action": {
|
|
1476
|
+
"const": "metamask.perps.teardown_state"
|
|
1477
|
+
},
|
|
1478
|
+
"profile": {
|
|
1479
|
+
"type": "string",
|
|
1480
|
+
"description": "Optional profile such as clean_market_testnet, open_position_testnet, open_order_testnet, or provider_mainnet_readonly."
|
|
1481
|
+
},
|
|
1482
|
+
"account": {
|
|
1483
|
+
"type": "string"
|
|
1484
|
+
},
|
|
1485
|
+
"provider": {
|
|
1486
|
+
"type": "string",
|
|
1487
|
+
"description": "Requested Perps provider, e.g. hyperliquid."
|
|
1488
|
+
},
|
|
1489
|
+
"network": {
|
|
1490
|
+
"type": "string",
|
|
1491
|
+
"enum": [
|
|
1492
|
+
"testnet",
|
|
1493
|
+
"mainnet"
|
|
1494
|
+
]
|
|
1495
|
+
},
|
|
1496
|
+
"market": {
|
|
1497
|
+
"type": "string"
|
|
1498
|
+
},
|
|
1499
|
+
"symbol": {
|
|
1500
|
+
"type": "string"
|
|
1501
|
+
},
|
|
1502
|
+
"markets": {
|
|
1503
|
+
"type": "array",
|
|
1504
|
+
"items": {
|
|
1505
|
+
"type": "string"
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
"symbols": {
|
|
1509
|
+
"type": "array",
|
|
1510
|
+
"items": {
|
|
1511
|
+
"type": "string"
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
"page": {
|
|
1515
|
+
"oneOf": [
|
|
1516
|
+
{
|
|
1517
|
+
"type": "string"
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"const": false
|
|
1521
|
+
}
|
|
1522
|
+
],
|
|
1523
|
+
"description": "Final page target; false skips navigation for teardown."
|
|
1524
|
+
},
|
|
1525
|
+
"positions": {
|
|
1526
|
+
"oneOf": [
|
|
1527
|
+
{
|
|
1528
|
+
"type": "object"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"const": false
|
|
1532
|
+
}
|
|
1533
|
+
],
|
|
1534
|
+
"description": "Desired position baseline or false to skip."
|
|
1535
|
+
},
|
|
1536
|
+
"orders": {
|
|
1537
|
+
"oneOf": [
|
|
1538
|
+
{
|
|
1539
|
+
"type": "object"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"const": false
|
|
1543
|
+
}
|
|
1544
|
+
],
|
|
1545
|
+
"description": "Desired open-order baseline or false to skip."
|
|
1546
|
+
},
|
|
1547
|
+
"hud": {
|
|
1548
|
+
"type": "object"
|
|
1549
|
+
},
|
|
1550
|
+
"timeout_ms": {
|
|
1551
|
+
"type": "number"
|
|
1552
|
+
}
|
|
1553
|
+
},
|
|
1554
|
+
"required": [
|
|
1555
|
+
"action"
|
|
1556
|
+
]
|
|
1557
|
+
},
|
|
1558
|
+
"examples": [
|
|
1559
|
+
{
|
|
1560
|
+
"description": "Return BTC test account to clean state",
|
|
1561
|
+
"node": {
|
|
1562
|
+
"action": "metamask.perps.teardown_state",
|
|
1563
|
+
"market": "BTC",
|
|
1564
|
+
"positions": {
|
|
1565
|
+
"state": "none"
|
|
1566
|
+
},
|
|
1567
|
+
"orders": {
|
|
1568
|
+
"state": "none"
|
|
1569
|
+
},
|
|
1570
|
+
"page": "home",
|
|
1571
|
+
"intent": "Restore Perps state after the proof"
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"description": "Teardown only state created by selected market",
|
|
1576
|
+
"node": {
|
|
1577
|
+
"action": "metamask.perps.teardown_state",
|
|
1578
|
+
"market": "BTC",
|
|
1579
|
+
"intent": "Restore Perps state after the proof"
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
],
|
|
1583
|
+
"proof_effect": "Runs in setup/teardown phase and must be visible in trace.json; proof videos can keep this as trace-only setup.",
|
|
1584
|
+
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof."
|
|
1585
|
+
}
|
|
1586
|
+
],
|
|
1587
|
+
"state_refs": [
|
|
1588
|
+
{
|
|
1589
|
+
"name": "wallet.redacted_state",
|
|
1590
|
+
"description": "Redacted wallet state reported by metamask.wallet.read_state."
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"name": "perps.positions",
|
|
1594
|
+
"description": "Normalized Perps position state."
|
|
1595
|
+
}
|
|
1596
|
+
],
|
|
1597
|
+
"pre_conditions": [
|
|
1598
|
+
{
|
|
1599
|
+
"id": "no-mid-recipe-state-injection",
|
|
1600
|
+
"description": "Recipes must drive real supported UI/app/API paths for proof state."
|
|
1601
|
+
}
|
|
1602
|
+
],
|
|
1603
|
+
"native_bindings": [
|
|
1604
|
+
{
|
|
1605
|
+
"action": "command",
|
|
1606
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
"action": "wait",
|
|
1610
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
"action": "assert_file",
|
|
1614
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"action": "assert_json",
|
|
1618
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
"action": "assert_exit_code",
|
|
1622
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
"action": "assert_output",
|
|
1626
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"action": "watch_logs",
|
|
1630
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1631
|
+
},
|
|
1632
|
+
{
|
|
1633
|
+
"action": "index_artifacts",
|
|
1634
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"action": "end",
|
|
1638
|
+
"implementation": "@farmslot/recipe-harness/adapters/core"
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"action": "ui.navigate",
|
|
1642
|
+
"implementation": "@farmslot/recipe-harness/runtime/cdp"
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
"action": "ui.press",
|
|
1646
|
+
"implementation": "@farmslot/recipe-harness/runtime/cdp"
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
"action": "ui.key_press",
|
|
1650
|
+
"implementation": "@farmslot/recipe-harness/runtime/cdp"
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
"action": "ui.set_input",
|
|
1654
|
+
"implementation": "@metamask/recipe-runner/extension/cdp-set-input"
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
"action": "ui.scroll",
|
|
1658
|
+
"implementation": "@farmslot/recipe-harness/runtime/cdp"
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
"action": "ui.wait_for",
|
|
1662
|
+
"implementation": "@farmslot/recipe-harness/runtime/cdp"
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"action": "ui.screenshot",
|
|
1666
|
+
"implementation": "@farmslot/recipe-harness/runtime/cdp"
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"action": "app.status",
|
|
1670
|
+
"implementation": "@metamask/recipe-runner/platform-status"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"action": "app.hud",
|
|
1674
|
+
"implementation": "@farmslot/recipe-harness/runtime/cdp"
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
"action": "cdp.target",
|
|
1678
|
+
"implementation": "@metamask/recipe-runner/platform-cdp-target"
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
"action": "metamask.wallet.fixture_status",
|
|
1682
|
+
"implementation": "@metamask/recipe-runner/extension/wallet"
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
"action": "metamask.wallet.setup",
|
|
1686
|
+
"implementation": "@metamask/recipe-runner/extension/wallet"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
1690
|
+
"implementation": "@metamask/recipe-runner/extension/wallet"
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"action": "metamask.wallet.select_account",
|
|
1694
|
+
"implementation": "@metamask/recipe-runner/extension/wallet"
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
"action": "metamask.wallet.read_state",
|
|
1698
|
+
"implementation": "@metamask/recipe-runner/extension/wallet"
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"action": "metamask.perps.read_positions",
|
|
1702
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
"action": "metamask.perps.read_orders",
|
|
1706
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"action": "metamask.perps.close_positions",
|
|
1710
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
"action": "metamask.perps.close_orders",
|
|
1714
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
"action": "metamask.perps.place_order",
|
|
1718
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
"action": "metamask.perps.assert_positions",
|
|
1722
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
"action": "metamask.perps.assert_orders",
|
|
1726
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"action": "metamask.perps.ensure_positions",
|
|
1730
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"action": "metamask.perps.ensure_orders",
|
|
1734
|
+
"implementation": "@metamask/recipe-runner/extension/perps"
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
"action": "metamask.perps.start_state",
|
|
1738
|
+
"implementation": "@metamask/recipe-runner/extension/perps-domain-dispatcher"
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"action": "metamask.perps.teardown_state",
|
|
1742
|
+
"implementation": "@metamask/recipe-runner/extension/perps-domain-dispatcher"
|
|
1743
|
+
}
|
|
1744
|
+
],
|
|
1745
|
+
"capability_notes": [
|
|
1746
|
+
"Perps safety: default to testnet for setup and order/position mutations. Mainnet is read-only unless the user explicitly requests a mainnet mutation."
|
|
1747
|
+
],
|
|
1748
|
+
"action_profiles": []
|
|
1749
|
+
}
|