chainlesschain 0.145.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 (113) hide show
  1. package/package.json +1 -1
  2. package/src/commands/activitypub.js +207 -0
  3. package/src/commands/agent-network.js +217 -0
  4. package/src/commands/automation.js +201 -0
  5. package/src/commands/bi.js +203 -0
  6. package/src/commands/browse.js +213 -0
  7. package/src/commands/codegen.js +207 -0
  8. package/src/commands/collab.js +211 -0
  9. package/src/commands/compliance.js +410 -0
  10. package/src/commands/cowork.js +203 -0
  11. package/src/commands/dbevo.js +227 -0
  12. package/src/commands/dev.js +207 -0
  13. package/src/commands/did-v2.js +217 -0
  14. package/src/commands/did.js +221 -0
  15. package/src/commands/dlp.js +213 -0
  16. package/src/commands/evomap.js +205 -0
  17. package/src/commands/export.js +213 -0
  18. package/src/commands/federation.js +209 -0
  19. package/src/commands/fusion.js +205 -0
  20. package/src/commands/governance.js +209 -0
  21. package/src/commands/hook.js +209 -0
  22. package/src/commands/import.js +209 -0
  23. package/src/commands/infra.js +203 -0
  24. package/src/commands/instinct.js +209 -0
  25. package/src/commands/ipfs.js +207 -0
  26. package/src/commands/llm.js +217 -0
  27. package/src/commands/matrix.js +207 -0
  28. package/src/commands/mcp.js +217 -0
  29. package/src/commands/memory.js +209 -0
  30. package/src/commands/multimodal.js +203 -0
  31. package/src/commands/nlprog.js +225 -0
  32. package/src/commands/nostr.js +209 -0
  33. package/src/commands/note.js +205 -0
  34. package/src/commands/ops.js +219 -0
  35. package/src/commands/org.js +209 -0
  36. package/src/commands/p2p.js +209 -0
  37. package/src/commands/perception.js +209 -0
  38. package/src/commands/permmem.js +203 -0
  39. package/src/commands/plugin-ecosystem.js +209 -0
  40. package/src/commands/pqc.js +213 -0
  41. package/src/commands/quantization.js +207 -0
  42. package/src/commands/rcache.js +205 -0
  43. package/src/commands/recommend.js +233 -0
  44. package/src/commands/runtime.js +205 -0
  45. package/src/commands/scim.js +209 -0
  46. package/src/commands/session.js +209 -0
  47. package/src/commands/skill.js +207 -0
  48. package/src/commands/social.js +201 -0
  49. package/src/commands/sso.js +209 -0
  50. package/src/commands/sync.js +209 -0
  51. package/src/commands/tech.js +209 -0
  52. package/src/commands/tenant.js +217 -0
  53. package/src/commands/tokens.js +209 -0
  54. package/src/commands/trust.js +217 -0
  55. package/src/commands/wallet.js +209 -0
  56. package/src/commands/workflow.js +203 -0
  57. package/src/index.js +140 -0
  58. package/src/lib/activitypub-bridge.js +334 -0
  59. package/src/lib/agent-network.js +341 -0
  60. package/src/lib/aiops.js +346 -0
  61. package/src/lib/automation-engine.js +335 -0
  62. package/src/lib/autonomous-developer.js +332 -0
  63. package/src/lib/bi-engine.js +333 -0
  64. package/src/lib/browser-automation.js +334 -0
  65. package/src/lib/code-agent.js +339 -0
  66. package/src/lib/collaboration-governance.js +334 -0
  67. package/src/lib/community-governance.js +346 -0
  68. package/src/lib/content-recommendation.js +351 -0
  69. package/src/lib/cowork-share.js +338 -0
  70. package/src/lib/dbevo.js +351 -0
  71. package/src/lib/decentral-infra.js +330 -0
  72. package/src/lib/did-manager.js +341 -0
  73. package/src/lib/did-v2-manager.js +341 -0
  74. package/src/lib/dlp-engine.js +339 -0
  75. package/src/lib/evomap-governance.js +334 -0
  76. package/src/lib/federation-hardening.js +340 -0
  77. package/src/lib/hook-manager.js +341 -0
  78. package/src/lib/instinct-manager.js +346 -0
  79. package/src/lib/ipfs-storage.js +334 -0
  80. package/src/lib/knowledge-exporter.js +341 -0
  81. package/src/lib/knowledge-importer.js +341 -0
  82. package/src/lib/llm-providers.js +346 -0
  83. package/src/lib/matrix-bridge.js +339 -0
  84. package/src/lib/mcp-registry.js +346 -0
  85. package/src/lib/memory-manager.js +336 -0
  86. package/src/lib/multimodal.js +330 -0
  87. package/src/lib/nl-programming.js +341 -0
  88. package/src/lib/nostr-bridge.js +336 -0
  89. package/src/lib/note-versioning.js +339 -0
  90. package/src/lib/org-manager.js +336 -0
  91. package/src/lib/p2p-manager.js +341 -0
  92. package/src/lib/perception.js +346 -0
  93. package/src/lib/permanent-memory.js +327 -0
  94. package/src/lib/plugin-ecosystem.js +346 -0
  95. package/src/lib/pqc-manager.js +346 -0
  96. package/src/lib/protocol-fusion.js +338 -0
  97. package/src/lib/quantization.js +337 -0
  98. package/src/lib/response-cache.js +333 -0
  99. package/src/lib/scim-manager.js +346 -0
  100. package/src/lib/session-manager.js +334 -0
  101. package/src/lib/skill-loader.js +334 -0
  102. package/src/lib/social-manager.js +330 -0
  103. package/src/lib/sso-manager.js +340 -0
  104. package/src/lib/sync-manager.js +336 -0
  105. package/src/lib/tech-learning-engine.js +341 -0
  106. package/src/lib/tenant-saas.js +341 -0
  107. package/src/lib/threat-intel.js +330 -0
  108. package/src/lib/token-tracker.js +336 -0
  109. package/src/lib/trust-security.js +343 -0
  110. package/src/lib/ueba.js +340 -0
  111. package/src/lib/universal-runtime.js +330 -0
  112. package/src/lib/wallet-manager.js +336 -0
  113. package/src/lib/workflow-engine.js +330 -0
