chainlesschain 0.145.0 → 0.156.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 (184) hide show
  1. package/README.md +52 -3
  2. package/package.json +1 -1
  3. package/src/commands/a2a.js +201 -0
  4. package/src/commands/activitypub.js +207 -0
  5. package/src/commands/agent-network.js +217 -0
  6. package/src/commands/agent.js +1250 -0
  7. package/src/commands/automation.js +201 -0
  8. package/src/commands/bi.js +203 -0
  9. package/src/commands/browse.js +213 -0
  10. package/src/commands/chat.js +605 -0
  11. package/src/commands/cli-anything.js +426 -0
  12. package/src/commands/codegen.js +207 -0
  13. package/src/commands/collab.js +211 -0
  14. package/src/commands/compliance.js +822 -0
  15. package/src/commands/config.js +213 -0
  16. package/src/commands/cowork.js +1666 -0
  17. package/src/commands/crosschain.js +203 -0
  18. package/src/commands/dao.js +203 -0
  19. package/src/commands/dbevo.js +227 -0
  20. package/src/commands/dev.js +207 -0
  21. package/src/commands/did-v2.js +217 -0
  22. package/src/commands/did.js +221 -0
  23. package/src/commands/dlp.js +213 -0
  24. package/src/commands/economy.js +199 -0
  25. package/src/commands/encrypt.js +201 -0
  26. package/src/commands/evolution.js +199 -0
  27. package/src/commands/evomap.js +830 -0
  28. package/src/commands/export.js +213 -0
  29. package/src/commands/federation.js +209 -0
  30. package/src/commands/fusion.js +205 -0
  31. package/src/commands/governance.js +209 -0
  32. package/src/commands/hmemory.js +203 -0
  33. package/src/commands/hook.js +209 -0
  34. package/src/commands/import.js +209 -0
  35. package/src/commands/inference.js +207 -0
  36. package/src/commands/infra.js +203 -0
  37. package/src/commands/instinct.js +209 -0
  38. package/src/commands/ipfs.js +207 -0
  39. package/src/commands/kg.js +195 -0
  40. package/src/commands/llm.js +426 -0
  41. package/src/commands/matrix.js +207 -0
  42. package/src/commands/mcp.js +217 -0
  43. package/src/commands/memory.js +412 -0
  44. package/src/commands/multimodal.js +203 -0
  45. package/src/commands/nlprog.js +225 -0
  46. package/src/commands/nostr.js +209 -0
  47. package/src/commands/note.js +205 -0
  48. package/src/commands/ops.js +219 -0
  49. package/src/commands/orchestrate.js +406 -0
  50. package/src/commands/org.js +209 -0
  51. package/src/commands/p2p.js +209 -0
  52. package/src/commands/perception.js +209 -0
  53. package/src/commands/permmem.js +203 -0
  54. package/src/commands/pipeline.js +199 -0
  55. package/src/commands/planmode.js +426 -0
  56. package/src/commands/plugin-ecosystem.js +209 -0
  57. package/src/commands/plugin.js +209 -0
  58. package/src/commands/pqc.js +213 -0
  59. package/src/commands/quantization.js +207 -0
  60. package/src/commands/rcache.js +205 -0
  61. package/src/commands/recommend.js +233 -0
  62. package/src/commands/runtime.js +205 -0
  63. package/src/commands/scim.js +209 -0
  64. package/src/commands/services.js +207 -0
  65. package/src/commands/session.js +209 -0
  66. package/src/commands/setup.js +205 -0
  67. package/src/commands/skill.js +414 -0
  68. package/src/commands/social.js +201 -0
  69. package/src/commands/sso.js +209 -0
  70. package/src/commands/start.js +209 -0
  71. package/src/commands/stream.js +213 -0
  72. package/src/commands/sync.js +209 -0
  73. package/src/commands/tech.js +209 -0
  74. package/src/commands/tenant.js +217 -0
  75. package/src/commands/tokens.js +209 -0
  76. package/src/commands/trust.js +217 -0
  77. package/src/commands/ui.js +225 -0
  78. package/src/commands/wallet.js +209 -0
  79. package/src/commands/workflow.js +412 -0
  80. package/src/index.js +252 -0
  81. package/src/lib/a2a-protocol.js +332 -0
  82. package/src/lib/activitypub-bridge.js +334 -0
  83. package/src/lib/agent-coordinator.js +334 -0
  84. package/src/lib/agent-economy.js +334 -0
  85. package/src/lib/agent-network.js +341 -0
  86. package/src/lib/agent-router.js +333 -0
  87. package/src/lib/aiops.js +346 -0
  88. package/src/lib/automation-engine.js +335 -0
  89. package/src/lib/autonomous-agent.js +332 -0
  90. package/src/lib/autonomous-developer.js +332 -0
  91. package/src/lib/bi-engine.js +333 -0
  92. package/src/lib/browser-automation.js +334 -0
  93. package/src/lib/chat-core.js +335 -0
  94. package/src/lib/cli-anything-bridge.js +341 -0
  95. package/src/lib/cli-context-engineering.js +351 -0
  96. package/src/lib/code-agent.js +339 -0
  97. package/src/lib/collaboration-governance.js +334 -0
  98. package/src/lib/community-governance.js +346 -0
  99. package/src/lib/compliance-manager.js +334 -0
  100. package/src/lib/content-recommendation.js +351 -0
  101. package/src/lib/cowork-adapter.js +336 -0
  102. package/src/lib/cowork-evomap-adapter.js +341 -0
  103. package/src/lib/cowork-mcp-tools.js +341 -0
  104. package/src/lib/cowork-observe-html.js +341 -0
  105. package/src/lib/cowork-observe.js +341 -0
  106. package/src/lib/cowork-share.js +338 -0
  107. package/src/lib/cowork-task-templates.js +342 -1
  108. package/src/lib/cowork-template-marketplace.js +340 -0
  109. package/src/lib/cross-chain.js +339 -0
  110. package/src/lib/crypto-manager.js +334 -0
  111. package/src/lib/dao-governance.js +339 -0
  112. package/src/lib/dbevo.js +351 -0
  113. package/src/lib/decentral-infra.js +330 -0
  114. package/src/lib/did-manager.js +341 -0
  115. package/src/lib/did-v2-manager.js +341 -0
  116. package/src/lib/dlp-engine.js +339 -0
  117. package/src/lib/downloader.js +334 -0
  118. package/src/lib/evolution-system.js +334 -0
  119. package/src/lib/evomap-client.js +342 -0
  120. package/src/lib/evomap-federation.js +338 -0
  121. package/src/lib/evomap-governance.js +334 -0
  122. package/src/lib/evomap-manager.js +330 -0
  123. package/src/lib/execution-backend.js +330 -0
  124. package/src/lib/federation-hardening.js +340 -0
  125. package/src/lib/hashline.js +338 -0
  126. package/src/lib/hierarchical-memory.js +334 -0
  127. package/src/lib/hook-manager.js +341 -0
  128. package/src/lib/inference-network.js +341 -0
  129. package/src/lib/instinct-manager.js +346 -0
  130. package/src/lib/interaction-adapter.js +330 -0
  131. package/src/lib/interactive-planner.js +354 -0
  132. package/src/lib/ipfs-storage.js +334 -0
  133. package/src/lib/knowledge-exporter.js +341 -0
  134. package/src/lib/knowledge-graph.js +331 -0
  135. package/src/lib/knowledge-importer.js +341 -0
  136. package/src/lib/llm-providers.js +346 -0
  137. package/src/lib/matrix-bridge.js +339 -0
  138. package/src/lib/mcp-registry.js +346 -0
  139. package/src/lib/memory-manager.js +336 -0
  140. package/src/lib/multimodal.js +330 -0
  141. package/src/lib/nl-programming.js +341 -0
  142. package/src/lib/nostr-bridge.js +336 -0
  143. package/src/lib/note-versioning.js +339 -0
  144. package/src/lib/org-manager.js +336 -0
  145. package/src/lib/p2p-manager.js +341 -0
  146. package/src/lib/perception.js +346 -0
  147. package/src/lib/permanent-memory.js +327 -0
  148. package/src/lib/pipeline-orchestrator.js +332 -0
  149. package/src/lib/plan-mode.js +336 -0
  150. package/src/lib/plugin-autodiscovery.js +334 -0
  151. package/src/lib/plugin-ecosystem.js +346 -0
  152. package/src/lib/pqc-manager.js +346 -0
  153. package/src/lib/process-manager.js +336 -0
  154. package/src/lib/protocol-fusion.js +338 -0
  155. package/src/lib/provider-options.js +346 -0
  156. package/src/lib/provider-stream.js +348 -0
  157. package/src/lib/quantization.js +337 -0
  158. package/src/lib/response-cache.js +333 -0
  159. package/src/lib/scim-manager.js +346 -0
  160. package/src/lib/service-manager.js +337 -0
  161. package/src/lib/session-core-singletons.js +341 -0
  162. package/src/lib/session-manager.js +334 -0
  163. package/src/lib/skill-loader.js +334 -0
  164. package/src/lib/skill-mcp.js +336 -0
  165. package/src/lib/social-manager.js +330 -0
  166. package/src/lib/sso-manager.js +340 -0
  167. package/src/lib/stix-parser.js +346 -0
  168. package/src/lib/sub-agent-context.js +343 -0
  169. package/src/lib/sub-agent-profiles.js +335 -0
  170. package/src/lib/sub-agent-registry.js +336 -0
  171. package/src/lib/sync-manager.js +336 -0
  172. package/src/lib/tech-learning-engine.js +341 -0
  173. package/src/lib/tenant-saas.js +341 -0
  174. package/src/lib/threat-intel.js +330 -0
  175. package/src/lib/todo-manager.js +336 -0
  176. package/src/lib/token-tracker.js +336 -0
  177. package/src/lib/trust-security.js +343 -0
  178. package/src/lib/ueba.js +340 -0
  179. package/src/lib/universal-runtime.js +330 -0
  180. package/src/lib/wallet-manager.js +336 -0
  181. package/src/lib/web-ui-server.js +348 -0
  182. package/src/lib/workflow-engine.js +330 -0
  183. package/src/lib/workflow-expr.js +346 -0
  184. package/src/lib/ws-chat-handler.js +337 -0
