@deeeed/metamask-harness 0.18.0 → 0.19.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 +187 -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/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/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/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 +52 -91
- package/library/README.md +5 -5
- package/library/actions/core/perps/_controller.mjs +33 -1
- package/library/actions/core/perps/assert_orders.mjs +6 -7
- package/library/actions/core/perps/assert_positions.mjs +6 -7
- 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 +43 -14
- 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 +40 -12
- package/library/library.json +1 -1
- package/library/manifests/core.action-manifest.json +1170 -413
- package/library/manifests/extension.action-manifest.json +1495 -641
- package/library/manifests/mobile.action-manifest.json +1704 -769
- 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
|
|
155
|
-
"examples": [
|
|
156
|
-
{
|
|
157
|
-
"node": {
|
|
158
|
-
"action": "call",
|
|
159
|
-
"ref": "shared/setup",
|
|
160
|
-
"intent": "Run a shared sub-recipe flow"
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
]
|
|
164
|
-
},
|
|
165
|
-
"metamask.wallet.list_accounts": {
|
|
166
|
-
"description": "List redacted headless fixture accounts available to Core controller actions.",
|
|
450
|
+
"description": "Invoke a named recipe by ref and run its steps inline.",
|
|
167
451
|
"examples": [
|
|
168
452
|
{
|
|
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
453
|
"node": {
|
|
398
|
-
"action": "
|
|
399
|
-
"
|
|
400
|
-
"intent": "
|
|
454
|
+
"action": "call",
|
|
455
|
+
"ref": "shared/setup",
|
|
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",
|
|
@@ -509,9 +594,7 @@
|
|
|
509
594
|
"type": "number"
|
|
510
595
|
}
|
|
511
596
|
},
|
|
512
|
-
"
|
|
513
|
-
"action"
|
|
514
|
-
]
|
|
597
|
+
"additionalProperties": false
|
|
515
598
|
},
|
|
516
599
|
"examples": [
|
|
517
600
|
{
|
|
@@ -524,18 +607,16 @@
|
|
|
524
607
|
}
|
|
525
608
|
],
|
|
526
609
|
"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 testnet HTTP query; must not inject controller/UI state to fabricate proof."
|
|
610
|
+
"safety_notes": "Read-only HyperLiquid testnet HTTP query; must not inject controller/UI state to fabricate proof.",
|
|
611
|
+
"execution_capabilities": []
|
|
528
612
|
},
|
|
529
613
|
{
|
|
530
614
|
"name": "metamask.perps.read_orders",
|
|
531
615
|
"owner": "metamask",
|
|
532
|
-
"description": "core Read live Perps open orders directly from the
|
|
616
|
+
"description": "core Read live Perps open orders directly from the Perps controller; without a selector, return all live orders.",
|
|
533
617
|
"schema": {
|
|
534
618
|
"type": "object",
|
|
535
619
|
"properties": {
|
|
536
|
-
"action": {
|
|
537
|
-
"const": "metamask.perps.read_orders"
|
|
538
|
-
},
|
|
539
620
|
"market": {
|
|
540
621
|
"type": "string",
|
|
541
622
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -568,7 +649,41 @@
|
|
|
568
649
|
},
|
|
569
650
|
"selector": {
|
|
570
651
|
"type": "object",
|
|
571
|
-
"
|
|
652
|
+
"properties": {
|
|
653
|
+
"mode": {
|
|
654
|
+
"type": "string",
|
|
655
|
+
"enum": [
|
|
656
|
+
"matching",
|
|
657
|
+
"all"
|
|
658
|
+
]
|
|
659
|
+
},
|
|
660
|
+
"market": {
|
|
661
|
+
"type": "string"
|
|
662
|
+
},
|
|
663
|
+
"symbol": {
|
|
664
|
+
"type": "string"
|
|
665
|
+
},
|
|
666
|
+
"markets": {
|
|
667
|
+
"type": "array",
|
|
668
|
+
"items": {
|
|
669
|
+
"type": "string"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"symbols": {
|
|
673
|
+
"type": "array",
|
|
674
|
+
"items": {
|
|
675
|
+
"type": "string"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"side": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"enum": [
|
|
681
|
+
"long",
|
|
682
|
+
"short"
|
|
683
|
+
]
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
"additionalProperties": false
|
|
572
687
|
},
|
|
573
688
|
"side": {
|
|
574
689
|
"type": "string",
|
|
@@ -586,9 +701,7 @@
|
|
|
586
701
|
"type": "number"
|
|
587
702
|
}
|
|
588
703
|
},
|
|
589
|
-
"
|
|
590
|
-
"action"
|
|
591
|
-
]
|
|
704
|
+
"additionalProperties": false
|
|
592
705
|
},
|
|
593
706
|
"examples": [
|
|
594
707
|
{
|
|
@@ -601,7 +714,8 @@
|
|
|
601
714
|
}
|
|
602
715
|
],
|
|
603
716
|
"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 testnet HTTP query; must not inject controller/UI state to fabricate proof."
|
|
717
|
+
"safety_notes": "Read-only HyperLiquid testnet HTTP query; must not inject controller/UI state to fabricate proof.",
|
|
718
|
+
"execution_capabilities": []
|
|
605
719
|
},
|
|
606
720
|
{
|
|
607
721
|
"name": "metamask.perps.read_account",
|
|
@@ -610,9 +724,6 @@
|
|
|
610
724
|
"schema": {
|
|
611
725
|
"type": "object",
|
|
612
726
|
"properties": {
|
|
613
|
-
"action": {
|
|
614
|
-
"const": "metamask.perps.read_account"
|
|
615
|
-
},
|
|
616
727
|
"account": {
|
|
617
728
|
"type": "string",
|
|
618
729
|
"description": "EVM address to read account state for; defaults to the canonical wallet fixture account."
|
|
@@ -621,9 +732,7 @@
|
|
|
621
732
|
"type": "number"
|
|
622
733
|
}
|
|
623
734
|
},
|
|
624
|
-
"
|
|
625
|
-
"action"
|
|
626
|
-
]
|
|
735
|
+
"additionalProperties": false
|
|
627
736
|
},
|
|
628
737
|
"examples": [
|
|
629
738
|
{
|
|
@@ -635,7 +744,8 @@
|
|
|
635
744
|
}
|
|
636
745
|
],
|
|
637
746
|
"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."
|
|
747
|
+
"safety_notes": "Read-only HyperLiquid testnet HTTP query; must not inject controller/UI state to fabricate proof.",
|
|
748
|
+
"execution_capabilities": []
|
|
639
749
|
},
|
|
640
750
|
{
|
|
641
751
|
"name": "metamask.perps.place_order",
|
|
@@ -644,9 +754,6 @@
|
|
|
644
754
|
"schema": {
|
|
645
755
|
"type": "object",
|
|
646
756
|
"properties": {
|
|
647
|
-
"action": {
|
|
648
|
-
"const": "metamask.perps.place_order"
|
|
649
|
-
},
|
|
650
757
|
"market": {
|
|
651
758
|
"type": "string",
|
|
652
759
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -671,7 +778,41 @@
|
|
|
671
778
|
},
|
|
672
779
|
"selector": {
|
|
673
780
|
"type": "object",
|
|
674
|
-
"
|
|
781
|
+
"properties": {
|
|
782
|
+
"mode": {
|
|
783
|
+
"type": "string",
|
|
784
|
+
"enum": [
|
|
785
|
+
"matching",
|
|
786
|
+
"all"
|
|
787
|
+
]
|
|
788
|
+
},
|
|
789
|
+
"market": {
|
|
790
|
+
"type": "string"
|
|
791
|
+
},
|
|
792
|
+
"symbol": {
|
|
793
|
+
"type": "string"
|
|
794
|
+
},
|
|
795
|
+
"markets": {
|
|
796
|
+
"type": "array",
|
|
797
|
+
"items": {
|
|
798
|
+
"type": "string"
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
"symbols": {
|
|
802
|
+
"type": "array",
|
|
803
|
+
"items": {
|
|
804
|
+
"type": "string"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"side": {
|
|
808
|
+
"type": "string",
|
|
809
|
+
"enum": [
|
|
810
|
+
"long",
|
|
811
|
+
"short"
|
|
812
|
+
]
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
"additionalProperties": false
|
|
675
816
|
},
|
|
676
817
|
"side": {
|
|
677
818
|
"type": "string",
|
|
@@ -706,7 +847,8 @@
|
|
|
706
847
|
"description": "USD notional alias."
|
|
707
848
|
},
|
|
708
849
|
"leverage": {
|
|
709
|
-
"type": "number"
|
|
850
|
+
"type": "number",
|
|
851
|
+
"default": 3
|
|
710
852
|
},
|
|
711
853
|
"account": {
|
|
712
854
|
"type": "string",
|
|
@@ -716,9 +858,7 @@
|
|
|
716
858
|
"type": "number"
|
|
717
859
|
}
|
|
718
860
|
},
|
|
719
|
-
"
|
|
720
|
-
"action"
|
|
721
|
-
]
|
|
861
|
+
"additionalProperties": false
|
|
722
862
|
},
|
|
723
863
|
"examples": [
|
|
724
864
|
{
|
|
@@ -729,8 +869,7 @@
|
|
|
729
869
|
"side": "long",
|
|
730
870
|
"notional": "11",
|
|
731
871
|
"leverage": 2,
|
|
732
|
-
"intent": "Place the requested Perps order via the headless controller"
|
|
733
|
-
"network": "testnet"
|
|
872
|
+
"intent": "Place the requested Perps order via the headless controller"
|
|
734
873
|
}
|
|
735
874
|
},
|
|
736
875
|
{
|
|
@@ -743,13 +882,16 @@
|
|
|
743
882
|
"offset_pct": -30,
|
|
744
883
|
"notional": "11",
|
|
745
884
|
"leverage": 2,
|
|
746
|
-
"intent": "Place a resting Perps limit order via the headless controller"
|
|
747
|
-
"network": "testnet"
|
|
885
|
+
"intent": "Place a resting Perps limit order via the headless controller"
|
|
748
886
|
}
|
|
749
887
|
}
|
|
750
888
|
],
|
|
751
889
|
"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."
|
|
890
|
+
"safety_notes": "Submits a REAL signed order to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof.",
|
|
891
|
+
"execution_capabilities": [
|
|
892
|
+
"app-mutation",
|
|
893
|
+
"external-mutation"
|
|
894
|
+
]
|
|
753
895
|
},
|
|
754
896
|
{
|
|
755
897
|
"name": "metamask.perps.close_positions",
|
|
@@ -758,9 +900,6 @@
|
|
|
758
900
|
"schema": {
|
|
759
901
|
"type": "object",
|
|
760
902
|
"properties": {
|
|
761
|
-
"action": {
|
|
762
|
-
"const": "metamask.perps.close_positions"
|
|
763
|
-
},
|
|
764
903
|
"market": {
|
|
765
904
|
"type": "string",
|
|
766
905
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -793,7 +932,41 @@
|
|
|
793
932
|
},
|
|
794
933
|
"selector": {
|
|
795
934
|
"type": "object",
|
|
796
|
-
"
|
|
935
|
+
"properties": {
|
|
936
|
+
"mode": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"enum": [
|
|
939
|
+
"matching",
|
|
940
|
+
"all"
|
|
941
|
+
]
|
|
942
|
+
},
|
|
943
|
+
"market": {
|
|
944
|
+
"type": "string"
|
|
945
|
+
},
|
|
946
|
+
"symbol": {
|
|
947
|
+
"type": "string"
|
|
948
|
+
},
|
|
949
|
+
"markets": {
|
|
950
|
+
"type": "array",
|
|
951
|
+
"items": {
|
|
952
|
+
"type": "string"
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
"symbols": {
|
|
956
|
+
"type": "array",
|
|
957
|
+
"items": {
|
|
958
|
+
"type": "string"
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
"side": {
|
|
962
|
+
"type": "string",
|
|
963
|
+
"enum": [
|
|
964
|
+
"long",
|
|
965
|
+
"short"
|
|
966
|
+
]
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"additionalProperties": false
|
|
797
970
|
},
|
|
798
971
|
"side": {
|
|
799
972
|
"type": "string",
|
|
@@ -811,9 +984,7 @@
|
|
|
811
984
|
"type": "number"
|
|
812
985
|
}
|
|
813
986
|
},
|
|
814
|
-
"
|
|
815
|
-
"action"
|
|
816
|
-
]
|
|
987
|
+
"additionalProperties": false
|
|
817
988
|
},
|
|
818
989
|
"examples": [
|
|
819
990
|
{
|
|
@@ -821,24 +992,24 @@
|
|
|
821
992
|
"node": {
|
|
822
993
|
"action": "metamask.perps.close_positions",
|
|
823
994
|
"market": "BTC",
|
|
824
|
-
"intent": "Close selected Perps positions via the headless controller"
|
|
825
|
-
"network": "testnet"
|
|
995
|
+
"intent": "Close selected Perps positions via the headless controller"
|
|
826
996
|
}
|
|
827
997
|
}
|
|
828
998
|
],
|
|
829
999
|
"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."
|
|
1000
|
+
"safety_notes": "Submits REAL signed close orders to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof.",
|
|
1001
|
+
"execution_capabilities": [
|
|
1002
|
+
"app-mutation",
|
|
1003
|
+
"external-mutation"
|
|
1004
|
+
]
|
|
831
1005
|
},
|
|
832
1006
|
{
|
|
833
1007
|
"name": "metamask.perps.assert_positions",
|
|
834
1008
|
"owner": "metamask",
|
|
835
|
-
"description": "core Assert
|
|
1009
|
+
"description": "core Assert live Perps positions are present or absent for an explicit market selection or mode=all.",
|
|
836
1010
|
"schema": {
|
|
837
1011
|
"type": "object",
|
|
838
1012
|
"properties": {
|
|
839
|
-
"action": {
|
|
840
|
-
"const": "metamask.perps.assert_positions"
|
|
841
|
-
},
|
|
842
1013
|
"market": {
|
|
843
1014
|
"type": "string",
|
|
844
1015
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -871,7 +1042,41 @@
|
|
|
871
1042
|
},
|
|
872
1043
|
"selector": {
|
|
873
1044
|
"type": "object",
|
|
874
|
-
"
|
|
1045
|
+
"properties": {
|
|
1046
|
+
"mode": {
|
|
1047
|
+
"type": "string",
|
|
1048
|
+
"enum": [
|
|
1049
|
+
"matching",
|
|
1050
|
+
"all"
|
|
1051
|
+
]
|
|
1052
|
+
},
|
|
1053
|
+
"market": {
|
|
1054
|
+
"type": "string"
|
|
1055
|
+
},
|
|
1056
|
+
"symbol": {
|
|
1057
|
+
"type": "string"
|
|
1058
|
+
},
|
|
1059
|
+
"markets": {
|
|
1060
|
+
"type": "array",
|
|
1061
|
+
"items": {
|
|
1062
|
+
"type": "string"
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"symbols": {
|
|
1066
|
+
"type": "array",
|
|
1067
|
+
"items": {
|
|
1068
|
+
"type": "string"
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
"side": {
|
|
1072
|
+
"type": "string",
|
|
1073
|
+
"enum": [
|
|
1074
|
+
"long",
|
|
1075
|
+
"short"
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
"additionalProperties": false
|
|
875
1080
|
},
|
|
876
1081
|
"side": {
|
|
877
1082
|
"type": "string",
|
|
@@ -901,8 +1106,9 @@
|
|
|
901
1106
|
}
|
|
902
1107
|
},
|
|
903
1108
|
"required": [
|
|
904
|
-
"
|
|
905
|
-
]
|
|
1109
|
+
"state"
|
|
1110
|
+
],
|
|
1111
|
+
"additionalProperties": false
|
|
906
1112
|
},
|
|
907
1113
|
"examples": [
|
|
908
1114
|
{
|
|
@@ -916,7 +1122,8 @@
|
|
|
916
1122
|
}
|
|
917
1123
|
],
|
|
918
1124
|
"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 testnet HTTP query; must not inject controller state to fabricate proof."
|
|
1125
|
+
"safety_notes": "Read-only HyperLiquid testnet HTTP query; must not inject controller state to fabricate proof.",
|
|
1126
|
+
"execution_capabilities": []
|
|
920
1127
|
},
|
|
921
1128
|
{
|
|
922
1129
|
"name": "metamask.perps.ensure_positions",
|
|
@@ -925,9 +1132,6 @@
|
|
|
925
1132
|
"schema": {
|
|
926
1133
|
"type": "object",
|
|
927
1134
|
"properties": {
|
|
928
|
-
"action": {
|
|
929
|
-
"const": "metamask.perps.ensure_positions"
|
|
930
|
-
},
|
|
931
1135
|
"market": {
|
|
932
1136
|
"type": "string",
|
|
933
1137
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -960,7 +1164,41 @@
|
|
|
960
1164
|
},
|
|
961
1165
|
"selector": {
|
|
962
1166
|
"type": "object",
|
|
963
|
-
"
|
|
1167
|
+
"properties": {
|
|
1168
|
+
"mode": {
|
|
1169
|
+
"type": "string",
|
|
1170
|
+
"enum": [
|
|
1171
|
+
"matching",
|
|
1172
|
+
"all"
|
|
1173
|
+
]
|
|
1174
|
+
},
|
|
1175
|
+
"market": {
|
|
1176
|
+
"type": "string"
|
|
1177
|
+
},
|
|
1178
|
+
"symbol": {
|
|
1179
|
+
"type": "string"
|
|
1180
|
+
},
|
|
1181
|
+
"markets": {
|
|
1182
|
+
"type": "array",
|
|
1183
|
+
"items": {
|
|
1184
|
+
"type": "string"
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
"symbols": {
|
|
1188
|
+
"type": "array",
|
|
1189
|
+
"items": {
|
|
1190
|
+
"type": "string"
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
1193
|
+
"side": {
|
|
1194
|
+
"type": "string",
|
|
1195
|
+
"enum": [
|
|
1196
|
+
"long",
|
|
1197
|
+
"short"
|
|
1198
|
+
]
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
"additionalProperties": false
|
|
964
1202
|
},
|
|
965
1203
|
"side": {
|
|
966
1204
|
"type": "string",
|
|
@@ -1001,8 +1239,9 @@
|
|
|
1001
1239
|
}
|
|
1002
1240
|
},
|
|
1003
1241
|
"required": [
|
|
1004
|
-
"
|
|
1005
|
-
]
|
|
1242
|
+
"state"
|
|
1243
|
+
],
|
|
1244
|
+
"additionalProperties": false
|
|
1006
1245
|
},
|
|
1007
1246
|
"examples": [
|
|
1008
1247
|
{
|
|
@@ -1011,13 +1250,16 @@
|
|
|
1011
1250
|
"action": "metamask.perps.ensure_positions",
|
|
1012
1251
|
"state": "none",
|
|
1013
1252
|
"market": "BTC",
|
|
1014
|
-
"intent": "Converge Perps positions to the requested state via the headless controller"
|
|
1015
|
-
"network": "testnet"
|
|
1253
|
+
"intent": "Converge Perps positions to the requested state via the headless controller"
|
|
1016
1254
|
}
|
|
1017
1255
|
}
|
|
1018
1256
|
],
|
|
1019
1257
|
"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."
|
|
1258
|
+
"safety_notes": "May submit REAL signed orders to HyperLiquid testnet; must not mock the signer/provider or inject controller state to fabricate proof.",
|
|
1259
|
+
"execution_capabilities": [
|
|
1260
|
+
"app-mutation",
|
|
1261
|
+
"external-mutation"
|
|
1262
|
+
]
|
|
1021
1263
|
},
|
|
1022
1264
|
{
|
|
1023
1265
|
"name": "metamask.perps.close_orders",
|
|
@@ -1026,9 +1268,6 @@
|
|
|
1026
1268
|
"schema": {
|
|
1027
1269
|
"type": "object",
|
|
1028
1270
|
"properties": {
|
|
1029
|
-
"action": {
|
|
1030
|
-
"const": "metamask.perps.close_orders"
|
|
1031
|
-
},
|
|
1032
1271
|
"market": {
|
|
1033
1272
|
"type": "string",
|
|
1034
1273
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -1061,7 +1300,41 @@
|
|
|
1061
1300
|
},
|
|
1062
1301
|
"selector": {
|
|
1063
1302
|
"type": "object",
|
|
1064
|
-
"
|
|
1303
|
+
"properties": {
|
|
1304
|
+
"mode": {
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"enum": [
|
|
1307
|
+
"matching",
|
|
1308
|
+
"all"
|
|
1309
|
+
]
|
|
1310
|
+
},
|
|
1311
|
+
"market": {
|
|
1312
|
+
"type": "string"
|
|
1313
|
+
},
|
|
1314
|
+
"symbol": {
|
|
1315
|
+
"type": "string"
|
|
1316
|
+
},
|
|
1317
|
+
"markets": {
|
|
1318
|
+
"type": "array",
|
|
1319
|
+
"items": {
|
|
1320
|
+
"type": "string"
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
"symbols": {
|
|
1324
|
+
"type": "array",
|
|
1325
|
+
"items": {
|
|
1326
|
+
"type": "string"
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
"side": {
|
|
1330
|
+
"type": "string",
|
|
1331
|
+
"enum": [
|
|
1332
|
+
"long",
|
|
1333
|
+
"short"
|
|
1334
|
+
]
|
|
1335
|
+
}
|
|
1336
|
+
},
|
|
1337
|
+
"additionalProperties": false
|
|
1065
1338
|
},
|
|
1066
1339
|
"side": {
|
|
1067
1340
|
"type": "string",
|
|
@@ -1075,9 +1348,7 @@
|
|
|
1075
1348
|
"type": "number"
|
|
1076
1349
|
}
|
|
1077
1350
|
},
|
|
1078
|
-
"
|
|
1079
|
-
"action"
|
|
1080
|
-
]
|
|
1351
|
+
"additionalProperties": false
|
|
1081
1352
|
},
|
|
1082
1353
|
"examples": [
|
|
1083
1354
|
{
|
|
@@ -1085,8 +1356,7 @@
|
|
|
1085
1356
|
"node": {
|
|
1086
1357
|
"action": "metamask.perps.close_orders",
|
|
1087
1358
|
"mode": "all",
|
|
1088
|
-
"intent": "Cancel selected Perps orders before continuing"
|
|
1089
|
-
"network": "testnet"
|
|
1359
|
+
"intent": "Cancel selected Perps orders before continuing"
|
|
1090
1360
|
}
|
|
1091
1361
|
},
|
|
1092
1362
|
{
|
|
@@ -1094,24 +1364,24 @@
|
|
|
1094
1364
|
"node": {
|
|
1095
1365
|
"action": "metamask.perps.close_orders",
|
|
1096
1366
|
"market": "BTC",
|
|
1097
|
-
"intent": "Cancel selected Perps orders before continuing"
|
|
1098
|
-
"network": "testnet"
|
|
1367
|
+
"intent": "Cancel selected Perps orders before continuing"
|
|
1099
1368
|
}
|
|
1100
1369
|
}
|
|
1101
1370
|
],
|
|
1102
1371
|
"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."
|
|
1372
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof.",
|
|
1373
|
+
"execution_capabilities": [
|
|
1374
|
+
"app-mutation",
|
|
1375
|
+
"external-mutation"
|
|
1376
|
+
]
|
|
1104
1377
|
},
|
|
1105
1378
|
{
|
|
1106
1379
|
"name": "metamask.perps.assert_orders",
|
|
1107
1380
|
"owner": "metamask",
|
|
1108
|
-
"description": "core Assert
|
|
1381
|
+
"description": "core Assert live Perps open orders are present or absent for an explicit market selection or mode=all.",
|
|
1109
1382
|
"schema": {
|
|
1110
1383
|
"type": "object",
|
|
1111
1384
|
"properties": {
|
|
1112
|
-
"action": {
|
|
1113
|
-
"const": "metamask.perps.assert_orders"
|
|
1114
|
-
},
|
|
1115
1385
|
"market": {
|
|
1116
1386
|
"type": "string",
|
|
1117
1387
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -1144,7 +1414,41 @@
|
|
|
1144
1414
|
},
|
|
1145
1415
|
"selector": {
|
|
1146
1416
|
"type": "object",
|
|
1147
|
-
"
|
|
1417
|
+
"properties": {
|
|
1418
|
+
"mode": {
|
|
1419
|
+
"type": "string",
|
|
1420
|
+
"enum": [
|
|
1421
|
+
"matching",
|
|
1422
|
+
"all"
|
|
1423
|
+
]
|
|
1424
|
+
},
|
|
1425
|
+
"market": {
|
|
1426
|
+
"type": "string"
|
|
1427
|
+
},
|
|
1428
|
+
"symbol": {
|
|
1429
|
+
"type": "string"
|
|
1430
|
+
},
|
|
1431
|
+
"markets": {
|
|
1432
|
+
"type": "array",
|
|
1433
|
+
"items": {
|
|
1434
|
+
"type": "string"
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
"symbols": {
|
|
1438
|
+
"type": "array",
|
|
1439
|
+
"items": {
|
|
1440
|
+
"type": "string"
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
"side": {
|
|
1444
|
+
"type": "string",
|
|
1445
|
+
"enum": [
|
|
1446
|
+
"long",
|
|
1447
|
+
"short"
|
|
1448
|
+
]
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
"additionalProperties": false
|
|
1148
1452
|
},
|
|
1149
1453
|
"side": {
|
|
1150
1454
|
"type": "string",
|
|
@@ -1170,8 +1474,9 @@
|
|
|
1170
1474
|
}
|
|
1171
1475
|
},
|
|
1172
1476
|
"required": [
|
|
1173
|
-
"
|
|
1174
|
-
]
|
|
1477
|
+
"state"
|
|
1478
|
+
],
|
|
1479
|
+
"additionalProperties": false
|
|
1175
1480
|
},
|
|
1176
1481
|
"examples": [
|
|
1177
1482
|
{
|
|
@@ -1185,7 +1490,8 @@
|
|
|
1185
1490
|
}
|
|
1186
1491
|
],
|
|
1187
1492
|
"proof_effect": "E2E validation must record this action in trace.json; live-proof actions include liveAdapter/proofPath or target runtime output.",
|
|
1188
|
-
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof."
|
|
1493
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof.",
|
|
1494
|
+
"execution_capabilities": []
|
|
1189
1495
|
},
|
|
1190
1496
|
{
|
|
1191
1497
|
"name": "metamask.perps.ensure_orders",
|
|
@@ -1194,9 +1500,6 @@
|
|
|
1194
1500
|
"schema": {
|
|
1195
1501
|
"type": "object",
|
|
1196
1502
|
"properties": {
|
|
1197
|
-
"action": {
|
|
1198
|
-
"const": "metamask.perps.ensure_orders"
|
|
1199
|
-
},
|
|
1200
1503
|
"market": {
|
|
1201
1504
|
"type": "string",
|
|
1202
1505
|
"description": "Single market symbol, e.g. BTC or ETH. Alias: symbol."
|
|
@@ -1229,7 +1532,41 @@
|
|
|
1229
1532
|
},
|
|
1230
1533
|
"selector": {
|
|
1231
1534
|
"type": "object",
|
|
1232
|
-
"
|
|
1535
|
+
"properties": {
|
|
1536
|
+
"mode": {
|
|
1537
|
+
"type": "string",
|
|
1538
|
+
"enum": [
|
|
1539
|
+
"matching",
|
|
1540
|
+
"all"
|
|
1541
|
+
]
|
|
1542
|
+
},
|
|
1543
|
+
"market": {
|
|
1544
|
+
"type": "string"
|
|
1545
|
+
},
|
|
1546
|
+
"symbol": {
|
|
1547
|
+
"type": "string"
|
|
1548
|
+
},
|
|
1549
|
+
"markets": {
|
|
1550
|
+
"type": "array",
|
|
1551
|
+
"items": {
|
|
1552
|
+
"type": "string"
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1555
|
+
"symbols": {
|
|
1556
|
+
"type": "array",
|
|
1557
|
+
"items": {
|
|
1558
|
+
"type": "string"
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
"side": {
|
|
1562
|
+
"type": "string",
|
|
1563
|
+
"enum": [
|
|
1564
|
+
"long",
|
|
1565
|
+
"short"
|
|
1566
|
+
]
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
"additionalProperties": false
|
|
1233
1570
|
},
|
|
1234
1571
|
"side": {
|
|
1235
1572
|
"type": "string",
|
|
@@ -1255,8 +1592,9 @@
|
|
|
1255
1592
|
}
|
|
1256
1593
|
},
|
|
1257
1594
|
"required": [
|
|
1258
|
-
"
|
|
1259
|
-
]
|
|
1595
|
+
"state"
|
|
1596
|
+
],
|
|
1597
|
+
"additionalProperties": false
|
|
1260
1598
|
},
|
|
1261
1599
|
"examples": [
|
|
1262
1600
|
{
|
|
@@ -1265,13 +1603,16 @@
|
|
|
1265
1603
|
"action": "metamask.perps.ensure_orders",
|
|
1266
1604
|
"state": "none",
|
|
1267
1605
|
"mode": "all",
|
|
1268
|
-
"intent": "Converge Perps orders to the requested state"
|
|
1269
|
-
"network": "testnet"
|
|
1606
|
+
"intent": "Converge Perps orders to the requested state"
|
|
1270
1607
|
}
|
|
1271
1608
|
}
|
|
1272
1609
|
],
|
|
1273
1610
|
"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."
|
|
1611
|
+
"safety_notes": "Must not inject mid-recipe UI/app state to fabricate proof.",
|
|
1612
|
+
"execution_capabilities": [
|
|
1613
|
+
"app-mutation",
|
|
1614
|
+
"external-mutation"
|
|
1615
|
+
]
|
|
1275
1616
|
},
|
|
1276
1617
|
{
|
|
1277
1618
|
"name": "metamask.perps.start_state",
|
|
@@ -1280,9 +1621,6 @@
|
|
|
1280
1621
|
"schema": {
|
|
1281
1622
|
"type": "object",
|
|
1282
1623
|
"properties": {
|
|
1283
|
-
"action": {
|
|
1284
|
-
"const": "metamask.perps.start_state"
|
|
1285
|
-
},
|
|
1286
1624
|
"profile": {
|
|
1287
1625
|
"type": "string",
|
|
1288
1626
|
"description": "Optional profile such as clean_market_testnet, open_position_testnet, open_order_testnet, or provider_mainnet_readonly."
|
|
@@ -1320,34 +1658,249 @@
|
|
|
1320
1658
|
}
|
|
1321
1659
|
},
|
|
1322
1660
|
"positions": {
|
|
1323
|
-
"
|
|
1324
|
-
|
|
1325
|
-
|
|
1661
|
+
"type": [
|
|
1662
|
+
"object",
|
|
1663
|
+
"boolean"
|
|
1664
|
+
],
|
|
1665
|
+
"properties": {
|
|
1666
|
+
"mode": {
|
|
1667
|
+
"type": "string",
|
|
1668
|
+
"enum": [
|
|
1669
|
+
"matching",
|
|
1670
|
+
"all"
|
|
1671
|
+
]
|
|
1326
1672
|
},
|
|
1327
|
-
{
|
|
1328
|
-
"
|
|
1673
|
+
"market": {
|
|
1674
|
+
"type": "string"
|
|
1675
|
+
},
|
|
1676
|
+
"symbol": {
|
|
1677
|
+
"type": "string"
|
|
1678
|
+
},
|
|
1679
|
+
"markets": {
|
|
1680
|
+
"type": "array",
|
|
1681
|
+
"items": {
|
|
1682
|
+
"type": "string"
|
|
1683
|
+
}
|
|
1684
|
+
},
|
|
1685
|
+
"symbols": {
|
|
1686
|
+
"type": "array",
|
|
1687
|
+
"items": {
|
|
1688
|
+
"type": "string"
|
|
1689
|
+
}
|
|
1690
|
+
},
|
|
1691
|
+
"side": {
|
|
1692
|
+
"type": "string",
|
|
1693
|
+
"enum": [
|
|
1694
|
+
"long",
|
|
1695
|
+
"short"
|
|
1696
|
+
]
|
|
1697
|
+
},
|
|
1698
|
+
"state": {
|
|
1699
|
+
"type": "string",
|
|
1700
|
+
"enum": [
|
|
1701
|
+
"none",
|
|
1702
|
+
"closed",
|
|
1703
|
+
"absent",
|
|
1704
|
+
"open",
|
|
1705
|
+
"present"
|
|
1706
|
+
]
|
|
1707
|
+
},
|
|
1708
|
+
"amount": {
|
|
1709
|
+
"type": [
|
|
1710
|
+
"string",
|
|
1711
|
+
"number"
|
|
1712
|
+
]
|
|
1713
|
+
},
|
|
1714
|
+
"notional": {
|
|
1715
|
+
"type": [
|
|
1716
|
+
"string",
|
|
1717
|
+
"number"
|
|
1718
|
+
]
|
|
1719
|
+
},
|
|
1720
|
+
"size": {
|
|
1721
|
+
"type": [
|
|
1722
|
+
"string",
|
|
1723
|
+
"number"
|
|
1724
|
+
]
|
|
1725
|
+
},
|
|
1726
|
+
"leverage": {
|
|
1727
|
+
"type": "number"
|
|
1728
|
+
},
|
|
1729
|
+
"order_type": {
|
|
1730
|
+
"type": "string"
|
|
1731
|
+
},
|
|
1732
|
+
"orderType": {
|
|
1733
|
+
"type": "string"
|
|
1734
|
+
},
|
|
1735
|
+
"limit_price": {
|
|
1736
|
+
"type": "number"
|
|
1737
|
+
},
|
|
1738
|
+
"limitPrice": {
|
|
1739
|
+
"type": "number"
|
|
1740
|
+
},
|
|
1741
|
+
"offset_pct": {
|
|
1742
|
+
"type": "number"
|
|
1743
|
+
},
|
|
1744
|
+
"offsetPct": {
|
|
1745
|
+
"type": "number"
|
|
1746
|
+
},
|
|
1747
|
+
"current_price": {
|
|
1748
|
+
"type": "number"
|
|
1749
|
+
},
|
|
1750
|
+
"currentPrice": {
|
|
1751
|
+
"type": "number"
|
|
1752
|
+
},
|
|
1753
|
+
"max_slippage_bps": {
|
|
1754
|
+
"type": "number"
|
|
1755
|
+
},
|
|
1756
|
+
"maxSlippageBps": {
|
|
1757
|
+
"type": "number"
|
|
1758
|
+
},
|
|
1759
|
+
"close_attempts": {
|
|
1760
|
+
"type": "integer"
|
|
1761
|
+
},
|
|
1762
|
+
"close_retry_delay_ms": {
|
|
1763
|
+
"type": "integer"
|
|
1764
|
+
},
|
|
1765
|
+
"timeout_ms": {
|
|
1766
|
+
"type": "number"
|
|
1329
1767
|
}
|
|
1330
|
-
|
|
1331
|
-
"
|
|
1768
|
+
},
|
|
1769
|
+
"additionalProperties": false
|
|
1332
1770
|
},
|
|
1333
1771
|
"orders": {
|
|
1334
|
-
"
|
|
1335
|
-
|
|
1336
|
-
|
|
1772
|
+
"type": [
|
|
1773
|
+
"object",
|
|
1774
|
+
"boolean"
|
|
1775
|
+
],
|
|
1776
|
+
"properties": {
|
|
1777
|
+
"mode": {
|
|
1778
|
+
"type": "string",
|
|
1779
|
+
"enum": [
|
|
1780
|
+
"matching",
|
|
1781
|
+
"all"
|
|
1782
|
+
]
|
|
1337
1783
|
},
|
|
1338
|
-
{
|
|
1339
|
-
"
|
|
1784
|
+
"market": {
|
|
1785
|
+
"type": "string"
|
|
1786
|
+
},
|
|
1787
|
+
"symbol": {
|
|
1788
|
+
"type": "string"
|
|
1789
|
+
},
|
|
1790
|
+
"markets": {
|
|
1791
|
+
"type": "array",
|
|
1792
|
+
"items": {
|
|
1793
|
+
"type": "string"
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
"symbols": {
|
|
1797
|
+
"type": "array",
|
|
1798
|
+
"items": {
|
|
1799
|
+
"type": "string"
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
"side": {
|
|
1803
|
+
"type": "string",
|
|
1804
|
+
"enum": [
|
|
1805
|
+
"long",
|
|
1806
|
+
"short"
|
|
1807
|
+
]
|
|
1808
|
+
},
|
|
1809
|
+
"state": {
|
|
1810
|
+
"type": "string",
|
|
1811
|
+
"enum": [
|
|
1812
|
+
"none",
|
|
1813
|
+
"closed",
|
|
1814
|
+
"absent",
|
|
1815
|
+
"open",
|
|
1816
|
+
"present"
|
|
1817
|
+
]
|
|
1818
|
+
},
|
|
1819
|
+
"amount": {
|
|
1820
|
+
"type": [
|
|
1821
|
+
"string",
|
|
1822
|
+
"number"
|
|
1823
|
+
]
|
|
1824
|
+
},
|
|
1825
|
+
"notional": {
|
|
1826
|
+
"type": [
|
|
1827
|
+
"string",
|
|
1828
|
+
"number"
|
|
1829
|
+
]
|
|
1830
|
+
},
|
|
1831
|
+
"size": {
|
|
1832
|
+
"type": [
|
|
1833
|
+
"string",
|
|
1834
|
+
"number"
|
|
1835
|
+
]
|
|
1836
|
+
},
|
|
1837
|
+
"leverage": {
|
|
1838
|
+
"type": "number"
|
|
1839
|
+
},
|
|
1840
|
+
"order_type": {
|
|
1841
|
+
"type": "string"
|
|
1842
|
+
},
|
|
1843
|
+
"orderType": {
|
|
1844
|
+
"type": "string"
|
|
1845
|
+
},
|
|
1846
|
+
"limit_price": {
|
|
1847
|
+
"type": "number"
|
|
1848
|
+
},
|
|
1849
|
+
"limitPrice": {
|
|
1850
|
+
"type": "number"
|
|
1851
|
+
},
|
|
1852
|
+
"offset_pct": {
|
|
1853
|
+
"type": "number"
|
|
1854
|
+
},
|
|
1855
|
+
"offsetPct": {
|
|
1856
|
+
"type": "number"
|
|
1857
|
+
},
|
|
1858
|
+
"current_price": {
|
|
1859
|
+
"type": "number"
|
|
1860
|
+
},
|
|
1861
|
+
"currentPrice": {
|
|
1862
|
+
"type": "number"
|
|
1863
|
+
},
|
|
1864
|
+
"max_slippage_bps": {
|
|
1865
|
+
"type": "number"
|
|
1866
|
+
},
|
|
1867
|
+
"maxSlippageBps": {
|
|
1868
|
+
"type": "number"
|
|
1869
|
+
},
|
|
1870
|
+
"close_attempts": {
|
|
1871
|
+
"type": "integer"
|
|
1872
|
+
},
|
|
1873
|
+
"close_retry_delay_ms": {
|
|
1874
|
+
"type": "integer"
|
|
1875
|
+
},
|
|
1876
|
+
"timeout_ms": {
|
|
1877
|
+
"type": "number"
|
|
1340
1878
|
}
|
|
1341
|
-
|
|
1342
|
-
"
|
|
1879
|
+
},
|
|
1880
|
+
"additionalProperties": false
|
|
1343
1881
|
},
|
|
1344
1882
|
"timeout_ms": {
|
|
1345
1883
|
"type": "number"
|
|
1884
|
+
},
|
|
1885
|
+
"side": {
|
|
1886
|
+
"type": "string",
|
|
1887
|
+
"enum": [
|
|
1888
|
+
"long",
|
|
1889
|
+
"short"
|
|
1890
|
+
]
|
|
1891
|
+
},
|
|
1892
|
+
"account_name": {
|
|
1893
|
+
"type": "string"
|
|
1894
|
+
},
|
|
1895
|
+
"mode": {
|
|
1896
|
+
"type": "string",
|
|
1897
|
+
"enum": [
|
|
1898
|
+
"matching",
|
|
1899
|
+
"all"
|
|
1900
|
+
]
|
|
1346
1901
|
}
|
|
1347
1902
|
},
|
|
1348
|
-
"
|
|
1349
|
-
"action"
|
|
1350
|
-
]
|
|
1903
|
+
"additionalProperties": false
|
|
1351
1904
|
},
|
|
1352
1905
|
"examples": [
|
|
1353
1906
|
{
|
|
@@ -1384,7 +1937,11 @@
|
|
|
1384
1937
|
}
|
|
1385
1938
|
],
|
|
1386
1939
|
"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."
|
|
1940
|
+
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof.",
|
|
1941
|
+
"execution_capabilities": [
|
|
1942
|
+
"app-mutation",
|
|
1943
|
+
"external-mutation"
|
|
1944
|
+
]
|
|
1388
1945
|
},
|
|
1389
1946
|
{
|
|
1390
1947
|
"name": "metamask.perps.teardown_state",
|
|
@@ -1393,9 +1950,6 @@
|
|
|
1393
1950
|
"schema": {
|
|
1394
1951
|
"type": "object",
|
|
1395
1952
|
"properties": {
|
|
1396
|
-
"action": {
|
|
1397
|
-
"const": "metamask.perps.teardown_state"
|
|
1398
|
-
},
|
|
1399
1953
|
"profile": {
|
|
1400
1954
|
"type": "string",
|
|
1401
1955
|
"description": "Optional profile such as clean_market_testnet, open_position_testnet, open_order_testnet, or provider_mainnet_readonly."
|
|
@@ -1433,34 +1987,249 @@
|
|
|
1433
1987
|
}
|
|
1434
1988
|
},
|
|
1435
1989
|
"positions": {
|
|
1436
|
-
"
|
|
1437
|
-
|
|
1438
|
-
|
|
1990
|
+
"type": [
|
|
1991
|
+
"object",
|
|
1992
|
+
"boolean"
|
|
1993
|
+
],
|
|
1994
|
+
"properties": {
|
|
1995
|
+
"mode": {
|
|
1996
|
+
"type": "string",
|
|
1997
|
+
"enum": [
|
|
1998
|
+
"matching",
|
|
1999
|
+
"all"
|
|
2000
|
+
]
|
|
1439
2001
|
},
|
|
1440
|
-
{
|
|
1441
|
-
"
|
|
2002
|
+
"market": {
|
|
2003
|
+
"type": "string"
|
|
2004
|
+
},
|
|
2005
|
+
"symbol": {
|
|
2006
|
+
"type": "string"
|
|
2007
|
+
},
|
|
2008
|
+
"markets": {
|
|
2009
|
+
"type": "array",
|
|
2010
|
+
"items": {
|
|
2011
|
+
"type": "string"
|
|
2012
|
+
}
|
|
2013
|
+
},
|
|
2014
|
+
"symbols": {
|
|
2015
|
+
"type": "array",
|
|
2016
|
+
"items": {
|
|
2017
|
+
"type": "string"
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
"side": {
|
|
2021
|
+
"type": "string",
|
|
2022
|
+
"enum": [
|
|
2023
|
+
"long",
|
|
2024
|
+
"short"
|
|
2025
|
+
]
|
|
2026
|
+
},
|
|
2027
|
+
"state": {
|
|
2028
|
+
"type": "string",
|
|
2029
|
+
"enum": [
|
|
2030
|
+
"none",
|
|
2031
|
+
"closed",
|
|
2032
|
+
"absent",
|
|
2033
|
+
"open",
|
|
2034
|
+
"present"
|
|
2035
|
+
]
|
|
2036
|
+
},
|
|
2037
|
+
"amount": {
|
|
2038
|
+
"type": [
|
|
2039
|
+
"string",
|
|
2040
|
+
"number"
|
|
2041
|
+
]
|
|
2042
|
+
},
|
|
2043
|
+
"notional": {
|
|
2044
|
+
"type": [
|
|
2045
|
+
"string",
|
|
2046
|
+
"number"
|
|
2047
|
+
]
|
|
2048
|
+
},
|
|
2049
|
+
"size": {
|
|
2050
|
+
"type": [
|
|
2051
|
+
"string",
|
|
2052
|
+
"number"
|
|
2053
|
+
]
|
|
2054
|
+
},
|
|
2055
|
+
"leverage": {
|
|
2056
|
+
"type": "number"
|
|
2057
|
+
},
|
|
2058
|
+
"order_type": {
|
|
2059
|
+
"type": "string"
|
|
2060
|
+
},
|
|
2061
|
+
"orderType": {
|
|
2062
|
+
"type": "string"
|
|
2063
|
+
},
|
|
2064
|
+
"limit_price": {
|
|
2065
|
+
"type": "number"
|
|
2066
|
+
},
|
|
2067
|
+
"limitPrice": {
|
|
2068
|
+
"type": "number"
|
|
2069
|
+
},
|
|
2070
|
+
"offset_pct": {
|
|
2071
|
+
"type": "number"
|
|
2072
|
+
},
|
|
2073
|
+
"offsetPct": {
|
|
2074
|
+
"type": "number"
|
|
2075
|
+
},
|
|
2076
|
+
"current_price": {
|
|
2077
|
+
"type": "number"
|
|
2078
|
+
},
|
|
2079
|
+
"currentPrice": {
|
|
2080
|
+
"type": "number"
|
|
2081
|
+
},
|
|
2082
|
+
"max_slippage_bps": {
|
|
2083
|
+
"type": "number"
|
|
2084
|
+
},
|
|
2085
|
+
"maxSlippageBps": {
|
|
2086
|
+
"type": "number"
|
|
2087
|
+
},
|
|
2088
|
+
"close_attempts": {
|
|
2089
|
+
"type": "integer"
|
|
2090
|
+
},
|
|
2091
|
+
"close_retry_delay_ms": {
|
|
2092
|
+
"type": "integer"
|
|
2093
|
+
},
|
|
2094
|
+
"timeout_ms": {
|
|
2095
|
+
"type": "number"
|
|
1442
2096
|
}
|
|
1443
|
-
|
|
1444
|
-
"
|
|
2097
|
+
},
|
|
2098
|
+
"additionalProperties": false
|
|
1445
2099
|
},
|
|
1446
2100
|
"orders": {
|
|
1447
|
-
"
|
|
1448
|
-
|
|
1449
|
-
|
|
2101
|
+
"type": [
|
|
2102
|
+
"object",
|
|
2103
|
+
"boolean"
|
|
2104
|
+
],
|
|
2105
|
+
"properties": {
|
|
2106
|
+
"mode": {
|
|
2107
|
+
"type": "string",
|
|
2108
|
+
"enum": [
|
|
2109
|
+
"matching",
|
|
2110
|
+
"all"
|
|
2111
|
+
]
|
|
1450
2112
|
},
|
|
1451
|
-
{
|
|
1452
|
-
"
|
|
2113
|
+
"market": {
|
|
2114
|
+
"type": "string"
|
|
2115
|
+
},
|
|
2116
|
+
"symbol": {
|
|
2117
|
+
"type": "string"
|
|
2118
|
+
},
|
|
2119
|
+
"markets": {
|
|
2120
|
+
"type": "array",
|
|
2121
|
+
"items": {
|
|
2122
|
+
"type": "string"
|
|
2123
|
+
}
|
|
2124
|
+
},
|
|
2125
|
+
"symbols": {
|
|
2126
|
+
"type": "array",
|
|
2127
|
+
"items": {
|
|
2128
|
+
"type": "string"
|
|
2129
|
+
}
|
|
2130
|
+
},
|
|
2131
|
+
"side": {
|
|
2132
|
+
"type": "string",
|
|
2133
|
+
"enum": [
|
|
2134
|
+
"long",
|
|
2135
|
+
"short"
|
|
2136
|
+
]
|
|
2137
|
+
},
|
|
2138
|
+
"state": {
|
|
2139
|
+
"type": "string",
|
|
2140
|
+
"enum": [
|
|
2141
|
+
"none",
|
|
2142
|
+
"closed",
|
|
2143
|
+
"absent",
|
|
2144
|
+
"open",
|
|
2145
|
+
"present"
|
|
2146
|
+
]
|
|
2147
|
+
},
|
|
2148
|
+
"amount": {
|
|
2149
|
+
"type": [
|
|
2150
|
+
"string",
|
|
2151
|
+
"number"
|
|
2152
|
+
]
|
|
2153
|
+
},
|
|
2154
|
+
"notional": {
|
|
2155
|
+
"type": [
|
|
2156
|
+
"string",
|
|
2157
|
+
"number"
|
|
2158
|
+
]
|
|
2159
|
+
},
|
|
2160
|
+
"size": {
|
|
2161
|
+
"type": [
|
|
2162
|
+
"string",
|
|
2163
|
+
"number"
|
|
2164
|
+
]
|
|
2165
|
+
},
|
|
2166
|
+
"leverage": {
|
|
2167
|
+
"type": "number"
|
|
2168
|
+
},
|
|
2169
|
+
"order_type": {
|
|
2170
|
+
"type": "string"
|
|
2171
|
+
},
|
|
2172
|
+
"orderType": {
|
|
2173
|
+
"type": "string"
|
|
2174
|
+
},
|
|
2175
|
+
"limit_price": {
|
|
2176
|
+
"type": "number"
|
|
2177
|
+
},
|
|
2178
|
+
"limitPrice": {
|
|
2179
|
+
"type": "number"
|
|
2180
|
+
},
|
|
2181
|
+
"offset_pct": {
|
|
2182
|
+
"type": "number"
|
|
2183
|
+
},
|
|
2184
|
+
"offsetPct": {
|
|
2185
|
+
"type": "number"
|
|
2186
|
+
},
|
|
2187
|
+
"current_price": {
|
|
2188
|
+
"type": "number"
|
|
2189
|
+
},
|
|
2190
|
+
"currentPrice": {
|
|
2191
|
+
"type": "number"
|
|
2192
|
+
},
|
|
2193
|
+
"max_slippage_bps": {
|
|
2194
|
+
"type": "number"
|
|
2195
|
+
},
|
|
2196
|
+
"maxSlippageBps": {
|
|
2197
|
+
"type": "number"
|
|
2198
|
+
},
|
|
2199
|
+
"close_attempts": {
|
|
2200
|
+
"type": "integer"
|
|
2201
|
+
},
|
|
2202
|
+
"close_retry_delay_ms": {
|
|
2203
|
+
"type": "integer"
|
|
2204
|
+
},
|
|
2205
|
+
"timeout_ms": {
|
|
2206
|
+
"type": "number"
|
|
1453
2207
|
}
|
|
1454
|
-
|
|
1455
|
-
"
|
|
2208
|
+
},
|
|
2209
|
+
"additionalProperties": false
|
|
1456
2210
|
},
|
|
1457
2211
|
"timeout_ms": {
|
|
1458
2212
|
"type": "number"
|
|
2213
|
+
},
|
|
2214
|
+
"side": {
|
|
2215
|
+
"type": "string",
|
|
2216
|
+
"enum": [
|
|
2217
|
+
"long",
|
|
2218
|
+
"short"
|
|
2219
|
+
]
|
|
2220
|
+
},
|
|
2221
|
+
"account_name": {
|
|
2222
|
+
"type": "string"
|
|
2223
|
+
},
|
|
2224
|
+
"mode": {
|
|
2225
|
+
"type": "string",
|
|
2226
|
+
"enum": [
|
|
2227
|
+
"matching",
|
|
2228
|
+
"all"
|
|
2229
|
+
]
|
|
1459
2230
|
}
|
|
1460
2231
|
},
|
|
1461
|
-
"
|
|
1462
|
-
"action"
|
|
1463
|
-
]
|
|
2232
|
+
"additionalProperties": false
|
|
1464
2233
|
},
|
|
1465
2234
|
"examples": [
|
|
1466
2235
|
{
|
|
@@ -1487,19 +2256,11 @@
|
|
|
1487
2256
|
}
|
|
1488
2257
|
],
|
|
1489
2258
|
"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."
|
|
2259
|
+
"safety_notes": "Composes supported app/API paths and must not mutate React/Redux/MobX/DOM/local storage to fabricate proof.",
|
|
2260
|
+
"execution_capabilities": [
|
|
2261
|
+
"app-mutation",
|
|
2262
|
+
"external-mutation"
|
|
2263
|
+
]
|
|
1503
2264
|
}
|
|
1504
2265
|
],
|
|
1505
2266
|
"native_bindings": [
|
|
@@ -1575,9 +2336,5 @@
|
|
|
1575
2336
|
"action": "metamask.perps.ensure_positions",
|
|
1576
2337
|
"implementation": "@metamask/recipe-runner/core/perps"
|
|
1577
2338
|
}
|
|
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": []
|
|
2339
|
+
]
|
|
1583
2340
|
}
|