@@ -1044,3 +1044,212 @@ export function registerSessionCommand(program) {
1044
1044
  console.log(JSON.stringify(flipped, null, 2));
1045
1045
  });
1046
1046
  }
1047
+
1048
+ // === Iter21 V2 governance overlay ===
1049
+ export function registerSesgovV2Commands(program) {
1050
+ const parent = program.commands.find((c) => c.name() === "session");
1051
+ if (!parent) return;
1052
+ const L = async () => await import("../lib/session-manager.js");
1053
+ parent
1054
+ .command("sesgov-enums-v2")
1055
+ .description("Show V2 enums")
1056
+ .action(async () => {
1057
+ const m = await L();
1058
+ console.log(
1059
+ JSON.stringify(
1060
+ {
1061
+ profileMaturity: m.SESGOV_PROFILE_MATURITY_V2,
1062
+ turnLifecycle: m.SESGOV_TURN_LIFECYCLE_V2,
1063
+ },
1064
+ null,
1065
+ 2,
1066
+ ),
1067
+ );
1068
+ });
1069
+ parent
1070
+ .command("sesgov-config-v2")
1071
+ .description("Show V2 config")
1072
+ .action(async () => {
1073
+ const m = await L();
1074
+ console.log(
1075
+ JSON.stringify(
1076
+ {
1077
+ maxActive: m.getMaxActiveSesgovProfilesPerOwnerV2(),
1078
+ maxPending: m.getMaxPendingSesgovTurnsPerProfileV2(),
1079
+ idleMs: m.getSesgovProfileIdleMsV2(),
1080
+ stuckMs: m.getSesgovTurnStuckMsV2(),
1081
+ },
1082
+ null,
1083
+ 2,
1084
+ ),
1085
+ );
1086
+ });
1087
+ parent
1088
+ .command("sesgov-set-max-active-v2 <n>")
1089
+ .description("Set max active")
1090
+ .action(async (n) => {
1091
+ (await L()).setMaxActiveSesgovProfilesPerOwnerV2(Number(n));
1092
+ console.log("ok");
1093
+ });
1094
+ parent
1095
+ .command("sesgov-set-max-pending-v2 <n>")
1096
+ .description("Set max pending")
1097
+ .action(async (n) => {
1098
+ (await L()).setMaxPendingSesgovTurnsPerProfileV2(Number(n));
1099
+ console.log("ok");
1100
+ });
1101
+ parent
1102
+ .command("sesgov-set-idle-ms-v2 <n>")
1103
+ .description("Set idle threshold ms")
1104
+ .action(async (n) => {
1105
+ (await L()).setSesgovProfileIdleMsV2(Number(n));
1106
+ console.log("ok");
1107
+ });
1108
+ parent
1109
+ .command("sesgov-set-stuck-ms-v2 <n>")
1110
+ .description("Set stuck threshold ms")
1111
+ .action(async (n) => {
1112
+ (await L()).setSesgovTurnStuckMsV2(Number(n));
1113
+ console.log("ok");
1114
+ });
1115
+ parent
1116
+ .command("sesgov-register-v2 <id> <owner>")
1117
+ .description("Register V2 profile")
1118
+ .option("--channel <v>", "channel")
1119
+ .action(async (id, owner, o) => {
1120
+ const m = await L();
1121
+ console.log(
1122
+ JSON.stringify(
1123
+ m.registerSesgovProfileV2({ id, owner, channel: o.channel }),
1124
+ null,
1125
+ 2,
1126
+ ),
1127
+ );
1128
+ });
1129
+ parent
1130
+ .command("sesgov-activate-v2 <id>")
1131
+ .description("Activate profile")
1132
+ .action(async (id) => {
1133
+ console.log(
1134
+ JSON.stringify((await L()).activateSesgovProfileV2(id), null, 2),
1135
+ );
1136
+ });
1137
+ parent
1138
+ .command("sesgov-pause-v2 <id>")
1139
+ .description("Pause profile")
1140
+ .action(async (id) => {
1141
+ console.log(
1142
+ JSON.stringify((await L()).pauseSesgovProfileV2(id), null, 2),
1143
+ );
1144
+ });
1145
+ parent
1146
+ .command("sesgov-archive-v2 <id>")
1147
+ .description("Archive profile")
1148
+ .action(async (id) => {
1149
+ console.log(
1150
+ JSON.stringify((await L()).archiveSesgovProfileV2(id), null, 2),
1151
+ );
1152
+ });
1153
+ parent
1154
+ .command("sesgov-touch-v2 <id>")
1155
+ .description("Touch profile")
1156
+ .action(async (id) => {
1157
+ console.log(
1158
+ JSON.stringify((await L()).touchSesgovProfileV2(id), null, 2),
1159
+ );
1160
+ });
1161
+ parent
1162
+ .command("sesgov-get-v2 <id>")
1163
+ .description("Get profile")
1164
+ .action(async (id) => {
1165
+ console.log(JSON.stringify((await L()).getSesgovProfileV2(id), null, 2));
1166
+ });
1167
+ parent
1168
+ .command("sesgov-list-v2")
1169
+ .description("List profiles")
1170
+ .action(async () => {
1171
+ console.log(JSON.stringify((await L()).listSesgovProfilesV2(), null, 2));
1172
+ });
1173
+ parent
1174
+ .command("sesgov-create-turn-v2 <id> <profileId>")
1175
+ .description("Create turn")
1176
+ .option("--topic <v>", "topic")
1177
+ .action(async (id, profileId, o) => {
1178
+ const m = await L();
1179
+ console.log(
1180
+ JSON.stringify(
1181
+ m.createSesgovTurnV2({ id, profileId, topic: o.topic }),
1182
+ null,
1183
+ 2,
1184
+ ),
1185
+ );
1186
+ });
1187
+ parent
1188
+ .command("sesgov-advancing-turn-v2 <id>")
1189
+ .description("Mark turn as advancing")
1190
+ .action(async (id) => {
1191
+ console.log(
1192
+ JSON.stringify((await L()).advancingSesgovTurnV2(id), null, 2),
1193
+ );
1194
+ });
1195
+ parent
1196
+ .command("sesgov-complete-turn-v2 <id>")
1197
+ .description("Complete turn")
1198
+ .action(async (id) => {
1199
+ console.log(
1200
+ JSON.stringify((await L()).completeTurnSesgovV2(id), null, 2),
1201
+ );
1202
+ });
1203
+ parent
1204
+ .command("sesgov-fail-turn-v2 <id> [reason]")
1205
+ .description("Fail turn")
1206
+ .action(async (id, reason) => {
1207
+ console.log(
1208
+ JSON.stringify((await L()).failSesgovTurnV2(id, reason), null, 2),
1209
+ );
1210
+ });
1211
+ parent
1212
+ .command("sesgov-cancel-turn-v2 <id> [reason]")
1213
+ .description("Cancel turn")
1214
+ .action(async (id, reason) => {
1215
+ console.log(
1216
+ JSON.stringify((await L()).cancelSesgovTurnV2(id, reason), null, 2),
1217
+ );
1218
+ });
1219
+ parent
1220
+ .command("sesgov-get-turn-v2 <id>")
1221
+ .description("Get turn")
1222
+ .action(async (id) => {
1223
+ console.log(JSON.stringify((await L()).getSesgovTurnV2(id), null, 2));
1224
+ });
1225
+ parent
1226
+ .command("sesgov-list-turns-v2")
1227
+ .description("List turns")
1228
+ .action(async () => {
1229
+ console.log(JSON.stringify((await L()).listSesgovTurnsV2(), null, 2));
1230
+ });
1231
+ parent
1232
+ .command("sesgov-auto-pause-idle-v2")
1233
+ .description("Auto-pause idle")
1234
+ .action(async () => {
1235
+ console.log(
1236
+ JSON.stringify((await L()).autoPauseIdleSesgovProfilesV2(), null, 2),
1237
+ );
1238
+ });
1239
+ parent
1240
+ .command("sesgov-auto-fail-stuck-v2")
1241
+ .description("Auto-fail stuck turns")
1242
+ .action(async () => {
1243
+ console.log(
1244
+ JSON.stringify((await L()).autoFailStuckSesgovTurnsV2(), null, 2),
1245
+ );
1246
+ });
1247
+ parent
1248
+ .command("sesgov-gov-stats-v2")
1249
+ .description("V2 gov stats")
1250
+ .action(async () => {
1251
+ console.log(
1252
+ JSON.stringify((await L()).getSessionManagerGovStatsV2(), null, 2),
1253
+ );
1254
+ });
1255
+ }
@@ -962,3 +962,210 @@ export function registerSkillCommand(program) {
962
962
  .description("Auto-fail stuck V2 executions")
963
963
  .action(() => out(autoFailStuckExecutionsV2()));
964
964
  }
