@deeeed/metamask-harness 0.39.0 → 0.40.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 +46 -0
- package/adapters/extension/lib/playwright-cdp.cjs +17 -1
- package/adapters/extension/sidepanel-toggle.sh +135 -13
- package/dist/adapters/mobile/release-artifact.js +65 -0
- package/dist/adapters.js +8 -7
- package/dist/command-contract.js +10 -2
- package/dist/commands/call.js +7 -4
- package/dist/commands/launch/index.js +55 -3
- package/dist/commands/parse-args.js +6 -0
- package/dist/commands/run-engine.js +75 -39
- package/dist/funding-execution-context.js +1386 -0
- package/dist/live-adapter-contract.js +3 -1
- package/dist/metamask-action-validation.js +170 -3
- package/dist/mm-harness-cli.js +8 -2
- package/dist/recipe-security.js +5 -12
- package/dist/runner.js +102 -6
- package/docs/RECIPES.md +74 -1
- package/docs/RELEASE-QA-CAPABILITY-MAP.md +6 -5
- package/library/actions/extension/networks/add_chainlist.mjs +4 -0
- package/library/actions/extension/networks/add_custom.mjs +4 -0
- package/library/actions/extension/networks/custom_network.mjs +48 -1
- package/library/actions/extension/perps/assert_visible_consistency.mjs +366 -0
- package/library/actions/extension/perps/close_visible_position.mjs +299 -37
- package/library/actions/extension/perps/compare_provider_market.mjs +77 -0
- package/library/actions/extension/perps/edit_margin.mjs +285 -44
- package/library/actions/extension/perps/mutation-receipt.mjs +781 -0
- package/library/actions/extension/perps/perps.mjs +1029 -363
- package/library/actions/extension/perps/read_funds_confirmation.mjs +126 -13
- package/library/actions/extension/perps/read_snapshot.mjs +124 -3
- package/library/actions/extension/perps/read_visible_state.mjs +63 -5
- package/library/actions/extension/perps/select_activity_filter.mjs +81 -18
- package/library/actions/extension/perps/select_market_filter.mjs +48 -4
- package/library/actions/extension/perps/update_position_tpsl.mjs +251 -69
- package/library/actions/extension/perps/visible-mutation-identity.mjs +164 -0
- package/library/actions/extension/platform/cdp.mjs +88 -9
- package/library/actions/extension/settings/set_basic_functionality.mjs +35 -7
- package/library/actions/extension/ui/navigate.mjs +45 -5
- package/library/actions/extension/wallet/import.mjs +70 -29
- package/library/actions/extension/wallet/lock.mjs +62 -5
- package/library/actions/extension/wallet/visible-session.mjs +218 -0
- package/library/actions/mobile/ui/native-navigation.mjs +45 -0
- package/library/actions/mobile/wallet/import.mjs +17 -10
- package/library/actions/mobile/wallet/native-ui.mjs +21 -1
- package/library/actions/shared/perps/visible-state.mjs +25 -5
- package/library/manifests/extension.action-manifest.json +1696 -1271
- package/library/recipes/extension/assets/release-custom-network-token-persistence.recipe.json +1 -0
- package/library/recipes/{perps → extension/perps}/release-activity-filters.recipe.json +5 -5
- package/library/recipes/{perps → extension/perps}/release-funds-flows.recipe.json +3 -3
- package/library/recipes/extension/perps/release-live-limit-order.recipe.json +24 -19
- package/library/recipes/extension/perps/release-market-filters.recipe.json +97 -0
- package/library/recipes/extension/perps/release-order-entry.recipe.json +4 -1
- package/library/recipes/extension/perps/release-order-validation.recipe.json +53 -14
- package/library/recipes/extension/perps/release-visible-consistency.recipe.json +47 -0
- package/library/recipes/extension/perps/source-dev-snapshot-consistency.recipe.json +76 -0
- package/library/recipes/perps/release-live-market-order.recipe.json +30 -13
- package/library/recipes/perps/release-market-details.recipe.json +1 -1
- package/library/recipes/swap-bridge/release-quote.recipe.json +1 -0
- package/library/recipes/wallet/import.recipe.json +4 -14
- package/package.json +1 -1
- package/library/actions/extension/assets/finish_send.mjs +0 -128
- package/library/actions/extension/swap_bridge/submit_transaction.mjs +0 -363
- package/library/actions/extension/ui/activate_and_observe.mjs +0 -96
- package/library/recipes/assets/release-custom-gas-send.recipe.json +0 -88
- package/library/recipes/assets/release-native-max-cancel.recipe.json +0 -70
- package/library/recipes/assets/release-native-max-send.recipe.json +0 -78
- package/library/recipes/assets/release-own-account-send.recipe.json +0 -80
- package/library/recipes/extension/runner/action-validation.recipe.json +0 -343
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
-
"title": "Assets release custom-gas token send",
|
|
4
|
-
"description": "Applies a custom gas limit to a tiny token send and proves the confirmed Activity details.",
|
|
5
|
-
"paramsSchema": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"properties": {
|
|
9
|
-
"source_address": { "type": "string", "default": "0x8dc623e964475d4d669da601fd15ea9125469003" },
|
|
10
|
-
"network": { "type": "string", "default": "Arbitrum" },
|
|
11
|
-
"chain_id": { "type": "integer", "minimum": 1, "default": 42161 },
|
|
12
|
-
"symbol": { "type": "string", "default": "USDC" },
|
|
13
|
-
"recipient": { "type": "string", "default": "0x5993d2153f080470bfe765ae81f4fa5fa2080916" },
|
|
14
|
-
"amount": { "type": ["string", "number"], "default": "0.01" },
|
|
15
|
-
"gas_limit": { "type": ["string", "number"], "default": 70000 },
|
|
16
|
-
"confirm_live": { "type": "boolean", "default": false },
|
|
17
|
-
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 120000 }
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"workflow": {
|
|
21
|
-
"entry": "select-source",
|
|
22
|
-
"nodes": {
|
|
23
|
-
"select-source": {
|
|
24
|
-
"action": "metamask.wallet.select_account",
|
|
25
|
-
"address": "{{params.source_address}}",
|
|
26
|
-
"intent": "Select the funded source account",
|
|
27
|
-
"next": "select-network"
|
|
28
|
-
},
|
|
29
|
-
"select-network": {
|
|
30
|
-
"action": "ui.navigate",
|
|
31
|
-
"page": "network",
|
|
32
|
-
"network": "{{params.network}}",
|
|
33
|
-
"chain_id": "{{params.chain_id}}",
|
|
34
|
-
"add_if_missing": false,
|
|
35
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
36
|
-
"intent": "Select the funded token network",
|
|
37
|
-
"next": "prepare-send"
|
|
38
|
-
},
|
|
39
|
-
"prepare-send": {
|
|
40
|
-
"action": "metamask.assets.prepare_send",
|
|
41
|
-
"symbol": "{{params.symbol}}",
|
|
42
|
-
"recipient": "{{params.recipient}}",
|
|
43
|
-
"amount": "{{params.amount}}",
|
|
44
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
45
|
-
"intent": "Prepare the tiny token send",
|
|
46
|
-
"next": "review-send"
|
|
47
|
-
},
|
|
48
|
-
"review-send": {
|
|
49
|
-
"action": "metamask.assets.review_send",
|
|
50
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
51
|
-
"intent": "Open the send confirmation",
|
|
52
|
-
"next": "set-custom-gas"
|
|
53
|
-
},
|
|
54
|
-
"set-custom-gas": {
|
|
55
|
-
"action": "metamask.assets.set_custom_gas",
|
|
56
|
-
"gas_limit": "{{params.gas_limit}}",
|
|
57
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
58
|
-
"intent": "Apply and prove the requested custom gas limit",
|
|
59
|
-
"next": "capture-confirmation"
|
|
60
|
-
},
|
|
61
|
-
"capture-confirmation": {
|
|
62
|
-
"action": "ui.screenshot",
|
|
63
|
-
"path": "screenshots/assets-custom-gas-confirmation.png",
|
|
64
|
-
"label": "Custom-gas token send confirmation",
|
|
65
|
-
"intent": "Preserve the custom-gas review evidence",
|
|
66
|
-
"next": "finish-send"
|
|
67
|
-
},
|
|
68
|
-
"finish-send": {
|
|
69
|
-
"action": "metamask.assets.finish_send",
|
|
70
|
-
"decision": "confirm",
|
|
71
|
-
"symbol": "{{params.symbol}}",
|
|
72
|
-
"amount": "{{params.amount}}",
|
|
73
|
-
"confirm_live": "{{params.confirm_live}}",
|
|
74
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
75
|
-
"intent": "Confirm the authorized tiny custom-gas send and prove Activity details",
|
|
76
|
-
"next": "capture-confirmed"
|
|
77
|
-
},
|
|
78
|
-
"capture-confirmed": {
|
|
79
|
-
"action": "ui.screenshot",
|
|
80
|
-
"path": "screenshots/assets-custom-gas-confirmed.png",
|
|
81
|
-
"label": "Custom-gas token send confirmed",
|
|
82
|
-
"intent": "Preserve the confirmed custom-gas transaction evidence",
|
|
83
|
-
"next": "done"
|
|
84
|
-
},
|
|
85
|
-
"done": { "action": "end", "status": "pass" }
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
-
"title": "Assets release native Max cancellation",
|
|
4
|
-
"description": "Prepares a native Max send, proves the fee-adjusted review, and cancels without broadcasting.",
|
|
5
|
-
"paramsSchema": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"properties": {
|
|
9
|
-
"source_address": { "type": "string", "default": "0x8dc623e964475d4d669da601fd15ea9125469003" },
|
|
10
|
-
"network": { "type": "string", "default": "Ethereum" },
|
|
11
|
-
"chain_id": { "type": "integer", "minimum": 1, "default": 1 },
|
|
12
|
-
"symbol": { "type": "string", "default": "ETH" },
|
|
13
|
-
"recipient": { "type": "string", "default": "0x5993d2153f080470bfe765ae81f4fa5fa2080916" },
|
|
14
|
-
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 60000 }
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"workflow": {
|
|
18
|
-
"entry": "select-source",
|
|
19
|
-
"nodes": {
|
|
20
|
-
"select-source": {
|
|
21
|
-
"action": "metamask.wallet.select_account",
|
|
22
|
-
"address": "{{params.source_address}}",
|
|
23
|
-
"intent": "Select the funded source account",
|
|
24
|
-
"next": "select-network"
|
|
25
|
-
},
|
|
26
|
-
"select-network": {
|
|
27
|
-
"action": "ui.navigate",
|
|
28
|
-
"page": "network",
|
|
29
|
-
"network": "{{params.network}}",
|
|
30
|
-
"chain_id": "{{params.chain_id}}",
|
|
31
|
-
"add_if_missing": false,
|
|
32
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
33
|
-
"intent": "Select the native asset network",
|
|
34
|
-
"next": "prepare-max"
|
|
35
|
-
},
|
|
36
|
-
"prepare-max": {
|
|
37
|
-
"action": "metamask.assets.prepare_send",
|
|
38
|
-
"symbol": "{{params.symbol}}",
|
|
39
|
-
"recipient": "{{params.recipient}}",
|
|
40
|
-
"max": true,
|
|
41
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
42
|
-
"intent": "Prepare a fee-adjusted native Max send",
|
|
43
|
-
"next": "review-max"
|
|
44
|
-
},
|
|
45
|
-
"review-max": {
|
|
46
|
-
"action": "metamask.assets.review_send",
|
|
47
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
48
|
-
"intent": "Prove the Max amount and network fee at review",
|
|
49
|
-
"next": "capture-max"
|
|
50
|
-
},
|
|
51
|
-
"capture-max": {
|
|
52
|
-
"action": "ui.screenshot",
|
|
53
|
-
"path": "screenshots/assets-native-max-review.png",
|
|
54
|
-
"label": "Native Max send review",
|
|
55
|
-
"intent": "Preserve the fee-adjusted Max evidence",
|
|
56
|
-
"next": "cancel-max"
|
|
57
|
-
},
|
|
58
|
-
"cancel-max": {
|
|
59
|
-
"action": "metamask.assets.finish_send",
|
|
60
|
-
"decision": "cancel",
|
|
61
|
-
"symbol": "{{params.symbol}}",
|
|
62
|
-
"amount": "max",
|
|
63
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
64
|
-
"intent": "Cancel the Max send without broadcasting",
|
|
65
|
-
"next": "done"
|
|
66
|
-
},
|
|
67
|
-
"done": { "action": "end", "status": "pass" }
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
-
"title": "Assets release native Max self-send",
|
|
4
|
-
"description": "Submits a native Max self-send and proves its confirmed Activity details.",
|
|
5
|
-
"paramsSchema": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"properties": {
|
|
9
|
-
"source_address": { "type": "string", "default": "0x8dc623e964475d4d669da601fd15ea9125469003" },
|
|
10
|
-
"network": { "type": "string", "default": "Ethereum" },
|
|
11
|
-
"chain_id": { "type": "integer", "minimum": 1, "default": 1 },
|
|
12
|
-
"symbol": { "type": "string", "default": "ETH" },
|
|
13
|
-
"confirm_live": { "type": "boolean", "default": false },
|
|
14
|
-
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 120000 }
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"workflow": {
|
|
18
|
-
"entry": "select-source",
|
|
19
|
-
"nodes": {
|
|
20
|
-
"select-source": {
|
|
21
|
-
"action": "metamask.wallet.select_account",
|
|
22
|
-
"address": "{{params.source_address}}",
|
|
23
|
-
"intent": "Select the funded source account",
|
|
24
|
-
"next": "select-network"
|
|
25
|
-
},
|
|
26
|
-
"select-network": {
|
|
27
|
-
"action": "ui.navigate",
|
|
28
|
-
"page": "network",
|
|
29
|
-
"network": "{{params.network}}",
|
|
30
|
-
"chain_id": "{{params.chain_id}}",
|
|
31
|
-
"add_if_missing": false,
|
|
32
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
33
|
-
"intent": "Select the native asset network",
|
|
34
|
-
"next": "prepare-max"
|
|
35
|
-
},
|
|
36
|
-
"prepare-max": {
|
|
37
|
-
"action": "metamask.assets.prepare_send",
|
|
38
|
-
"symbol": "{{params.symbol}}",
|
|
39
|
-
"recipient": "{{params.source_address}}",
|
|
40
|
-
"max": true,
|
|
41
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
42
|
-
"intent": "Prepare a native Max self-send",
|
|
43
|
-
"next": "review-max"
|
|
44
|
-
},
|
|
45
|
-
"review-max": {
|
|
46
|
-
"action": "metamask.assets.review_send",
|
|
47
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
48
|
-
"intent": "Prove the confirmation amount and network fee",
|
|
49
|
-
"next": "capture-confirmation"
|
|
50
|
-
},
|
|
51
|
-
"capture-confirmation": {
|
|
52
|
-
"action": "ui.screenshot",
|
|
53
|
-
"path": "screenshots/assets-native-max-send-confirmation.png",
|
|
54
|
-
"label": "Native Max self-send confirmation",
|
|
55
|
-
"intent": "Preserve the reviewed Max evidence",
|
|
56
|
-
"next": "finish-send"
|
|
57
|
-
},
|
|
58
|
-
"finish-send": {
|
|
59
|
-
"action": "metamask.assets.finish_send",
|
|
60
|
-
"decision": "confirm",
|
|
61
|
-
"symbol": "{{params.symbol}}",
|
|
62
|
-
"amount": "max",
|
|
63
|
-
"confirm_live": "{{params.confirm_live}}",
|
|
64
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
65
|
-
"intent": "Submit the authorized Max self-send and prove confirmed Activity details",
|
|
66
|
-
"next": "capture-confirmed"
|
|
67
|
-
},
|
|
68
|
-
"capture-confirmed": {
|
|
69
|
-
"action": "ui.screenshot",
|
|
70
|
-
"path": "screenshots/assets-native-max-send-confirmed.png",
|
|
71
|
-
"label": "Native Max self-send confirmed",
|
|
72
|
-
"intent": "Preserve the confirmed self-send evidence",
|
|
73
|
-
"next": "done"
|
|
74
|
-
},
|
|
75
|
-
"done": { "action": "end", "status": "pass" }
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
-
"title": "Assets release own-account token send",
|
|
4
|
-
"description": "Sends a tiny token amount between owned accounts and proves its confirmed Activity details.",
|
|
5
|
-
"paramsSchema": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"properties": {
|
|
9
|
-
"source_address": { "type": "string", "default": "0x8dc623e964475d4d669da601fd15ea9125469003" },
|
|
10
|
-
"network": { "type": "string", "default": "Arbitrum" },
|
|
11
|
-
"chain_id": { "type": "integer", "minimum": 1, "default": 42161 },
|
|
12
|
-
"symbol": { "type": "string", "default": "USDC" },
|
|
13
|
-
"recipient": { "type": "string", "default": "0x5993d2153f080470bfe765ae81f4fa5fa2080916" },
|
|
14
|
-
"amount": { "type": ["string", "number"], "default": "0.01" },
|
|
15
|
-
"confirm_live": { "type": "boolean", "default": false },
|
|
16
|
-
"timeout_ms": { "type": "integer", "minimum": 1000, "default": 120000 }
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"workflow": {
|
|
20
|
-
"entry": "select-source",
|
|
21
|
-
"nodes": {
|
|
22
|
-
"select-source": {
|
|
23
|
-
"action": "metamask.wallet.select_account",
|
|
24
|
-
"address": "{{params.source_address}}",
|
|
25
|
-
"intent": "Select the funded source account",
|
|
26
|
-
"next": "select-network"
|
|
27
|
-
},
|
|
28
|
-
"select-network": {
|
|
29
|
-
"action": "ui.navigate",
|
|
30
|
-
"page": "network",
|
|
31
|
-
"network": "{{params.network}}",
|
|
32
|
-
"chain_id": "{{params.chain_id}}",
|
|
33
|
-
"add_if_missing": false,
|
|
34
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
35
|
-
"intent": "Select the funded token network",
|
|
36
|
-
"next": "prepare-send"
|
|
37
|
-
},
|
|
38
|
-
"prepare-send": {
|
|
39
|
-
"action": "metamask.assets.prepare_send",
|
|
40
|
-
"symbol": "{{params.symbol}}",
|
|
41
|
-
"recipient": "{{params.recipient}}",
|
|
42
|
-
"amount": "{{params.amount}}",
|
|
43
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
44
|
-
"intent": "Prepare the tiny own-account token send",
|
|
45
|
-
"next": "review-send"
|
|
46
|
-
},
|
|
47
|
-
"review-send": {
|
|
48
|
-
"action": "metamask.assets.review_send",
|
|
49
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
50
|
-
"intent": "Review the send and prove its network fee",
|
|
51
|
-
"next": "capture-confirmation"
|
|
52
|
-
},
|
|
53
|
-
"capture-confirmation": {
|
|
54
|
-
"action": "ui.screenshot",
|
|
55
|
-
"path": "screenshots/assets-own-account-send-confirmation.png",
|
|
56
|
-
"label": "Own-account token send confirmation",
|
|
57
|
-
"intent": "Preserve the reviewed send evidence",
|
|
58
|
-
"next": "finish-send"
|
|
59
|
-
},
|
|
60
|
-
"finish-send": {
|
|
61
|
-
"action": "metamask.assets.finish_send",
|
|
62
|
-
"decision": "confirm",
|
|
63
|
-
"symbol": "{{params.symbol}}",
|
|
64
|
-
"amount": "{{params.amount}}",
|
|
65
|
-
"confirm_live": "{{params.confirm_live}}",
|
|
66
|
-
"timeout_ms": "{{params.timeout_ms}}",
|
|
67
|
-
"intent": "Confirm the authorized tiny send and prove its Activity details",
|
|
68
|
-
"next": "capture-confirmed"
|
|
69
|
-
},
|
|
70
|
-
"capture-confirmed": {
|
|
71
|
-
"action": "ui.screenshot",
|
|
72
|
-
"path": "screenshots/assets-own-account-send-confirmed.png",
|
|
73
|
-
"label": "Own-account token send confirmed",
|
|
74
|
-
"intent": "Preserve the confirmed transaction evidence",
|
|
75
|
-
"next": "done"
|
|
76
|
-
},
|
|
77
|
-
"done": { "action": "end", "status": "pass" }
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
|
|
3
|
-
"title": "MetaMask Extension action E2E validation",
|
|
4
|
-
"description": "Exercises every Extension manifest-declared action against mme-4 and leaves trace output for false-positive checks.",
|
|
5
|
-
"workflow": {
|
|
6
|
-
"entry": "prepare-files",
|
|
7
|
-
"nodes": {
|
|
8
|
-
"prepare-files": {
|
|
9
|
-
"action": "command",
|
|
10
|
-
"cmd": "mkdir -p temp/recipe-runner.action-validation && printf 'E2E_ACTION_VALIDATION extension\\n' > temp/recipe-runner.action-validation/probe.txt && printf '{\"platform\":\"extension\",\"ok\":true}\n' > temp/recipe-runner.action-validation/probe.json && printf 'extension log E2E_ACTION_VALIDATION\\n' >> temp/recipe-runner.action-validation/validation.log && echo E2E_ACTION_VALIDATION extension",
|
|
11
|
-
"next": "assert-command-exit",
|
|
12
|
-
"intent": "Prepare runner.action-validation probe files"
|
|
13
|
-
},
|
|
14
|
-
"assert-command-exit": {
|
|
15
|
-
"action": "assert_exit_code",
|
|
16
|
-
"source": "prepare-files",
|
|
17
|
-
"expected": 0,
|
|
18
|
-
"next": "assert-command-output",
|
|
19
|
-
"intent": "Verify the probe command exited successfully"
|
|
20
|
-
},
|
|
21
|
-
"assert-command-output": {
|
|
22
|
-
"action": "assert_output",
|
|
23
|
-
"source": "prepare-files",
|
|
24
|
-
"stream": "stdout",
|
|
25
|
-
"contains": "E2E_ACTION_VALIDATION extension",
|
|
26
|
-
"next": "assert-file",
|
|
27
|
-
"intent": "Verify the probe command produced expected output"
|
|
28
|
-
},
|
|
29
|
-
"assert-file": {
|
|
30
|
-
"action": "assert_file",
|
|
31
|
-
"path": "temp/recipe-runner.action-validation/probe.txt",
|
|
32
|
-
"contains": "E2E_ACTION_VALIDATION extension",
|
|
33
|
-
"next": "assert-json",
|
|
34
|
-
"intent": "Verify file assertions work"
|
|
35
|
-
},
|
|
36
|
-
"assert-json": {
|
|
37
|
-
"action": "assert_json",
|
|
38
|
-
"path": "temp/recipe-runner.action-validation/probe.json",
|
|
39
|
-
"assert": {
|
|
40
|
-
"path": "$.platform",
|
|
41
|
-
"operator": "eq",
|
|
42
|
-
"value": "extension"
|
|
43
|
-
},
|
|
44
|
-
"next": "watch-logs",
|
|
45
|
-
"intent": "Verify JSON assertions work"
|
|
46
|
-
},
|
|
47
|
-
"watch-logs": {
|
|
48
|
-
"action": "watch_logs",
|
|
49
|
-
"path": "temp/recipe-runner.action-validation/validation.log",
|
|
50
|
-
"contains": "E2E_ACTION_VALIDATION",
|
|
51
|
-
"next": "index-artifacts",
|
|
52
|
-
"intent": "Verify log watching works"
|
|
53
|
-
},
|
|
54
|
-
"index-artifacts": {
|
|
55
|
-
"action": "index_artifacts",
|
|
56
|
-
"artifacts": [
|
|
57
|
-
{
|
|
58
|
-
"path": "temp/recipe-runner.action-validation/probe.txt",
|
|
59
|
-
"type": "log",
|
|
60
|
-
"category": "debug",
|
|
61
|
-
"label": "Extension action validation probe"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"next": "wait",
|
|
65
|
-
"intent": "Register the probe file as an artifact"
|
|
66
|
-
},
|
|
67
|
-
"wait": {
|
|
68
|
-
"action": "wait",
|
|
69
|
-
"duration_ms": 1,
|
|
70
|
-
"next": "status",
|
|
71
|
-
"intent": "Verify the base wait action works"
|
|
72
|
-
},
|
|
73
|
-
"status": {
|
|
74
|
-
"action": "app.status",
|
|
75
|
-
"next": "app-hud",
|
|
76
|
-
"intent": "Read project runner compatibility status"
|
|
77
|
-
},
|
|
78
|
-
"cdp-probe": {
|
|
79
|
-
"action": "cdp.target",
|
|
80
|
-
"next": "wallet-unlock",
|
|
81
|
-
"required": true,
|
|
82
|
-
"intent": "Verify the automation channel is reachable"
|
|
83
|
-
},
|
|
84
|
-
"fixture": {
|
|
85
|
-
"action": "metamask.wallet.fixture_status",
|
|
86
|
-
"next": "wallet-setup",
|
|
87
|
-
"intent": "Verify wallet fixture availability"
|
|
88
|
-
},
|
|
89
|
-
"wallet-setup": {
|
|
90
|
-
"action": "metamask.wallet.setup",
|
|
91
|
-
"next": "cdp-probe",
|
|
92
|
-
"intent": "Verify wallet setup is ready"
|
|
93
|
-
},
|
|
94
|
-
"wallet-unlock": {
|
|
95
|
-
"action": "metamask.wallet.ensure_unlocked",
|
|
96
|
-
"next": "wallet-read-state",
|
|
97
|
-
"intent": "Ensure the wallet is unlocked"
|
|
98
|
-
},
|
|
99
|
-
"wallet-read-state": {
|
|
100
|
-
"action": "metamask.wallet.read_state",
|
|
101
|
-
"next": "wallet-list-accounts",
|
|
102
|
-
"intent": "Read wallet state for proof"
|
|
103
|
-
},
|
|
104
|
-
"wallet-list-accounts": {
|
|
105
|
-
"action": "metamask.wallet.list_accounts",
|
|
106
|
-
"next": "extension-account-list",
|
|
107
|
-
"intent": "List wallet accounts for proof"
|
|
108
|
-
},
|
|
109
|
-
"app-navigate-wallet": {
|
|
110
|
-
"action": "ui.navigate",
|
|
111
|
-
"next": "app-navigate-perps",
|
|
112
|
-
"intent": "Show the wallet home surface",
|
|
113
|
-
"hash": "#/"
|
|
114
|
-
},
|
|
115
|
-
"app-navigate-perps": {
|
|
116
|
-
"action": "ui.navigate",
|
|
117
|
-
"next": "ui-wait-perps",
|
|
118
|
-
"intent": "Open the Perps tab",
|
|
119
|
-
"page": "perps"
|
|
120
|
-
},
|
|
121
|
-
"ui-wait-perps": {
|
|
122
|
-
"action": "ui.wait_for",
|
|
123
|
-
"text": "Perps",
|
|
124
|
-
"expected": "visible",
|
|
125
|
-
"next": "ui-press",
|
|
126
|
-
"intent": "Confirm the Perps surface is ready"
|
|
127
|
-
},
|
|
128
|
-
"ui-press": {
|
|
129
|
-
"action": "ui.press",
|
|
130
|
-
"selector": "body",
|
|
131
|
-
"next": "ui-scroll",
|
|
132
|
-
"intent": "Activate the visible control"
|
|
133
|
-
},
|
|
134
|
-
"ui-scroll": {
|
|
135
|
-
"action": "ui.scroll",
|
|
136
|
-
"offset": 120,
|
|
137
|
-
"next": "ui-scroll-into-view",
|
|
138
|
-
"intent": "Expose the next visible content"
|
|
139
|
-
},
|
|
140
|
-
"ui-screenshot-perps": {
|
|
141
|
-
"action": "ui.screenshot",
|
|
142
|
-
"path": "screenshots/extension-perps-runner.action-validation.png",
|
|
143
|
-
"timeout_ms": 5000,
|
|
144
|
-
"next": "wallet-navigate-perps",
|
|
145
|
-
"intent": "Record the visible Perps state as evidence"
|
|
146
|
-
},
|
|
147
|
-
"wallet-navigate-perps": {
|
|
148
|
-
"action": "ui.navigate",
|
|
149
|
-
"next": "perps-navigate-home",
|
|
150
|
-
"intent": "Show the Perps home surface",
|
|
151
|
-
"page": "perps"
|
|
152
|
-
},
|
|
153
|
-
"perps-navigate-home": {
|
|
154
|
-
"action": "ui.navigate",
|
|
155
|
-
"next": "perps-navigate-market",
|
|
156
|
-
"intent": "Show the Perps home surface",
|
|
157
|
-
"page": "perps"
|
|
158
|
-
},
|
|
159
|
-
"perps-navigate-market": {
|
|
160
|
-
"action": "ui.navigate",
|
|
161
|
-
"next": "read-snapshot",
|
|
162
|
-
"intent": "Show the ETH Perps market details",
|
|
163
|
-
"page": "perps-market",
|
|
164
|
-
"market": "ETH"
|
|
165
|
-
},
|
|
166
|
-
"read-snapshot": {
|
|
167
|
-
"action": "metamask.perps.read_snapshot",
|
|
168
|
-
"include": [
|
|
169
|
-
"markets"
|
|
170
|
-
],
|
|
171
|
-
"markets": [
|
|
172
|
-
"ETH"
|
|
173
|
-
],
|
|
174
|
-
"next": "start-state",
|
|
175
|
-
"intent": "Read a bounded live Perps market snapshot"
|
|
176
|
-
},
|
|
177
|
-
"ensure-clean": {
|
|
178
|
-
"action": "metamask.perps.ensure_positions",
|
|
179
|
-
"market": "ETH",
|
|
180
|
-
"next": "ensure-orders-clean",
|
|
181
|
-
"state": "none",
|
|
182
|
-
"intent": "Ensure no positions are open",
|
|
183
|
-
"mode": "matching"
|
|
184
|
-
},
|
|
185
|
-
"assert-no-position": {
|
|
186
|
-
"action": "metamask.perps.assert_positions",
|
|
187
|
-
"market": "ETH",
|
|
188
|
-
"next": "read-orders-empty",
|
|
189
|
-
"state": "none",
|
|
190
|
-
"intent": "Confirm selected ETH position state is clean",
|
|
191
|
-
"mode": "matching"
|
|
192
|
-
},
|
|
193
|
-
"read-orders-empty": {
|
|
194
|
-
"action": "metamask.perps.read_orders",
|
|
195
|
-
"market": "ETH",
|
|
196
|
-
"next": "assert-no-orders",
|
|
197
|
-
"intent": "Read order state after cleanup"
|
|
198
|
-
},
|
|
199
|
-
"place-order": {
|
|
200
|
-
"action": "metamask.perps.place_order",
|
|
201
|
-
"market": "ETH",
|
|
202
|
-
"side": "long",
|
|
203
|
-
"amount": "11",
|
|
204
|
-
"leverage": 3,
|
|
205
|
-
"next": "read-positions",
|
|
206
|
-
"intent": "Place a small ETH 3x long validation order"
|
|
207
|
-
},
|
|
208
|
-
"read-positions": {
|
|
209
|
-
"action": "metamask.perps.read_positions",
|
|
210
|
-
"market": "ETH",
|
|
211
|
-
"next": "assert-position",
|
|
212
|
-
"intent": "Read ETH position after order placement"
|
|
213
|
-
},
|
|
214
|
-
"assert-position": {
|
|
215
|
-
"action": "metamask.perps.assert_positions",
|
|
216
|
-
"market": "ETH",
|
|
217
|
-
"next": "read-orders-open",
|
|
218
|
-
"state": "open",
|
|
219
|
-
"intent": "Confirm the ETH validation position opened"
|
|
220
|
-
},
|
|
221
|
-
"read-orders-open": {
|
|
222
|
-
"action": "metamask.perps.read_orders",
|
|
223
|
-
"market": "ETH",
|
|
224
|
-
"next": "close-orders",
|
|
225
|
-
"intent": "Read ETH orders before cleanup"
|
|
226
|
-
},
|
|
227
|
-
"assert-closed": {
|
|
228
|
-
"action": "metamask.perps.assert_positions",
|
|
229
|
-
"market": "ETH",
|
|
230
|
-
"next": "teardown-state",
|
|
231
|
-
"state": "none",
|
|
232
|
-
"intent": "Confirm global position cleanup completed",
|
|
233
|
-
"mode": "matching"
|
|
234
|
-
},
|
|
235
|
-
"done": {
|
|
236
|
-
"action": "end",
|
|
237
|
-
"status": "pass"
|
|
238
|
-
},
|
|
239
|
-
"ensure-orders-clean": {
|
|
240
|
-
"action": "metamask.perps.ensure_orders",
|
|
241
|
-
"market": "ETH",
|
|
242
|
-
"state": "none",
|
|
243
|
-
"next": "assert-no-position",
|
|
244
|
-
"intent": "Ensure no orders are open",
|
|
245
|
-
"mode": "matching"
|
|
246
|
-
},
|
|
247
|
-
"assert-no-orders": {
|
|
248
|
-
"action": "metamask.perps.assert_orders",
|
|
249
|
-
"market": "ETH",
|
|
250
|
-
"state": "none",
|
|
251
|
-
"next": "place-order",
|
|
252
|
-
"intent": "Confirm selected ETH order state is clean",
|
|
253
|
-
"mode": "matching"
|
|
254
|
-
},
|
|
255
|
-
"close-orders": {
|
|
256
|
-
"action": "metamask.perps.close_orders",
|
|
257
|
-
"market": "ETH",
|
|
258
|
-
"next": "close-positions",
|
|
259
|
-
"intent": "Close ETH orders created by validation"
|
|
260
|
-
},
|
|
261
|
-
"close-positions": {
|
|
262
|
-
"action": "metamask.perps.close_positions",
|
|
263
|
-
"market": "ETH",
|
|
264
|
-
"next": "assert-closed",
|
|
265
|
-
"intent": "Close the ETH validation position"
|
|
266
|
-
},
|
|
267
|
-
"start-state": {
|
|
268
|
-
"action": "metamask.perps.start_state",
|
|
269
|
-
"profile": "clean_market_testnet",
|
|
270
|
-
"market": "ETH",
|
|
271
|
-
"positions": {
|
|
272
|
-
"state": "none",
|
|
273
|
-
"mode": "matching"
|
|
274
|
-
},
|
|
275
|
-
"orders": {
|
|
276
|
-
"state": "none",
|
|
277
|
-
"mode": "matching"
|
|
278
|
-
},
|
|
279
|
-
"page": "market",
|
|
280
|
-
"next": "ensure-clean",
|
|
281
|
-
"intent": "Prepare selected-market clean testnet Perps validation state",
|
|
282
|
-
"mode": "matching"
|
|
283
|
-
},
|
|
284
|
-
"teardown-state": {
|
|
285
|
-
"action": "metamask.perps.teardown_state",
|
|
286
|
-
"market": "ETH",
|
|
287
|
-
"positions": {
|
|
288
|
-
"state": "none",
|
|
289
|
-
"mode": "matching"
|
|
290
|
-
},
|
|
291
|
-
"orders": {
|
|
292
|
-
"state": "none",
|
|
293
|
-
"mode": "matching"
|
|
294
|
-
},
|
|
295
|
-
"page": "home",
|
|
296
|
-
"next": "done",
|
|
297
|
-
"intent": "Return Perps to a selected-market clean home state",
|
|
298
|
-
"mode": "matching"
|
|
299
|
-
},
|
|
300
|
-
"app-hud": {
|
|
301
|
-
"action": "app.hud",
|
|
302
|
-
"text": "extension action parity validation",
|
|
303
|
-
"status": "running",
|
|
304
|
-
"next": "fixture",
|
|
305
|
-
"intent": "Start visible recipe progress HUD"
|
|
306
|
-
},
|
|
307
|
-
"select-account": {
|
|
308
|
-
"action": "metamask.wallet.select_account",
|
|
309
|
-
"address": "0x8dc623e964475d4d669da601fd15ea9125469003",
|
|
310
|
-
"next": "app-navigate-wallet",
|
|
311
|
-
"intent": "Select the validation account"
|
|
312
|
-
},
|
|
313
|
-
"ui-scroll-into-view": {
|
|
314
|
-
"action": "ui.scroll",
|
|
315
|
-
"selector": "body",
|
|
316
|
-
"scroll_into_view": true,
|
|
317
|
-
"next": "ui-screenshot-perps",
|
|
318
|
-
"intent": "Expose the extension content needed for proof"
|
|
319
|
-
},
|
|
320
|
-
"extension-account-list": {
|
|
321
|
-
"action": "ui.navigate",
|
|
322
|
-
"hash": "/account-list",
|
|
323
|
-
"next": "extension-account-search-visible",
|
|
324
|
-
"intent": "Open a harmless extension text input surface"
|
|
325
|
-
},
|
|
326
|
-
"extension-account-search-visible": {
|
|
327
|
-
"action": "ui.wait_for",
|
|
328
|
-
"selector": "[data-testid=multichain-account-list-search] input",
|
|
329
|
-
"visible": true,
|
|
330
|
-
"timeout_ms": 10000,
|
|
331
|
-
"next": "ui-set-input-account-search",
|
|
332
|
-
"intent": "Confirm account search is ready"
|
|
333
|
-
},
|
|
334
|
-
"ui-set-input-account-search": {
|
|
335
|
-
"action": "ui.set_input",
|
|
336
|
-
"selector": "[data-testid=multichain-account-list-search] input",
|
|
337
|
-
"value": "Account",
|
|
338
|
-
"next": "select-account",
|
|
339
|
-
"intent": "Filter the visible account list"
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|