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
@@ -216,45 +216,185 @@ export function registerGitCommand(program) {
216
216
  _registerGitV2(git);
217
217
  }
218
218
 
219
-
220
219
  import {
221
- GIT_REPO_MATURITY_V2, GIT_COMMIT_LIFECYCLE_V2,
222
- setMaxActiveGitReposPerOwnerV2, setMaxPendingGitCommitsPerRepoV2, setGitRepoIdleMsV2, setGitCommitStuckMsV2,
223
- registerGitRepoV2, activateGitRepoV2, archiveGitRepoV2, decommissionGitRepoV2, touchGitRepoV2, getGitRepoV2, listGitReposV2,
224
- createGitCommitV2, startGitCommitV2, commitGitCommitV2, failGitCommitV2, cancelGitCommitV2, getGitCommitV2, listGitCommitsV2,
225
- autoArchiveIdleGitReposV2, autoFailStuckGitCommitsV2, getGitIntegrationGovStatsV2,
220
+ GIT_REPO_MATURITY_V2,
221
+ GIT_COMMIT_LIFECYCLE_V2,
222
+ setMaxActiveGitReposPerOwnerV2,
223
+ setMaxPendingGitCommitsPerRepoV2,
224
+ setGitRepoIdleMsV2,
225
+ setGitCommitStuckMsV2,
226
+ registerGitRepoV2,
227
+ activateGitRepoV2,
228
+ archiveGitRepoV2,
229
+ decommissionGitRepoV2,
230
+ touchGitRepoV2,
231
+ getGitRepoV2,
232
+ listGitReposV2,
233
+ createGitCommitV2,
234
+ startGitCommitV2,
235
+ commitGitCommitV2,
236
+ failGitCommitV2,
237
+ cancelGitCommitV2,
238
+ getGitCommitV2,
239
+ listGitCommitsV2,
240
+ autoArchiveIdleGitReposV2,
241
+ autoFailStuckGitCommitsV2,
242
+ getGitIntegrationGovStatsV2,
226
243
  } from "../lib/git-integration.js";
227
244
 
