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
@@ -618,3 +618,220 @@ export function registerDIDv2Command(program) {
618
618
 
619
619
  program.addCommand(didv2);
620
620
  }
621
+
622
+ // === Iter22 V2 governance overlay ===
623
+ export function registerDv2govV2Commands(program) {
624
+ const parent = program.commands.find((c) => c.name() === "did-v2");
625
+ if (!parent) return;
626
+ const L = async () => await import("../lib/did-v2-manager.js");
627
+ parent
628
+ .command("dv2gov-enums-v2")
629
+ .description("Show V2 enums")
630
+ .action(async () => {
631
+ const m = await L();
632
+ console.log(
633
+ JSON.stringify(
634
+ {
635
+ profileMaturity: m.DV2GOV_PROFILE_MATURITY_V2,
636
+ credentialLifecycle: m.DV2GOV_CREDENTIAL_LIFECYCLE_V2,
637
+ },
638
+ null,
639
+ 2,
640
+ ),
641
+ );
642
+ });
643
+ parent
644
+ .command("dv2gov-config-v2")
645
+ .description("Show V2 config")
646
+ .action(async () => {
647
+ const m = await L();
648
+ console.log(
649
+ JSON.stringify(
650
+ {
651
+ maxActive: m.getMaxActiveDv2govProfilesPerOwnerV2(),
652
+ maxPending: m.getMaxPendingDv2govCredentialsPerProfileV2(),
653
+ idleMs: m.getDv2govProfileIdleMsV2(),
654
+ stuckMs: m.getDv2govCredentialStuckMsV2(),
655
+ },
656
+ null,
657
+ 2,
658
+ ),
659
+ );
660
+ });
661
+ parent
662
+ .command("dv2gov-set-max-active-v2 <n>")
663
+ .description("Set max active")
664
+ .action(async (n) => {
665
+ (await L()).setMaxActiveDv2govProfilesPerOwnerV2(Number(n));
666
+ console.log("ok");
667
+ });
668
+ parent
669
+ .command("dv2gov-set-max-pending-v2 <n>")
670
+ .description("Set max pending")
671
+ .action(async (n) => {
672
+ (await L()).setMaxPendingDv2govCredentialsPerProfileV2(Number(n));
673
+ console.log("ok");
674
+ });
675
+ parent
676
+ .command("dv2gov-set-idle-ms-v2 <n>")
677
+ .description("Set idle threshold ms")
678
+ .action(async (n) => {
679
+ (await L()).setDv2govProfileIdleMsV2(Number(n));
680
+ console.log("ok");
681
+ });
682
+ parent
683
+ .command("dv2gov-set-stuck-ms-v2 <n>")
684
+ .description("Set stuck threshold ms")
685
+ .action(async (n) => {
686
+ (await L()).setDv2govCredentialStuckMsV2(Number(n));
687
+ console.log("ok");
688
+ });
689
+ parent
690
+ .command("dv2gov-register-v2 <id> <owner>")
691
+ .description("Register V2 profile")
692
+ .option("--method <v>", "method")
693
+ .action(async (id, owner, o) => {
694
+ const m = await L();
695
+ console.log(
696
+ JSON.stringify(
697
+ m.registerDv2govProfileV2({ id, owner, method: o.method }),
698
+ null,
699
+ 2,
700
+ ),
701
+ );
702
+ });
703
+ parent
704
+ .command("dv2gov-activate-v2 <id>")
705
+ .description("Activate profile")
706
+ .action(async (id) => {
707
+ console.log(
708
+ JSON.stringify((await L()).activateDv2govProfileV2(id), null, 2),
709
+ );
710
+ });
711
+ parent
712
+ .command("dv2gov-suspend-v2 <id>")
713
+ .description("Suspend profile")
714
+ .action(async (id) => {
715
+ console.log(
716
+ JSON.stringify((await L()).suspendDv2govProfileV2(id), null, 2),
717
+ );
718
+ });
719
+ parent
720
+ .command("dv2gov-archive-v2 <id>")
721
+ .description("Archive profile")
722
+ .action(async (id) => {
723
+ console.log(
724
+ JSON.stringify((await L()).archiveDv2govProfileV2(id), null, 2),
725
+ );
726
+ });
727
+ parent
728
+ .command("dv2gov-touch-v2 <id>")
729
+ .description("Touch profile")
730
+ .action(async (id) => {
731
+ console.log(
732
+ JSON.stringify((await L()).touchDv2govProfileV2(id), null, 2),
733
+ );
734
+ });
735
+ parent
736
+ .command("dv2gov-get-v2 <id>")
737
+ .description("Get profile")
738
+ .action(async (id) => {
739
+ console.log(JSON.stringify((await L()).getDv2govProfileV2(id), null, 2));
740
+ });
741
+ parent
742
+ .command("dv2gov-list-v2")
743
+ .description("List profiles")
744
+ .action(async () => {
745
+ console.log(JSON.stringify((await L()).listDv2govProfilesV2(), null, 2));
746
+ });
747
+ parent
748
+ .command("dv2gov-create-credential-v2 <id> <profileId>")
749
+ .description("Create credential")
750
+ .option("--subject <v>", "subject")
751
+ .action(async (id, profileId, o) => {
752
+ const m = await L();
753
+ console.log(
754
+ JSON.stringify(
755
+ m.createDv2govCredentialV2({ id, profileId, subject: o.subject }),
756
+ null,
757
+ 2,
758
+ ),
759
+ );
760
+ });
761
+ parent
762
+ .command("dv2gov-issuing-credential-v2 <id>")
763
+ .description("Mark credential as issuing")
764
+ .action(async (id) => {
765
+ console.log(
766
+ JSON.stringify((await L()).issuingDv2govCredentialV2(id), null, 2),
767
+ );
768
+ });
769
+ parent
770
+ .command("dv2gov-complete-credential-v2 <id>")
771
+ .description("Complete credential")
772
+ .action(async (id) => {
773
+ console.log(
774
+ JSON.stringify((await L()).completeCredentialDv2govV2(id), null, 2),
775
+ );
776
+ });
777
+ parent
778
+ .command("dv2gov-fail-credential-v2 <id> [reason]")
779
+ .description("Fail credential")
780
+ .action(async (id, reason) => {
781
+ console.log(
782
+ JSON.stringify((await L()).failDv2govCredentialV2(id, reason), null, 2),
783
+ );
784
+ });
785
+ parent
786
+ .command("dv2gov-cancel-credential-v2 <id> [reason]")
787
+ .description("Cancel credential")
788
+ .action(async (id, reason) => {
789
+ console.log(
790
+ JSON.stringify(
791
+ (await L()).cancelDv2govCredentialV2(id, reason),
792
+ null,
793
+ 2,
794
+ ),
795
+ );
796
+ });
797
+ parent
798
+ .command("dv2gov-get-credential-v2 <id>")
799
+ .description("Get credential")
800
+ .action(async (id) => {
801
+ console.log(
802
+ JSON.stringify((await L()).getDv2govCredentialV2(id), null, 2),
803
+ );
804
+ });
805
+ parent
806
+ .command("dv2gov-list-credentials-v2")
807
+ .description("List credentials")
808
+ .action(async () => {
809
+ console.log(
810
+ JSON.stringify((await L()).listDv2govCredentialsV2(), null, 2),
811
+ );
812
+ });
813
+ parent
814
+ .command("dv2gov-auto-suspend-idle-v2")
815
+ .description("Auto-suspend idle")
816
+ .action(async () => {
817
+ console.log(
818
+ JSON.stringify((await L()).autoSuspendIdleDv2govProfilesV2(), null, 2),
819
+ );
820
+ });
821
+ parent
822
+ .command("dv2gov-auto-fail-stuck-v2")
823
+ .description("Auto-fail stuck credentials")
824
+ .action(async () => {
825
+ console.log(
826
+ JSON.stringify((await L()).autoFailStuckDv2govCredentialsV2(), null, 2),
827
+ );
828
+ });
829
+ parent
830
+ .command("dv2gov-gov-stats-v2")
831
+ .description("V2 gov stats")
832
+ .action(async () => {
833
+ console.log(
834
+ JSON.stringify((await L()).getDidV2ManagerGovStatsV2(), null, 2),
835
+ );
836
+ });
837
+ }
@@ -732,3 +732,224 @@ export function registerDidCommand(program) {
732
732
  .option("--json")
733
733
  .action(() => console.log(JSON.stringify(getDidManagerStatsV2(), null, 2)));
734
734
  }
