@deeeed/metamask-harness 0.45.1 → 0.47.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 +32 -0
- package/README.md +1 -1
- package/adapters/manifest.json +12 -4
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +12 -3
- package/adapters/mobile/wait-for-bridge.cjs +550 -0
- package/adapters/mobile/wait-for-bridge.sh +11 -148
- package/bin/mm-harness +7 -2
- package/dist/adapters/mobile/prepare.js +26 -18
- package/dist/adapters/mobile/runtime-decision.js +1 -0
- package/dist/cli-commands.js +2 -0
- package/dist/command-contract.js +7 -0
- package/dist/commands/checklist.js +1 -0
- package/dist/commands/help.js +76 -0
- package/dist/commands/parse-args.js +2 -1
- package/dist/commands/recipe-quality.js +1 -1
- package/dist/commands/tutorial.js +46 -0
- package/dist/mm-harness-cli.js +45 -6
- package/docs/CONTRIBUTING.md +2 -0
- package/docs/QA.md +2 -2
- package/library/actions/mobile/perps/perps.mjs +750 -35
- package/library/manifests/mobile.action-manifest.json +101 -6
- package/library/recipes/mobile/perps/chase-assert-running.recipe.json +110 -0
- package/library/recipes/mobile/perps/chase-place.recipe.json +145 -0
- package/library/recipes/mobile/perps/chase-terminate.recipe.json +98 -0
- package/library/recipes/mobile/perps/pro-order-setup.recipe.json +111 -0
- package/library/recipes/mobile/perps/pro-order-start-state.recipe.json +53 -0
- package/library/recipes/mobile/perps/scale-assert-orders.recipe.json +126 -0
- package/library/recipes/mobile/perps/scale-place.recipe.json +186 -0
- package/library/recipes/mobile/perps/twap-assert-active.recipe.json +97 -0
- package/library/recipes/mobile/perps/twap-place.recipe.json +146 -0
- package/package.json +1 -1
- package/scripts/site-contrast.mjs +6 -2
- package/site/architecture.html +3 -3
- package/site/assets/help-recipes.json +113 -0
- package/site/assets/help-recipes.mjs +25 -0
- package/site/assets/progress.mjs +2 -0
- package/site/ecosystem.html +2 -2
- package/site/how-it-works.html +5 -0
- package/site/index.html +65 -13
- package/site/perps-advanced-orders-qa.html +96 -0
- package/site/perps.html +11 -0
- package/site/recipes.html +7 -0
- package/site/tutorials/v1.html +4 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Assert Mobile Pro Scale child orders",
|
|
4
|
+
"description": "Opens the standard Orders tab and proves the selected Scale ladder produced the requested number of child orders.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["account"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"account": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Exact fixture account name, such as Trading or dev1."
|
|
13
|
+
},
|
|
14
|
+
"provider": { "type": "string", "default": "hyperliquid" },
|
|
15
|
+
"network": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["testnet", "mainnet"],
|
|
18
|
+
"default": "testnet",
|
|
19
|
+
"description": "Assertions are read-only and may inspect either network."
|
|
20
|
+
},
|
|
21
|
+
"market": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"default": "BTC"
|
|
24
|
+
},
|
|
25
|
+
"orders": {
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"enum": [3],
|
|
28
|
+
"default": 3
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"workflow": {
|
|
33
|
+
"entry": "prepare",
|
|
34
|
+
"nodes": {
|
|
35
|
+
"prepare": {
|
|
36
|
+
"action": "call",
|
|
37
|
+
"ref": "perps.pro-order-start-state",
|
|
38
|
+
"params": {
|
|
39
|
+
"account": "{{params.account}}",
|
|
40
|
+
"provider": "{{params.provider}}",
|
|
41
|
+
"network": "{{params.network}}",
|
|
42
|
+
"market": "{{params.market}}"
|
|
43
|
+
},
|
|
44
|
+
"intent": "Reach and prove the requested Pro market without changing Scale orders.",
|
|
45
|
+
"next": "position-tab"
|
|
46
|
+
},
|
|
47
|
+
"position-tab": {
|
|
48
|
+
"action": "ui.scroll",
|
|
49
|
+
"test_id": "perps-pro-market-positions-panel-tab-orders",
|
|
50
|
+
"scroll_into_view": true,
|
|
51
|
+
"intent": "Expose the standard Orders tab for visible review.",
|
|
52
|
+
"next": "wait-tab"
|
|
53
|
+
},
|
|
54
|
+
"wait-tab": {
|
|
55
|
+
"action": "ui.wait_for",
|
|
56
|
+
"test_id": "perps-pro-market-positions-panel-tab-orders",
|
|
57
|
+
"expected": "visible",
|
|
58
|
+
"timeout_ms": 15000,
|
|
59
|
+
"intent": "Require the standard Orders tab to be visible.",
|
|
60
|
+
"next": "open-tab"
|
|
61
|
+
},
|
|
62
|
+
"open-tab": {
|
|
63
|
+
"action": "ui.press",
|
|
64
|
+
"test_id": "perps-pro-market-positions-panel-tab-orders",
|
|
65
|
+
"intent": "Open the standard order list.",
|
|
66
|
+
"next": "wait-first-child"
|
|
67
|
+
},
|
|
68
|
+
"wait-first-child": {
|
|
69
|
+
"action": "ui.wait_for",
|
|
70
|
+
"test_id": "perps-pro-market-order-row-{{params.market}}-0",
|
|
71
|
+
"expected": "visible",
|
|
72
|
+
"timeout_ms": 15000,
|
|
73
|
+
"intent": "Require a visible standard child order for the selected market.",
|
|
74
|
+
"next": "capture-first-child"
|
|
75
|
+
},
|
|
76
|
+
"capture-first-child": {
|
|
77
|
+
"action": "ui.screenshot",
|
|
78
|
+
"path": "screenshots/evidence-scale-orders-first-{{params.market}}.png",
|
|
79
|
+
"label": "The standard Orders tab shows the Scale count and first child Limit order.",
|
|
80
|
+
"intent": "Preserve the visible Scale order count and first child for review.",
|
|
81
|
+
"next": "position-second-child"
|
|
82
|
+
},
|
|
83
|
+
"position-second-child": {
|
|
84
|
+
"action": "ui.scroll",
|
|
85
|
+
"test_id": "perps-pro-market-order-row-{{params.market}}-1",
|
|
86
|
+
"scroll_into_view": true,
|
|
87
|
+
"intent": "Expose the second Scale child order.",
|
|
88
|
+
"next": "wait-second-child"
|
|
89
|
+
},
|
|
90
|
+
"wait-second-child": {
|
|
91
|
+
"action": "ui.wait_for",
|
|
92
|
+
"test_id": "perps-pro-market-order-row-{{params.market}}-1",
|
|
93
|
+
"expected": "visible",
|
|
94
|
+
"timeout_ms": 15000,
|
|
95
|
+
"intent": "Require the second visible Scale child order for the selected market.",
|
|
96
|
+
"next": "position-third-child"
|
|
97
|
+
},
|
|
98
|
+
"position-third-child": {
|
|
99
|
+
"action": "ui.scroll",
|
|
100
|
+
"test_id": "perps-pro-market-order-row-{{params.market}}-2",
|
|
101
|
+
"scroll_into_view": true,
|
|
102
|
+
"intent": "Expose the third Scale child order.",
|
|
103
|
+
"next": "wait-third-child"
|
|
104
|
+
},
|
|
105
|
+
"wait-third-child": {
|
|
106
|
+
"action": "ui.wait_for",
|
|
107
|
+
"test_id": "perps-pro-market-order-row-{{params.market}}-2",
|
|
108
|
+
"expected": "visible",
|
|
109
|
+
"timeout_ms": 15000,
|
|
110
|
+
"intent": "Require the third visible Scale child order for the selected market.",
|
|
111
|
+
"next": "capture"
|
|
112
|
+
},
|
|
113
|
+
"capture": {
|
|
114
|
+
"action": "ui.screenshot",
|
|
115
|
+
"path": "screenshots/evidence-scale-orders-{{params.market}}.png",
|
|
116
|
+
"label": "The standard Orders tab shows the second and third Scale child Limit orders.",
|
|
117
|
+
"intent": "Preserve the visible lower Scale child orders for review.",
|
|
118
|
+
"next": "done"
|
|
119
|
+
},
|
|
120
|
+
"done": {
|
|
121
|
+
"action": "end",
|
|
122
|
+
"status": "pass"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Place a Mobile Pro Scale order",
|
|
4
|
+
"description": "Places a parameterized Scale ladder through visible Mobile Pro controls, cleaning only the testnet path.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["account"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"account": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Exact fixture account name, such as Trading or dev1."
|
|
13
|
+
},
|
|
14
|
+
"provider": { "type": "string", "default": "hyperliquid" },
|
|
15
|
+
"network": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["testnet", "mainnet"],
|
|
18
|
+
"default": "testnet",
|
|
19
|
+
"description": "Mainnet placement requires an explicit user request."
|
|
20
|
+
},
|
|
21
|
+
"market": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"default": "BTC"
|
|
24
|
+
},
|
|
25
|
+
"side": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"long",
|
|
29
|
+
"short"
|
|
30
|
+
],
|
|
31
|
+
"default": "long"
|
|
32
|
+
},
|
|
33
|
+
"notional": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"default": "100"
|
|
36
|
+
},
|
|
37
|
+
"orders": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"default": "3"
|
|
40
|
+
},
|
|
41
|
+
"skew": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"default": "1"
|
|
44
|
+
},
|
|
45
|
+
"start_price": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"default": "70000",
|
|
48
|
+
"description": "Lower ladder price; override when changing market."
|
|
49
|
+
},
|
|
50
|
+
"end_price": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"default": "75000",
|
|
53
|
+
"description": "Upper ladder price; override when changing market."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"workflow": {
|
|
58
|
+
"entry": "prepare",
|
|
59
|
+
"nodes": {
|
|
60
|
+
"prepare": {
|
|
61
|
+
"action": "call",
|
|
62
|
+
"ref": "perps.pro-order-setup",
|
|
63
|
+
"params": {
|
|
64
|
+
"account": "{{params.account}}",
|
|
65
|
+
"provider": "{{params.provider}}",
|
|
66
|
+
"network": "{{params.network}}",
|
|
67
|
+
"market": "{{params.market}}",
|
|
68
|
+
"side": "{{params.side}}"
|
|
69
|
+
},
|
|
70
|
+
"intent": "Prepare the requested Pro order form and Advanced picker.",
|
|
71
|
+
"next": "position-scale"
|
|
72
|
+
},
|
|
73
|
+
"position-scale": {
|
|
74
|
+
"action": "ui.scroll",
|
|
75
|
+
"test_id": "perps-order-type-scale",
|
|
76
|
+
"scroll_into_view": true,
|
|
77
|
+
"intent": "Expose the Scale option for visible selection.",
|
|
78
|
+
"next": "wait-scale"
|
|
79
|
+
},
|
|
80
|
+
"wait-scale": {
|
|
81
|
+
"action": "ui.wait_for",
|
|
82
|
+
"test_id": "perps-order-type-scale",
|
|
83
|
+
"expected": "visible",
|
|
84
|
+
"timeout_ms": 10000,
|
|
85
|
+
"intent": "Fail closed unless Scale is visibly offered.",
|
|
86
|
+
"next": "select-scale"
|
|
87
|
+
},
|
|
88
|
+
"select-scale": {
|
|
89
|
+
"action": "ui.press",
|
|
90
|
+
"test_id": "perps-order-type-scale",
|
|
91
|
+
"intent": "Select Scale.",
|
|
92
|
+
"next": "position-fields"
|
|
93
|
+
},
|
|
94
|
+
"position-fields": {
|
|
95
|
+
"action": "ui.scroll",
|
|
96
|
+
"test_id": "perps-pro-order-form-scale-fields",
|
|
97
|
+
"scroll_into_view": true,
|
|
98
|
+
"intent": "Expose the Scale inputs for visible entry.",
|
|
99
|
+
"next": "wait-fields"
|
|
100
|
+
},
|
|
101
|
+
"wait-fields": {
|
|
102
|
+
"action": "ui.wait_for",
|
|
103
|
+
"test_id": "perps-pro-order-form-scale-fields",
|
|
104
|
+
"expected": "visible",
|
|
105
|
+
"timeout_ms": 10000,
|
|
106
|
+
"intent": "Confirm the Scale ladder inputs are visible.",
|
|
107
|
+
"next": "set-start"
|
|
108
|
+
},
|
|
109
|
+
"set-start": {
|
|
110
|
+
"action": "ui.set_input",
|
|
111
|
+
"test_id": "perps-pro-order-form-scale-start-price",
|
|
112
|
+
"value": "{{params.start_price}}",
|
|
113
|
+
"intent": "Define the first price in the ladder.",
|
|
114
|
+
"next": "set-end"
|
|
115
|
+
},
|
|
116
|
+
"set-end": {
|
|
117
|
+
"action": "ui.set_input",
|
|
118
|
+
"test_id": "perps-pro-order-form-scale-end-price",
|
|
119
|
+
"value": "{{params.end_price}}",
|
|
120
|
+
"intent": "Define the last price in the ladder.",
|
|
121
|
+
"next": "set-orders"
|
|
122
|
+
},
|
|
123
|
+
"set-orders": {
|
|
124
|
+
"action": "ui.set_input",
|
|
125
|
+
"test_id": "perps-pro-order-form-scale-total-orders",
|
|
126
|
+
"value": "{{params.orders}}",
|
|
127
|
+
"intent": "Divide the ladder into the requested child count.",
|
|
128
|
+
"next": "set-skew"
|
|
129
|
+
},
|
|
130
|
+
"set-skew": {
|
|
131
|
+
"action": "ui.set_input",
|
|
132
|
+
"test_id": "perps-pro-order-form-scale-size-skew",
|
|
133
|
+
"value": "{{params.skew}}",
|
|
134
|
+
"intent": "Distribute notional with the requested size skew.",
|
|
135
|
+
"next": "set-size"
|
|
136
|
+
},
|
|
137
|
+
"set-size": {
|
|
138
|
+
"action": "ui.set_input",
|
|
139
|
+
"test_id": "perps-pro-order-form-size-input",
|
|
140
|
+
"value": "{{params.notional}}",
|
|
141
|
+
"intent": "Enter the requested total USD notional.",
|
|
142
|
+
"next": "position-preview"
|
|
143
|
+
},
|
|
144
|
+
"position-preview": {
|
|
145
|
+
"action": "ui.scroll",
|
|
146
|
+
"test_id": "perps-pro-order-form-scale-preview",
|
|
147
|
+
"scroll_into_view": true,
|
|
148
|
+
"intent": "Expose the generated Scale preview for review.",
|
|
149
|
+
"next": "wait-preview"
|
|
150
|
+
},
|
|
151
|
+
"wait-preview": {
|
|
152
|
+
"action": "ui.wait_for",
|
|
153
|
+
"test_id": "perps-pro-order-form-scale-preview",
|
|
154
|
+
"expected": "visible",
|
|
155
|
+
"timeout_ms": 15000,
|
|
156
|
+
"intent": "Require a visible Scale preview before submission.",
|
|
157
|
+
"next": "position-submit"
|
|
158
|
+
},
|
|
159
|
+
"position-submit": {
|
|
160
|
+
"action": "ui.scroll",
|
|
161
|
+
"test_id": "perps-pro-order-form-scale-preview",
|
|
162
|
+
"scroll_into_view": true,
|
|
163
|
+
"intent": "Expose the final Scale fee row directly above submission.",
|
|
164
|
+
"next": "wait-submit"
|
|
165
|
+
},
|
|
166
|
+
"wait-submit": {
|
|
167
|
+
"action": "ui.wait_for",
|
|
168
|
+
"test_id": "perps-pro-order-form-place-order",
|
|
169
|
+
"expected": "visible",
|
|
170
|
+
"timeout_ms": 10000,
|
|
171
|
+
"intent": "Confirm the Scale ladder can be submitted.",
|
|
172
|
+
"next": "submit"
|
|
173
|
+
},
|
|
174
|
+
"submit": {
|
|
175
|
+
"action": "ui.press",
|
|
176
|
+
"test_id": "perps-pro-order-form-place-order",
|
|
177
|
+
"intent": "Submit the Scale ladder to the selected provider and network.",
|
|
178
|
+
"next": "done"
|
|
179
|
+
},
|
|
180
|
+
"done": {
|
|
181
|
+
"action": "end",
|
|
182
|
+
"status": "pass"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Assert an active Mobile Pro TWAP",
|
|
4
|
+
"description": "Opens the TWAP Active tab and proves the selected market remains visible after placement.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"account": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "",
|
|
12
|
+
"description": "Optional exact fixture account name, such as Trading or dev1. Omit it to keep the currently selected account."
|
|
13
|
+
},
|
|
14
|
+
"provider": { "type": "string", "default": "hyperliquid" },
|
|
15
|
+
"network": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["testnet", "mainnet"],
|
|
18
|
+
"default": "testnet",
|
|
19
|
+
"description": "Assertions are read-only and may inspect either network."
|
|
20
|
+
},
|
|
21
|
+
"market": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"default": "BTC"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"workflow": {
|
|
28
|
+
"entry": "prepare",
|
|
29
|
+
"nodes": {
|
|
30
|
+
"prepare": {
|
|
31
|
+
"action": "call",
|
|
32
|
+
"ref": "perps.pro-order-start-state",
|
|
33
|
+
"params": {
|
|
34
|
+
"account": "{{params.account}}",
|
|
35
|
+
"provider": "{{params.provider}}",
|
|
36
|
+
"network": "{{params.network}}",
|
|
37
|
+
"market": "{{params.market}}"
|
|
38
|
+
},
|
|
39
|
+
"intent": "Reach and prove the requested Pro market without changing orders.",
|
|
40
|
+
"next": "position-tab"
|
|
41
|
+
},
|
|
42
|
+
"position-tab": {
|
|
43
|
+
"action": "ui.scroll",
|
|
44
|
+
"test_id": "perps-pro-market-positions-panel-tab-twap",
|
|
45
|
+
"scroll_into_view": true,
|
|
46
|
+
"intent": "Expose the TWAP management tab for visible review.",
|
|
47
|
+
"next": "wait-tab"
|
|
48
|
+
},
|
|
49
|
+
"wait-tab": {
|
|
50
|
+
"action": "ui.wait_for",
|
|
51
|
+
"test_id": "perps-pro-market-positions-panel-tab-twap",
|
|
52
|
+
"expected": "visible",
|
|
53
|
+
"timeout_ms": 15000,
|
|
54
|
+
"intent": "Require the TWAP management tab to be visible.",
|
|
55
|
+
"next": "open-tab"
|
|
56
|
+
},
|
|
57
|
+
"open-tab": {
|
|
58
|
+
"action": "ui.press",
|
|
59
|
+
"test_id": "perps-pro-market-positions-panel-tab-twap",
|
|
60
|
+
"intent": "Open TWAP management.",
|
|
61
|
+
"next": "open-active"
|
|
62
|
+
},
|
|
63
|
+
"open-active": {
|
|
64
|
+
"action": "ui.press",
|
|
65
|
+
"test_id": "perps-pro-market-twap-view-tab-active",
|
|
66
|
+
"intent": "Select Active explicitly so History cannot satisfy the assertion.",
|
|
67
|
+
"next": "position-market"
|
|
68
|
+
},
|
|
69
|
+
"position-market": {
|
|
70
|
+
"action": "ui.scroll",
|
|
71
|
+
"test_id": "perps-pro-market-twap-market-{{params.market}}",
|
|
72
|
+
"offset": 600,
|
|
73
|
+
"intent": "Expose an active card for the selected market.",
|
|
74
|
+
"next": "wait-market"
|
|
75
|
+
},
|
|
76
|
+
"wait-market": {
|
|
77
|
+
"action": "ui.wait_for",
|
|
78
|
+
"test_id": "perps-pro-market-twap-market-{{params.market}}",
|
|
79
|
+
"expected": "visible",
|
|
80
|
+
"timeout_ms": 20000,
|
|
81
|
+
"intent": "Require an active card for the selected market to remain visible.",
|
|
82
|
+
"next": "capture"
|
|
83
|
+
},
|
|
84
|
+
"capture": {
|
|
85
|
+
"action": "ui.screenshot",
|
|
86
|
+
"path": "screenshots/evidence-twap-active-{{params.market}}.png",
|
|
87
|
+
"label": "The selected market is visible in the TWAP Active tab.",
|
|
88
|
+
"intent": "Preserve the visible active TWAP card for review.",
|
|
89
|
+
"next": "done"
|
|
90
|
+
},
|
|
91
|
+
"done": {
|
|
92
|
+
"action": "end",
|
|
93
|
+
"status": "pass"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
+
"title": "Place a Mobile Pro TWAP",
|
|
4
|
+
"description": "Places one parameterized TWAP through visible Mobile Pro controls, cleaning only the testnet path.",
|
|
5
|
+
"paramsSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"account": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "",
|
|
12
|
+
"description": "Optional exact fixture account name, such as Trading or dev1. Omit it to keep the currently selected account."
|
|
13
|
+
},
|
|
14
|
+
"provider": { "type": "string", "default": "hyperliquid" },
|
|
15
|
+
"network": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["testnet", "mainnet"],
|
|
18
|
+
"default": "testnet",
|
|
19
|
+
"description": "Mainnet placement requires an explicit user request."
|
|
20
|
+
},
|
|
21
|
+
"market": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"default": "BTC"
|
|
24
|
+
},
|
|
25
|
+
"side": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"long",
|
|
29
|
+
"short"
|
|
30
|
+
],
|
|
31
|
+
"default": "long"
|
|
32
|
+
},
|
|
33
|
+
"notional": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"default": "110"
|
|
36
|
+
},
|
|
37
|
+
"randomize": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": ["true", "false"],
|
|
40
|
+
"default": "false"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"workflow": {
|
|
45
|
+
"entry": "prepare",
|
|
46
|
+
"nodes": {
|
|
47
|
+
"prepare": {
|
|
48
|
+
"action": "call",
|
|
49
|
+
"ref": "perps.pro-order-setup",
|
|
50
|
+
"params": {
|
|
51
|
+
"account": "{{params.account}}",
|
|
52
|
+
"provider": "{{params.provider}}",
|
|
53
|
+
"network": "{{params.network}}",
|
|
54
|
+
"market": "{{params.market}}",
|
|
55
|
+
"side": "{{params.side}}"
|
|
56
|
+
},
|
|
57
|
+
"intent": "Prepare the requested Pro order form and Advanced picker.",
|
|
58
|
+
"next": "position-twap"
|
|
59
|
+
},
|
|
60
|
+
"position-twap": {
|
|
61
|
+
"action": "ui.scroll",
|
|
62
|
+
"test_id": "perps-order-type-twap",
|
|
63
|
+
"scroll_into_view": true,
|
|
64
|
+
"intent": "Expose the TWAP option for visible selection.",
|
|
65
|
+
"next": "wait-twap"
|
|
66
|
+
},
|
|
67
|
+
"wait-twap": {
|
|
68
|
+
"action": "ui.wait_for",
|
|
69
|
+
"test_id": "perps-order-type-twap",
|
|
70
|
+
"expected": "visible",
|
|
71
|
+
"timeout_ms": 10000,
|
|
72
|
+
"intent": "Fail closed unless TWAP is visibly offered.",
|
|
73
|
+
"next": "select-twap"
|
|
74
|
+
},
|
|
75
|
+
"select-twap": {
|
|
76
|
+
"action": "ui.press",
|
|
77
|
+
"test_id": "perps-order-type-twap",
|
|
78
|
+
"intent": "Select TWAP.",
|
|
79
|
+
"next": "position-size"
|
|
80
|
+
},
|
|
81
|
+
"position-size": {
|
|
82
|
+
"action": "ui.scroll",
|
|
83
|
+
"test_id": "perps-pro-order-form-size-card",
|
|
84
|
+
"scroll_into_view": true,
|
|
85
|
+
"intent": "Expose the TWAP size input for visible entry.",
|
|
86
|
+
"next": "wait-size"
|
|
87
|
+
},
|
|
88
|
+
"wait-size": {
|
|
89
|
+
"action": "ui.wait_for",
|
|
90
|
+
"test_id": "perps-pro-order-form-size-card",
|
|
91
|
+
"expected": "visible",
|
|
92
|
+
"timeout_ms": 10000,
|
|
93
|
+
"intent": "Confirm the TWAP size card is visible.",
|
|
94
|
+
"next": "set-size"
|
|
95
|
+
},
|
|
96
|
+
"set-size": {
|
|
97
|
+
"action": "ui.set_input",
|
|
98
|
+
"test_id": "perps-pro-order-form-size-input",
|
|
99
|
+
"value": "{{params.notional}}",
|
|
100
|
+
"intent": "Enter the requested USD notional.",
|
|
101
|
+
"next": "choose-randomize"
|
|
102
|
+
},
|
|
103
|
+
"choose-randomize": {
|
|
104
|
+
"action": "switch",
|
|
105
|
+
"value": "{{params.randomize}}",
|
|
106
|
+
"equals": "true",
|
|
107
|
+
"cases": {
|
|
108
|
+
"match": "enable-randomize"
|
|
109
|
+
},
|
|
110
|
+
"default": "position-submit",
|
|
111
|
+
"intent": "Apply the requested randomization setting."
|
|
112
|
+
},
|
|
113
|
+
"enable-randomize": {
|
|
114
|
+
"action": "ui.press",
|
|
115
|
+
"test_id": "perps-pro-order-form-twap-randomize",
|
|
116
|
+
"intent": "Enable randomized slice timing.",
|
|
117
|
+
"next": "position-submit"
|
|
118
|
+
},
|
|
119
|
+
"position-submit": {
|
|
120
|
+
"action": "ui.scroll",
|
|
121
|
+
"test_id": "perps-pro-order-form-summary-fees",
|
|
122
|
+
"scroll_into_view": true,
|
|
123
|
+
"intent": "Expose the final TWAP fee row directly above submission.",
|
|
124
|
+
"next": "wait-submit"
|
|
125
|
+
},
|
|
126
|
+
"wait-submit": {
|
|
127
|
+
"action": "ui.wait_for",
|
|
128
|
+
"test_id": "perps-pro-order-form-place-order",
|
|
129
|
+
"expected": "visible",
|
|
130
|
+
"timeout_ms": 10000,
|
|
131
|
+
"intent": "Confirm the valid TWAP can be submitted.",
|
|
132
|
+
"next": "submit"
|
|
133
|
+
},
|
|
134
|
+
"submit": {
|
|
135
|
+
"action": "ui.press",
|
|
136
|
+
"test_id": "perps-pro-order-form-place-order",
|
|
137
|
+
"intent": "Submit the TWAP to the selected provider and network.",
|
|
138
|
+
"next": "done"
|
|
139
|
+
},
|
|
140
|
+
"done": {
|
|
141
|
+
"action": "end",
|
|
142
|
+
"status": "pass"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
package/package.json
CHANGED
|
@@ -393,13 +393,17 @@ async function checkBehavior(browserEndpoint, port, pages) {
|
|
|
393
393
|
['yarn skills', copied.setup],
|
|
394
394
|
['/mms-recipe-pr-qa-review', copied.work.join('\n')],
|
|
395
395
|
['/mms-recipe-cook', copied.work.join('\n')],
|
|
396
|
+
['/mms-recipe-performance', copied.work.join('\n')],
|
|
397
|
+
['/mms-recipe-evidence', copied.work.join('\n')],
|
|
398
|
+
['agentic/recipe-performance', copied.setup],
|
|
399
|
+
['agentic/recipe-evidence', copied.setup],
|
|
396
400
|
];
|
|
397
401
|
const missing = expected.filter(([line, text]) => !text?.includes(line)).map(([line]) => line);
|
|
398
402
|
if (missing.length) {
|
|
399
403
|
throw new Error(`copy prompt omitted ${missing.map((m) => `"${m}"`).join(', ')}`);
|
|
400
404
|
}
|
|
401
|
-
if (copied.work.length <
|
|
402
|
-
throw new Error(`expected
|
|
405
|
+
if (copied.work.length < 5) {
|
|
406
|
+
throw new Error(`expected five work prompts, copied ${copied.work.length}`);
|
|
403
407
|
}
|
|
404
408
|
|
|
405
409
|
// The landing page is the lobby: one prompt, one way onward, nothing else.
|
package/site/architecture.html
CHANGED
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
<section class="wrap">
|
|
145
145
|
<h2 id="spec">The spec underneath</h2>
|
|
146
146
|
<p>
|
|
147
|
-
<code>mm-harness</code> implements <strong>
|
|
147
|
+
<code>mm-harness</code> implements <strong><a href="https://farmslot.io">Farmslot</a></strong>, a versioned specification for agentic
|
|
148
148
|
proof work. The CLI is one implementation of it, not the thing itself.
|
|
149
149
|
</p>
|
|
150
150
|
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
grows.
|
|
191
191
|
</p>
|
|
192
192
|
<p>The seam shows in the CLI's own help — the flags a control plane supplies:</p>
|
|
193
|
-
<div class="out">managed trust boundary (not needed for normal runs; Farmslot supplies it):
|
|
193
|
+
<div class="out">managed trust boundary (not needed for normal runs; <a href="https://farmslot.io">Farmslot</a> supplies it):
|
|
194
194
|
--source-trust, --source-kind, --source-name, --source-digest,
|
|
195
195
|
<span class="hint">--approve-plan</span> (binds approval to the exact reviewed plan)</div>
|
|
196
196
|
<p>Approve a plan and only that plan runs — which is what keeps the gate a gate.</p>
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
<div class="note">
|
|
199
199
|
<span class="note-title">What you actually need</span>
|
|
200
200
|
<p>
|
|
201
|
-
The farmslot control plane is <strong>experimental and sole-maintained</strong>. Nothing this site
|
|
201
|
+
The <a href="https://farmslot.io">Farmslot</a> control plane is <strong>experimental and sole-maintained</strong>. Nothing this site
|
|
202
202
|
teaches requires it — the harness, recipes, and skills are complete on their own, and the CLI says
|
|
203
203
|
as much: those flags are "not needed for normal runs". The specification is what you adopt; the
|
|
204
204
|
control plane is one consumer of it.
|