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
@@ -788,3 +788,212 @@ export function registerPluginEcosystemCommand(program) {
788
788
  program.addCommand(eco);
789
789
  return eco;
790
790
  }
791
+
792
+ // === Iter24 V2 governance overlay ===
793
+ export function registerEcogovV2Commands(program) {
794
+ const parent = program.commands.find((c) => c.name() === "ecosystem");
795
+ if (!parent) return;
796
+ const L = async () => await import("../lib/plugin-ecosystem.js");
797
+ parent
798
+ .command("ecogov-enums-v2")
799
+ .description("Show V2 enums")
800
+ .action(async () => {
801
+ const m = await L();
802
+ console.log(
803
+ JSON.stringify(
804
+ {
805
+ profileMaturity: m.ECOGOV_PROFILE_MATURITY_V2,
806
+ installLifecycle: m.ECOGOV_INSTALL_LIFECYCLE_V2,
807
+ },
808
+ null,
809
+ 2,
810
+ ),
811
+ );
812
+ });
813
+ parent
814
+ .command("ecogov-config-v2")
815
+ .description("Show V2 config")
816
+ .action(async () => {
817
+ const m = await L();
818
+ console.log(
819
+ JSON.stringify(
820
+ {
821
+ maxActive: m.getMaxActiveEcogovProfilesPerOwnerV2(),
822
+ maxPending: m.getMaxPendingEcogovInstallsPerProfileV2(),
823
+ idleMs: m.getEcogovProfileIdleMsV2(),
824
+ stuckMs: m.getEcogovInstallStuckMsV2(),
825
+ },
826
+ null,
827
+ 2,
828
+ ),
829
+ );
830
+ });
831
+ parent
832
+ .command("ecogov-set-max-active-v2 <n>")
833
+ .description("Set max active")
834
+ .action(async (n) => {
835
+ (await L()).setMaxActiveEcogovProfilesPerOwnerV2(Number(n));
836
+ console.log("ok");
837
+ });
838
+ parent
839
+ .command("ecogov-set-max-pending-v2 <n>")
840
+ .description("Set max pending")
841
+ .action(async (n) => {
842
+ (await L()).setMaxPendingEcogovInstallsPerProfileV2(Number(n));
843
+ console.log("ok");
844
+ });
845
+ parent
846
+ .command("ecogov-set-idle-ms-v2 <n>")
847
+ .description("Set idle threshold ms")
848
+ .action(async (n) => {
849
+ (await L()).setEcogovProfileIdleMsV2(Number(n));
850
+ console.log("ok");
851
+ });
852
+ parent
853
+ .command("ecogov-set-stuck-ms-v2 <n>")
854
+ .description("Set stuck threshold ms")
855
+ .action(async (n) => {
856
+ (await L()).setEcogovInstallStuckMsV2(Number(n));
857
+ console.log("ok");
858
+ });
859
+ parent
860
+ .command("ecogov-register-v2 <id> <owner>")
861
+ .description("Register V2 profile")
862
+ .option("--category <v>", "category")
863
+ .action(async (id, owner, o) => {
864
+ const m = await L();
865
+ console.log(
866
+ JSON.stringify(
867
+ m.registerEcogovProfileV2({ id, owner, category: o.category }),
868
+ null,
869
+ 2,
870
+ ),
871
+ );
872
+ });
873
+ parent
874
+ .command("ecogov-activate-v2 <id>")
875
+ .description("Activate profile")
876
+ .action(async (id) => {
877
+ console.log(
878
+ JSON.stringify((await L()).activateEcogovProfileV2(id), null, 2),
879
+ );
880
+ });
881
+ parent
882
+ .command("ecogov-disable-v2 <id>")
883
+ .description("Disable profile")
884
+ .action(async (id) => {
885
+ console.log(
886
+ JSON.stringify((await L()).disableEcogovProfileV2(id), null, 2),
887
+ );
888
+ });
889
+ parent
890
+ .command("ecogov-archive-v2 <id>")
891
+ .description("Archive profile")
892
+ .action(async (id) => {
893
+ console.log(
894
+ JSON.stringify((await L()).archiveEcogovProfileV2(id), null, 2),
895
+ );
896
+ });
897
+ parent
898
+ .command("ecogov-touch-v2 <id>")
899
+ .description("Touch profile")
900
+ .action(async (id) => {
901
+ console.log(
902
+ JSON.stringify((await L()).touchEcogovProfileV2(id), null, 2),
903
+ );
904
+ });
905
+ parent
906
+ .command("ecogov-get-v2 <id>")
907
+ .description("Get profile")
908
+ .action(async (id) => {
909
+ console.log(JSON.stringify((await L()).getEcogovProfileV2(id), null, 2));
910
+ });
911
+ parent
912
+ .command("ecogov-list-v2")
913
+ .description("List profiles")
914
+ .action(async () => {
915
+ console.log(JSON.stringify((await L()).listEcogovProfilesV2(), null, 2));
916
+ });
917
+ parent
918
+ .command("ecogov-create-install-v2 <id> <profileId>")
919
+ .description("Create install")
920
+ .option("--version <v>", "version")
921
+ .action(async (id, profileId, o) => {
922
+ const m = await L();
923
+ console.log(
924
+ JSON.stringify(
925
+ m.createEcogovInstallV2({ id, profileId, version: o.version }),
926
+ null,
927
+ 2,
928
+ ),
929
+ );
930
+ });
931
+ parent
932
+ .command("ecogov-installing-install-v2 <id>")
933
+ .description("Mark install as installing")
934
+ .action(async (id) => {
935
+ console.log(
936
+ JSON.stringify((await L()).installingEcogovInstallV2(id), null, 2),
937
+ );
938
+ });
939
+ parent
940
+ .command("ecogov-complete-install-v2 <id>")
941
+ .description("Complete install")
942
+ .action(async (id) => {
943
+ console.log(
944
+ JSON.stringify((await L()).completeInstallEcogovV2(id), null, 2),
945
+ );
946
+ });
947
+ parent
948
+ .command("ecogov-fail-install-v2 <id> [reason]")
949
+ .description("Fail install")
950
+ .action(async (id, reason) => {
951
+ console.log(
952
+ JSON.stringify((await L()).failEcogovInstallV2(id, reason), null, 2),
953
+ );
954
+ });
955
+ parent
956
+ .command("ecogov-cancel-install-v2 <id> [reason]")
957
+ .description("Cancel install")
958
+ .action(async (id, reason) => {
959
+ console.log(
960
+ JSON.stringify((await L()).cancelEcogovInstallV2(id, reason), null, 2),
961
+ );
962
+ });
963
+ parent
964
+ .command("ecogov-get-install-v2 <id>")
965
+ .description("Get install")
966
+ .action(async (id) => {
967
+ console.log(JSON.stringify((await L()).getEcogovInstallV2(id), null, 2));
968
+ });
969
+ parent
970
+ .command("ecogov-list-installs-v2")
971
+ .description("List installs")
972
+ .action(async () => {
973
+ console.log(JSON.stringify((await L()).listEcogovInstallsV2(), null, 2));
974
+ });
975
+ parent
976
+ .command("ecogov-auto-disable-idle-v2")
977
+ .description("Auto-disable idle")
978
+ .action(async () => {
979
+ console.log(
980
+ JSON.stringify((await L()).autoDisableIdleEcogovProfilesV2(), null, 2),
981
+ );
982
+ });
983
+ parent
984
+ .command("ecogov-auto-fail-stuck-v2")
985
+ .description("Auto-fail stuck installs")
986
+ .action(async () => {
987
+ console.log(
988
+ JSON.stringify((await L()).autoFailStuckEcogovInstallsV2(), null, 2),
989
+ );
990
+ });
991
+ parent
992
+ .command("ecogov-gov-stats-v2")
993
+ .description("V2 gov stats")
994
+ .action(async () => {
995
+ console.log(
996
+ JSON.stringify((await L()).getPluginEcosystemGovStatsV2(), null, 2),
997
+ );
998
+ });
999
+ }
@@ -449,3 +449,212 @@ export function registerPluginCommand(program) {
449
449
  }
