chainlesschain 0.143.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 (227) hide show
  1. package/package.json +1 -1
  2. package/src/commands/a2a.js +196 -28
  3. package/src/commands/activitypub.js +364 -27
  4. package/src/commands/agent-network.js +217 -0
  5. package/src/commands/agent.js +587 -103
  6. package/src/commands/audit.js +206 -0
  7. package/src/commands/automation.js +201 -0
  8. package/src/commands/bi.js +355 -27
  9. package/src/commands/bm25.js +111 -27
  10. package/src/commands/browse.js +403 -29
  11. package/src/commands/ccron.js +128 -28
  12. package/src/commands/chat.js +207 -0
  13. package/src/commands/codegen.js +207 -0
  14. package/src/commands/collab.js +211 -0
  15. package/src/commands/compliance.js +824 -34
  16. package/src/commands/compt.js +127 -29
  17. package/src/commands/consol.js +8 -2
  18. package/src/commands/cowork.js +783 -34
  19. package/src/commands/crosschain.js +182 -28
  20. package/src/commands/dao.js +182 -28
  21. package/src/commands/dbevo.js +227 -0
  22. package/src/commands/dev.js +207 -0
  23. package/src/commands/did-v2.js +217 -0
  24. package/src/commands/did.js +221 -0
  25. package/src/commands/dlp.js +385 -27
  26. package/src/commands/economy.js +205 -50
  27. package/src/commands/evolution.js +203 -50
  28. package/src/commands/evomap.js +387 -27
  29. package/src/commands/export.js +213 -0
  30. package/src/commands/federation.js +209 -0
  31. package/src/commands/fflag.js +74 -22
  32. package/src/commands/fusion.js +205 -0
  33. package/src/commands/git.js +177 -37
  34. package/src/commands/governance.js +209 -0
  35. package/src/commands/hardening.js +209 -0
  36. package/src/commands/hmemory.js +204 -50
  37. package/src/commands/hook.js +209 -0
  38. package/src/commands/import.js +209 -0
  39. package/src/commands/incentive.js +209 -0
  40. package/src/commands/inference.js +170 -34
  41. package/src/commands/infra.js +203 -0
  42. package/src/commands/instinct.js +209 -0
  43. package/src/commands/ipfs.js +207 -0
  44. package/src/commands/itbudget.js +149 -33
  45. package/src/commands/kg.js +206 -0
  46. package/src/commands/llm.js +217 -0
  47. package/src/commands/lowcode.js +195 -38
  48. package/src/commands/marketplace.js +206 -0
  49. package/src/commands/matrix.js +386 -27
  50. package/src/commands/mcp.js +217 -0
  51. package/src/commands/mcpscaf.js +145 -33
  52. package/src/commands/meminj.js +145 -33
  53. package/src/commands/memory.js +209 -0
  54. package/src/commands/multimodal.js +203 -0
  55. package/src/commands/nlprog.js +225 -0
  56. package/src/commands/nostr.js +387 -27
  57. package/src/commands/note.js +205 -0
  58. package/src/commands/ops.js +219 -0
  59. package/src/commands/orchestrate.js +217 -0
  60. package/src/commands/orchgov.js +144 -33
  61. package/src/commands/org.js +209 -0
  62. package/src/commands/p2p.js +209 -0
  63. package/src/commands/pdfp.js +109 -27
  64. package/src/commands/perception.js +209 -0
  65. package/src/commands/perf.js +169 -32
  66. package/src/commands/perm.js +144 -33
  67. package/src/commands/permmem.js +203 -0
  68. package/src/commands/pipeline.js +207 -52
  69. package/src/commands/planmode.js +141 -32
  70. package/src/commands/plugin-ecosystem.js +209 -0
  71. package/src/commands/pqc.js +213 -0
  72. package/src/commands/privacy.js +203 -0
  73. package/src/commands/promcomp.js +111 -27
  74. package/src/commands/quantization.js +207 -0
  75. package/src/commands/rcache.js +205 -0
  76. package/src/commands/recommend.js +410 -34
  77. package/src/commands/reputation.js +208 -0
  78. package/src/commands/runtime.js +205 -0
  79. package/src/commands/sandbox.js +206 -0
  80. package/src/commands/scim.js +209 -0
  81. package/src/commands/seshhook.js +145 -33
  82. package/src/commands/seshsearch.js +141 -33
  83. package/src/commands/seshtail.js +144 -33
  84. package/src/commands/seshu.js +152 -33
  85. package/src/commands/session.js +209 -0
  86. package/src/commands/sganal.js +123 -29
  87. package/src/commands/siem.js +201 -34
  88. package/src/commands/skill.js +207 -0
  89. package/src/commands/sla.js +212 -0
  90. package/src/commands/slotfill.js +146 -33
  91. package/src/commands/social.js +358 -32
  92. package/src/commands/sso.js +209 -0
  93. package/src/commands/stress.js +206 -0
  94. package/src/commands/svccont.js +145 -33
  95. package/src/commands/sync.js +209 -0
  96. package/src/commands/tech.js +209 -0
  97. package/src/commands/tenant.js +217 -0
  98. package/src/commands/terraform.js +206 -0
  99. package/src/commands/tms.js +171 -33
  100. package/src/commands/tokens.js +209 -0
  101. package/src/commands/topiccls.js +146 -33
  102. package/src/commands/trust.js +217 -0
  103. package/src/commands/uprof.js +141 -32
  104. package/src/commands/vcheck.js +122 -28
  105. package/src/commands/wallet.js +209 -0
  106. package/src/commands/webfetch.js +141 -32
  107. package/src/commands/workflow.js +203 -0
  108. package/src/commands/zkp.js +184 -28
  109. package/src/index.js +180 -0
  110. package/src/lib/a2a-protocol.js +319 -51
  111. package/src/lib/activitypub-bridge.js +622 -50
  112. package/src/lib/agent-economy.js +304 -51
  113. package/src/lib/agent-network.js +341 -0
  114. package/src/lib/aiops.js +346 -0
  115. package/src/lib/app-builder.js +279 -46
  116. package/src/lib/audit-logger.js +321 -0
  117. package/src/lib/automation-engine.js +335 -0
  118. package/src/lib/autonomous-agent.js +284 -48
  119. package/src/lib/autonomous-developer.js +332 -0
  120. package/src/lib/bi-engine.js +616 -49
  121. package/src/lib/bm25-search.js +301 -49
  122. package/src/lib/browser-automation.js +630 -49
  123. package/src/lib/chat-core.js +336 -0
  124. package/src/lib/claude-code-bridge.js +341 -0
  125. package/src/lib/code-agent.js +339 -0
  126. package/src/lib/collaboration-governance.js +334 -0
  127. package/src/lib/community-governance.js +346 -0
  128. package/src/lib/compliance-framework-reporter.js +305 -51
  129. package/src/lib/compliance-manager.js +330 -0
  130. package/src/lib/compression-telemetry.js +301 -49
  131. package/src/lib/content-recommendation.js +351 -0
  132. package/src/lib/content-recommender.js +317 -52
  133. package/src/lib/cowork-cron.js +298 -49
  134. package/src/lib/cowork-learning.js +333 -0
  135. package/src/lib/cowork-share.js +338 -0
  136. package/src/lib/cowork-task-runner.js +308 -51
  137. package/src/lib/cowork-workflow.js +327 -0
  138. package/src/lib/cross-chain.js +311 -51
  139. package/src/lib/dao-governance.js +280 -46
  140. package/src/lib/dbevo.js +351 -0
  141. package/src/lib/decentral-infra.js +330 -0
  142. package/src/lib/did-manager.js +341 -0
  143. package/src/lib/did-v2-manager.js +341 -0
  144. package/src/lib/dlp-engine.js +626 -49
  145. package/src/lib/evolution-system.js +278 -47
  146. package/src/lib/evomap-governance.js +334 -0
  147. package/src/lib/evomap-manager.js +280 -46
  148. package/src/lib/execution-backend.js +294 -48
  149. package/src/lib/feature-flags.js +294 -49
  150. package/src/lib/federation-hardening.js +340 -0
  151. package/src/lib/git-integration.js +285 -47
  152. package/src/lib/hardening-manager.js +341 -0
  153. package/src/lib/hierarchical-memory.js +284 -48
  154. package/src/lib/hook-manager.js +341 -0
  155. package/src/lib/inference-network.js +308 -51
  156. package/src/lib/instinct-manager.js +346 -0
  157. package/src/lib/ipfs-storage.js +334 -0
  158. package/src/lib/iteration-budget.js +302 -50
  159. package/src/lib/knowledge-exporter.js +341 -0
  160. package/src/lib/knowledge-graph.js +333 -0
  161. package/src/lib/knowledge-importer.js +341 -0
  162. package/src/lib/llm-providers.js +346 -0
  163. package/src/lib/matrix-bridge.js +620 -47
  164. package/src/lib/mcp-registry.js +346 -0
  165. package/src/lib/mcp-scaffold.js +318 -54
  166. package/src/lib/memory-injection.js +288 -49
  167. package/src/lib/memory-manager.js +336 -0
  168. package/src/lib/multimodal.js +330 -0
  169. package/src/lib/nl-programming.js +341 -0
  170. package/src/lib/nostr-bridge.js +622 -49
  171. package/src/lib/note-versioning.js +339 -0
  172. package/src/lib/orchestrator.js +293 -48
  173. package/src/lib/org-manager.js +336 -0
  174. package/src/lib/p2p-manager.js +341 -0
  175. package/src/lib/pdf-parser.js +298 -49
  176. package/src/lib/perception.js +346 -0
  177. package/src/lib/perf-tuning.js +309 -50
  178. package/src/lib/permanent-memory.js +327 -0
  179. package/src/lib/permission-engine.js +287 -49
  180. package/src/lib/pipeline-orchestrator.js +289 -49
  181. package/src/lib/plan-mode.js +298 -51
  182. package/src/lib/plugin-ecosystem.js +346 -0
  183. package/src/lib/pqc-manager.js +346 -0
  184. package/src/lib/privacy-computing.js +335 -0
  185. package/src/lib/protocol-fusion.js +338 -0
  186. package/src/lib/quantization.js +337 -0
  187. package/src/lib/reputation-optimizer.js +340 -0
  188. package/src/lib/response-cache.js +333 -0
  189. package/src/lib/sandbox-v2.js +327 -0
  190. package/src/lib/scim-manager.js +346 -0
  191. package/src/lib/service-container.js +313 -52
  192. package/src/lib/session-consolidator.js +296 -49
  193. package/src/lib/session-hooks.js +312 -53
  194. package/src/lib/session-manager.js +334 -0
  195. package/src/lib/session-search.js +304 -51
  196. package/src/lib/session-tail.js +288 -49
  197. package/src/lib/session-usage.js +298 -52
  198. package/src/lib/siem-exporter.js +298 -51
  199. package/src/lib/skill-loader.js +334 -0
  200. package/src/lib/skill-marketplace.js +345 -0
  201. package/src/lib/sla-manager.js +341 -0
  202. package/src/lib/slot-filler.js +303 -51
  203. package/src/lib/social-graph-analytics.js +295 -49
  204. package/src/lib/social-graph.js +272 -49
  205. package/src/lib/social-manager.js +330 -0
  206. package/src/lib/sso-manager.js +340 -0
  207. package/src/lib/stress-tester.js +342 -0
  208. package/src/lib/sub-agent-registry.js +302 -53
  209. package/src/lib/sync-manager.js +336 -0
  210. package/src/lib/task-model-selector.js +302 -50
  211. package/src/lib/tech-learning-engine.js +341 -0
  212. package/src/lib/tenant-saas.js +341 -0
  213. package/src/lib/terraform-manager.js +333 -0
  214. package/src/lib/threat-intel.js +330 -0
  215. package/src/lib/todo-manager.js +281 -47
  216. package/src/lib/token-incentive.js +341 -0
  217. package/src/lib/token-tracker.js +336 -0
  218. package/src/lib/topic-classifier.js +297 -49
  219. package/src/lib/trust-security.js +343 -0
  220. package/src/lib/ueba.js +340 -0
  221. package/src/lib/universal-runtime.js +330 -0
  222. package/src/lib/user-profile.js +294 -50
  223. package/src/lib/version-checker.js +304 -50
  224. package/src/lib/wallet-manager.js +336 -0
  225. package/src/lib/web-fetch.js +292 -51
  226. package/src/lib/workflow-engine.js +330 -0
  227. 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
