chainlesschain 0.145.0 → 0.152.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.
Files changed (113) hide show
  1. package/package.json +1 -1
  2. package/src/commands/activitypub.js +207 -0
  3. package/src/commands/agent-network.js +217 -0
  4. package/src/commands/automation.js +201 -0
  5. package/src/commands/bi.js +203 -0
  6. package/src/commands/browse.js +213 -0
  7. package/src/commands/codegen.js +207 -0
  8. package/src/commands/collab.js +211 -0
  9. package/src/commands/compliance.js +410 -0
  10. package/src/commands/cowork.js +203 -0
  11. package/src/commands/dbevo.js +227 -0
  12. package/src/commands/dev.js +207 -0
  13. package/src/commands/did-v2.js +217 -0
  14. package/src/commands/did.js +221 -0
  15. package/src/commands/dlp.js +213 -0
  16. package/src/commands/evomap.js +205 -0
  17. package/src/commands/export.js +213 -0
  18. package/src/commands/federation.js +209 -0
  19. package/src/commands/fusion.js +205 -0
  20. package/src/commands/governance.js +209 -0
  21. package/src/commands/hook.js +209 -0
  22. package/src/commands/import.js +209 -0
  23. package/src/commands/infra.js +203 -0
  24. package/src/commands/instinct.js +209 -0
  25. package/src/commands/ipfs.js +207 -0
  26. package/src/commands/llm.js +217 -0
  27. package/src/commands/matrix.js +207 -0
  28. package/src/commands/mcp.js +217 -0
  29. package/src/commands/memory.js +209 -0
  30. package/src/commands/multimodal.js +203 -0
  31. package/src/commands/nlprog.js +225 -0
  32. package/src/commands/nostr.js +209 -0
  33. package/src/commands/note.js +205 -0
  34. package/src/commands/ops.js +219 -0
  35. package/src/commands/org.js +209 -0
  36. package/src/commands/p2p.js +209 -0
  37. package/src/commands/perception.js +209 -0
  38. package/src/commands/permmem.js +203 -0
  39. package/src/commands/plugin-ecosystem.js +209 -0
  40. package/src/commands/pqc.js +213 -0
  41. package/src/commands/quantization.js +207 -0
  42. package/src/commands/rcache.js +205 -0
  43. package/src/commands/recommend.js +233 -0
  44. package/src/commands/runtime.js +205 -0
  45. package/src/commands/scim.js +209 -0
  46. package/src/commands/session.js +209 -0
  47. package/src/commands/skill.js +207 -0
  48. package/src/commands/social.js +201 -0
  49. package/src/commands/sso.js +209 -0
  50. package/src/commands/sync.js +209 -0
  51. package/src/commands/tech.js +209 -0
  52. package/src/commands/tenant.js +217 -0
  53. package/src/commands/tokens.js +209 -0
  54. package/src/commands/trust.js +217 -0
  55. package/src/commands/wallet.js +209 -0
  56. package/src/commands/workflow.js +203 -0
  57. package/src/index.js +140 -0
  58. package/src/lib/activitypub-bridge.js +334 -0
  59. package/src/lib/agent-network.js +341 -0
  60. package/src/lib/aiops.js +346 -0
  61. package/src/lib/automation-engine.js +335 -0
  62. package/src/lib/autonomous-developer.js +332 -0
  63. package/src/lib/bi-engine.js +333 -0
  64. package/src/lib/browser-automation.js +334 -0
  65. package/src/lib/code-agent.js +339 -0
  66. package/src/lib/collaboration-governance.js +334 -0
  67. package/src/lib/community-governance.js +346 -0
  68. package/src/lib/content-recommendation.js +351 -0
  69. package/src/lib/cowork-share.js +338 -0
  70. package/src/lib/dbevo.js +351 -0
  71. package/src/lib/decentral-infra.js +330 -0
  72. package/src/lib/did-manager.js +341 -0
  73. package/src/lib/did-v2-manager.js +341 -0
  74. package/src/lib/dlp-engine.js +339 -0
  75. package/src/lib/evomap-governance.js +334 -0
  76. package/src/lib/federation-hardening.js +340 -0
  77. package/src/lib/hook-manager.js +341 -0
  78. package/src/lib/instinct-manager.js +346 -0
  79. package/src/lib/ipfs-storage.js +334 -0
  80. package/src/lib/knowledge-exporter.js +341 -0
  81. package/src/lib/knowledge-importer.js +341 -0
  82. package/src/lib/llm-providers.js +346 -0
  83. package/src/lib/matrix-bridge.js +339 -0
  84. package/src/lib/mcp-registry.js +346 -0
  85. package/src/lib/memory-manager.js +336 -0
  86. package/src/lib/multimodal.js +330 -0
  87. package/src/lib/nl-programming.js +341 -0
  88. package/src/lib/nostr-bridge.js +336 -0
  89. package/src/lib/note-versioning.js +339 -0
  90. package/src/lib/org-manager.js +336 -0
  91. package/src/lib/p2p-manager.js +341 -0
  92. package/src/lib/perception.js +346 -0
  93. package/src/lib/permanent-memory.js +327 -0
  94. package/src/lib/plugin-ecosystem.js +346 -0
  95. package/src/lib/pqc-manager.js +346 -0
  96. package/src/lib/protocol-fusion.js +338 -0
  97. package/src/lib/quantization.js +337 -0
  98. package/src/lib/response-cache.js +333 -0
  99. package/src/lib/scim-manager.js +346 -0
  100. package/src/lib/session-manager.js +334 -0
  101. package/src/lib/skill-loader.js +334 -0
  102. package/src/lib/social-manager.js +330 -0
  103. package/src/lib/sso-manager.js +340 -0
  104. package/src/lib/sync-manager.js +336 -0
  105. package/src/lib/tech-learning-engine.js +341 -0
  106. package/src/lib/tenant-saas.js +341 -0
  107. package/src/lib/threat-intel.js +330 -0
  108. package/src/lib/token-tracker.js +336 -0
  109. package/src/lib/trust-security.js +343 -0
  110. package/src/lib/ueba.js +340 -0
  111. package/src/lib/universal-runtime.js +330 -0
  112. package/src/lib/wallet-manager.js +336 -0
  113. package/src/lib/workflow-engine.js +330 -0