228
245
  function _registerGitV2(parent) {
229
- parent.command("enums-v2").description("List Git V2 enums").option("--json", "JSON").action((opts) => {
230
- const out = { repoMaturity: GIT_REPO_MATURITY_V2, commitLifecycle: GIT_COMMIT_LIFECYCLE_V2 };
231
- if (opts.json) console.log(JSON.stringify(out, null, 2)); else console.log(out);
232
- });
233
- parent.command("config-set-v2").description("Set Git V2 caps/thresholds").option("--max-active <n>", "max active repos per owner").option("--max-pending <n>", "max pending commits per repo").option("--idle-ms <n>", "repo idle ms").option("--stuck-ms <n>", "commit stuck ms").action((opts) => {
234
- if (opts.maxActive) setMaxActiveGitReposPerOwnerV2(parseInt(opts.maxActive, 10));
235
- if (opts.maxPending) setMaxPendingGitCommitsPerRepoV2(parseInt(opts.maxPending, 10));
236
- if (opts.idleMs) setGitRepoIdleMsV2(parseInt(opts.idleMs, 10));
237
- if (opts.stuckMs) setGitCommitStuckMsV2(parseInt(opts.stuckMs, 10));
238
- console.log("ok");
239
- });
240
- parent.command("register-repo-v2 <id>").description("Register Git V2 repo").requiredOption("--owner <owner>", "owner").option("--branch <branch>", "branch").option("--json", "JSON").action((id, opts) => {
241
- const r = registerGitRepoV2({ id, owner: opts.owner, branch: opts.branch });
242
- if (opts.json) console.log(JSON.stringify(r, null, 2)); else console.log(r);
243
- });
244
- parent.command("activate-repo-v2 <id>").description("Activate Git V2 repo").action((id) => { console.log(activateGitRepoV2(id)); });
245
- parent.command("archive-repo-v2 <id>").description("Archive Git V2 repo").action((id) => { console.log(archiveGitRepoV2(id)); });
246
- parent.command("decommission-repo-v2 <id>").description("Decommission Git V2 repo").action((id) => { console.log(decommissionGitRepoV2(id)); });
247
- parent.command("touch-repo-v2 <id>").description("Touch Git V2 repo").action((id) => { console.log(touchGitRepoV2(id)); });
248
- parent.command("get-repo-v2 <id>").description("Get Git V2 repo").option("--json", "JSON").action((id, opts) => { const r = getGitRepoV2(id); if (opts.json) console.log(JSON.stringify(r, null, 2)); else console.log(r); });
249
- parent.command("list-repos-v2").description("List Git V2 repos").option("--json", "JSON").action((opts) => { const r = listGitReposV2(); if (opts.json) console.log(JSON.stringify(r, null, 2)); else console.log(r); });
250
- parent.command("create-commit-v2 <id>").description("Create Git V2 commit").requiredOption("--repo-id <repoId>", "repo id").option("--message <msg>", "commit message").action((id, opts) => { console.log(createGitCommitV2({ id, repoId: opts.repoId, message: opts.message })); });
251
- parent.command("start-commit-v2 <id>").description("Start Git V2 commit").action((id) => { console.log(startGitCommitV2(id)); });
252
- parent.command("commit-commit-v2 <id>").description("Commit Git V2 commit").action((id) => { console.log(commitGitCommitV2(id)); });
253
- parent.command("fail-commit-v2 <id>").description("Fail Git V2 commit").option("--reason <r>", "reason").action((id, opts) => { console.log(failGitCommitV2(id, opts.reason)); });
254
- parent.command("cancel-commit-v2 <id>").description("Cancel Git V2 commit").option("--reason <r>", "reason").action((id, opts) => { console.log(cancelGitCommitV2(id, opts.reason)); });
255
- parent.command("get-commit-v2 <id>").description("Get Git V2 commit").action((id) => { console.log(getGitCommitV2(id)); });
256
- parent.command("list-commits-v2").description("List Git V2 commits").action(() => { console.log(listGitCommitsV2()); });
257
- parent.command("auto-archive-repos-v2").description("Auto-archive idle Git V2 repos").action(() => { console.log(autoArchiveIdleGitReposV2()); });
258
- parent.command("auto-fail-commits-v2").description("Auto-fail stuck Git V2 commits").action(() => { console.log(autoFailStuckGitCommitsV2()); });
259
- parent.command("gov-stats-v2").description("Git V2 governance stats").option("--json", "JSON").action((opts) => { const s = getGitIntegrationGovStatsV2(); if (opts.json) console.log(JSON.stringify(s, null, 2)); else console.log(s); });
246
+ parent
247
+ .command("enums-v2")
248
+ .description("List Git V2 enums")
249
+ .option("--json", "JSON")
250
+ .action((opts) => {
251
+ const out = {
252
+ repoMaturity: GIT_REPO_MATURITY_V2,
253
+ commitLifecycle: GIT_COMMIT_LIFECYCLE_V2,
254
+ };
255
+ if (opts.json) console.log(JSON.stringify(out, null, 2));
256
+ else console.log(out);
257
+ });
258
+ parent
259
+ .command("config-set-v2")
260
+ .description("Set Git V2 caps/thresholds")
261
+ .option("--max-active <n>", "max active repos per owner")
262
+ .option("--max-pending <n>", "max pending commits per repo")
263
+ .option("--idle-ms <n>", "repo idle ms")
264
+ .option("--stuck-ms <n>", "commit stuck ms")
265
+ .action((opts) => {
266
+ if (opts.maxActive)
267
+ setMaxActiveGitReposPerOwnerV2(parseInt(opts.maxActive, 10));
268
+ if (opts.maxPending)
269
+ setMaxPendingGitCommitsPerRepoV2(parseInt(opts.maxPending, 10));
270
+ if (opts.idleMs) setGitRepoIdleMsV2(parseInt(opts.idleMs, 10));
271
+ if (opts.stuckMs) setGitCommitStuckMsV2(parseInt(opts.stuckMs, 10));
272
+ console.log("ok");
273
+ });
274
+ parent
275
+ .command("register-repo-v2 <id>")
276
+ .description("Register Git V2 repo")
277
+ .requiredOption("--owner <owner>", "owner")
278
+ .option("--branch <branch>", "branch")
279
+ .option("--json", "JSON")
280
+ .action((id, opts) => {
281
+ const r = registerGitRepoV2({
282
+ id,
283
+ owner: opts.owner,
284
+ branch: opts.branch,
285
+ });
286
+ if (opts.json) console.log(JSON.stringify(r, null, 2));
287
+ else console.log(r);
288
+ });
289
+ parent
290
+ .command("activate-repo-v2 <id>")
291
+ .description("Activate Git V2 repo")
292
+ .action((id) => {
293
+ console.log(activateGitRepoV2(id));
294
+ });
295
+ parent
296
+ .command("archive-repo-v2 <id>")
297
+ .description("Archive Git V2 repo")
298
+ .action((id) => {
299
+ console.log(archiveGitRepoV2(id));
300
+ });
301
+ parent
302
+ .command("decommission-repo-v2 <id>")
303
+ .description("Decommission Git V2 repo")
304
+ .action((id) => {
305
+ console.log(decommissionGitRepoV2(id));
306
+ });
307
+ parent
308
+ .command("touch-repo-v2 <id>")
309
+ .description("Touch Git V2 repo")
310
+ .action((id) => {
311
+ console.log(touchGitRepoV2(id));
312
+ });
313
+ parent
314
+ .command("get-repo-v2 <id>")
315
+ .description("Get Git V2 repo")
316
+ .option("--json", "JSON")
317
+ .action((id, opts) => {
318
+ const r = getGitRepoV2(id);
319
+ if (opts.json) console.log(JSON.stringify(r, null, 2));
320
+ else console.log(r);
321
+ });
322
+ parent
323
+ .command("list-repos-v2")
324
+ .description("List Git V2 repos")
325
+ .option("--json", "JSON")
326
+ .action((opts) => {
327
+ const r = listGitReposV2();
328
+ if (opts.json) console.log(JSON.stringify(r, null, 2));
329
+ else console.log(r);
330
+ });
331
+ parent
332
+ .command("create-commit-v2 <id>")
333
+ .description("Create Git V2 commit")
334
+ .requiredOption("--repo-id <repoId>", "repo id")
335
+ .option("--message <msg>", "commit message")
336
+ .action((id, opts) => {
337
+ console.log(
338
+ createGitCommitV2({ id, repoId: opts.repoId, message: opts.message }),
339
+ );
340
+ });
341
+ parent
342
+ .command("start-commit-v2 <id>")
343
+ .description("Start Git V2 commit")
344
+ .action((id) => {
345
+ console.log(startGitCommitV2(id));
346
+ });
347
+ parent
348
+ .command("commit-commit-v2 <id>")
349
+ .description("Commit Git V2 commit")
350
+ .action((id) => {
351
+ console.log(commitGitCommitV2(id));
352
+ });
353
+ parent
354
+ .command("fail-commit-v2 <id>")
355
+ .description("Fail Git V2 commit")
356
+ .option("--reason <r>", "reason")
357
+ .action((id, opts) => {
358
+ console.log(failGitCommitV2(id, opts.reason));
359
+ });
360
+ parent
361
+ .command("cancel-commit-v2 <id>")
362
+ .description("Cancel Git V2 commit")
363
+ .option("--reason <r>", "reason")
364
+ .action((id, opts) => {
365
+ console.log(cancelGitCommitV2(id, opts.reason));
366
+ });
367
+ parent
368
+ .command("get-commit-v2 <id>")
369
+ .description("Get Git V2 commit")
370
+ .action((id) => {
371
+ console.log(getGitCommitV2(id));
372
+ });
373
+ parent
374
+ .command("list-commits-v2")
375
+ .description("List Git V2 commits")
376
+ .action(() => {
377
+ console.log(listGitCommitsV2());
378
+ });
379
+ parent
380
+ .command("auto-archive-repos-v2")
381
+ .description("Auto-archive idle Git V2 repos")
382
+ .action(() => {
383
+ console.log(autoArchiveIdleGitReposV2());
384
+ });
385
+ parent
386
+ .command("auto-fail-commits-v2")
387
+ .description("Auto-fail stuck Git V2 commits")
388
+ .action(() => {
389
+ console.log(autoFailStuckGitCommitsV2());
390
+ });
391
+ parent
392
+ .command("gov-stats-v2")
393
+ .description("Git V2 governance stats")
394
+ .option("--json", "JSON")
395
+ .action((opts) => {
396
+ const s = getGitIntegrationGovStatsV2();
397
+ if (opts.json) console.log(JSON.stringify(s, null, 2));
398
+ else console.log(s);
399
+ });
260
400
  }
