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
@@ -588,3 +588,208 @@ export function registerFusionCommand(program) {
588
588
 
589
589
  program.addCommand(fu);
590
590
  }
591
+
592
+ // === Iter23 V2 governance overlay ===
593
+ export function registerPfgovV2Commands(program) {
594
+ const parent = program.commands.find((c) => c.name() === "fusion");
595
+ if (!parent) return;
596
+ const L = async () => await import("../lib/protocol-fusion.js");
597
+ parent
598
+ .command("pfgov-enums-v2")
599
+ .description("Show V2 enums")
600
+ .action(async () => {
601
+ const m = await L();
602
+ console.log(
603
+ JSON.stringify(
604
+ {
605
+ profileMaturity: m.PFGOV_PROFILE_MATURITY_V2,
606
+ routeLifecycle: m.PFGOV_ROUTE_LIFECYCLE_V2,
607
+ },
608
+ null,
609
+ 2,
610
+ ),
611
+ );
612
+ });
613
+ parent
614
+ .command("pfgov-config-v2")
615
+ .description("Show V2 config")
616
+ .action(async () => {
617
+ const m = await L();
618
+ console.log(
619
+ JSON.stringify(
620
+ {
621
+ maxActive: m.getMaxActivePfgovProfilesPerOwnerV2(),
622
+ maxPending: m.getMaxPendingPfgovRoutesPerProfileV2(),
623
+ idleMs: m.getPfgovProfileIdleMsV2(),
624
+ stuckMs: m.getPfgovRouteStuckMsV2(),
625
+ },
626
+ null,
627
+ 2,
628
+ ),
629
+ );
630
+ });
631
+ parent
632
+ .command("pfgov-set-max-active-v2 <n>")
633
+ .description("Set max active")
634
+ .action(async (n) => {
635
+ (await L()).setMaxActivePfgovProfilesPerOwnerV2(Number(n));
636
+ console.log("ok");
637
+ });
638
+ parent
639
+ .command("pfgov-set-max-pending-v2 <n>")
640
+ .description("Set max pending")
641
+ .action(async (n) => {
642
+ (await L()).setMaxPendingPfgovRoutesPerProfileV2(Number(n));
643
+ console.log("ok");
644
+ });
645
+ parent
646
+ .command("pfgov-set-idle-ms-v2 <n>")
647
+ .description("Set idle threshold ms")
648
+ .action(async (n) => {
649
+ (await L()).setPfgovProfileIdleMsV2(Number(n));
650
+ console.log("ok");
651
+ });
652
+ parent
653
+ .command("pfgov-set-stuck-ms-v2 <n>")
654
+ .description("Set stuck threshold ms")
655
+ .action(async (n) => {
656
+ (await L()).setPfgovRouteStuckMsV2(Number(n));
657
+ console.log("ok");
658
+ });
659
+ parent
660
+ .command("pfgov-register-v2 <id> <owner>")
661
+ .description("Register V2 profile")
662
+ .option("--protocol <v>", "protocol")
663
+ .action(async (id, owner, o) => {
664
+ const m = await L();
665
+ console.log(
666
+ JSON.stringify(
667
+ m.registerPfgovProfileV2({ id, owner, protocol: o.protocol }),
668
+ null,
669
+ 2,
670
+ ),
671
+ );
672
+ });
673
+ parent
674
+ .command("pfgov-activate-v2 <id>")
675
+ .description("Activate profile")
676
+ .action(async (id) => {
677
+ console.log(
678
+ JSON.stringify((await L()).activatePfgovProfileV2(id), null, 2),
679
+ );
680
+ });
681
+ parent
682
+ .command("pfgov-degrade-v2 <id>")
683
+ .description("Degrade profile")
684
+ .action(async (id) => {
685
+ console.log(
686
+ JSON.stringify((await L()).degradePfgovProfileV2(id), null, 2),
687
+ );
688
+ });
689
+ parent
690
+ .command("pfgov-archive-v2 <id>")
691
+ .description("Archive profile")
692
+ .action(async (id) => {
693
+ console.log(
694
+ JSON.stringify((await L()).archivePfgovProfileV2(id), null, 2),
695
+ );
696
+ });
697
+ parent
698
+ .command("pfgov-touch-v2 <id>")
699
+ .description("Touch profile")
700
+ .action(async (id) => {
701
+ console.log(JSON.stringify((await L()).touchPfgovProfileV2(id), null, 2));
702
+ });
703
+ parent
704
+ .command("pfgov-get-v2 <id>")
705
+ .description("Get profile")
706
+ .action(async (id) => {
707
+ console.log(JSON.stringify((await L()).getPfgovProfileV2(id), null, 2));
708
+ });
709
+ parent
710
+ .command("pfgov-list-v2")
711
+ .description("List profiles")
712
+ .action(async () => {
713
+ console.log(JSON.stringify((await L()).listPfgovProfilesV2(), null, 2));
714
+ });
715
+ parent
716
+ .command("pfgov-create-route-v2 <id> <profileId>")
717
+ .description("Create route")
718
+ .option("--destination <v>", "destination")
719
+ .action(async (id, profileId, o) => {
720
+ const m = await L();
721
+ console.log(
722
+ JSON.stringify(
723
+ m.createPfgovRouteV2({ id, profileId, destination: o.destination }),
724
+ null,
725
+ 2,
726
+ ),
727
+ );
728
+ });
729
+ parent
730
+ .command("pfgov-routing-route-v2 <id>")
731
+ .description("Mark route as routing")
732
+ .action(async (id) => {
733
+ console.log(JSON.stringify((await L()).routingPfgovRouteV2(id), null, 2));
734
+ });
735
+ parent
736
+ .command("pfgov-complete-route-v2 <id>")
737
+ .description("Complete route")
738
+ .action(async (id) => {
739
+ console.log(
740
+ JSON.stringify((await L()).completeRoutePfgovV2(id), null, 2),
741
+ );
742
+ });
743
+ parent
744
+ .command("pfgov-fail-route-v2 <id> [reason]")
745
+ .description("Fail route")
746
+ .action(async (id, reason) => {
747
+ console.log(
748
+ JSON.stringify((await L()).failPfgovRouteV2(id, reason), null, 2),
749
+ );
750
+ });
751
+ parent
752
+ .command("pfgov-cancel-route-v2 <id> [reason]")
753
+ .description("Cancel route")
754
+ .action(async (id, reason) => {
755
+ console.log(
756
+ JSON.stringify((await L()).cancelPfgovRouteV2(id, reason), null, 2),
757
+ );
758
+ });
759
+ parent
760
+ .command("pfgov-get-route-v2 <id>")
761
+ .description("Get route")
762
+ .action(async (id) => {
763
+ console.log(JSON.stringify((await L()).getPfgovRouteV2(id), null, 2));
764
+ });
765
+ parent
766
+ .command("pfgov-list-routes-v2")
767
+ .description("List routes")
768
+ .action(async () => {
769
+ console.log(JSON.stringify((await L()).listPfgovRoutesV2(), null, 2));
770
+ });
771
+ parent
772
+ .command("pfgov-auto-degrade-idle-v2")
773
+ .description("Auto-degrade idle")
774
+ .action(async () => {
775
+ console.log(
776
+ JSON.stringify((await L()).autoDegradeIdlePfgovProfilesV2(), null, 2),
777
+ );
778
+ });
779
+ parent
780
+ .command("pfgov-auto-fail-stuck-v2")
781
+ .description("Auto-fail stuck routes")
782
+ .action(async () => {
783
+ console.log(
784
+ JSON.stringify((await L()).autoFailStuckPfgovRoutesV2(), null, 2),
785
+ );
786
+ });
787
+ parent
788
+ .command("pfgov-gov-stats-v2")
789
+ .description("V2 gov stats")
790
+ .action(async () => {
791
+ console.log(
792
+ JSON.stringify((await L()).getProtocolFusionGovStatsV2(), null, 2),
793
+ );
794
+ });
795
+ }
@@ -828,3 +828,212 @@ export function registerGovernanceCommand(program) {
828
828
  console.log(JSON.stringify(getGovernanceStatsV2(), null, 2));
829
829
  });
