chainlesschain 0.145.0 → 0.156.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 (184) hide show
  1. package/README.md +52 -3
  2. package/package.json +1 -1
  3. package/src/commands/a2a.js +201 -0
  4. package/src/commands/activitypub.js +207 -0
  5. package/src/commands/agent-network.js +217 -0
  6. package/src/commands/agent.js +1250 -0
  7. package/src/commands/automation.js +201 -0
  8. package/src/commands/bi.js +203 -0
  9. package/src/commands/browse.js +213 -0
  10. package/src/commands/chat.js +605 -0
  11. package/src/commands/cli-anything.js +426 -0
  12. package/src/commands/codegen.js +207 -0
  13. package/src/commands/collab.js +211 -0
  14. package/src/commands/compliance.js +822 -0
  15. package/src/commands/config.js +213 -0
  16. package/src/commands/cowork.js +1666 -0
  17. package/src/commands/crosschain.js +203 -0
  18. package/src/commands/dao.js +203 -0
  19. package/src/commands/dbevo.js +227 -0
  20. package/src/commands/dev.js +207 -0
  21. package/src/commands/did-v2.js +217 -0
  22. package/src/commands/did.js +221 -0
  23. package/src/commands/dlp.js +213 -0
  24. package/src/commands/economy.js +199 -0
  25. package/src/commands/encrypt.js +201 -0
  26. package/src/commands/evolution.js +199 -0
  27. package/src/commands/evomap.js +830 -0
  28. package/src/commands/export.js +213 -0
  29. package/src/commands/federation.js +209 -0
  30. package/src/commands/fusion.js +205 -0
  31. package/src/commands/governance.js +209 -0
  32. package/src/commands/hmemory.js +203 -0
  33. package/src/commands/hook.js +209 -0
  34. package/src/commands/import.js +209 -0
  35. package/src/commands/inference.js +207 -0
  36. package/src/commands/infra.js +203 -0
  37. package/src/commands/instinct.js +209 -0
  38. package/src/commands/ipfs.js +207 -0
  39. package/src/commands/kg.js +195 -0
  40. package/src/commands/llm.js +426 -0
  41. package/src/commands/matrix.js +207 -0
  42. package/src/commands/mcp.js +217 -0
  43. package/src/commands/memory.js +412 -0
  44. package/src/commands/multimodal.js +203 -0
  45. package/src/commands/nlprog.js +225 -0
  46. package/src/commands/nostr.js +209 -0
  47. package/src/commands/note.js +205 -0
  48. package/src/commands/ops.js +219 -0
  49. package/src/commands/orchestrate.js +406 -0
  50. package/src/commands/org.js +209 -0
  51. package/src/commands/p2p.js +209 -0
  52. package/src/commands/perception.js +209 -0
  53. package/src/commands/permmem.js +203 -0
  54. package/src/commands/pipeline.js +199 -0
  55. package/src/commands/planmode.js +426 -0
  56. package/src/commands/plugin-ecosystem.js +209 -0
  57. package/src/commands/plugin.js +209 -0
  58. package/src/commands/pqc.js +213 -0
  59. package/src/commands/quantization.js +207 -0
  60. package/src/commands/rcache.js +205 -0
  61. package/src/commands/recommend.js +233 -0
  62. package/src/commands/runtime.js +205 -0
  63. package/src/commands/scim.js +209 -0
  64. package/src/commands/services.js +207 -0
  65. package/src/commands/session.js +209 -0
  66. package/src/commands/setup.js +205 -0
  67. package/src/commands/skill.js +414 -0
  68. package/src/commands/social.js +201 -0
  69. package/src/commands/sso.js +209 -0
  70. package/src/commands/start.js +209 -0
  71. package/src/commands/stream.js +213 -0
  72. package/src/commands/sync.js +209 -0
  73. package/src/commands/tech.js +209 -0
  74. package/src/commands/tenant.js +217 -0
  75. package/src/commands/tokens.js +209 -0
  76. package/src/commands/trust.js +217 -0
  77. package/src/commands/ui.js +225 -0
  78. package/src/commands/wallet.js +209 -0
  79. package/src/commands/workflow.js +412 -0
  80. package/src/index.js +252 -0
  81. package/src/lib/a2a-protocol.js +332 -0
  82. package/src/lib/activitypub-bridge.js +334 -0
  83. package/src/lib/agent-coordinator.js +334 -0
  84. package/src/lib/agent-economy.js +334 -0
  85. package/src/lib/agent-network.js +341 -0
  86. package/src/lib/agent-router.js +333 -0
  87. package/src/lib/aiops.js +346 -0
  88. package/src/lib/automation-engine.js +335 -0
  89. package/src/lib/autonomous-agent.js +332 -0
  90. package/src/lib/autonomous-developer.js +332 -0
  91. package/src/lib/bi-engine.js +333 -0
  92. package/src/lib/browser-automation.js +334 -0
  93. package/src/lib/chat-core.js +335 -0
  94. package/src/lib/cli-anything-bridge.js +341 -0
  95. package/src/lib/cli-context-engineering.js +351 -0
  96. package/src/lib/code-agent.js +339 -0
  97. package/src/lib/collaboration-governance.js +334 -0
  98. package/src/lib/community-governance.js +346 -0
  99. package/src/lib/compliance-manager.js +334 -0
  100. package/src/lib/content-recommendation.js +351 -0
  101. package/src/lib/cowork-adapter.js +336 -0
  102. package/src/lib/cowork-evomap-adapter.js +341 -0
  103. package/src/lib/cowork-mcp-tools.js +341 -0
  104. package/src/lib/cowork-observe-html.js +341 -0
  105. package/src/lib/cowork-observe.js +341 -0
  106. package/src/lib/cowork-share.js +338 -0
  107. package/src/lib/cowork-task-templates.js +342 -1
  108. package/src/lib/cowork-template-marketplace.js +340 -0
  109. package/src/lib/cross-chain.js +339 -0
  110. package/src/lib/crypto-manager.js +334 -0
  111. package/src/lib/dao-governance.js +339 -0
  112. package/src/lib/dbevo.js +351 -0
  113. package/src/lib/decentral-infra.js +330 -0
  114. package/src/lib/did-manager.js +341 -0
  115. package/src/lib/did-v2-manager.js +341 -0
  116. package/src/lib/dlp-engine.js +339 -0
  117. package/src/lib/downloader.js +334 -0
  118. package/src/lib/evolution-system.js +334 -0
  119. package/src/lib/evomap-client.js +342 -0
  120. package/src/lib/evomap-federation.js +338 -0
  121. package/src/lib/evomap-governance.js +334 -0
  122. package/src/lib/evomap-manager.js +330 -0
  123. package/src/lib/execution-backend.js +330 -0
  124. package/src/lib/federation-hardening.js +340 -0
  125. package/src/lib/hashline.js +338 -0
  126. package/src/lib/hierarchical-memory.js +334 -0
  127. package/src/lib/hook-manager.js +341 -0
  128. package/src/lib/inference-network.js +341 -0
  129. package/src/lib/instinct-manager.js +346 -0
  130. package/src/lib/interaction-adapter.js +330 -0
  131. package/src/lib/interactive-planner.js +354 -0
  132. package/src/lib/ipfs-storage.js +334 -0
  133. package/src/lib/knowledge-exporter.js +341 -0
  134. package/src/lib/knowledge-graph.js +331 -0
  135. package/src/lib/knowledge-importer.js +341 -0
  136. package/src/lib/llm-providers.js +346 -0
  137. package/src/lib/matrix-bridge.js +339 -0
  138. package/src/lib/mcp-registry.js +346 -0
  139. package/src/lib/memory-manager.js +336 -0
  140. package/src/lib/multimodal.js +330 -0
  141. package/src/lib/nl-programming.js +341 -0
  142. package/src/lib/nostr-bridge.js +336 -0
  143. package/src/lib/note-versioning.js +339 -0
  144. package/src/lib/org-manager.js +336 -0
  145. package/src/lib/p2p-manager.js +341 -0
  146. package/src/lib/perception.js +346 -0
  147. package/src/lib/permanent-memory.js +327 -0
  148. package/src/lib/pipeline-orchestrator.js +332 -0
  149. package/src/lib/plan-mode.js +336 -0
  150. package/src/lib/plugin-autodiscovery.js +334 -0
  151. package/src/lib/plugin-ecosystem.js +346 -0
  152. package/src/lib/pqc-manager.js +346 -0
  153. package/src/lib/process-manager.js +336 -0
  154. package/src/lib/protocol-fusion.js +338 -0
  155. package/src/lib/provider-options.js +346 -0
  156. package/src/lib/provider-stream.js +348 -0
  157. package/src/lib/quantization.js +337 -0
  158. package/src/lib/response-cache.js +333 -0
  159. package/src/lib/scim-manager.js +346 -0
  160. package/src/lib/service-manager.js +337 -0
  161. package/src/lib/session-core-singletons.js +341 -0
  162. package/src/lib/session-manager.js +334 -0
  163. package/src/lib/skill-loader.js +334 -0
  164. package/src/lib/skill-mcp.js +336 -0
  165. package/src/lib/social-manager.js +330 -0
  166. package/src/lib/sso-manager.js +340 -0
  167. package/src/lib/stix-parser.js +346 -0
  168. package/src/lib/sub-agent-context.js +343 -0
  169. package/src/lib/sub-agent-profiles.js +335 -0
  170. package/src/lib/sub-agent-registry.js +336 -0
  171. package/src/lib/sync-manager.js +336 -0
  172. package/src/lib/tech-learning-engine.js +341 -0
  173. package/src/lib/tenant-saas.js +341 -0
  174. package/src/lib/threat-intel.js +330 -0
  175. package/src/lib/todo-manager.js +336 -0
  176. package/src/lib/token-tracker.js +336 -0
  177. package/src/lib/trust-security.js +343 -0
  178. package/src/lib/ueba.js +340 -0
  179. package/src/lib/universal-runtime.js +330 -0
  180. package/src/lib/wallet-manager.js +336 -0
  181. package/src/lib/web-ui-server.js +348 -0
  182. package/src/lib/workflow-engine.js +330 -0
  183. package/src/lib/workflow-expr.js +346 -0
  184. package/src/lib/ws-chat-handler.js +337 -0