@@ -823,3 +823,216 @@ export function registerDlpV2Command(dlp) {
823
823
  console.log(JSON.stringify(getDlpEngineStatsV2(), null, 2));
824
824
  });
825
825
  }
826
+
827
+ // === Iter20 V2 governance overlay ===
828
+ export function registerDlpgovV2Commands(program) {
829
+ const parent = program.commands.find((c) => c.name() === "dlp");
830
+ if (!parent) return;
831
+ const L = async () => await import("../lib/dlp-engine.js");
832
+ parent
833
+ .command("dlpgov-enums-v2")
834
+ .description("Show V2 enums")
835
+ .action(async () => {
836
+ const m = await L();
837
+ console.log(
838
+ JSON.stringify(
839
+ {
840
+ profileMaturity: m.DLPGOV_PROFILE_MATURITY_V2,
841
+ scanLifecycle: m.DLPGOV_SCAN_LIFECYCLE_V2,
842
+ },
843
+ null,
844
+ 2,
845
+ ),
846
+ );
847
+ });
848
+ parent
849
+ .command("dlpgov-config-v2")
850
+ .description("Show V2 config")
851
+ .action(async () => {
852
+ const m = await L();
853
+ console.log(
854
+ JSON.stringify(
855
+ {
856
+ maxActive: m.getMaxActiveDlpgovProfilesPerOwnerV2(),
857
+ maxPending: m.getMaxPendingDlpgovScansPerProfileV2(),
858
+ idleMs: m.getDlpgovProfileIdleMsV2(),
859
+ stuckMs: m.getDlpgovScanStuckMsV2(),
860
+ },
861
+ null,
862
+ 2,
863
+ ),
864
+ );
865
+ });
866
+ parent
867
+ .command("dlpgov-set-max-active-v2 <n>")
868
+ .description("Set max active")
869
+ .action(async (n) => {
870
+ (await L()).setMaxActiveDlpgovProfilesPerOwnerV2(Number(n));
871
+ console.log("ok");
872
+ });
873
+ parent
874
+ .command("dlpgov-set-max-pending-v2 <n>")
875
+ .description("Set max pending")
876
+ .action(async (n) => {
877
+ (await L()).setMaxPendingDlpgovScansPerProfileV2(Number(n));
878
+ console.log("ok");
879
+ });
880
+ parent
881
+ .command("dlpgov-set-idle-ms-v2 <n>")
882
+ .description("Set idle threshold ms")
883
+ .action(async (n) => {
884
+ (await L()).setDlpgovProfileIdleMsV2(Number(n));
885
+ console.log("ok");
886
+ });
887
+ parent
888
+ .command("dlpgov-set-stuck-ms-v2 <n>")
889
+ .description("Set stuck threshold ms")
890
+ .action(async (n) => {
891
+ (await L()).setDlpgovScanStuckMsV2(Number(n));
892
+ console.log("ok");
893
+ });
894
+ parent
895
+ .command("dlpgov-register-v2 <id> <owner>")
896
+ .description("Register V2 profile")
897
+ .option("--classification <v>", "classification")
898
+ .action(async (id, owner, o) => {
899
+ const m = await L();
900
+ console.log(
901
+ JSON.stringify(
902
+ m.registerDlpgovProfileV2({
903
+ id,
904
+ owner,
905
+ classification: o.classification,
906
+ }),
907
+ null,
908
+ 2,
909
+ ),
910
+ );
911
+ });
912
+ parent
913
+ .command("dlpgov-activate-v2 <id>")
914
+ .description("Activate profile")
915
+ .action(async (id) => {
916
+ console.log(
917
+ JSON.stringify((await L()).activateDlpgovProfileV2(id), null, 2),
918
+ );
919
+ });
920
+ parent
921
+ .command("dlpgov-suspend-v2 <id>")
922
+ .description("Suspend profile")
923
+ .action(async (id) => {
924
+ console.log(
925
+ JSON.stringify((await L()).suspendDlpgovProfileV2(id), null, 2),
926
+ );
927
+ });
928
+ parent
929
+ .command("dlpgov-archive-v2 <id>")
930
+ .description("Archive profile")
931
+ .action(async (id) => {
932
+ console.log(
933
+ JSON.stringify((await L()).archiveDlpgovProfileV2(id), null, 2),
934
+ );
935
+ });
936
+ parent
937
+ .command("dlpgov-touch-v2 <id>")
938
+ .description("Touch profile")
939
+ .action(async (id) => {
940
+ console.log(
941
+ JSON.stringify((await L()).touchDlpgovProfileV2(id), null, 2),
942
+ );
943
+ });
944
+ parent
945
+ .command("dlpgov-get-v2 <id>")
946
+ .description("Get profile")
947
+ .action(async (id) => {
948
+ console.log(JSON.stringify((await L()).getDlpgovProfileV2(id), null, 2));
949
+ });
950
+ parent
951
+ .command("dlpgov-list-v2")
952
+ .description("List profiles")
953
+ .action(async () => {
954
+ console.log(JSON.stringify((await L()).listDlpgovProfilesV2(), null, 2));
955
+ });
956
+ parent
957
+ .command("dlpgov-create-scan-v2 <id> <profileId>")
958
+ .description("Create scan")
959
+ .option("--resource <v>", "resource")
960
+ .action(async (id, profileId, o) => {
961
+ const m = await L();
962
+ console.log(
963
+ JSON.stringify(
964
+ m.createDlpgovScanV2({ id, profileId, resource: o.resource }),
965
+ null,
966
+ 2,
967
+ ),
968
+ );
969
+ });
970
+ parent
971
+ .command("dlpgov-scanning-scan-v2 <id>")
972
+ .description("Mark scan as scanning")
973
+ .action(async (id) => {
974
+ console.log(
975
+ JSON.stringify((await L()).scanningDlpgovScanV2(id), null, 2),
976
+ );
977
+ });
978
+ parent
979
+ .command("dlpgov-complete-scan-v2 <id>")
980
+ .description("Complete scan")
981
+ .action(async (id) => {
982
+ console.log(
983
+ JSON.stringify((await L()).completeScanDlpgovV2(id), null, 2),
984
+ );
985
+ });
986
+ parent
987
+ .command("dlpgov-fail-scan-v2 <id> [reason]")
988
+ .description("Fail scan")
989
+ .action(async (id, reason) => {
990
+ console.log(
991
+ JSON.stringify((await L()).failDlpgovScanV2(id, reason), null, 2),
992
+ );
993
+ });
994
+ parent
995
+ .command("dlpgov-cancel-scan-v2 <id> [reason]")
996
+ .description("Cancel scan")
997
+ .action(async (id, reason) => {
998
+ console.log(
999
+ JSON.stringify((await L()).cancelDlpgovScanV2(id, reason), null, 2),
1000
+ );
1001
+ });
1002
+ parent
1003
+ .command("dlpgov-get-scan-v2 <id>")
1004
+ .description("Get scan")
1005
+ .action(async (id) => {
1006
+ console.log(JSON.stringify((await L()).getDlpgovScanV2(id), null, 2));
1007
+ });
1008
+ parent
1009
+ .command("dlpgov-list-scans-v2")
1010
+ .description("List scans")
1011
+ .action(async () => {
1012
+ console.log(JSON.stringify((await L()).listDlpgovScansV2(), null, 2));
1013
+ });
1014
+ parent
1015
+ .command("dlpgov-auto-suspend-idle-v2")
1016
+ .description("Auto-suspend idle")
1017
+ .action(async () => {
1018
+ console.log(
1019
+ JSON.stringify((await L()).autoSuspendIdleDlpgovProfilesV2(), null, 2),
1020
+ );
1021
+ });
1022
+ parent
1023
+ .command("dlpgov-auto-fail-stuck-v2")
1024
+ .description("Auto-fail stuck scans")
1025
+ .action(async () => {
1026
+ console.log(
1027
+ JSON.stringify((await L()).autoFailStuckDlpgovScansV2(), null, 2),
1028
+ );
1029
+ });
1030
+ parent
1031
+ .command("dlpgov-gov-stats-v2")
1032
+ .description("V2 gov stats")
1033
+ .action(async () => {
1034
+ console.log(
1035
+ JSON.stringify((await L()).getDlpEngineGovStatsV2(), null, 2),
1036
+ );
1037
+ });
1038
+ }
@@ -1162,3 +1162,202 @@ function _registerEconomyV2Commands(parent) {
1162
1162
  console.log(JSON.stringify(m.getAgentEconomyGovStatsV2(), null, 2));
1163
1163
  });