830
830
  }
831
+
832
+ // === Iter19 V2 governance overlay ===
833
+ export function registerCommgovV2Commands(program) {
834
+ const parent = program.commands.find((c) => c.name() === "governance");
835
+ if (!parent) return;
836
+ const L = async () => await import("../lib/community-governance.js");
837
+ parent
838
+ .command("commgov-enums-v2")
839
+ .description("Show V2 enums")
840
+ .action(async () => {
841
+ const m = await L();
842
+ console.log(
843
+ JSON.stringify(
844
+ {
845
+ profileMaturity: m.COMMGOV_PROFILE_MATURITY_V2,
846
+ motionLifecycle: m.COMMGOV_MOTION_LIFECYCLE_V2,
847
+ },
848
+ null,
849
+ 2,
850
+ ),
851
+ );
852
+ });
853
+ parent
854
+ .command("commgov-config-v2")
855
+ .description("Show V2 config")
856
+ .action(async () => {
857
+ const m = await L();
858
+ console.log(
859
+ JSON.stringify(
860
+ {
861
+ maxActive: m.getMaxActiveCommgovProfilesPerOwnerV2(),
862
+ maxPending: m.getMaxPendingCommgovMotionsPerProfileV2(),
863
+ idleMs: m.getCommgovProfileIdleMsV2(),
864
+ stuckMs: m.getCommgovMotionStuckMsV2(),
865
+ },
866
+ null,
867
+ 2,
868
+ ),
869
+ );
870
+ });
871
+ parent
872
+ .command("commgov-set-max-active-v2 <n>")
873
+ .description("Set max active")
874
+ .action(async (n) => {
875
+ (await L()).setMaxActiveCommgovProfilesPerOwnerV2(Number(n));
876
+ console.log("ok");
877
+ });
878
+ parent
879
+ .command("commgov-set-max-pending-v2 <n>")
880
+ .description("Set max pending")
881
+ .action(async (n) => {
882
+ (await L()).setMaxPendingCommgovMotionsPerProfileV2(Number(n));
883
+ console.log("ok");
884
+ });
885
+ parent
886
+ .command("commgov-set-idle-ms-v2 <n>")
887
+ .description("Set idle threshold ms")
888
+ .action(async (n) => {
889
+ (await L()).setCommgovProfileIdleMsV2(Number(n));
890
+ console.log("ok");
891
+ });
892
+ parent
893
+ .command("commgov-set-stuck-ms-v2 <n>")
894
+ .description("Set stuck threshold ms")
895
+ .action(async (n) => {
896
+ (await L()).setCommgovMotionStuckMsV2(Number(n));
897
+ console.log("ok");
898
+ });
899
+ parent
900
+ .command("commgov-register-v2 <id> <owner>")
901
+ .description("Register V2 profile")
902
+ .option("--chamber <v>", "chamber")
903
+ .action(async (id, owner, o) => {
904
+ const m = await L();
905
+ console.log(
906
+ JSON.stringify(
907
+ m.registerCommgovProfileV2({ id, owner, chamber: o.chamber }),
908
+ null,
909
+ 2,
910
+ ),
911
+ );
912
+ });
913
+ parent
914
+ .command("commgov-activate-v2 <id>")
915
+ .description("Activate profile")
916
+ .action(async (id) => {
917
+ console.log(
918
+ JSON.stringify((await L()).activateCommgovProfileV2(id), null, 2),
919
+ );
920
+ });
921
+ parent
922
+ .command("commgov-pause-v2 <id>")
923
+ .description("Pause profile")
924
+ .action(async (id) => {
925
+ console.log(
926
+ JSON.stringify((await L()).pauseCommgovProfileV2(id), null, 2),
927
+ );
928
+ });
929
+ parent
930
+ .command("commgov-archive-v2 <id>")
931
+ .description("Archive profile")
932
+ .action(async (id) => {
933
+ console.log(
934
+ JSON.stringify((await L()).archiveCommgovProfileV2(id), null, 2),
935
+ );
936
+ });
937
+ parent
938
+ .command("commgov-touch-v2 <id>")
939
+ .description("Touch profile")
940
+ .action(async (id) => {
941
+ console.log(
942
+ JSON.stringify((await L()).touchCommgovProfileV2(id), null, 2),
943
+ );
944
+ });
945
+ parent
946
+ .command("commgov-get-v2 <id>")
947
+ .description("Get profile")
948
+ .action(async (id) => {
949
+ console.log(JSON.stringify((await L()).getCommgovProfileV2(id), null, 2));
950
+ });
951
+ parent
952
+ .command("commgov-list-v2")
953
+ .description("List profiles")
954
+ .action(async () => {
955
+ console.log(JSON.stringify((await L()).listCommgovProfilesV2(), null, 2));
956
+ });
957
+ parent
958
+ .command("commgov-create-motion-v2 <id> <profileId>")
959
+ .description("Create motion")
960
+ .option("--subject <v>", "subject")
961
+ .action(async (id, profileId, o) => {
962
+ const m = await L();
963
+ console.log(
964
+ JSON.stringify(
965
+ m.createCommgovMotionV2({ id, profileId, subject: o.subject }),
966
+ null,
967
+ 2,
968
+ ),
969
+ );
970
+ });
971
+ parent
972
+ .command("commgov-voting-motion-v2 <id>")
973
+ .description("Mark motion as voting")
974
+ .action(async (id) => {
975
+ console.log(
976
+ JSON.stringify((await L()).votingCommgovMotionV2(id), null, 2),
977
+ );
978
+ });
979
+ parent
980
+ .command("commgov-complete-motion-v2 <id>")
981
+ .description("Complete motion")
982
+ .action(async (id) => {
983
+ console.log(
984
+ JSON.stringify((await L()).completeMotionCommgovV2(id), null, 2),
985
+ );
986
+ });
987
+ parent
988
+ .command("commgov-fail-motion-v2 <id> [reason]")
989
+ .description("Fail motion")
990
+ .action(async (id, reason) => {
991
+ console.log(
992
+ JSON.stringify((await L()).failCommgovMotionV2(id, reason), null, 2),
993
+ );
994
+ });
995
+ parent
996
+ .command("commgov-cancel-motion-v2 <id> [reason]")
997
+ .description("Cancel motion")
998
+ .action(async (id, reason) => {
999
+ console.log(
1000
+ JSON.stringify((await L()).cancelCommgovMotionV2(id, reason), null, 2),
1001
+ );
1002
+ });
1003
+ parent
1004
+ .command("commgov-get-motion-v2 <id>")
1005
+ .description("Get motion")
1006
+ .action(async (id) => {
1007
+ console.log(JSON.stringify((await L()).getCommgovMotionV2(id), null, 2));
1008
+ });
1009
+ parent
1010
+ .command("commgov-list-motions-v2")
1011
+ .description("List motions")
1012
+ .action(async () => {
1013
+ console.log(JSON.stringify((await L()).listCommgovMotionsV2(), null, 2));
1014
+ });
1015
+ parent
1016
+ .command("commgov-auto-pause-idle-v2")
1017
+ .description("Auto-pause idle")
1018
+ .action(async () => {
1019
+ console.log(
1020
+ JSON.stringify((await L()).autoPauseIdleCommgovProfilesV2(), null, 2),
1021
+ );
1022
+ });
1023
+ parent
1024
+ .command("commgov-auto-fail-stuck-v2")
1025
+ .description("Auto-fail stuck motions")
1026
+ .action(async () => {
1027
+ console.log(
1028
+ JSON.stringify((await L()).autoFailStuckCommgovMotionsV2(), null, 2),
1029
+ );
1030
+ });
1031
+ parent
1032
+ .command("commgov-gov-stats-v2")
1033
+ .description("V2 gov stats")
1034
+ .action(async () => {
1035
+ console.log(
1036
+ JSON.stringify((await L()).getCommunityGovernanceGovStatsV2(), null, 2),
1037
+ );
1038
+ });
1039
+ }
@@ -483,3 +483,212 @@ export function registerHookCommand(program) {
483
483
  console.log(JSON.stringify({ ok: true }, null, 2));
484
484
  });
