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
@@ -703,3 +703,212 @@ export function registerMemoryCommand(program) {
703
703
  .description("Flip stuck running jobs → failed")
704
704
  .action(() => console.log(JSON.stringify(autoFailStuckJobsV2(), null, 2)));
705
705
  }
706
+
707
+ // === Iter21 V2 governance overlay ===
708
+ export function registerMemgovV2Commands(program) {
709
+ const parent = program.commands.find((c) => c.name() === "memory");
710
+ if (!parent) return;
711
+ const L = async () => await import("../lib/memory-manager.js");
712
+ parent
713
+ .command("memgov-enums-v2")
714
+ .description("Show V2 enums")
715
+ .action(async () => {
716
+ const m = await L();
717
+ console.log(
718
+ JSON.stringify(
719
+ {
720
+ profileMaturity: m.MEMGOV_PROFILE_MATURITY_V2,
721
+ recallLifecycle: m.MEMGOV_RECALL_LIFECYCLE_V2,
722
+ },
723
+ null,
724
+ 2,
725
+ ),
726
+ );
727
+ });
728
+ parent
729
+ .command("memgov-config-v2")
730
+ .description("Show V2 config")
731
+ .action(async () => {
732
+ const m = await L();
733
+ console.log(
734
+ JSON.stringify(
735
+ {
736
+ maxActive: m.getMaxActiveMemgovProfilesPerOwnerV2(),
737
+ maxPending: m.getMaxPendingMemgovRecallsPerProfileV2(),
738
+ idleMs: m.getMemgovProfileIdleMsV2(),
739
+ stuckMs: m.getMemgovRecallStuckMsV2(),
740
+ },
741
+ null,
742
+ 2,
743
+ ),
744
+ );
745
+ });
746
+ parent
747
+ .command("memgov-set-max-active-v2 <n>")
748
+ .description("Set max active")
749
+ .action(async (n) => {
750
+ (await L()).setMaxActiveMemgovProfilesPerOwnerV2(Number(n));
751
+ console.log("ok");
752
+ });
753
+ parent
754
+ .command("memgov-set-max-pending-v2 <n>")
755
+ .description("Set max pending")
756
+ .action(async (n) => {
757
+ (await L()).setMaxPendingMemgovRecallsPerProfileV2(Number(n));
758
+ console.log("ok");
759
+ });
760
+ parent
761
+ .command("memgov-set-idle-ms-v2 <n>")
762
+ .description("Set idle threshold ms")
763
+ .action(async (n) => {
764
+ (await L()).setMemgovProfileIdleMsV2(Number(n));
765
+ console.log("ok");
766
+ });
767
+ parent
768
+ .command("memgov-set-stuck-ms-v2 <n>")
769
+ .description("Set stuck threshold ms")
770
+ .action(async (n) => {
771
+ (await L()).setMemgovRecallStuckMsV2(Number(n));
772
+ console.log("ok");
773
+ });
774
+ parent
775
+ .command("memgov-register-v2 <id> <owner>")
776
+ .description("Register V2 profile")
777
+ .option("--scope <v>", "scope")
778
+ .action(async (id, owner, o) => {
779
+ const m = await L();
780
+ console.log(
781
+ JSON.stringify(
782
+ m.registerMemgovProfileV2({ id, owner, scope: o.scope }),
783
+ null,
784
+ 2,
785
+ ),
786
+ );
787
+ });
788
+ parent
789
+ .command("memgov-activate-v2 <id>")
790
+ .description("Activate profile")
791
+ .action(async (id) => {
792
+ console.log(
793
+ JSON.stringify((await L()).activateMemgovProfileV2(id), null, 2),
794
+ );
795
+ });
796
+ parent
797
+ .command("memgov-stale-v2 <id>")
798
+ .description("Stale profile")
799
+ .action(async (id) => {
800
+ console.log(
801
+ JSON.stringify((await L()).staleMemgovProfileV2(id), null, 2),
802
+ );
803
+ });
804
+ parent
805
+ .command("memgov-archive-v2 <id>")
806
+ .description("Archive profile")
807
+ .action(async (id) => {
808
+ console.log(
809
+ JSON.stringify((await L()).archiveMemgovProfileV2(id), null, 2),
810
+ );
811
+ });
812
+ parent
813
+ .command("memgov-touch-v2 <id>")
814
+ .description("Touch profile")
815
+ .action(async (id) => {
816
+ console.log(
817
+ JSON.stringify((await L()).touchMemgovProfileV2(id), null, 2),
818
+ );
819
+ });
820
+ parent
821
+ .command("memgov-get-v2 <id>")
822
+ .description("Get profile")
823
+ .action(async (id) => {
824
+ console.log(JSON.stringify((await L()).getMemgovProfileV2(id), null, 2));
825
+ });
826
+ parent
827
+ .command("memgov-list-v2")
828
+ .description("List profiles")
829
+ .action(async () => {
830
+ console.log(JSON.stringify((await L()).listMemgovProfilesV2(), null, 2));
831
+ });
832
+ parent
833
+ .command("memgov-create-recall-v2 <id> <profileId>")
834
+ .description("Create recall")
835
+ .option("--key <v>", "key")
836
+ .action(async (id, profileId, o) => {
837
+ const m = await L();
838
+ console.log(
839
+ JSON.stringify(
840
+ m.createMemgovRecallV2({ id, profileId, key: o.key }),
841
+ null,
842
+ 2,
843
+ ),
844
+ );
845
+ });
846
+ parent
847
+ .command("memgov-recalling-recall-v2 <id>")
848
+ .description("Mark recall as recalling")
849
+ .action(async (id) => {
850
+ console.log(
851
+ JSON.stringify((await L()).recallingMemgovRecallV2(id), null, 2),
852
+ );
853
+ });
854
+ parent
855
+ .command("memgov-complete-recall-v2 <id>")
856
+ .description("Complete recall")
857
+ .action(async (id) => {
858
+ console.log(
859
+ JSON.stringify((await L()).completeRecallMemgovV2(id), null, 2),
860
+ );
861
+ });
862
+ parent
863
+ .command("memgov-fail-recall-v2 <id> [reason]")
864
+ .description("Fail recall")
865
+ .action(async (id, reason) => {
866
+ console.log(
867
+ JSON.stringify((await L()).failMemgovRecallV2(id, reason), null, 2),
868
+ );
869
+ });
870
+ parent
871
+ .command("memgov-cancel-recall-v2 <id> [reason]")
872
+ .description("Cancel recall")
873
+ .action(async (id, reason) => {
874
+ console.log(
875
+ JSON.stringify((await L()).cancelMemgovRecallV2(id, reason), null, 2),
876
+ );
877
+ });
878
+ parent
879
+ .command("memgov-get-recall-v2 <id>")
880
+ .description("Get recall")
881
+ .action(async (id) => {
882
+ console.log(JSON.stringify((await L()).getMemgovRecallV2(id), null, 2));
883
+ });
884
+ parent
885
+ .command("memgov-list-recalls-v2")
886
+ .description("List recalls")
887
+ .action(async () => {
888
+ console.log(JSON.stringify((await L()).listMemgovRecallsV2(), null, 2));
889
+ });
890
+ parent
891
+ .command("memgov-auto-stale-idle-v2")
892
+ .description("Auto-stale idle")
893
+ .action(async () => {
894
+ console.log(
895
+ JSON.stringify((await L()).autoStaleIdleMemgovProfilesV2(), null, 2),
896
+ );
897
+ });
898
+ parent
899
+ .command("memgov-auto-fail-stuck-v2")
900
+ .description("Auto-fail stuck recalls")
901
+ .action(async () => {
902
+ console.log(
903
+ JSON.stringify((await L()).autoFailStuckMemgovRecallsV2(), null, 2),
904
+ );
905
+ });
906
+ parent
907
+ .command("memgov-gov-stats-v2")
908
+ .description("V2 gov stats")
909
+ .action(async () => {
910
+ console.log(
911
+ JSON.stringify((await L()).getMemoryManagerGovStatsV2(), null, 2),
912
+ );
913
+ });
914
+ }
@@ -698,3 +698,206 @@ export function registerMultimodalCommand(program) {
698
698
 
699
699
  program.addCommand(mm);
700
700
  }
