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
@@ -683,3 +683,228 @@ export function registerNlProgCommand(program) {
683
683
 
684
684
  program.addCommand(nlp);
685
685
  }
686
+
687
+ // === Iter18 V2 governance overlay ===
688
+ export function registerNlpgovV2Commands(program) {
689
+ const parent = program.commands.find((c) => c.name() === "nlprog");
690
+ if (!parent) return;
691
+ const L = async () => await import("../lib/nl-programming.js");
692
+ parent
693
+ .command("nlpgov-enums-v2")
694
+ .description("Show V2 enums")
695
+ .action(async () => {
696
+ const m = await L();
697
+ console.log(
698
+ JSON.stringify(
699
+ {
700
+ profileMaturity: m.NLPGOV_PROFILE_MATURITY_V2,
701
+ translationLifecycle: m.NLPGOV_TRANSLATION_LIFECYCLE_V2,
702
+ },
703
+ null,
704
+ 2,
705
+ ),
706
+ );
707
+ });
708
+ parent
709
+ .command("nlpgov-config-v2")
710
+ .description("Show V2 config")
711
+ .action(async () => {
712
+ const m = await L();
713
+ console.log(
714
+ JSON.stringify(
715
+ {
716
+ maxActive: m.getMaxActiveNlpgovProfilesPerOwnerV2(),
717
+ maxPending: m.getMaxPendingNlpgovTranslationsPerProfileV2(),
718
+ idleMs: m.getNlpgovProfileIdleMsV2(),
719
+ stuckMs: m.getNlpgovTranslationStuckMsV2(),
720
+ },
721
+ null,
722
+ 2,
723
+ ),
724
+ );
725
+ });
726
+ parent
727
+ .command("nlpgov-set-max-active-v2 <n>")
728
+ .description("Set max active")
729
+ .action(async (n) => {
730
+ (await L()).setMaxActiveNlpgovProfilesPerOwnerV2(Number(n));
731
+ console.log("ok");
732
+ });
733
+ parent
734
+ .command("nlpgov-set-max-pending-v2 <n>")
735
+ .description("Set max pending")
736
+ .action(async (n) => {
737
+ (await L()).setMaxPendingNlpgovTranslationsPerProfileV2(Number(n));
738
+ console.log("ok");
739
+ });
740
+ parent
741
+ .command("nlpgov-set-idle-ms-v2 <n>")
742
+ .description("Set idle threshold ms")
743
+ .action(async (n) => {
744
+ (await L()).setNlpgovProfileIdleMsV2(Number(n));
745
+ console.log("ok");
746
+ });
747
+ parent
748
+ .command("nlpgov-set-stuck-ms-v2 <n>")
749
+ .description("Set stuck threshold ms")
750
+ .action(async (n) => {
751
+ (await L()).setNlpgovTranslationStuckMsV2(Number(n));
752
+ console.log("ok");
753
+ });
754
+ parent
755
+ .command("nlpgov-register-v2 <id> <owner>")
756
+ .description("Register V2 profile")
757
+ .option("--style <v>", "style")
758
+ .action(async (id, owner, o) => {
759
+ const m = await L();
760
+ console.log(
761
+ JSON.stringify(
762
+ m.registerNlpgovProfileV2({ id, owner, style: o.style }),
763
+ null,
764
+ 2,
765
+ ),
766
+ );
767
+ });
768
+ parent
769
+ .command("nlpgov-activate-v2 <id>")
770
+ .description("Activate profile")
771
+ .action(async (id) => {
772
+ console.log(
773
+ JSON.stringify((await L()).activateNlpgovProfileV2(id), null, 2),
774
+ );
775
+ });
776
+ parent
777
+ .command("nlpgov-stale-v2 <id>")
778
+ .description("Stale profile")
779
+ .action(async (id) => {
780
+ console.log(
781
+ JSON.stringify((await L()).staleNlpgovProfileV2(id), null, 2),
782
+ );
783
+ });
784
+ parent
785
+ .command("nlpgov-archive-v2 <id>")
786
+ .description("Archive profile")
787
+ .action(async (id) => {
788
+ console.log(
789
+ JSON.stringify((await L()).archiveNlpgovProfileV2(id), null, 2),
790
+ );
791
+ });
792
+ parent
793
+ .command("nlpgov-touch-v2 <id>")
794
+ .description("Touch profile")
795
+ .action(async (id) => {
796
+ console.log(
797
+ JSON.stringify((await L()).touchNlpgovProfileV2(id), null, 2),
798
+ );
799
+ });
800
+ parent
801
+ .command("nlpgov-get-v2 <id>")
802
+ .description("Get profile")
803
+ .action(async (id) => {
804
+ console.log(JSON.stringify((await L()).getNlpgovProfileV2(id), null, 2));
805
+ });
806
+ parent
807
+ .command("nlpgov-list-v2")
808
+ .description("List profiles")
809
+ .action(async () => {
810
+ console.log(JSON.stringify((await L()).listNlpgovProfilesV2(), null, 2));
811
+ });
812
+ parent
813
+ .command("nlpgov-create-translation-v2 <id> <profileId>")
814
+ .description("Create translation")
815
+ .option("--intent <v>", "intent")
816
+ .action(async (id, profileId, o) => {
817
+ const m = await L();
818
+ console.log(
819
+ JSON.stringify(
820
+ m.createNlpgovTranslationV2({ id, profileId, intent: o.intent }),
821
+ null,
822
+ 2,
823
+ ),
824
+ );
825
+ });
826
+ parent
827
+ .command("nlpgov-translating-translation-v2 <id>")
828
+ .description("Mark translation as translating")
829
+ .action(async (id) => {
830
+ console.log(
831
+ JSON.stringify((await L()).translatingNlpgovTranslationV2(id), null, 2),
832
+ );
833
+ });
834
+ parent
835
+ .command("nlpgov-complete-translation-v2 <id>")
836
+ .description("Complete translation")
837
+ .action(async (id) => {
838
+ console.log(
839
+ JSON.stringify((await L()).completeTranslationNlpgovV2(id), null, 2),
840
+ );
841
+ });
842
+ parent
843
+ .command("nlpgov-fail-translation-v2 <id> [reason]")
844
+ .description("Fail translation")
845
+ .action(async (id, reason) => {
846
+ console.log(
847
+ JSON.stringify(
848
+ (await L()).failNlpgovTranslationV2(id, reason),
849
+ null,
850
+ 2,
851
+ ),
852
+ );
853
+ });
854
+ parent
855
+ .command("nlpgov-cancel-translation-v2 <id> [reason]")
856
+ .description("Cancel translation")
857
+ .action(async (id, reason) => {
858
+ console.log(
859
+ JSON.stringify(
860
+ (await L()).cancelNlpgovTranslationV2(id, reason),
861
+ null,
862
+ 2,
863
+ ),
864
+ );
865
+ });
866
+ parent
867
+ .command("nlpgov-get-translation-v2 <id>")
868
+ .description("Get translation")
869
+ .action(async (id) => {
870
+ console.log(
871
+ JSON.stringify((await L()).getNlpgovTranslationV2(id), null, 2),
872
+ );
873
+ });
874
+ parent
875
+ .command("nlpgov-list-translations-v2")
876
+ .description("List translations")
877
+ .action(async () => {
878
+ console.log(
879
+ JSON.stringify((await L()).listNlpgovTranslationsV2(), null, 2),
880
+ );
881
+ });
882
+ parent
883
+ .command("nlpgov-auto-stale-idle-v2")
884
+ .description("Auto-stale idle")
885
+ .action(async () => {
886
+ console.log(
887
+ JSON.stringify((await L()).autoStaleIdleNlpgovProfilesV2(), null, 2),
888
+ );
889
+ });
890
+ parent
891
+ .command("nlpgov-auto-fail-stuck-v2")
892
+ .description("Auto-fail stuck translations")
893
+ .action(async () => {
894
+ console.log(
895
+ JSON.stringify(
896
+ (await L()).autoFailStuckNlpgovTranslationsV2(),
897
+ null,
898
+ 2,
899
+ ),
900
+ );
901
+ });
902
+ parent
903
+ .command("nlpgov-gov-stats-v2")
904
+ .description("V2 gov stats")
905
+ .action(async () => {
906
+ console.log(
907
+ JSON.stringify((await L()).getNlProgrammingGovStatsV2(), null, 2),
908
+ );
909
+ });
910
+ }
@@ -585,3 +585,212 @@ export function registerNostrV2Command(nostr) {
585
585
  console.log(JSON.stringify(getNostrBridgeStatsV2(), null, 2));
586
586
  });