965
+
966
+ // === Iter24 V2 governance overlay ===
967
+ export function registerSklgovV2Commands(program) {
968
+ const parent = program.commands.find((c) => c.name() === "skill");
969
+ if (!parent) return;
970
+ const L = async () => await import("../lib/skill-loader.js");
971
+ parent
972
+ .command("sklgov-enums-v2")
973
+ .description("Show V2 enums")
974
+ .action(async () => {
975
+ const m = await L();
976
+ console.log(
977
+ JSON.stringify(
978
+ {
979
+ profileMaturity: m.SKLGOV_PROFILE_MATURITY_V2,
980
+ loadLifecycle: m.SKLGOV_LOAD_LIFECYCLE_V2,
981
+ },
982
+ null,
983
+ 2,
984
+ ),
985
+ );
986
+ });
987
+ parent
988
+ .command("sklgov-config-v2")
989
+ .description("Show V2 config")
990
+ .action(async () => {
991
+ const m = await L();
992
+ console.log(
993
+ JSON.stringify(
994
+ {
995
+ maxActive: m.getMaxActiveSklgovProfilesPerOwnerV2(),
996
+ maxPending: m.getMaxPendingSklgovLoadsPerProfileV2(),
997
+ idleMs: m.getSklgovProfileIdleMsV2(),
998
+ stuckMs: m.getSklgovLoadStuckMsV2(),
999
+ },
1000
+ null,
1001
+ 2,
1002
+ ),
1003
+ );
1004
+ });
1005
+ parent
1006
+ .command("sklgov-set-max-active-v2 <n>")
1007
+ .description("Set max active")
1008
+ .action(async (n) => {
1009
+ (await L()).setMaxActiveSklgovProfilesPerOwnerV2(Number(n));
1010
+ console.log("ok");
1011
+ });
1012
+ parent
1013
+ .command("sklgov-set-max-pending-v2 <n>")
1014
+ .description("Set max pending")
1015
+ .action(async (n) => {
1016
+ (await L()).setMaxPendingSklgovLoadsPerProfileV2(Number(n));
1017
+ console.log("ok");
1018
+ });
1019
+ parent
1020
+ .command("sklgov-set-idle-ms-v2 <n>")
1021
+ .description("Set idle threshold ms")
1022
+ .action(async (n) => {
1023
+ (await L()).setSklgovProfileIdleMsV2(Number(n));
1024
+ console.log("ok");
1025
+ });
1026
+ parent
1027
+ .command("sklgov-set-stuck-ms-v2 <n>")
1028
+ .description("Set stuck threshold ms")
1029
+ .action(async (n) => {
1030
+ (await L()).setSklgovLoadStuckMsV2(Number(n));
1031
+ console.log("ok");
1032
+ });
1033
+ parent
1034
+ .command("sklgov-register-v2 <id> <owner>")
1035
+ .description("Register V2 profile")
1036
+ .option("--source <v>", "source")
1037
+ .action(async (id, owner, o) => {
1038
+ const m = await L();
1039
+ console.log(
1040
+ JSON.stringify(
1041
+ m.registerSklgovProfileV2({ id, owner, source: o.source }),
1042
+ null,
1043
+ 2,
1044
+ ),
1045
+ );
1046
+ });
1047
+ parent
1048
+ .command("sklgov-activate-v2 <id>")
1049
+ .description("Activate profile")
1050
+ .action(async (id) => {
1051
+ console.log(
1052
+ JSON.stringify((await L()).activateSklgovProfileV2(id), null, 2),
1053
+ );
1054
+ });
1055
+ parent
1056
+ .command("sklgov-stale-v2 <id>")
1057
+ .description("Stale profile")
1058
+ .action(async (id) => {
1059
+ console.log(
1060
+ JSON.stringify((await L()).staleSklgovProfileV2(id), null, 2),
1061
+ );
1062
+ });
1063
+ parent
1064
+ .command("sklgov-archive-v2 <id>")
1065
+ .description("Archive profile")
1066
+ .action(async (id) => {
1067
+ console.log(
1068
+ JSON.stringify((await L()).archiveSklgovProfileV2(id), null, 2),
1069
+ );
1070
+ });
1071
+ parent
1072
+ .command("sklgov-touch-v2 <id>")
1073
+ .description("Touch profile")
1074
+ .action(async (id) => {
1075
+ console.log(
1076
+ JSON.stringify((await L()).touchSklgovProfileV2(id), null, 2),
1077
+ );
1078
+ });
1079
+ parent
1080
+ .command("sklgov-get-v2 <id>")
1081
+ .description("Get profile")
1082
+ .action(async (id) => {
1083
+ console.log(JSON.stringify((await L()).getSklgovProfileV2(id), null, 2));
1084
+ });
1085
+ parent
1086
+ .command("sklgov-list-v2")
1087
+ .description("List profiles")
1088
+ .action(async () => {
1089
+ console.log(JSON.stringify((await L()).listSklgovProfilesV2(), null, 2));
1090
+ });
1091
+ parent
1092
+ .command("sklgov-create-load-v2 <id> <profileId>")
1093
+ .description("Create load")
1094
+ .option("--skillId <v>", "skillId")
1095
+ .action(async (id, profileId, o) => {
1096
+ const m = await L();
1097
+ console.log(
1098
+ JSON.stringify(
1099
+ m.createSklgovLoadV2({ id, profileId, skillId: o.skillId }),
1100
+ null,
1101
+ 2,
1102
+ ),
1103
+ );
1104
+ });
1105
+ parent
1106
+ .command("sklgov-loading-load-v2 <id>")
1107
+ .description("Mark load as loading")
1108
+ .action(async (id) => {
1109
+ console.log(JSON.stringify((await L()).loadingSklgovLoadV2(id), null, 2));
1110
+ });
1111
+ parent
1112
+ .command("sklgov-complete-load-v2 <id>")
1113
+ .description("Complete load")
1114
+ .action(async (id) => {
1115
+ console.log(
1116
+ JSON.stringify((await L()).completeLoadSklgovV2(id), null, 2),
1117
+ );
1118
+ });
1119
+ parent
1120
+ .command("sklgov-fail-load-v2 <id> [reason]")
1121
+ .description("Fail load")
1122
+ .action(async (id, reason) => {
1123
+ console.log(
1124
+ JSON.stringify((await L()).failSklgovLoadV2(id, reason), null, 2),
1125
+ );
1126
+ });
1127
+ parent
1128
+ .command("sklgov-cancel-load-v2 <id> [reason]")
1129
+ .description("Cancel load")
1130
+ .action(async (id, reason) => {
1131
+ console.log(
1132
+ JSON.stringify((await L()).cancelSklgovLoadV2(id, reason), null, 2),
1133
+ );
1134
+ });
1135
+ parent
1136
+ .command("sklgov-get-load-v2 <id>")
1137
+ .description("Get load")
1138
+ .action(async (id) => {
1139
+ console.log(JSON.stringify((await L()).getSklgovLoadV2(id), null, 2));
1140
+ });
1141
+ parent
1142
+ .command("sklgov-list-loads-v2")
1143
+ .description("List loads")
1144
+ .action(async () => {
1145
+ console.log(JSON.stringify((await L()).listSklgovLoadsV2(), null, 2));
1146
+ });
1147
+ parent
1148
+ .command("sklgov-auto-stale-idle-v2")
1149
+ .description("Auto-stale idle")
1150
+ .action(async () => {
1151
+ console.log(
1152
+ JSON.stringify((await L()).autoStaleIdleSklgovProfilesV2(), null, 2),
1153
+ );
1154
+ });
1155
+ parent
1156
+ .command("sklgov-auto-fail-stuck-v2")
1157
+ .description("Auto-fail stuck loads")
1158
+ .action(async () => {
1159
+ console.log(
1160
+ JSON.stringify((await L()).autoFailStuckSklgovLoadsV2(), null, 2),
1161
+ );
1162
+ });
1163
+ parent
1164
+ .command("sklgov-gov-stats-v2")
1165
+ .description("V2 gov stats")
1166
+ .action(async () => {
1167
+ console.log(
1168
+ JSON.stringify((await L()).getSkillLoaderGovStatsV2(), null, 2),
1169
+ );
1170
+ });
1171
+ }
@@ -1469,3 +1469,204 @@ export function registerSocialCommand(program) {
1469
1469
  console.log(JSON.stringify({ ok: true }, null, 2));
1470
1470
  });