@@ -708,3 +708,210 @@ export function registerIpfsCommand(program) {
708
708
 
709
709
  program.addCommand(ipfs);
710
710
  }
711
+
712
+ // === Iter20 V2 governance overlay ===
713
+ export function registerIpfsgovV2Commands(program) {
714
+ const parent = program.commands.find((c) => c.name() === "ipfs");
715
+ if (!parent) return;
716
+ const L = async () => await import("../lib/ipfs-storage.js");
717
+ parent
718
+ .command("ipfsgov-enums-v2")
719
+ .description("Show V2 enums")
720
+ .action(async () => {
721
+ const m = await L();
722
+ console.log(
723
+ JSON.stringify(
724
+ {
725
+ profileMaturity: m.IPFSGOV_PROFILE_MATURITY_V2,
726
+ pinLifecycle: m.IPFSGOV_PIN_LIFECYCLE_V2,
727
+ },
728
+ null,
729
+ 2,
730
+ ),
731
+ );
732
+ });
733
+ parent
734
+ .command("ipfsgov-config-v2")
735
+ .description("Show V2 config")
736
+ .action(async () => {
737
+ const m = await L();
738
+ console.log(
739
+ JSON.stringify(
740
+ {
741
+ maxActive: m.getMaxActiveIpfsgovProfilesPerOwnerV2(),
742
+ maxPending: m.getMaxPendingIpfsgovPinsPerProfileV2(),
743
+ idleMs: m.getIpfsgovProfileIdleMsV2(),
744
+ stuckMs: m.getIpfsgovPinStuckMsV2(),
745
+ },
746
+ null,
747
+ 2,
748
+ ),
749
+ );
750
+ });
751
+ parent
752
+ .command("ipfsgov-set-max-active-v2 <n>")
753
+ .description("Set max active")
754
+ .action(async (n) => {
755
+ (await L()).setMaxActiveIpfsgovProfilesPerOwnerV2(Number(n));
756
+ console.log("ok");
757
+ });
758
+ parent
759
+ .command("ipfsgov-set-max-pending-v2 <n>")
760
+ .description("Set max pending")
761
+ .action(async (n) => {
762
+ (await L()).setMaxPendingIpfsgovPinsPerProfileV2(Number(n));
763
+ console.log("ok");
764
+ });
765
+ parent
766
+ .command("ipfsgov-set-idle-ms-v2 <n>")
767
+ .description("Set idle threshold ms")
768
+ .action(async (n) => {
769
+ (await L()).setIpfsgovProfileIdleMsV2(Number(n));
770
+ console.log("ok");
771
+ });
772
+ parent
773
+ .command("ipfsgov-set-stuck-ms-v2 <n>")
774
+ .description("Set stuck threshold ms")
775
+ .action(async (n) => {
776
+ (await L()).setIpfsgovPinStuckMsV2(Number(n));
777
+ console.log("ok");
778
+ });
779
+ parent
780
+ .command("ipfsgov-register-v2 <id> <owner>")
781
+ .description("Register V2 profile")
782
+ .option("--mode <v>", "mode")
783
+ .action(async (id, owner, o) => {
784
+ const m = await L();
785
+ console.log(
786
+ JSON.stringify(
787
+ m.registerIpfsgovProfileV2({ id, owner, mode: o.mode }),
788
+ null,
789
+ 2,
790
+ ),
791
+ );
792
+ });
793
+ parent
794
+ .command("ipfsgov-activate-v2 <id>")
795
+ .description("Activate profile")
796
+ .action(async (id) => {
797
+ console.log(
798
+ JSON.stringify((await L()).activateIpfsgovProfileV2(id), null, 2),
799
+ );
800
+ });
801
+ parent
802
+ .command("ipfsgov-stale-v2 <id>")
803
+ .description("Stale profile")
804
+ .action(async (id) => {
805
+ console.log(
806
+ JSON.stringify((await L()).staleIpfsgovProfileV2(id), null, 2),
807
+ );
808
+ });
809
+ parent
810
+ .command("ipfsgov-archive-v2 <id>")
811
+ .description("Archive profile")
812
+ .action(async (id) => {
813
+ console.log(
814
+ JSON.stringify((await L()).archiveIpfsgovProfileV2(id), null, 2),
815
+ );
816
+ });
817
+ parent
818
+ .command("ipfsgov-touch-v2 <id>")
819
+ .description("Touch profile")
820
+ .action(async (id) => {
821
+ console.log(
822
+ JSON.stringify((await L()).touchIpfsgovProfileV2(id), null, 2),
823
+ );
824
+ });
825
+ parent
826
+ .command("ipfsgov-get-v2 <id>")
827
+ .description("Get profile")
828
+ .action(async (id) => {
829
+ console.log(JSON.stringify((await L()).getIpfsgovProfileV2(id), null, 2));
830
+ });
831
+ parent
832
+ .command("ipfsgov-list-v2")
833
+ .description("List profiles")
834
+ .action(async () => {
835
+ console.log(JSON.stringify((await L()).listIpfsgovProfilesV2(), null, 2));
836
+ });
837
+ parent
838
+ .command("ipfsgov-create-pin-v2 <id> <profileId>")
839
+ .description("Create pin")
840
+ .option("--cid <v>", "cid")
841
+ .action(async (id, profileId, o) => {
842
+ const m = await L();
843
+ console.log(
844
+ JSON.stringify(
845
+ m.createIpfsgovPinV2({ id, profileId, cid: o.cid }),
846
+ null,
847
+ 2,
848
+ ),
849
+ );
850
+ });
851
+ parent
852
+ .command("ipfsgov-pinning-pin-v2 <id>")
853
+ .description("Mark pin as pinning")
854
+ .action(async (id) => {
855
+ console.log(JSON.stringify((await L()).pinningIpfsgovPinV2(id), null, 2));
856
+ });
857
+ parent
858
+ .command("ipfsgov-complete-pin-v2 <id>")
859
+ .description("Complete pin")
860
+ .action(async (id) => {
861
+ console.log(
862
+ JSON.stringify((await L()).completePinIpfsgovV2(id), null, 2),
863
+ );
864
+ });
865
+ parent
866
+ .command("ipfsgov-fail-pin-v2 <id> [reason]")
867
+ .description("Fail pin")
868
+ .action(async (id, reason) => {
869
+ console.log(
870
+ JSON.stringify((await L()).failIpfsgovPinV2(id, reason), null, 2),
871
+ );
872
+ });
873
+ parent
874
+ .command("ipfsgov-cancel-pin-v2 <id> [reason]")
875
+ .description("Cancel pin")
876
+ .action(async (id, reason) => {
877
+ console.log(
878
+ JSON.stringify((await L()).cancelIpfsgovPinV2(id, reason), null, 2),
879
+ );
880
+ });
881
+ parent
882
+ .command("ipfsgov-get-pin-v2 <id>")
883
+ .description("Get pin")
884
+ .action(async (id) => {
885
+ console.log(JSON.stringify((await L()).getIpfsgovPinV2(id), null, 2));
886
+ });
887
+ parent
888
+ .command("ipfsgov-list-pins-v2")
889
+ .description("List pins")
890
+ .action(async () => {
891
+ console.log(JSON.stringify((await L()).listIpfsgovPinsV2(), null, 2));
892
+ });
893
+ parent
894
+ .command("ipfsgov-auto-stale-idle-v2")
895
+ .description("Auto-stale idle")
896
+ .action(async () => {
897
+ console.log(
898
+ JSON.stringify((await L()).autoStaleIdleIpfsgovProfilesV2(), null, 2),
899
+ );
900
+ });
901
+ parent
902
+ .command("ipfsgov-auto-fail-stuck-v2")
903
+ .description("Auto-fail stuck pins")
904
+ .action(async () => {
905
+ console.log(
906
+ JSON.stringify((await L()).autoFailStuckIpfsgovPinsV2(), null, 2),
907
+ );
908
+ });
909
+ parent
910
+ .command("ipfsgov-gov-stats-v2")
911
+ .description("V2 gov stats")
912
+ .action(async () => {
913
+ console.log(
914
+ JSON.stringify((await L()).getIpfsStorageGovStatsV2(), null, 2),
915
+ );
916
+ });
917
+ }
@@ -549,3 +549,220 @@ export function registerLlmCommand(program) {
549
549
  .description("Auto-fail stuck V2 requests")
550
550
  .action(() => out(autoFailStuckRequestsV2()));
551
551
  }
