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
@@ -756,3 +756,209 @@ export function registerKgCommand(program) {
756
756
  }
757
757
  });
758
758
  }
759
+
760
+ // === Iter16 V2 governance overlay ===
761
+ export function registerKgovV2Commands(program) {
762
+ const parent = program.commands.find((c) => c.name() === "kg");
763
+ if (!parent) return;
764
+ const L = async () => await import("../lib/knowledge-graph.js");
765
+ parent
766
+ .command("kgov-enums-v2")
767
+ .description("Show V2 enums (kgov maturity + import lifecycle)")
768
+ .action(async () => {
769
+ const m = await L();
770
+ console.log(
771
+ JSON.stringify(
772
+ {
773
+ profileMaturity: m.KGOV_PROFILE_MATURITY_V2,
774
+ importLifecycle: m.KGOV_IMPORT_LIFECYCLE_V2,
775
+ },
776
+ null,
777
+ 2,
778
+ ),
779
+ );
780
+ });
781
+ parent
782
+ .command("kgov-config-v2")
783
+ .description("Show V2 config thresholds")
784
+ .action(async () => {
785
+ const m = await L();
786
+ console.log(
787
+ JSON.stringify(
788
+ {
789
+ maxActive: m.getMaxActiveKgovProfilesPerOwnerV2(),
790
+ maxPending: m.getMaxPendingKgovImportsPerProfileV2(),
791
+ idleMs: m.getKgovProfileIdleMsV2(),
792
+ stuckMs: m.getKgovImportStuckMsV2(),
793
+ },
794
+ null,
795
+ 2,
796
+ ),
797
+ );
798
+ });
799
+ parent
800
+ .command("kgov-set-max-active-v2 <n>")
801
+ .description("Set max active profiles per owner")
802
+ .action(async (n) => {
803
+ const m = await L();
804
+ m.setMaxActiveKgovProfilesPerOwnerV2(Number(n));
805
+ console.log("ok");
806
+ });
807
+ parent
808
+ .command("kgov-set-max-pending-v2 <n>")
809
+ .description("Set max pending imports per profile")
810
+ .action(async (n) => {
811
+ const m = await L();
812
+ m.setMaxPendingKgovImportsPerProfileV2(Number(n));
813
+ console.log("ok");
814
+ });
815
+ parent
816
+ .command("kgov-set-idle-ms-v2 <n>")
817
+ .description("Set profile idle threshold (ms)")
818
+ .action(async (n) => {
819
+ const m = await L();
820
+ m.setKgovProfileIdleMsV2(Number(n));
821
+ console.log("ok");
822
+ });
823
+ parent
824
+ .command("kgov-set-stuck-ms-v2 <n>")
825
+ .description("Set import stuck threshold (ms)")
826
+ .action(async (n) => {
827
+ const m = await L();
828
+ m.setKgovImportStuckMsV2(Number(n));
829
+ console.log("ok");
830
+ });
831
+ parent
832
+ .command("kgov-register-v2 <id> <owner>")
833
+ .description("Register V2 kgov profile")
834
+ .option("--namespace <v>", "namespace")
835
+ .action(async (id, owner, o) => {
836
+ const m = await L();
837
+ console.log(
838
+ JSON.stringify(
839
+ m.registerKgovProfileV2({ id, owner, namespace: o.namespace }),
840
+ null,
841
+ 2,
842
+ ),
843
+ );
844
+ });
845
+ parent
846
+ .command("kgov-activate-v2 <id>")
847
+ .description("Activate profile")
848
+ .action(async (id) => {
849
+ const m = await L();
850
+ console.log(JSON.stringify(m.activateKgovProfileV2(id), null, 2));
851
+ });
852
+ parent
853
+ .command("kgov-stale-v2 <id>")
854
+ .description("Stale profile")
855
+ .action(async (id) => {
856
+ const m = await L();
857
+ console.log(JSON.stringify(m.staleKgovProfileV2(id), null, 2));
858
+ });
859
+ parent
860
+ .command("kgov-archive-v2 <id>")
861
+ .description("Archive profile (terminal)")
862
+ .action(async (id) => {
863
+ const m = await L();
864
+ console.log(JSON.stringify(m.archiveKgovProfileV2(id), null, 2));
865
+ });
866
+ parent
867
+ .command("kgov-touch-v2 <id>")
868
+ .description("Touch profile")
869
+ .action(async (id) => {
870
+ const m = await L();
871
+ console.log(JSON.stringify(m.touchKgovProfileV2(id), null, 2));
872
+ });
873
+ parent
874
+ .command("kgov-get-v2 <id>")
875
+ .description("Get profile")
876
+ .action(async (id) => {
877
+ const m = await L();
878
+ console.log(JSON.stringify(m.getKgovProfileV2(id), null, 2));
879
+ });
880
+ parent
881
+ .command("kgov-list-v2")
882
+ .description("List profiles")
883
+ .action(async () => {
884
+ const m = await L();
885
+ console.log(JSON.stringify(m.listKgovProfilesV2(), null, 2));
886
+ });
887
+ parent
888
+ .command("kgov-create-import-v2 <id> <profileId>")
889
+ .description("Create import (queued)")
890
+ .option("--source <v>", "source")
891
+ .action(async (id, profileId, o) => {
892
+ const m = await L();
893
+ console.log(
894
+ JSON.stringify(
895
+ m.createKgovImportV2({ id, profileId, source: o.source }),
896
+ null,
897
+ 2,
898
+ ),
899
+ );
900
+ });
901
+ parent
902
+ .command("kgov-importing-import-v2 <id>")
903
+ .description("Mark import as importing")
904
+ .action(async (id) => {
905
+ const m = await L();
906
+ console.log(JSON.stringify(m.importingKgovImportV2(id), null, 2));
907
+ });
908
+ parent
909
+ .command("kgov-complete-import-v2 <id>")
910
+ .description("Complete import")
911
+ .action(async (id) => {
912
+ const m = await L();
913
+ console.log(JSON.stringify(m.completeImportKgovV2(id), null, 2));
914
+ });
915
+ parent
916
+ .command("kgov-fail-import-v2 <id> [reason]")
917
+ .description("Fail import")
918
+ .action(async (id, reason) => {
919
+ const m = await L();
920
+ console.log(JSON.stringify(m.failKgovImportV2(id, reason), null, 2));
921
+ });
922
+ parent
923
+ .command("kgov-cancel-import-v2 <id> [reason]")
924
+ .description("Cancel import")
925
+ .action(async (id, reason) => {
926
+ const m = await L();
927
+ console.log(JSON.stringify(m.cancelKgovImportV2(id, reason), null, 2));
928
+ });
929
+ parent
930
+ .command("kgov-get-import-v2 <id>")
931
+ .description("Get import")
932
+ .action(async (id) => {
933
+ const m = await L();
934
+ console.log(JSON.stringify(m.getKgovImportV2(id), null, 2));
935
+ });
936
+ parent
937
+ .command("kgov-list-imports-v2")
938
+ .description("List imports")
939
+ .action(async () => {
940
+ const m = await L();
941
+ console.log(JSON.stringify(m.listKgovImportsV2(), null, 2));
942
+ });
943
+ parent
944
+ .command("kgov-auto-stale-idle-v2")
945
+ .description("Auto-stale idle profiles")
946
+ .action(async () => {
947
+ const m = await L();
948
+ console.log(JSON.stringify(m.autoStaleIdleKgovProfilesV2(), null, 2));
949
+ });
950
+ parent
951
+ .command("kgov-auto-fail-stuck-v2")
952
+ .description("Auto-fail stuck imports")
953
+ .action(async () => {
954
+ const m = await L();
955
+ console.log(JSON.stringify(m.autoFailStuckKgovImportsV2(), null, 2));
956
+ });
957
+ parent
958
+ .command("kgov-gov-stats-v2")
959
+ .description("V2 gov aggregate stats")
960
+ .action(async () => {
961
+ const m = await L();
962
+ console.log(JSON.stringify(m.getKnowledgeGraphGovStatsV2(), null, 2));
963
+ });
964
+ }
@@ -549,3 +549,220 @@ export function registerLlmCommand(program) {
549
549
  .description("Auto-fail stuck V2 requests")
550
550
  .action(() => out(autoFailStuckRequestsV2()));
551
551
  }