701
+
702
+ // === Iter18 V2 governance overlay ===
703
+ export function registerMmgovV2Commands(program) {
704
+ const parent = program.commands.find((c) => c.name() === "multimodal");
705
+ if (!parent) return;
706
+ const L = async () => await import("../lib/multimodal.js");
707
+ parent
708
+ .command("mmgov-enums-v2")
709
+ .description("Show V2 enums")
710
+ .action(async () => {
711
+ const m = await L();
712
+ console.log(
713
+ JSON.stringify(
714
+ {
715
+ profileMaturity: m.MMGOV_PROFILE_MATURITY_V2,
716
+ jobLifecycle: m.MMGOV_JOB_LIFECYCLE_V2,
717
+ },
718
+ null,
719
+ 2,
720
+ ),
721
+ );
722
+ });
723
+ parent
724
+ .command("mmgov-config-v2")
725
+ .description("Show V2 config")
726
+ .action(async () => {
727
+ const m = await L();
728
+ console.log(
729
+ JSON.stringify(
730
+ {
731
+ maxActive: m.getMaxActiveMmgovProfilesPerOwnerV2(),
732
+ maxPending: m.getMaxPendingMmgovJobsPerProfileV2(),
733
+ idleMs: m.getMmgovProfileIdleMsV2(),
734
+ stuckMs: m.getMmgovJobStuckMsV2(),
735
+ },
736
+ null,
737
+ 2,
738
+ ),
739
+ );
740
+ });
741
+ parent
742
+ .command("mmgov-set-max-active-v2 <n>")
743
+ .description("Set max active")
744
+ .action(async (n) => {
745
+ (await L()).setMaxActiveMmgovProfilesPerOwnerV2(Number(n));
746
+ console.log("ok");
747
+ });
748
+ parent
749
+ .command("mmgov-set-max-pending-v2 <n>")
750
+ .description("Set max pending")
751
+ .action(async (n) => {
752
+ (await L()).setMaxPendingMmgovJobsPerProfileV2(Number(n));
753
+ console.log("ok");
754
+ });
755
+ parent
756
+ .command("mmgov-set-idle-ms-v2 <n>")
757
+ .description("Set idle threshold ms")
758
+ .action(async (n) => {
759
+ (await L()).setMmgovProfileIdleMsV2(Number(n));
760
+ console.log("ok");
761
+ });
762
+ parent
763
+ .command("mmgov-set-stuck-ms-v2 <n>")
764
+ .description("Set stuck threshold ms")
765
+ .action(async (n) => {
766
+ (await L()).setMmgovJobStuckMsV2(Number(n));
767
+ console.log("ok");
768
+ });
769
+ parent
770
+ .command("mmgov-register-v2 <id> <owner>")
771
+ .description("Register V2 profile")
772
+ .option("--kind <v>", "kind")
773
+ .action(async (id, owner, o) => {
774
+ const m = await L();
775
+ console.log(
776
+ JSON.stringify(
777
+ m.registerMmgovProfileV2({ id, owner, kind: o.kind }),
778
+ null,
779
+ 2,
780
+ ),
781
+ );
782
+ });
783
+ parent
784
+ .command("mmgov-activate-v2 <id>")
785
+ .description("Activate profile")
786
+ .action(async (id) => {
787
+ console.log(
788
+ JSON.stringify((await L()).activateMmgovProfileV2(id), null, 2),
789
+ );
790
+ });
791
+ parent
792
+ .command("mmgov-stale-v2 <id>")
793
+ .description("Stale profile")
794
+ .action(async (id) => {
795
+ console.log(JSON.stringify((await L()).staleMmgovProfileV2(id), null, 2));
796
+ });
797
+ parent
798
+ .command("mmgov-archive-v2 <id>")
799
+ .description("Archive profile")
800
+ .action(async (id) => {
801
+ console.log(
802
+ JSON.stringify((await L()).archiveMmgovProfileV2(id), null, 2),
803
+ );
804
+ });
805
+ parent
806
+ .command("mmgov-touch-v2 <id>")
807
+ .description("Touch profile")
808
+ .action(async (id) => {
809
+ console.log(JSON.stringify((await L()).touchMmgovProfileV2(id), null, 2));
810
+ });
811
+ parent
812
+ .command("mmgov-get-v2 <id>")
813
+ .description("Get profile")
814
+ .action(async (id) => {
815
+ console.log(JSON.stringify((await L()).getMmgovProfileV2(id), null, 2));
816
+ });
817
+ parent
818
+ .command("mmgov-list-v2")
819
+ .description("List profiles")
820
+ .action(async () => {
821
+ console.log(JSON.stringify((await L()).listMmgovProfilesV2(), null, 2));
822
+ });
823
+ parent
824
+ .command("mmgov-create-job-v2 <id> <profileId>")
825
+ .description("Create job")
826
+ .option("--input <v>", "input")
827
+ .action(async (id, profileId, o) => {
828
+ const m = await L();
829
+ console.log(
830
+ JSON.stringify(
831
+ m.createMmgovJobV2({ id, profileId, input: o.input }),
832
+ null,
833
+ 2,
834
+ ),
835
+ );
836
+ });
837
+ parent
838
+ .command("mmgov-processing-job-v2 <id>")
839
+ .description("Mark job as processing")
840
+ .action(async (id) => {
841
+ console.log(
842
+ JSON.stringify((await L()).processingMmgovJobV2(id), null, 2),
843
+ );
844
+ });
845
+ parent
846
+ .command("mmgov-complete-job-v2 <id>")
847
+ .description("Complete job")
848
+ .action(async (id) => {
849
+ console.log(JSON.stringify((await L()).completeJobMmgovV2(id), null, 2));
850
+ });
851
+ parent
852
+ .command("mmgov-fail-job-v2 <id> [reason]")
853
+ .description("Fail job")
854
+ .action(async (id, reason) => {
855
+ console.log(
856
+ JSON.stringify((await L()).failMmgovJobV2(id, reason), null, 2),
857
+ );
858
+ });
859
+ parent
860
+ .command("mmgov-cancel-job-v2 <id> [reason]")
861
+ .description("Cancel job")
862
+ .action(async (id, reason) => {
863
+ console.log(
864
+ JSON.stringify((await L()).cancelMmgovJobV2(id, reason), null, 2),
865
+ );
866
+ });
867
+ parent
868
+ .command("mmgov-get-job-v2 <id>")
869
+ .description("Get job")
870
+ .action(async (id) => {
871
+ console.log(JSON.stringify((await L()).getMmgovJobV2(id), null, 2));
872
+ });
873
+ parent
874
+ .command("mmgov-list-jobs-v2")
875
+ .description("List jobs")
876
+ .action(async () => {
877
+ console.log(JSON.stringify((await L()).listMmgovJobsV2(), null, 2));
878
+ });
879
+ parent
880
+ .command("mmgov-auto-stale-idle-v2")
881
+ .description("Auto-stale idle")
882
+ .action(async () => {
883
+ console.log(
884
+ JSON.stringify((await L()).autoStaleIdleMmgovProfilesV2(), null, 2),
885
+ );
886
+ });
887
+ parent
888
+ .command("mmgov-auto-fail-stuck-v2")
889
+ .description("Auto-fail stuck jobs")
890
+ .action(async () => {
891
+ console.log(
892
+ JSON.stringify((await L()).autoFailStuckMmgovJobsV2(), null, 2),
893
+ );
894
+ });
895
+ parent
896
+ .command("mmgov-gov-stats-v2")
897
+ .description("V2 gov stats")
898
+ .action(async () => {
899
+ console.log(
900
+ JSON.stringify((await L()).getMultimodalGovStatsV2(), null, 2),
901
+ );
902
+ });
903
+ }
@@ -683,3 +683,228 @@ export function registerNlProgCommand(program) {
683
683
 
684
684
  program.addCommand(nlp);
685
685
  }