1471
1471
  }
1472
+
1473
+ // === Iter22 V2 governance overlay ===
1474
+ export function registerSmgovV2Commands(program) {
1475
+ const parent = program.commands.find((c) => c.name() === "social");
1476
+ if (!parent) return;
1477
+ const L = async () => await import("../lib/social-manager.js");
1478
+ parent
1479
+ .command("smgov-enums-v2")
1480
+ .description("Show V2 enums")
1481
+ .action(async () => {
1482
+ const m = await L();
1483
+ console.log(
1484
+ JSON.stringify(
1485
+ {
1486
+ profileMaturity: m.SMGOV_PROFILE_MATURITY_V2,
1487
+ postLifecycle: m.SMGOV_POST_LIFECYCLE_V2,
1488
+ },
1489
+ null,
1490
+ 2,
1491
+ ),
1492
+ );
1493
+ });
1494
+ parent
1495
+ .command("smgov-config-v2")
1496
+ .description("Show V2 config")
1497
+ .action(async () => {
1498
+ const m = await L();
1499
+ console.log(
1500
+ JSON.stringify(
1501
+ {
1502
+ maxActive: m.getMaxActiveSmgovProfilesPerOwnerV2(),
1503
+ maxPending: m.getMaxPendingSmgovPostsPerProfileV2(),
1504
+ idleMs: m.getSmgovProfileIdleMsV2(),
1505
+ stuckMs: m.getSmgovPostStuckMsV2(),
1506
+ },
1507
+ null,
1508
+ 2,
1509
+ ),
1510
+ );
1511
+ });
1512
+ parent
1513
+ .command("smgov-set-max-active-v2 <n>")
1514
+ .description("Set max active")
1515
+ .action(async (n) => {
1516
+ (await L()).setMaxActiveSmgovProfilesPerOwnerV2(Number(n));
1517
+ console.log("ok");
1518
+ });
1519
+ parent
1520
+ .command("smgov-set-max-pending-v2 <n>")
1521
+ .description("Set max pending")
1522
+ .action(async (n) => {
1523
+ (await L()).setMaxPendingSmgovPostsPerProfileV2(Number(n));
1524
+ console.log("ok");
1525
+ });
1526
+ parent
1527
+ .command("smgov-set-idle-ms-v2 <n>")
1528
+ .description("Set idle threshold ms")
1529
+ .action(async (n) => {
1530
+ (await L()).setSmgovProfileIdleMsV2(Number(n));
1531
+ console.log("ok");
1532
+ });
1533
+ parent
1534
+ .command("smgov-set-stuck-ms-v2 <n>")
1535
+ .description("Set stuck threshold ms")
1536
+ .action(async (n) => {
1537
+ (await L()).setSmgovPostStuckMsV2(Number(n));
1538
+ console.log("ok");
1539
+ });
1540
+ parent
1541
+ .command("smgov-register-v2 <id> <owner>")
1542
+ .description("Register V2 profile")
1543
+ .option("--channel <v>", "channel")
1544
+ .action(async (id, owner, o) => {
1545
+ const m = await L();
1546
+ console.log(
1547
+ JSON.stringify(
1548
+ m.registerSmgovProfileV2({ id, owner, channel: o.channel }),
1549
+ null,
1550
+ 2,
1551
+ ),
1552
+ );
1553
+ });
1554
+ parent
1555
+ .command("smgov-activate-v2 <id>")
1556
+ .description("Activate profile")
1557
+ .action(async (id) => {
1558
+ console.log(
1559
+ JSON.stringify((await L()).activateSmgovProfileV2(id), null, 2),
1560
+ );
1561
+ });
1562
+ parent
1563
+ .command("smgov-mute-v2 <id>")
1564
+ .description("Mute profile")
1565
+ .action(async (id) => {
1566
+ console.log(JSON.stringify((await L()).muteSmgovProfileV2(id), null, 2));
1567
+ });
1568
+ parent
1569
+ .command("smgov-archive-v2 <id>")
1570
+ .description("Archive profile")
1571
+ .action(async (id) => {
1572
+ console.log(
1573
+ JSON.stringify((await L()).archiveSmgovProfileV2(id), null, 2),
1574
+ );
1575
+ });
1576
+ parent
1577
+ .command("smgov-touch-v2 <id>")
1578
+ .description("Touch profile")
1579
+ .action(async (id) => {
1580
+ console.log(JSON.stringify((await L()).touchSmgovProfileV2(id), null, 2));
1581
+ });
1582
+ parent
1583
+ .command("smgov-get-v2 <id>")
1584
+ .description("Get profile")
1585
+ .action(async (id) => {
1586
+ console.log(JSON.stringify((await L()).getSmgovProfileV2(id), null, 2));
1587
+ });
1588
+ parent
1589
+ .command("smgov-list-v2")
1590
+ .description("List profiles")
1591
+ .action(async () => {
1592
+ console.log(JSON.stringify((await L()).listSmgovProfilesV2(), null, 2));
1593
+ });
1594
+ parent
1595
+ .command("smgov-create-post-v2 <id> <profileId>")
1596
+ .description("Create post")
1597
+ .option("--author <v>", "author")
1598
+ .action(async (id, profileId, o) => {
1599
+ const m = await L();
1600
+ console.log(
1601
+ JSON.stringify(
1602
+ m.createSmgovPostV2({ id, profileId, author: o.author }),
1603
+ null,
1604
+ 2,
1605
+ ),
1606
+ );
1607
+ });
1608
+ parent
1609
+ .command("smgov-posting-post-v2 <id>")
1610
+ .description("Mark post as posting")
1611
+ .action(async (id) => {
1612
+ console.log(JSON.stringify((await L()).postingSmgovPostV2(id), null, 2));
1613
+ });
1614
+ parent
1615
+ .command("smgov-complete-post-v2 <id>")
1616
+ .description("Complete post")
1617
+ .action(async (id) => {
1618
+ console.log(JSON.stringify((await L()).completePostSmgovV2(id), null, 2));
1619
+ });
1620
+ parent
1621
+ .command("smgov-fail-post-v2 <id> [reason]")
1622
+ .description("Fail post")
1623
+ .action(async (id, reason) => {
1624
+ console.log(
1625
+ JSON.stringify((await L()).failSmgovPostV2(id, reason), null, 2),
1626
+ );
1627
+ });
1628
+ parent
1629
+ .command("smgov-cancel-post-v2 <id> [reason]")
1630
+ .description("Cancel post")
1631
+ .action(async (id, reason) => {
1632
+ console.log(
1633
+ JSON.stringify((await L()).cancelSmgovPostV2(id, reason), null, 2),
1634
+ );
1635
+ });
1636
+ parent
1637
+ .command("smgov-get-post-v2 <id>")
1638
+ .description("Get post")
1639
+ .action(async (id) => {
1640
+ console.log(JSON.stringify((await L()).getSmgovPostV2(id), null, 2));
1641
+ });
1642
+ parent
1643
+ .command("smgov-list-posts-v2")
1644
+ .description("List posts")
1645
+ .action(async () => {
1646
+ console.log(JSON.stringify((await L()).listSmgovPostsV2(), null, 2));
1647
+ });
1648
+ parent
1649
+ .command("smgov-auto-mute-idle-v2")
1650
+ .description("Auto-mute idle")
1651
+ .action(async () => {
1652
+ console.log(
1653
+ JSON.stringify((await L()).autoMuteIdleSmgovProfilesV2(), null, 2),
1654
+ );
1655
+ });
1656
+ parent
1657
+ .command("smgov-auto-fail-stuck-v2")
1658
+ .description("Auto-fail stuck posts")
1659
+ .action(async () => {
1660
+ console.log(
1661
+ JSON.stringify((await L()).autoFailStuckSmgovPostsV2(), null, 2),
1662
+ );
1663
+ });
1664
+ parent
1665
+ .command("smgov-gov-stats-v2")
1666
+ .description("V2 gov stats")
1667
+ .action(async () => {
1668
+ console.log(
1669
+ JSON.stringify((await L()).getSocialManagerGovStatsV2(), null, 2),
1670
+ );
1671
+ });
1672
+ }