735
+
736
+ // === Iter19 V2 governance overlay ===
737
+ export function registerDidgovV2Commands(program) {
738
+ const parent = program.commands.find((c) => c.name() === "did");
739
+ if (!parent) return;
740
+ const L = async () => await import("../lib/did-manager.js");
741
+ parent
742
+ .command("didgov-enums-v2")
743
+ .description("Show V2 enums")
744
+ .action(async () => {
745
+ const m = await L();
746
+ console.log(
747
+ JSON.stringify(
748
+ {
749
+ profileMaturity: m.DIDGOV_PROFILE_MATURITY_V2,
750
+ resolutionLifecycle: m.DIDGOV_RESOLUTION_LIFECYCLE_V2,
751
+ },
752
+ null,
753
+ 2,
754
+ ),
755
+ );
756
+ });
757
+ parent
758
+ .command("didgov-config-v2")
759
+ .description("Show V2 config")
760
+ .action(async () => {
761
+ const m = await L();
762
+ console.log(
763
+ JSON.stringify(
764
+ {
765
+ maxActive: m.getMaxActiveDidgovProfilesPerOwnerV2(),
766
+ maxPending: m.getMaxPendingDidgovResolutionsPerProfileV2(),
767
+ idleMs: m.getDidgovProfileIdleMsV2(),
768
+ stuckMs: m.getDidgovResolutionStuckMsV2(),
769
+ },
770
+ null,
771
+ 2,
772
+ ),
773
+ );
774
+ });
775
+ parent
776
+ .command("didgov-set-max-active-v2 <n>")
777
+ .description("Set max active")
778
+ .action(async (n) => {
779
+ (await L()).setMaxActiveDidgovProfilesPerOwnerV2(Number(n));
780
+ console.log("ok");
781
+ });
782
+ parent
783
+ .command("didgov-set-max-pending-v2 <n>")
784
+ .description("Set max pending")
785
+ .action(async (n) => {
786
+ (await L()).setMaxPendingDidgovResolutionsPerProfileV2(Number(n));
787
+ console.log("ok");
788
+ });
789
+ parent
790
+ .command("didgov-set-idle-ms-v2 <n>")
791
+ .description("Set idle threshold ms")
792
+ .action(async (n) => {
793
+ (await L()).setDidgovProfileIdleMsV2(Number(n));
794
+ console.log("ok");
795
+ });
796
+ parent
797
+ .command("didgov-set-stuck-ms-v2 <n>")
798
+ .description("Set stuck threshold ms")
799
+ .action(async (n) => {
800
+ (await L()).setDidgovResolutionStuckMsV2(Number(n));
801
+ console.log("ok");
802
+ });
803
+ parent
804
+ .command("didgov-register-v2 <id> <owner>")
805
+ .description("Register V2 profile")
806
+ .option("--method <v>", "method")
807
+ .action(async (id, owner, o) => {
808
+ const m = await L();
809
+ console.log(
810
+ JSON.stringify(
811
+ m.registerDidgovProfileV2({ id, owner, method: o.method }),
812
+ null,
813
+ 2,
814
+ ),
815
+ );
816
+ });
817
+ parent
818
+ .command("didgov-activate-v2 <id>")
819
+ .description("Activate profile")
820
+ .action(async (id) => {
821
+ console.log(
822
+ JSON.stringify((await L()).activateDidgovProfileV2(id), null, 2),
823
+ );
824
+ });
825
+ parent
826
+ .command("didgov-suspend-v2 <id>")
827
+ .description("Suspend profile")
828
+ .action(async (id) => {
829
+ console.log(
830
+ JSON.stringify((await L()).suspendDidgovProfileV2(id), null, 2),
831
+ );
832
+ });
833
+ parent
834
+ .command("didgov-archive-v2 <id>")
835
+ .description("Archive profile")
836
+ .action(async (id) => {
837
+ console.log(
838
+ JSON.stringify((await L()).archiveDidgovProfileV2(id), null, 2),
839
+ );
840
+ });
841
+ parent
842
+ .command("didgov-touch-v2 <id>")
843
+ .description("Touch profile")
844
+ .action(async (id) => {
845
+ console.log(
846
+ JSON.stringify((await L()).touchDidgovProfileV2(id), null, 2),
847
+ );
848
+ });
849
+ parent
850
+ .command("didgov-get-v2 <id>")
851
+ .description("Get profile")
852
+ .action(async (id) => {
853
+ console.log(JSON.stringify((await L()).getDidgovProfileV2(id), null, 2));
854
+ });
855
+ parent
856
+ .command("didgov-list-v2")
857
+ .description("List profiles")
858
+ .action(async () => {
859
+ console.log(JSON.stringify((await L()).listDidgovProfilesV2(), null, 2));
860
+ });
861
+ parent
862
+ .command("didgov-create-resolution-v2 <id> <profileId>")
863
+ .description("Create resolution")
864
+ .option("--identifier <v>", "identifier")
865
+ .action(async (id, profileId, o) => {
866
+ const m = await L();
867
+ console.log(
868
+ JSON.stringify(
869
+ m.createDidgovResolutionV2({
870
+ id,
871
+ profileId,
872
+ identifier: o.identifier,
873
+ }),
874
+ null,
875
+ 2,
876
+ ),
877
+ );
878
+ });
879
+ parent
880
+ .command("didgov-resolving-resolution-v2 <id>")
881
+ .description("Mark resolution as resolving")
882
+ .action(async (id) => {
883
+ console.log(
884
+ JSON.stringify((await L()).resolvingDidgovResolutionV2(id), null, 2),
885
+ );
886
+ });
887
+ parent
888
+ .command("didgov-complete-resolution-v2 <id>")
889
+ .description("Complete resolution")
890
+ .action(async (id) => {
891
+ console.log(
892
+ JSON.stringify((await L()).completeResolutionDidgovV2(id), null, 2),
893
+ );
894
+ });
895
+ parent
896
+ .command("didgov-fail-resolution-v2 <id> [reason]")
897
+ .description("Fail resolution")
898
+ .action(async (id, reason) => {
899
+ console.log(
900
+ JSON.stringify((await L()).failDidgovResolutionV2(id, reason), null, 2),
901
+ );
902
+ });
903
+ parent
904
+ .command("didgov-cancel-resolution-v2 <id> [reason]")
905
+ .description("Cancel resolution")
906
+ .action(async (id, reason) => {
907
+ console.log(
908
+ JSON.stringify(
909
+ (await L()).cancelDidgovResolutionV2(id, reason),
910
+ null,
911
+ 2,
912
+ ),
913
+ );
914
+ });
915
+ parent
916
+ .command("didgov-get-resolution-v2 <id>")
917
+ .description("Get resolution")
918
+ .action(async (id) => {
919
+ console.log(
920
+ JSON.stringify((await L()).getDidgovResolutionV2(id), null, 2),
921
+ );
922
+ });
923
+ parent
924
+ .command("didgov-list-resolutions-v2")
925
+ .description("List resolutions")
926
+ .action(async () => {
927
+ console.log(
928
+ JSON.stringify((await L()).listDidgovResolutionsV2(), null, 2),
929
+ );
930
+ });
931
+ parent
932
+ .command("didgov-auto-suspend-idle-v2")
933
+ .description("Auto-suspend idle")
934
+ .action(async () => {
935
+ console.log(
936
+ JSON.stringify((await L()).autoSuspendIdleDidgovProfilesV2(), null, 2),
937
+ );
938
+ });
939
+ parent
940
+ .command("didgov-auto-fail-stuck-v2")
941
+ .description("Auto-fail stuck resolutions")
942
+ .action(async () => {
943
+ console.log(
944
+ JSON.stringify((await L()).autoFailStuckDidgovResolutionsV2(), null, 2),
945
+ );
946
+ });
947
+ parent
948
+ .command("didgov-gov-stats-v2")
949
+ .description("V2 gov stats")
950
+ .action(async () => {
951
+ console.log(
952
+ JSON.stringify((await L()).getDidManagerGovStatsV2(), null, 2),
953
+ );
954
+ });
955
+ }
@@ -823,3 +823,216 @@ export function registerDlpV2Command(dlp) {
823
823
  console.log(JSON.stringify(getDlpEngineStatsV2(), null, 2));
824
824
  });