686
+
687
+ // === Iter18 V2 governance overlay ===
688
+ export function registerNlpgovV2Commands(program) {
689
+ const parent = program.commands.find((c) => c.name() === "nlprog");
690
+ if (!parent) return;
691
+ const L = async () => await import("../lib/nl-programming.js");
692
+ parent
693
+ .command("nlpgov-enums-v2")
694
+ .description("Show V2 enums")
695
+ .action(async () => {
696
+ const m = await L();
697
+ console.log(
698
+ JSON.stringify(
699
+ {
700
+ profileMaturity: m.NLPGOV_PROFILE_MATURITY_V2,
701
+ translationLifecycle: m.NLPGOV_TRANSLATION_LIFECYCLE_V2,
702
+ },
703
+ null,
704
+ 2,
705
+ ),
706
+ );
707
+ });
708
+ parent
709
+ .command("nlpgov-config-v2")
710
+ .description("Show V2 config")
711
+ .action(async () => {
712
+ const m = await L();
713
+ console.log(
714
+ JSON.stringify(
715
+ {
716
+ maxActive: m.getMaxActiveNlpgovProfilesPerOwnerV2(),
717
+ maxPending: m.getMaxPendingNlpgovTranslationsPerProfileV2(),
718
+ idleMs: m.getNlpgovProfileIdleMsV2(),
719
+ stuckMs: m.getNlpgovTranslationStuckMsV2(),
720
+ },
721
+ null,
722
+ 2,
723
+ ),
724
+ );
725
+ });
726
+ parent
727
+ .command("nlpgov-set-max-active-v2 <n>")
728
+ .description("Set max active")
729
+ .action(async (n) => {
730
+ (await L()).setMaxActiveNlpgovProfilesPerOwnerV2(Number(n));
731
+ console.log("ok");
732
+ });
733
+ parent
734
+ .command("nlpgov-set-max-pending-v2 <n>")
735
+ .description("Set max pending")
736
+ .action(async (n) => {
737
+ (await L()).setMaxPendingNlpgovTranslationsPerProfileV2(Number(n));
738
+ console.log("ok");
739
+ });
740
+ parent
741
+ .command("nlpgov-set-idle-ms-v2 <n>")
742
+ .description("Set idle threshold ms")
743
+ .action(async (n) => {
744
+ (await L()).setNlpgovProfileIdleMsV2(Number(n));
745
+ console.log("ok");
746
+ });
747
+ parent
748
+ .command("nlpgov-set-stuck-ms-v2 <n>")
749
+ .description("Set stuck threshold ms")
750
+ .action(async (n) => {
751
+ (await L()).setNlpgovTranslationStuckMsV2(Number(n));
752
+ console.log("ok");
753
+ });
754
+ parent
755
+ .command("nlpgov-register-v2 <id> <owner>")
756
+ .description("Register V2 profile")
757
+ .option("--style <v>", "style")
758
+ .action(async (id, owner, o) => {
759
+ const m = await L();
760
+ console.log(
761
+ JSON.stringify(
762
+ m.registerNlpgovProfileV2({ id, owner, style: o.style }),
763
+ null,
764
+ 2,
765
+ ),
766
+ );
767
+ });
768
+ parent
769
+ .command("nlpgov-activate-v2 <id>")
770
+ .description("Activate profile")
771
+ .action(async (id) => {
772
+ console.log(
773
+ JSON.stringify((await L()).activateNlpgovProfileV2(id), null, 2),
774
+ );
775
+ });
776
+ parent
777
+ .command("nlpgov-stale-v2 <id>")
778
+ .description("Stale profile")
779
+ .action(async (id) => {
780
+ console.log(
781
+ JSON.stringify((await L()).staleNlpgovProfileV2(id), null, 2),
782
+ );
783
+ });
784
+ parent
785
+ .command("nlpgov-archive-v2 <id>")
786
+ .description("Archive profile")
787
+ .action(async (id) => {
788
+ console.log(
789
+ JSON.stringify((await L()).archiveNlpgovProfileV2(id), null, 2),
790
+ );
791
+ });
792
+ parent
793
+ .command("nlpgov-touch-v2 <id>")
794
+ .description("Touch profile")
795
+ .action(async (id) => {
796
+ console.log(
797
+ JSON.stringify((await L()).touchNlpgovProfileV2(id), null, 2),
798
+ );
799
+ });
800
+ parent
801
+ .command("nlpgov-get-v2 <id>")
802
+ .description("Get profile")
803
+ .action(async (id) => {
804
+ console.log(JSON.stringify((await L()).getNlpgovProfileV2(id), null, 2));
805
+ });
806
+ parent
807
+ .command("nlpgov-list-v2")
808
+ .description("List profiles")
809
+ .action(async () => {
810
+ console.log(JSON.stringify((await L()).listNlpgovProfilesV2(), null, 2));
811
+ });
812
+ parent
813
+ .command("nlpgov-create-translation-v2 <id> <profileId>")
814
+ .description("Create translation")
815
+ .option("--intent <v>", "intent")
816
+ .action(async (id, profileId, o) => {
817
+ const m = await L();
818
+ console.log(
819
+ JSON.stringify(
820
+ m.createNlpgovTranslationV2({ id, profileId, intent: o.intent }),
821
+ null,
822
+ 2,
823
+ ),
824
+ );
825
+ });
826
+ parent
827
+ .command("nlpgov-translating-translation-v2 <id>")
828
+ .description("Mark translation as translating")
829
+ .action(async (id) => {
830
+ console.log(
831
+ JSON.stringify((await L()).translatingNlpgovTranslationV2(id), null, 2),
832
+ );
833
+ });
834
+ parent
835
+ .command("nlpgov-complete-translation-v2 <id>")
836
+ .description("Complete translation")
837
+ .action(async (id) => {
838
+ console.log(
839
+ JSON.stringify((await L()).completeTranslationNlpgovV2(id), null, 2),
840
+ );
841
+ });
842
+ parent
843
+ .command("nlpgov-fail-translation-v2 <id> [reason]")
844
+ .description("Fail translation")
845
+ .action(async (id, reason) => {
846
+ console.log(
847
+ JSON.stringify(
848
+ (await L()).failNlpgovTranslationV2(id, reason),
849
+ null,
850
+ 2,
851
+ ),
852
+ );
853
+ });
854
+ parent
855
+ .command("nlpgov-cancel-translation-v2 <id> [reason]")
856
+ .description("Cancel translation")
857
+ .action(async (id, reason) => {
858
+ console.log(
859
+ JSON.stringify(
860
+ (await L()).cancelNlpgovTranslationV2(id, reason),
861
+ null,
862
+ 2,
863
+ ),
864
+ );
865
+ });
866
+ parent
867
+ .command("nlpgov-get-translation-v2 <id>")
868
+ .description("Get translation")
869
+ .action(async (id) => {
870
+ console.log(
871
+ JSON.stringify((await L()).getNlpgovTranslationV2(id), null, 2),
872
+ );
873
+ });
874
+ parent
875
+ .command("nlpgov-list-translations-v2")
876
+ .description("List translations")
877
+ .action(async () => {
878
+ console.log(
879
+ JSON.stringify((await L()).listNlpgovTranslationsV2(), null, 2),
880
+ );
881
+ });
882
+ parent
883
+ .command("nlpgov-auto-stale-idle-v2")
884
+ .description("Auto-stale idle")
885
+ .action(async () => {
886
+ console.log(
887
+ JSON.stringify((await L()).autoStaleIdleNlpgovProfilesV2(), null, 2),
888
+ );
889
+ });
890
+ parent
891
+ .command("nlpgov-auto-fail-stuck-v2")
892
+ .description("Auto-fail stuck translations")
893
+ .action(async () => {
894
+ console.log(
895
+ JSON.stringify(
896
+ (await L()).autoFailStuckNlpgovTranslationsV2(),
897
+ null,
898
+ 2,
899
+ ),
900
+ );
901
+ });
902
+ parent
903
+ .command("nlpgov-gov-stats-v2")
904
+ .description("V2 gov stats")
905
+ .action(async () => {
906
+ console.log(
907
+ JSON.stringify((await L()).getNlProgrammingGovStatsV2(), null, 2),
908
+ );
909
+ });
910
+ }