450
450
  });
451
451
  }
452
+
453
+ // === Iter26 V2 governance overlay ===
454
+ export function registerPadgovV2Commands(program) {
455
+ const parent = program.commands.find((c) => c.name() === "plugin");
456
+ if (!parent) return;
457
+ const L = async () => await import("../lib/plugin-autodiscovery.js");
458
+ parent
459
+ .command("padgov-enums-v2")
460
+ .description("Show V2 enums")
461
+ .action(async () => {
462
+ const m = await L();
463
+ console.log(
464
+ JSON.stringify(
465
+ {
466
+ profileMaturity: m.PADGOV_PROFILE_MATURITY_V2,
467
+ scanLifecycle: m.PADGOV_SCAN_LIFECYCLE_V2,
468
+ },
469
+ null,
470
+ 2,
471
+ ),
472
+ );
473
+ });
474
+ parent
475
+ .command("padgov-config-v2")
476
+ .description("Show V2 config")
477
+ .action(async () => {
478
+ const m = await L();
479
+ console.log(
480
+ JSON.stringify(
481
+ {
482
+ maxActive: m.getMaxActivePadgovProfilesPerOwnerV2(),
483
+ maxPending: m.getMaxPendingPadgovScansPerProfileV2(),
484
+ idleMs: m.getPadgovProfileIdleMsV2(),
485
+ stuckMs: m.getPadgovScanStuckMsV2(),
486
+ },
487
+ null,
488
+ 2,
489
+ ),
490
+ );
491
+ });
492
+ parent
493
+ .command("padgov-set-max-active-v2 <n>")
494
+ .description("Set max active")
495
+ .action(async (n) => {
496
+ (await L()).setMaxActivePadgovProfilesPerOwnerV2(Number(n));
497
+ console.log("ok");
498
+ });
499
+ parent
500
+ .command("padgov-set-max-pending-v2 <n>")
501
+ .description("Set max pending")
502
+ .action(async (n) => {
503
+ (await L()).setMaxPendingPadgovScansPerProfileV2(Number(n));
504
+ console.log("ok");
505
+ });
506
+ parent
507
+ .command("padgov-set-idle-ms-v2 <n>")
508
+ .description("Set idle threshold ms")
509
+ .action(async (n) => {
510
+ (await L()).setPadgovProfileIdleMsV2(Number(n));
511
+ console.log("ok");
512
+ });
513
+ parent
514
+ .command("padgov-set-stuck-ms-v2 <n>")
515
+ .description("Set stuck threshold ms")
516
+ .action(async (n) => {
517
+ (await L()).setPadgovScanStuckMsV2(Number(n));
518
+ console.log("ok");
519
+ });
520
+ parent
521
+ .command("padgov-register-v2 <id> <owner>")
522
+ .description("Register V2 profile")
523
+ .option("--root <v>", "root")
524
+ .action(async (id, owner, o) => {
525
+ const m = await L();
526
+ console.log(
527
+ JSON.stringify(
528
+ m.registerPadgovProfileV2({ id, owner, root: o.root }),
529
+ null,
530
+ 2,
531
+ ),
532
+ );
533
+ });
534
+ parent
535
+ .command("padgov-activate-v2 <id>")
536
+ .description("Activate profile")
537
+ .action(async (id) => {
538
+ console.log(
539
+ JSON.stringify((await L()).activatePadgovProfileV2(id), null, 2),
540
+ );
541
+ });
542
+ parent
543
+ .command("padgov-stale-v2 <id>")
544
+ .description("Stale profile")
545
+ .action(async (id) => {
546
+ console.log(
547
+ JSON.stringify((await L()).stalePadgovProfileV2(id), null, 2),
548
+ );
549
+ });
550
+ parent
551
+ .command("padgov-archive-v2 <id>")
552
+ .description("Archive profile")
553
+ .action(async (id) => {
554
+ console.log(
555
+ JSON.stringify((await L()).archivePadgovProfileV2(id), null, 2),
556
+ );
557
+ });
558
+ parent
559
+ .command("padgov-touch-v2 <id>")
560
+ .description("Touch profile")
561
+ .action(async (id) => {
562
+ console.log(
563
+ JSON.stringify((await L()).touchPadgovProfileV2(id), null, 2),
564
+ );
565
+ });
566
+ parent
567
+ .command("padgov-get-v2 <id>")
568
+ .description("Get profile")
569
+ .action(async (id) => {
570
+ console.log(JSON.stringify((await L()).getPadgovProfileV2(id), null, 2));
571
+ });
572
+ parent
573
+ .command("padgov-list-v2")
574
+ .description("List profiles")
575
+ .action(async () => {
576
+ console.log(JSON.stringify((await L()).listPadgovProfilesV2(), null, 2));
577
+ });
578
+ parent
579
+ .command("padgov-create-scan-v2 <id> <profileId>")
580
+ .description("Create scan")
581
+ .option("--path <v>", "path")
582
+ .action(async (id, profileId, o) => {
583
+ const m = await L();
584
+ console.log(
585
+ JSON.stringify(
586
+ m.createPadgovScanV2({ id, profileId, path: o.path }),
587
+ null,
588
+ 2,
589
+ ),
590
+ );
591
+ });
592
+ parent
593
+ .command("padgov-scanning-scan-v2 <id>")
594
+ .description("Mark scan as scanning")
595
+ .action(async (id) => {
596
+ console.log(
597
+ JSON.stringify((await L()).scanningPadgovScanV2(id), null, 2),
598
+ );
599
+ });
600
+ parent
601
+ .command("padgov-complete-scan-v2 <id>")
602
+ .description("Complete scan")
603
+ .action(async (id) => {
604
+ console.log(
605
+ JSON.stringify((await L()).completeScanPadgovV2(id), null, 2),
606
+ );
607
+ });
608
+ parent
609
+ .command("padgov-fail-scan-v2 <id> [reason]")
610
+ .description("Fail scan")
611
+ .action(async (id, reason) => {
612
+ console.log(
613
+ JSON.stringify((await L()).failPadgovScanV2(id, reason), null, 2),
614
+ );
615
+ });
616
+ parent
617
+ .command("padgov-cancel-scan-v2 <id> [reason]")
618
+ .description("Cancel scan")
619
+ .action(async (id, reason) => {
620
+ console.log(
621
+ JSON.stringify((await L()).cancelPadgovScanV2(id, reason), null, 2),
622
+ );
623
+ });
624
+ parent
625
+ .command("padgov-get-scan-v2 <id>")
626
+ .description("Get scan")
627
+ .action(async (id) => {
628
+ console.log(JSON.stringify((await L()).getPadgovScanV2(id), null, 2));
629
+ });
630
+ parent
631
+ .command("padgov-list-scans-v2")
632
+ .description("List scans")
633
+ .action(async () => {
634
+ console.log(JSON.stringify((await L()).listPadgovScansV2(), null, 2));
635
+ });
636
+ parent
637
+ .command("padgov-auto-stale-idle-v2")
638
+ .description("Auto-stale idle")
639
+ .action(async () => {
640
+ console.log(
641
+ JSON.stringify((await L()).autoStaleIdlePadgovProfilesV2(), null, 2),
642
+ );
643
+ });
644
+ parent
645
+ .command("padgov-auto-fail-stuck-v2")
646
+ .description("Auto-fail stuck scans")
647
+ .action(async () => {
648
+ console.log(
649
+ JSON.stringify((await L()).autoFailStuckPadgovScansV2(), null, 2),
650
+ );
651
+ });
652
+ parent
653
+ .command("padgov-gov-stats-v2")
654
+ .description("V2 gov stats")
655
+ .action(async () => {
656
+ console.log(
657
+ JSON.stringify((await L()).getPluginAutodiscoveryGovStatsV2(), null, 2),
658
+ );
659
+ });
660
+ }
@@ -587,3 +587,216 @@ export function registerPqcCommand(program) {
587
587
  else logger.log(JSON.stringify(s, null, 2));
588
588
  });
