chainlesschain 0.143.0 → 0.145.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 (133) hide show
  1. package/package.json +1 -1
  2. package/src/commands/a2a.js +196 -28
  3. package/src/commands/activitypub.js +157 -27
  4. package/src/commands/agent.js +587 -103
  5. package/src/commands/audit.js +206 -0
  6. package/src/commands/bi.js +152 -27
  7. package/src/commands/bm25.js +111 -27
  8. package/src/commands/browse.js +190 -29
  9. package/src/commands/ccron.js +128 -28
  10. package/src/commands/chat.js +207 -0
  11. package/src/commands/compliance.js +414 -34
  12. package/src/commands/compt.js +127 -29
  13. package/src/commands/consol.js +8 -2
  14. package/src/commands/cowork.js +580 -34
  15. package/src/commands/crosschain.js +182 -28
  16. package/src/commands/dao.js +182 -28
  17. package/src/commands/dlp.js +172 -27
  18. package/src/commands/economy.js +205 -50
  19. package/src/commands/evolution.js +203 -50
  20. package/src/commands/evomap.js +182 -27
  21. package/src/commands/fflag.js +74 -22
  22. package/src/commands/git.js +177 -37
  23. package/src/commands/hardening.js +209 -0
  24. package/src/commands/hmemory.js +204 -50
  25. package/src/commands/incentive.js +209 -0
  26. package/src/commands/inference.js +170 -34
  27. package/src/commands/itbudget.js +149 -33
  28. package/src/commands/kg.js +206 -0
  29. package/src/commands/lowcode.js +195 -38
  30. package/src/commands/marketplace.js +206 -0
  31. package/src/commands/matrix.js +179 -27
  32. package/src/commands/mcpscaf.js +145 -33
  33. package/src/commands/meminj.js +145 -33
  34. package/src/commands/nostr.js +178 -27
  35. package/src/commands/orchestrate.js +217 -0
  36. package/src/commands/orchgov.js +144 -33
  37. package/src/commands/pdfp.js +109 -27
  38. package/src/commands/perf.js +169 -32
  39. package/src/commands/perm.js +144 -33
  40. package/src/commands/pipeline.js +207 -52
  41. package/src/commands/planmode.js +141 -32
  42. package/src/commands/privacy.js +203 -0
  43. package/src/commands/promcomp.js +111 -27
  44. package/src/commands/recommend.js +177 -34
  45. package/src/commands/reputation.js +208 -0
  46. package/src/commands/sandbox.js +206 -0
  47. package/src/commands/seshhook.js +145 -33
  48. package/src/commands/seshsearch.js +141 -33
  49. package/src/commands/seshtail.js +144 -33
  50. package/src/commands/seshu.js +152 -33
  51. package/src/commands/sganal.js +123 -29
  52. package/src/commands/siem.js +201 -34
  53. package/src/commands/sla.js +212 -0
  54. package/src/commands/slotfill.js +146 -33
  55. package/src/commands/social.js +157 -32
  56. package/src/commands/stress.js +206 -0
  57. package/src/commands/svccont.js +145 -33
  58. package/src/commands/terraform.js +206 -0
  59. package/src/commands/tms.js +171 -33
  60. package/src/commands/topiccls.js +146 -33
  61. package/src/commands/uprof.js +141 -32
  62. package/src/commands/vcheck.js +122 -28
  63. package/src/commands/webfetch.js +141 -32
  64. package/src/commands/zkp.js +184 -28
  65. package/src/index.js +40 -0
  66. package/src/lib/a2a-protocol.js +319 -51
  67. package/src/lib/activitypub-bridge.js +288 -50
  68. package/src/lib/agent-economy.js +304 -51
  69. package/src/lib/app-builder.js +279 -46
  70. package/src/lib/audit-logger.js +321 -0
  71. package/src/lib/autonomous-agent.js +284 -48
  72. package/src/lib/bi-engine.js +283 -49
  73. package/src/lib/bm25-search.js +301 -49
  74. package/src/lib/browser-automation.js +296 -49
  75. package/src/lib/chat-core.js +336 -0
  76. package/src/lib/claude-code-bridge.js +341 -0
  77. package/src/lib/compliance-framework-reporter.js +305 -51
  78. package/src/lib/compliance-manager.js +330 -0
  79. package/src/lib/compression-telemetry.js +301 -49
  80. package/src/lib/content-recommender.js +317 -52
  81. package/src/lib/cowork-cron.js +298 -49
  82. package/src/lib/cowork-learning.js +333 -0
  83. package/src/lib/cowork-task-runner.js +308 -51
  84. package/src/lib/cowork-workflow.js +327 -0
  85. package/src/lib/cross-chain.js +311 -51
  86. package/src/lib/dao-governance.js +280 -46
  87. package/src/lib/dlp-engine.js +287 -49
  88. package/src/lib/evolution-system.js +278 -47
  89. package/src/lib/evomap-manager.js +280 -46
  90. package/src/lib/execution-backend.js +294 -48
  91. package/src/lib/feature-flags.js +294 -49
  92. package/src/lib/git-integration.js +285 -47
  93. package/src/lib/hardening-manager.js +341 -0
  94. package/src/lib/hierarchical-memory.js +284 -48
  95. package/src/lib/inference-network.js +308 -51
  96. package/src/lib/iteration-budget.js +302 -50
  97. package/src/lib/knowledge-graph.js +333 -0
  98. package/src/lib/matrix-bridge.js +281 -47
  99. package/src/lib/mcp-scaffold.js +318 -54
  100. package/src/lib/memory-injection.js +288 -49
  101. package/src/lib/nostr-bridge.js +286 -49
  102. package/src/lib/orchestrator.js +293 -48
  103. package/src/lib/pdf-parser.js +298 -49
  104. package/src/lib/perf-tuning.js +309 -50
  105. package/src/lib/permission-engine.js +287 -49
  106. package/src/lib/pipeline-orchestrator.js +289 -49
  107. package/src/lib/plan-mode.js +298 -51
  108. package/src/lib/privacy-computing.js +335 -0
  109. package/src/lib/reputation-optimizer.js +340 -0
  110. package/src/lib/sandbox-v2.js +327 -0
  111. package/src/lib/service-container.js +313 -52
  112. package/src/lib/session-consolidator.js +296 -49
  113. package/src/lib/session-hooks.js +312 -53
  114. package/src/lib/session-search.js +304 -51
  115. package/src/lib/session-tail.js +288 -49
  116. package/src/lib/session-usage.js +298 -52
  117. package/src/lib/siem-exporter.js +298 -51
  118. package/src/lib/skill-marketplace.js +345 -0
  119. package/src/lib/sla-manager.js +341 -0
  120. package/src/lib/slot-filler.js +303 -51
  121. package/src/lib/social-graph-analytics.js +295 -49
  122. package/src/lib/social-graph.js +272 -49
  123. package/src/lib/stress-tester.js +342 -0
  124. package/src/lib/sub-agent-registry.js +302 -53
  125. package/src/lib/task-model-selector.js +302 -50
  126. package/src/lib/terraform-manager.js +333 -0
  127. package/src/lib/todo-manager.js +281 -47
  128. package/src/lib/token-incentive.js +341 -0
  129. package/src/lib/topic-classifier.js +297 -49
  130. package/src/lib/user-profile.js +294 -50
  131. package/src/lib/version-checker.js +304 -50
  132. package/src/lib/web-fetch.js +292 -51
  133. package/src/lib/zkp-engine.js +286 -49