@@ -828,3 +828,212 @@ export function registerGovernanceCommand(program) {
828
828
  console.log(JSON.stringify(getGovernanceStatsV2(), null, 2));
829
829
  });
830
830
  }
831
+
832
+ // === Iter19 V2 governance overlay ===
833
+ export function registerCommgovV2Commands(program) {
834
+ const parent = program.commands.find((c) => c.name() === "governance");
835
+ if (!parent) return;
836
+ const L = async () => await import("../lib/community-governance.js");
837
+ parent
838
+ .command("commgov-enums-v2")
839
+ .description("Show V2 enums")
840
+ .action(async () => {
841
+ const m = await L();
842
+ console.log(
843
+ JSON.stringify(
844
+ {
845
+ profileMaturity: m.COMMGOV_PROFILE_MATURITY_V2,
846
+ motionLifecycle: m.COMMGOV_MOTION_LIFECYCLE_V2,
847
+ },
848
+ null,
849
+ 2,
850
+ ),
851
+ );
852
+ });
853
+ parent
854
+ .command("commgov-config-v2")
855
+ .description("Show V2 config")
856
+ .action(async () => {
857
+ const m = await L();
858
+ console.log(
859
+ JSON.stringify(
860
+ {
861
+ maxActive: m.getMaxActiveCommgovProfilesPerOwnerV2(),
862
+ maxPending: m.getMaxPendingCommgovMotionsPerProfileV2(),
863
+ idleMs: m.getCommgovProfileIdleMsV2(),
864
+ stuckMs: m.getCommgovMotionStuckMsV2(),
865
+ },
866
+ null,
867
+ 2,
868
+ ),
869
+ );
870
+ });
871
+ parent
872
+ .command("commgov-set-max-active-v2 <n>")
873
+ .description("Set max active")
874
+ .action(async (n) => {
875
+ (await L()).setMaxActiveCommgovProfilesPerOwnerV2(Number(n));
876
+ console.log("ok");
877
+ });
878
+ parent
879
+ .command("commgov-set-max-pending-v2 <n>")
880
+ .description("Set max pending")
881
+ .action(async (n) => {
882
+ (await L()).setMaxPendingCommgovMotionsPerProfileV2(Number(n));
883
+ console.log("ok");
884
+ });
885
+ parent
886
+ .command("commgov-set-idle-ms-v2 <n>")
887
+ .description("Set idle threshold ms")
888
+ .action(async (n) => {
889
+ (await L()).setCommgovProfileIdleMsV2(Number(n));
890
+ console.log("ok");
891
+ });
892
+ parent
893
+ .command("commgov-set-stuck-ms-v2 <n>")
894
+ .description("Set stuck threshold ms")
895
+ .action(async (n) => {
896
+ (await L()).setCommgovMotionStuckMsV2(Number(n));
897
+ console.log("ok");
898
+ });
899
+ parent
900
+ .command("commgov-register-v2 <id> <owner>")
901
+ .description("Register V2 profile")
902
+ .option("--chamber <v>", "chamber")
903
+ .action(async (id, owner, o) => {
904
+ const m = await L();
905
+ console.log(
906
+ JSON.stringify(
907
+ m.registerCommgovProfileV2({ id, owner, chamber: o.chamber }),
908
+ null,
909
+ 2,
910
+ ),
911
+ );
912
+ });
913
+ parent
914
+ .command("commgov-activate-v2 <id>")
915
+ .description("Activate profile")
916
+ .action(async (id) => {
917
+ console.log(
918
+ JSON.stringify((await L()).activateCommgovProfileV2(id), null, 2),
919
+ );
920
+ });
921
+ parent
922
+ .command("commgov-pause-v2 <id>")
923
+ .description("Pause profile")
924
+ .action(async (id) => {
925
+ console.log(
926
+ JSON.stringify((await L()).pauseCommgovProfileV2(id), null, 2),
927
+ );
928
+ });
929
+ parent
930
+ .command("commgov-archive-v2 <id>")
931
+ .description("Archive profile")
932
+ .action(async (id) => {
933
+ console.log(
934
+ JSON.stringify((await L()).archiveCommgovProfileV2(id), null, 2),
935
+ );
936
+ });
937
+ parent
938
+ .command("commgov-touch-v2 <id>")
939
+ .description("Touch profile")
940
+ .action(async (id) => {
941
+ console.log(
942
+ JSON.stringify((await L()).touchCommgovProfileV2(id), null, 2),
943
+ );
944
+ });
945
+ parent
946
+ .command("commgov-get-v2 <id>")
947
+ .description("Get profile")
948
+ .action(async (id) => {
949
+ console.log(JSON.stringify((await L()).getCommgovProfileV2(id), null, 2));
950
+ });
951
+ parent
952
+ .command("commgov-list-v2")
953
+ .description("List profiles")
954
+ .action(async () => {
955
+ console.log(JSON.stringify((await L()).listCommgovProfilesV2(), null, 2));
956
+ });
957
+ parent
958
+ .command("commgov-create-motion-v2 <id> <profileId>")
959
+ .description("Create motion")
960
+ .option("--subject <v>", "subject")
961
+ .action(async (id, profileId, o) => {
962
+ const m = await L();
963
+ console.log(
964
+ JSON.stringify(
965
+ m.createCommgovMotionV2({ id, profileId, subject: o.subject }),
966
+ null,
967
+ 2,
968
+ ),
969
+ );
970
+ });
971
+ parent
972
+ .command("commgov-voting-motion-v2 <id>")
973
+ .description("Mark motion as voting")
974
+ .action(async (id) => {
975
+ console.log(
976
+ JSON.stringify((await L()).votingCommgovMotionV2(id), null, 2),
977
+ );
978
+ });
979
+ parent
980
+ .command("commgov-complete-motion-v2 <id>")
981
+ .description("Complete motion")
982
+ .action(async (id) => {
983
+ console.log(
984
+ JSON.stringify((await L()).completeMotionCommgovV2(id), null, 2),
985
+ );
986
+ });
987
+ parent
988
+ .command("commgov-fail-motion-v2 <id> [reason]")
989
+ .description("Fail motion")
990
+ .action(async (id, reason) => {
991
+ console.log(
992
+ JSON.stringify((await L()).failCommgovMotionV2(id, reason), null, 2),
993
+ );
994
+ });
995
+ parent
996
+ .command("commgov-cancel-motion-v2 <id> [reason]")
997
+ .description("Cancel motion")
998
+ .action(async (id, reason) => {
999
+ console.log(
1000
+ JSON.stringify((await L()).cancelCommgovMotionV2(id, reason), null, 2),
1001
+ );
1002
+ });
1003
+ parent
1004
+ .command("commgov-get-motion-v2 <id>")
1005
+ .description("Get motion")
1006
+ .action(async (id) => {
1007
+ console.log(JSON.stringify((await L()).getCommgovMotionV2(id), null, 2));
1008
+ });
1009
+ parent
1010
+ .command("commgov-list-motions-v2")
1011
+ .description("List motions")
1012
+ .action(async () => {
1013
+ console.log(JSON.stringify((await L()).listCommgovMotionsV2(), null, 2));
1014
+ });
1015
+ parent
1016
+ .command("commgov-auto-pause-idle-v2")
1017
+ .description("Auto-pause idle")
1018
+ .action(async () => {
1019
+ console.log(
1020
+ JSON.stringify((await L()).autoPauseIdleCommgovProfilesV2(), null, 2),
1021
+ );
1022
+ });
1023
+ parent
1024
+ .command("commgov-auto-fail-stuck-v2")
1025
+ .description("Auto-fail stuck motions")
1026
+ .action(async () => {
1027
+ console.log(
1028
+ JSON.stringify((await L()).autoFailStuckCommgovMotionsV2(), null, 2),
1029
+ );
1030
+ });
1031
+ parent
1032
+ .command("commgov-gov-stats-v2")
1033
+ .description("V2 gov stats")
1034
+ .action(async () => {
1035
+ console.log(
1036
+ JSON.stringify((await L()).getCommunityGovernanceGovStatsV2(), null, 2),
1037
+ );
1038
+ });
1039
+ }
@@ -749,3 +749,212 @@ export function registerHardeningCommand(program) {
749
749
  );