@@ -509,3 +509,212 @@ export function registerImportCommand(program) {
509
509
  .description("Auto-fail stuck V2 import jobs")
510
510
  .action(() => out(autoFailStuckImportJobsV2()));
511
511
  }
512
+
513
+ // === Iter22 V2 governance overlay ===
514
+ export function registerKimpgovV2Commands(program) {
515
+ const parent = program.commands.find((c) => c.name() === "import");
516
+ if (!parent) return;
517
+ const L = async () => await import("../lib/knowledge-importer.js");
518
+ parent
519
+ .command("kimpgov-enums-v2")
520
+ .description("Show V2 enums")
521
+ .action(async () => {
522
+ const m = await L();
523
+ console.log(
524
+ JSON.stringify(
525
+ {
526
+ profileMaturity: m.KIMPGOV_PROFILE_MATURITY_V2,
527
+ importLifecycle: m.KIMPGOV_IMPORT_LIFECYCLE_V2,
528
+ },
529
+ null,
530
+ 2,
531
+ ),
532
+ );
533
+ });
534
+ parent
535
+ .command("kimpgov-config-v2")
536
+ .description("Show V2 config")
537
+ .action(async () => {
538
+ const m = await L();
539
+ console.log(
540
+ JSON.stringify(
541
+ {
542
+ maxActive: m.getMaxActiveKimpgovProfilesPerOwnerV2(),
543
+ maxPending: m.getMaxPendingKimpgovImportsPerProfileV2(),
544
+ idleMs: m.getKimpgovProfileIdleMsV2(),
545
+ stuckMs: m.getKimpgovImportStuckMsV2(),
546
+ },
547
+ null,
548
+ 2,
549
+ ),
550
+ );
551
+ });
552
+ parent
553
+ .command("kimpgov-set-max-active-v2 <n>")
554
+ .description("Set max active")
555
+ .action(async (n) => {
556
+ (await L()).setMaxActiveKimpgovProfilesPerOwnerV2(Number(n));
557
+ console.log("ok");
558
+ });
559
+ parent
560
+ .command("kimpgov-set-max-pending-v2 <n>")
561
+ .description("Set max pending")
562
+ .action(async (n) => {
563
+ (await L()).setMaxPendingKimpgovImportsPerProfileV2(Number(n));
564
+ console.log("ok");
565
+ });
566
+ parent
567
+ .command("kimpgov-set-idle-ms-v2 <n>")
568
+ .description("Set idle threshold ms")
569
+ .action(async (n) => {
570
+ (await L()).setKimpgovProfileIdleMsV2(Number(n));
571
+ console.log("ok");
572
+ });
573
+ parent
574
+ .command("kimpgov-set-stuck-ms-v2 <n>")
575
+ .description("Set stuck threshold ms")
576
+ .action(async (n) => {
577
+ (await L()).setKimpgovImportStuckMsV2(Number(n));
578
+ console.log("ok");
579
+ });
580
+ parent
581
+ .command("kimpgov-register-v2 <id> <owner>")
582
+ .description("Register V2 profile")
583
+ .option("--format <v>", "format")
584
+ .action(async (id, owner, o) => {
585
+ const m = await L();
586
+ console.log(
587
+ JSON.stringify(
588
+ m.registerKimpgovProfileV2({ id, owner, format: o.format }),
589
+ null,
590
+ 2,
591
+ ),
592
+ );
593
+ });
594
+ parent
595
+ .command("kimpgov-activate-v2 <id>")
596
+ .description("Activate profile")
597
+ .action(async (id) => {
598
+ console.log(
599
+ JSON.stringify((await L()).activateKimpgovProfileV2(id), null, 2),
600
+ );
601
+ });
602
+ parent
603
+ .command("kimpgov-stale-v2 <id>")
604
+ .description("Stale profile")
605
+ .action(async (id) => {
606
+ console.log(
607
+ JSON.stringify((await L()).staleKimpgovProfileV2(id), null, 2),
608
+ );
609
+ });
610
+ parent
611
+ .command("kimpgov-archive-v2 <id>")
612
+ .description("Archive profile")
613
+ .action(async (id) => {
614
+ console.log(
615
+ JSON.stringify((await L()).archiveKimpgovProfileV2(id), null, 2),
616
+ );
617
+ });
618
+ parent
619
+ .command("kimpgov-touch-v2 <id>")
620
+ .description("Touch profile")
621
+ .action(async (id) => {
622
+ console.log(
623
+ JSON.stringify((await L()).touchKimpgovProfileV2(id), null, 2),
624
+ );
625
+ });
626
+ parent
627
+ .command("kimpgov-get-v2 <id>")
628
+ .description("Get profile")
629
+ .action(async (id) => {
630
+ console.log(JSON.stringify((await L()).getKimpgovProfileV2(id), null, 2));
631
+ });
632
+ parent
633
+ .command("kimpgov-list-v2")
634
+ .description("List profiles")
635
+ .action(async () => {
636
+ console.log(JSON.stringify((await L()).listKimpgovProfilesV2(), null, 2));
637
+ });
638
+ parent
639
+ .command("kimpgov-create-import-v2 <id> <profileId>")
640
+ .description("Create import")
641
+ .option("--source <v>", "source")
642
+ .action(async (id, profileId, o) => {
643
+ const m = await L();
644
+ console.log(
645
+ JSON.stringify(
646
+ m.createKimpgovImportV2({ id, profileId, source: o.source }),
647
+ null,
648
+ 2,
649
+ ),
650
+ );
651
+ });
652
+ parent
653
+ .command("kimpgov-importing-import-v2 <id>")
654
+ .description("Mark import as importing")
655
+ .action(async (id) => {
656
+ console.log(
657
+ JSON.stringify((await L()).importingKimpgovImportV2(id), null, 2),
658
+ );
659
+ });
660
+ parent
661
+ .command("kimpgov-complete-import-v2 <id>")
662
+ .description("Complete import")
663
+ .action(async (id) => {
664
+ console.log(
665
+ JSON.stringify((await L()).completeImportKimpgovV2(id), null, 2),
666
+ );
667
+ });
668
+ parent
669
+ .command("kimpgov-fail-import-v2 <id> [reason]")
670
+ .description("Fail import")
671
+ .action(async (id, reason) => {
672
+ console.log(
673
+ JSON.stringify((await L()).failKimpgovImportV2(id, reason), null, 2),
674
+ );
675
+ });
676
+ parent
677
+ .command("kimpgov-cancel-import-v2 <id> [reason]")
678
+ .description("Cancel import")
679
+ .action(async (id, reason) => {
680
+ console.log(
681
+ JSON.stringify((await L()).cancelKimpgovImportV2(id, reason), null, 2),
682
+ );
683
+ });
684
+ parent
685
+ .command("kimpgov-get-import-v2 <id>")
686
+ .description("Get import")
687
+ .action(async (id) => {
688
+ console.log(JSON.stringify((await L()).getKimpgovImportV2(id), null, 2));
689
+ });
690
+ parent
691
+ .command("kimpgov-list-imports-v2")
692
+ .description("List imports")
693
+ .action(async () => {
694
+ console.log(JSON.stringify((await L()).listKimpgovImportsV2(), null, 2));
695
+ });
696
+ parent
697
+ .command("kimpgov-auto-stale-idle-v2")
698
+ .description("Auto-stale idle")
699
+ .action(async () => {
700
+ console.log(
701
+ JSON.stringify((await L()).autoStaleIdleKimpgovProfilesV2(), null, 2),
702
+ );
703
+ });
704
+ parent
705
+ .command("kimpgov-auto-fail-stuck-v2")
706
+ .description("Auto-fail stuck imports")
707
+ .action(async () => {
708
+ console.log(
709
+ JSON.stringify((await L()).autoFailStuckKimpgovImportsV2(), null, 2),
710
+ );
711
+ });
712
+ parent
713
+ .command("kimpgov-gov-stats-v2")
714
+ .description("V2 gov stats")
715
+ .action(async () => {
716
+ console.log(
717
+ JSON.stringify((await L()).getKnowledgeImporterGovStatsV2(), null, 2),
718
+ );
719
+ });
720
+ }
@@ -798,3 +798,210 @@ function _registerInferenceGovV2(parent) {
798
798
  else console.log(s);
799
799
  });
