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
@@ -956,54 +956,209 @@ export function registerEconomyCommand(program) {
956
956
  function _registerEconomyV2Commands(parent) {
957
957
  const L = async () => await import("../lib/agent-economy.js");
958
958
 
959
- parent.command("enums-v2").description("Show V2 enums (account maturity + tx lifecycle)")
960
- .action(async () => { const m = await L(); console.log(JSON.stringify({ accountMaturity: m.ECONOMY_ACCOUNT_MATURITY_V2, txLifecycle: m.ECONOMY_TX_LIFECYCLE_V2 }, null, 2)); });
961
- parent.command("config-v2").description("Show V2 config thresholds")
962
- .action(async () => { const m = await L(); console.log(JSON.stringify({ maxActiveEconomyAccountsPerHolder: m.getMaxActiveEconomyAccountsPerHolderV2(), maxPendingEconomyTxsPerAccount: m.getMaxPendingEconomyTxsPerAccountV2(), economyAccountIdleMs: m.getEconomyAccountIdleMsV2(), economyTxStuckMs: m.getEconomyTxStuckMsV2() }, null, 2)); });
963
- parent.command("set-max-active-accounts-v2 <n>").description("Set max active accounts per holder")
964
- .action(async (n) => { const m = await L(); m.setMaxActiveEconomyAccountsPerHolderV2(Number(n)); console.log("ok"); });
965
- parent.command("set-max-pending-txs-v2 <n>").description("Set max pending txs per account")
966
- .action(async (n) => { const m = await L(); m.setMaxPendingEconomyTxsPerAccountV2(Number(n)); console.log("ok"); });
967
- parent.command("set-account-idle-ms-v2 <n>").description("Set account idle threshold (ms)")
968
- .action(async (n) => { const m = await L(); m.setEconomyAccountIdleMsV2(Number(n)); console.log("ok"); });
969
- parent.command("set-tx-stuck-ms-v2 <n>").description("Set tx stuck threshold (ms)")
970
- .action(async (n) => { const m = await L(); m.setEconomyTxStuckMsV2(Number(n)); console.log("ok"); });
971
-
972
- parent.command("register-account-v2 <id> <holder>").description("Register V2 economy account")
973
- .option("--currency <c>", "Currency", "CLC").action(async (id, holder, o) => { const m = await L(); console.log(JSON.stringify(m.registerEconomyAccountV2({ id, holder, currency: o.currency }), null, 2)); });
974
- parent.command("activate-account-v2 <id>").description("Activate account (pending→active or frozen→active)")
975
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.activateEconomyAccountV2(id), null, 2)); });
976
- parent.command("freeze-account-v2 <id>").description("Freeze account")
977
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.freezeEconomyAccountV2(id), null, 2)); });
978
- parent.command("close-account-v2 <id>").description("Close account (terminal)")
979
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.closeEconomyAccountV2(id), null, 2)); });
980
- parent.command("touch-account-v2 <id>").description("Touch account lastTouchedAt")
981
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.touchEconomyAccountV2(id), null, 2)); });
982
- parent.command("get-account-v2 <id>").description("Get V2 account")
983
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getEconomyAccountV2(id), null, 2)); });
984
- parent.command("list-accounts-v2").description("List all V2 accounts")
985
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.listEconomyAccountsV2(), null, 2)); });
986
-
987
- parent.command("create-tx-v2 <id> <accountId>").description("Create V2 tx (queued)")
988
- .option("--amount <a>", "Amount", "0").action(async (id, accountId, o) => { const m = await L(); console.log(JSON.stringify(m.createEconomyTxV2({ id, accountId, amount: o.amount }), null, 2)); });
989
- parent.command("start-tx-v2 <id>").description("Start tx (queued→processing)")
990
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.startEconomyTxV2(id), null, 2)); });
991
- parent.command("settle-tx-v2 <id>").description("Settle tx (processing→settled)")
992
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.settleEconomyTxV2(id), null, 2)); });
993
- parent.command("fail-tx-v2 <id> [reason]").description("Fail tx")
994
- .action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.failEconomyTxV2(id, reason), null, 2)); });
995
- parent.command("cancel-tx-v2 <id> [reason]").description("Cancel tx")
996
- .action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.cancelEconomyTxV2(id, reason), null, 2)); });
997
- parent.command("get-tx-v2 <id>").description("Get V2 tx")
998
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getEconomyTxV2(id), null, 2)); });
999
- parent.command("list-txs-v2").description("List all V2 txs")
1000
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.listEconomyTxsV2(), null, 2)); });
1001
-
1002
- parent.command("auto-freeze-idle-v2").description("Auto-freeze idle active accounts")
1003
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoFreezeIdleEconomyAccountsV2(), null, 2)); });
1004
- parent.command("auto-fail-stuck-v2").description("Auto-fail stuck processing txs")
1005
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoFailStuckEconomyTxsV2(), null, 2)); });
1006
-
1007
- parent.command("gov-stats-v2").description("V2 governance aggregate stats")
1008
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.getAgentEconomyGovStatsV2(), null, 2)); });
959
+ parent
960
+ .command("enums-v2")
961
+ .description("Show V2 enums (account maturity + tx lifecycle)")
962
+ .action(async () => {
963
+ const m = await L();
964
+ console.log(
965
+ JSON.stringify(
966
+ {
967
+ accountMaturity: m.ECONOMY_ACCOUNT_MATURITY_V2,
968
+ txLifecycle: m.ECONOMY_TX_LIFECYCLE_V2,
969
+ },
970
+ null,
971
+ 2,
972
+ ),
973
+ );
974
+ });
975
+ parent
976
+ .command("config-v2")
977
+ .description("Show V2 config thresholds")
978
+ .action(async () => {
979
+ const m = await L();
980
+ console.log(
981
+ JSON.stringify(
982
+ {
983
+ maxActiveEconomyAccountsPerHolder:
984
+ m.getMaxActiveEconomyAccountsPerHolderV2(),
985
+ maxPendingEconomyTxsPerAccount:
986
+ m.getMaxPendingEconomyTxsPerAccountV2(),
987
+ economyAccountIdleMs: m.getEconomyAccountIdleMsV2(),
988
+ economyTxStuckMs: m.getEconomyTxStuckMsV2(),
989
+ },
990
+ null,
991
+ 2,
992
+ ),
993
+ );
994
+ });
995
+ parent
996
+ .command("set-max-active-accounts-v2 <n>")
997
+ .description("Set max active accounts per holder")
998
+ .action(async (n) => {
999
+ const m = await L();
1000
+ m.setMaxActiveEconomyAccountsPerHolderV2(Number(n));
1001
+ console.log("ok");
1002
+ });
1003
+ parent
1004
+ .command("set-max-pending-txs-v2 <n>")
1005
+ .description("Set max pending txs per account")
1006
+ .action(async (n) => {
1007
+ const m = await L();
1008
+ m.setMaxPendingEconomyTxsPerAccountV2(Number(n));
1009
+ console.log("ok");
1010
+ });
1011
+ parent
1012
+ .command("set-account-idle-ms-v2 <n>")
1013
+ .description("Set account idle threshold (ms)")
1014
+ .action(async (n) => {
1015
+ const m = await L();
1016
+ m.setEconomyAccountIdleMsV2(Number(n));
1017
+ console.log("ok");
1018
+ });
1019
+ parent
1020
+ .command("set-tx-stuck-ms-v2 <n>")
1021
+ .description("Set tx stuck threshold (ms)")
1022
+ .action(async (n) => {
1023
+ const m = await L();
1024
+ m.setEconomyTxStuckMsV2(Number(n));
1025
+ console.log("ok");
1026
+ });
1027
+
1028
+ parent
1029
+ .command("register-account-v2 <id> <holder>")
1030
+ .description("Register V2 economy account")
1031
+ .option("--currency <c>", "Currency", "CLC")
1032
+ .action(async (id, holder, o) => {
1033
+ const m = await L();
1034
+ console.log(
1035
+ JSON.stringify(
1036
+ m.registerEconomyAccountV2({ id, holder, currency: o.currency }),
1037
+ null,
1038
+ 2,
1039
+ ),
1040
+ );
1041
+ });
1042
+ parent
1043
+ .command("activate-account-v2 <id>")
1044
+ .description("Activate account (pending→active or frozen→active)")
1045
+ .action(async (id) => {
1046
+ const m = await L();
1047
+ console.log(JSON.stringify(m.activateEconomyAccountV2(id), null, 2));
1048
+ });
1049
+ parent
1050
+ .command("freeze-account-v2 <id>")
1051
+ .description("Freeze account")
1052
+ .action(async (id) => {
1053
+ const m = await L();
1054
+ console.log(JSON.stringify(m.freezeEconomyAccountV2(id), null, 2));
1055
+ });
1056
+ parent
1057
+ .command("close-account-v2 <id>")
1058
+ .description("Close account (terminal)")
1059
+ .action(async (id) => {
1060
+ const m = await L();
1061
+ console.log(JSON.stringify(m.closeEconomyAccountV2(id), null, 2));
1062
+ });
1063
+ parent
1064
+ .command("touch-account-v2 <id>")
1065
+ .description("Touch account lastTouchedAt")
1066
+ .action(async (id) => {
1067
+ const m = await L();
1068
+ console.log(JSON.stringify(m.touchEconomyAccountV2(id), null, 2));
1069
+ });
1070
+ parent
1071
+ .command("get-account-v2 <id>")
1072
+ .description("Get V2 account")
1073
+ .action(async (id) => {
1074
+ const m = await L();
1075
+ console.log(JSON.stringify(m.getEconomyAccountV2(id), null, 2));
1076
+ });
1077
+ parent
1078
+ .command("list-accounts-v2")
1079
+ .description("List all V2 accounts")
1080
+ .action(async () => {
1081
+ const m = await L();
1082
+ console.log(JSON.stringify(m.listEconomyAccountsV2(), null, 2));
1083
+ });
1084
+
1085
+ parent
1086
+ .command("create-tx-v2 <id> <accountId>")
1087
+ .description("Create V2 tx (queued)")
1088
+ .option("--amount <a>", "Amount", "0")
1089
+ .action(async (id, accountId, o) => {
1090
+ const m = await L();
1091
+ console.log(
1092
+ JSON.stringify(
1093
+ m.createEconomyTxV2({ id, accountId, amount: o.amount }),
1094
+ null,
1095
+ 2,
1096
+ ),
1097
+ );
1098
+ });
1099
+ parent
1100
+ .command("start-tx-v2 <id>")
1101
+ .description("Start tx (queued→processing)")
1102
+ .action(async (id) => {
1103
+ const m = await L();
1104
+ console.log(JSON.stringify(m.startEconomyTxV2(id), null, 2));
1105
+ });
1106
+ parent
1107
+ .command("settle-tx-v2 <id>")
1108
+ .description("Settle tx (processing→settled)")
1109
+ .action(async (id) => {
1110
+ const m = await L();
1111
+ console.log(JSON.stringify(m.settleEconomyTxV2(id), null, 2));
1112
+ });
1113
+ parent
1114
+ .command("fail-tx-v2 <id> [reason]")
1115
+ .description("Fail tx")
1116
+ .action(async (id, reason) => {
1117
+ const m = await L();
1118
+ console.log(JSON.stringify(m.failEconomyTxV2(id, reason), null, 2));
1119
+ });
1120
+ parent
1121
+ .command("cancel-tx-v2 <id> [reason]")
1122
+ .description("Cancel tx")
1123
+ .action(async (id, reason) => {
1124
+ const m = await L();
1125
+ console.log(JSON.stringify(m.cancelEconomyTxV2(id, reason), null, 2));
1126
+ });
1127
+ parent
1128
+ .command("get-tx-v2 <id>")
1129
+ .description("Get V2 tx")
1130
+ .action(async (id) => {
1131
+ const m = await L();
1132
+ console.log(JSON.stringify(m.getEconomyTxV2(id), null, 2));
1133
+ });
1134
+ parent
1135
+ .command("list-txs-v2")
1136
+ .description("List all V2 txs")
1137
+ .action(async () => {
1138
+ const m = await L();
1139
+ console.log(JSON.stringify(m.listEconomyTxsV2(), null, 2));
1140
+ });
1141
+
1142
+ parent
1143
+ .command("auto-freeze-idle-v2")
1144
+ .description("Auto-freeze idle active accounts")
1145
+ .action(async () => {
1146
+ const m = await L();
1147
+ console.log(JSON.stringify(m.autoFreezeIdleEconomyAccountsV2(), null, 2));
1148
+ });
1149
+ parent
1150
+ .command("auto-fail-stuck-v2")
1151
+ .description("Auto-fail stuck processing txs")
1152
+ .action(async () => {
1153
+ const m = await L();
1154
+ console.log(JSON.stringify(m.autoFailStuckEconomyTxsV2(), null, 2));
1155
+ });
1156
+
1157
+ parent
1158
+ .command("gov-stats-v2")
1159
+ .description("V2 governance aggregate stats")
1160
+ .action(async () => {
1161
+ const m = await L();
1162
+ console.log(JSON.stringify(m.getAgentEconomyGovStatsV2(), null, 2));
1163
+ });
1009
1164
  }