589
589
  }
590
+
591
+ // === Iter22 V2 governance overlay ===
592
+ export function registerPqcgovV2Commands(program) {
593
+ const parent = program.commands.find((c) => c.name() === "pqc");
594
+ if (!parent) return;
595
+ const L = async () => await import("../lib/pqc-manager.js");
596
+ parent
597
+ .command("pqcgov-enums-v2")
598
+ .description("Show V2 enums")
599
+ .action(async () => {
600
+ const m = await L();
601
+ console.log(
602
+ JSON.stringify(
603
+ {
604
+ profileMaturity: m.PQCGOV_PROFILE_MATURITY_V2,
605
+ keygenLifecycle: m.PQCGOV_KEYGEN_LIFECYCLE_V2,
606
+ },
607
+ null,
608
+ 2,
609
+ ),
610
+ );
611
+ });
612
+ parent
613
+ .command("pqcgov-config-v2")
614
+ .description("Show V2 config")
615
+ .action(async () => {
616
+ const m = await L();
617
+ console.log(
618
+ JSON.stringify(
619
+ {
620
+ maxActive: m.getMaxActivePqcgovProfilesPerOwnerV2(),
621
+ maxPending: m.getMaxPendingPqcgovKeygensPerProfileV2(),
622
+ idleMs: m.getPqcgovProfileIdleMsV2(),
623
+ stuckMs: m.getPqcgovKeygenStuckMsV2(),
624
+ },
625
+ null,
626
+ 2,
627
+ ),
628
+ );
629
+ });
630
+ parent
631
+ .command("pqcgov-set-max-active-v2 <n>")
632
+ .description("Set max active")
633
+ .action(async (n) => {
634
+ (await L()).setMaxActivePqcgovProfilesPerOwnerV2(Number(n));
635
+ console.log("ok");
636
+ });
637
+ parent
638
+ .command("pqcgov-set-max-pending-v2 <n>")
639
+ .description("Set max pending")
640
+ .action(async (n) => {
641
+ (await L()).setMaxPendingPqcgovKeygensPerProfileV2(Number(n));
642
+ console.log("ok");
643
+ });
644
+ parent
645
+ .command("pqcgov-set-idle-ms-v2 <n>")
646
+ .description("Set idle threshold ms")
647
+ .action(async (n) => {
648
+ (await L()).setPqcgovProfileIdleMsV2(Number(n));
649
+ console.log("ok");
650
+ });
651
+ parent
652
+ .command("pqcgov-set-stuck-ms-v2 <n>")
653
+ .description("Set stuck threshold ms")
654
+ .action(async (n) => {
655
+ (await L()).setPqcgovKeygenStuckMsV2(Number(n));
656
+ console.log("ok");
657
+ });
658
+ parent
659
+ .command("pqcgov-register-v2 <id> <owner>")
660
+ .description("Register V2 profile")
661
+ .option("--algorithm <v>", "algorithm")
662
+ .action(async (id, owner, o) => {
663
+ const m = await L();
664
+ console.log(
665
+ JSON.stringify(
666
+ m.registerPqcgovProfileV2({ id, owner, algorithm: o.algorithm }),
667
+ null,
668
+ 2,
669
+ ),
670
+ );
671
+ });
672
+ parent
673
+ .command("pqcgov-activate-v2 <id>")
674
+ .description("Activate profile")
675
+ .action(async (id) => {
676
+ console.log(
677
+ JSON.stringify((await L()).activatePqcgovProfileV2(id), null, 2),
678
+ );
679
+ });
680
+ parent
681
+ .command("pqcgov-deprecate-v2 <id>")
682
+ .description("Deprecate profile")
683
+ .action(async (id) => {
684
+ console.log(
685
+ JSON.stringify((await L()).deprecatePqcgovProfileV2(id), null, 2),
686
+ );
687
+ });
688
+ parent
689
+ .command("pqcgov-archive-v2 <id>")
690
+ .description("Archive profile")
691
+ .action(async (id) => {
692
+ console.log(
693
+ JSON.stringify((await L()).archivePqcgovProfileV2(id), null, 2),
694
+ );
695
+ });
696
+ parent
697
+ .command("pqcgov-touch-v2 <id>")
698
+ .description("Touch profile")
699
+ .action(async (id) => {
700
+ console.log(
701
+ JSON.stringify((await L()).touchPqcgovProfileV2(id), null, 2),
702
+ );
703
+ });
704
+ parent
705
+ .command("pqcgov-get-v2 <id>")
706
+ .description("Get profile")
707
+ .action(async (id) => {
708
+ console.log(JSON.stringify((await L()).getPqcgovProfileV2(id), null, 2));
709
+ });
710
+ parent
711
+ .command("pqcgov-list-v2")
712
+ .description("List profiles")
713
+ .action(async () => {
714
+ console.log(JSON.stringify((await L()).listPqcgovProfilesV2(), null, 2));
715
+ });
716
+ parent
717
+ .command("pqcgov-create-keygen-v2 <id> <profileId>")
718
+ .description("Create keygen")
719
+ .option("--purpose <v>", "purpose")
720
+ .action(async (id, profileId, o) => {
721
+ const m = await L();
722
+ console.log(
723
+ JSON.stringify(
724
+ m.createPqcgovKeygenV2({ id, profileId, purpose: o.purpose }),
725
+ null,
726
+ 2,
727
+ ),
728
+ );
729
+ });
730
+ parent
731
+ .command("pqcgov-generating-keygen-v2 <id>")
732
+ .description("Mark keygen as generating")
733
+ .action(async (id) => {
734
+ console.log(
735
+ JSON.stringify((await L()).generatingPqcgovKeygenV2(id), null, 2),
736
+ );
737
+ });
738
+ parent
739
+ .command("pqcgov-complete-keygen-v2 <id>")
740
+ .description("Complete keygen")
741
+ .action(async (id) => {
742
+ console.log(
743
+ JSON.stringify((await L()).completeKeygenPqcgovV2(id), null, 2),
744
+ );
745
+ });
746
+ parent
747
+ .command("pqcgov-fail-keygen-v2 <id> [reason]")
748
+ .description("Fail keygen")
749
+ .action(async (id, reason) => {
750
+ console.log(
751
+ JSON.stringify((await L()).failPqcgovKeygenV2(id, reason), null, 2),
752
+ );
753
+ });
754
+ parent
755
+ .command("pqcgov-cancel-keygen-v2 <id> [reason]")
756
+ .description("Cancel keygen")
757
+ .action(async (id, reason) => {
758
+ console.log(
759
+ JSON.stringify((await L()).cancelPqcgovKeygenV2(id, reason), null, 2),
760
+ );
761
+ });
762
+ parent
763
+ .command("pqcgov-get-keygen-v2 <id>")
764
+ .description("Get keygen")
765
+ .action(async (id) => {
766
+ console.log(JSON.stringify((await L()).getPqcgovKeygenV2(id), null, 2));
767
+ });
768
+ parent
769
+ .command("pqcgov-list-keygens-v2")
770
+ .description("List keygens")
771
+ .action(async () => {
772
+ console.log(JSON.stringify((await L()).listPqcgovKeygensV2(), null, 2));
773
+ });
774
+ parent
775
+ .command("pqcgov-auto-deprecate-idle-v2")
776
+ .description("Auto-deprecate idle")
777
+ .action(async () => {
778
+ console.log(
779
+ JSON.stringify(
780
+ (await L()).autoDeprecateIdlePqcgovProfilesV2(),
781
+ null,
782
+ 2,
783
+ ),
784
+ );
785
+ });
786
+ parent
787
+ .command("pqcgov-auto-fail-stuck-v2")
788
+ .description("Auto-fail stuck keygens")
789
+ .action(async () => {
790
+ console.log(
791
+ JSON.stringify((await L()).autoFailStuckPqcgovKeygensV2(), null, 2),
792
+ );
793
+ });
794
+ parent
795
+ .command("pqcgov-gov-stats-v2")
796
+ .description("V2 gov stats")
797
+ .action(async () => {
798
+ console.log(
799
+ JSON.stringify((await L()).getPqcManagerGovStatsV2(), null, 2),
800
+ );
801
+ });
802
+ }