-
@@ -670,3 +670,230 @@ export function registerDbEvoCommand(program) {
670
670
 
671
671
  program.addCommand(dbevo);
672
672
  }
673
+
674
+ // === Iter23 V2 governance overlay ===
675
+ export function registerDbevogovV2Commands(program) {
676
+ const parent = program.commands.find((c) => c.name() === "dbevo");
677
+ if (!parent) return;
678
+ const L = async () => await import("../lib/dbevo.js");
679
+ parent
680
+ .command("dbevogov-enums-v2")
681
+ .description("Show V2 enums")
682
+ .action(async () => {
683
+ const m = await L();
684
+ console.log(
685
+ JSON.stringify(
686
+ {
687
+ profileMaturity: m.DBEVOGOV_PROFILE_MATURITY_V2,
688
+ migrationLifecycle: m.DBEVOGOV_MIGRATION_LIFECYCLE_V2,
689
+ },
690
+ null,
691
+ 2,
692
+ ),
693
+ );
694
+ });
695
+ parent
696
+ .command("dbevogov-config-v2")
697
+ .description("Show V2 config")
698
+ .action(async () => {
699
+ const m = await L();
700
+ console.log(
701
+ JSON.stringify(
702
+ {
703
+ maxActive: m.getMaxActiveDbevogovProfilesPerOwnerV2(),
704
+ maxPending: m.getMaxPendingDbevogovMigrationsPerProfileV2(),
705
+ idleMs: m.getDbevogovProfileIdleMsV2(),
706
+ stuckMs: m.getDbevogovMigrationStuckMsV2(),
707
+ },
708
+ null,
709
+ 2,
710
+ ),
711
+ );
712
+ });
713
+ parent
714
+ .command("dbevogov-set-max-active-v2 <n>")
715
+ .description("Set max active")
716
+ .action(async (n) => {
717
+ (await L()).setMaxActiveDbevogovProfilesPerOwnerV2(Number(n));
718
+ console.log("ok");
719
+ });
720
+ parent
721
+ .command("dbevogov-set-max-pending-v2 <n>")
722
+ .description("Set max pending")
723
+ .action(async (n) => {
724
+ (await L()).setMaxPendingDbevogovMigrationsPerProfileV2(Number(n));
725
+ console.log("ok");
726
+ });
727
+ parent
728
+ .command("dbevogov-set-idle-ms-v2 <n>")
729
+ .description("Set idle threshold ms")
730
+ .action(async (n) => {
731
+ (await L()).setDbevogovProfileIdleMsV2(Number(n));
732
+ console.log("ok");
733
+ });
734
+ parent
735
+ .command("dbevogov-set-stuck-ms-v2 <n>")
736
+ .description("Set stuck threshold ms")
737
+ .action(async (n) => {
738
+ (await L()).setDbevogovMigrationStuckMsV2(Number(n));
739
+ console.log("ok");
740
+ });
741
+ parent
742
+ .command("dbevogov-register-v2 <id> <owner>")
743
+ .description("Register V2 profile")
744
+ .option("--schema <v>", "schema")
745
+ .action(async (id, owner, o) => {
746
+ const m = await L();
747
+ console.log(
748
+ JSON.stringify(
749
+ m.registerDbevogovProfileV2({ id, owner, schema: o.schema }),
750
+ null,
751
+ 2,
752
+ ),
753
+ );
754
+ });
755
+ parent
756
+ .command("dbevogov-activate-v2 <id>")
757
+ .description("Activate profile")
758
+ .action(async (id) => {
759
+ console.log(
760
+ JSON.stringify((await L()).activateDbevogovProfileV2(id), null, 2),
761
+ );
762
+ });
763
+ parent
764
+ .command("dbevogov-pause-v2 <id>")
765
+ .description("Pause profile")
766
+ .action(async (id) => {
767
+ console.log(
768
+ JSON.stringify((await L()).pauseDbevogovProfileV2(id), null, 2),
769
+ );
770
+ });
771
+ parent
772
+ .command("dbevogov-archive-v2 <id>")
773
+ .description("Archive profile")
774
+ .action(async (id) => {
775
+ console.log(
776
+ JSON.stringify((await L()).archiveDbevogovProfileV2(id), null, 2),
777
+ );
778
+ });
779
+ parent
780
+ .command("dbevogov-touch-v2 <id>")
781
+ .description("Touch profile")
782
+ .action(async (id) => {
783
+ console.log(
784
+ JSON.stringify((await L()).touchDbevogovProfileV2(id), null, 2),
785
+ );
786
+ });
787
+ parent
788
+ .command("dbevogov-get-v2 <id>")
789
+ .description("Get profile")
790
+ .action(async (id) => {
791
+ console.log(
792
+ JSON.stringify((await L()).getDbevogovProfileV2(id), null, 2),
793
+ );
794
+ });
795
+ parent
796
+ .command("dbevogov-list-v2")
797
+ .description("List profiles")
798
+ .action(async () => {
799
+ console.log(
800
+ JSON.stringify((await L()).listDbevogovProfilesV2(), null, 2),
801
+ );
802
+ });
803
+ parent
804
+ .command("dbevogov-create-migration-v2 <id> <profileId>")
805
+ .description("Create migration")
806
+ .option("--version <v>", "version")
807
+ .action(async (id, profileId, o) => {
808
+ const m = await L();
809
+ console.log(
810
+ JSON.stringify(
811
+ m.createDbevogovMigrationV2({ id, profileId, version: o.version }),
812
+ null,
813
+ 2,
814
+ ),
815
+ );
816
+ });
817
+ parent
818
+ .command("dbevogov-applying-migration-v2 <id>")
819
+ .description("Mark migration as applying")
820
+ .action(async (id) => {
821
+ console.log(
822
+ JSON.stringify((await L()).applyingDbevogovMigrationV2(id), null, 2),
823
+ );
824
+ });
825
+ parent
826
+ .command("dbevogov-complete-migration-v2 <id>")
827
+ .description("Complete migration")
828
+ .action(async (id) => {
829
+ console.log(
830
+ JSON.stringify((await L()).completeMigrationDbevogovV2(id), null, 2),
831
+ );
832
+ });
833
+ parent
834
+ .command("dbevogov-fail-migration-v2 <id> [reason]")
835
+ .description("Fail migration")
836
+ .action(async (id, reason) => {
837
+ console.log(
838
+ JSON.stringify(
839
+ (await L()).failDbevogovMigrationV2(id, reason),
840
+ null,
841
+ 2,
842
+ ),
843
+ );
844
+ });
845
+ parent
846
+ .command("dbevogov-cancel-migration-v2 <id> [reason]")
847
+ .description("Cancel migration")
848
+ .action(async (id, reason) => {
849
+ console.log(
850
+ JSON.stringify(
851
+ (await L()).cancelDbevogovMigrationV2(id, reason),
852
+ null,
853
+ 2,
854
+ ),
855
+ );
856
+ });
857
+ parent
858
+ .command("dbevogov-get-migration-v2 <id>")
859
+ .description("Get migration")
860
+ .action(async (id) => {
861
+ console.log(
862
+ JSON.stringify((await L()).getDbevogovMigrationV2(id), null, 2),
863
+ );
864
+ });
865
+ parent
866
+ .command("dbevogov-list-migrations-v2")
867
+ .description("List migrations")
868
+ .action(async () => {
869
+ console.log(
870
+ JSON.stringify((await L()).listDbevogovMigrationsV2(), null, 2),
871
+ );
872
+ });
873
+ parent
874
+ .command("dbevogov-auto-pause-idle-v2")
875
+ .description("Auto-pause idle")
876
+ .action(async () => {
877
+ console.log(
878
+ JSON.stringify((await L()).autoPauseIdleDbevogovProfilesV2(), null, 2),
879
+ );
880
+ });
881
+ parent
882
+ .command("dbevogov-auto-fail-stuck-v2")
883
+ .description("Auto-fail stuck migrations")
884
+ .action(async () => {
885
+ console.log(
886
+ JSON.stringify(
887
+ (await L()).autoFailStuckDbevogovMigrationsV2(),
888
+ null,
889
+ 2,
890
+ ),
891
+ );
892
+ });
893
+ parent
894
+ .command("dbevogov-gov-stats-v2")
895
+ .description("V2 gov stats")
896
+ .action(async () => {
897
+ console.log(JSON.stringify((await L()).getDbevoGovStatsV2(), null, 2));
898
+ });
899
+ }