@@ -792,54 +792,207 @@ export function registerEvolutionCommand(program) {
792
792
  function _registerEvolutionV2Commands(parent) {
793
793
  const L = async () => await import("../lib/evolution-system.js");
794
794
 
795
- parent.command("enums-v2").description("Show V2 enums (goal maturity + cycle lifecycle)")
796
- .action(async () => { const m = await L(); console.log(JSON.stringify({ goalMaturity: m.EVO_GOAL_MATURITY_V2, cycleLifecycle: m.EVO_CYCLE_LIFECYCLE_V2 }, null, 2)); });
797
- parent.command("config-v2").description("Show V2 config thresholds")
798
- .action(async () => { const m = await L(); console.log(JSON.stringify({ maxActiveEvoGoalsPerOwner: m.getMaxActiveEvoGoalsPerOwnerV2(), maxPendingEvoCyclesPerGoal: m.getMaxPendingEvoCyclesPerGoalV2(), evoGoalIdleMs: m.getEvoGoalIdleMsV2(), evoCycleStuckMs: m.getEvoCycleStuckMsV2() }, null, 2)); });
799
- parent.command("set-max-active-goals-v2 <n>").description("Set max active goals per owner")
800
- .action(async (n) => { const m = await L(); m.setMaxActiveEvoGoalsPerOwnerV2(Number(n)); console.log("ok"); });
801
- parent.command("set-max-pending-cycles-v2 <n>").description("Set max pending cycles per goal")
802
- .action(async (n) => { const m = await L(); m.setMaxPendingEvoCyclesPerGoalV2(Number(n)); console.log("ok"); });
803
- parent.command("set-goal-idle-ms-v2 <n>").description("Set goal idle threshold (ms)")
804
- .action(async (n) => { const m = await L(); m.setEvoGoalIdleMsV2(Number(n)); console.log("ok"); });
805
- parent.command("set-cycle-stuck-ms-v2 <n>").description("Set cycle stuck threshold (ms)")
806
- .action(async (n) => { const m = await L(); m.setEvoCycleStuckMsV2(Number(n)); console.log("ok"); });
807
-
808
- parent.command("register-goal-v2 <id> <owner>").description("Register V2 evo goal")
809
- .option("--objective <o>", "Objective description").action(async (id, owner, o) => { const m = await L(); console.log(JSON.stringify(m.registerEvoGoalV2({ id, owner, objective: o.objective }), null, 2)); });
810
- parent.command("activate-goal-v2 <id>").description("Activate evo goal")
811
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.activateEvoGoalV2(id), null, 2)); });
812
- parent.command("pause-goal-v2 <id>").description("Pause evo goal")
813
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.pauseEvoGoalV2(id), null, 2)); });
814
- parent.command("archive-goal-v2 <id>").description("Archive goal (terminal)")
815
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.archiveEvoGoalV2(id), null, 2)); });
816
- parent.command("touch-goal-v2 <id>").description("Touch goal lastTouchedAt")
817
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.touchEvoGoalV2(id), null, 2)); });
818
- parent.command("get-goal-v2 <id>").description("Get V2 goal")
819
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getEvoGoalV2(id), null, 2)); });
820
- parent.command("list-goals-v2").description("List all V2 goals")
821
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.listEvoGoalsV2(), null, 2)); });
822
-
823
- parent.command("create-cycle-v2 <id> <goalId>").description("Create V2 cycle (queued)")
824
- .option("--generation <n>", "Generation", "0").action(async (id, goalId, o) => { const m = await L(); console.log(JSON.stringify(m.createEvoCycleV2({ id, goalId, generation: Number(o.generation) }), null, 2)); });
825
- parent.command("start-cycle-v2 <id>").description("Start cycle (queued→running)")
826
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.startEvoCycleV2(id), null, 2)); });
827
- parent.command("complete-cycle-v2 <id>").description("Complete cycle (running→completed)")
828
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.completeEvoCycleV2(id), null, 2)); });
829
- parent.command("fail-cycle-v2 <id> [reason]").description("Fail cycle")
830
- .action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.failEvoCycleV2(id, reason), null, 2)); });
831
- parent.command("cancel-cycle-v2 <id> [reason]").description("Cancel cycle")
832
- .action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.cancelEvoCycleV2(id, reason), null, 2)); });
833
- parent.command("get-cycle-v2 <id>").description("Get V2 cycle")
834
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getEvoCycleV2(id), null, 2)); });
835
- parent.command("list-cycles-v2").description("List all V2 cycles")
836
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.listEvoCyclesV2(), null, 2)); });
837
-
838
- parent.command("auto-pause-idle-v2").description("Auto-pause idle active goals")
839
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoPauseIdleEvoGoalsV2(), null, 2)); });
840
- parent.command("auto-fail-stuck-v2").description("Auto-fail stuck running cycles")
841
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoFailStuckEvoCyclesV2(), null, 2)); });
842
-
843
- parent.command("gov-stats-v2").description("V2 governance aggregate stats")
844
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.getEvolutionSystemGovStatsV2(), null, 2)); });
795
+ parent
796
+ .command("enums-v2")
797
+ .description("Show V2 enums (goal maturity + cycle lifecycle)")
798
+ .action(async () => {
799
+ const m = await L();
800
+ console.log(
801
+ JSON.stringify(
802
+ {
803
+ goalMaturity: m.EVO_GOAL_MATURITY_V2,
804
+ cycleLifecycle: m.EVO_CYCLE_LIFECYCLE_V2,
805
+ },
806
+ null,
807
+ 2,
808
+ ),
809
+ );
810
+ });
811
+ parent
812
+ .command("config-v2")
813
+ .description("Show V2 config thresholds")
814
+ .action(async () => {
815
+ const m = await L();
816
+ console.log(
817
+ JSON.stringify(
818
+ {
819
+ maxActiveEvoGoalsPerOwner: m.getMaxActiveEvoGoalsPerOwnerV2(),
820
+ maxPendingEvoCyclesPerGoal: m.getMaxPendingEvoCyclesPerGoalV2(),
821
+ evoGoalIdleMs: m.getEvoGoalIdleMsV2(),
822
+ evoCycleStuckMs: m.getEvoCycleStuckMsV2(),
823
+ },
824
+ null,
825
+ 2,
826
+ ),
827
+ );
828
+ });
829
+ parent
830
+ .command("set-max-active-goals-v2 <n>")
831
+ .description("Set max active goals per owner")
832
+ .action(async (n) => {
833
+ const m = await L();
834
+ m.setMaxActiveEvoGoalsPerOwnerV2(Number(n));
835
+ console.log("ok");
836
+ });
837
+ parent
838
+ .command("set-max-pending-cycles-v2 <n>")
839
+ .description("Set max pending cycles per goal")
840
+ .action(async (n) => {
841
+ const m = await L();
842
+ m.setMaxPendingEvoCyclesPerGoalV2(Number(n));
843
+ console.log("ok");
844
+ });
845
+ parent
846
+ .command("set-goal-idle-ms-v2 <n>")
847
+ .description("Set goal idle threshold (ms)")
848
+ .action(async (n) => {
849
+ const m = await L();
850
+ m.setEvoGoalIdleMsV2(Number(n));
851
+ console.log("ok");
852
+ });
853
+ parent
854
+ .command("set-cycle-stuck-ms-v2 <n>")
855
+ .description("Set cycle stuck threshold (ms)")
856
+ .action(async (n) => {
857
+ const m = await L();
858
+ m.setEvoCycleStuckMsV2(Number(n));
859
+ console.log("ok");
860
+ });
861
+
862
+ parent
863
+ .command("register-goal-v2 <id> <owner>")
864
+ .description("Register V2 evo goal")
865
+ .option("--objective <o>", "Objective description")
866
+ .action(async (id, owner, o) => {
867
+ const m = await L();
868
+ console.log(
869
+ JSON.stringify(
870
+ m.registerEvoGoalV2({ id, owner, objective: o.objective }),
871
+ null,
872
+ 2,
873
+ ),
874
+ );
875
+ });
876
+ parent
877
+ .command("activate-goal-v2 <id>")
878
+ .description("Activate evo goal")
879
+ .action(async (id) => {
880
+ const m = await L();
881
+ console.log(JSON.stringify(m.activateEvoGoalV2(id), null, 2));
882
+ });
883
+ parent
884
+ .command("pause-goal-v2 <id>")
885
+ .description("Pause evo goal")
886
+ .action(async (id) => {
887
+ const m = await L();
888
+ console.log(JSON.stringify(m.pauseEvoGoalV2(id), null, 2));
889
+ });
890
+ parent
891
+ .command("archive-goal-v2 <id>")
892
+ .description("Archive goal (terminal)")
893
+ .action(async (id) => {
894
+ const m = await L();
895
+ console.log(JSON.stringify(m.archiveEvoGoalV2(id), null, 2));
896
+ });
897
+ parent
898
+ .command("touch-goal-v2 <id>")
899
+ .description("Touch goal lastTouchedAt")
900
+ .action(async (id) => {
901
+ const m = await L();
902
+ console.log(JSON.stringify(m.touchEvoGoalV2(id), null, 2));
903
+ });
904
+ parent
905
+ .command("get-goal-v2 <id>")
906
+ .description("Get V2 goal")
907
+ .action(async (id) => {
908
+ const m = await L();
909
+ console.log(JSON.stringify(m.getEvoGoalV2(id), null, 2));
910
+ });
911
+ parent
912
+ .command("list-goals-v2")
913
+ .description("List all V2 goals")
914
+ .action(async () => {
915
+ const m = await L();
916
+ console.log(JSON.stringify(m.listEvoGoalsV2(), null, 2));
917
+ });
918
+
919
+ parent
920
+ .command("create-cycle-v2 <id> <goalId>")
921
+ .description("Create V2 cycle (queued)")
922
+ .option("--generation <n>", "Generation", "0")
923
+ .action(async (id, goalId, o) => {
924
+ const m = await L();
925
+ console.log(
926
+ JSON.stringify(
927
+ m.createEvoCycleV2({ id, goalId, generation: Number(o.generation) }),
928
+ null,
929
+ 2,
930
+ ),
931
+ );
932
+ });
933
+ parent
934
+ .command("start-cycle-v2 <id>")
935
+ .description("Start cycle (queued→running)")
936
+ .action(async (id) => {
937
+ const m = await L();
938
+ console.log(JSON.stringify(m.startEvoCycleV2(id), null, 2));
939
+ });
940
+ parent
941
+ .command("complete-cycle-v2 <id>")
942
+ .description("Complete cycle (running→completed)")
943
+ .action(async (id) => {
944
+ const m = await L();
945
+ console.log(JSON.stringify(m.completeEvoCycleV2(id), null, 2));
946
+ });
947
+ parent
948
+ .command("fail-cycle-v2 <id> [reason]")
949
+ .description("Fail cycle")
950
+ .action(async (id, reason) => {
951
+ const m = await L();
952
+ console.log(JSON.stringify(m.failEvoCycleV2(id, reason), null, 2));
953
+ });
954
+ parent
955
+ .command("cancel-cycle-v2 <id> [reason]")
956
+ .description("Cancel cycle")
957
+ .action(async (id, reason) => {
958
+ const m = await L();
959
+ console.log(JSON.stringify(m.cancelEvoCycleV2(id, reason), null, 2));
960
+ });
961
+ parent
962
+ .command("get-cycle-v2 <id>")
963
+ .description("Get V2 cycle")
964
+ .action(async (id) => {
965
+ const m = await L();
966
+ console.log(JSON.stringify(m.getEvoCycleV2(id), null, 2));
967
+ });
968
+ parent
969
+ .command("list-cycles-v2")
970
+ .description("List all V2 cycles")
971
+ .action(async () => {
972
+ const m = await L();
973
+ console.log(JSON.stringify(m.listEvoCyclesV2(), null, 2));
974
+ });
975
+
976
+ parent
977
+ .command("auto-pause-idle-v2")
978
+ .description("Auto-pause idle active goals")
979
+ .action(async () => {
980
+ const m = await L();
981
+ console.log(JSON.stringify(m.autoPauseIdleEvoGoalsV2(), null, 2));
982
+ });
983
+ parent
984
+ .command("auto-fail-stuck-v2")
985
+ .description("Auto-fail stuck running cycles")
986
+ .action(async () => {
987
+ const m = await L();
988
+ console.log(JSON.stringify(m.autoFailStuckEvoCyclesV2(), null, 2));
989
+ });
990
+
991
+ parent
992
+ .command("gov-stats-v2")
993
+ .description("V2 governance aggregate stats")
994
+ .action(async () => {
995
+ const m = await L();
996
+ console.log(JSON.stringify(m.getEvolutionSystemGovStatsV2(), null, 2));
997
+ });
845
998
  }