1164
1164
  }
1165
+
1166
+ // === Iter28 V2 governance overlay: Aecogov ===
1167
+ export function registerAecoV2Commands(program) {
1168
+ const parent = program.commands.find((c) => c.name() === "economy");
1169
+ if (!parent) return;
1170
+ const L = async () => await import("../lib/agent-economy.js");
1171
+ parent
1172
+ .command("aecogov-enums-v2")
1173
+ .description("Show V2 enums")
1174
+ .action(async () => {
1175
+ const m = await L();
1176
+ console.log(
1177
+ JSON.stringify(
1178
+ {
1179
+ profileMaturity: m.AECOGOV_PROFILE_MATURITY_V2,
1180
+ tradeLifecycle: m.AECOGOV_TRADE_LIFECYCLE_V2,
1181
+ },
1182
+ null,
1183
+ 2,
1184
+ ),
1185
+ );
1186
+ });
1187
+ parent
1188
+ .command("aecogov-config-v2")
1189
+ .description("Show V2 config")
1190
+ .action(async () => {
1191
+ const m = await L();
1192
+ console.log(
1193
+ JSON.stringify(
1194
+ {
1195
+ maxActive: m.getMaxActiveAecoProfilesPerOwnerV2(),
1196
+ maxPending: m.getMaxPendingAecoTradesPerProfileV2(),
1197
+ idleMs: m.getAecoProfileIdleMsV2(),
1198
+ stuckMs: m.getAecoTradeStuckMsV2(),
1199
+ },
1200
+ null,
1201
+ 2,
1202
+ ),
1203
+ );
1204
+ });
1205
+ parent
1206
+ .command("aecogov-set-max-active-v2 <n>")
1207
+ .description("Set max active")
1208
+ .action(async (n) => {
1209
+ (await L()).setMaxActiveAecoProfilesPerOwnerV2(Number(n));
1210
+ console.log("ok");
1211
+ });
1212
+ parent
1213
+ .command("aecogov-set-max-pending-v2 <n>")
1214
+ .description("Set max pending")
1215
+ .action(async (n) => {
1216
+ (await L()).setMaxPendingAecoTradesPerProfileV2(Number(n));
1217
+ console.log("ok");
1218
+ });
1219
+ parent
1220
+ .command("aecogov-set-idle-ms-v2 <n>")
1221
+ .description("Set idle threshold ms")
1222
+ .action(async (n) => {
1223
+ (await L()).setAecoProfileIdleMsV2(Number(n));
1224
+ console.log("ok");
1225
+ });
1226
+ parent
1227
+ .command("aecogov-set-stuck-ms-v2 <n>")
1228
+ .description("Set stuck threshold ms")
1229
+ .action(async (n) => {
1230
+ (await L()).setAecoTradeStuckMsV2(Number(n));
1231
+ console.log("ok");
1232
+ });
1233
+ parent
1234
+ .command("aecogov-register-v2 <id> <owner>")
1235
+ .description("Register V2 profile")
1236
+ .option("--market <v>", "market")
1237
+ .action(async (id, owner, o) => {
1238
+ const m = await L();
1239
+ console.log(
1240
+ JSON.stringify(
1241
+ m.registerAecoProfileV2({ id, owner, market: o.market }),
1242
+ null,
1243
+ 2,
1244
+ ),
1245
+ );
1246
+ });
1247
+ parent
1248
+ .command("aecogov-activate-v2 <id>")
1249
+ .description("Activate profile")
1250
+ .action(async (id) => {
1251
+ console.log(
1252
+ JSON.stringify((await L()).activateAecoProfileV2(id), null, 2),
1253
+ );
1254
+ });
1255
+ parent
1256
+ .command("aecogov-paused-v2 <id>")
1257
+ .description("Paused profile")
1258
+ .action(async (id) => {
1259
+ console.log(JSON.stringify((await L()).pausedAecoProfileV2(id), null, 2));
1260
+ });
1261
+ parent
1262
+ .command("aecogov-archive-v2 <id>")
1263
+ .description("Archive profile")
1264
+ .action(async (id) => {
1265
+ console.log(
1266
+ JSON.stringify((await L()).archiveAecoProfileV2(id), null, 2),
1267
+ );
1268
+ });
1269
+ parent
1270
+ .command("aecogov-touch-v2 <id>")
1271
+ .description("Touch profile")
1272
+ .action(async (id) => {
1273
+ console.log(JSON.stringify((await L()).touchAecoProfileV2(id), null, 2));
1274
+ });
1275
+ parent
1276
+ .command("aecogov-get-v2 <id>")
1277
+ .description("Get profile")
1278
+ .action(async (id) => {
1279
+ console.log(JSON.stringify((await L()).getAecoProfileV2(id), null, 2));
1280
+ });
1281
+ parent
1282
+ .command("aecogov-list-v2")
1283
+ .description("List profiles")
1284
+ .action(async () => {
1285
+ console.log(JSON.stringify((await L()).listAecoProfilesV2(), null, 2));
1286
+ });
1287
+ parent
1288
+ .command("aecogov-create-trade-v2 <id> <profileId>")
1289
+ .description("Create trade")
1290
+ .option("--orderId <v>", "orderId")
1291
+ .action(async (id, profileId, o) => {
1292
+ const m = await L();
1293
+ console.log(
1294
+ JSON.stringify(
1295
+ m.createAecoTradeV2({ id, profileId, orderId: o.orderId }),
1296
+ null,
1297
+ 2,
1298
+ ),
1299
+ );
1300
+ });
1301
+ parent
1302
+ .command("aecogov-trading-trade-v2 <id>")
1303
+ .description("Mark trade as trading")
1304
+ .action(async (id) => {
1305
+ console.log(JSON.stringify((await L()).tradingAecoTradeV2(id), null, 2));
1306
+ });
1307
+ parent
1308
+ .command("aecogov-complete-trade-v2 <id>")
1309
+ .description("Complete trade")
1310
+ .action(async (id) => {
1311
+ console.log(JSON.stringify((await L()).completeTradeAecoV2(id), null, 2));
1312
+ });
1313
+ parent
1314
+ .command("aecogov-fail-trade-v2 <id> [reason]")
1315
+ .description("Fail trade")
1316
+ .action(async (id, reason) => {
1317
+ console.log(
1318
+ JSON.stringify((await L()).failAecoTradeV2(id, reason), null, 2),
1319
+ );
1320
+ });
1321
+ parent
1322
+ .command("aecogov-cancel-trade-v2 <id> [reason]")
1323
+ .description("Cancel trade")
1324
+ .action(async (id, reason) => {
1325
+ console.log(
1326
+ JSON.stringify((await L()).cancelAecoTradeV2(id, reason), null, 2),
1327
+ );
1328
+ });
1329
+ parent
1330
+ .command("aecogov-get-trade-v2 <id>")
1331
+ .description("Get trade")
1332
+ .action(async (id) => {
1333
+ console.log(JSON.stringify((await L()).getAecoTradeV2(id), null, 2));
1334
+ });
1335
+ parent
1336
+ .command("aecogov-list-trades-v2")
1337
+ .description("List trades")
1338
+ .action(async () => {
1339
+ console.log(JSON.stringify((await L()).listAecoTradesV2(), null, 2));
1340
+ });
1341
+ parent
1342
+ .command("aecogov-auto-paused-idle-v2")
1343
+ .description("Auto-paused idle")
1344
+ .action(async () => {
1345
+ console.log(
1346
+ JSON.stringify((await L()).autoPausedIdleAecoProfilesV2(), null, 2),
1347
+ );
1348
+ });
1349
+ parent
1350
+ .command("aecogov-auto-fail-stuck-v2")
1351
+ .description("Auto-fail stuck trades")
1352
+ .action(async () => {
1353
+ console.log(
1354
+ JSON.stringify((await L()).autoFailStuckAecoTradesV2(), null, 2),
1355
+ );
1356
+ });
1357
+ parent
1358
+ .command("aecogov-gov-stats-v2")
1359
+ .description("V2 gov stats")
1360
+ .action(async () => {
1361
+ console.log(JSON.stringify((await L()).getAecogovStatsV2(), null, 2));
1362
+ });
1363
+ }
@@ -572,3 +572,204 @@ export function registerEncryptCommand(program) {
572
572
  console.log(JSON.stringify(getCryptoManagerStatsV2(), null, 2)),
573
573
  );