@@ -600,7 +600,6 @@ export function registerCrossChainCommand(program) {
600
600
  registerCrossChainV2Command(cc);
601
601
  }
602
602
 
603
-
604
603
  import {
605
604
  XCHAIN_CHANNEL_MATURITY_V2,
606
605
  XCHAIN_TRANSFER_LIFECYCLE_V2,
@@ -632,31 +631,186 @@ import {
632
631
  } from "../lib/cross-chain.js";
633
632
 
634
633
  export function registerCrossChainV2Command(cc) {
635
- cc.command("enums-v2").description("Show V2 governance enums").action(() => { console.log(JSON.stringify({ XCHAIN_CHANNEL_MATURITY_V2, XCHAIN_TRANSFER_LIFECYCLE_V2 }, null, 2)); });
636
- cc.command("register-channel-v2").description("Register an xchain channel profile (pending)")
637
- .requiredOption("--id <id>").requiredOption("--owner <owner>").option("--from-chain <fromChain>").option("--to-chain <toChain>")
638
- .action((o) => { console.log(JSON.stringify(registerXchainChannelV2({ id: o.id, owner: o.owner, fromChain: o.fromChain, toChain: o.toChain }), null, 2)); });
639
- cc.command("activate-channel-v2 <id>").description("Activate channel").action((id) => { console.log(JSON.stringify(activateXchainChannelV2(id), null, 2)); });
640
- cc.command("pause-channel-v2 <id>").description("Pause channel").action((id) => { console.log(JSON.stringify(pauseXchainChannelV2(id), null, 2)); });
641
- cc.command("decommission-channel-v2 <id>").description("Decommission channel (terminal)").action((id) => { console.log(JSON.stringify(decommissionXchainChannelV2(id), null, 2)); });
642
- cc.command("touch-channel-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchXchainChannelV2(id), null, 2)); });
643
- cc.command("get-channel-v2 <id>").description("Get channel").action((id) => { console.log(JSON.stringify(getXchainChannelV2(id), null, 2)); });
644
- cc.command("list-channels-v2").description("List channels").action(() => { console.log(JSON.stringify(listXchainChannelsV2(), null, 2)); });
645
- cc.command("create-transfer-v2").description("Create an xchain transfer (queued)")
646
- .requiredOption("--id <id>").requiredOption("--channel-id <channelId>").option("--amount <amount>")
647
- .action((o) => { console.log(JSON.stringify(createXchainTransferV2({ id: o.id, channelId: o.channelId, amount: o.amount }), null, 2)); });
648
- cc.command("start-transfer-v2 <id>").description("Transition transfer to relaying").action((id) => { console.log(JSON.stringify(startXchainTransferV2(id), null, 2)); });
649
- cc.command("confirm-transfer-v2 <id>").description("Transition transfer to confirmed").action((id) => { console.log(JSON.stringify(confirmXchainTransferV2(id), null, 2)); });
650
- cc.command("fail-transfer-v2 <id>").description("Fail transfer").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failXchainTransferV2(id, o.reason), null, 2)); });
651
- cc.command("cancel-transfer-v2 <id>").description("Cancel transfer").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelXchainTransferV2(id, o.reason), null, 2)); });
652
- cc.command("get-transfer-v2 <id>").description("Get transfer").action((id) => { console.log(JSON.stringify(getXchainTransferV2(id), null, 2)); });
653
- cc.command("list-transfers-v2").description("List transfers").action(() => { console.log(JSON.stringify(listXchainTransfersV2(), null, 2)); });
654
- cc.command("set-max-active-channels-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveXchainChannelsPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveXchainChannelsPerOwner: getMaxActiveXchainChannelsPerOwnerV2() }, null, 2)); });
655
- cc.command("set-max-pending-transfers-v2 <n>").description("Set per-channel pending cap").action((n) => { setMaxPendingXchainTransfersPerChannelV2(Number(n)); console.log(JSON.stringify({ maxPendingXchainTransfersPerChannel: getMaxPendingXchainTransfersPerChannelV2() }, null, 2)); });
656
- cc.command("set-channel-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setXchainChannelIdleMsV2(Number(n)); console.log(JSON.stringify({ xchainChannelIdleMs: getXchainChannelIdleMsV2() }, null, 2)); });
657
- cc.command("set-transfer-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setXchainTransferStuckMsV2(Number(n)); console.log(JSON.stringify({ xchainTransferStuckMs: getXchainTransferStuckMsV2() }, null, 2)); });
658
- cc.command("auto-pause-idle-channels-v2").description("Auto-pause idle channels").action(() => { console.log(JSON.stringify(autoPauseIdleXchainChannelsV2(), null, 2)); });
659
- cc.command("auto-fail-stuck-transfers-v2").description("Auto-fail stuck relaying transfers").action(() => { console.log(JSON.stringify(autoFailStuckXchainTransfersV2(), null, 2)); });
660
- cc.command("gov-stats-v2").description("V2 governance aggregate stats").action(() => { console.log(JSON.stringify(getCrossChainGovStatsV2(), null, 2)); });
634
+ cc.command("enums-v2")
635
+ .description("Show V2 governance enums")
636
+ .action(() => {
637
+ console.log(
638
+ JSON.stringify(
639
+ { XCHAIN_CHANNEL_MATURITY_V2, XCHAIN_TRANSFER_LIFECYCLE_V2 },
640
+ null,
641
+ 2,
642
+ ),
643
+ );
644
+ });
645
+ cc.command("register-channel-v2")
646
+ .description("Register an xchain channel profile (pending)")
647
+ .requiredOption("--id <id>")
648
+ .requiredOption("--owner <owner>")
649
+ .option("--from-chain <fromChain>")
650
+ .option("--to-chain <toChain>")
651
+ .action((o) => {
652
+ console.log(
653
+ JSON.stringify(
654
+ registerXchainChannelV2({
655
+ id: o.id,
656
+ owner: o.owner,
657
+ fromChain: o.fromChain,
658
+ toChain: o.toChain,
659
+ }),
660
+ null,
661
+ 2,
662
+ ),
663
+ );
664
+ });
665
+ cc.command("activate-channel-v2 <id>")
666
+ .description("Activate channel")
667
+ .action((id) => {
668
+ console.log(JSON.stringify(activateXchainChannelV2(id), null, 2));
669
+ });
670
+ cc.command("pause-channel-v2 <id>")
671
+ .description("Pause channel")
672
+ .action((id) => {
673
+ console.log(JSON.stringify(pauseXchainChannelV2(id), null, 2));
674
+ });
675
+ cc.command("decommission-channel-v2 <id>")
676
+ .description("Decommission channel (terminal)")
677
+ .action((id) => {
678
+ console.log(JSON.stringify(decommissionXchainChannelV2(id), null, 2));
679
+ });
680
+ cc.command("touch-channel-v2 <id>")
681
+ .description("Refresh lastTouchedAt")
682
+ .action((id) => {
683
+ console.log(JSON.stringify(touchXchainChannelV2(id), null, 2));
684
+ });
685
+ cc.command("get-channel-v2 <id>")
686
+ .description("Get channel")
687
+ .action((id) => {
688
+ console.log(JSON.stringify(getXchainChannelV2(id), null, 2));
689
+ });
690
+ cc.command("list-channels-v2")
691
+ .description("List channels")
692
+ .action(() => {
693
+ console.log(JSON.stringify(listXchainChannelsV2(), null, 2));
694
+ });
695
+ cc.command("create-transfer-v2")
696
+ .description("Create an xchain transfer (queued)")
697
+ .requiredOption("--id <id>")
698
+ .requiredOption("--channel-id <channelId>")
699
+ .option("--amount <amount>")
700
+ .action((o) => {
701
+ console.log(
702
+ JSON.stringify(
703
+ createXchainTransferV2({
704
+ id: o.id,
705
+ channelId: o.channelId,
706
+ amount: o.amount,
707
+ }),
708
+ null,
709
+ 2,
710
+ ),
711
+ );
712
+ });
713
+ cc.command("start-transfer-v2 <id>")
714
+ .description("Transition transfer to relaying")
715
+ .action((id) => {
716
+ console.log(JSON.stringify(startXchainTransferV2(id), null, 2));
717
+ });
718
+ cc.command("confirm-transfer-v2 <id>")
719
+ .description("Transition transfer to confirmed")
720
+ .action((id) => {
721
+ console.log(JSON.stringify(confirmXchainTransferV2(id), null, 2));
722
+ });
723
+ cc.command("fail-transfer-v2 <id>")
724
+ .description("Fail transfer")
725
+ .option("--reason <r>")
726
+ .action((id, o) => {
727
+ console.log(JSON.stringify(failXchainTransferV2(id, o.reason), null, 2));
728
+ });
729
+ cc.command("cancel-transfer-v2 <id>")
730
+ .description("Cancel transfer")
731
+ .option("--reason <r>")
732
+ .action((id, o) => {
733
+ console.log(
734
+ JSON.stringify(cancelXchainTransferV2(id, o.reason), null, 2),
735
+ );
736
+ });
737
+ cc.command("get-transfer-v2 <id>")
738
+ .description("Get transfer")
739
+ .action((id) => {
740
+ console.log(JSON.stringify(getXchainTransferV2(id), null, 2));
741
+ });
742
+ cc.command("list-transfers-v2")
743
+ .description("List transfers")
744
+ .action(() => {
745
+ console.log(JSON.stringify(listXchainTransfersV2(), null, 2));
746
+ });
747
+ cc.command("set-max-active-channels-v2 <n>")
748
+ .description("Set per-owner active cap")
749
+ .action((n) => {
750
+ setMaxActiveXchainChannelsPerOwnerV2(Number(n));
751
+ console.log(
752
+ JSON.stringify(
753
+ {
754
+ maxActiveXchainChannelsPerOwner:
755
+ getMaxActiveXchainChannelsPerOwnerV2(),
756
+ },
757
+ null,
758
+ 2,
759
+ ),
760
+ );
761
+ });
762
+ cc.command("set-max-pending-transfers-v2 <n>")
763
+ .description("Set per-channel pending cap")
764
+ .action((n) => {
765
+ setMaxPendingXchainTransfersPerChannelV2(Number(n));
766
+ console.log(
767
+ JSON.stringify(
768
+ {
769
+ maxPendingXchainTransfersPerChannel:
770
+ getMaxPendingXchainTransfersPerChannelV2(),
771
+ },
772
+ null,
773
+ 2,
774
+ ),
775
+ );
776
+ });
777
+ cc.command("set-channel-idle-ms-v2 <n>")
778
+ .description("Set idle threshold")
779
+ .action((n) => {
780
+ setXchainChannelIdleMsV2(Number(n));
781
+ console.log(
782
+ JSON.stringify(
783
+ { xchainChannelIdleMs: getXchainChannelIdleMsV2() },
784
+ null,
785
+ 2,
786
+ ),
787
+ );
788
+ });
789
+ cc.command("set-transfer-stuck-ms-v2 <n>")
790
+ .description("Set stuck threshold")
791
+ .action((n) => {
792
+ setXchainTransferStuckMsV2(Number(n));
793
+ console.log(
794
+ JSON.stringify(
795
+ { xchainTransferStuckMs: getXchainTransferStuckMsV2() },
796
+ null,
797
+ 2,
798
+ ),
799
+ );
800
+ });
801
+ cc.command("auto-pause-idle-channels-v2")
802
+ .description("Auto-pause idle channels")
803
+ .action(() => {
804
+ console.log(JSON.stringify(autoPauseIdleXchainChannelsV2(), null, 2));
805
+ });
806
+ cc.command("auto-fail-stuck-transfers-v2")
807
+ .description("Auto-fail stuck relaying transfers")
808
+ .action(() => {
809
+ console.log(JSON.stringify(autoFailStuckXchainTransfersV2(), null, 2));
810
+ });
811
+ cc.command("gov-stats-v2")
812
+ .description("V2 governance aggregate stats")
813
+ .action(() => {
814
+ console.log(JSON.stringify(getCrossChainGovStatsV2(), null, 2));
815
+ });
661
816
  }
662
-
@@ -877,7 +877,6 @@ export function registerDaoCommand(program) {
877
877
  registerDaoV2Command(dao);
878
878
  }
879
879
 
880
-
881
880
  import {
882
881
  DAO_ORG_MATURITY_V2,
883
882
  DAO_PROPOSAL_LIFECYCLE_V2,
@@ -909,31 +908,186 @@ import {
909
908
  } from "../lib/dao-governance.js";
910
909
 
911
910
  export function registerDaoV2Command(dao) {
912
- dao.command("enums-v2").description("Show V2 governance enums").action(() => { console.log(JSON.stringify({ DAO_ORG_MATURITY_V2, DAO_PROPOSAL_LIFECYCLE_V2 }, null, 2)); });
913
- dao.command("register-org-v2").description("Register a dao org profile (pending)")
914
- .requiredOption("--id <id>").requiredOption("--owner <owner>").option("--name <name>")
915
- .action((o) => { console.log(JSON.stringify(registerDaoOrgV2({ id: o.id, owner: o.owner, name: o.name }), null, 2)); });
916
- dao.command("activate-org-v2 <id>").description("Activate org").action((id) => { console.log(JSON.stringify(activateDaoOrgV2(id), null, 2)); });
917
- dao.command("pause-org-v2 <id>").description("Pause org").action((id) => { console.log(JSON.stringify(pauseDaoOrgV2(id), null, 2)); });
918
- dao.command("dissolve-org-v2 <id>").description("Dissolve org (terminal)").action((id) => { console.log(JSON.stringify(dissolveDaoOrgV2(id), null, 2)); });
919
- dao.command("touch-org-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchDaoOrgV2(id), null, 2)); });
920
- dao.command("get-org-v2 <id>").description("Get org").action((id) => { console.log(JSON.stringify(getDaoOrgV2(id), null, 2)); });
921
- dao.command("list-orgs-v2").description("List orgs").action(() => { console.log(JSON.stringify(listDaoOrgsV2(), null, 2)); });
922
- dao.command("create-proposal-v2").description("Create a dao proposal (queued)")
923
- .requiredOption("--id <id>").requiredOption("--org-id <orgId>").option("--title <title>")
924
- .action((o) => { console.log(JSON.stringify(createDaoProposalV2({ id: o.id, orgId: o.orgId, title: o.title }), null, 2)); });
925
- dao.command("start-proposal-v2 <id>").description("Transition proposal to voting").action((id) => { console.log(JSON.stringify(startDaoProposalV2(id), null, 2)); });
926
- dao.command("pass-proposal-v2 <id>").description("Transition proposal to passed").action((id) => { console.log(JSON.stringify(passDaoProposalV2(id), null, 2)); });
927
- dao.command("fail-proposal-v2 <id>").description("Fail proposal").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failDaoProposalV2(id, o.reason), null, 2)); });
928
- dao.command("cancel-proposal-v2 <id>").description("Cancel proposal").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelDaoProposalV2(id, o.reason), null, 2)); });
929
- dao.command("get-proposal-v2 <id>").description("Get proposal").action((id) => { console.log(JSON.stringify(getDaoProposalV2(id), null, 2)); });
930
- dao.command("list-proposals-v2").description("List proposals").action(() => { console.log(JSON.stringify(listDaoProposalsV2(), null, 2)); });
931
- dao.command("set-max-active-orgs-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveDaoOrgsPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveDaoOrgsPerOwner: getMaxActiveDaoOrgsPerOwnerV2() }, null, 2)); });
932
- dao.command("set-max-pending-proposals-v2 <n>").description("Set per-org pending cap").action((n) => { setMaxPendingDaoProposalsPerOrgV2(Number(n)); console.log(JSON.stringify({ maxPendingDaoProposalsPerOrg: getMaxPendingDaoProposalsPerOrgV2() }, null, 2)); });
933
- dao.command("set-org-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setDaoOrgIdleMsV2(Number(n)); console.log(JSON.stringify({ daoOrgIdleMs: getDaoOrgIdleMsV2() }, null, 2)); });
934
- dao.command("set-proposal-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setDaoProposalStuckMsV2(Number(n)); console.log(JSON.stringify({ daoProposalStuckMs: getDaoProposalStuckMsV2() }, null, 2)); });
935
- dao.command("auto-pause-idle-orgs-v2").description("Auto-pause idle orgs").action(() => { console.log(JSON.stringify(autoPauseIdleDaoOrgsV2(), null, 2)); });
936
- dao.command("auto-fail-stuck-proposals-v2").description("Auto-fail stuck voting proposals").action(() => { console.log(JSON.stringify(autoFailStuckDaoProposalsV2(), null, 2)); });
937
- dao.command("gov-stats-v2").description("V2 governance aggregate stats").action(() => { console.log(JSON.stringify(getDaoGovernanceGovStatsV2(), null, 2)); });
911
+ dao
912
+ .command("enums-v2")
913
+ .description("Show V2 governance enums")
914
+ .action(() => {
915
+ console.log(
916
+ JSON.stringify(
917
+ { DAO_ORG_MATURITY_V2, DAO_PROPOSAL_LIFECYCLE_V2 },
918
+ null,
919
+ 2,
920
+ ),
921
+ );
922
+ });
923
+ dao
924
+ .command("register-org-v2")
925
+ .description("Register a dao org profile (pending)")
926
+ .requiredOption("--id <id>")
927
+ .requiredOption("--owner <owner>")
928
+ .option("--name <name>")
929
+ .action((o) => {
930
+ console.log(
931
+ JSON.stringify(
932
+ registerDaoOrgV2({ id: o.id, owner: o.owner, name: o.name }),
933
+ null,
934
+ 2,
935
+ ),
936
+ );
937
+ });
938
+ dao
939
+ .command("activate-org-v2 <id>")
940
+ .description("Activate org")
941
+ .action((id) => {
942
+ console.log(JSON.stringify(activateDaoOrgV2(id), null, 2));
943
+ });
944
+ dao
945
+ .command("pause-org-v2 <id>")
946
+ .description("Pause org")
947
+ .action((id) => {
948
+ console.log(JSON.stringify(pauseDaoOrgV2(id), null, 2));
949
+ });
950
+ dao
951
+ .command("dissolve-org-v2 <id>")
952
+ .description("Dissolve org (terminal)")
953
+ .action((id) => {
954
+ console.log(JSON.stringify(dissolveDaoOrgV2(id), null, 2));
955
+ });
956
+ dao
957
+ .command("touch-org-v2 <id>")
958
+ .description("Refresh lastTouchedAt")
959
+ .action((id) => {
960
+ console.log(JSON.stringify(touchDaoOrgV2(id), null, 2));
961
+ });
962
+ dao
963
+ .command("get-org-v2 <id>")
964
+ .description("Get org")
965
+ .action((id) => {
966
+ console.log(JSON.stringify(getDaoOrgV2(id), null, 2));
967
+ });
968
+ dao
969
+ .command("list-orgs-v2")
970
+ .description("List orgs")
971
+ .action(() => {
972
+ console.log(JSON.stringify(listDaoOrgsV2(), null, 2));
973
+ });
974
+ dao
975
+ .command("create-proposal-v2")
976
+ .description("Create a dao proposal (queued)")
977
+ .requiredOption("--id <id>")
978
+ .requiredOption("--org-id <orgId>")
979
+ .option("--title <title>")
980
+ .action((o) => {
981
+ console.log(
982
+ JSON.stringify(
983
+ createDaoProposalV2({ id: o.id, orgId: o.orgId, title: o.title }),
984
+ null,
985
+ 2,
986
+ ),
987
+ );
988
+ });
989
+ dao
990
+ .command("start-proposal-v2 <id>")
991
+ .description("Transition proposal to voting")
992
+ .action((id) => {
993
+ console.log(JSON.stringify(startDaoProposalV2(id), null, 2));
994
+ });
995
+ dao
996
+ .command("pass-proposal-v2 <id>")
997
+ .description("Transition proposal to passed")
998
+ .action((id) => {
999
+ console.log(JSON.stringify(passDaoProposalV2(id), null, 2));
1000
+ });
1001
+ dao
1002
+ .command("fail-proposal-v2 <id>")
1003
+ .description("Fail proposal")
1004
+ .option("--reason <r>")
1005
+ .action((id, o) => {
1006
+ console.log(JSON.stringify(failDaoProposalV2(id, o.reason), null, 2));
1007
+ });
1008
+ dao
1009
+ .command("cancel-proposal-v2 <id>")
1010
+ .description("Cancel proposal")
1011
+ .option("--reason <r>")
1012
+ .action((id, o) => {
1013
+ console.log(JSON.stringify(cancelDaoProposalV2(id, o.reason), null, 2));
1014
+ });
1015
+ dao
1016
+ .command("get-proposal-v2 <id>")
1017
+ .description("Get proposal")
1018
+ .action((id) => {
1019
+ console.log(JSON.stringify(getDaoProposalV2(id), null, 2));
1020
+ });
1021
+ dao
1022
+ .command("list-proposals-v2")
1023
+ .description("List proposals")
1024
+ .action(() => {
1025
+ console.log(JSON.stringify(listDaoProposalsV2(), null, 2));
1026
+ });
1027
+ dao
1028
+ .command("set-max-active-orgs-v2 <n>")
1029
+ .description("Set per-owner active cap")
1030
+ .action((n) => {
1031
+ setMaxActiveDaoOrgsPerOwnerV2(Number(n));
1032
+ console.log(
1033
+ JSON.stringify(
1034
+ { maxActiveDaoOrgsPerOwner: getMaxActiveDaoOrgsPerOwnerV2() },
1035
+ null,
1036
+ 2,
1037
+ ),
1038
+ );
1039
+ });
1040
+ dao
1041
+ .command("set-max-pending-proposals-v2 <n>")
1042
+ .description("Set per-org pending cap")
1043
+ .action((n) => {
1044
+ setMaxPendingDaoProposalsPerOrgV2(Number(n));
1045
+ console.log(
1046
+ JSON.stringify(
1047
+ { maxPendingDaoProposalsPerOrg: getMaxPendingDaoProposalsPerOrgV2() },
1048
+ null,
1049
+ 2,
1050
+ ),
1051
+ );
1052
+ });
1053
+ dao
1054
+ .command("set-org-idle-ms-v2 <n>")
1055
+ .description("Set idle threshold")
1056
+ .action((n) => {
1057
+ setDaoOrgIdleMsV2(Number(n));
1058
+ console.log(
1059
+ JSON.stringify({ daoOrgIdleMs: getDaoOrgIdleMsV2() }, null, 2),
1060
+ );
1061
+ });
1062
+ dao
1063
+ .command("set-proposal-stuck-ms-v2 <n>")
1064
+ .description("Set stuck threshold")
1065
+ .action((n) => {
1066
+ setDaoProposalStuckMsV2(Number(n));
1067
+ console.log(
1068
+ JSON.stringify(
1069
+ { daoProposalStuckMs: getDaoProposalStuckMsV2() },
1070
+ null,
1071
+ 2,
1072
+ ),
1073
+ );
1074
+ });
1075
+ dao
1076
+ .command("auto-pause-idle-orgs-v2")
1077
+ .description("Auto-pause idle orgs")
1078
+ .action(() => {
1079
+ console.log(JSON.stringify(autoPauseIdleDaoOrgsV2(), null, 2));
1080
+ });
1081
+ dao
1082
+ .command("auto-fail-stuck-proposals-v2")
1083
+ .description("Auto-fail stuck voting proposals")
1084
+ .action(() => {
1085
+ console.log(JSON.stringify(autoFailStuckDaoProposalsV2(), null, 2));
1086
+ });
1087
+ dao
1088
+ .command("gov-stats-v2")
1089
+ .description("V2 governance aggregate stats")
1090
+ .action(() => {
1091
+ console.log(JSON.stringify(getDaoGovernanceGovStatsV2(), null, 2));
1092
+ });
938
1093
  }
939
-
@@ -619,7 +619,6 @@ export function registerDlpCommand(program) {
619
619
  registerDlpV2Command(dlp);
620
620
  }
621
621
 
622
-
623
622
  import {
624
623
  DLP_POLICY_MATURITY_V2,
625
624
  DLP_SCAN_LIFECYCLE_V2,
@@ -651,30 +650,176 @@ import {
651
650
  } from "../lib/dlp-engine.js";
652
651
 
653
652
  export function registerDlpV2Command(dlp) {
654
- dlp.command("enums-v2").description("Show V2 governance enums").action(() => { console.log(JSON.stringify({ DLP_POLICY_MATURITY_V2, DLP_SCAN_LIFECYCLE_V2 }, null, 2)); });
655
- dlp.command("register-policy-v2").description("Register a DLP policy profile (pending)")
656
- .requiredOption("--id <id>").requiredOption("--owner <owner>").option("--classification <c>")
657
- .action((o) => { console.log(JSON.stringify(registerDlpPolicyV2(o), null, 2)); });
658
- dlp.command("activate-policy-v2 <id>").description("Activate policy").action((id) => { console.log(JSON.stringify(activateDlpPolicyV2(id), null, 2)); });
659
- dlp.command("suspend-policy-v2 <id>").description("Suspend policy").action((id) => { console.log(JSON.stringify(suspendDlpPolicyV2(id), null, 2)); });
660
- dlp.command("retire-policy-v2 <id>").description("Retire policy (terminal)").action((id) => { console.log(JSON.stringify(retireDlpPolicyV2(id), null, 2)); });
661
- dlp.command("touch-policy-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchDlpPolicyV2(id), null, 2)); });
662
- dlp.command("get-policy-v2 <id>").description("Get policy").action((id) => { console.log(JSON.stringify(getDlpPolicyV2(id), null, 2)); });
663
- dlp.command("list-policies-v2").description("List policies").action(() => { console.log(JSON.stringify(listDlpPoliciesV2(), null, 2)); });
664
- dlp.command("create-scan-v2").description("Create a DLP scan (queued)")
665
- .requiredOption("--id <id>").requiredOption("--policy-id <policyId>").option("--target <target>")
666
- .action((o) => { console.log(JSON.stringify(createDlpScanV2({ id: o.id, policyId: o.policyId, target: o.target }), null, 2)); });
667
- dlp.command("start-scan-v2 <id>").description("Transition scan to scanning").action((id) => { console.log(JSON.stringify(startDlpScanV2(id), null, 2)); });
668
- dlp.command("complete-scan-v2 <id>").description("Transition scan to completed").action((id) => { console.log(JSON.stringify(completeDlpScanV2(id), null, 2)); });
669
- dlp.command("fail-scan-v2 <id>").description("Fail scan").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failDlpScanV2(id, o.reason), null, 2)); });
670
- dlp.command("cancel-scan-v2 <id>").description("Cancel scan").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelDlpScanV2(id, o.reason), null, 2)); });
671
- dlp.command("get-scan-v2 <id>").description("Get scan").action((id) => { console.log(JSON.stringify(getDlpScanV2(id), null, 2)); });
672
- dlp.command("list-scans-v2").description("List scans").action(() => { console.log(JSON.stringify(listDlpScansV2(), null, 2)); });
673
- dlp.command("set-max-active-policies-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveDlpPoliciesPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveDlpPoliciesPerOwner: getMaxActiveDlpPoliciesPerOwnerV2() }, null, 2)); });
674
- dlp.command("set-max-pending-scans-v2 <n>").description("Set per-policy pending cap").action((n) => { setMaxPendingDlpScansPerPolicyV2(Number(n)); console.log(JSON.stringify({ maxPendingDlpScansPerPolicy: getMaxPendingDlpScansPerPolicyV2() }, null, 2)); });
675
- dlp.command("set-policy-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setDlpPolicyIdleMsV2(Number(n)); console.log(JSON.stringify({ dlpPolicyIdleMs: getDlpPolicyIdleMsV2() }, null, 2)); });
676
- dlp.command("set-scan-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setDlpScanStuckMsV2(Number(n)); console.log(JSON.stringify({ dlpScanStuckMs: getDlpScanStuckMsV2() }, null, 2)); });
677
- dlp.command("auto-suspend-idle-policies-v2").description("Auto-suspend idle policies").action(() => { console.log(JSON.stringify(autoSuspendIdleDlpPoliciesV2(), null, 2)); });
678
- dlp.command("auto-fail-stuck-scans-v2").description("Auto-fail stuck scanning scans").action(() => { console.log(JSON.stringify(autoFailStuckDlpScansV2(), null, 2)); });
679
- dlp.command("gov-stats-v2").description("V2 governance aggregate stats").action(() => { console.log(JSON.stringify(getDlpEngineStatsV2(), null, 2)); });
653
+ dlp
654
+ .command("enums-v2")
655
+ .description("Show V2 governance enums")
656
+ .action(() => {
657
+ console.log(
658
+ JSON.stringify(
659
+ { DLP_POLICY_MATURITY_V2, DLP_SCAN_LIFECYCLE_V2 },
660
+ null,
661
+ 2,
662
+ ),
663
+ );
664
+ });
665
+ dlp
666
+ .command("register-policy-v2")
667
+ .description("Register a DLP policy profile (pending)")
668
+ .requiredOption("--id <id>")
669
+ .requiredOption("--owner <owner>")
670
+ .option("--classification <c>")
671
+ .action((o) => {
672
+ console.log(JSON.stringify(registerDlpPolicyV2(o), null, 2));
673
+ });
674
+ dlp
675
+ .command("activate-policy-v2 <id>")
676
+ .description("Activate policy")
677
+ .action((id) => {
678
+ console.log(JSON.stringify(activateDlpPolicyV2(id), null, 2));
679
+ });
680
+ dlp
681
+ .command("suspend-policy-v2 <id>")
682
+ .description("Suspend policy")
683
+ .action((id) => {
684
+ console.log(JSON.stringify(suspendDlpPolicyV2(id), null, 2));
685
+ });
686
+ dlp
687
+ .command("retire-policy-v2 <id>")
688
+ .description("Retire policy (terminal)")
689
+ .action((id) => {
690
+ console.log(JSON.stringify(retireDlpPolicyV2(id), null, 2));
691
+ });
692
+ dlp
693
+ .command("touch-policy-v2 <id>")
694
+ .description("Refresh lastTouchedAt")
695
+ .action((id) => {
696
+ console.log(JSON.stringify(touchDlpPolicyV2(id), null, 2));
697
+ });
698
+ dlp
699
+ .command("get-policy-v2 <id>")
700
+ .description("Get policy")
701
+ .action((id) => {
702
+ console.log(JSON.stringify(getDlpPolicyV2(id), null, 2));
703
+ });
704
+ dlp
705
+ .command("list-policies-v2")
706
+ .description("List policies")
707
+ .action(() => {
708
+ console.log(JSON.stringify(listDlpPoliciesV2(), null, 2));
709
+ });
710
+ dlp
711
+ .command("create-scan-v2")
712
+ .description("Create a DLP scan (queued)")
713
+ .requiredOption("--id <id>")
714
+ .requiredOption("--policy-id <policyId>")
715
+ .option("--target <target>")
716
+ .action((o) => {
717
+ console.log(
718
+ JSON.stringify(
719
+ createDlpScanV2({ id: o.id, policyId: o.policyId, target: o.target }),
720
+ null,
721
+ 2,
722
+ ),
723
+ );
724
+ });
725
+ dlp
726
+ .command("start-scan-v2 <id>")
727
+ .description("Transition scan to scanning")
728
+ .action((id) => {
729
+ console.log(JSON.stringify(startDlpScanV2(id), null, 2));
730
+ });
731
+ dlp
732
+ .command("complete-scan-v2 <id>")
733
+ .description("Transition scan to completed")
734
+ .action((id) => {
735
+ console.log(JSON.stringify(completeDlpScanV2(id), null, 2));
736
+ });
737
+ dlp
738
+ .command("fail-scan-v2 <id>")
739
+ .description("Fail scan")
740
+ .option("--reason <r>")
741
+ .action((id, o) => {
742
+ console.log(JSON.stringify(failDlpScanV2(id, o.reason), null, 2));
743
+ });
744
+ dlp
745
+ .command("cancel-scan-v2 <id>")
746
+ .description("Cancel scan")
747
+ .option("--reason <r>")
748
+ .action((id, o) => {
749
+ console.log(JSON.stringify(cancelDlpScanV2(id, o.reason), null, 2));
750
+ });
751
+ dlp
752
+ .command("get-scan-v2 <id>")
753
+ .description("Get scan")
754
+ .action((id) => {
755
+ console.log(JSON.stringify(getDlpScanV2(id), null, 2));
756
+ });
757
+ dlp
758
+ .command("list-scans-v2")
759
+ .description("List scans")
760
+ .action(() => {
761
+ console.log(JSON.stringify(listDlpScansV2(), null, 2));
762
+ });
763
+ dlp
764
+ .command("set-max-active-policies-v2 <n>")
765
+ .description("Set per-owner active cap")
766
+ .action((n) => {
767
+ setMaxActiveDlpPoliciesPerOwnerV2(Number(n));
768
+ console.log(
769
+ JSON.stringify(
770
+ { maxActiveDlpPoliciesPerOwner: getMaxActiveDlpPoliciesPerOwnerV2() },
771
+ null,
772
+ 2,
773
+ ),
774
+ );
775
+ });
776
+ dlp
777
+ .command("set-max-pending-scans-v2 <n>")
778
+ .description("Set per-policy pending cap")
779
+ .action((n) => {
780
+ setMaxPendingDlpScansPerPolicyV2(Number(n));
781
+ console.log(
782
+ JSON.stringify(
783
+ { maxPendingDlpScansPerPolicy: getMaxPendingDlpScansPerPolicyV2() },
784
+ null,
785
+ 2,
786
+ ),
787
+ );
788
+ });
789
+ dlp
790
+ .command("set-policy-idle-ms-v2 <n>")
791
+ .description("Set idle threshold")
792
+ .action((n) => {
793
+ setDlpPolicyIdleMsV2(Number(n));
794
+ console.log(
795
+ JSON.stringify({ dlpPolicyIdleMs: getDlpPolicyIdleMsV2() }, null, 2),
796
+ );
797
+ });
798
+ dlp
799
+ .command("set-scan-stuck-ms-v2 <n>")
800
+ .description("Set stuck threshold")
801
+ .action((n) => {
802
+ setDlpScanStuckMsV2(Number(n));
803
+ console.log(
804
+ JSON.stringify({ dlpScanStuckMs: getDlpScanStuckMsV2() }, null, 2),
805
+ );
806
+ });
807
+ dlp
808
+ .command("auto-suspend-idle-policies-v2")
809
+ .description("Auto-suspend idle policies")
810
+ .action(() => {
811
+ console.log(JSON.stringify(autoSuspendIdleDlpPoliciesV2(), null, 2));
812
+ });
813
+ dlp
814
+ .command("auto-fail-stuck-scans-v2")
815
+ .description("Auto-fail stuck scanning scans")
816
+ .action(() => {
817
+ console.log(JSON.stringify(autoFailStuckDlpScansV2(), null, 2));
818
+ });
819
+ dlp
820
+ .command("gov-stats-v2")
821
+ .description("V2 governance aggregate stats")
822
+ .action(() => {
823
+ console.log(JSON.stringify(getDlpEngineStatsV2(), null, 2));
824
+ });
680
825
  }