485
485
  }
486
+
487
+ // === Iter21 V2 governance overlay ===
488
+ export function registerHookgovV2Commands(program) {
489
+ const parent = program.commands.find((c) => c.name() === "hook");
490
+ if (!parent) return;
491
+ const L = async () => await import("../lib/hook-manager.js");
492
+ parent
493
+ .command("hookgov-enums-v2")
494
+ .description("Show V2 enums")
495
+ .action(async () => {
496
+ const m = await L();
497
+ console.log(
498
+ JSON.stringify(
499
+ {
500
+ profileMaturity: m.HOOKGOV_PROFILE_MATURITY_V2,
501
+ triggerLifecycle: m.HOOKGOV_TRIGGER_LIFECYCLE_V2,
502
+ },
503
+ null,
504
+ 2,
505
+ ),
506
+ );
507
+ });
508
+ parent
509
+ .command("hookgov-config-v2")
510
+ .description("Show V2 config")
511
+ .action(async () => {
512
+ const m = await L();
513
+ console.log(
514
+ JSON.stringify(
515
+ {
516
+ maxActive: m.getMaxActiveHookgovProfilesPerOwnerV2(),
517
+ maxPending: m.getMaxPendingHookgovTriggersPerProfileV2(),
518
+ idleMs: m.getHookgovProfileIdleMsV2(),
519
+ stuckMs: m.getHookgovTriggerStuckMsV2(),
520
+ },
521
+ null,
522
+ 2,
523
+ ),
524
+ );
525
+ });
526
+ parent
527
+ .command("hookgov-set-max-active-v2 <n>")
528
+ .description("Set max active")
529
+ .action(async (n) => {
530
+ (await L()).setMaxActiveHookgovProfilesPerOwnerV2(Number(n));
531
+ console.log("ok");
532
+ });
533
+ parent
534
+ .command("hookgov-set-max-pending-v2 <n>")
535
+ .description("Set max pending")
536
+ .action(async (n) => {
537
+ (await L()).setMaxPendingHookgovTriggersPerProfileV2(Number(n));
538
+ console.log("ok");
539
+ });
540
+ parent
541
+ .command("hookgov-set-idle-ms-v2 <n>")
542
+ .description("Set idle threshold ms")
543
+ .action(async (n) => {
544
+ (await L()).setHookgovProfileIdleMsV2(Number(n));
545
+ console.log("ok");
546
+ });
547
+ parent
548
+ .command("hookgov-set-stuck-ms-v2 <n>")
549
+ .description("Set stuck threshold ms")
550
+ .action(async (n) => {
551
+ (await L()).setHookgovTriggerStuckMsV2(Number(n));
552
+ console.log("ok");
553
+ });
554
+ parent
555
+ .command("hookgov-register-v2 <id> <owner>")
556
+ .description("Register V2 profile")
557
+ .option("--event <v>", "event")
558
+ .action(async (id, owner, o) => {
559
+ const m = await L();
560
+ console.log(
561
+ JSON.stringify(
562
+ m.registerHookgovProfileV2({ id, owner, event: o.event }),
563
+ null,
564
+ 2,
565
+ ),
566
+ );
567
+ });
568
+ parent
569
+ .command("hookgov-activate-v2 <id>")
570
+ .description("Activate profile")
571
+ .action(async (id) => {
572
+ console.log(
573
+ JSON.stringify((await L()).activateHookgovProfileV2(id), null, 2),
574
+ );
575
+ });
576
+ parent
577
+ .command("hookgov-disable-v2 <id>")
578
+ .description("Disable profile")
579
+ .action(async (id) => {
580
+ console.log(
581
+ JSON.stringify((await L()).disableHookgovProfileV2(id), null, 2),
582
+ );
583
+ });
584
+ parent
585
+ .command("hookgov-archive-v2 <id>")
586
+ .description("Archive profile")
587
+ .action(async (id) => {
588
+ console.log(
589
+ JSON.stringify((await L()).archiveHookgovProfileV2(id), null, 2),
590
+ );
591
+ });
592
+ parent
593
+ .command("hookgov-touch-v2 <id>")
594
+ .description("Touch profile")
595
+ .action(async (id) => {
596
+ console.log(
597
+ JSON.stringify((await L()).touchHookgovProfileV2(id), null, 2),
598
+ );
599
+ });
600
+ parent
601
+ .command("hookgov-get-v2 <id>")
602
+ .description("Get profile")
603
+ .action(async (id) => {
604
+ console.log(JSON.stringify((await L()).getHookgovProfileV2(id), null, 2));
605
+ });
606
+ parent
607
+ .command("hookgov-list-v2")
608
+ .description("List profiles")
609
+ .action(async () => {
610
+ console.log(JSON.stringify((await L()).listHookgovProfilesV2(), null, 2));
611
+ });
612
+ parent
613
+ .command("hookgov-create-trigger-v2 <id> <profileId>")
614
+ .description("Create trigger")
615
+ .option("--payload <v>", "payload")
616
+ .action(async (id, profileId, o) => {
617
+ const m = await L();
618
+ console.log(
619
+ JSON.stringify(
620
+ m.createHookgovTriggerV2({ id, profileId, payload: o.payload }),
621
+ null,
622
+ 2,
623
+ ),
624
+ );
625
+ });
626
+ parent
627
+ .command("hookgov-firing-trigger-v2 <id>")
628
+ .description("Mark trigger as firing")
629
+ .action(async (id) => {
630
+ console.log(
631
+ JSON.stringify((await L()).firingHookgovTriggerV2(id), null, 2),
632
+ );
633
+ });
634
+ parent
635
+ .command("hookgov-complete-trigger-v2 <id>")
636
+ .description("Complete trigger")
637
+ .action(async (id) => {
638
+ console.log(
639
+ JSON.stringify((await L()).completeTriggerHookgovV2(id), null, 2),
640
+ );
641
+ });
642
+ parent
643
+ .command("hookgov-fail-trigger-v2 <id> [reason]")
644
+ .description("Fail trigger")
645
+ .action(async (id, reason) => {
646
+ console.log(
647
+ JSON.stringify((await L()).failHookgovTriggerV2(id, reason), null, 2),
648
+ );
649
+ });
650
+ parent
651
+ .command("hookgov-cancel-trigger-v2 <id> [reason]")
652
+ .description("Cancel trigger")
653
+ .action(async (id, reason) => {
654
+ console.log(
655
+ JSON.stringify((await L()).cancelHookgovTriggerV2(id, reason), null, 2),
656
+ );
657
+ });
658
+ parent
659
+ .command("hookgov-get-trigger-v2 <id>")
660
+ .description("Get trigger")
661
+ .action(async (id) => {
662
+ console.log(JSON.stringify((await L()).getHookgovTriggerV2(id), null, 2));
663
+ });
664
+ parent
665
+ .command("hookgov-list-triggers-v2")
666
+ .description("List triggers")
667
+ .action(async () => {
668
+ console.log(JSON.stringify((await L()).listHookgovTriggersV2(), null, 2));
669
+ });
670
+ parent
671
+ .command("hookgov-auto-disable-idle-v2")
672
+ .description("Auto-disable idle")
673
+ .action(async () => {
674
+ console.log(
675
+ JSON.stringify((await L()).autoDisableIdleHookgovProfilesV2(), null, 2),
676
+ );
677
+ });
678
+ parent
679
+ .command("hookgov-auto-fail-stuck-v2")
680
+ .description("Auto-fail stuck triggers")
681
+ .action(async () => {
682
+ console.log(
683
+ JSON.stringify((await L()).autoFailStuckHookgovTriggersV2(), null, 2),
684
+ );
685
+ });
686
+ parent
687
+ .command("hookgov-gov-stats-v2")
688
+ .description("V2 gov stats")
689
+ .action(async () => {
690
+ console.log(
691
+ JSON.stringify((await L()).getHookManagerGovStatsV2(), null, 2),
692
+ );
693
+ });
694
+ }