552
+
553
+ // === Iter22 V2 governance overlay ===
554
+ export function registerLlmgovV2Commands(program) {
555
+ const parent = program.commands.find((c) => c.name() === "llm");
556
+ if (!parent) return;
557
+ const L = async () => await import("../lib/llm-providers.js");
558
+ parent
559
+ .command("llmgov-enums-v2")
560
+ .description("Show V2 enums")
561
+ .action(async () => {
562
+ const m = await L();
563
+ console.log(
564
+ JSON.stringify(
565
+ {
566
+ profileMaturity: m.LLMGOV_PROFILE_MATURITY_V2,
567
+ completionLifecycle: m.LLMGOV_COMPLETION_LIFECYCLE_V2,
568
+ },
569
+ null,
570
+ 2,
571
+ ),
572
+ );
573
+ });
574
+ parent
575
+ .command("llmgov-config-v2")
576
+ .description("Show V2 config")
577
+ .action(async () => {
578
+ const m = await L();
579
+ console.log(
580
+ JSON.stringify(
581
+ {
582
+ maxActive: m.getMaxActiveLlmgovProfilesPerOwnerV2(),
583
+ maxPending: m.getMaxPendingLlmgovCompletionsPerProfileV2(),
584
+ idleMs: m.getLlmgovProfileIdleMsV2(),
585
+ stuckMs: m.getLlmgovCompletionStuckMsV2(),
586
+ },
587
+ null,
588
+ 2,
589
+ ),
590
+ );
591
+ });
592
+ parent
593
+ .command("llmgov-set-max-active-v2 <n>")
594
+ .description("Set max active")
595
+ .action(async (n) => {
596
+ (await L()).setMaxActiveLlmgovProfilesPerOwnerV2(Number(n));
597
+ console.log("ok");
598
+ });
599
+ parent
600
+ .command("llmgov-set-max-pending-v2 <n>")
601
+ .description("Set max pending")
602
+ .action(async (n) => {
603
+ (await L()).setMaxPendingLlmgovCompletionsPerProfileV2(Number(n));
604
+ console.log("ok");
605
+ });
606
+ parent
607
+ .command("llmgov-set-idle-ms-v2 <n>")
608
+ .description("Set idle threshold ms")
609
+ .action(async (n) => {
610
+ (await L()).setLlmgovProfileIdleMsV2(Number(n));
611
+ console.log("ok");
612
+ });
613
+ parent
614
+ .command("llmgov-set-stuck-ms-v2 <n>")
615
+ .description("Set stuck threshold ms")
616
+ .action(async (n) => {
617
+ (await L()).setLlmgovCompletionStuckMsV2(Number(n));
618
+ console.log("ok");
619
+ });
620
+ parent
621
+ .command("llmgov-register-v2 <id> <owner>")
622
+ .description("Register V2 profile")
623
+ .option("--provider <v>", "provider")
624
+ .action(async (id, owner, o) => {
625
+ const m = await L();
626
+ console.log(
627
+ JSON.stringify(
628
+ m.registerLlmgovProfileV2({ id, owner, provider: o.provider }),
629
+ null,
630
+ 2,
631
+ ),
632
+ );
633
+ });
634
+ parent
635
+ .command("llmgov-activate-v2 <id>")
636
+ .description("Activate profile")
637
+ .action(async (id) => {
638
+ console.log(
639
+ JSON.stringify((await L()).activateLlmgovProfileV2(id), null, 2),
640
+ );
641
+ });
642
+ parent
643
+ .command("llmgov-degrade-v2 <id>")
644
+ .description("Degrade profile")
645
+ .action(async (id) => {
646
+ console.log(
647
+ JSON.stringify((await L()).degradeLlmgovProfileV2(id), null, 2),
648
+ );
649
+ });
650
+ parent
651
+ .command("llmgov-archive-v2 <id>")
652
+ .description("Archive profile")
653
+ .action(async (id) => {
654
+ console.log(
655
+ JSON.stringify((await L()).archiveLlmgovProfileV2(id), null, 2),
656
+ );
657
+ });
658
+ parent
659
+ .command("llmgov-touch-v2 <id>")
660
+ .description("Touch profile")
661
+ .action(async (id) => {
662
+ console.log(
663
+ JSON.stringify((await L()).touchLlmgovProfileV2(id), null, 2),
664
+ );
665
+ });
666
+ parent
667
+ .command("llmgov-get-v2 <id>")
668
+ .description("Get profile")
669
+ .action(async (id) => {
670
+ console.log(JSON.stringify((await L()).getLlmgovProfileV2(id), null, 2));
671
+ });
672
+ parent
673
+ .command("llmgov-list-v2")
674
+ .description("List profiles")
675
+ .action(async () => {
676
+ console.log(JSON.stringify((await L()).listLlmgovProfilesV2(), null, 2));
677
+ });
678
+ parent
679
+ .command("llmgov-create-completion-v2 <id> <profileId>")
680
+ .description("Create completion")
681
+ .option("--model <v>", "model")
682
+ .action(async (id, profileId, o) => {
683
+ const m = await L();
684
+ console.log(
685
+ JSON.stringify(
686
+ m.createLlmgovCompletionV2({ id, profileId, model: o.model }),
687
+ null,
688
+ 2,
689
+ ),
690
+ );
691
+ });
692
+ parent
693
+ .command("llmgov-inferring-completion-v2 <id>")
694
+ .description("Mark completion as inferring")
695
+ .action(async (id) => {
696
+ console.log(
697
+ JSON.stringify((await L()).inferringLlmgovCompletionV2(id), null, 2),
698
+ );
699
+ });
700
+ parent
701
+ .command("llmgov-complete-completion-v2 <id>")
702
+ .description("Complete completion")
703
+ .action(async (id) => {
704
+ console.log(
705
+ JSON.stringify((await L()).completeCompletionLlmgovV2(id), null, 2),
706
+ );
707
+ });
708
+ parent
709
+ .command("llmgov-fail-completion-v2 <id> [reason]")
710
+ .description("Fail completion")
711
+ .action(async (id, reason) => {
712
+ console.log(
713
+ JSON.stringify((await L()).failLlmgovCompletionV2(id, reason), null, 2),
714
+ );
715
+ });
716
+ parent
717
+ .command("llmgov-cancel-completion-v2 <id> [reason]")
718
+ .description("Cancel completion")
719
+ .action(async (id, reason) => {
720
+ console.log(
721
+ JSON.stringify(
722
+ (await L()).cancelLlmgovCompletionV2(id, reason),
723
+ null,
724
+ 2,
725
+ ),
726
+ );
727
+ });
728
+ parent
729
+ .command("llmgov-get-completion-v2 <id>")
730
+ .description("Get completion")
731
+ .action(async (id) => {
732
+ console.log(
733
+ JSON.stringify((await L()).getLlmgovCompletionV2(id), null, 2),
734
+ );
735
+ });
736
+ parent
737
+ .command("llmgov-list-completions-v2")
738
+ .description("List completions")
739
+ .action(async () => {
740
+ console.log(
741
+ JSON.stringify((await L()).listLlmgovCompletionsV2(), null, 2),
742
+ );
743
+ });
744
+ parent
745
+ .command("llmgov-auto-degrade-idle-v2")
746
+ .description("Auto-degrade idle")
747
+ .action(async () => {
748
+ console.log(
749
+ JSON.stringify((await L()).autoDegradeIdleLlmgovProfilesV2(), null, 2),
750
+ );
751
+ });
752
+ parent
753
+ .command("llmgov-auto-fail-stuck-v2")
754
+ .description("Auto-fail stuck completions")
755
+ .action(async () => {
756
+ console.log(
757
+ JSON.stringify((await L()).autoFailStuckLlmgovCompletionsV2(), null, 2),
758
+ );
759
+ });
760
+ parent
761
+ .command("llmgov-gov-stats-v2")
762
+ .description("V2 gov stats")
763
+ .action(async () => {
764
+ console.log(
765
+ JSON.stringify((await L()).getLlmProvidersGovStatsV2(), null, 2),
766
+ );
767
+ });
768
+ }
@@ -694,42 +694,199 @@ export function registerLowcodeCommand(program) {
694
694
 
695
695
  function _registerAppBuilderV2Commands(parent) {
696
696
  const L = async () => await import("../lib/app-builder.js");
697
- parent.command("enums-v2").description("Show V2 enums (app maturity + build lifecycle)")
698
- .action(async () => { const m = await L(); console.log(JSON.stringify({ appMaturity: m.APP_MATURITY_V2, buildLifecycle: m.APP_BUILD_LIFECYCLE_V2 }, null, 2)); });
699
- parent.command("config-v2").description("Show V2 config thresholds")
700
- .action(async () => { const m = await L(); console.log(JSON.stringify({ maxActiveAppsPerOwner: m.getMaxActiveAppsPerOwnerV2(), maxPendingAppBuildsPerApp: m.getMaxPendingAppBuildsPerAppV2(), appIdleMs: m.getAppIdleMsV2(), appBuildStuckMs: m.getAppBuildStuckMsV2() }, null, 2)); });
701
- parent.command("set-max-active-apps-v2 <n>").description("Set max active apps per owner")
702
- .action(async (n) => { const m = await L(); m.setMaxActiveAppsPerOwnerV2(Number(n)); console.log("ok"); });
703
- parent.command("set-max-pending-builds-v2 <n>").description("Set max pending builds per app")
704
- .action(async (n) => { const m = await L(); m.setMaxPendingAppBuildsPerAppV2(Number(n)); console.log("ok"); });
705
- parent.command("set-app-idle-ms-v2 <n>").description("Set app idle threshold (ms)")
706
- .action(async (n) => { const m = await L(); m.setAppIdleMsV2(Number(n)); console.log("ok"); });
707
- parent.command("set-build-stuck-ms-v2 <n>").description("Set build stuck threshold (ms)")
708
- .action(async (n) => { const m = await L(); m.setAppBuildStuckMsV2(Number(n)); console.log("ok"); });
709
- parent.command("register-app-v2 <id> <owner>").description("Register V2 app")
710
- .option("--name <n>", "App name").action(async (id, owner, o) => { const m = await L(); console.log(JSON.stringify(m.registerAppV2({ id, owner, name: o.name }), null, 2)); });
711
- parent.command("activate-app-v2 <id>").description("Activate app")
712
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.activateAppV2(id), null, 2)); });
713
- parent.command("pause-app-v2 <id>").description("Pause app")
714
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.pauseAppV2(id), null, 2)); });
715
- parent.command("archive-app-v2 <id>").description("Archive app (terminal)")
716
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.archiveAppV2(id), null, 2)); });
717
- parent.command("touch-app-v2 <id>").description("Touch app lastTouchedAt")
718
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.touchAppV2(id), null, 2)); });
719
- parent.command("get-app-v2 <id>").description("Get V2 app").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getAppV2(id), null, 2)); });
720
- parent.command("list-apps-v2").description("List V2 apps").action(async () => { const m = await L(); console.log(JSON.stringify(m.listAppsV2(), null, 2)); });
721
- parent.command("create-build-v2 <id> <appId>").description("Create V2 app build (queued)")
722
- .option("--target <t>", "Target", "web").action(async (id, appId, o) => { const m = await L(); console.log(JSON.stringify(m.createAppBuildV2({ id, appId, target: o.target }), null, 2)); });
723
- parent.command("start-build-v2 <id>").description("Start build").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.startAppBuildV2(id), null, 2)); });
724
- parent.command("succeed-build-v2 <id>").description("Succeed build").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.succeedAppBuildV2(id), null, 2)); });
725
- parent.command("fail-build-v2 <id> [reason]").description("Fail build").action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.failAppBuildV2(id, reason), null, 2)); });
726
- parent.command("cancel-build-v2 <id> [reason]").description("Cancel build").action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.cancelAppBuildV2(id, reason), null, 2)); });
727
- parent.command("get-build-v2 <id>").description("Get V2 build").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getAppBuildV2(id), null, 2)); });
728
- parent.command("list-builds-v2").description("List V2 builds").action(async () => { const m = await L(); console.log(JSON.stringify(m.listAppBuildsV2(), null, 2)); });
729
- parent.command("auto-pause-idle-v2").description("Auto-pause idle active apps")
730
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoPauseIdleAppsV2(), null, 2)); });
731
- parent.command("auto-fail-stuck-v2").description("Auto-fail stuck building builds")
732
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoFailStuckAppBuildsV2(), null, 2)); });
733
- parent.command("gov-stats-v2").description("V2 governance aggregate stats")
734
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.getAppBuilderGovStatsV2(), null, 2)); });
697
+ parent
698
+ .command("enums-v2")
699
+ .description("Show V2 enums (app maturity + build lifecycle)")
700
+ .action(async () => {
701
+ const m = await L();
702
+ console.log(
703
+ JSON.stringify(
704
+ {
705
+ appMaturity: m.APP_MATURITY_V2,
706
+ buildLifecycle: m.APP_BUILD_LIFECYCLE_V2,
707
+ },
708
+ null,
709
+ 2,
710
+ ),
711
+ );
712
+ });
713
+ parent
714
+ .command("config-v2")
715
+ .description("Show V2 config thresholds")
716
+ .action(async () => {
717
+ const m = await L();
718
+ console.log(
719
+ JSON.stringify(
720
+ {
721
+ maxActiveAppsPerOwner: m.getMaxActiveAppsPerOwnerV2(),
722
+ maxPendingAppBuildsPerApp: m.getMaxPendingAppBuildsPerAppV2(),
723
+ appIdleMs: m.getAppIdleMsV2(),
724
+ appBuildStuckMs: m.getAppBuildStuckMsV2(),
725
+ },
726
+ null,
727
+ 2,
728
+ ),
729
+ );
730
+ });
731
+ parent
732
+ .command("set-max-active-apps-v2 <n>")
733
+ .description("Set max active apps per owner")
734
+ .action(async (n) => {
735
+ const m = await L();
736
+ m.setMaxActiveAppsPerOwnerV2(Number(n));
737
+ console.log("ok");
738
+ });
739
+ parent
740
+ .command("set-max-pending-builds-v2 <n>")
741
+ .description("Set max pending builds per app")
742
+ .action(async (n) => {
743
+ const m = await L();
744
+ m.setMaxPendingAppBuildsPerAppV2(Number(n));
745
+ console.log("ok");
746
+ });
747
+ parent
748
+ .command("set-app-idle-ms-v2 <n>")
749
+ .description("Set app idle threshold (ms)")
750
+ .action(async (n) => {
751
+ const m = await L();
752
+ m.setAppIdleMsV2(Number(n));
753
+ console.log("ok");
754
+ });
755
+ parent
756
+ .command("set-build-stuck-ms-v2 <n>")
757
+ .description("Set build stuck threshold (ms)")
758
+ .action(async (n) => {
759
+ const m = await L();
760
+ m.setAppBuildStuckMsV2(Number(n));
761
+ console.log("ok");
762
+ });
763
+ parent
764
+ .command("register-app-v2 <id> <owner>")
765
+ .description("Register V2 app")
766
+ .option("--name <n>", "App name")
767
+ .action(async (id, owner, o) => {
768
+ const m = await L();
769
+ console.log(
770
+ JSON.stringify(m.registerAppV2({ id, owner, name: o.name }), null, 2),
771
+ );
772
+ });
773
+ parent
774
+ .command("activate-app-v2 <id>")
775
+ .description("Activate app")
776
+ .action(async (id) => {
777
+ const m = await L();
778
+ console.log(JSON.stringify(m.activateAppV2(id), null, 2));
779
+ });
780
+ parent
781
+ .command("pause-app-v2 <id>")
782
+ .description("Pause app")
783
+ .action(async (id) => {
784
+ const m = await L();
785
+ console.log(JSON.stringify(m.pauseAppV2(id), null, 2));
786
+ });
787
+ parent
788
+ .command("archive-app-v2 <id>")
789
+ .description("Archive app (terminal)")
790
+ .action(async (id) => {
791
+ const m = await L();
792
+ console.log(JSON.stringify(m.archiveAppV2(id), null, 2));
793
+ });
794
+ parent
795
+ .command("touch-app-v2 <id>")
796
+ .description("Touch app lastTouchedAt")
797
+ .action(async (id) => {
798
+ const m = await L();
799
+ console.log(JSON.stringify(m.touchAppV2(id), null, 2));
800
+ });
801
+ parent
802
+ .command("get-app-v2 <id>")
803
+ .description("Get V2 app")
804
+ .action(async (id) => {
805
+ const m = await L();
806
+ console.log(JSON.stringify(m.getAppV2(id), null, 2));
807
+ });
808
+ parent
809
+ .command("list-apps-v2")
810
+ .description("List V2 apps")
811
+ .action(async () => {
812
+ const m = await L();
813
+ console.log(JSON.stringify(m.listAppsV2(), null, 2));
814
+ });
815
+ parent
816
+ .command("create-build-v2 <id> <appId>")
817
+ .description("Create V2 app build (queued)")
818
+ .option("--target <t>", "Target", "web")
819
+ .action(async (id, appId, o) => {
820
+ const m = await L();
821
+ console.log(
822
+ JSON.stringify(
823
+ m.createAppBuildV2({ id, appId, target: o.target }),
824
+ null,
825
+ 2,
826
+ ),
827
+ );
828
+ });
829
+ parent
830
+ .command("start-build-v2 <id>")
831
+ .description("Start build")
832
+ .action(async (id) => {
833
+ const m = await L();
834
+ console.log(JSON.stringify(m.startAppBuildV2(id), null, 2));
835
+ });
836
+ parent
837
+ .command("succeed-build-v2 <id>")
838
+ .description("Succeed build")
839
+ .action(async (id) => {
840
+ const m = await L();
841
+ console.log(JSON.stringify(m.succeedAppBuildV2(id), null, 2));
842
+ });
843
+ parent
844
+ .command("fail-build-v2 <id> [reason]")
845
+ .description("Fail build")
846
+ .action(async (id, reason) => {
847
+ const m = await L();
848
+ console.log(JSON.stringify(m.failAppBuildV2(id, reason), null, 2));
849
+ });
850
+ parent
851
+ .command("cancel-build-v2 <id> [reason]")
852
+ .description("Cancel build")
853
+ .action(async (id, reason) => {
854
+ const m = await L();
855
+ console.log(JSON.stringify(m.cancelAppBuildV2(id, reason), null, 2));
856
+ });
857
+ parent
858
+ .command("get-build-v2 <id>")
859
+ .description("Get V2 build")
860
+ .action(async (id) => {
861
+ const m = await L();
862
+ console.log(JSON.stringify(m.getAppBuildV2(id), null, 2));
863
+ });
864
+ parent
865
+ .command("list-builds-v2")
866
+ .description("List V2 builds")
867
+ .action(async () => {
868
+ const m = await L();
869
+ console.log(JSON.stringify(m.listAppBuildsV2(), null, 2));
870
+ });
871
+ parent
872
+ .command("auto-pause-idle-v2")
873
+ .description("Auto-pause idle active apps")
874
+ .action(async () => {
875
+ const m = await L();
876
+ console.log(JSON.stringify(m.autoPauseIdleAppsV2(), null, 2));
877
+ });
878
+ parent
879
+ .command("auto-fail-stuck-v2")
880
+ .description("Auto-fail stuck building builds")
881
+ .action(async () => {
882
+ const m = await L();
883
+ console.log(JSON.stringify(m.autoFailStuckAppBuildsV2(), null, 2));
884
+ });
885
+ parent
886
+ .command("gov-stats-v2")
887
+ .description("V2 governance aggregate stats")
888
+ .action(async () => {
889
+ const m = await L();
890
+ console.log(JSON.stringify(m.getAppBuilderGovStatsV2(), null, 2));
891
+ });
735
892
  }