825
825
  }
826
+
827
+ // === Iter20 V2 governance overlay ===
828
+ export function registerDlpgovV2Commands(program) {
829
+ const parent = program.commands.find((c) => c.name() === "dlp");
830
+ if (!parent) return;
831
+ const L = async () => await import("../lib/dlp-engine.js");
832
+ parent
833
+ .command("dlpgov-enums-v2")
834
+ .description("Show V2 enums")
835
+ .action(async () => {
836
+ const m = await L();
837
+ console.log(
838
+ JSON.stringify(
839
+ {
840
+ profileMaturity: m.DLPGOV_PROFILE_MATURITY_V2,
841
+ scanLifecycle: m.DLPGOV_SCAN_LIFECYCLE_V2,
842
+ },
843
+ null,
844
+ 2,
845
+ ),
846
+ );
847
+ });
848
+ parent
849
+ .command("dlpgov-config-v2")
850
+ .description("Show V2 config")
851
+ .action(async () => {
852
+ const m = await L();
853
+ console.log(
854
+ JSON.stringify(
855
+ {
856
+ maxActive: m.getMaxActiveDlpgovProfilesPerOwnerV2(),
857
+ maxPending: m.getMaxPendingDlpgovScansPerProfileV2(),
858
+ idleMs: m.getDlpgovProfileIdleMsV2(),
859
+ stuckMs: m.getDlpgovScanStuckMsV2(),
860
+ },
861
+ null,
862
+ 2,
863
+ ),
864
+ );
865
+ });
866
+ parent
867
+ .command("dlpgov-set-max-active-v2 <n>")
868
+ .description("Set max active")
869
+ .action(async (n) => {
870
+ (await L()).setMaxActiveDlpgovProfilesPerOwnerV2(Number(n));
871
+ console.log("ok");
872
+ });
873
+ parent
874
+ .command("dlpgov-set-max-pending-v2 <n>")
875
+ .description("Set max pending")
876
+ .action(async (n) => {
877
+ (await L()).setMaxPendingDlpgovScansPerProfileV2(Number(n));
878
+ console.log("ok");
879
+ });
880
+ parent
881
+ .command("dlpgov-set-idle-ms-v2 <n>")
882
+ .description("Set idle threshold ms")
883
+ .action(async (n) => {
884
+ (await L()).setDlpgovProfileIdleMsV2(Number(n));
885
+ console.log("ok");
886
+ });
887
+ parent
888
+ .command("dlpgov-set-stuck-ms-v2 <n>")
889
+ .description("Set stuck threshold ms")
890
+ .action(async (n) => {
891
+ (await L()).setDlpgovScanStuckMsV2(Number(n));
892
+ console.log("ok");
893
+ });
894
+ parent
895
+ .command("dlpgov-register-v2 <id> <owner>")
896
+ .description("Register V2 profile")
897
+ .option("--classification <v>", "classification")
898
+ .action(async (id, owner, o) => {
899
+ const m = await L();
900
+ console.log(
901
+ JSON.stringify(
902
+ m.registerDlpgovProfileV2({
903
+ id,
904
+ owner,
905
+ classification: o.classification,
906
+ }),
907
+ null,
908
+ 2,
909
+ ),
910
+ );
911
+ });
912
+ parent
913
+ .command("dlpgov-activate-v2 <id>")
914
+ .description("Activate profile")
915
+ .action(async (id) => {
916
+ console.log(
917
+ JSON.stringify((await L()).activateDlpgovProfileV2(id), null, 2),
918
+ );
919
+ });
920
+ parent
921
+ .command("dlpgov-suspend-v2 <id>")
922
+ .description("Suspend profile")
923
+ .action(async (id) => {
924
+ console.log(
925
+ JSON.stringify((await L()).suspendDlpgovProfileV2(id), null, 2),
926
+ );
927
+ });
928
+ parent
929
+ .command("dlpgov-archive-v2 <id>")
930
+ .description("Archive profile")
931
+ .action(async (id) => {
932
+ console.log(
933
+ JSON.stringify((await L()).archiveDlpgovProfileV2(id), null, 2),
934
+ );
935
+ });
936
+ parent
937
+ .command("dlpgov-touch-v2 <id>")
938
+ .description("Touch profile")
939
+ .action(async (id) => {
940
+ console.log(
941
+ JSON.stringify((await L()).touchDlpgovProfileV2(id), null, 2),
942
+ );
943
+ });
944
+ parent
945
+ .command("dlpgov-get-v2 <id>")
946
+ .description("Get profile")
947
+ .action(async (id) => {
948
+ console.log(JSON.stringify((await L()).getDlpgovProfileV2(id), null, 2));
949
+ });
950
+ parent
951
+ .command("dlpgov-list-v2")
952
+ .description("List profiles")
953
+ .action(async () => {
954
+ console.log(JSON.stringify((await L()).listDlpgovProfilesV2(), null, 2));
955
+ });
956
+ parent
957
+ .command("dlpgov-create-scan-v2 <id> <profileId>")
958
+ .description("Create scan")
959
+ .option("--resource <v>", "resource")
960
+ .action(async (id, profileId, o) => {
961
+ const m = await L();
962
+ console.log(
963
+ JSON.stringify(
964
+ m.createDlpgovScanV2({ id, profileId, resource: o.resource }),
965
+ null,
966
+ 2,
967
+ ),
968
+ );
969
+ });
970
+ parent
971
+ .command("dlpgov-scanning-scan-v2 <id>")
972
+ .description("Mark scan as scanning")
973
+ .action(async (id) => {
974
+ console.log(
975
+ JSON.stringify((await L()).scanningDlpgovScanV2(id), null, 2),
976
+ );
977
+ });
978
+ parent
979
+ .command("dlpgov-complete-scan-v2 <id>")
980
+ .description("Complete scan")
981
+ .action(async (id) => {
982
+ console.log(
983
+ JSON.stringify((await L()).completeScanDlpgovV2(id), null, 2),
984
+ );
985
+ });
986
+ parent
987
+ .command("dlpgov-fail-scan-v2 <id> [reason]")
988
+ .description("Fail scan")
989
+ .action(async (id, reason) => {
990
+ console.log(
991
+ JSON.stringify((await L()).failDlpgovScanV2(id, reason), null, 2),
992
+ );
993
+ });
994
+ parent
995
+ .command("dlpgov-cancel-scan-v2 <id> [reason]")
996
+ .description("Cancel scan")
997
+ .action(async (id, reason) => {
998
+ console.log(
999
+ JSON.stringify((await L()).cancelDlpgovScanV2(id, reason), null, 2),
1000
+ );
1001
+ });
1002
+ parent
1003
+ .command("dlpgov-get-scan-v2 <id>")
1004
+ .description("Get scan")
1005
+ .action(async (id) => {
1006
+ console.log(JSON.stringify((await L()).getDlpgovScanV2(id), null, 2));
1007
+ });
1008
+ parent
1009
+ .command("dlpgov-list-scans-v2")
1010
+ .description("List scans")
1011
+ .action(async () => {
1012
+ console.log(JSON.stringify((await L()).listDlpgovScansV2(), null, 2));
1013
+ });
1014
+ parent
1015
+ .command("dlpgov-auto-suspend-idle-v2")
1016
+ .description("Auto-suspend idle")
1017
+ .action(async () => {
1018
+ console.log(
1019
+ JSON.stringify((await L()).autoSuspendIdleDlpgovProfilesV2(), null, 2),
1020
+ );
1021
+ });
1022
+ parent
1023
+ .command("dlpgov-auto-fail-stuck-v2")
1024
+ .description("Auto-fail stuck scans")
1025
+ .action(async () => {
1026
+ console.log(
1027
+ JSON.stringify((await L()).autoFailStuckDlpgovScansV2(), null, 2),
1028
+ );
1029
+ });
1030
+ parent
1031
+ .command("dlpgov-gov-stats-v2")
1032
+ .description("V2 gov stats")
1033
+ .action(async () => {
1034
+ console.log(
1035
+ JSON.stringify((await L()).getDlpEngineGovStatsV2(), null, 2),
1036
+ );
1037
+ });
1038
+ }