587
587
  }
588
+
589
+ // === Iter21 V2 governance overlay ===
590
+ export function registerNosgovV2Commands(program) {
591
+ const parent = program.commands.find((c) => c.name() === "nostr");
592
+ if (!parent) return;
593
+ const L = async () => await import("../lib/nostr-bridge.js");
594
+ parent
595
+ .command("nosgov-enums-v2")
596
+ .description("Show V2 enums")
597
+ .action(async () => {
598
+ const m = await L();
599
+ console.log(
600
+ JSON.stringify(
601
+ {
602
+ profileMaturity: m.NOSGOV_PROFILE_MATURITY_V2,
603
+ publishLifecycle: m.NOSGOV_PUBLISH_LIFECYCLE_V2,
604
+ },
605
+ null,
606
+ 2,
607
+ ),
608
+ );
609
+ });
610
+ parent
611
+ .command("nosgov-config-v2")
612
+ .description("Show V2 config")
613
+ .action(async () => {
614
+ const m = await L();
615
+ console.log(
616
+ JSON.stringify(
617
+ {
618
+ maxActive: m.getMaxActiveNosgovProfilesPerOwnerV2(),
619
+ maxPending: m.getMaxPendingNosgovPublishsPerProfileV2(),
620
+ idleMs: m.getNosgovProfileIdleMsV2(),
621
+ stuckMs: m.getNosgovPublishStuckMsV2(),
622
+ },
623
+ null,
624
+ 2,
625
+ ),
626
+ );
627
+ });
628
+ parent
629
+ .command("nosgov-set-max-active-v2 <n>")
630
+ .description("Set max active")
631
+ .action(async (n) => {
632
+ (await L()).setMaxActiveNosgovProfilesPerOwnerV2(Number(n));
633
+ console.log("ok");
634
+ });
635
+ parent
636
+ .command("nosgov-set-max-pending-v2 <n>")
637
+ .description("Set max pending")
638
+ .action(async (n) => {
639
+ (await L()).setMaxPendingNosgovPublishsPerProfileV2(Number(n));
640
+ console.log("ok");
641
+ });
642
+ parent
643
+ .command("nosgov-set-idle-ms-v2 <n>")
644
+ .description("Set idle threshold ms")
645
+ .action(async (n) => {
646
+ (await L()).setNosgovProfileIdleMsV2(Number(n));
647
+ console.log("ok");
648
+ });
649
+ parent
650
+ .command("nosgov-set-stuck-ms-v2 <n>")
651
+ .description("Set stuck threshold ms")
652
+ .action(async (n) => {
653
+ (await L()).setNosgovPublishStuckMsV2(Number(n));
654
+ console.log("ok");
655
+ });
656
+ parent
657
+ .command("nosgov-register-v2 <id> <owner>")
658
+ .description("Register V2 profile")
659
+ .option("--relay <v>", "relay")
660
+ .action(async (id, owner, o) => {
661
+ const m = await L();
662
+ console.log(
663
+ JSON.stringify(
664
+ m.registerNosgovProfileV2({ id, owner, relay: o.relay }),
665
+ null,
666
+ 2,
667
+ ),
668
+ );
669
+ });
670
+ parent
671
+ .command("nosgov-activate-v2 <id>")
672
+ .description("Activate profile")
673
+ .action(async (id) => {
674
+ console.log(
675
+ JSON.stringify((await L()).activateNosgovProfileV2(id), null, 2),
676
+ );
677
+ });
678
+ parent
679
+ .command("nosgov-suspend-v2 <id>")
680
+ .description("Suspend profile")
681
+ .action(async (id) => {
682
+ console.log(
683
+ JSON.stringify((await L()).suspendNosgovProfileV2(id), null, 2),
684
+ );
685
+ });
686
+ parent
687
+ .command("nosgov-archive-v2 <id>")
688
+ .description("Archive profile")
689
+ .action(async (id) => {
690
+ console.log(
691
+ JSON.stringify((await L()).archiveNosgovProfileV2(id), null, 2),
692
+ );
693
+ });
694
+ parent
695
+ .command("nosgov-touch-v2 <id>")
696
+ .description("Touch profile")
697
+ .action(async (id) => {
698
+ console.log(
699
+ JSON.stringify((await L()).touchNosgovProfileV2(id), null, 2),
700
+ );
701
+ });
702
+ parent
703
+ .command("nosgov-get-v2 <id>")
704
+ .description("Get profile")
705
+ .action(async (id) => {
706
+ console.log(JSON.stringify((await L()).getNosgovProfileV2(id), null, 2));
707
+ });
708
+ parent
709
+ .command("nosgov-list-v2")
710
+ .description("List profiles")
711
+ .action(async () => {
712
+ console.log(JSON.stringify((await L()).listNosgovProfilesV2(), null, 2));
713
+ });
714
+ parent
715
+ .command("nosgov-create-publish-v2 <id> <profileId>")
716
+ .description("Create publish")
717
+ .option("--kind <v>", "kind")
718
+ .action(async (id, profileId, o) => {
719
+ const m = await L();
720
+ console.log(
721
+ JSON.stringify(
722
+ m.createNosgovPublishV2({ id, profileId, kind: o.kind }),
723
+ null,
724
+ 2,
725
+ ),
726
+ );
727
+ });
728
+ parent
729
+ .command("nosgov-publishing-publish-v2 <id>")
730
+ .description("Mark publish as publishing")
731
+ .action(async (id) => {
732
+ console.log(
733
+ JSON.stringify((await L()).publishingNosgovPublishV2(id), null, 2),
734
+ );
735
+ });
736
+ parent
737
+ .command("nosgov-complete-publish-v2 <id>")
738
+ .description("Complete publish")
739
+ .action(async (id) => {
740
+ console.log(
741
+ JSON.stringify((await L()).completePublishNosgovV2(id), null, 2),
742
+ );
743
+ });
744
+ parent
745
+ .command("nosgov-fail-publish-v2 <id> [reason]")
746
+ .description("Fail publish")
747
+ .action(async (id, reason) => {
748
+ console.log(
749
+ JSON.stringify((await L()).failNosgovPublishV2(id, reason), null, 2),
750
+ );
751
+ });
752
+ parent
753
+ .command("nosgov-cancel-publish-v2 <id> [reason]")
754
+ .description("Cancel publish")
755
+ .action(async (id, reason) => {
756
+ console.log(
757
+ JSON.stringify((await L()).cancelNosgovPublishV2(id, reason), null, 2),
758
+ );
759
+ });
760
+ parent
761
+ .command("nosgov-get-publish-v2 <id>")
762
+ .description("Get publish")
763
+ .action(async (id) => {
764
+ console.log(JSON.stringify((await L()).getNosgovPublishV2(id), null, 2));
765
+ });
766
+ parent
767
+ .command("nosgov-list-publishs-v2")
768
+ .description("List publishs")
769
+ .action(async () => {
770
+ console.log(JSON.stringify((await L()).listNosgovPublishsV2(), null, 2));
771
+ });
772
+ parent
773
+ .command("nosgov-auto-suspend-idle-v2")
774
+ .description("Auto-suspend idle")
775
+ .action(async () => {
776
+ console.log(
777
+ JSON.stringify((await L()).autoSuspendIdleNosgovProfilesV2(), null, 2),
778
+ );
779
+ });
780
+ parent
781
+ .command("nosgov-auto-fail-stuck-v2")
782
+ .description("Auto-fail stuck publishs")
783
+ .action(async () => {
784
+ console.log(
785
+ JSON.stringify((await L()).autoFailStuckNosgovPublishsV2(), null, 2),
786
+ );
787
+ });
788
+ parent
789
+ .command("nosgov-gov-stats-v2")
790
+ .description("V2 gov stats")
791
+ .action(async () => {
792
+ console.log(
793
+ JSON.stringify((await L()).getNostrBridgeGovStatsV2(), null, 2),
794
+ );
795
+ });
796
+ }
@@ -731,3 +731,208 @@ export function registerNoteCommand(program) {
731
731
  console.log(JSON.stringify(autoDiscardStaleRevisionsV2(), null, 2)),
732
732
  );
