@jaw.id/cli 0.2.1 → 0.2.2

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.
Files changed (2) hide show
  1. package/oclif.manifest.json +174 -174
  2. package/package.json +2 -2
@@ -353,30 +353,6 @@
353
353
  "write.js"
354
354
  ]
355
355
  },
356
- "mcp": {
357
- "aliases": [],
358
- "args": {},
359
- "description": "Start the MCP server for AI agents (stdio transport)",
360
- "examples": [
361
- "<%= config.bin %> mcp"
362
- ],
363
- "flags": {},
364
- "hasDynamicHelp": false,
365
- "hiddenAliases": [],
366
- "id": "mcp",
367
- "pluginAlias": "@jaw.id/cli",
368
- "pluginName": "@jaw.id/cli",
369
- "pluginType": "core",
370
- "strict": true,
371
- "enableJsonFlag": false,
372
- "isESM": true,
373
- "relativePath": [
374
- "dist",
375
- "commands",
376
- "mcp",
377
- "index.js"
378
- ]
379
- },
380
356
  "rpc:call": {
381
357
  "aliases": [],
382
358
  "args": {
@@ -479,15 +455,38 @@
479
455
  "call.js"
480
456
  ]
481
457
  },
482
- "x402:log": {
458
+ "mcp": {
483
459
  "aliases": [],
484
460
  "args": {},
485
- "description": "Show the local x402 payment ledger: every attempt, paid, failed or refused, with amounts and transactions.",
461
+ "description": "Start the MCP server for AI agents (stdio transport)",
486
462
  "examples": [
487
- "<%= config.bin %> x402 log",
488
- "<%= config.bin %> x402 log --limit 20",
489
- "<%= config.bin %> x402 log --status failed",
490
- "<%= config.bin %> x402 log --output json"
463
+ "<%= config.bin %> mcp"
464
+ ],
465
+ "flags": {},
466
+ "hasDynamicHelp": false,
467
+ "hiddenAliases": [],
468
+ "id": "mcp",
469
+ "pluginAlias": "@jaw.id/cli",
470
+ "pluginName": "@jaw.id/cli",
471
+ "pluginType": "core",
472
+ "strict": true,
473
+ "enableJsonFlag": false,
474
+ "isESM": true,
475
+ "relativePath": [
476
+ "dist",
477
+ "commands",
478
+ "mcp",
479
+ "index.js"
480
+ ]
481
+ },
482
+ "session:add": {
483
+ "aliases": [],
484
+ "args": {},
485
+ "description": "Add permissions to the current session, keeping the ones it already has (one browser approval to grant, one to revoke the old).",
486
+ "examples": [
487
+ "<%= config.bin %> session add --x402",
488
+ "<%= config.bin %> session add --x402 --limit 10/day",
489
+ "<%= config.bin %> session add --permissions '{\"calls\":[...]}'"
491
490
  ],
492
491
  "flags": {
493
492
  "output": {
@@ -535,29 +534,36 @@
535
534
  "allowNo": false,
536
535
  "type": "boolean"
537
536
  },
538
- "limit": {
539
- "description": "Show only the most recent N entries.",
540
- "name": "limit",
537
+ "permissions": {
538
+ "description": "Permissions to add (inline JSON or file path).",
539
+ "exclusive": [
540
+ "x402"
541
+ ],
542
+ "name": "permissions",
541
543
  "hasDynamicHelp": false,
542
544
  "multiple": false,
543
545
  "type": "option"
544
546
  },
545
- "status": {
546
- "description": "Show only entries with this outcome.",
547
- "name": "status",
547
+ "x402": {
548
+ "description": "Add exactly what x402 payments need on the session chain. Tune the cap with --limit.",
549
+ "exclusive": [
550
+ "permissions"
551
+ ],
552
+ "name": "x402",
553
+ "allowNo": false,
554
+ "type": "boolean"
555
+ },
556
+ "limit": {
557
+ "description": "Spend cap for --x402, as <amount>/<period> (default 10/day).",
558
+ "name": "limit",
548
559
  "hasDynamicHelp": false,
549
560
  "multiple": false,
550
- "options": [
551
- "paid",
552
- "failed",
553
- "refused"
554
- ],
555
561
  "type": "option"
556
562
  }
557
563
  },
558
564
  "hasDynamicHelp": false,
559
565
  "hiddenAliases": [],
560
- "id": "x402:log",
566
+ "id": "session:add",
561
567
  "pluginAlias": "@jaw.id/cli",
562
568
  "pluginName": "@jaw.id/cli",
563
569
  "pluginType": "core",
@@ -567,25 +573,14 @@
567
573
  "relativePath": [
568
574
  "dist",
569
575
  "commands",
570
- "x402",
571
- "log.js"
576
+ "session",
577
+ "add.js"
572
578
  ]
573
579
  },
574
- "x402:pay": {
580
+ "session:revoke": {
575
581
  "aliases": [],
576
- "args": {
577
- "url": {
578
- "description": "Resource URL to fetch",
579
- "name": "url",
580
- "required": true
581
- }
582
- },
583
- "description": "Fetch a URL, paying an x402 challenge with the session key. Dry run by default: pass --pay to actually spend.",
584
- "examples": [
585
- "<%= config.bin %> x402 pay https://api.example.com/resource",
586
- "<%= config.bin %> x402 pay https://api.example.com/resource --pay",
587
- "<%= config.bin %> x402 pay https://api.example.com/resource --pay --max-amount 50000"
588
- ],
582
+ "args": {},
583
+ "description": "Revoke on-chain permission and delete local session key.",
589
584
  "flags": {
590
585
  "output": {
591
586
  "char": "o",
@@ -632,37 +627,16 @@
632
627
  "allowNo": false,
633
628
  "type": "boolean"
634
629
  },
635
- "pay": {
636
- "description": "Actually sign and send the payment. Without this the command stops before spending.",
637
- "name": "pay",
630
+ "force": {
631
+ "description": "Delete the local session even if some permissions could not be revoked. They stay live on chain until they expire, and their ids are printed because deleting the session is what loses them.",
632
+ "name": "force",
638
633
  "allowNo": false,
639
634
  "type": "boolean"
640
- },
641
- "max-amount": {
642
- "description": "Hard ceiling in base units for this call, on top of the configured policy.",
643
- "name": "max-amount",
644
- "hasDynamicHelp": false,
645
- "multiple": false,
646
- "type": "option"
647
- },
648
- "method": {
649
- "description": "HTTP method (default GET).",
650
- "name": "method",
651
- "hasDynamicHelp": false,
652
- "multiple": false,
653
- "type": "option"
654
- },
655
- "body": {
656
- "description": "Request body.",
657
- "name": "body",
658
- "hasDynamicHelp": false,
659
- "multiple": false,
660
- "type": "option"
661
635
  }
662
636
  },
663
637
  "hasDynamicHelp": false,
664
638
  "hiddenAliases": [],
665
- "id": "x402:pay",
639
+ "id": "session:revoke",
666
640
  "pluginAlias": "@jaw.id/cli",
667
641
  "pluginName": "@jaw.id/cli",
668
642
  "pluginType": "core",
@@ -672,17 +646,20 @@
672
646
  "relativePath": [
673
647
  "dist",
674
648
  "commands",
675
- "x402",
676
- "pay.js"
649
+ "session",
650
+ "revoke.js"
677
651
  ]
678
652
  },
679
- "x402:status": {
653
+ "session:setup": {
680
654
  "aliases": [],
681
655
  "args": {},
682
- "description": "Show x402 payment readiness: which account holds the funds, the resolved caps, and what has been spent. Reads only, never pays.",
656
+ "description": "Generate a session key and grant scoped on-chain permissions (one-time browser approval).",
683
657
  "examples": [
684
- "<%= config.bin %> x402 status",
685
- "<%= config.bin %> x402 status --output json"
658
+ "<%= config.bin %> session setup --chain 8453 --x402",
659
+ "<%= config.bin %> session setup --chain 8453 --x402 --limit 25/day --expiry 14",
660
+ "<%= config.bin %> session setup --chain 84532",
661
+ "<%= config.bin %> session setup --permissions '{\"calls\":[...]}' --expiry 14",
662
+ "<%= config.bin %> session setup --permissions ./permissions.json"
686
663
  ],
687
664
  "flags": {
688
665
  "output": {
@@ -729,11 +706,44 @@
729
706
  "name": "quiet",
730
707
  "allowNo": false,
731
708
  "type": "boolean"
709
+ },
710
+ "permissions": {
711
+ "description": "Permission scope (inline JSON or file path). Overrides config.permissions.",
712
+ "exclusive": [
713
+ "x402"
714
+ ],
715
+ "name": "permissions",
716
+ "hasDynamicHelp": false,
717
+ "multiple": false,
718
+ "type": "option"
719
+ },
720
+ "x402": {
721
+ "description": "Grant exactly what x402 payments need on this chain: a USDC transfer capped per period. Builds the permission from the asset registry so the USDC address and function signature do not have to be written by hand. Tune the cap with --limit.",
722
+ "exclusive": [
723
+ "permissions"
724
+ ],
725
+ "name": "x402",
726
+ "allowNo": false,
727
+ "type": "boolean"
728
+ },
729
+ "limit": {
730
+ "description": "Spend cap for --x402, as <amount>/<period> (default 10/day). Examples: 25/day, 2.5/week, 100/month.",
731
+ "name": "limit",
732
+ "hasDynamicHelp": false,
733
+ "multiple": false,
734
+ "type": "option"
735
+ },
736
+ "expiry": {
737
+ "description": "Permission expiry in days. Overrides config.sessionExpiry.",
738
+ "name": "expiry",
739
+ "hasDynamicHelp": false,
740
+ "multiple": false,
741
+ "type": "option"
732
742
  }
733
743
  },
734
744
  "hasDynamicHelp": false,
735
745
  "hiddenAliases": [],
736
- "id": "x402:status",
746
+ "id": "session:setup",
737
747
  "pluginAlias": "@jaw.id/cli",
738
748
  "pluginName": "@jaw.id/cli",
739
749
  "pluginType": "core",
@@ -743,19 +753,14 @@
743
753
  "relativePath": [
744
754
  "dist",
745
755
  "commands",
746
- "x402",
747
- "status.js"
756
+ "session",
757
+ "setup.js"
748
758
  ]
749
759
  },
750
- "session:add": {
760
+ "session:status": {
751
761
  "aliases": [],
752
762
  "args": {},
753
- "description": "Add permissions to the current session, keeping the ones it already has (one browser approval to grant, one to revoke the old).",
754
- "examples": [
755
- "<%= config.bin %> session add --x402",
756
- "<%= config.bin %> session add --x402 --limit 10/day",
757
- "<%= config.bin %> session add --permissions '{\"calls\":[...]}'"
758
- ],
763
+ "description": "Show current session status (address, permissions, expiry).",
759
764
  "flags": {
760
765
  "output": {
761
766
  "char": "o",
@@ -801,37 +806,11 @@
801
806
  "name": "quiet",
802
807
  "allowNo": false,
803
808
  "type": "boolean"
804
- },
805
- "permissions": {
806
- "description": "Permissions to add (inline JSON or file path).",
807
- "exclusive": [
808
- "x402"
809
- ],
810
- "name": "permissions",
811
- "hasDynamicHelp": false,
812
- "multiple": false,
813
- "type": "option"
814
- },
815
- "x402": {
816
- "description": "Add exactly what x402 payments need on the session chain. Tune the cap with --limit.",
817
- "exclusive": [
818
- "permissions"
819
- ],
820
- "name": "x402",
821
- "allowNo": false,
822
- "type": "boolean"
823
- },
824
- "limit": {
825
- "description": "Spend cap for --x402, as <amount>/<period> (default 10/day).",
826
- "name": "limit",
827
- "hasDynamicHelp": false,
828
- "multiple": false,
829
- "type": "option"
830
809
  }
831
810
  },
832
811
  "hasDynamicHelp": false,
833
812
  "hiddenAliases": [],
834
- "id": "session:add",
813
+ "id": "session:status",
835
814
  "pluginAlias": "@jaw.id/cli",
836
815
  "pluginName": "@jaw.id/cli",
837
816
  "pluginType": "core",
@@ -842,13 +821,19 @@
842
821
  "dist",
843
822
  "commands",
844
823
  "session",
845
- "add.js"
824
+ "status.js"
846
825
  ]
847
826
  },
848
- "session:revoke": {
827
+ "x402:log": {
849
828
  "aliases": [],
850
829
  "args": {},
851
- "description": "Revoke on-chain permission and delete local session key.",
830
+ "description": "Show the local x402 payment ledger: every attempt, paid, failed or refused, with amounts and transactions.",
831
+ "examples": [
832
+ "<%= config.bin %> x402 log",
833
+ "<%= config.bin %> x402 log --limit 20",
834
+ "<%= config.bin %> x402 log --status failed",
835
+ "<%= config.bin %> x402 log --output json"
836
+ ],
852
837
  "flags": {
853
838
  "output": {
854
839
  "char": "o",
@@ -895,16 +880,29 @@
895
880
  "allowNo": false,
896
881
  "type": "boolean"
897
882
  },
898
- "force": {
899
- "description": "Delete the local session even if some permissions could not be revoked. They stay live on chain until they expire, and their ids are printed because deleting the session is what loses them.",
900
- "name": "force",
901
- "allowNo": false,
902
- "type": "boolean"
883
+ "limit": {
884
+ "description": "Show only the most recent N entries.",
885
+ "name": "limit",
886
+ "hasDynamicHelp": false,
887
+ "multiple": false,
888
+ "type": "option"
889
+ },
890
+ "status": {
891
+ "description": "Show only entries with this outcome.",
892
+ "name": "status",
893
+ "hasDynamicHelp": false,
894
+ "multiple": false,
895
+ "options": [
896
+ "paid",
897
+ "failed",
898
+ "refused"
899
+ ],
900
+ "type": "option"
903
901
  }
904
902
  },
905
903
  "hasDynamicHelp": false,
906
904
  "hiddenAliases": [],
907
- "id": "session:revoke",
905
+ "id": "x402:log",
908
906
  "pluginAlias": "@jaw.id/cli",
909
907
  "pluginName": "@jaw.id/cli",
910
908
  "pluginType": "core",
@@ -914,20 +912,24 @@
914
912
  "relativePath": [
915
913
  "dist",
916
914
  "commands",
917
- "session",
918
- "revoke.js"
915
+ "x402",
916
+ "log.js"
919
917
  ]
920
918
  },
921
- "session:setup": {
919
+ "x402:pay": {
922
920
  "aliases": [],
923
- "args": {},
924
- "description": "Generate a session key and grant scoped on-chain permissions (one-time browser approval).",
921
+ "args": {
922
+ "url": {
923
+ "description": "Resource URL to fetch",
924
+ "name": "url",
925
+ "required": true
926
+ }
927
+ },
928
+ "description": "Fetch a URL, paying an x402 challenge with the session key. Dry run by default: pass --pay to actually spend.",
925
929
  "examples": [
926
- "<%= config.bin %> session setup --chain 8453 --x402",
927
- "<%= config.bin %> session setup --chain 8453 --x402 --limit 25/day --expiry 14",
928
- "<%= config.bin %> session setup --chain 84532",
929
- "<%= config.bin %> session setup --permissions '{\"calls\":[...]}' --expiry 14",
930
- "<%= config.bin %> session setup --permissions ./permissions.json"
930
+ "<%= config.bin %> x402 pay https://api.example.com/resource",
931
+ "<%= config.bin %> x402 pay https://api.example.com/resource --pay",
932
+ "<%= config.bin %> x402 pay https://api.example.com/resource --pay --max-amount 50000"
931
933
  ],
932
934
  "flags": {
933
935
  "output": {
@@ -975,35 +977,29 @@
975
977
  "allowNo": false,
976
978
  "type": "boolean"
977
979
  },
978
- "permissions": {
979
- "description": "Permission scope (inline JSON or file path). Overrides config.permissions.",
980
- "exclusive": [
981
- "x402"
982
- ],
983
- "name": "permissions",
980
+ "pay": {
981
+ "description": "Actually sign and send the payment. Without this the command stops before spending.",
982
+ "name": "pay",
983
+ "allowNo": false,
984
+ "type": "boolean"
985
+ },
986
+ "max-amount": {
987
+ "description": "Hard ceiling in base units for this call, on top of the configured policy.",
988
+ "name": "max-amount",
984
989
  "hasDynamicHelp": false,
985
990
  "multiple": false,
986
991
  "type": "option"
987
992
  },
988
- "x402": {
989
- "description": "Grant exactly what x402 payments need on this chain: a USDC transfer capped per period. Builds the permission from the asset registry so the USDC address and function signature do not have to be written by hand. Tune the cap with --limit.",
990
- "exclusive": [
991
- "permissions"
992
- ],
993
- "name": "x402",
994
- "allowNo": false,
995
- "type": "boolean"
996
- },
997
- "limit": {
998
- "description": "Spend cap for --x402, as <amount>/<period> (default 10/day). Examples: 25/day, 2.5/week, 100/month.",
999
- "name": "limit",
993
+ "method": {
994
+ "description": "HTTP method (default GET).",
995
+ "name": "method",
1000
996
  "hasDynamicHelp": false,
1001
997
  "multiple": false,
1002
998
  "type": "option"
1003
999
  },
1004
- "expiry": {
1005
- "description": "Permission expiry in days. Overrides config.sessionExpiry.",
1006
- "name": "expiry",
1000
+ "body": {
1001
+ "description": "Request body.",
1002
+ "name": "body",
1007
1003
  "hasDynamicHelp": false,
1008
1004
  "multiple": false,
1009
1005
  "type": "option"
@@ -1011,7 +1007,7 @@
1011
1007
  },
1012
1008
  "hasDynamicHelp": false,
1013
1009
  "hiddenAliases": [],
1014
- "id": "session:setup",
1010
+ "id": "x402:pay",
1015
1011
  "pluginAlias": "@jaw.id/cli",
1016
1012
  "pluginName": "@jaw.id/cli",
1017
1013
  "pluginType": "core",
@@ -1021,14 +1017,18 @@
1021
1017
  "relativePath": [
1022
1018
  "dist",
1023
1019
  "commands",
1024
- "session",
1025
- "setup.js"
1020
+ "x402",
1021
+ "pay.js"
1026
1022
  ]
1027
1023
  },
1028
- "session:status": {
1024
+ "x402:status": {
1029
1025
  "aliases": [],
1030
1026
  "args": {},
1031
- "description": "Show current session status (address, permissions, expiry).",
1027
+ "description": "Show x402 payment readiness: which account holds the funds, the resolved caps, and what has been spent. Reads only, never pays.",
1028
+ "examples": [
1029
+ "<%= config.bin %> x402 status",
1030
+ "<%= config.bin %> x402 status --output json"
1031
+ ],
1032
1032
  "flags": {
1033
1033
  "output": {
1034
1034
  "char": "o",
@@ -1078,7 +1078,7 @@
1078
1078
  },
1079
1079
  "hasDynamicHelp": false,
1080
1080
  "hiddenAliases": [],
1081
- "id": "session:status",
1081
+ "id": "x402:status",
1082
1082
  "pluginAlias": "@jaw.id/cli",
1083
1083
  "pluginName": "@jaw.id/cli",
1084
1084
  "pluginType": "core",
@@ -1088,10 +1088,10 @@
1088
1088
  "relativePath": [
1089
1089
  "dist",
1090
1090
  "commands",
1091
- "session",
1091
+ "x402",
1092
1092
  "status.js"
1093
1093
  ]
1094
1094
  }
1095
1095
  },
1096
- "version": "0.2.1"
1096
+ "version": "0.2.2"
1097
1097
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jaw.id/cli",
3
3
  "description": "CLI + MCP Server for JAW.id smart accounts — for humans and AI agents",
4
- "version": "0.2.1",
4
+ "version": "0.2.2",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "bin": {
@@ -112,7 +112,7 @@
112
112
  }
113
113
  },
114
114
  "dependencies": {
115
- "@jaw.id/core": "1.3.1",
115
+ "@jaw.id/core": "1.3.2",
116
116
  "@modelcontextprotocol/sdk": "^1.12.1",
117
117
  "@oclif/core": "^4.3.0",
118
118
  "open": "^10.1.0",