@deeeed/metamask-harness 0.18.0 → 0.19.1
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 +200 -0
- package/README.md +4 -7
- package/adapters/core/inject.sh +1 -6
- package/adapters/extension/inject.mjs +1 -4
- package/adapters/extension/verify.sh +1 -1
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +33 -0
- package/adapters/mobile/inject.sh +5 -4
- package/adapters/mobile/verify.sh +15 -19
- package/adapters/shared/harness-source-fingerprint.mjs +14 -12
- package/dist/adapters/harness-freshness.js +49 -0
- package/dist/adapters.js +6 -1
- package/dist/cli.js +0 -4
- package/dist/command-contract.js +51 -40
- package/dist/command-journal.js +50 -12
- package/dist/commands/call.js +95 -20
- package/dist/commands/check.js +1 -1
- package/dist/commands/completion-candidates.js +7 -19
- package/dist/commands/fixtures.js +50 -1
- package/dist/commands/last.js +9 -1
- package/dist/commands/launch/extension.js +2 -2
- package/dist/commands/launch/mobile.js +2 -0
- package/dist/commands/list-executables.js +56 -20
- package/dist/commands/manifest.js +28 -12
- package/dist/commands/parse-args.js +55 -3
- package/dist/commands/provision.js +0 -1
- package/dist/commands/run-engine.js +514 -336
- package/dist/commands/run.js +25 -37
- package/dist/commands/shared.js +1 -1
- package/dist/heal-bounds.js +5 -0
- package/dist/live-adapter-contract.js +15 -2
- package/dist/mm-harness-cli.js +22 -30
- package/dist/run-diagnostics.js +1 -1
- package/dist/run-recording.js +1 -1
- package/dist/runner.js +24 -2
- package/docs/CONTRIBUTING.md +2 -3
- package/docs/QA.md +0 -1
- package/docs/RECIPES.md +67 -91
- package/library/README.md +5 -5
- package/library/actions/core/perps/_controller.mjs +33 -1
- package/library/actions/core/perps/assert_orders.mjs +22 -12
- package/library/actions/core/perps/assert_positions.mjs +22 -12
- package/library/actions/core/perps/close_orders.mjs +2 -0
- package/library/actions/core/perps/close_positions.mjs +2 -0
- package/library/actions/core/perps/ensure_orders.mjs +4 -2
- package/library/actions/core/perps/ensure_positions.mjs +4 -2
- package/library/actions/core/perps/place_order.mjs +7 -3
- package/library/actions/extension/perps/assert_orders.mjs +2 -1
- package/library/actions/extension/perps/assert_positions.mjs +2 -1
- package/library/actions/extension/perps/perps.mjs +151 -30
- package/library/actions/mobile/perps/assert_orders.mjs +2 -1
- package/library/actions/mobile/perps/assert_positions.mjs +2 -1
- package/library/actions/mobile/perps/perps.mjs +148 -22
- package/library/library.json +1 -1
- package/library/manifests/core.action-manifest.json +1204 -411
- package/library/manifests/extension.action-manifest.json +1536 -656
- package/library/manifests/mobile.action-manifest.json +1728 -758
- package/library/recipes/app/lifecycle.android-smoke.mobile.recipe.json +63 -81
- package/library/recipes/perps/clean-market-testnet.core.recipe.json +44 -0
- package/library/recipes/perps/clean-market-testnet.recipe.json +49 -0
- package/library/recipes/perps/lifecycle.recipe.json +136 -180
- package/library/recipes/perps/order-lifecycle.core.recipe.json +71 -67
- package/library/recipes/perps/performance.background-resume.mobile.recipe.json +51 -67
- package/library/recipes/perps/performance.cold-start.mobile.recipe.json +51 -67
- package/library/recipes/perps/performance.mobile.recipe.json +37 -51
- package/library/recipes/perps/performance.warm-start.mobile.recipe.json +44 -59
- package/library/recipes/perps/read-markets.core.recipe.json +29 -31
- package/library/recipes/perps/smoke.core.recipe.json +29 -32
- package/library/recipes/perps/smoke.extension.recipe.json +41 -44
- package/library/recipes/perps/smoke.mobile.recipe.json +42 -44
- package/library/recipes/perps/trading-lifecycle.core.recipe.json +69 -65
- package/library/recipes/runner/action-validation.extension.recipe.json +312 -405
- package/library/recipes/runner/action-validation.mobile.recipe.json +316 -409
- package/library/recipes/runner/smoke.core.recipe.json +18 -20
- package/library/recipes/runner/smoke.extension.recipe.json +23 -24
- package/library/recipes/runner/smoke.mobile.recipe.json +23 -24
- package/library/recipes/wallet/smoke.extension.recipe.json +33 -35
- package/library/recipes/wallet/smoke.mobile.recipe.json +33 -35
- package/package.json +3 -3
- package/scripts/completions.sh +1 -4
- package/dist/adapters/extension/harness-freshness.js +0 -39
- package/dist/commands/flows.js +0 -91
- package/library/flows/perps.flows.json +0 -64
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"index_artifacts",
|
|
13
13
|
"end",
|
|
14
14
|
"call",
|
|
15
|
+
"switch",
|
|
15
16
|
"app.status"
|
|
16
17
|
],
|
|
17
18
|
"action_metadata": {
|
|
@@ -25,7 +26,28 @@
|
|
|
25
26
|
"intent": "Run a shell command from the project root"
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
]
|
|
29
|
+
],
|
|
30
|
+
"schema": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"cmd": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"command": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"cwd": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"timeout_ms": {
|
|
43
|
+
"type": "number"
|
|
44
|
+
},
|
|
45
|
+
"allow_failure": {
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
}
|
|
29
51
|
},
|
|
30
52
|
"wait": {
|
|
31
53
|
"description": "Base wait action.",
|
|
@@ -37,7 +59,44 @@
|
|
|
37
59
|
"intent": "Base wait action"
|
|
38
60
|
}
|
|
39
61
|
}
|
|
40
|
-
]
|
|
62
|
+
],
|
|
63
|
+
"schema": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"duration_ms": {
|
|
67
|
+
"type": "integer"
|
|
68
|
+
},
|
|
69
|
+
"ms": {
|
|
70
|
+
"type": "integer"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"switch": {
|
|
77
|
+
"description": "Choose a graph branch when one resolved string equals another.",
|
|
78
|
+
"examples": [
|
|
79
|
+
{
|
|
80
|
+
"node": {
|
|
81
|
+
"action": "switch",
|
|
82
|
+
"value": "{{params.mode}}",
|
|
83
|
+
"equals": "background_resume",
|
|
84
|
+
"cases": { "match": "background" },
|
|
85
|
+
"default": "warm",
|
|
86
|
+
"intent": "Choose the requested lifecycle preparation path"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"schema": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"value": { "type": "string" },
|
|
94
|
+
"equals": { "type": "string" }
|
|
95
|
+
},
|
|
96
|
+
"required": ["value", "equals"],
|
|
97
|
+
"additionalProperties": false
|
|
98
|
+
},
|
|
99
|
+
"result_cases": ["match"]
|
|
41
100
|
},
|
|
42
101
|
"watch_logs": {
|
|
43
102
|
"description": "Base log assertion/capture action.",
|
|
@@ -49,7 +108,29 @@
|
|
|
49
108
|
"intent": "Base log assertion/capture action"
|
|
50
109
|
}
|
|
51
110
|
}
|
|
52
|
-
]
|
|
111
|
+
],
|
|
112
|
+
"schema": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"path": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"contains": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"scope": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"enum": [
|
|
124
|
+
"run",
|
|
125
|
+
"file"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": [
|
|
130
|
+
"path"
|
|
131
|
+
],
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
}
|
|
53
134
|
},
|
|
54
135
|
"index_artifacts": {
|
|
55
136
|
"description": "Index extra recipe-authored artifacts that already exist on disk.",
|
|
@@ -68,7 +149,55 @@
|
|
|
68
149
|
"intent": "Register a pre-existing report artifact"
|
|
69
150
|
}
|
|
70
151
|
}
|
|
71
|
-
]
|
|
152
|
+
],
|
|
153
|
+
"schema": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"properties": {
|
|
156
|
+
"artifacts": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": [
|
|
160
|
+
"string",
|
|
161
|
+
"object"
|
|
162
|
+
],
|
|
163
|
+
"properties": {
|
|
164
|
+
"path": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
},
|
|
167
|
+
"type": {
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"label": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"nodeId": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"mimeType": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"category": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"proofTarget": {
|
|
183
|
+
"type": "string"
|
|
184
|
+
},
|
|
185
|
+
"covers": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"required": [
|
|
197
|
+
"artifacts"
|
|
198
|
+
],
|
|
199
|
+
"additionalProperties": false
|
|
200
|
+
}
|
|
72
201
|
},
|
|
73
202
|
"end": {
|
|
74
203
|
"description": "Base terminal action.",
|
|
@@ -92,7 +221,22 @@
|
|
|
92
221
|
"intent": "Assert that a project file exists and optionally contains text"
|
|
93
222
|
}
|
|
94
223
|
}
|
|
95
|
-
]
|
|
224
|
+
],
|
|
225
|
+
"schema": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": {
|
|
228
|
+
"path": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
},
|
|
231
|
+
"contains": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"required": [
|
|
236
|
+
"path"
|
|
237
|
+
],
|
|
238
|
+
"additionalProperties": false
|
|
239
|
+
}
|
|
96
240
|
},
|
|
97
241
|
"assert_json": {
|
|
98
242
|
"description": "Assert a JSON file value with a JSONPath-style selector.",
|
|
@@ -109,7 +253,69 @@
|
|
|
109
253
|
"intent": "Assert a JSON file value with a JSONPath-style selector"
|
|
110
254
|
}
|
|
111
255
|
}
|
|
112
|
-
]
|
|
256
|
+
],
|
|
257
|
+
"schema": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"properties": {
|
|
260
|
+
"path": {
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
"assert": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {
|
|
266
|
+
"path": {
|
|
267
|
+
"type": "string"
|
|
268
|
+
},
|
|
269
|
+
"operator": {
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
"value": {
|
|
273
|
+
"type": [
|
|
274
|
+
"string",
|
|
275
|
+
"number",
|
|
276
|
+
"integer",
|
|
277
|
+
"boolean",
|
|
278
|
+
"object",
|
|
279
|
+
"array"
|
|
280
|
+
],
|
|
281
|
+
"items": {
|
|
282
|
+
"type": [
|
|
283
|
+
"string",
|
|
284
|
+
"number",
|
|
285
|
+
"integer",
|
|
286
|
+
"boolean",
|
|
287
|
+
"object"
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"all": {
|
|
292
|
+
"type": "array",
|
|
293
|
+
"items": {
|
|
294
|
+
"type": "object"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"any": {
|
|
298
|
+
"type": "array",
|
|
299
|
+
"items": {
|
|
300
|
+
"type": "object"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"none": {
|
|
304
|
+
"type": "array",
|
|
305
|
+
"items": {
|
|
306
|
+
"type": "object"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"additionalProperties": false
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"required": [
|
|
314
|
+
"path",
|
|
315
|
+
"assert"
|
|
316
|
+
],
|
|
317
|
+
"additionalProperties": false
|
|
318
|
+
}
|
|
113
319
|
},
|
|
114
320
|
"assert_exit_code": {
|
|
115
321
|
"description": "Assert the exit code captured from a command node output.",
|
|
@@ -122,7 +328,22 @@
|
|
|
122
328
|
"intent": "Assert the exit code captured from a command node output"
|
|
123
329
|
}
|
|
124
330
|
}
|
|
125
|
-
]
|
|
331
|
+
],
|
|
332
|
+
"schema": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"properties": {
|
|
335
|
+
"source": {
|
|
336
|
+
"type": "string"
|
|
337
|
+
},
|
|
338
|
+
"node": {
|
|
339
|
+
"type": "string"
|
|
340
|
+
},
|
|
341
|
+
"expected": {
|
|
342
|
+
"type": "number"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"additionalProperties": false
|
|
346
|
+
}
|
|
126
347
|
},
|
|
127
348
|
"assert_output": {
|
|
128
349
|
"description": "Assert stdout or stderr captured from a command node output.",
|
|
@@ -136,7 +357,77 @@
|
|
|
136
357
|
"intent": "Assert stdout or stderr captured from a command node output"
|
|
137
358
|
}
|
|
138
359
|
}
|
|
139
|
-
]
|
|
360
|
+
],
|
|
361
|
+
"schema": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"properties": {
|
|
364
|
+
"source": {
|
|
365
|
+
"type": "string"
|
|
366
|
+
},
|
|
367
|
+
"node": {
|
|
368
|
+
"type": "string"
|
|
369
|
+
},
|
|
370
|
+
"stream": {
|
|
371
|
+
"type": "string"
|
|
372
|
+
},
|
|
373
|
+
"contains": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"match": {
|
|
377
|
+
"type": "string"
|
|
378
|
+
},
|
|
379
|
+
"assert": {
|
|
380
|
+
"type": "object",
|
|
381
|
+
"properties": {
|
|
382
|
+
"path": {
|
|
383
|
+
"type": "string"
|
|
384
|
+
},
|
|
385
|
+
"operator": {
|
|
386
|
+
"type": "string"
|
|
387
|
+
},
|
|
388
|
+
"value": {
|
|
389
|
+
"type": [
|
|
390
|
+
"string",
|
|
391
|
+
"number",
|
|
392
|
+
"integer",
|
|
393
|
+
"boolean",
|
|
394
|
+
"object",
|
|
395
|
+
"array"
|
|
396
|
+
],
|
|
397
|
+
"items": {
|
|
398
|
+
"type": [
|
|
399
|
+
"string",
|
|
400
|
+
"number",
|
|
401
|
+
"integer",
|
|
402
|
+
"boolean",
|
|
403
|
+
"object"
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"all": {
|
|
408
|
+
"type": "array",
|
|
409
|
+
"items": {
|
|
410
|
+
"type": "object"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"any": {
|
|
414
|
+
"type": "array",
|
|
415
|
+
"items": {
|
|
416
|
+
"type": "object"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"none": {
|
|
420
|
+
"type": "array",
|
|
421
|
+
"items": {
|
|
422
|
+
"type": "object"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"additionalProperties": false
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"additionalProperties": false
|
|
430
|
+
}
|
|
140
431
|
},
|
|
141
432
|
"app.status": {
|
|
142
433
|
"description": "Report the core checkout shape and headless compatibility mode for the perps controller.",
|
|
@@ -148,256 +439,21 @@
|
|
|
148
439
|
"next": "done"
|
|
149
440
|
}
|
|
150
441
|
}
|
|
151
|
-
]
|
|
442
|
+
],
|
|
443
|
+
"schema": {
|
|
444
|
+
"type": "object",
|
|
445
|
+
"properties": {},
|
|
446
|
+
"additionalProperties": false
|
|
447
|
+
}
|
|
152
448
|
},
|
|
153
449
|
"call": {
|
|
154
|
-
"description": "Invoke a named
|
|
450
|
+
"description": "Invoke a named recipe by ref and run its steps inline.",
|
|
155
451
|
"examples": [
|
|
156
452
|
{
|
|
157
453
|
"node": {
|
|
158
454
|
"action": "call",
|
|
159
455
|
"ref": "shared/setup",
|
|
160
|
-
"intent": "Run a shared
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
]
|
|
164
|
-
},
|
|
165
|
-
"metamask.wallet.list_accounts": {
|
|
166
|
-
"description": "List redacted headless fixture accounts available to Core controller actions.",
|
|
167
|
-
"examples": [
|
|
168
|
-
{
|
|
169
|
-
"description": "List configured Core accounts",
|
|
170
|
-
"node": {
|
|
171
|
-
"action": "metamask.wallet.list_accounts",
|
|
172
|
-
"intent": "Discover the accounts available to headless controller actions"
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
"metamask.perps.read_positions": {
|
|
178
|
-
"description": "Read live Perps positions directly from the perps controller (HyperLiquid testnet, HTTP read-only) and return the selected subset.",
|
|
179
|
-
"examples": [
|
|
180
|
-
{
|
|
181
|
-
"description": "Read every live position for the configured account",
|
|
182
|
-
"node": {
|
|
183
|
-
"action": "metamask.perps.read_positions",
|
|
184
|
-
"mode": "all",
|
|
185
|
-
"intent": "Read Perps positions from the headless controller"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
},
|
|
190
|
-
"metamask.perps.read_orders": {
|
|
191
|
-
"description": "Read live Perps open orders directly from the perps controller (HyperLiquid testnet, HTTP read-only) and return the selected subset.",
|
|
192
|
-
"examples": [
|
|
193
|
-
{
|
|
194
|
-
"description": "Read every live open order for the configured account",
|
|
195
|
-
"node": {
|
|
196
|
-
"action": "metamask.perps.read_orders",
|
|
197
|
-
"mode": "all",
|
|
198
|
-
"intent": "Read Perps open orders from the headless controller"
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
},
|
|
203
|
-
"metamask.perps.read_account": {
|
|
204
|
-
"description": "Read live Perps account state (balances, margin) directly from the perps controller (HyperLiquid testnet, HTTP read-only).",
|
|
205
|
-
"examples": [
|
|
206
|
-
{
|
|
207
|
-
"description": "Read account state for the configured account",
|
|
208
|
-
"node": {
|
|
209
|
-
"action": "metamask.perps.read_account",
|
|
210
|
-
"intent": "Read Perps account state from the headless controller"
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
},
|
|
215
|
-
"metamask.perps.place_order": {
|
|
216
|
-
"description": "Place a real Perps order on HyperLiquid testnet by driving the headless perps controller placeOrder() through the full signing/provider path. Testnet only Supports market (default) and resting limit orders (order_type=limit with price/offset_pct). The network field in examples is an authoring convention: only start_state/teardown_state enforce the network (ensureNetwork); the mutation handlers themselves do not read it.",
|
|
217
|
-
"examples": [
|
|
218
|
-
{
|
|
219
|
-
"description": "Place a small BTC long market order on testnet",
|
|
220
|
-
"node": {
|
|
221
|
-
"action": "metamask.perps.place_order",
|
|
222
|
-
"market": "BTC",
|
|
223
|
-
"side": "long",
|
|
224
|
-
"notional": "11",
|
|
225
|
-
"leverage": 2,
|
|
226
|
-
"intent": "Place the requested Perps order via the headless controller",
|
|
227
|
-
"network": "testnet"
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"description": "Place a resting BTC limit BUY 30%% below mid on testnet (does not fill)",
|
|
232
|
-
"node": {
|
|
233
|
-
"action": "metamask.perps.place_order",
|
|
234
|
-
"market": "BTC",
|
|
235
|
-
"side": "long",
|
|
236
|
-
"order_type": "limit",
|
|
237
|
-
"offset_pct": -30,
|
|
238
|
-
"notional": "11",
|
|
239
|
-
"leverage": 2,
|
|
240
|
-
"intent": "Place a resting Perps limit order via the headless controller",
|
|
241
|
-
"network": "testnet"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
]
|
|
245
|
-
},
|
|
246
|
-
"metamask.perps.close_positions": {
|
|
247
|
-
"description": "Close selected live Perps positions on HyperLiquid testnet by driving the headless perps controller closePosition() through the full signing/provider path. Testnet only. The network field in examples is an authoring convention: only start_state/teardown_state enforce the network (ensureNetwork); the mutation handlers themselves do not read it.",
|
|
248
|
-
"examples": [
|
|
249
|
-
{
|
|
250
|
-
"description": "Close the BTC position on testnet",
|
|
251
|
-
"node": {
|
|
252
|
-
"action": "metamask.perps.close_positions",
|
|
253
|
-
"market": "BTC",
|
|
254
|
-
"intent": "Close selected Perps positions via the headless controller",
|
|
255
|
-
"network": "testnet"
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
]
|
|
259
|
-
},
|
|
260
|
-
"metamask.perps.assert_positions": {
|
|
261
|
-
"description": "Assert selected live Perps positions are present or absent via the headless controller standalone read path. Throws on mismatch.",
|
|
262
|
-
"examples": [
|
|
263
|
-
{
|
|
264
|
-
"description": "Assert BTC position is open",
|
|
265
|
-
"node": {
|
|
266
|
-
"action": "metamask.perps.assert_positions",
|
|
267
|
-
"state": "open",
|
|
268
|
-
"market": "BTC",
|
|
269
|
-
"intent": "Assert the expected Perps position state via the headless controller"
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
]
|
|
273
|
-
},
|
|
274
|
-
"metamask.perps.ensure_positions": {
|
|
275
|
-
"description": "Higher-level wrapper that reads selected positions, places or closes via the headless controller as needed, then asserts the final position state. Testnet only. The network field in examples is an authoring convention: only start_state/teardown_state enforce the network (ensureNetwork); the mutation handlers themselves do not read it.",
|
|
276
|
-
"examples": [
|
|
277
|
-
{
|
|
278
|
-
"description": "Ensure no BTC position before the proof window",
|
|
279
|
-
"node": {
|
|
280
|
-
"action": "metamask.perps.ensure_positions",
|
|
281
|
-
"state": "none",
|
|
282
|
-
"market": "BTC",
|
|
283
|
-
"intent": "Converge Perps positions to the requested state via the headless controller",
|
|
284
|
-
"network": "testnet"
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
]
|
|
288
|
-
},
|
|
289
|
-
"metamask.perps.close_orders": {
|
|
290
|
-
"description": "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. The network field in examples is an authoring convention: only start_state/teardown_state enforce the network (ensureNetwork); the mutation handlers themselves do not read it.",
|
|
291
|
-
"examples": [
|
|
292
|
-
{
|
|
293
|
-
"description": "Cancel every open order",
|
|
294
|
-
"node": {
|
|
295
|
-
"action": "metamask.perps.close_orders",
|
|
296
|
-
"mode": "all",
|
|
297
|
-
"intent": "Cancel selected Perps orders before continuing",
|
|
298
|
-
"network": "testnet"
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"description": "Cancel BTC orders only",
|
|
303
|
-
"node": {
|
|
304
|
-
"action": "metamask.perps.close_orders",
|
|
305
|
-
"market": "BTC",
|
|
306
|
-
"intent": "Cancel selected Perps orders before continuing",
|
|
307
|
-
"network": "testnet"
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
]
|
|
311
|
-
},
|
|
312
|
-
"metamask.perps.assert_orders": {
|
|
313
|
-
"description": "Assert selected live Perps open orders are present or absent.",
|
|
314
|
-
"examples": [
|
|
315
|
-
{
|
|
316
|
-
"description": "Assert no BTC open orders",
|
|
317
|
-
"node": {
|
|
318
|
-
"action": "metamask.perps.assert_orders",
|
|
319
|
-
"state": "none",
|
|
320
|
-
"market": "BTC",
|
|
321
|
-
"intent": "Assert the expected Perps open order state"
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
]
|
|
325
|
-
},
|
|
326
|
-
"metamask.perps.ensure_orders": {
|
|
327
|
-
"description": "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. The network field in examples is an authoring convention: only start_state/teardown_state enforce the network (ensureNetwork); the mutation handlers themselves do not read it.",
|
|
328
|
-
"examples": [
|
|
329
|
-
{
|
|
330
|
-
"description": "Ensure no open orders before proof window",
|
|
331
|
-
"node": {
|
|
332
|
-
"action": "metamask.perps.ensure_orders",
|
|
333
|
-
"state": "none",
|
|
334
|
-
"mode": "all",
|
|
335
|
-
"intent": "Converge Perps orders to the requested state",
|
|
336
|
-
"network": "testnet"
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
]
|
|
340
|
-
},
|
|
341
|
-
"metamask.perps.start_state": {
|
|
342
|
-
"description": "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. Headless: converges POSITION and ORDER baselines on testnet via the controller; no navigation/page/HUD.",
|
|
343
|
-
"examples": [
|
|
344
|
-
{
|
|
345
|
-
"description": "Clean BTC testnet market state",
|
|
346
|
-
"node": {
|
|
347
|
-
"action": "metamask.perps.start_state",
|
|
348
|
-
"profile": "clean_market_testnet",
|
|
349
|
-
"market": "BTC",
|
|
350
|
-
"positions": {
|
|
351
|
-
"state": "none"
|
|
352
|
-
},
|
|
353
|
-
"orders": {
|
|
354
|
-
"state": "none"
|
|
355
|
-
},
|
|
356
|
-
"intent": "Prepare the Perps start state for the proof",
|
|
357
|
-
"network": "testnet"
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"description": "Start with an open ETH long position",
|
|
362
|
-
"node": {
|
|
363
|
-
"action": "metamask.perps.start_state",
|
|
364
|
-
"profile": "open_position_testnet",
|
|
365
|
-
"market": "ETH",
|
|
366
|
-
"side": "long",
|
|
367
|
-
"positions": {
|
|
368
|
-
"state": "open",
|
|
369
|
-
"notional": "10",
|
|
370
|
-
"leverage": 2
|
|
371
|
-
},
|
|
372
|
-
"intent": "Prepare the Perps start state for the proof",
|
|
373
|
-
"network": "testnet"
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
]
|
|
377
|
-
},
|
|
378
|
-
"metamask.perps.teardown_state": {
|
|
379
|
-
"description": "Recommended configurable Perps teardown state that restores the selected environment after proof. Headless: converges POSITION and ORDER baselines on testnet via the controller; no navigation/page/HUD.",
|
|
380
|
-
"examples": [
|
|
381
|
-
{
|
|
382
|
-
"description": "Return BTC test account to clean state",
|
|
383
|
-
"node": {
|
|
384
|
-
"action": "metamask.perps.teardown_state",
|
|
385
|
-
"market": "BTC",
|
|
386
|
-
"positions": {
|
|
387
|
-
"state": "none"
|
|
388
|
-
},
|
|
389
|
-
"orders": {
|
|
390
|
-
"state": "none"
|
|
391
|
-
},
|
|
392
|
-
"intent": "Restore Perps state after the proof"
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"description": "Teardown only state created by selected market",
|
|
397
|
-
"node": {
|
|
398
|
-
"action": "metamask.perps.teardown_state",
|
|
399
|
-
"market": "BTC",
|
|
400
|
-
"intent": "Restore Perps state after the proof"
|
|
456
|
+
"intent": "Run a shared recipe"
|
|
401
457
|
}
|
|
402
458
|
}
|
|
403
459
|
]
|
|
@@ -411,11 +467,9 @@
|
|
|
411
467
|
"schema": {
|
|
412
468
|
"type": "object",
|
|
413
469
|
"properties": {
|
|
414
|
-
"action": {
|
|
415
|
-
"const": "metamask.wallet.list_accounts"
|
|
416
|
-
},
|
|
417
470
|
"scope": {
|
|
418
471
|
"type": "string",
|
|
472
|
+
"default": "named",
|
|
419
473
|
"enum": [
|
|
420
474
|
"selected",
|
|
421
475
|
"named",
|
|
@@ -426,6 +480,7 @@
|
|
|
426
480
|
},
|
|
427
481
|
"account": {
|
|
428
482
|
"type": "string",
|
|
483
|
+
"default": "dev1",
|
|
429
484
|
"description": "Optional account name to mark as selected for the next controller operation; defaults to dev1."
|
|
430
485
|
},
|
|
431
486
|
"account_name": {
|
|
@@ -433,9 +488,7 @@
|
|
|
433
488
|
"description": "Alias for account."
|
|
434
489
|
}
|
|
435
490
|
},
|
|
436
|
-
"
|
|
437
|
-
"action"
|
|
438
|
-
]
|
|
491
|
+
"additionalProperties": false
|
|
439
492
|
},
|
|
440
493
|
"examples": [
|
|
441
494
|
{
|
|
@@ -447,18 +500,16 @@
|
|
|
447
500
|
}
|
|
448
501
|
],
|
|
449
502
|
"proof_effect": "Records the redacted addresses derived from the same wallet fixture used by headless controller actions.",
|
|
450
|
-
"safety_notes": "Read-only fixture metadata; must never return private keys, mnemonics, passwords, or vault data."
|
|
503
|
+
"safety_notes": "Read-only fixture metadata; must never return private keys, mnemonics, passwords, or vault data.",
|
|
504
|
+
"execution_capabilities": []
|
|
451
505
|
},
|
|
452
506
|
{
|
|
453
507
|
"name": "metamask.perps.read_positions",
|
|
454
508
|
"owner": "metamask",
|
|
455
|
-
"description": "core Read live Perps positions directly from the
|
|
509
|
+
"description": "core Read live Perps positions directly from the Perps controller; without a selector, return all live positions.",
|
|
456
510
|
"schema": {
|
|
457
511
|
"type": "object",
|
|
458
512
|
"properties": {
|
|
459
|
-
"action": {
|
|
460
|
-
"const": "metamask.perps.read_positions"
|
|
461
|
-
},
|
|
462
513
|
"market": {
|
|
463
514
|
"type": "string",
|
|
464
515
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -491,7 +542,41 @@
|
|
|
491
542
|
},
|
|
492
543
|
"selector": {
|
|
493
544
|
"type": "object",
|
|
494
|
-
"
|
|
545
|
+
"properties": {
|
|
546
|
+
"mode": {
|
|
547
|
+
"type": "string",
|
|
548
|
+
"enum": [
|
|
549
|
+
"matching",
|
|
550
|
+
"all"
|
|
551
|
+
]
|
|
552
|
+
},
|
|
553
|
+
"market": {
|
|
554
|
+
"type": "string"
|
|
555
|
+
},
|
|
556
|
+
"symbol": {
|
|
557
|
+
"type": "string"
|
|
558
|
+
},
|
|
559
|
+
"markets": {
|
|
560
|
+
"type": "array",
|
|
561
|
+
"items": {
|
|
562
|
+
"type": "string"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"symbols": {
|
|
566
|
+
"type": "array",
|
|
567
|
+
"items": {
|
|
568
|
+
"type": "string"
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"side": {
|
|
572
|
+
"type": "string",
|
|
573
|
+
"enum": [
|
|
574
|
+
"long",
|
|
575
|
+
"short"
|
|
576
|
+
]
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"additionalProperties": false
|
|
495
580
|
},
|
|
496
581
|
"side": {
|
|
497
582
|
"type": "string",
|
|
@@ -505,13 +590,20 @@
|
|
|
505
590
|
"type": "string",
|
|
506
591
|
"description": "EVM address to read positions for; defaults to the canonical wallet fixture account."
|
|
507
592
|
},
|
|
593
|
+
"network": {
|
|
594
|
+
"type": "string",
|
|
595
|
+
"enum": [
|
|
596
|
+
"testnet",
|
|
597
|
+
"mainnet"
|
|
598
|
+
],
|
|
599
|
+
"default": "testnet",
|
|
600
|
+
"description": "Controller network for this isolated Core read."
|
|
601
|
+
},
|
|
508
602
|
"timeout_ms": {
|
|
509
603
|
"type": "number"
|
|
510
604
|
}
|
|
511
605
|
},
|
|
512
|
-
"
|
|
513
|
-
"action"
|
|
514
|
-
]
|
|
606
|
+
"additionalProperties": false
|
|
515
607
|
},
|
|
516
608
|
"examples": [
|
|
517
609
|
{
|
|
@@ -524,18 +616,16 @@
|
|
|
524
616
|
}
|
|
525
617
|
],
|
|
526
618
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or controller output.",
|
|
527
|
-
"safety_notes": "Read-only HyperLiquid
|
|
619
|
+
"safety_notes": "Read-only HyperLiquid query on the explicitly selected network; must not inject controller/UI state to fabricate proof.",
|
|
620
|
+
"execution_capabilities": []
|
|
528
621
|
},
|
|
529
622
|
{
|
|
530
623
|
"name": "metamask.perps.read_orders",
|
|
531
624
|
"owner": "metamask",
|
|
532
|
-
"description": "core Read live Perps open orders directly from the
|
|
625
|
+
"description": "core Read live Perps open orders directly from the Perps controller; without a selector, return all live orders.",
|
|
533
626
|
"schema": {
|
|
534
627
|
"type": "object",
|
|
535
628
|
"properties": {
|
|
536
|
-
"action": {
|
|
537
|
-
"const": "metamask.perps.read_orders"
|
|
538
|
-
},
|
|
539
629
|
"market": {
|
|
540
630
|
"type": "string",
|
|
541
631
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -568,7 +658,41 @@
|
|
|
568
658
|
},
|
|
569
659
|
"selector": {
|
|
570
660
|
"type": "object",
|
|
571
|
-
"
|
|
661
|
+
"properties": {
|
|
662
|
+
"mode": {
|
|
663
|
+
"type": "string",
|
|
664
|
+
"enum": [
|
|
665
|
+
"matching",
|
|
666
|
+
"all"
|
|
667
|
+
]
|
|
668
|
+
},
|
|
669
|
+
"market": {
|
|
670
|
+
"type": "string"
|
|
671
|
+
},
|
|
672
|
+
"symbol": {
|
|
673
|
+
"type": "string"
|
|
674
|
+
},
|
|
675
|
+
"markets": {
|
|
676
|
+
"type": "array",
|
|
677
|
+
"items": {
|
|
678
|
+
"type": "string"
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
"symbols": {
|
|
682
|
+
"type": "array",
|
|
683
|
+
"items": {
|
|
684
|
+
"type": "string"
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
"side": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"enum": [
|
|
690
|
+
"long",
|
|
691
|
+
"short"
|
|
692
|
+
]
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"additionalProperties": false
|
|
572
696
|
},
|
|
573
697
|
"side": {
|
|
574
698
|
"type": "string",
|
|
@@ -582,13 +706,20 @@
|
|
|
582
706
|
"type": "string",
|
|
583
707
|
"description": "EVM address to read orders for; defaults to the canonical wallet fixture account."
|
|
584
708
|
},
|
|
709
|
+
"network": {
|
|
710
|
+
"type": "string",
|
|
711
|
+
"enum": [
|
|
712
|
+
"testnet",
|
|
713
|
+
"mainnet"
|
|
714
|
+
],
|
|
715
|
+
"default": "testnet",
|
|
716
|
+
"description": "Controller network for this isolated Core read."
|
|
717
|
+
},
|
|
585
718
|
"timeout_ms": {
|
|
586
719
|
"type": "number"
|
|
587
720
|
}
|
|
588
721
|
},
|
|
589
|
-
"
|
|
590
|
-
"action"
|
|
591
|
-
]
|
|
722
|
+
"additionalProperties": false
|
|
592
723
|
},
|
|
593
724
|
"examples": [
|
|
594
725
|
{
|
|
@@ -601,7 +732,8 @@
|
|
|
601
732
|
}
|
|
602
733
|
],
|
|
603
734
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or controller output.",
|
|
604
|
-
"safety_notes": "Read-only HyperLiquid
|
|
735
|
+
"safety_notes": "Read-only HyperLiquid query on the explicitly selected network; must not inject controller/UI state to fabricate proof.",
|
|
736
|
+
"execution_capabilities": []
|
|
605
737
|
},
|
|
606
738
|
{
|
|
607
739
|
"name": "metamask.perps.read_account",
|
|
@@ -610,9 +742,6 @@
|
|
|
610
742
|
"schema": {
|
|
611
743
|
"type": "object",
|
|
612
744
|
"properties": {
|
|
613
|
-
"action": {
|
|
614
|
-
"const": "metamask.perps.read_account"
|
|
615
|
-
},
|
|
616
745
|
"account": {
|
|
617
746
|
"type": "string",
|
|
618
747
|
"description": "EVM address to read account state for; defaults to the canonical wallet fixture account."
|
|
@@ -621,9 +750,7 @@
|
|
|
621
750
|
"type": "number"
|
|
622
751
|
}
|
|
623
752
|
},
|
|
624
|
-
"
|
|
625
|
-
"action"
|
|
626
|
-
]
|
|
753
|
+
"additionalProperties": false
|
|
627
754
|
},
|
|
628
755
|
"examples": [
|
|
629
756
|
{
|
|
@@ -635,7 +762,8 @@
|
|
|
635
762
|
}
|
|
636
763
|
],
|
|
637
764
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or controller output.",
|
|
638
|
-
"safety_notes": "Read-only HyperLiquid testnet HTTP query; must not inject controller/UI state to fabricate proof."
|
|
765
|
+
"safety_notes": "Read-only HyperLiquid testnet HTTP query; must not inject controller/UI state to fabricate proof.",
|
|
766
|
+
"execution_capabilities": []
|
|
639
767
|
},
|
|
640
768
|
{
|
|
641
769
|
"name": "metamask.perps.place_order",
|
|
@@ -644,9 +772,6 @@
|
|
|
644
772
|
"schema": {
|
|
645
773
|
"type": "object",
|
|
646
774
|
"properties": {
|
|
647
|
-
"action": {
|
|
648
|
-
"const": "metamask.perps.place_order"
|
|
649
|
-
},
|
|
650
775
|
"market": {
|
|
651
776
|
"type": "string",
|
|
652
777
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -671,7 +796,41 @@
|
|
|
671
796
|
},
|
|
672
797
|
"selector": {
|
|
673
798
|
"type": "object",
|
|
674
|
-
"
|
|
799
|
+
"properties": {
|
|
800
|
+
"mode": {
|
|
801
|
+
"type": "string",
|
|
802
|
+
"enum": [
|
|
803
|
+
"matching",
|
|
804
|
+
"all"
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
"market": {
|
|
808
|
+
"type": "string"
|
|
809
|
+
},
|
|
810
|
+
"symbol": {
|
|
811
|
+
"type": "string"
|
|
812
|
+
},
|
|
813
|
+
"markets": {
|
|
814
|
+
"type": "array",
|
|
815
|
+
"items": {
|
|
816
|
+
"type": "string"
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
"symbols": {
|
|
820
|
+
"type": "array",
|
|
821
|
+
"items": {
|
|
822
|
+
"type": "string"
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"side": {
|
|
826
|
+
"type": "string",
|
|
827
|
+
"enum": [
|
|
828
|
+
"long",
|
|
829
|
+
"short"
|
|
830
|
+
]
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
"additionalProperties": false
|
|
675
834
|
},
|
|
676
835
|
"side": {
|
|
677
836
|
"type": "string",
|
|
@@ -706,7 +865,8 @@
|
|
|
706
865
|
"description": "USD notional alias."
|
|
707
866
|
},
|
|
708
867
|
"leverage": {
|
|
709
|
-
"type": "number"
|
|
868
|
+
"type": "number",
|
|
869
|
+
"default": 3
|
|
710
870
|
},
|
|
711
871
|
"account": {
|
|
712
872
|
"type": "string",
|
|
@@ -716,9 +876,7 @@
|
|
|
716
876
|
"type": "number"
|
|
717
877
|
}
|
|
718
878
|
},
|
|
719
|
-
"
|
|
720
|
-
"action"
|
|
721
|
-
]
|
|
879
|
+
"additionalProperties": false
|
|
722
880
|
},
|
|
723
881
|
"examples": [
|
|
724
882
|
{
|
|
@@ -729,8 +887,7 @@
|
|
|
729
887
|
"side": "long",
|
|
730
888
|
"notional": "11",
|
|
731
889
|
"leverage": 2,
|
|
732
|
-
"intent": "Place the requested Perps order via the headless controller"
|
|
733
|
-
"network": "testnet"
|
|
890
|
+
"intent": "Place the requested Perps order via the headless controller"
|
|
734
891
|
}
|
|
735
892
|
},
|
|
736
893
|
{
|
|
@@ -743,13 +900,16 @@
|
|
|
743
900
|
"offset_pct": -30,
|
|
744
901
|
"notional": "11",
|
|
745
902
|
"leverage": 2,
|
|
746
|
-
"intent": "Place a resting Perps limit order via the headless controller"
|
|
747
|
-
"network": "testnet"
|
|
903
|
+
"intent": "Place a resting Perps limit order via the headless controller"
|
|
748
904
|
}
|
|
749
905
|
}
|
|
750
906
|
],
|
|
751
907
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or controller output (order id, opened position).",
|
|
752
|
-
"safety_notes": "Submits a REAL signed order to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof."
|
|
908
|
+
"safety_notes": "Submits a REAL signed order to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof.",
|
|
909
|
+
"execution_capabilities": [
|
|
910
|
+
"app-mutation",
|
|
911
|
+
"external-mutation"
|
|
912
|
+
]
|
|
753
913
|
},
|
|
754
914
|
{
|
|
755
915
|
"name": "metamask.perps.close_positions",
|
|
@@ -758,9 +918,6 @@
|
|
|
758
918
|
"schema": {
|
|
759
919
|
"type": "object",
|
|
760
920
|
"properties": {
|
|
761
|
-
"action": {
|
|
762
|
-
"const": "metamask.perps.close_positions"
|
|
763
|
-
},
|
|
764
921
|
"market": {
|
|
765
922
|
"type": "string",
|
|
766
923
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -793,7 +950,41 @@
|
|
|
793
950
|
},
|
|
794
951
|
"selector": {
|
|
795
952
|
"type": "object",
|
|
796
|
-
"
|
|
953
|
+
"properties": {
|
|
954
|
+
"mode": {
|
|
955
|
+
"type": "string",
|
|
956
|
+
"enum": [
|
|
957
|
+
"matching",
|
|
958
|
+
"all"
|
|
959
|
+
]
|
|
960
|
+
},
|
|
961
|
+
"market": {
|
|
962
|
+
"type": "string"
|
|
963
|
+
},
|
|
964
|
+
"symbol": {
|
|
965
|
+
"type": "string"
|
|
966
|
+
},
|
|
967
|
+
"markets": {
|
|
968
|
+
"type": "array",
|
|
969
|
+
"items": {
|
|
970
|
+
"type": "string"
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
"symbols": {
|
|
974
|
+
"type": "array",
|
|
975
|
+
"items": {
|
|
976
|
+
"type": "string"
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
"side": {
|
|
980
|
+
"type": "string",
|
|
981
|
+
"enum": [
|
|
982
|
+
"long",
|
|
983
|
+
"short"
|
|
984
|
+
]
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"additionalProperties": false
|
|
797
988
|
},
|
|
798
989
|
"side": {
|
|
799
990
|
"type": "string",
|
|
@@ -811,9 +1002,7 @@
|
|
|
811
1002
|
"type": "number"
|
|
812
1003
|
}
|
|
813
1004
|
},
|
|
814
|
-
"
|
|
815
|
-
"action"
|
|
816
|
-
]
|
|
1005
|
+
"additionalProperties": false
|
|
817
1006
|
},
|
|
818
1007
|
"examples": [
|
|
819
1008
|
{
|
|
@@ -821,24 +1010,24 @@
|
|
|
821
1010
|
"node": {
|
|
822
1011
|
"action": "metamask.perps.close_positions",
|
|
823
1012
|
"market": "BTC",
|
|
824
|
-
"intent": "Close selected Perps positions via the headless controller"
|
|
825
|
-
"network": "testnet"
|
|
1013
|
+
"intent": "Close selected Perps positions via the headless controller"
|
|
826
1014
|
}
|
|
827
1015
|
}
|
|
828
1016
|
],
|
|
829
1017
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or controller output (positions absent after close).",
|
|
830
|
-
"safety_notes": "Submits REAL signed close orders to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof."
|
|
1018
|
+
"safety_notes": "Submits REAL signed close orders to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof.",
|
|
1019
|
+
"execution_capabilities": [
|
|
1020
|
+
"app-mutation",
|
|
1021
|
+
"external-mutation"
|
|
1022
|
+
]
|
|
831
1023
|
},
|
|
832
1024
|
{
|
|
833
1025
|
"name": "metamask.perps.assert_positions",
|
|
834
1026
|
"owner": "metamask",
|
|
835
|
-
"description": "core Assert
|
|
1027
|
+
"description": "core Assert live Perps positions are present or absent for an explicit market selection or mode=all.",
|
|
836
1028
|
"schema": {
|
|
837
1029
|
"type": "object",
|
|
838
1030
|
"properties": {
|
|
839
|
-
"action": {
|
|
840
|
-
"const": "metamask.perps.assert_positions"
|
|
841
|
-
},
|
|
842
1031
|
"market": {
|
|
843
1032
|
"type": "string",
|
|
844
1033
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -871,7 +1060,41 @@
|
|
|
871
1060
|
},
|
|
872
1061
|
"selector": {
|
|
873
1062
|
"type": "object",
|
|
874
|
-
"
|
|
1063
|
+
"properties": {
|
|
1064
|
+
"mode": {
|
|
1065
|
+
"type": "string",
|
|
1066
|
+
"enum": [
|
|
1067
|
+
"matching",
|
|
1068
|
+
"all"
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
"market": {
|
|
1072
|
+
"type": "string"
|
|
1073
|
+
},
|
|
1074
|
+
"symbol": {
|
|
1075
|
+
"type": "string"
|
|
1076
|
+
},
|
|
1077
|
+
"markets": {
|
|
1078
|
+
"type": "array",
|
|
1079
|
+
"items": {
|
|
1080
|
+
"type": "string"
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
"symbols": {
|
|
1084
|
+
"type": "array",
|
|
1085
|
+
"items": {
|
|
1086
|
+
"type": "string"
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
"side": {
|
|
1090
|
+
"type": "string",
|
|
1091
|
+
"enum": [
|
|
1092
|
+
"long",
|
|
1093
|
+
"short"
|
|
1094
|
+
]
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
"additionalProperties": false
|
|
875
1098
|
},
|
|
876
1099
|
"side": {
|
|
877
1100
|
"type": "string",
|
|
@@ -896,13 +1119,23 @@
|
|
|
896
1119
|
"type": "string",
|
|
897
1120
|
"description": "EVM address to read for; defaults to the canonical wallet fixture account."
|
|
898
1121
|
},
|
|
1122
|
+
"network": {
|
|
1123
|
+
"type": "string",
|
|
1124
|
+
"enum": [
|
|
1125
|
+
"testnet",
|
|
1126
|
+
"mainnet"
|
|
1127
|
+
],
|
|
1128
|
+
"default": "testnet",
|
|
1129
|
+
"description": "Controller network for this isolated Core assertion."
|
|
1130
|
+
},
|
|
899
1131
|
"timeout_ms": {
|
|
900
1132
|
"type": "number"
|
|
901
1133
|
}
|
|
902
1134
|
},
|
|
903
1135
|
"required": [
|
|
904
|
-
"
|
|
905
|
-
]
|
|
1136
|
+
"state"
|
|
1137
|
+
],
|
|
1138
|
+
"additionalProperties": false
|
|
906
1139
|
},
|
|
907
1140
|
"examples": [
|
|
908
1141
|
{
|
|
@@ -916,7 +1149,8 @@
|
|
|
916
1149
|
}
|
|
917
1150
|
],
|
|
918
1151
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or controller output.",
|
|
919
|
-
"safety_notes": "Read-only HyperLiquid
|
|
1152
|
+
"safety_notes": "Read-only HyperLiquid query on the explicitly selected network; must not inject controller state to fabricate proof.",
|
|
1153
|
+
"execution_capabilities": []
|
|
920
1154
|
},
|
|
921
1155
|
{
|
|
922
1156
|
"name": "metamask.perps.ensure_positions",
|
|
@@ -925,9 +1159,6 @@
|
|
|
925
1159
|
"schema": {
|
|
926
1160
|
"type": "object",
|
|
927
1161
|
"properties": {
|
|
928
|
-
"action": {
|
|
929
|
-
"const": "metamask.perps.ensure_positions"
|
|
930
|
-
},
|
|
931
1162
|
"market": {
|
|
932
1163
|
"type": "string",
|
|
933
1164
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -960,7 +1191,41 @@
|
|
|
960
1191
|
},
|
|
961
1192
|
"selector": {
|
|
962
1193
|
"type": "object",
|
|
963
|
-
"
|
|
1194
|
+
"properties": {
|
|
1195
|
+
"mode": {
|
|
1196
|
+
"type": "string",
|
|
1197
|
+
"enum": [
|
|
1198
|
+
"matching",
|
|
1199
|
+
"all"
|
|
1200
|
+
]
|
|
1201
|
+
},
|
|
1202
|
+
"market": {
|
|
1203
|
+
"type": "string"
|
|
1204
|
+
},
|
|
1205
|
+
"symbol": {
|
|
1206
|
+
"type": "string"
|
|
1207
|
+
},
|
|
1208
|
+
"markets": {
|
|
1209
|
+
"type": "array",
|
|
1210
|
+
"items": {
|
|
1211
|
+
"type": "string"
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
"symbols": {
|
|
1215
|
+
"type": "array",
|
|
1216
|
+
"items": {
|
|
1217
|
+
"type": "string"
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
"side": {
|
|
1221
|
+
"type": "string",
|
|
1222
|
+
"enum": [
|
|
1223
|
+
"long",
|
|
1224
|
+
"short"
|
|
1225
|
+
]
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
"additionalProperties": false
|
|
964
1229
|
},
|
|
965
1230
|
"side": {
|
|
966
1231
|
"type": "string",
|
|
@@ -1001,8 +1266,9 @@
|
|
|
1001
1266
|
}
|
|
1002
1267
|
},
|
|
1003
1268
|
"required": [
|
|
1004
|
-
"
|
|
1005
|
-
]
|
|
1269
|
+
"state"
|
|
1270
|
+
],
|
|
1271
|
+
"additionalProperties": false
|
|
1006
1272
|
},
|
|
1007
1273
|
"examples": [
|
|
1008
1274
|
{
|
|
@@ -1011,13 +1277,16 @@
|
|
|
1011
1277
|
"action": "metamask.perps.ensure_positions",
|
|
1012
1278
|
"state": "none",
|
|
1013
1279
|
"market": "BTC",
|
|
1014
|
-
"intent": "Converge Perps positions to the requested state via the headless controller"
|
|
1015
|
-
"network": "testnet"
|
|
1280
|
+
"intent": "Converge Perps positions to the requested state via the headless controller"
|
|
1016
1281
|
}
|
|
1017
1282
|
}
|
|
1018
1283
|
],
|
|
1019
1284
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or controller output.",
|
|
1020
|
-
"safety_notes": "May submit REAL signed orders to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof."
|
|
1285
|
+
"safety_notes": "May submit REAL signed orders to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof.",
|
|
1286
|
+
"execution_capabilities": [
|
|
1287
|
+
"app-mutation",
|
|
1288
|
+
"external-mutation"
|
|
1289
|
+
]
|
|
1021
1290
|
},
|
|
1022
1291
|
{
|
|
1023
1292
|
"name": "metamask.perps.close_orders",
|
|
@@ -1026,9 +1295,6 @@
|
|
|
1026
1295
|
"schema": {
|
|
1027
1296
|
"type": "object",
|
|
1028
1297
|
"properties": {
|
|
1029
|
-
"action": {
|
|
1030
|
-
"const": "metamask.perps.close_orders"
|
|
1031
|
-
},
|
|
1032
1298
|
"market": {
|
|
1033
1299
|
"type": "string",
|
|
1034
1300
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -1061,7 +1327,41 @@
|
|
|
1061
1327
|
},
|
|
1062
1328
|
"selector": {
|
|
1063
1329
|
"type": "object",
|
|
1064
|
-
"
|
|
1330
|
+
"properties": {
|
|
1331
|
+
"mode": {
|
|
1332
|
+
"type": "string",
|
|
1333
|
+
"enum": [
|
|
1334
|
+
"matching",
|
|
1335
|
+
"all"
|
|
1336
|
+
]
|
|
1337
|
+
},
|
|
1338
|
+
"market": {
|
|
1339
|
+
"type": "string"
|
|
1340
|
+
},
|
|
1341
|
+
"symbol": {
|
|
1342
|
+
"type": "string"
|
|
1343
|
+
},
|
|
1344
|
+
"markets": {
|
|
1345
|
+
"type": "array",
|
|
1346
|
+
"items": {
|
|
1347
|
+
"type": "string"
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
"symbols": {
|
|
1351
|
+
"type": "array",
|
|
1352
|
+
"items": {
|
|
1353
|
+
"type": "string"
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
"side": {
|
|
1357
|
+
"type": "string",
|
|
1358
|
+
"enum": [
|
|
1359
|
+
"long",
|
|
1360
|
+
"short"
|
|
1361
|
+
]
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
"additionalProperties": false
|
|
1065
1365
|
},
|
|
1066
1366
|
"side": {
|
|
1067
1367
|
"type": "string",
|
|
@@ -1075,9 +1375,7 @@
|
|
|
1075
1375
|
"type": "number"
|
|
1076
1376
|
}
|
|
1077
1377
|
},
|
|
1078
|
-
"
|
|
1079
|
-
"action"
|
|
1080
|
-
]
|
|
1378
|
+
"additionalProperties": false
|
|
1081
1379
|
},
|
|
1082
1380
|
"examples": [
|
|
1083
1381
|
{
|
|
@@ -1085,8 +1383,7 @@
|
|
|
1085
1383
|
"node": {
|
|
1086
1384
|
"action": "metamask.perps.close_orders",
|
|
1087
1385
|
"mode": "all",
|
|
1088
|
-
"intent": "Cancel selected Perps orders before continuing"
|
|
1089
|
-
"network": "testnet"
|
|
1386
|
+
"intent": "Cancel selected Perps orders before continuing"
|
|
1090
1387
|
}
|
|
1091
1388
|
},
|
|
1092
1389
|
{
|
|
@@ -1094,24 +1391,24 @@
|
|
|
1094
1391
|
"node": {
|
|
1095
1392
|
"action": "metamask.perps.close_orders",
|
|
1096
1393
|
"market": "BTC",
|
|
1097
|
-
"intent": "Cancel selected Perps orders before continuing"
|
|
1098
|
-
"network": "testnet"
|
|
1394
|
+
"intent": "Cancel selected Perps orders before continuing"
|
|
1099
1395
|
}
|
|
1100
1396
|
}
|
|
1101
1397
|
],
|
|
1102
1398
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1103
|
-
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
1399
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof.",
|
|
1400
|
+
"execution_capabilities": [
|
|
1401
|
+
"app-mutation",
|
|
1402
|
+
"external-mutation"
|
|
1403
|
+
]
|
|
1104
1404
|
},
|
|
1105
1405
|
{
|
|
1106
1406
|
"name": "metamask.perps.assert_orders",
|
|
1107
1407
|
"owner": "metamask",
|
|
1108
|
-
"description": "core Assert
|
|
1408
|
+
"description": "core Assert live Perps open orders are present or absent for an explicit market selection or mode=all.",
|
|
1109
1409
|
"schema": {
|
|
1110
1410
|
"type": "object",
|
|
1111
1411
|
"properties": {
|
|
1112
|
-
"action": {
|
|
1113
|
-
"const": "metamask.perps.assert_orders"
|
|
1114
|
-
},
|
|
1115
1412
|
"market": {
|
|
1116
1413
|
"type": "string",
|
|
1117
1414
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -1144,7 +1441,41 @@
|
|
|
1144
1441
|
},
|
|
1145
1442
|
"selector": {
|
|
1146
1443
|
"type": "object",
|
|
1147
|
-
"
|
|
1444
|
+
"properties": {
|
|
1445
|
+
"mode": {
|
|
1446
|
+
"type": "string",
|
|
1447
|
+
"enum": [
|
|
1448
|
+
"matching",
|
|
1449
|
+
"all"
|
|
1450
|
+
]
|
|
1451
|
+
},
|
|
1452
|
+
"market": {
|
|
1453
|
+
"type": "string"
|
|
1454
|
+
},
|
|
1455
|
+
"symbol": {
|
|
1456
|
+
"type": "string"
|
|
1457
|
+
},
|
|
1458
|
+
"markets": {
|
|
1459
|
+
"type": "array",
|
|
1460
|
+
"items": {
|
|
1461
|
+
"type": "string"
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
"symbols": {
|
|
1465
|
+
"type": "array",
|
|
1466
|
+
"items": {
|
|
1467
|
+
"type": "string"
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
"side": {
|
|
1471
|
+
"type": "string",
|
|
1472
|
+
"enum": [
|
|
1473
|
+
"long",
|
|
1474
|
+
"short"
|
|
1475
|
+
]
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
"additionalProperties": false
|
|
1148
1479
|
},
|
|
1149
1480
|
"side": {
|
|
1150
1481
|
"type": "string",
|
|
@@ -1154,6 +1485,15 @@
|
|
|
1154
1485
|
],
|
|
1155
1486
|
"description": "Optional position/order side filter."
|
|
1156
1487
|
},
|
|
1488
|
+
"network": {
|
|
1489
|
+
"type": "string",
|
|
1490
|
+
"enum": [
|
|
1491
|
+
"testnet",
|
|
1492
|
+
"mainnet"
|
|
1493
|
+
],
|
|
1494
|
+
"default": "testnet",
|
|
1495
|
+
"description": "Controller network for this isolated Core assertion."
|
|
1496
|
+
},
|
|
1157
1497
|
"timeout_ms": {
|
|
1158
1498
|
"type": "number"
|
|
1159
1499
|
},
|
|
@@ -1170,8 +1510,9 @@
|
|
|
1170
1510
|
}
|
|
1171
1511
|
},
|
|
1172
1512
|
"required": [
|
|
1173
|
-
"
|
|
1174
|
-
]
|
|
1513
|
+
"state"
|
|
1514
|
+
],
|
|
1515
|
+
"additionalProperties": false
|
|
1175
1516
|
},
|
|
1176
1517
|
"examples": [
|
|
1177
1518
|
{
|
|
@@ -1185,7 +1526,8 @@
|
|
|
1185
1526
|
}
|
|
1186
1527
|
],
|
|
1187
1528
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1188
|
-
"safety_notes": "
|
|
1529
|
+
"safety_notes": "Read-only HyperLiquid query on the explicitly selected network; must not inject mid-recipe state to fabricate proof.",
|
|
1530
|
+
"execution_capabilities": []
|
|
1189
1531
|
},
|
|
1190
1532
|
{
|
|
1191
1533
|
"name": "metamask.perps.ensure_orders",
|
|
@@ -1194,9 +1536,6 @@
|
|
|
1194
1536
|
"schema": {
|
|
1195
1537
|
"type": "object",
|
|
1196
1538
|
"properties": {
|
|
1197
|
-
"action": {
|
|
1198
|
-
"const": "metamask.perps.ensure_orders"
|
|
1199
|
-
},
|
|
1200
1539
|
"market": {
|
|
1201
1540
|
"type": "string",
|
|
1202
1541
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -1229,7 +1568,41 @@
|
|
|
1229
1568
|
},
|
|
1230
1569
|
"selector": {
|
|
1231
1570
|
"type": "object",
|
|
1232
|
-
"
|
|
1571
|
+
"properties": {
|
|
1572
|
+
"mode": {
|
|
1573
|
+
"type": "string",
|
|
1574
|
+
"enum": [
|
|
1575
|
+
"matching",
|
|
1576
|
+
"all"
|
|
1577
|
+
]
|
|
1578
|
+
},
|
|
1579
|
+
"market": {
|
|
1580
|
+
"type": "string"
|
|
1581
|
+
},
|
|
1582
|
+
"symbol": {
|
|
1583
|
+
"type": "string"
|
|
1584
|
+
},
|
|
1585
|
+
"markets": {
|
|
1586
|
+
"type": "array",
|
|
1587
|
+
"items": {
|
|
1588
|
+
"type": "string"
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
"symbols": {
|
|
1592
|
+
"type": "array",
|
|
1593
|
+
"items": {
|
|
1594
|
+
"type": "string"
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
"side": {
|
|
1598
|
+
"type": "string",
|
|
1599
|
+
"enum": [
|
|
1600
|
+
"long",
|
|
1601
|
+
"short"
|
|
1602
|
+
]
|
|
1603
|
+
}
|
|
1604
|
+
},
|
|
1605
|
+
"additionalProperties": false
|
|
1233
1606
|
},
|
|
1234
1607
|
"side": {
|
|
1235
1608
|
"type": "string",
|
|
@@ -1255,8 +1628,9 @@
|
|
|
1255
1628
|
}
|
|
1256
1629
|
},
|
|
1257
1630
|
"required": [
|
|
1258
|
-
"
|
|
1259
|
-
]
|
|
1631
|
+
"state"
|
|
1632
|
+
],
|
|
1633
|
+
"additionalProperties": false
|
|
1260
1634
|
},
|
|
1261
1635
|
"examples": [
|
|
1262
1636
|
{
|
|
@@ -1265,13 +1639,16 @@
|
|
|
1265
1639
|
"action": "metamask.perps.ensure_orders",
|
|
1266
1640
|
"state": "none",
|
|
1267
1641
|
"mode": "all",
|
|
1268
|
-
"intent": "Converge Perps orders to the requested state"
|
|
1269
|
-
"network": "testnet"
|
|
1642
|
+
"intent": "Converge Perps orders to the requested state"
|
|
1270
1643
|
}
|
|
1271
1644
|
}
|
|
1272
1645
|
],
|
|
1273
1646
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1274
|
-
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
1647
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof.",
|
|
1648
|
+
"execution_capabilities": [
|
|
1649
|
+
"app-mutation",
|
|
1650
|
+
"external-mutation"
|
|
1651
|
+
]
|
|
1275
1652
|
},
|
|
1276
1653
|
{
|
|
1277
1654
|
"name": "metamask.perps.start_state",
|
|
@@ -1280,9 +1657,6 @@
|
|
|
1280
1657
|
"schema": {
|
|
1281
1658
|
"type": "object",
|
|
1282
1659
|
"properties": {
|
|
1283
|
-
"action": {
|
|
1284
|
-
"const": "metamask.perps.start_state"
|
|
1285
|
-
},
|
|
1286
1660
|
"profile": {
|
|
1287
1661
|
"type": "string",
|
|
1288
1662
|
"description": "Optional profile such as clean_market_testnet, open_position_testnet, open_order_testnet, or provider_mainnet_readonly."
|
|
@@ -1320,34 +1694,249 @@
|
|
|
1320
1694
|
}
|
|
1321
1695
|
},
|
|
1322
1696
|
"positions": {
|
|
1323
|
-
"
|
|
1324
|
-
|
|
1325
|
-
|
|
1697
|
+
"type": [
|
|
1698
|
+
"object",
|
|
1699
|
+
"boolean"
|
|
1700
|
+
],
|
|
1701
|
+
"properties": {
|
|
1702
|
+
"mode": {
|
|
1703
|
+
"type": "string",
|
|
1704
|
+
"enum": [
|
|
1705
|
+
"matching",
|
|
1706
|
+
"all"
|
|
1707
|
+
]
|
|
1326
1708
|
},
|
|
1327
|
-
{
|
|
1328
|
-
"
|
|
1709
|
+
"market": {
|
|
1710
|
+
"type": "string"
|
|
1711
|
+
},
|
|
1712
|
+
"symbol": {
|
|
1713
|
+
"type": "string"
|
|
1714
|
+
},
|
|
1715
|
+
"markets": {
|
|
1716
|
+
"type": "array",
|
|
1717
|
+
"items": {
|
|
1718
|
+
"type": "string"
|
|
1719
|
+
}
|
|
1720
|
+
},
|
|
1721
|
+
"symbols": {
|
|
1722
|
+
"type": "array",
|
|
1723
|
+
"items": {
|
|
1724
|
+
"type": "string"
|
|
1725
|
+
}
|
|
1726
|
+
},
|
|
1727
|
+
"side": {
|
|
1728
|
+
"type": "string",
|
|
1729
|
+
"enum": [
|
|
1730
|
+
"long",
|
|
1731
|
+
"short"
|
|
1732
|
+
]
|
|
1733
|
+
},
|
|
1734
|
+
"state": {
|
|
1735
|
+
"type": "string",
|
|
1736
|
+
"enum": [
|
|
1737
|
+
"none",
|
|
1738
|
+
"closed",
|
|
1739
|
+
"absent",
|
|
1740
|
+
"open",
|
|
1741
|
+
"present"
|
|
1742
|
+
]
|
|
1743
|
+
},
|
|
1744
|
+
"amount": {
|
|
1745
|
+
"type": [
|
|
1746
|
+
"string",
|
|
1747
|
+
"number"
|
|
1748
|
+
]
|
|
1749
|
+
},
|
|
1750
|
+
"notional": {
|
|
1751
|
+
"type": [
|
|
1752
|
+
"string",
|
|
1753
|
+
"number"
|
|
1754
|
+
]
|
|
1755
|
+
},
|
|
1756
|
+
"size": {
|
|
1757
|
+
"type": [
|
|
1758
|
+
"string",
|
|
1759
|
+
"number"
|
|
1760
|
+
]
|
|
1761
|
+
},
|
|
1762
|
+
"leverage": {
|
|
1763
|
+
"type": "number"
|
|
1764
|
+
},
|
|
1765
|
+
"order_type": {
|
|
1766
|
+
"type": "string"
|
|
1767
|
+
},
|
|
1768
|
+
"orderType": {
|
|
1769
|
+
"type": "string"
|
|
1770
|
+
},
|
|
1771
|
+
"limit_price": {
|
|
1772
|
+
"type": "number"
|
|
1773
|
+
},
|
|
1774
|
+
"limitPrice": {
|
|
1775
|
+
"type": "number"
|
|
1776
|
+
},
|
|
1777
|
+
"offset_pct": {
|
|
1778
|
+
"type": "number"
|
|
1779
|
+
},
|
|
1780
|
+
"offsetPct": {
|
|
1781
|
+
"type": "number"
|
|
1782
|
+
},
|
|
1783
|
+
"current_price": {
|
|
1784
|
+
"type": "number"
|
|
1785
|
+
},
|
|
1786
|
+
"currentPrice": {
|
|
1787
|
+
"type": "number"
|
|
1788
|
+
},
|
|
1789
|
+
"max_slippage_bps": {
|
|
1790
|
+
"type": "number"
|
|
1791
|
+
},
|
|
1792
|
+
"maxSlippageBps": {
|
|
1793
|
+
"type": "number"
|
|
1794
|
+
},
|
|
1795
|
+
"close_attempts": {
|
|
1796
|
+
"type": "integer"
|
|
1797
|
+
},
|
|
1798
|
+
"close_retry_delay_ms": {
|
|
1799
|
+
"type": "integer"
|
|
1800
|
+
},
|
|
1801
|
+
"timeout_ms": {
|
|
1802
|
+
"type": "number"
|
|
1329
1803
|
}
|
|
1330
|
-
|
|
1331
|
-
"
|
|
1804
|
+
},
|
|
1805
|
+
"additionalProperties": false
|
|
1332
1806
|
},
|
|
1333
1807
|
"orders": {
|
|
1334
|
-
"
|
|
1335
|
-
|
|
1336
|
-
|
|
1808
|
+
"type": [
|
|
1809
|
+
"object",
|
|
1810
|
+
"boolean"
|
|
1811
|
+
],
|
|
1812
|
+
"properties": {
|
|
1813
|
+
"mode": {
|
|
1814
|
+
"type": "string",
|
|
1815
|
+
"enum": [
|
|
1816
|
+
"matching",
|
|
1817
|
+
"all"
|
|
1818
|
+
]
|
|
1337
1819
|
},
|
|
1338
|
-
{
|
|
1339
|
-
"
|
|
1820
|
+
"market": {
|
|
1821
|
+
"type": "string"
|
|
1822
|
+
},
|
|
1823
|
+
"symbol": {
|
|
1824
|
+
"type": "string"
|
|
1825
|
+
},
|
|
1826
|
+
"markets": {
|
|
1827
|
+
"type": "array",
|
|
1828
|
+
"items": {
|
|
1829
|
+
"type": "string"
|
|
1830
|
+
}
|
|
1831
|
+
},
|
|
1832
|
+
"symbols": {
|
|
1833
|
+
"type": "array",
|
|
1834
|
+
"items": {
|
|
1835
|
+
"type": "string"
|
|
1836
|
+
}
|
|
1837
|
+
},
|
|
1838
|
+
"side": {
|
|
1839
|
+
"type": "string",
|
|
1840
|
+
"enum": [
|
|
1841
|
+
"long",
|
|
1842
|
+
"short"
|
|
1843
|
+
]
|
|
1844
|
+
},
|
|
1845
|
+
"state": {
|
|
1846
|
+
"type": "string",
|
|
1847
|
+
"enum": [
|
|
1848
|
+
"none",
|
|
1849
|
+
"closed",
|
|
1850
|
+
"absent",
|
|
1851
|
+
"open",
|
|
1852
|
+
"present"
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1855
|
+
"amount": {
|
|
1856
|
+
"type": [
|
|
1857
|
+
"string",
|
|
1858
|
+
"number"
|
|
1859
|
+
]
|
|
1860
|
+
},
|
|
1861
|
+
"notional": {
|
|
1862
|
+
"type": [
|
|
1863
|
+
"string",
|
|
1864
|
+
"number"
|
|
1865
|
+
]
|
|
1866
|
+
},
|
|
1867
|
+
"size": {
|
|
1868
|
+
"type": [
|
|
1869
|
+
"string",
|
|
1870
|
+
"number"
|
|
1871
|
+
]
|
|
1872
|
+
},
|
|
1873
|
+
"leverage": {
|
|
1874
|
+
"type": "number"
|
|
1875
|
+
},
|
|
1876
|
+
"order_type": {
|
|
1877
|
+
"type": "string"
|
|
1878
|
+
},
|
|
1879
|
+
"orderType": {
|
|
1880
|
+
"type": "string"
|
|
1881
|
+
},
|
|
1882
|
+
"limit_price": {
|
|
1883
|
+
"type": "number"
|
|
1884
|
+
},
|
|
1885
|
+
"limitPrice": {
|
|
1886
|
+
"type": "number"
|
|
1887
|
+
},
|
|
1888
|
+
"offset_pct": {
|
|
1889
|
+
"type": "number"
|
|
1890
|
+
},
|
|
1891
|
+
"offsetPct": {
|
|
1892
|
+
"type": "number"
|
|
1893
|
+
},
|
|
1894
|
+
"current_price": {
|
|
1895
|
+
"type": "number"
|
|
1896
|
+
},
|
|
1897
|
+
"currentPrice": {
|
|
1898
|
+
"type": "number"
|
|
1899
|
+
},
|
|
1900
|
+
"max_slippage_bps": {
|
|
1901
|
+
"type": "number"
|
|
1902
|
+
},
|
|
1903
|
+
"maxSlippageBps": {
|
|
1904
|
+
"type": "number"
|
|
1905
|
+
},
|
|
1906
|
+
"close_attempts": {
|
|
1907
|
+
"type": "integer"
|
|
1908
|
+
},
|
|
1909
|
+
"close_retry_delay_ms": {
|
|
1910
|
+
"type": "integer"
|
|
1911
|
+
},
|
|
1912
|
+
"timeout_ms": {
|
|
1913
|
+
"type": "number"
|
|
1340
1914
|
}
|
|
1341
|
-
|
|
1342
|
-
"
|
|
1915
|
+
},
|
|
1916
|
+
"additionalProperties": false
|
|
1343
1917
|
},
|
|
1344
1918
|
"timeout_ms": {
|
|
1345
1919
|
"type": "number"
|
|
1920
|
+
},
|
|
1921
|
+
"side": {
|
|
1922
|
+
"type": "string",
|
|
1923
|
+
"enum": [
|
|
1924
|
+
"long",
|
|
1925
|
+
"short"
|
|
1926
|
+
]
|
|
1927
|
+
},
|
|
1928
|
+
"account_name": {
|
|
1929
|
+
"type": "string"
|
|
1930
|
+
},
|
|
1931
|
+
"mode": {
|
|
1932
|
+
"type": "string",
|
|
1933
|
+
"enum": [
|
|
1934
|
+
"matching",
|
|
1935
|
+
"all"
|
|
1936
|
+
]
|
|
1346
1937
|
}
|
|
1347
1938
|
},
|
|
1348
|
-
"
|
|
1349
|
-
"action"
|
|
1350
|
-
]
|
|
1939
|
+
"additionalProperties": false
|
|
1351
1940
|
},
|
|
1352
1941
|
"examples": [
|
|
1353
1942
|
{
|
|
@@ -1384,7 +1973,11 @@
|
|
|
1384
1973
|
}
|
|
1385
1974
|
],
|
|
1386
1975
|
"proof_effect": "Runs in setup/teardown phase and must be visible in trace.json; proof videos can keep this as trace-only setup.",
|
|
1387
|
-
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof."
|
|
1976
|
+
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof.",
|
|
1977
|
+
"execution_capabilities": [
|
|
1978
|
+
"app-mutation",
|
|
1979
|
+
"external-mutation"
|
|
1980
|
+
]
|
|
1388
1981
|
},
|
|
1389
1982
|
{
|
|
1390
1983
|
"name": "metamask.perps.teardown_state",
|
|
@@ -1393,9 +1986,6 @@
|
|
|
1393
1986
|
"schema": {
|
|
1394
1987
|
"type": "object",
|
|
1395
1988
|
"properties": {
|
|
1396
|
-
"action": {
|
|
1397
|
-
"const": "metamask.perps.teardown_state"
|
|
1398
|
-
},
|
|
1399
1989
|
"profile": {
|
|
1400
1990
|
"type": "string",
|
|
1401
1991
|
"description": "Optional profile such as clean_market_testnet, open_position_testnet, open_order_testnet, or provider_mainnet_readonly."
|
|
@@ -1433,34 +2023,249 @@
|
|
|
1433
2023
|
}
|
|
1434
2024
|
},
|
|
1435
2025
|
"positions": {
|
|
1436
|
-
"
|
|
1437
|
-
|
|
1438
|
-
|
|
2026
|
+
"type": [
|
|
2027
|
+
"object",
|
|
2028
|
+
"boolean"
|
|
2029
|
+
],
|
|
2030
|
+
"properties": {
|
|
2031
|
+
"mode": {
|
|
2032
|
+
"type": "string",
|
|
2033
|
+
"enum": [
|
|
2034
|
+
"matching",
|
|
2035
|
+
"all"
|
|
2036
|
+
]
|
|
1439
2037
|
},
|
|
1440
|
-
{
|
|
1441
|
-
"
|
|
2038
|
+
"market": {
|
|
2039
|
+
"type": "string"
|
|
2040
|
+
},
|
|
2041
|
+
"symbol": {
|
|
2042
|
+
"type": "string"
|
|
2043
|
+
},
|
|
2044
|
+
"markets": {
|
|
2045
|
+
"type": "array",
|
|
2046
|
+
"items": {
|
|
2047
|
+
"type": "string"
|
|
2048
|
+
}
|
|
2049
|
+
},
|
|
2050
|
+
"symbols": {
|
|
2051
|
+
"type": "array",
|
|
2052
|
+
"items": {
|
|
2053
|
+
"type": "string"
|
|
2054
|
+
}
|
|
2055
|
+
},
|
|
2056
|
+
"side": {
|
|
2057
|
+
"type": "string",
|
|
2058
|
+
"enum": [
|
|
2059
|
+
"long",
|
|
2060
|
+
"short"
|
|
2061
|
+
]
|
|
2062
|
+
},
|
|
2063
|
+
"state": {
|
|
2064
|
+
"type": "string",
|
|
2065
|
+
"enum": [
|
|
2066
|
+
"none",
|
|
2067
|
+
"closed",
|
|
2068
|
+
"absent",
|
|
2069
|
+
"open",
|
|
2070
|
+
"present"
|
|
2071
|
+
]
|
|
2072
|
+
},
|
|
2073
|
+
"amount": {
|
|
2074
|
+
"type": [
|
|
2075
|
+
"string",
|
|
2076
|
+
"number"
|
|
2077
|
+
]
|
|
2078
|
+
},
|
|
2079
|
+
"notional": {
|
|
2080
|
+
"type": [
|
|
2081
|
+
"string",
|
|
2082
|
+
"number"
|
|
2083
|
+
]
|
|
2084
|
+
},
|
|
2085
|
+
"size": {
|
|
2086
|
+
"type": [
|
|
2087
|
+
"string",
|
|
2088
|
+
"number"
|
|
2089
|
+
]
|
|
2090
|
+
},
|
|
2091
|
+
"leverage": {
|
|
2092
|
+
"type": "number"
|
|
2093
|
+
},
|
|
2094
|
+
"order_type": {
|
|
2095
|
+
"type": "string"
|
|
2096
|
+
},
|
|
2097
|
+
"orderType": {
|
|
2098
|
+
"type": "string"
|
|
2099
|
+
},
|
|
2100
|
+
"limit_price": {
|
|
2101
|
+
"type": "number"
|
|
2102
|
+
},
|
|
2103
|
+
"limitPrice": {
|
|
2104
|
+
"type": "number"
|
|
2105
|
+
},
|
|
2106
|
+
"offset_pct": {
|
|
2107
|
+
"type": "number"
|
|
2108
|
+
},
|
|
2109
|
+
"offsetPct": {
|
|
2110
|
+
"type": "number"
|
|
2111
|
+
},
|
|
2112
|
+
"current_price": {
|
|
2113
|
+
"type": "number"
|
|
2114
|
+
},
|
|
2115
|
+
"currentPrice": {
|
|
2116
|
+
"type": "number"
|
|
2117
|
+
},
|
|
2118
|
+
"max_slippage_bps": {
|
|
2119
|
+
"type": "number"
|
|
2120
|
+
},
|
|
2121
|
+
"maxSlippageBps": {
|
|
2122
|
+
"type": "number"
|
|
2123
|
+
},
|
|
2124
|
+
"close_attempts": {
|
|
2125
|
+
"type": "integer"
|
|
2126
|
+
},
|
|
2127
|
+
"close_retry_delay_ms": {
|
|
2128
|
+
"type": "integer"
|
|
2129
|
+
},
|
|
2130
|
+
"timeout_ms": {
|
|
2131
|
+
"type": "number"
|
|
1442
2132
|
}
|
|
1443
|
-
|
|
1444
|
-
"
|
|
2133
|
+
},
|
|
2134
|
+
"additionalProperties": false
|
|
1445
2135
|
},
|
|
1446
2136
|
"orders": {
|
|
1447
|
-
"
|
|
1448
|
-
|
|
1449
|
-
|
|
2137
|
+
"type": [
|
|
2138
|
+
"object",
|
|
2139
|
+
"boolean"
|
|
2140
|
+
],
|
|
2141
|
+
"properties": {
|
|
2142
|
+
"mode": {
|
|
2143
|
+
"type": "string",
|
|
2144
|
+
"enum": [
|
|
2145
|
+
"matching",
|
|
2146
|
+
"all"
|
|
2147
|
+
]
|
|
1450
2148
|
},
|
|
1451
|
-
{
|
|
1452
|
-
"
|
|
2149
|
+
"market": {
|
|
2150
|
+
"type": "string"
|
|
2151
|
+
},
|
|
2152
|
+
"symbol": {
|
|
2153
|
+
"type": "string"
|
|
2154
|
+
},
|
|
2155
|
+
"markets": {
|
|
2156
|
+
"type": "array",
|
|
2157
|
+
"items": {
|
|
2158
|
+
"type": "string"
|
|
2159
|
+
}
|
|
2160
|
+
},
|
|
2161
|
+
"symbols": {
|
|
2162
|
+
"type": "array",
|
|
2163
|
+
"items": {
|
|
2164
|
+
"type": "string"
|
|
2165
|
+
}
|
|
2166
|
+
},
|
|
2167
|
+
"side": {
|
|
2168
|
+
"type": "string",
|
|
2169
|
+
"enum": [
|
|
2170
|
+
"long",
|
|
2171
|
+
"short"
|
|
2172
|
+
]
|
|
2173
|
+
},
|
|
2174
|
+
"state": {
|
|
2175
|
+
"type": "string",
|
|
2176
|
+
"enum": [
|
|
2177
|
+
"none",
|
|
2178
|
+
"closed",
|
|
2179
|
+
"absent",
|
|
2180
|
+
"open",
|
|
2181
|
+
"present"
|
|
2182
|
+
]
|
|
2183
|
+
},
|
|
2184
|
+
"amount": {
|
|
2185
|
+
"type": [
|
|
2186
|
+
"string",
|
|
2187
|
+
"number"
|
|
2188
|
+
]
|
|
2189
|
+
},
|
|
2190
|
+
"notional": {
|
|
2191
|
+
"type": [
|
|
2192
|
+
"string",
|
|
2193
|
+
"number"
|
|
2194
|
+
]
|
|
2195
|
+
},
|
|
2196
|
+
"size": {
|
|
2197
|
+
"type": [
|
|
2198
|
+
"string",
|
|
2199
|
+
"number"
|
|
2200
|
+
]
|
|
2201
|
+
},
|
|
2202
|
+
"leverage": {
|
|
2203
|
+
"type": "number"
|
|
2204
|
+
},
|
|
2205
|
+
"order_type": {
|
|
2206
|
+
"type": "string"
|
|
2207
|
+
},
|
|
2208
|
+
"orderType": {
|
|
2209
|
+
"type": "string"
|
|
2210
|
+
},
|
|
2211
|
+
"limit_price": {
|
|
2212
|
+
"type": "number"
|
|
2213
|
+
},
|
|
2214
|
+
"limitPrice": {
|
|
2215
|
+
"type": "number"
|
|
2216
|
+
},
|
|
2217
|
+
"offset_pct": {
|
|
2218
|
+
"type": "number"
|
|
2219
|
+
},
|
|
2220
|
+
"offsetPct": {
|
|
2221
|
+
"type": "number"
|
|
2222
|
+
},
|
|
2223
|
+
"current_price": {
|
|
2224
|
+
"type": "number"
|
|
2225
|
+
},
|
|
2226
|
+
"currentPrice": {
|
|
2227
|
+
"type": "number"
|
|
2228
|
+
},
|
|
2229
|
+
"max_slippage_bps": {
|
|
2230
|
+
"type": "number"
|
|
2231
|
+
},
|
|
2232
|
+
"maxSlippageBps": {
|
|
2233
|
+
"type": "number"
|
|
2234
|
+
},
|
|
2235
|
+
"close_attempts": {
|
|
2236
|
+
"type": "integer"
|
|
2237
|
+
},
|
|
2238
|
+
"close_retry_delay_ms": {
|
|
2239
|
+
"type": "integer"
|
|
2240
|
+
},
|
|
2241
|
+
"timeout_ms": {
|
|
2242
|
+
"type": "number"
|
|
1453
2243
|
}
|
|
1454
|
-
|
|
1455
|
-
"
|
|
2244
|
+
},
|
|
2245
|
+
"additionalProperties": false
|
|
1456
2246
|
},
|
|
1457
2247
|
"timeout_ms": {
|
|
1458
2248
|
"type": "number"
|
|
2249
|
+
},
|
|
2250
|
+
"side": {
|
|
2251
|
+
"type": "string",
|
|
2252
|
+
"enum": [
|
|
2253
|
+
"long",
|
|
2254
|
+
"short"
|
|
2255
|
+
]
|
|
2256
|
+
},
|
|
2257
|
+
"account_name": {
|
|
2258
|
+
"type": "string"
|
|
2259
|
+
},
|
|
2260
|
+
"mode": {
|
|
2261
|
+
"type": "string",
|
|
2262
|
+
"enum": [
|
|
2263
|
+
"matching",
|
|
2264
|
+
"all"
|
|
2265
|
+
]
|
|
1459
2266
|
}
|
|
1460
2267
|
},
|
|
1461
|
-
"
|
|
1462
|
-
"action"
|
|
1463
|
-
]
|
|
2268
|
+
"additionalProperties": false
|
|
1464
2269
|
},
|
|
1465
2270
|
"examples": [
|
|
1466
2271
|
{
|
|
@@ -1487,19 +2292,11 @@
|
|
|
1487
2292
|
}
|
|
1488
2293
|
],
|
|
1489
2294
|
"proof_effect": "Runs in setup/teardown phase and must be visible in trace.json; proof videos can keep this as trace-only setup.",
|
|
1490
|
-
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof."
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
"name": "perps.positions",
|
|
1496
|
-
"description": "Normalized Perps position state read from the headless controller."
|
|
1497
|
-
}
|
|
1498
|
-
],
|
|
1499
|
-
"pre_conditions": [
|
|
1500
|
-
{
|
|
1501
|
-
"id": "no-mid-recipe-state-injection",
|
|
1502
|
-
"description": "Recipes must drive the real perps controller read path for proof state."
|
|
2295
|
+
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof.",
|
|
2296
|
+
"execution_capabilities": [
|
|
2297
|
+
"app-mutation",
|
|
2298
|
+
"external-mutation"
|
|
2299
|
+
]
|
|
1503
2300
|
}
|
|
1504
2301
|
],
|
|
1505
2302
|
"native_bindings": [
|
|
@@ -1575,9 +2372,5 @@
|
|
|
1575
2372
|
"action": "metamask.perps.ensure_positions",
|
|
1576
2373
|
"implementation": "@metamask/recipe-runner/core/perps"
|
|
1577
2374
|
}
|
|
1578
|
-
]
|
|
1579
|
-
"capability_notes": [
|
|
1580
|
-
"core is a headless adapter: it instantiates @metamask/perps-controller against a resolved MetaMask/core checkout and reads HyperLiquid testnet over HTTP. No CDP, bridge, or UI is involved. Slice 1 implements read-only perps actions. Slice 2 adds a default viem signer + write actions (place_order, close_positions, ensure_positions, assert_positions) that submit real signed orders to HyperLiquid testnet via the controller's full provider path."
|
|
1581
|
-
],
|
|
1582
|
-
"action_profiles": []
|
|
2375
|
+
]
|
|
1583
2376
|
}
|