552
+
553
+ // === Iter22 V2 governance overlay ===
554
+ export function registerLlmgovV2Commands(program) {
555
+ const parent = program.commands.find((c) => c.name() === "llm");
556
+ if (!parent) return;
557
+ const L = async () => await import("../lib/llm-providers.js");
558
+ parent
559
+ .command("llmgov-enums-v2")
560
+ .description("Show V2 enums")
561
+ .action(async () => {
562
+ const m = await L();
563
+ console.log(
564
+ JSON.stringify(
565
+ {
566
+ profileMaturity: m.LLMGOV_PROFILE_MATURITY_V2,
567
+ completionLifecycle: m.LLMGOV_COMPLETION_LIFECYCLE_V2,
568
+ },
569
+ null,
570
+ 2,
571
+ ),
572
+ );
573
+ });
574
+ parent
575
+ .command("llmgov-config-v2")
576
+ .description("Show V2 config")
577
+ .action(async () => {
578
+ const m = await L();
579
+ console.log(
580
+ JSON.stringify(
581
+ {
582
+ maxActive: m.getMaxActiveLlmgovProfilesPerOwnerV2(),
583
+ maxPending: m.getMaxPendingLlmgovCompletionsPerProfileV2(),
584
+ idleMs: m.getLlmgovProfileIdleMsV2(),
585
+ stuckMs: m.getLlmgovCompletionStuckMsV2(),
586
+ },
587
+ null,
588
+ 2,
589
+ ),
590
+ );
591
+ });
592
+ parent
593
+ .command("llmgov-set-max-active-v2 <n>")
594
+ .description("Set max active")
595
+ .action(async (n) => {
596
+ (await L()).setMaxActiveLlmgovProfilesPerOwnerV2(Number(n));
597
+ console.log("ok");
598
+ });
599
+ parent
600
+ .command("llmgov-set-max-pending-v2 <n>")
601
+ .description("Set max pending")
602
+ .action(async (n) => {
603
+ (await L()).setMaxPendingLlmgovCompletionsPerProfileV2(Number(n));
604
+ console.log("ok");
605
+ });
606
+ parent
607
+ .command("llmgov-set-idle-ms-v2 <n>")
608
+ .description("Set idle threshold ms")
609
+ .action(async (n) => {
610
+ (await L()).setLlmgovProfileIdleMsV2(Number(n));
611
+ console.log("ok");
612
+ });
613
+ parent
614
+ .command("llmgov-set-stuck-ms-v2 <n>")
615
+ .description("Set stuck threshold ms")
616
+ .action(async (n) => {
617
+ (await L()).setLlmgovCompletionStuckMsV2(Number(n));
618
+ console.log("ok");
619
+ });
620
+ parent
621
+ .command("llmgov-register-v2 <id> <owner>")
622
+ .description("Register V2 profile")
623
+ .option("--provider <v>", "provider")
624
+ .action(async (id, owner, o) => {
625
+ const m = await L();
626
+ console.log(
627
+ JSON.stringify(
628
+ m.registerLlmgovProfileV2({ id, owner, provider: o.provider }),
629
+ null,
630
+ 2,
631
+ ),
632
+ );
633
+ });
634
+ parent
635
+ .command("llmgov-activate-v2 <id>")
636
+ .description("Activate profile")
637
+ .action(async (id) => {
638
+ console.log(
639
+ JSON.stringify((await L()).activateLlmgovProfileV2(id), null, 2),
640
+ );
641
+ });
642
+ parent
643
+ .command("llmgov-degrade-v2 <id>")
644
+ .description("Degrade profile")
645
+ .action(async (id) => {
646
+ console.log(
647
+ JSON.stringify((await L()).degradeLlmgovProfileV2(id), null, 2),
648
+ );
649
+ });
650
+ parent
651
+ .command("llmgov-archive-v2 <id>")
652
+ .description("Archive profile")
653
+ .action(async (id) => {
654
+ console.log(
655
+ JSON.stringify((await L()).archiveLlmgovProfileV2(id), null, 2),
656
+ );
657
+ });
658
+ parent
659
+ .command("llmgov-touch-v2 <id>")
660
+ .description("Touch profile")
661
+ .action(async (id) => {
662
+ console.log(
663
+ JSON.stringify((await L()).touchLlmgovProfileV2(id), null, 2),
664
+ );
665
+ });
666
+ parent
667
+ .command("llmgov-get-v2 <id>")
668
+ .description("Get profile")
669
+ .action(async (id) => {
670
+ console.log(JSON.stringify((await L()).getLlmgovProfileV2(id), null, 2));
671
+ });
672
+ parent
673
+ .command("llmgov-list-v2")
674
+ .description("List profiles")
675
+ .action(async () => {
676
+ console.log(JSON.stringify((await L()).listLlmgovProfilesV2(), null, 2));
677
+ });
678
+ parent
679
+ .command("llmgov-create-completion-v2 <id> <profileId>")
680
+ .description("Create completion")
681
+ .option("--model <v>", "model")
682
+ .action(async (id, profileId, o) => {
683
+ const m = await L();
684
+ console.log(
685
+ JSON.stringify(
686
+ m.createLlmgovCompletionV2({ id, profileId, model: o.model }),
687
+ null,
688
+ 2,
689
+ ),
690
+ );
691
+ });
692
+ parent
693
+ .command("llmgov-inferring-completion-v2 <id>")
694
+ .description("Mark completion as inferring")
695
+ .action(async (id) => {
696
+ console.log(
697
+ JSON.stringify((await L()).inferringLlmgovCompletionV2(id), null, 2),
698
+ );
699
+ });
700
+ parent
701
+ .command("llmgov-complete-completion-v2 <id>")
702
+ .description("Complete completion")
703
+ .action(async (id) => {
704
+ console.log(
705
+ JSON.stringify((await L()).completeCompletionLlmgovV2(id), null, 2),
706
+ );
707
+ });
708
+ parent
709
+ .command("llmgov-fail-completion-v2 <id> [reason]")
710
+ .description("Fail completion")
711
+ .action(async (id, reason) => {
712
+ console.log(
713
+ JSON.stringify((await L()).failLlmgovCompletionV2(id, reason), null, 2),
714
+ );
715
+ });
716
+ parent
717
+ .command("llmgov-cancel-completion-v2 <id> [reason]")
718
+ .description("Cancel completion")
719
+ .action(async (id, reason) => {
720
+ console.log(
721
+ JSON.stringify(
722
+ (await L()).cancelLlmgovCompletionV2(id, reason),
723
+ null,
724
+ 2,
725
+ ),
726
+ );
727
+ });
728
+ parent
729
+ .command("llmgov-get-completion-v2 <id>")
730
+ .description("Get completion")
731
+ .action(async (id) => {
732
+ console.log(
733
+ JSON.stringify((await L()).getLlmgovCompletionV2(id), null, 2),
734
+ );
735
+ });
736
+ parent
737
+ .command("llmgov-list-completions-v2")
738
+ .description("List completions")
739
+ .action(async () => {
740
+ console.log(
741
+ JSON.stringify((await L()).listLlmgovCompletionsV2(), null, 2),
742
+ );
743
+ });
744
+ parent
745
+ .command("llmgov-auto-degrade-idle-v2")
746
+ .description("Auto-degrade idle")
747
+ .action(async () => {
748
+ console.log(
749
+ JSON.stringify((await L()).autoDegradeIdleLlmgovProfilesV2(), null, 2),
750
+ );
751
+ });
752
+ parent
753
+ .command("llmgov-auto-fail-stuck-v2")
754
+ .description("Auto-fail stuck completions")
755
+ .action(async () => {
756
+ console.log(
757
+ JSON.stringify((await L()).autoFailStuckLlmgovCompletionsV2(), null, 2),
758
+ );
759
+ });
760
+ parent
761
+ .command("llmgov-gov-stats-v2")
762
+ .description("V2 gov stats")
763
+ .action(async () => {
764
+ console.log(
765
+ JSON.stringify((await L()).getLlmProvidersGovStatsV2(), null, 2),
766
+ );
767
+ });
768
+ }
@@ -663,3 +663,210 @@ export function registerMatrixV2Command(matrix) {
663
663
  console.log(JSON.stringify(getMatrixBridgeStatsV2(), null, 2));
664
664
  });
