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
@@ -894,3 +894,409 @@ export function registerCcbgovV2Commands(program) {
894
894
  );
895
895
  });
896
896
  }
897
+
898
+ // === Iter25 V2 governance overlay ===
899
+ export function registerArgovV2Commands(program) {
900
+ const parent = program.commands.find((c) => c.name() === "orchestrate");
901
+ if (!parent) return;
902
+ const L = async () => await import("../lib/agent-router.js");
903
+ parent
904
+ .command("argov-enums-v2")
905
+ .description("Show V2 enums")
906
+ .action(async () => {
907
+ const m = await L();
908
+ console.log(
909
+ JSON.stringify(
910
+ {
911
+ profileMaturity: m.ARGOV_PROFILE_MATURITY_V2,
912
+ routingLifecycle: m.ARGOV_ROUTING_LIFECYCLE_V2,
913
+ },
914
+ null,
915
+ 2,
916
+ ),
917
+ );
918
+ });
919
+ parent
920
+ .command("argov-config-v2")
921
+ .description("Show V2 config")
922
+ .action(async () => {
923
+ const m = await L();
924
+ console.log(
925
+ JSON.stringify(
926
+ {
927
+ maxActive: m.getMaxActiveArgovProfilesPerOwnerV2(),
928
+ maxPending: m.getMaxPendingArgovRoutingsPerProfileV2(),
929
+ idleMs: m.getArgovProfileIdleMsV2(),
930
+ stuckMs: m.getArgovRoutingStuckMsV2(),
931
+ },
932
+ null,
933
+ 2,
934
+ ),
935
+ );
936
+ });
937
+ parent
938
+ .command("argov-set-max-active-v2 <n>")
939
+ .description("Set max active")
940
+ .action(async (n) => {
941
+ (await L()).setMaxActiveArgovProfilesPerOwnerV2(Number(n));
942
+ console.log("ok");
943
+ });
944
+ parent
945
+ .command("argov-set-max-pending-v2 <n>")
946
+ .description("Set max pending")
947
+ .action(async (n) => {
948
+ (await L()).setMaxPendingArgovRoutingsPerProfileV2(Number(n));
949
+ console.log("ok");
950
+ });
951
+ parent
952
+ .command("argov-set-idle-ms-v2 <n>")
953
+ .description("Set idle threshold ms")
954
+ .action(async (n) => {
955
+ (await L()).setArgovProfileIdleMsV2(Number(n));
956
+ console.log("ok");
957
+ });
958
+ parent
959
+ .command("argov-set-stuck-ms-v2 <n>")
960
+ .description("Set stuck threshold ms")
961
+ .action(async (n) => {
962
+ (await L()).setArgovRoutingStuckMsV2(Number(n));
963
+ console.log("ok");
964
+ });
965
+ parent
966
+ .command("argov-register-v2 <id> <owner>")
967
+ .description("Register V2 profile")
968
+ .option("--strategy <v>", "strategy")
969
+ .action(async (id, owner, o) => {
970
+ const m = await L();
971
+ console.log(
972
+ JSON.stringify(
973
+ m.registerArgovProfileV2({ id, owner, strategy: o.strategy }),
974
+ null,
975
+ 2,
976
+ ),
977
+ );
978
+ });
979
+ parent
980
+ .command("argov-activate-v2 <id>")
981
+ .description("Activate profile")
982
+ .action(async (id) => {
983
+ console.log(
984
+ JSON.stringify((await L()).activateArgovProfileV2(id), null, 2),
985
+ );
986
+ });
987
+ parent
988
+ .command("argov-stale-v2 <id>")
989
+ .description("Stale profile")
990
+ .action(async (id) => {
991
+ console.log(JSON.stringify((await L()).staleArgovProfileV2(id), null, 2));
992
+ });
993
+ parent
994
+ .command("argov-archive-v2 <id>")
995
+ .description("Archive profile")
996
+ .action(async (id) => {
997
+ console.log(
998
+ JSON.stringify((await L()).archiveArgovProfileV2(id), null, 2),
999
+ );
1000
+ });
1001
+ parent
1002
+ .command("argov-touch-v2 <id>")
1003
+ .description("Touch profile")
1004
+ .action(async (id) => {
1005
+ console.log(JSON.stringify((await L()).touchArgovProfileV2(id), null, 2));
1006
+ });
1007
+ parent
1008
+ .command("argov-get-v2 <id>")
1009
+ .description("Get profile")
1010
+ .action(async (id) => {
1011
+ console.log(JSON.stringify((await L()).getArgovProfileV2(id), null, 2));
1012
+ });
1013
+ parent
1014
+ .command("argov-list-v2")
1015
+ .description("List profiles")
1016
+ .action(async () => {
1017
+ console.log(JSON.stringify((await L()).listArgovProfilesV2(), null, 2));
1018
+ });
1019
+ parent
1020
+ .command("argov-create-routing-v2 <id> <profileId>")
1021
+ .description("Create routing")
1022
+ .option("--target <v>", "target")
1023
+ .action(async (id, profileId, o) => {
1024
+ const m = await L();
1025
+ console.log(
1026
+ JSON.stringify(
1027
+ m.createArgovRoutingV2({ id, profileId, target: o.target }),
1028
+ null,
1029
+ 2,
1030
+ ),
1031
+ );
1032
+ });
1033
+ parent
1034
+ .command("argov-running-routing-v2 <id>")
1035
+ .description("Mark routing as running")
1036
+ .action(async (id) => {
1037
+ console.log(
1038
+ JSON.stringify((await L()).runningArgovRoutingV2(id), null, 2),
1039
+ );
1040
+ });
1041
+ parent
1042
+ .command("argov-complete-routing-v2 <id>")
1043
+ .description("Complete routing")
1044
+ .action(async (id) => {
1045
+ console.log(
1046
+ JSON.stringify((await L()).completeRoutingArgovV2(id), null, 2),
1047
+ );
1048
+ });
1049
+ parent
1050
+ .command("argov-fail-routing-v2 <id> [reason]")
1051
+ .description("Fail routing")
1052
+ .action(async (id, reason) => {
1053
+ console.log(
1054
+ JSON.stringify((await L()).failArgovRoutingV2(id, reason), null, 2),
1055
+ );
1056
+ });
1057
+ parent
1058
+ .command("argov-cancel-routing-v2 <id> [reason]")
1059
+ .description("Cancel routing")
1060
+ .action(async (id, reason) => {
1061
+ console.log(
1062
+ JSON.stringify((await L()).cancelArgovRoutingV2(id, reason), null, 2),
1063
+ );
1064
+ });
1065
+ parent
1066
+ .command("argov-get-routing-v2 <id>")
1067
+ .description("Get routing")
1068
+ .action(async (id) => {
1069
+ console.log(JSON.stringify((await L()).getArgovRoutingV2(id), null, 2));
1070
+ });
1071
+ parent
1072
+ .command("argov-list-routings-v2")
1073
+ .description("List routings")
1074
+ .action(async () => {
1075
+ console.log(JSON.stringify((await L()).listArgovRoutingsV2(), null, 2));
1076
+ });
1077
+ parent
1078
+ .command("argov-auto-stale-idle-v2")
1079
+ .description("Auto-stale idle")
1080
+ .action(async () => {
1081
+ console.log(
1082
+ JSON.stringify((await L()).autoStaleIdleArgovProfilesV2(), null, 2),
1083
+ );
1084
+ });
1085
+ parent
1086
+ .command("argov-auto-fail-stuck-v2")
1087
+ .description("Auto-fail stuck routings")
1088
+ .action(async () => {
1089
+ console.log(
1090
+ JSON.stringify((await L()).autoFailStuckArgovRoutingsV2(), null, 2),
1091
+ );
1092
+ });
1093
+ parent
1094
+ .command("argov-gov-stats-v2")
1095
+ .description("V2 gov stats")
1096
+ .action(async () => {
1097
+ console.log(
1098
+ JSON.stringify((await L()).getAgentRouterGovStatsV2(), null, 2),
1099
+ );
1100
+ });
1101
+ }
1102
+
1103
+ // === Iter28 V2 governance overlay: Acrdgov ===
1104
+ export function registerAcrdV2Commands(program) {
1105
+ const parent = program.commands.find((c) => c.name() === "orchestrate");
1106
+ if (!parent) return;
1107
+ const L = async () => await import("../lib/agent-coordinator.js");
1108
+ parent
1109
+ .command("acrdgov-enums-v2")
1110
+ .description("Show V2 enums")
1111
+ .action(async () => {
1112
+ const m = await L();
1113
+ console.log(
1114
+ JSON.stringify(
1115
+ {
1116
+ profileMaturity: m.ACRDGOV_PROFILE_MATURITY_V2,
1117
+ coordLifecycle: m.ACRDGOV_COORD_LIFECYCLE_V2,
1118
+ },
1119
+ null,
1120
+ 2,
1121
+ ),
1122
+ );
1123
+ });
1124
+ parent
1125
+ .command("acrdgov-config-v2")
1126
+ .description("Show V2 config")
1127
+ .action(async () => {
1128
+ const m = await L();
1129
+ console.log(
1130
+ JSON.stringify(
1131
+ {
1132
+ maxActive: m.getMaxActiveAcrdProfilesPerOwnerV2(),
1133
+ maxPending: m.getMaxPendingAcrdCoordsPerProfileV2(),
1134
+ idleMs: m.getAcrdProfileIdleMsV2(),
1135
+ stuckMs: m.getAcrdCoordStuckMsV2(),
1136
+ },
1137
+ null,
1138
+ 2,
1139
+ ),
1140
+ );
1141
+ });
1142
+ parent
1143
+ .command("acrdgov-set-max-active-v2 <n>")
1144
+ .description("Set max active")
1145
+ .action(async (n) => {
1146
+ (await L()).setMaxActiveAcrdProfilesPerOwnerV2(Number(n));
1147
+ console.log("ok");
1148
+ });
1149
+ parent
1150
+ .command("acrdgov-set-max-pending-v2 <n>")
1151
+ .description("Set max pending")
1152
+ .action(async (n) => {
1153
+ (await L()).setMaxPendingAcrdCoordsPerProfileV2(Number(n));
1154
+ console.log("ok");
1155
+ });
1156
+ parent
1157
+ .command("acrdgov-set-idle-ms-v2 <n>")
1158
+ .description("Set idle threshold ms")
1159
+ .action(async (n) => {
1160
+ (await L()).setAcrdProfileIdleMsV2(Number(n));
1161
+ console.log("ok");
1162
+ });
1163
+ parent
1164
+ .command("acrdgov-set-stuck-ms-v2 <n>")
1165
+ .description("Set stuck threshold ms")
1166
+ .action(async (n) => {
1167
+ (await L()).setAcrdCoordStuckMsV2(Number(n));
1168
+ console.log("ok");
1169
+ });
1170
+ parent
1171
+ .command("acrdgov-register-v2 <id> <owner>")
1172
+ .description("Register V2 profile")
1173
+ .option("--role <v>", "role")
1174
+ .action(async (id, owner, o) => {
1175
+ const m = await L();
1176
+ console.log(
1177
+ JSON.stringify(
1178
+ m.registerAcrdProfileV2({ id, owner, role: o.role }),
1179
+ null,
1180
+ 2,
1181
+ ),
1182
+ );
1183
+ });
1184
+ parent
1185
+ .command("acrdgov-activate-v2 <id>")
1186
+ .description("Activate profile")
1187
+ .action(async (id) => {
1188
+ console.log(
1189
+ JSON.stringify((await L()).activateAcrdProfileV2(id), null, 2),
1190
+ );
1191
+ });
1192
+ parent
1193
+ .command("acrdgov-idle-v2 <id>")
1194
+ .description("Idle profile")
1195
+ .action(async (id) => {
1196
+ console.log(JSON.stringify((await L()).idleAcrdProfileV2(id), null, 2));
1197
+ });
1198
+ parent
1199
+ .command("acrdgov-archive-v2 <id>")
1200
+ .description("Archive profile")
1201
+ .action(async (id) => {
1202
+ console.log(
1203
+ JSON.stringify((await L()).archiveAcrdProfileV2(id), null, 2),
1204
+ );
1205
+ });
1206
+ parent
1207
+ .command("acrdgov-touch-v2 <id>")
1208
+ .description("Touch profile")
1209
+ .action(async (id) => {
1210
+ console.log(JSON.stringify((await L()).touchAcrdProfileV2(id), null, 2));
1211
+ });
1212
+ parent
1213
+ .command("acrdgov-get-v2 <id>")
1214
+ .description("Get profile")
1215
+ .action(async (id) => {
1216
+ console.log(JSON.stringify((await L()).getAcrdProfileV2(id), null, 2));
1217
+ });
1218
+ parent
1219
+ .command("acrdgov-list-v2")
1220
+ .description("List profiles")
1221
+ .action(async () => {
1222
+ console.log(JSON.stringify((await L()).listAcrdProfilesV2(), null, 2));
1223
+ });
1224
+ parent
1225
+ .command("acrdgov-create-coord-v2 <id> <profileId>")
1226
+ .description("Create coord")
1227
+ .option("--taskId <v>", "taskId")
1228
+ .action(async (id, profileId, o) => {
1229
+ const m = await L();
1230
+ console.log(
1231
+ JSON.stringify(
1232
+ m.createAcrdCoordV2({ id, profileId, taskId: o.taskId }),
1233
+ null,
1234
+ 2,
1235
+ ),
1236
+ );
1237
+ });
1238
+ parent
1239
+ .command("acrdgov-coordinating-coord-v2 <id>")
1240
+ .description("Mark coord as coordinating")
1241
+ .action(async (id) => {
1242
+ console.log(
1243
+ JSON.stringify((await L()).coordinatingAcrdCoordV2(id), null, 2),
1244
+ );
1245
+ });
1246
+ parent
1247
+ .command("acrdgov-complete-coord-v2 <id>")
1248
+ .description("Complete coord")
1249
+ .action(async (id) => {
1250
+ console.log(JSON.stringify((await L()).completeCoordAcrdV2(id), null, 2));
1251
+ });
1252
+ parent
1253
+ .command("acrdgov-fail-coord-v2 <id> [reason]")
1254
+ .description("Fail coord")
1255
+ .action(async (id, reason) => {
1256
+ console.log(
1257
+ JSON.stringify((await L()).failAcrdCoordV2(id, reason), null, 2),
1258
+ );
1259
+ });
1260
+ parent
1261
+ .command("acrdgov-cancel-coord-v2 <id> [reason]")
1262
+ .description("Cancel coord")
1263
+ .action(async (id, reason) => {
1264
+ console.log(
1265
+ JSON.stringify((await L()).cancelAcrdCoordV2(id, reason), null, 2),
1266
+ );
1267
+ });
1268
+ parent
1269
+ .command("acrdgov-get-coord-v2 <id>")
1270
+ .description("Get coord")
1271
+ .action(async (id) => {
1272
+ console.log(JSON.stringify((await L()).getAcrdCoordV2(id), null, 2));
1273
+ });
1274
+ parent
1275
+ .command("acrdgov-list-coords-v2")
1276
+ .description("List coords")
1277
+ .action(async () => {
1278
+ console.log(JSON.stringify((await L()).listAcrdCoordsV2(), null, 2));
1279
+ });
1280
+ parent
1281
+ .command("acrdgov-auto-idle-idle-v2")
1282
+ .description("Auto-idle idle")
1283
+ .action(async () => {
1284
+ console.log(
1285
+ JSON.stringify((await L()).autoIdleIdleAcrdProfilesV2(), null, 2),
1286
+ );
1287
+ });
1288
+ parent
1289
+ .command("acrdgov-auto-fail-stuck-v2")
1290
+ .description("Auto-fail stuck coords")
1291
+ .action(async () => {
1292
+ console.log(
1293
+ JSON.stringify((await L()).autoFailStuckAcrdCoordsV2(), null, 2),
1294
+ );
1295
+ });
1296
+ parent
1297
+ .command("acrdgov-gov-stats-v2")
1298
+ .description("V2 gov stats")
1299
+ .action(async () => {
1300
+ console.log(JSON.stringify((await L()).getAcrdgovStatsV2(), null, 2));
1301
+ });
1302
+ }
@@ -780,3 +780,212 @@ export function registerOrgCommand(program) {
780
780
  console.log(JSON.stringify(autoRevokeStaleInvitesV2(), null, 2));
781
781
  });
