chainlesschain 0.143.0 → 0.145.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 (133) hide show
  1. package/package.json +1 -1
  2. package/src/commands/a2a.js +196 -28
  3. package/src/commands/activitypub.js +157 -27
  4. package/src/commands/agent.js +587 -103
  5. package/src/commands/audit.js +206 -0
  6. package/src/commands/bi.js +152 -27
  7. package/src/commands/bm25.js +111 -27
  8. package/src/commands/browse.js +190 -29
  9. package/src/commands/ccron.js +128 -28
  10. package/src/commands/chat.js +207 -0
  11. package/src/commands/compliance.js +414 -34
  12. package/src/commands/compt.js +127 -29
  13. package/src/commands/consol.js +8 -2
  14. package/src/commands/cowork.js +580 -34
  15. package/src/commands/crosschain.js +182 -28
  16. package/src/commands/dao.js +182 -28
  17. package/src/commands/dlp.js +172 -27
  18. package/src/commands/economy.js +205 -50
  19. package/src/commands/evolution.js +203 -50
  20. package/src/commands/evomap.js +182 -27
  21. package/src/commands/fflag.js +74 -22
  22. package/src/commands/git.js +177 -37
  23. package/src/commands/hardening.js +209 -0
  24. package/src/commands/hmemory.js +204 -50
  25. package/src/commands/incentive.js +209 -0
  26. package/src/commands/inference.js +170 -34
  27. package/src/commands/itbudget.js +149 -33
  28. package/src/commands/kg.js +206 -0
  29. package/src/commands/lowcode.js +195 -38
  30. package/src/commands/marketplace.js +206 -0
  31. package/src/commands/matrix.js +179 -27
  32. package/src/commands/mcpscaf.js +145 -33
  33. package/src/commands/meminj.js +145 -33
  34. package/src/commands/nostr.js +178 -27
  35. package/src/commands/orchestrate.js +217 -0
  36. package/src/commands/orchgov.js +144 -33
  37. package/src/commands/pdfp.js +109 -27
  38. package/src/commands/perf.js +169 -32
  39. package/src/commands/perm.js +144 -33
  40. package/src/commands/pipeline.js +207 -52
  41. package/src/commands/planmode.js +141 -32
  42. package/src/commands/privacy.js +203 -0
  43. package/src/commands/promcomp.js +111 -27
  44. package/src/commands/recommend.js +177 -34
  45. package/src/commands/reputation.js +208 -0
  46. package/src/commands/sandbox.js +206 -0
  47. package/src/commands/seshhook.js +145 -33
  48. package/src/commands/seshsearch.js +141 -33
  49. package/src/commands/seshtail.js +144 -33
  50. package/src/commands/seshu.js +152 -33
  51. package/src/commands/sganal.js +123 -29
  52. package/src/commands/siem.js +201 -34
  53. package/src/commands/sla.js +212 -0
  54. package/src/commands/slotfill.js +146 -33
  55. package/src/commands/social.js +157 -32
  56. package/src/commands/stress.js +206 -0
  57. package/src/commands/svccont.js +145 -33
  58. package/src/commands/terraform.js +206 -0
  59. package/src/commands/tms.js +171 -33
  60. package/src/commands/topiccls.js +146 -33
  61. package/src/commands/uprof.js +141 -32
  62. package/src/commands/vcheck.js +122 -28
  63. package/src/commands/webfetch.js +141 -32
  64. package/src/commands/zkp.js +184 -28
  65. package/src/index.js +40 -0
  66. package/src/lib/a2a-protocol.js +319 -51
  67. package/src/lib/activitypub-bridge.js +288 -50
  68. package/src/lib/agent-economy.js +304 -51
  69. package/src/lib/app-builder.js +279 -46
  70. package/src/lib/audit-logger.js +321 -0
  71. package/src/lib/autonomous-agent.js +284 -48
  72. package/src/lib/bi-engine.js +283 -49
  73. package/src/lib/bm25-search.js +301 -49
  74. package/src/lib/browser-automation.js +296 -49
  75. package/src/lib/chat-core.js +336 -0
  76. package/src/lib/claude-code-bridge.js +341 -0
  77. package/src/lib/compliance-framework-reporter.js +305 -51
  78. package/src/lib/compliance-manager.js +330 -0
  79. package/src/lib/compression-telemetry.js +301 -49
  80. package/src/lib/content-recommender.js +317 -52
  81. package/src/lib/cowork-cron.js +298 -49
  82. package/src/lib/cowork-learning.js +333 -0
  83. package/src/lib/cowork-task-runner.js +308 -51
  84. package/src/lib/cowork-workflow.js +327 -0
  85. package/src/lib/cross-chain.js +311 -51
  86. package/src/lib/dao-governance.js +280 -46
  87. package/src/lib/dlp-engine.js +287 -49
  88. package/src/lib/evolution-system.js +278 -47
  89. package/src/lib/evomap-manager.js +280 -46
  90. package/src/lib/execution-backend.js +294 -48
  91. package/src/lib/feature-flags.js +294 -49
  92. package/src/lib/git-integration.js +285 -47
  93. package/src/lib/hardening-manager.js +341 -0
  94. package/src/lib/hierarchical-memory.js +284 -48
  95. package/src/lib/inference-network.js +308 -51
  96. package/src/lib/iteration-budget.js +302 -50
  97. package/src/lib/knowledge-graph.js +333 -0
  98. package/src/lib/matrix-bridge.js +281 -47
  99. package/src/lib/mcp-scaffold.js +318 -54
  100. package/src/lib/memory-injection.js +288 -49
  101. package/src/lib/nostr-bridge.js +286 -49
  102. package/src/lib/orchestrator.js +293 -48
  103. package/src/lib/pdf-parser.js +298 -49
  104. package/src/lib/perf-tuning.js +309 -50
  105. package/src/lib/permission-engine.js +287 -49
  106. package/src/lib/pipeline-orchestrator.js +289 -49
  107. package/src/lib/plan-mode.js +298 -51
  108. package/src/lib/privacy-computing.js +335 -0
  109. package/src/lib/reputation-optimizer.js +340 -0
  110. package/src/lib/sandbox-v2.js +327 -0
  111. package/src/lib/service-container.js +313 -52
  112. package/src/lib/session-consolidator.js +296 -49
  113. package/src/lib/session-hooks.js +312 -53
  114. package/src/lib/session-search.js +304 -51
  115. package/src/lib/session-tail.js +288 -49
  116. package/src/lib/session-usage.js +298 -52
  117. package/src/lib/siem-exporter.js +298 -51
  118. package/src/lib/skill-marketplace.js +345 -0
  119. package/src/lib/sla-manager.js +341 -0
  120. package/src/lib/slot-filler.js +303 -51
  121. package/src/lib/social-graph-analytics.js +295 -49
  122. package/src/lib/social-graph.js +272 -49
  123. package/src/lib/stress-tester.js +342 -0
  124. package/src/lib/sub-agent-registry.js +302 -53
  125. package/src/lib/task-model-selector.js +302 -50
  126. package/src/lib/terraform-manager.js +333 -0
  127. package/src/lib/todo-manager.js +281 -47
  128. package/src/lib/token-incentive.js +341 -0
  129. package/src/lib/topic-classifier.js +297 -49
  130. package/src/lib/user-profile.js +294 -50
  131. package/src/lib/version-checker.js +304 -50
  132. package/src/lib/web-fetch.js +292 -51
  133. 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
  }