733
733
  }
734
+
735
+ // === Iter23 V2 governance overlay ===
736
+ export function registerNtgovV2Commands(program) {
737
+ const parent = program.commands.find((c) => c.name() === "note");
738
+ if (!parent) return;
739
+ const L = async () => await import("../lib/note-versioning.js");
740
+ parent
741
+ .command("ntgov-enums-v2")
742
+ .description("Show V2 enums")
743
+ .action(async () => {
744
+ const m = await L();
745
+ console.log(
746
+ JSON.stringify(
747
+ {
748
+ profileMaturity: m.NTGOV_PROFILE_MATURITY_V2,
749
+ revisionLifecycle: m.NTGOV_REVISION_LIFECYCLE_V2,
750
+ },
751
+ null,
752
+ 2,
753
+ ),
754
+ );
755
+ });
756
+ parent
757
+ .command("ntgov-config-v2")
758
+ .description("Show V2 config")
759
+ .action(async () => {
760
+ const m = await L();
761
+ console.log(
762
+ JSON.stringify(
763
+ {
764
+ maxActive: m.getMaxActiveNtgovProfilesPerOwnerV2(),
765
+ maxPending: m.getMaxPendingNtgovRevisionsPerProfileV2(),
766
+ idleMs: m.getNtgovProfileIdleMsV2(),
767
+ stuckMs: m.getNtgovRevisionStuckMsV2(),
768
+ },
769
+ null,
770
+ 2,
771
+ ),
772
+ );
773
+ });
774
+ parent
775
+ .command("ntgov-set-max-active-v2 <n>")
776
+ .description("Set max active")
777
+ .action(async (n) => {
778
+ (await L()).setMaxActiveNtgovProfilesPerOwnerV2(Number(n));
779
+ console.log("ok");
780
+ });
781
+ parent
782
+ .command("ntgov-set-max-pending-v2 <n>")
783
+ .description("Set max pending")
784
+ .action(async (n) => {
785
+ (await L()).setMaxPendingNtgovRevisionsPerProfileV2(Number(n));
786
+ console.log("ok");
787
+ });
788
+ parent
789
+ .command("ntgov-set-idle-ms-v2 <n>")
790
+ .description("Set idle threshold ms")
791
+ .action(async (n) => {
792
+ (await L()).setNtgovProfileIdleMsV2(Number(n));
793
+ console.log("ok");
794
+ });
795
+ parent
796
+ .command("ntgov-set-stuck-ms-v2 <n>")
797
+ .description("Set stuck threshold ms")
798
+ .action(async (n) => {
799
+ (await L()).setNtgovRevisionStuckMsV2(Number(n));
800
+ console.log("ok");
801
+ });
802
+ parent
803
+ .command("ntgov-register-v2 <id> <owner>")
804
+ .description("Register V2 profile")
805
+ .option("--series <v>", "series")
806
+ .action(async (id, owner, o) => {
807
+ const m = await L();
808
+ console.log(
809
+ JSON.stringify(
810
+ m.registerNtgovProfileV2({ id, owner, series: o.series }),
811
+ null,
812
+ 2,
813
+ ),
814
+ );
815
+ });
816
+ parent
817
+ .command("ntgov-activate-v2 <id>")
818
+ .description("Activate profile")
819
+ .action(async (id) => {
820
+ console.log(
821
+ JSON.stringify((await L()).activateNtgovProfileV2(id), null, 2),
822
+ );
823
+ });
824
+ parent
825
+ .command("ntgov-stale-v2 <id>")
826
+ .description("Stale profile")
827
+ .action(async (id) => {
828
+ console.log(JSON.stringify((await L()).staleNtgovProfileV2(id), null, 2));
829
+ });
830
+ parent
831
+ .command("ntgov-archive-v2 <id>")
832
+ .description("Archive profile")
833
+ .action(async (id) => {
834
+ console.log(
835
+ JSON.stringify((await L()).archiveNtgovProfileV2(id), null, 2),
836
+ );
837
+ });
838
+ parent
839
+ .command("ntgov-touch-v2 <id>")
840
+ .description("Touch profile")
841
+ .action(async (id) => {
842
+ console.log(JSON.stringify((await L()).touchNtgovProfileV2(id), null, 2));
843
+ });
844
+ parent
845
+ .command("ntgov-get-v2 <id>")
846
+ .description("Get profile")
847
+ .action(async (id) => {
848
+ console.log(JSON.stringify((await L()).getNtgovProfileV2(id), null, 2));
849
+ });
850
+ parent
851
+ .command("ntgov-list-v2")
852
+ .description("List profiles")
853
+ .action(async () => {
854
+ console.log(JSON.stringify((await L()).listNtgovProfilesV2(), null, 2));
855
+ });
856
+ parent
857
+ .command("ntgov-create-revision-v2 <id> <profileId>")
858
+ .description("Create revision")
859
+ .option("--author <v>", "author")
860
+ .action(async (id, profileId, o) => {
861
+ const m = await L();
862
+ console.log(
863
+ JSON.stringify(
864
+ m.createNtgovRevisionV2({ id, profileId, author: o.author }),
865
+ null,
866
+ 2,
867
+ ),
868
+ );
869
+ });
870
+ parent
871
+ .command("ntgov-reviewing-revision-v2 <id>")
872
+ .description("Mark revision as reviewing")
873
+ .action(async (id) => {
874
+ console.log(
875
+ JSON.stringify((await L()).reviewingNtgovRevisionV2(id), null, 2),
876
+ );
877
+ });
878
+ parent
879
+ .command("ntgov-complete-revision-v2 <id>")
880
+ .description("Merge revision")
881
+ .action(async (id) => {
882
+ console.log(
883
+ JSON.stringify((await L()).completeRevisionNtgovV2(id), null, 2),
884
+ );
885
+ });
886
+ parent
887
+ .command("ntgov-fail-revision-v2 <id> [reason]")
888
+ .description("Fail revision")
889
+ .action(async (id, reason) => {
890
+ console.log(
891
+ JSON.stringify((await L()).failNtgovRevisionV2(id, reason), null, 2),
892
+ );
893
+ });
894
+ parent
895
+ .command("ntgov-cancel-revision-v2 <id> [reason]")
896
+ .description("Cancel revision")
897
+ .action(async (id, reason) => {
898
+ console.log(
899
+ JSON.stringify((await L()).cancelNtgovRevisionV2(id, reason), null, 2),
900
+ );
901
+ });
902
+ parent
903
+ .command("ntgov-get-revision-v2 <id>")
904
+ .description("Get revision")
905
+ .action(async (id) => {
906
+ console.log(JSON.stringify((await L()).getNtgovRevisionV2(id), null, 2));
907
+ });
908
+ parent
909
+ .command("ntgov-list-revisions-v2")
910
+ .description("List revisions")
911
+ .action(async () => {
912
+ console.log(JSON.stringify((await L()).listNtgovRevisionsV2(), null, 2));
913
+ });
914
+ parent
915
+ .command("ntgov-auto-stale-idle-v2")
916
+ .description("Auto-stale idle")
917
+ .action(async () => {
918
+ console.log(
919
+ JSON.stringify((await L()).autoStaleIdleNtgovProfilesV2(), null, 2),
920
+ );
921
+ });
922
+ parent
923
+ .command("ntgov-auto-fail-stuck-v2")
924
+ .description("Auto-fail stuck revisions")
925
+ .action(async () => {
926
+ console.log(
927
+ JSON.stringify((await L()).autoFailStuckNtgovRevisionsV2(), null, 2),
928
+ );
929
+ });
930
+ parent
931
+ .command("ntgov-gov-stats-v2")
932
+ .description("V2 gov stats")
933
+ .action(async () => {
934
+ console.log(
935
+ JSON.stringify((await L()).getNoteVersioningGovStatsV2(), null, 2),
936
+ );
937
+ });
938
+ }