665
665
  }
666
+
667
+ // === Iter21 V2 governance overlay ===
668
+ export function registerMatgovV2Commands(program) {
669
+ const parent = program.commands.find((c) => c.name() === "matrix");
670
+ if (!parent) return;
671
+ const L = async () => await import("../lib/matrix-bridge.js");
672
+ parent
673
+ .command("matgov-enums-v2")
674
+ .description("Show V2 enums")
675
+ .action(async () => {
676
+ const m = await L();
677
+ console.log(
678
+ JSON.stringify(
679
+ {
680
+ profileMaturity: m.MATGOV_PROFILE_MATURITY_V2,
681
+ sendLifecycle: m.MATGOV_SEND_LIFECYCLE_V2,
682
+ },
683
+ null,
684
+ 2,
685
+ ),
686
+ );
687
+ });
688
+ parent
689
+ .command("matgov-config-v2")
690
+ .description("Show V2 config")
691
+ .action(async () => {
692
+ const m = await L();
693
+ console.log(
694
+ JSON.stringify(
695
+ {
696
+ maxActive: m.getMaxActiveMatgovProfilesPerOwnerV2(),
697
+ maxPending: m.getMaxPendingMatgovSendsPerProfileV2(),
698
+ idleMs: m.getMatgovProfileIdleMsV2(),
699
+ stuckMs: m.getMatgovSendStuckMsV2(),
700
+ },
701
+ null,
702
+ 2,
703
+ ),
704
+ );
705
+ });
706
+ parent
707
+ .command("matgov-set-max-active-v2 <n>")
708
+ .description("Set max active")
709
+ .action(async (n) => {
710
+ (await L()).setMaxActiveMatgovProfilesPerOwnerV2(Number(n));
711
+ console.log("ok");
712
+ });
713
+ parent
714
+ .command("matgov-set-max-pending-v2 <n>")
715
+ .description("Set max pending")
716
+ .action(async (n) => {
717
+ (await L()).setMaxPendingMatgovSendsPerProfileV2(Number(n));
718
+ console.log("ok");
719
+ });
720
+ parent
721
+ .command("matgov-set-idle-ms-v2 <n>")
722
+ .description("Set idle threshold ms")
723
+ .action(async (n) => {
724
+ (await L()).setMatgovProfileIdleMsV2(Number(n));
725
+ console.log("ok");
726
+ });
727
+ parent
728
+ .command("matgov-set-stuck-ms-v2 <n>")
729
+ .description("Set stuck threshold ms")
730
+ .action(async (n) => {
731
+ (await L()).setMatgovSendStuckMsV2(Number(n));
732
+ console.log("ok");
733
+ });
734
+ parent
735
+ .command("matgov-register-v2 <id> <owner>")
736
+ .description("Register V2 profile")
737
+ .option("--homeserver <v>", "homeserver")
738
+ .action(async (id, owner, o) => {
739
+ const m = await L();
740
+ console.log(
741
+ JSON.stringify(
742
+ m.registerMatgovProfileV2({ id, owner, homeserver: o.homeserver }),
743
+ null,
744
+ 2,
745
+ ),
746
+ );
747
+ });
748
+ parent
749
+ .command("matgov-activate-v2 <id>")
750
+ .description("Activate profile")
751
+ .action(async (id) => {
752
+ console.log(
753
+ JSON.stringify((await L()).activateMatgovProfileV2(id), null, 2),
754
+ );
755
+ });
756
+ parent
757
+ .command("matgov-suspend-v2 <id>")
758
+ .description("Suspend profile")
759
+ .action(async (id) => {
760
+ console.log(
761
+ JSON.stringify((await L()).suspendMatgovProfileV2(id), null, 2),
762
+ );
763
+ });
764
+ parent
765
+ .command("matgov-archive-v2 <id>")
766
+ .description("Archive profile")
767
+ .action(async (id) => {
768
+ console.log(
769
+ JSON.stringify((await L()).archiveMatgovProfileV2(id), null, 2),
770
+ );
771
+ });
772
+ parent
773
+ .command("matgov-touch-v2 <id>")
774
+ .description("Touch profile")
775
+ .action(async (id) => {
776
+ console.log(
777
+ JSON.stringify((await L()).touchMatgovProfileV2(id), null, 2),
778
+ );
779
+ });
780
+ parent
781
+ .command("matgov-get-v2 <id>")
782
+ .description("Get profile")
783
+ .action(async (id) => {
784
+ console.log(JSON.stringify((await L()).getMatgovProfileV2(id), null, 2));
785
+ });
786
+ parent
787
+ .command("matgov-list-v2")
788
+ .description("List profiles")
789
+ .action(async () => {
790
+ console.log(JSON.stringify((await L()).listMatgovProfilesV2(), null, 2));
791
+ });
792
+ parent
793
+ .command("matgov-create-send-v2 <id> <profileId>")
794
+ .description("Create send")
795
+ .option("--room <v>", "room")
796
+ .action(async (id, profileId, o) => {
797
+ const m = await L();
798
+ console.log(
799
+ JSON.stringify(
800
+ m.createMatgovSendV2({ id, profileId, room: o.room }),
801
+ null,
802
+ 2,
803
+ ),
804
+ );
805
+ });
806
+ parent
807
+ .command("matgov-sending-send-v2 <id>")
808
+ .description("Mark send as sending")
809
+ .action(async (id) => {
810
+ console.log(JSON.stringify((await L()).sendingMatgovSendV2(id), null, 2));
811
+ });
812
+ parent
813
+ .command("matgov-complete-send-v2 <id>")
814
+ .description("Complete send")
815
+ .action(async (id) => {
816
+ console.log(
817
+ JSON.stringify((await L()).completeSendMatgovV2(id), null, 2),
818
+ );
819
+ });
820
+ parent
821
+ .command("matgov-fail-send-v2 <id> [reason]")
822
+ .description("Fail send")
823
+ .action(async (id, reason) => {
824
+ console.log(
825
+ JSON.stringify((await L()).failMatgovSendV2(id, reason), null, 2),
826
+ );
827
+ });
828
+ parent
829
+ .command("matgov-cancel-send-v2 <id> [reason]")
830
+ .description("Cancel send")
831
+ .action(async (id, reason) => {
832
+ console.log(
833
+ JSON.stringify((await L()).cancelMatgovSendV2(id, reason), null, 2),
834
+ );
835
+ });
836
+ parent
837
+ .command("matgov-get-send-v2 <id>")
838
+ .description("Get send")
839
+ .action(async (id) => {
840
+ console.log(JSON.stringify((await L()).getMatgovSendV2(id), null, 2));
841
+ });
842
+ parent
843
+ .command("matgov-list-sends-v2")
844
+ .description("List sends")
845
+ .action(async () => {
846
+ console.log(JSON.stringify((await L()).listMatgovSendsV2(), null, 2));
847
+ });
848
+ parent
849
+ .command("matgov-auto-suspend-idle-v2")
850
+ .description("Auto-suspend idle")
851
+ .action(async () => {
852
+ console.log(
853
+ JSON.stringify((await L()).autoSuspendIdleMatgovProfilesV2(), null, 2),
854
+ );
855
+ });
856
+ parent
857
+ .command("matgov-auto-fail-stuck-v2")
858
+ .description("Auto-fail stuck sends")
859
+ .action(async () => {
860
+ console.log(
861
+ JSON.stringify((await L()).autoFailStuckMatgovSendsV2(), null, 2),
862
+ );
863
+ });
864
+ parent
865
+ .command("matgov-gov-stats-v2")
866
+ .description("V2 gov stats")
867
+ .action(async () => {
868
+ console.log(
869
+ JSON.stringify((await L()).getMatrixBridgeGovStatsV2(), null, 2),
870
+ );
871
+ });
872
+ }