800
800
  }
801
+
802
+ // === Iter28 V2 governance overlay: Infnetgov ===
803
+ export function registerInfnetV2Commands(program) {
804
+ const parent = program.commands.find((c) => c.name() === "inference");
805
+ if (!parent) return;
806
+ const L = async () => await import("../lib/inference-network.js");
807
+ parent
808
+ .command("infnetgov-enums-v2")
809
+ .description("Show V2 enums")
810
+ .action(async () => {
811
+ const m = await L();
812
+ console.log(
813
+ JSON.stringify(
814
+ {
815
+ profileMaturity: m.INFNETGOV_PROFILE_MATURITY_V2,
816
+ requestLifecycle: m.INFNETGOV_REQUEST_LIFECYCLE_V2,
817
+ },
818
+ null,
819
+ 2,
820
+ ),
821
+ );
822
+ });
823
+ parent
824
+ .command("infnetgov-config-v2")
825
+ .description("Show V2 config")
826
+ .action(async () => {
827
+ const m = await L();
828
+ console.log(
829
+ JSON.stringify(
830
+ {
831
+ maxActive: m.getMaxActiveInfnetProfilesPerOwnerV2(),
832
+ maxPending: m.getMaxPendingInfnetRequestsPerProfileV2(),
833
+ idleMs: m.getInfnetProfileIdleMsV2(),
834
+ stuckMs: m.getInfnetRequestStuckMsV2(),
835
+ },
836
+ null,
837
+ 2,
838
+ ),
839
+ );
840
+ });
841
+ parent
842
+ .command("infnetgov-set-max-active-v2 <n>")
843
+ .description("Set max active")
844
+ .action(async (n) => {
845
+ (await L()).setMaxActiveInfnetProfilesPerOwnerV2(Number(n));
846
+ console.log("ok");
847
+ });
848
+ parent
849
+ .command("infnetgov-set-max-pending-v2 <n>")
850
+ .description("Set max pending")
851
+ .action(async (n) => {
852
+ (await L()).setMaxPendingInfnetRequestsPerProfileV2(Number(n));
853
+ console.log("ok");
854
+ });
855
+ parent
856
+ .command("infnetgov-set-idle-ms-v2 <n>")
857
+ .description("Set idle threshold ms")
858
+ .action(async (n) => {
859
+ (await L()).setInfnetProfileIdleMsV2(Number(n));
860
+ console.log("ok");
861
+ });
862
+ parent
863
+ .command("infnetgov-set-stuck-ms-v2 <n>")
864
+ .description("Set stuck threshold ms")
865
+ .action(async (n) => {
866
+ (await L()).setInfnetRequestStuckMsV2(Number(n));
867
+ console.log("ok");
868
+ });
869
+ parent
870
+ .command("infnetgov-register-v2 <id> <owner>")
871
+ .description("Register V2 profile")
872
+ .option("--node <v>", "node")
873
+ .action(async (id, owner, o) => {
874
+ const m = await L();
875
+ console.log(
876
+ JSON.stringify(
877
+ m.registerInfnetProfileV2({ id, owner, node: o.node }),
878
+ null,
879
+ 2,
880
+ ),
881
+ );
882
+ });
883
+ parent
884
+ .command("infnetgov-activate-v2 <id>")
885
+ .description("Activate profile")
886
+ .action(async (id) => {
887
+ console.log(
888
+ JSON.stringify((await L()).activateInfnetProfileV2(id), null, 2),
889
+ );
890
+ });
891
+ parent
892
+ .command("infnetgov-stale-v2 <id>")
893
+ .description("Stale profile")
894
+ .action(async (id) => {
895
+ console.log(
896
+ JSON.stringify((await L()).staleInfnetProfileV2(id), null, 2),
897
+ );
898
+ });
899
+ parent
900
+ .command("infnetgov-archive-v2 <id>")
901
+ .description("Archive profile")
902
+ .action(async (id) => {
903
+ console.log(
904
+ JSON.stringify((await L()).archiveInfnetProfileV2(id), null, 2),
905
+ );
906
+ });
907
+ parent
908
+ .command("infnetgov-touch-v2 <id>")
909
+ .description("Touch profile")
910
+ .action(async (id) => {
911
+ console.log(
912
+ JSON.stringify((await L()).touchInfnetProfileV2(id), null, 2),
913
+ );
914
+ });
915
+ parent
916
+ .command("infnetgov-get-v2 <id>")
917
+ .description("Get profile")
918
+ .action(async (id) => {
919
+ console.log(JSON.stringify((await L()).getInfnetProfileV2(id), null, 2));
920
+ });
921
+ parent
922
+ .command("infnetgov-list-v2")
923
+ .description("List profiles")
924
+ .action(async () => {
925
+ console.log(JSON.stringify((await L()).listInfnetProfilesV2(), null, 2));
926
+ });
927
+ parent
928
+ .command("infnetgov-create-request-v2 <id> <profileId>")
929
+ .description("Create request")
930
+ .option("--requestId <v>", "requestId")
931
+ .action(async (id, profileId, o) => {
932
+ const m = await L();
933
+ console.log(
934
+ JSON.stringify(
935
+ m.createInfnetRequestV2({ id, profileId, requestId: o.requestId }),
936
+ null,
937
+ 2,
938
+ ),
939
+ );
940
+ });
941
+ parent
942
+ .command("infnetgov-inferring-request-v2 <id>")
943
+ .description("Mark request as inferring")
944
+ .action(async (id) => {
945
+ console.log(
946
+ JSON.stringify((await L()).inferringInfnetRequestV2(id), null, 2),
947
+ );
948
+ });
949
+ parent
950
+ .command("infnetgov-complete-request-v2 <id>")
951
+ .description("Complete request")
952
+ .action(async (id) => {
953
+ console.log(
954
+ JSON.stringify((await L()).completeRequestInfnetV2(id), null, 2),
955
+ );
956
+ });
957
+ parent
958
+ .command("infnetgov-fail-request-v2 <id> [reason]")
959
+ .description("Fail request")
960
+ .action(async (id, reason) => {
961
+ console.log(
962
+ JSON.stringify((await L()).failInfnetRequestV2(id, reason), null, 2),
963
+ );
964
+ });
965
+ parent
966
+ .command("infnetgov-cancel-request-v2 <id> [reason]")
967
+ .description("Cancel request")
968
+ .action(async (id, reason) => {
969
+ console.log(
970
+ JSON.stringify((await L()).cancelInfnetRequestV2(id, reason), null, 2),
971
+ );
972
+ });
973
+ parent
974
+ .command("infnetgov-get-request-v2 <id>")
975
+ .description("Get request")
976
+ .action(async (id) => {
977
+ console.log(JSON.stringify((await L()).getInfnetRequestV2(id), null, 2));
978
+ });
979
+ parent
980
+ .command("infnetgov-list-requests-v2")
981
+ .description("List requests")
982
+ .action(async () => {
983
+ console.log(JSON.stringify((await L()).listInfnetRequestsV2(), null, 2));
984
+ });
985
+ parent
986
+ .command("infnetgov-auto-stale-idle-v2")
987
+ .description("Auto-stale idle")
988
+ .action(async () => {
989
+ console.log(
990
+ JSON.stringify((await L()).autoStaleIdleInfnetProfilesV2(), null, 2),
991
+ );
992
+ });
993
+ parent
994
+ .command("infnetgov-auto-fail-stuck-v2")
995
+ .description("Auto-fail stuck requests")
996
+ .action(async () => {
997
+ console.log(
998
+ JSON.stringify((await L()).autoFailStuckInfnetRequestsV2(), null, 2),
999
+ );
1000
+ });
1001
+ parent
1002
+ .command("infnetgov-gov-stats-v2")
1003
+ .description("V2 gov stats")
1004
+ .action(async () => {
1005
+ console.log(JSON.stringify((await L()).getInfnetgovStatsV2(), null, 2));
1006
+ });
1007
+ }
@@ -603,3 +603,206 @@ export function registerInfraCommand(program) {
603
603
 
604
604
  program.addCommand(inf);
605
605
  }