750
750
  });
751
751
  }
752
+
753
+ // === Iter17 V2 governance overlay ===
754
+ export function registerHardgovV2Commands(program) {
755
+ const parent = program.commands.find((c) => c.name() === "hardening");
756
+ if (!parent) return;
757
+ const L = async () => await import("../lib/hardening-manager.js");
758
+ parent
759
+ .command("hardgov-enums-v2")
760
+ .description("Show V2 enums")
761
+ .action(async () => {
762
+ const m = await L();
763
+ console.log(
764
+ JSON.stringify(
765
+ {
766
+ profileMaturity: m.HARDGOV_PROFILE_MATURITY_V2,
767
+ scanLifecycle: m.HARDGOV_SCAN_LIFECYCLE_V2,
768
+ },
769
+ null,
770
+ 2,
771
+ ),
772
+ );
773
+ });
774
+ parent
775
+ .command("hardgov-config-v2")
776
+ .description("Show V2 config")
777
+ .action(async () => {
778
+ const m = await L();
779
+ console.log(
780
+ JSON.stringify(
781
+ {
782
+ maxActive: m.getMaxActiveHardgovProfilesPerOwnerV2(),
783
+ maxPending: m.getMaxPendingHardgovScansPerProfileV2(),
784
+ idleMs: m.getHardgovProfileIdleMsV2(),
785
+ stuckMs: m.getHardgovScanStuckMsV2(),
786
+ },
787
+ null,
788
+ 2,
789
+ ),
790
+ );
791
+ });
792
+ parent
793
+ .command("hardgov-set-max-active-v2 <n>")
794
+ .description("Set max active")
795
+ .action(async (n) => {
796
+ (await L()).setMaxActiveHardgovProfilesPerOwnerV2(Number(n));
797
+ console.log("ok");
798
+ });
799
+ parent
800
+ .command("hardgov-set-max-pending-v2 <n>")
801
+ .description("Set max pending")
802
+ .action(async (n) => {
803
+ (await L()).setMaxPendingHardgovScansPerProfileV2(Number(n));
804
+ console.log("ok");
805
+ });
806
+ parent
807
+ .command("hardgov-set-idle-ms-v2 <n>")
808
+ .description("Set idle threshold ms")
809
+ .action(async (n) => {
810
+ (await L()).setHardgovProfileIdleMsV2(Number(n));
811
+ console.log("ok");
812
+ });
813
+ parent
814
+ .command("hardgov-set-stuck-ms-v2 <n>")
815
+ .description("Set stuck threshold ms")
816
+ .action(async (n) => {
817
+ (await L()).setHardgovScanStuckMsV2(Number(n));
818
+ console.log("ok");
819
+ });
820
+ parent
821
+ .command("hardgov-register-v2 <id> <owner>")
822
+ .description("Register V2 profile")
823
+ .option("--category <v>", "category")
824
+ .action(async (id, owner, o) => {
825
+ const m = await L();
826
+ console.log(
827
+ JSON.stringify(
828
+ m.registerHardgovProfileV2({ id, owner, category: o.category }),
829
+ null,
830
+ 2,
831
+ ),
832
+ );
833
+ });
834
+ parent
835
+ .command("hardgov-activate-v2 <id>")
836
+ .description("Activate profile")
837
+ .action(async (id) => {
838
+ console.log(
839
+ JSON.stringify((await L()).activateHardgovProfileV2(id), null, 2),
840
+ );
841
+ });
842
+ parent
843
+ .command("hardgov-disable-v2 <id>")
844
+ .description("Disable profile")
845
+ .action(async (id) => {
846
+ console.log(
847
+ JSON.stringify((await L()).disableHardgovProfileV2(id), null, 2),
848
+ );
849
+ });
850
+ parent
851
+ .command("hardgov-archive-v2 <id>")
852
+ .description("Archive profile")
853
+ .action(async (id) => {
854
+ console.log(
855
+ JSON.stringify((await L()).archiveHardgovProfileV2(id), null, 2),
856
+ );
857
+ });
858
+ parent
859
+ .command("hardgov-touch-v2 <id>")
860
+ .description("Touch profile")
861
+ .action(async (id) => {
862
+ console.log(
863
+ JSON.stringify((await L()).touchHardgovProfileV2(id), null, 2),
864
+ );
865
+ });
866
+ parent
867
+ .command("hardgov-get-v2 <id>")
868
+ .description("Get profile")
869
+ .action(async (id) => {
870
+ console.log(JSON.stringify((await L()).getHardgovProfileV2(id), null, 2));
871
+ });
872
+ parent
873
+ .command("hardgov-list-v2")
874
+ .description("List profiles")
875
+ .action(async () => {
876
+ console.log(JSON.stringify((await L()).listHardgovProfilesV2(), null, 2));
877
+ });
878
+ parent
879
+ .command("hardgov-create-scan-v2 <id> <profileId>")
880
+ .description("Create scan")
881
+ .option("--target <v>", "target")
882
+ .action(async (id, profileId, o) => {
883
+ const m = await L();
884
+ console.log(
885
+ JSON.stringify(
886
+ m.createHardgovScanV2({ id, profileId, target: o.target }),
887
+ null,
888
+ 2,
889
+ ),
890
+ );
891
+ });
892
+ parent
893
+ .command("hardgov-scanning-scan-v2 <id>")
894
+ .description("Mark scan as scanning")
895
+ .action(async (id) => {
896
+ console.log(
897
+ JSON.stringify((await L()).scanningHardgovScanV2(id), null, 2),
898
+ );
899
+ });
900
+ parent
901
+ .command("hardgov-complete-scan-v2 <id>")
902
+ .description("Complete scan")
903
+ .action(async (id) => {
904
+ console.log(
905
+ JSON.stringify((await L()).completeScanHardgovV2(id), null, 2),
906
+ );
907
+ });
908
+ parent
909
+ .command("hardgov-fail-scan-v2 <id> [reason]")
910
+ .description("Fail scan")
911
+ .action(async (id, reason) => {
912
+ console.log(
913
+ JSON.stringify((await L()).failHardgovScanV2(id, reason), null, 2),
914
+ );
915
+ });
916
+ parent
917
+ .command("hardgov-cancel-scan-v2 <id> [reason]")
918
+ .description("Cancel scan")
919
+ .action(async (id, reason) => {
920
+ console.log(
921
+ JSON.stringify((await L()).cancelHardgovScanV2(id, reason), null, 2),
922
+ );
923
+ });
924
+ parent
925
+ .command("hardgov-get-scan-v2 <id>")
926
+ .description("Get scan")
927
+ .action(async (id) => {
928
+ console.log(JSON.stringify((await L()).getHardgovScanV2(id), null, 2));
929
+ });
930
+ parent
931
+ .command("hardgov-list-scans-v2")
932
+ .description("List scans")
933
+ .action(async () => {
934
+ console.log(JSON.stringify((await L()).listHardgovScansV2(), null, 2));
935
+ });
936
+ parent
937
+ .command("hardgov-auto-disable-idle-v2")
938
+ .description("Auto-disable idle")
939
+ .action(async () => {
940
+ console.log(
941
+ JSON.stringify((await L()).autoDisableIdleHardgovProfilesV2(), null, 2),
942
+ );
943
+ });
944
+ parent
945
+ .command("hardgov-auto-fail-stuck-v2")
946
+ .description("Auto-fail stuck scans")
947
+ .action(async () => {
948
+ console.log(
949
+ JSON.stringify((await L()).autoFailStuckHardgovScansV2(), null, 2),
950
+ );
951
+ });
952
+ parent
953
+ .command("hardgov-gov-stats-v2")
954
+ .description("V2 gov stats")
955
+ .action(async () => {
956
+ console.log(
957
+ JSON.stringify((await L()).getHardeningManagerGovStatsV2(), null, 2),
958
+ );
959
+ });
960
+ }