782
782
  }
783
+
784
+ // === Iter19 V2 governance overlay ===
785
+ export function registerOrggovV2Commands(program) {
786
+ const parent = program.commands.find((c) => c.name() === "org");
787
+ if (!parent) return;
788
+ const L = async () => await import("../lib/org-manager.js");
789
+ parent
790
+ .command("orggov-enums-v2")
791
+ .description("Show V2 enums")
792
+ .action(async () => {
793
+ const m = await L();
794
+ console.log(
795
+ JSON.stringify(
796
+ {
797
+ profileMaturity: m.ORGGOV_PROFILE_MATURITY_V2,
798
+ inviteLifecycle: m.ORGGOV_INVITE_LIFECYCLE_V2,
799
+ },
800
+ null,
801
+ 2,
802
+ ),
803
+ );
804
+ });
805
+ parent
806
+ .command("orggov-config-v2")
807
+ .description("Show V2 config")
808
+ .action(async () => {
809
+ const m = await L();
810
+ console.log(
811
+ JSON.stringify(
812
+ {
813
+ maxActive: m.getMaxActiveOrggovProfilesPerOwnerV2(),
814
+ maxPending: m.getMaxPendingOrggovInvitesPerProfileV2(),
815
+ idleMs: m.getOrggovProfileIdleMsV2(),
816
+ stuckMs: m.getOrggovInviteStuckMsV2(),
817
+ },
818
+ null,
819
+ 2,
820
+ ),
821
+ );
822
+ });
823
+ parent
824
+ .command("orggov-set-max-active-v2 <n>")
825
+ .description("Set max active")
826
+ .action(async (n) => {
827
+ (await L()).setMaxActiveOrggovProfilesPerOwnerV2(Number(n));
828
+ console.log("ok");
829
+ });
830
+ parent
831
+ .command("orggov-set-max-pending-v2 <n>")
832
+ .description("Set max pending")
833
+ .action(async (n) => {
834
+ (await L()).setMaxPendingOrggovInvitesPerProfileV2(Number(n));
835
+ console.log("ok");
836
+ });
837
+ parent
838
+ .command("orggov-set-idle-ms-v2 <n>")
839
+ .description("Set idle threshold ms")
840
+ .action(async (n) => {
841
+ (await L()).setOrggovProfileIdleMsV2(Number(n));
842
+ console.log("ok");
843
+ });
844
+ parent
845
+ .command("orggov-set-stuck-ms-v2 <n>")
846
+ .description("Set stuck threshold ms")
847
+ .action(async (n) => {
848
+ (await L()).setOrggovInviteStuckMsV2(Number(n));
849
+ console.log("ok");
850
+ });
851
+ parent
852
+ .command("orggov-register-v2 <id> <owner>")
853
+ .description("Register V2 profile")
854
+ .option("--tier <v>", "tier")
855
+ .action(async (id, owner, o) => {
856
+ const m = await L();
857
+ console.log(
858
+ JSON.stringify(
859
+ m.registerOrggovProfileV2({ id, owner, tier: o.tier }),
860
+ null,
861
+ 2,
862
+ ),
863
+ );
864
+ });
865
+ parent
866
+ .command("orggov-activate-v2 <id>")
867
+ .description("Activate profile")
868
+ .action(async (id) => {
869
+ console.log(
870
+ JSON.stringify((await L()).activateOrggovProfileV2(id), null, 2),
871
+ );
872
+ });
873
+ parent
874
+ .command("orggov-pause-v2 <id>")
875
+ .description("Pause profile")
876
+ .action(async (id) => {
877
+ console.log(
878
+ JSON.stringify((await L()).pauseOrggovProfileV2(id), null, 2),
879
+ );
880
+ });
881
+ parent
882
+ .command("orggov-archive-v2 <id>")
883
+ .description("Archive profile")
884
+ .action(async (id) => {
885
+ console.log(
886
+ JSON.stringify((await L()).archiveOrggovProfileV2(id), null, 2),
887
+ );
888
+ });
889
+ parent
890
+ .command("orggov-touch-v2 <id>")
891
+ .description("Touch profile")
892
+ .action(async (id) => {
893
+ console.log(
894
+ JSON.stringify((await L()).touchOrggovProfileV2(id), null, 2),
895
+ );
896
+ });
897
+ parent
898
+ .command("orggov-get-v2 <id>")
899
+ .description("Get profile")
900
+ .action(async (id) => {
901
+ console.log(JSON.stringify((await L()).getOrggovProfileV2(id), null, 2));
902
+ });
903
+ parent
904
+ .command("orggov-list-v2")
905
+ .description("List profiles")
906
+ .action(async () => {
907
+ console.log(JSON.stringify((await L()).listOrggovProfilesV2(), null, 2));
908
+ });
909
+ parent
910
+ .command("orggov-create-invite-v2 <id> <profileId>")
911
+ .description("Create invite")
912
+ .option("--email <v>", "email")
913
+ .action(async (id, profileId, o) => {
914
+ const m = await L();
915
+ console.log(
916
+ JSON.stringify(
917
+ m.createOrggovInviteV2({ id, profileId, email: o.email }),
918
+ null,
919
+ 2,
920
+ ),
921
+ );
922
+ });
923
+ parent
924
+ .command("orggov-inviting-invite-v2 <id>")
925
+ .description("Mark invite as inviting")
926
+ .action(async (id) => {
927
+ console.log(
928
+ JSON.stringify((await L()).invitingOrggovInviteV2(id), null, 2),
929
+ );
930
+ });
931
+ parent
932
+ .command("orggov-complete-invite-v2 <id>")
933
+ .description("Complete invite")
934
+ .action(async (id) => {
935
+ console.log(
936
+ JSON.stringify((await L()).completeInviteOrggovV2(id), null, 2),
937
+ );
938
+ });
939
+ parent
940
+ .command("orggov-fail-invite-v2 <id> [reason]")
941
+ .description("Fail invite")
942
+ .action(async (id, reason) => {
943
+ console.log(
944
+ JSON.stringify((await L()).failOrggovInviteV2(id, reason), null, 2),
945
+ );
946
+ });
947
+ parent
948
+ .command("orggov-cancel-invite-v2 <id> [reason]")
949
+ .description("Cancel invite")
950
+ .action(async (id, reason) => {
951
+ console.log(
952
+ JSON.stringify((await L()).cancelOrggovInviteV2(id, reason), null, 2),
953
+ );
954
+ });
955
+ parent
956
+ .command("orggov-get-invite-v2 <id>")
957
+ .description("Get invite")
958
+ .action(async (id) => {
959
+ console.log(JSON.stringify((await L()).getOrggovInviteV2(id), null, 2));
960
+ });
961
+ parent
962
+ .command("orggov-list-invites-v2")
963
+ .description("List invites")
964
+ .action(async () => {
965
+ console.log(JSON.stringify((await L()).listOrggovInvitesV2(), null, 2));
966
+ });
967
+ parent
968
+ .command("orggov-auto-pause-idle-v2")
969
+ .description("Auto-pause idle")
970
+ .action(async () => {
971
+ console.log(
972
+ JSON.stringify((await L()).autoPauseIdleOrggovProfilesV2(), null, 2),
973
+ );
974
+ });
975
+ parent
976
+ .command("orggov-auto-fail-stuck-v2")
977
+ .description("Auto-fail stuck invites")
978
+ .action(async () => {
979
+ console.log(
980
+ JSON.stringify((await L()).autoFailStuckOrggovInvitesV2(), null, 2),
981
+ );
982
+ });
983
+ parent
984
+ .command("orggov-gov-stats-v2")
985
+ .description("V2 gov stats")
986
+ .action(async () => {
987
+ console.log(
988
+ JSON.stringify((await L()).getOrgManagerGovStatsV2(), null, 2),
989
+ );
990
+ });
991
+ }