606
+
607
+ // === Iter23 V2 governance overlay ===
608
+ export function registerDigovV2Commands(program) {
609
+ const parent = program.commands.find((c) => c.name() === "infra");
610
+ if (!parent) return;
611
+ const L = async () => await import("../lib/decentral-infra.js");
612
+ parent
613
+ .command("digov-enums-v2")
614
+ .description("Show V2 enums")
615
+ .action(async () => {
616
+ const m = await L();
617
+ console.log(
618
+ JSON.stringify(
619
+ {
620
+ profileMaturity: m.DIGOV_PROFILE_MATURITY_V2,
621
+ dealLifecycle: m.DIGOV_DEAL_LIFECYCLE_V2,
622
+ },
623
+ null,
624
+ 2,
625
+ ),
626
+ );
627
+ });
628
+ parent
629
+ .command("digov-config-v2")
630
+ .description("Show V2 config")
631
+ .action(async () => {
632
+ const m = await L();
633
+ console.log(
634
+ JSON.stringify(
635
+ {
636
+ maxActive: m.getMaxActiveDigovProfilesPerOwnerV2(),
637
+ maxPending: m.getMaxPendingDigovDealsPerProfileV2(),
638
+ idleMs: m.getDigovProfileIdleMsV2(),
639
+ stuckMs: m.getDigovDealStuckMsV2(),
640
+ },
641
+ null,
642
+ 2,
643
+ ),
644
+ );
645
+ });
646
+ parent
647
+ .command("digov-set-max-active-v2 <n>")
648
+ .description("Set max active")
649
+ .action(async (n) => {
650
+ (await L()).setMaxActiveDigovProfilesPerOwnerV2(Number(n));
651
+ console.log("ok");
652
+ });
653
+ parent
654
+ .command("digov-set-max-pending-v2 <n>")
655
+ .description("Set max pending")
656
+ .action(async (n) => {
657
+ (await L()).setMaxPendingDigovDealsPerProfileV2(Number(n));
658
+ console.log("ok");
659
+ });
660
+ parent
661
+ .command("digov-set-idle-ms-v2 <n>")
662
+ .description("Set idle threshold ms")
663
+ .action(async (n) => {
664
+ (await L()).setDigovProfileIdleMsV2(Number(n));
665
+ console.log("ok");
666
+ });
667
+ parent
668
+ .command("digov-set-stuck-ms-v2 <n>")
669
+ .description("Set stuck threshold ms")
670
+ .action(async (n) => {
671
+ (await L()).setDigovDealStuckMsV2(Number(n));
672
+ console.log("ok");
673
+ });
674
+ parent
675
+ .command("digov-register-v2 <id> <owner>")
676
+ .description("Register V2 profile")
677
+ .option("--region <v>", "region")
678
+ .action(async (id, owner, o) => {
679
+ const m = await L();
680
+ console.log(
681
+ JSON.stringify(
682
+ m.registerDigovProfileV2({ id, owner, region: o.region }),
683
+ null,
684
+ 2,
685
+ ),
686
+ );
687
+ });
688
+ parent
689
+ .command("digov-activate-v2 <id>")
690
+ .description("Activate profile")
691
+ .action(async (id) => {
692
+ console.log(
693
+ JSON.stringify((await L()).activateDigovProfileV2(id), null, 2),
694
+ );
695
+ });
696
+ parent
697
+ .command("digov-stale-v2 <id>")
698
+ .description("Stale profile")
699
+ .action(async (id) => {
700
+ console.log(JSON.stringify((await L()).staleDigovProfileV2(id), null, 2));
701
+ });
702
+ parent
703
+ .command("digov-archive-v2 <id>")
704
+ .description("Archive profile")
705
+ .action(async (id) => {
706
+ console.log(
707
+ JSON.stringify((await L()).archiveDigovProfileV2(id), null, 2),
708
+ );
709
+ });
710
+ parent
711
+ .command("digov-touch-v2 <id>")
712
+ .description("Touch profile")
713
+ .action(async (id) => {
714
+ console.log(JSON.stringify((await L()).touchDigovProfileV2(id), null, 2));
715
+ });
716
+ parent
717
+ .command("digov-get-v2 <id>")
718
+ .description("Get profile")
719
+ .action(async (id) => {
720
+ console.log(JSON.stringify((await L()).getDigovProfileV2(id), null, 2));
721
+ });
722
+ parent
723
+ .command("digov-list-v2")
724
+ .description("List profiles")
725
+ .action(async () => {
726
+ console.log(JSON.stringify((await L()).listDigovProfilesV2(), null, 2));
727
+ });
728
+ parent
729
+ .command("digov-create-deal-v2 <id> <profileId>")
730
+ .description("Create deal")
731
+ .option("--provider <v>", "provider")
732
+ .action(async (id, profileId, o) => {
733
+ const m = await L();
734
+ console.log(
735
+ JSON.stringify(
736
+ m.createDigovDealV2({ id, profileId, provider: o.provider }),
737
+ null,
738
+ 2,
739
+ ),
740
+ );
741
+ });
742
+ parent
743
+ .command("digov-negotiating-deal-v2 <id>")
744
+ .description("Mark deal as negotiating")
745
+ .action(async (id) => {
746
+ console.log(
747
+ JSON.stringify((await L()).negotiatingDigovDealV2(id), null, 2),
748
+ );
749
+ });
750
+ parent
751
+ .command("digov-complete-deal-v2 <id>")
752
+ .description("Complete deal")
753
+ .action(async (id) => {
754
+ console.log(JSON.stringify((await L()).completeDealDigovV2(id), null, 2));
755
+ });
756
+ parent
757
+ .command("digov-fail-deal-v2 <id> [reason]")
758
+ .description("Fail deal")
759
+ .action(async (id, reason) => {
760
+ console.log(
761
+ JSON.stringify((await L()).failDigovDealV2(id, reason), null, 2),
762
+ );
763
+ });
764
+ parent
765
+ .command("digov-cancel-deal-v2 <id> [reason]")
766
+ .description("Cancel deal")
767
+ .action(async (id, reason) => {
768
+ console.log(
769
+ JSON.stringify((await L()).cancelDigovDealV2(id, reason), null, 2),
770
+ );
771
+ });
772
+ parent
773
+ .command("digov-get-deal-v2 <id>")
774
+ .description("Get deal")
775
+ .action(async (id) => {
776
+ console.log(JSON.stringify((await L()).getDigovDealV2(id), null, 2));
777
+ });
778
+ parent
779
+ .command("digov-list-deals-v2")
780
+ .description("List deals")
781
+ .action(async () => {
782
+ console.log(JSON.stringify((await L()).listDigovDealsV2(), null, 2));
783
+ });
784
+ parent
785
+ .command("digov-auto-stale-idle-v2")
786
+ .description("Auto-stale idle")
787
+ .action(async () => {
788
+ console.log(
789
+ JSON.stringify((await L()).autoStaleIdleDigovProfilesV2(), null, 2),
790
+ );
791
+ });
792
+ parent
793
+ .command("digov-auto-fail-stuck-v2")
794
+ .description("Auto-fail stuck deals")
795
+ .action(async () => {
796
+ console.log(
797
+ JSON.stringify((await L()).autoFailStuckDigovDealsV2(), null, 2),
798
+ );
799
+ });
800
+ parent
801
+ .command("digov-gov-stats-v2")
802
+ .description("V2 gov stats")
803
+ .action(async () => {
804
+ console.log(
805
+ JSON.stringify((await L()).getDecentralInfraGovStatsV2(), null, 2),
806
+ );
807
+ });
808
+ }