@deeeed/metamask-harness 0.8.0 → 0.9.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 +6 -0
- package/adapters/mobile/bridge-runtime/cdp-bridge.cjs +5 -2
- package/adapters/mobile/bridge-runtime/lib/target-discovery.cjs +37 -11
- package/dist/cli-commands.js +1 -1
- package/dist/commands/parse-args.js +1 -0
- package/dist/commands/status-probe.js +167 -0
- package/dist/commands/status.js +58 -1
- package/dist/mm-harness-cli.js +18 -5
- package/docs/CLI-SPEC.md +39 -4
- package/library/manifests/core.action-manifest.json +1465 -1225
- package/library/manifests/extension.action-manifest.json +324 -5
- package/library/manifests/mobile.action-manifest.json +321 -4
- package/package.json +1 -1
|
@@ -407,13 +407,330 @@
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
]
|
|
410
|
+
},
|
|
411
|
+
"app.status": {
|
|
412
|
+
"description": "Report the adapter's static status — platform, project root, resolved checkout shape, and headless compatibility mode (no live route or account).",
|
|
413
|
+
"examples": [
|
|
414
|
+
{
|
|
415
|
+
"node": {
|
|
416
|
+
"action": "app.status",
|
|
417
|
+
"intent": "Report the resolved checkout status"
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"cdp.target": {
|
|
423
|
+
"description": "Probe the platform debug transport — Chrome CDP for extension, the React Native debug bridge for mobile — and report whether it is reachable.",
|
|
424
|
+
"examples": [
|
|
425
|
+
{
|
|
426
|
+
"node": {
|
|
427
|
+
"action": "cdp.target",
|
|
428
|
+
"require_reachable": true,
|
|
429
|
+
"intent": "Confirm the mobile React Native debug bridge is reachable"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
"metamask.wallet.fixture_status": {
|
|
435
|
+
"description": "Report the on-disk wallet fixture status (accounts and password presence) without launching or mutating the app.",
|
|
436
|
+
"examples": [
|
|
437
|
+
{
|
|
438
|
+
"description": "Minimal node",
|
|
439
|
+
"node": {
|
|
440
|
+
"action": "metamask.wallet.fixture_status",
|
|
441
|
+
"intent": "Check wallet fixture status"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
"metamask.wallet.setup": {
|
|
447
|
+
"description": "Import the wallet fixture accounts and password so the app starts from a known signed-in state.",
|
|
448
|
+
"examples": [
|
|
449
|
+
{
|
|
450
|
+
"description": "Minimal node",
|
|
451
|
+
"node": {
|
|
452
|
+
"action": "metamask.wallet.setup",
|
|
453
|
+
"intent": "Prepare the wallet fixture for recipe execution"
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
"metamask.wallet.ensure_unlocked": {
|
|
459
|
+
"description": "Unlock the wallet with the fixture password when it is currently locked.",
|
|
460
|
+
"examples": [
|
|
461
|
+
{
|
|
462
|
+
"description": "Minimal node",
|
|
463
|
+
"node": {
|
|
464
|
+
"action": "metamask.wallet.ensure_unlocked",
|
|
465
|
+
"intent": "Ensure the wallet is unlocked before proof steps"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
"metamask.wallet.select_account": {
|
|
471
|
+
"description": "Select a wallet account by address, id, or display name.",
|
|
472
|
+
"examples": [
|
|
473
|
+
{
|
|
474
|
+
"description": "Select by deterministic fixture address",
|
|
475
|
+
"node": {
|
|
476
|
+
"action": "metamask.wallet.select_account",
|
|
477
|
+
"address": "0x8dc623e964475d4d669da601fd15ea9125469003",
|
|
478
|
+
"intent": "Select the requested wallet account"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"description": "Select by fixture display name",
|
|
483
|
+
"node": {
|
|
484
|
+
"action": "metamask.wallet.select_account",
|
|
485
|
+
"name": "dev1",
|
|
486
|
+
"intent": "Select the requested wallet account"
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
},
|
|
491
|
+
"metamask.wallet.read_state": {
|
|
492
|
+
"description": "Read the redacted wallet state (selected account, route, and device) from the running app.",
|
|
493
|
+
"examples": [
|
|
494
|
+
{
|
|
495
|
+
"description": "Minimal node",
|
|
496
|
+
"node": {
|
|
497
|
+
"action": "metamask.wallet.read_state",
|
|
498
|
+
"intent": "Read wallet state needed for the proof"
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
"metamask.perps.read_positions": {
|
|
504
|
+
"description": "Read live Perps positions and return the selected subset.",
|
|
505
|
+
"examples": [
|
|
506
|
+
{
|
|
507
|
+
"description": "Read selected live state",
|
|
508
|
+
"node": {
|
|
509
|
+
"action": "metamask.perps.read_positions",
|
|
510
|
+
"market": "BTC",
|
|
511
|
+
"intent": "Read Perps positions needed for the proof"
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
]
|
|
515
|
+
},
|
|
516
|
+
"metamask.perps.read_orders": {
|
|
517
|
+
"description": "Read live Perps open orders and return the selected subset.",
|
|
518
|
+
"examples": [
|
|
519
|
+
{
|
|
520
|
+
"description": "Read selected live state",
|
|
521
|
+
"node": {
|
|
522
|
+
"action": "metamask.perps.read_orders",
|
|
523
|
+
"market": "BTC",
|
|
524
|
+
"intent": "Read Perps open orders needed for the proof"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
]
|
|
528
|
+
},
|
|
529
|
+
"metamask.perps.close_positions": {
|
|
530
|
+
"description": "Default to testnet for Perps mutations; mainnet is read-only unless explicitly requested. Close selected live Perps positions. Use selector/mode params to close matching symbols or all positions. 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.",
|
|
531
|
+
"examples": [
|
|
532
|
+
{
|
|
533
|
+
"description": "Close every open position",
|
|
534
|
+
"node": {
|
|
535
|
+
"action": "metamask.perps.close_positions",
|
|
536
|
+
"mode": "all",
|
|
537
|
+
"intent": "Close selected Perps positions before continuing",
|
|
538
|
+
"network": "testnet"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"description": "Close selected BTC/ETH positions",
|
|
543
|
+
"node": {
|
|
544
|
+
"action": "metamask.perps.close_positions",
|
|
545
|
+
"markets": [
|
|
546
|
+
"BTC",
|
|
547
|
+
"ETH"
|
|
548
|
+
],
|
|
549
|
+
"intent": "Close selected Perps positions before continuing",
|
|
550
|
+
"network": "testnet"
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
"metamask.perps.close_orders": {
|
|
556
|
+
"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.",
|
|
557
|
+
"examples": [
|
|
558
|
+
{
|
|
559
|
+
"description": "Cancel every open order",
|
|
560
|
+
"node": {
|
|
561
|
+
"action": "metamask.perps.close_orders",
|
|
562
|
+
"mode": "all",
|
|
563
|
+
"intent": "Cancel selected Perps orders before continuing",
|
|
564
|
+
"network": "testnet"
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"description": "Cancel BTC orders only",
|
|
569
|
+
"node": {
|
|
570
|
+
"action": "metamask.perps.close_orders",
|
|
571
|
+
"market": "BTC",
|
|
572
|
+
"intent": "Cancel selected Perps orders before continuing",
|
|
573
|
+
"network": "testnet"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
"metamask.perps.place_order": {
|
|
579
|
+
"description": "Place a Perps order through a supported app/API path. Default to testnet; mainnet order placement requires an explicit user request. 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.",
|
|
580
|
+
"examples": [
|
|
581
|
+
{
|
|
582
|
+
"description": "Place BTC market order",
|
|
583
|
+
"node": {
|
|
584
|
+
"action": "metamask.perps.place_order",
|
|
585
|
+
"market": "BTC",
|
|
586
|
+
"side": "long",
|
|
587
|
+
"notional": "10",
|
|
588
|
+
"leverage": 2,
|
|
589
|
+
"intent": "Place the requested Perps order",
|
|
590
|
+
"network": "testnet"
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
"metamask.perps.assert_positions": {
|
|
596
|
+
"description": "Assert selected live Perps positions are present or absent.",
|
|
597
|
+
"examples": [
|
|
598
|
+
{
|
|
599
|
+
"description": "Assert BTC position is open",
|
|
600
|
+
"node": {
|
|
601
|
+
"action": "metamask.perps.assert_positions",
|
|
602
|
+
"state": "open",
|
|
603
|
+
"market": "BTC",
|
|
604
|
+
"intent": "Assert the expected Perps position state"
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
"metamask.perps.assert_orders": {
|
|
610
|
+
"description": "Assert selected live Perps open orders are present or absent.",
|
|
611
|
+
"examples": [
|
|
612
|
+
{
|
|
613
|
+
"description": "Assert no BTC open orders",
|
|
614
|
+
"node": {
|
|
615
|
+
"action": "metamask.perps.assert_orders",
|
|
616
|
+
"state": "none",
|
|
617
|
+
"market": "BTC",
|
|
618
|
+
"intent": "Assert the expected Perps open order state"
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
"metamask.perps.ensure_positions": {
|
|
624
|
+
"description": "Default to testnet for Perps mutations; mainnet is read-only unless explicitly requested. Higher-level wrapper that reads selected positions, closes or places when needed, then asserts final position state. 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.",
|
|
625
|
+
"examples": [
|
|
626
|
+
{
|
|
627
|
+
"description": "Ensure no BTC position before proof window",
|
|
628
|
+
"node": {
|
|
629
|
+
"action": "metamask.perps.ensure_positions",
|
|
630
|
+
"state": "none",
|
|
631
|
+
"market": "BTC",
|
|
632
|
+
"intent": "Converge Perps positions to the requested state",
|
|
633
|
+
"network": "testnet"
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"description": "Ensure any existing positions are closed",
|
|
638
|
+
"node": {
|
|
639
|
+
"action": "metamask.perps.ensure_positions",
|
|
640
|
+
"state": "none",
|
|
641
|
+
"mode": "all",
|
|
642
|
+
"intent": "Converge Perps positions to the requested state",
|
|
643
|
+
"network": "testnet"
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
]
|
|
647
|
+
},
|
|
648
|
+
"metamask.perps.ensure_orders": {
|
|
649
|
+
"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.",
|
|
650
|
+
"examples": [
|
|
651
|
+
{
|
|
652
|
+
"description": "Ensure no open orders before proof window",
|
|
653
|
+
"node": {
|
|
654
|
+
"action": "metamask.perps.ensure_orders",
|
|
655
|
+
"state": "none",
|
|
656
|
+
"mode": "all",
|
|
657
|
+
"intent": "Converge Perps orders to the requested state",
|
|
658
|
+
"network": "testnet"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
"metamask.perps.start_state": {
|
|
664
|
+
"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.",
|
|
665
|
+
"examples": [
|
|
666
|
+
{
|
|
667
|
+
"description": "Clean BTC testnet market state",
|
|
668
|
+
"node": {
|
|
669
|
+
"action": "metamask.perps.start_state",
|
|
670
|
+
"profile": "clean_market_testnet",
|
|
671
|
+
"market": "BTC",
|
|
672
|
+
"positions": {
|
|
673
|
+
"state": "none"
|
|
674
|
+
},
|
|
675
|
+
"orders": {
|
|
676
|
+
"state": "none"
|
|
677
|
+
},
|
|
678
|
+
"intent": "Prepare the Perps start state for the proof",
|
|
679
|
+
"network": "testnet"
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"description": "Start with an open ETH long position",
|
|
684
|
+
"node": {
|
|
685
|
+
"action": "metamask.perps.start_state",
|
|
686
|
+
"profile": "open_position_testnet",
|
|
687
|
+
"market": "ETH",
|
|
688
|
+
"side": "long",
|
|
689
|
+
"positions": {
|
|
690
|
+
"state": "open",
|
|
691
|
+
"notional": "10",
|
|
692
|
+
"leverage": 2
|
|
693
|
+
},
|
|
694
|
+
"intent": "Prepare the Perps start state for the proof",
|
|
695
|
+
"network": "testnet"
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
},
|
|
700
|
+
"metamask.perps.teardown_state": {
|
|
701
|
+
"description": "Recommended configurable Perps teardown state that restores the selected environment after proof.",
|
|
702
|
+
"examples": [
|
|
703
|
+
{
|
|
704
|
+
"description": "Return BTC test account to clean state",
|
|
705
|
+
"node": {
|
|
706
|
+
"action": "metamask.perps.teardown_state",
|
|
707
|
+
"market": "BTC",
|
|
708
|
+
"positions": {
|
|
709
|
+
"state": "none"
|
|
710
|
+
},
|
|
711
|
+
"orders": {
|
|
712
|
+
"state": "none"
|
|
713
|
+
},
|
|
714
|
+
"page": "home",
|
|
715
|
+
"intent": "Restore Perps state after the proof"
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"description": "Teardown only state created by selected market",
|
|
720
|
+
"node": {
|
|
721
|
+
"action": "metamask.perps.teardown_state",
|
|
722
|
+
"market": "BTC",
|
|
723
|
+
"intent": "Restore Perps state after the proof"
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
]
|
|
410
727
|
}
|
|
411
728
|
},
|
|
412
729
|
"custom_actions": [
|
|
413
730
|
{
|
|
414
731
|
"name": "metamask.wallet.fixture_status",
|
|
415
732
|
"owner": "metamask",
|
|
416
|
-
"description": "
|
|
733
|
+
"description": "Report the on-disk wallet fixture status (accounts and password presence) without launching or mutating the app.",
|
|
417
734
|
"schema": {
|
|
418
735
|
"type": "object",
|
|
419
736
|
"properties": {
|
|
@@ -440,7 +757,7 @@
|
|
|
440
757
|
{
|
|
441
758
|
"name": "metamask.wallet.setup",
|
|
442
759
|
"owner": "metamask",
|
|
443
|
-
"description": "
|
|
760
|
+
"description": "Import the wallet fixture accounts and password so the app starts from a known signed-in state.",
|
|
444
761
|
"schema": {
|
|
445
762
|
"type": "object",
|
|
446
763
|
"properties": {
|
|
@@ -467,7 +784,7 @@
|
|
|
467
784
|
{
|
|
468
785
|
"name": "metamask.wallet.ensure_unlocked",
|
|
469
786
|
"owner": "metamask",
|
|
470
|
-
"description": "
|
|
787
|
+
"description": "Unlock the wallet with the fixture password when it is currently locked.",
|
|
471
788
|
"schema": {
|
|
472
789
|
"type": "object",
|
|
473
790
|
"properties": {
|
|
@@ -559,7 +876,7 @@
|
|
|
559
876
|
{
|
|
560
877
|
"name": "metamask.wallet.read_state",
|
|
561
878
|
"owner": "metamask",
|
|
562
|
-
"description": "
|
|
879
|
+
"description": "Read the redacted wallet state (selected account, route, and device) from the running app.",
|
|
563
880
|
"schema": {
|
|
564
881
|
"type": "object",
|
|
565
882
|
"properties": {
|