574
574
  }
575
+
576
+ // === Iter28 V2 governance overlay: Crygov ===
577
+ export function registerCryV2Commands(program) {
578
+ const parent = program.commands.find((c) => c.name() === "encrypt");
579
+ if (!parent) return;
580
+ const L = async () => await import("../lib/crypto-manager.js");
581
+ parent
582
+ .command("crygov-enums-v2")
583
+ .description("Show V2 enums")
584
+ .action(async () => {
585
+ const m = await L();
586
+ console.log(
587
+ JSON.stringify(
588
+ {
589
+ profileMaturity: m.CRYGOV_PROFILE_MATURITY_V2,
590
+ encryptLifecycle: m.CRYGOV_ENCRYPT_LIFECYCLE_V2,
591
+ },
592
+ null,
593
+ 2,
594
+ ),
595
+ );
596
+ });
597
+ parent
598
+ .command("crygov-config-v2")
599
+ .description("Show V2 config")
600
+ .action(async () => {
601
+ const m = await L();
602
+ console.log(
603
+ JSON.stringify(
604
+ {
605
+ maxActive: m.getMaxActiveCryProfilesPerOwnerV2(),
606
+ maxPending: m.getMaxPendingCryEncryptsPerProfileV2(),
607
+ idleMs: m.getCryProfileIdleMsV2(),
608
+ stuckMs: m.getCryEncryptStuckMsV2(),
609
+ },
610
+ null,
611
+ 2,
612
+ ),
613
+ );
614
+ });
615
+ parent
616
+ .command("crygov-set-max-active-v2 <n>")
617
+ .description("Set max active")
618
+ .action(async (n) => {
619
+ (await L()).setMaxActiveCryProfilesPerOwnerV2(Number(n));
620
+ console.log("ok");
621
+ });
622
+ parent
623
+ .command("crygov-set-max-pending-v2 <n>")
624
+ .description("Set max pending")
625
+ .action(async (n) => {
626
+ (await L()).setMaxPendingCryEncryptsPerProfileV2(Number(n));
627
+ console.log("ok");
628
+ });
629
+ parent
630
+ .command("crygov-set-idle-ms-v2 <n>")
631
+ .description("Set idle threshold ms")
632
+ .action(async (n) => {
633
+ (await L()).setCryProfileIdleMsV2(Number(n));
634
+ console.log("ok");
635
+ });
636
+ parent
637
+ .command("crygov-set-stuck-ms-v2 <n>")
638
+ .description("Set stuck threshold ms")
639
+ .action(async (n) => {
640
+ (await L()).setCryEncryptStuckMsV2(Number(n));
641
+ console.log("ok");
642
+ });
643
+ parent
644
+ .command("crygov-register-v2 <id> <owner>")
645
+ .description("Register V2 profile")
646
+ .option("--provider <v>", "provider")
647
+ .action(async (id, owner, o) => {
648
+ const m = await L();
649
+ console.log(
650
+ JSON.stringify(
651
+ m.registerCryProfileV2({ id, owner, provider: o.provider }),
652
+ null,
653
+ 2,
654
+ ),
655
+ );
656
+ });
657
+ parent
658
+ .command("crygov-activate-v2 <id>")
659
+ .description("Activate profile")
660
+ .action(async (id) => {
661
+ console.log(
662
+ JSON.stringify((await L()).activateCryProfileV2(id), null, 2),
663
+ );
664
+ });
665
+ parent
666
+ .command("crygov-stale-v2 <id>")
667
+ .description("Stale profile")
668
+ .action(async (id) => {
669
+ console.log(JSON.stringify((await L()).staleCryProfileV2(id), null, 2));
670
+ });
671
+ parent
672
+ .command("crygov-archive-v2 <id>")
673
+ .description("Archive profile")
674
+ .action(async (id) => {
675
+ console.log(JSON.stringify((await L()).archiveCryProfileV2(id), null, 2));
676
+ });
677
+ parent
678
+ .command("crygov-touch-v2 <id>")
679
+ .description("Touch profile")
680
+ .action(async (id) => {
681
+ console.log(JSON.stringify((await L()).touchCryProfileV2(id), null, 2));
682
+ });
683
+ parent
684
+ .command("crygov-get-v2 <id>")
685
+ .description("Get profile")
686
+ .action(async (id) => {
687
+ console.log(JSON.stringify((await L()).getCryProfileV2(id), null, 2));
688
+ });
689
+ parent
690
+ .command("crygov-list-v2")
691
+ .description("List profiles")
692
+ .action(async () => {
693
+ console.log(JSON.stringify((await L()).listCryProfilesV2(), null, 2));
694
+ });
695
+ parent
696
+ .command("crygov-create-encrypt-v2 <id> <profileId>")
697
+ .description("Create encrypt")
698
+ .option("--keyId <v>", "keyId")
699
+ .action(async (id, profileId, o) => {
700
+ const m = await L();
701
+ console.log(
702
+ JSON.stringify(
703
+ m.createCryEncryptV2({ id, profileId, keyId: o.keyId }),
704
+ null,
705
+ 2,
706
+ ),
707
+ );
708
+ });
709
+ parent
710
+ .command("crygov-encrypting-encrypt-v2 <id>")
711
+ .description("Mark encrypt as encrypting")
712
+ .action(async (id) => {
713
+ console.log(
714
+ JSON.stringify((await L()).encryptingCryEncryptV2(id), null, 2),
715
+ );
716
+ });
717
+ parent
718
+ .command("crygov-complete-encrypt-v2 <id>")
719
+ .description("Complete encrypt")
720
+ .action(async (id) => {
721
+ console.log(
722
+ JSON.stringify((await L()).completeEncryptCryV2(id), null, 2),
723
+ );
724
+ });
725
+ parent
726
+ .command("crygov-fail-encrypt-v2 <id> [reason]")
727
+ .description("Fail encrypt")
728
+ .action(async (id, reason) => {
729
+ console.log(
730
+ JSON.stringify((await L()).failCryEncryptV2(id, reason), null, 2),
731
+ );
732
+ });
733
+ parent
734
+ .command("crygov-cancel-encrypt-v2 <id> [reason]")
735
+ .description("Cancel encrypt")
736
+ .action(async (id, reason) => {
737
+ console.log(
738
+ JSON.stringify((await L()).cancelCryEncryptV2(id, reason), null, 2),
739
+ );
740
+ });
741
+ parent
742
+ .command("crygov-get-encrypt-v2 <id>")
743
+ .description("Get encrypt")
744
+ .action(async (id) => {
745
+ console.log(JSON.stringify((await L()).getCryEncryptV2(id), null, 2));
746
+ });
747
+ parent
748
+ .command("crygov-list-encrypts-v2")
749
+ .description("List encrypts")
750
+ .action(async () => {
751
+ console.log(JSON.stringify((await L()).listCryEncryptsV2(), null, 2));
752
+ });
753
+ parent
754
+ .command("crygov-auto-stale-idle-v2")
755
+ .description("Auto-stale idle")
756
+ .action(async () => {
757
+ console.log(
758
+ JSON.stringify((await L()).autoStaleIdleCryProfilesV2(), null, 2),
759
+ );
760
+ });
761
+ parent
762
+ .command("crygov-auto-fail-stuck-v2")
763
+ .description("Auto-fail stuck encrypts")
764
+ .action(async () => {
765
+ console.log(
766
+ JSON.stringify((await L()).autoFailStuckCryEncryptsV2(), null, 2),
767
+ );
768
+ });
769
+ parent
770
+ .command("crygov-gov-stats-v2")
771
+ .description("V2 gov stats")
772
+ .action(async () => {
773
+ console.log(JSON.stringify((await L()).getCrygovStatsV2(), null, 2));
774
+ });
775
+ }