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.
- package/package.json +1 -1
- package/src/commands/activitypub.js +207 -0
- package/src/commands/agent-network.js +217 -0
- package/src/commands/automation.js +201 -0
- package/src/commands/bi.js +203 -0
- package/src/commands/browse.js +213 -0
- package/src/commands/codegen.js +207 -0
- package/src/commands/collab.js +211 -0
- package/src/commands/compliance.js +410 -0
- package/src/commands/cowork.js +203 -0
- package/src/commands/dbevo.js +227 -0
- package/src/commands/dev.js +207 -0
- package/src/commands/did-v2.js +217 -0
- package/src/commands/did.js +221 -0
- package/src/commands/dlp.js +213 -0
- package/src/commands/evomap.js +205 -0
- package/src/commands/export.js +213 -0
- package/src/commands/federation.js +209 -0
- package/src/commands/fusion.js +205 -0
- package/src/commands/governance.js +209 -0
- package/src/commands/hook.js +209 -0
- package/src/commands/import.js +209 -0
- package/src/commands/infra.js +203 -0
- package/src/commands/instinct.js +209 -0
- package/src/commands/ipfs.js +207 -0
- package/src/commands/llm.js +217 -0
- package/src/commands/matrix.js +207 -0
- package/src/commands/mcp.js +217 -0
- package/src/commands/memory.js +209 -0
- package/src/commands/multimodal.js +203 -0
- package/src/commands/nlprog.js +225 -0
- package/src/commands/nostr.js +209 -0
- package/src/commands/note.js +205 -0
- package/src/commands/ops.js +219 -0
- package/src/commands/org.js +209 -0
- package/src/commands/p2p.js +209 -0
- package/src/commands/perception.js +209 -0
- package/src/commands/permmem.js +203 -0
- package/src/commands/plugin-ecosystem.js +209 -0
- package/src/commands/pqc.js +213 -0
- package/src/commands/quantization.js +207 -0
- package/src/commands/rcache.js +205 -0
- package/src/commands/recommend.js +233 -0
- package/src/commands/runtime.js +205 -0
- package/src/commands/scim.js +209 -0
- package/src/commands/session.js +209 -0
- package/src/commands/skill.js +207 -0
- package/src/commands/social.js +201 -0
- package/src/commands/sso.js +209 -0
- package/src/commands/sync.js +209 -0
- package/src/commands/tech.js +209 -0
- package/src/commands/tenant.js +217 -0
- package/src/commands/tokens.js +209 -0
- package/src/commands/trust.js +217 -0
- package/src/commands/wallet.js +209 -0
- package/src/commands/workflow.js +203 -0
- package/src/index.js +140 -0
- package/src/lib/activitypub-bridge.js +334 -0
- package/src/lib/agent-network.js +341 -0
- package/src/lib/aiops.js +346 -0
- package/src/lib/automation-engine.js +335 -0
- package/src/lib/autonomous-developer.js +332 -0
- package/src/lib/bi-engine.js +333 -0
- package/src/lib/browser-automation.js +334 -0
- package/src/lib/code-agent.js +339 -0
- package/src/lib/collaboration-governance.js +334 -0
- package/src/lib/community-governance.js +346 -0
- package/src/lib/content-recommendation.js +351 -0
- package/src/lib/cowork-share.js +338 -0
- package/src/lib/dbevo.js +351 -0
- package/src/lib/decentral-infra.js +330 -0
- package/src/lib/did-manager.js +341 -0
- package/src/lib/did-v2-manager.js +341 -0
- package/src/lib/dlp-engine.js +339 -0
- package/src/lib/evomap-governance.js +334 -0
- package/src/lib/federation-hardening.js +340 -0
- package/src/lib/hook-manager.js +341 -0
- package/src/lib/instinct-manager.js +346 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/knowledge-exporter.js +341 -0
- package/src/lib/knowledge-importer.js +341 -0
- package/src/lib/llm-providers.js +346 -0
- package/src/lib/matrix-bridge.js +339 -0
- package/src/lib/mcp-registry.js +346 -0
- package/src/lib/memory-manager.js +336 -0
- package/src/lib/multimodal.js +330 -0
- package/src/lib/nl-programming.js +341 -0
- package/src/lib/nostr-bridge.js +336 -0
- package/src/lib/note-versioning.js +339 -0
- package/src/lib/org-manager.js +336 -0
- package/src/lib/p2p-manager.js +341 -0
- package/src/lib/perception.js +346 -0
- package/src/lib/permanent-memory.js +327 -0
- package/src/lib/plugin-ecosystem.js +346 -0
- package/src/lib/pqc-manager.js +346 -0
- package/src/lib/protocol-fusion.js +338 -0
- package/src/lib/quantization.js +337 -0
- package/src/lib/response-cache.js +333 -0
- package/src/lib/scim-manager.js +346 -0
- package/src/lib/session-manager.js +334 -0
- package/src/lib/skill-loader.js +334 -0
- package/src/lib/social-manager.js +330 -0
- package/src/lib/sso-manager.js +340 -0
- package/src/lib/sync-manager.js +336 -0
- package/src/lib/tech-learning-engine.js +341 -0
- package/src/lib/tenant-saas.js +341 -0
- package/src/lib/threat-intel.js +330 -0
- package/src/lib/token-tracker.js +336 -0
- package/src/lib/trust-security.js +343 -0
- package/src/lib/ueba.js +340 -0
- package/src/lib/universal-runtime.js +330 -0
- package/src/lib/wallet-manager.js +336 -0
- package/src/lib/workflow-engine.js +330 -0
package/src/commands/mcp.js
CHANGED
|
@@ -1026,3 +1026,220 @@ export function registerMcpCommand(program) {
|
|
|
1026
1026
|
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
|
+
|
|
1030
|
+
// === Iter24 V2 governance overlay ===
|
|
1031
|
+
export function registerMcpgovV2Commands(program) {
|
|
1032
|
+
const parent = program.commands.find((c) => c.name() === "mcp");
|
|
1033
|
+
if (!parent) return;
|
|
1034
|
+
const L = async () => await import("../lib/mcp-registry.js");
|
|
1035
|
+
parent
|
|
1036
|
+
.command("mcpgov-enums-v2")
|
|
1037
|
+
.description("Show V2 enums")
|
|
1038
|
+
.action(async () => {
|
|
1039
|
+
const m = await L();
|
|
1040
|
+
console.log(
|
|
1041
|
+
JSON.stringify(
|
|
1042
|
+
{
|
|
1043
|
+
profileMaturity: m.MCPGOV_PROFILE_MATURITY_V2,
|
|
1044
|
+
invocationLifecycle: m.MCPGOV_INVOCATION_LIFECYCLE_V2,
|
|
1045
|
+
},
|
|
1046
|
+
null,
|
|
1047
|
+
2,
|
|
1048
|
+
),
|
|
1049
|
+
);
|
|
1050
|
+
});
|
|
1051
|
+
parent
|
|
1052
|
+
.command("mcpgov-config-v2")
|
|
1053
|
+
.description("Show V2 config")
|
|
1054
|
+
.action(async () => {
|
|
1055
|
+
const m = await L();
|
|
1056
|
+
console.log(
|
|
1057
|
+
JSON.stringify(
|
|
1058
|
+
{
|
|
1059
|
+
maxActive: m.getMaxActiveMcpgovProfilesPerOwnerV2(),
|
|
1060
|
+
maxPending: m.getMaxPendingMcpgovInvocationsPerProfileV2(),
|
|
1061
|
+
idleMs: m.getMcpgovProfileIdleMsV2(),
|
|
1062
|
+
stuckMs: m.getMcpgovInvocationStuckMsV2(),
|
|
1063
|
+
},
|
|
1064
|
+
null,
|
|
1065
|
+
2,
|
|
1066
|
+
),
|
|
1067
|
+
);
|
|
1068
|
+
});
|
|
1069
|
+
parent
|
|
1070
|
+
.command("mcpgov-set-max-active-v2 <n>")
|
|
1071
|
+
.description("Set max active")
|
|
1072
|
+
.action(async (n) => {
|
|
1073
|
+
(await L()).setMaxActiveMcpgovProfilesPerOwnerV2(Number(n));
|
|
1074
|
+
console.log("ok");
|
|
1075
|
+
});
|
|
1076
|
+
parent
|
|
1077
|
+
.command("mcpgov-set-max-pending-v2 <n>")
|
|
1078
|
+
.description("Set max pending")
|
|
1079
|
+
.action(async (n) => {
|
|
1080
|
+
(await L()).setMaxPendingMcpgovInvocationsPerProfileV2(Number(n));
|
|
1081
|
+
console.log("ok");
|
|
1082
|
+
});
|
|
1083
|
+
parent
|
|
1084
|
+
.command("mcpgov-set-idle-ms-v2 <n>")
|
|
1085
|
+
.description("Set idle threshold ms")
|
|
1086
|
+
.action(async (n) => {
|
|
1087
|
+
(await L()).setMcpgovProfileIdleMsV2(Number(n));
|
|
1088
|
+
console.log("ok");
|
|
1089
|
+
});
|
|
1090
|
+
parent
|
|
1091
|
+
.command("mcpgov-set-stuck-ms-v2 <n>")
|
|
1092
|
+
.description("Set stuck threshold ms")
|
|
1093
|
+
.action(async (n) => {
|
|
1094
|
+
(await L()).setMcpgovInvocationStuckMsV2(Number(n));
|
|
1095
|
+
console.log("ok");
|
|
1096
|
+
});
|
|
1097
|
+
parent
|
|
1098
|
+
.command("mcpgov-register-v2 <id> <owner>")
|
|
1099
|
+
.description("Register V2 profile")
|
|
1100
|
+
.option("--transport <v>", "transport")
|
|
1101
|
+
.action(async (id, owner, o) => {
|
|
1102
|
+
const m = await L();
|
|
1103
|
+
console.log(
|
|
1104
|
+
JSON.stringify(
|
|
1105
|
+
m.registerMcpgovProfileV2({ id, owner, transport: o.transport }),
|
|
1106
|
+
null,
|
|
1107
|
+
2,
|
|
1108
|
+
),
|
|
1109
|
+
);
|
|
1110
|
+
});
|
|
1111
|
+
parent
|
|
1112
|
+
.command("mcpgov-activate-v2 <id>")
|
|
1113
|
+
.description("Activate profile")
|
|
1114
|
+
.action(async (id) => {
|
|
1115
|
+
console.log(
|
|
1116
|
+
JSON.stringify((await L()).activateMcpgovProfileV2(id), null, 2),
|
|
1117
|
+
);
|
|
1118
|
+
});
|
|
1119
|
+
parent
|
|
1120
|
+
.command("mcpgov-suspend-v2 <id>")
|
|
1121
|
+
.description("Suspend profile")
|
|
1122
|
+
.action(async (id) => {
|
|
1123
|
+
console.log(
|
|
1124
|
+
JSON.stringify((await L()).suspendMcpgovProfileV2(id), null, 2),
|
|
1125
|
+
);
|
|
1126
|
+
});
|
|
1127
|
+
parent
|
|
1128
|
+
.command("mcpgov-archive-v2 <id>")
|
|
1129
|
+
.description("Archive profile")
|
|
1130
|
+
.action(async (id) => {
|
|
1131
|
+
console.log(
|
|
1132
|
+
JSON.stringify((await L()).archiveMcpgovProfileV2(id), null, 2),
|
|
1133
|
+
);
|
|
1134
|
+
});
|
|
1135
|
+
parent
|
|
1136
|
+
.command("mcpgov-touch-v2 <id>")
|
|
1137
|
+
.description("Touch profile")
|
|
1138
|
+
.action(async (id) => {
|
|
1139
|
+
console.log(
|
|
1140
|
+
JSON.stringify((await L()).touchMcpgovProfileV2(id), null, 2),
|
|
1141
|
+
);
|
|
1142
|
+
});
|
|
1143
|
+
parent
|
|
1144
|
+
.command("mcpgov-get-v2 <id>")
|
|
1145
|
+
.description("Get profile")
|
|
1146
|
+
.action(async (id) => {
|
|
1147
|
+
console.log(JSON.stringify((await L()).getMcpgovProfileV2(id), null, 2));
|
|
1148
|
+
});
|
|
1149
|
+
parent
|
|
1150
|
+
.command("mcpgov-list-v2")
|
|
1151
|
+
.description("List profiles")
|
|
1152
|
+
.action(async () => {
|
|
1153
|
+
console.log(JSON.stringify((await L()).listMcpgovProfilesV2(), null, 2));
|
|
1154
|
+
});
|
|
1155
|
+
parent
|
|
1156
|
+
.command("mcpgov-create-invocation-v2 <id> <profileId>")
|
|
1157
|
+
.description("Create invocation")
|
|
1158
|
+
.option("--tool <v>", "tool")
|
|
1159
|
+
.action(async (id, profileId, o) => {
|
|
1160
|
+
const m = await L();
|
|
1161
|
+
console.log(
|
|
1162
|
+
JSON.stringify(
|
|
1163
|
+
m.createMcpgovInvocationV2({ id, profileId, tool: o.tool }),
|
|
1164
|
+
null,
|
|
1165
|
+
2,
|
|
1166
|
+
),
|
|
1167
|
+
);
|
|
1168
|
+
});
|
|
1169
|
+
parent
|
|
1170
|
+
.command("mcpgov-invoking-invocation-v2 <id>")
|
|
1171
|
+
.description("Mark invocation as invoking")
|
|
1172
|
+
.action(async (id) => {
|
|
1173
|
+
console.log(
|
|
1174
|
+
JSON.stringify((await L()).invokingMcpgovInvocationV2(id), null, 2),
|
|
1175
|
+
);
|
|
1176
|
+
});
|
|
1177
|
+
parent
|
|
1178
|
+
.command("mcpgov-complete-invocation-v2 <id>")
|
|
1179
|
+
.description("Complete invocation")
|
|
1180
|
+
.action(async (id) => {
|
|
1181
|
+
console.log(
|
|
1182
|
+
JSON.stringify((await L()).completeInvocationMcpgovV2(id), null, 2),
|
|
1183
|
+
);
|
|
1184
|
+
});
|
|
1185
|
+
parent
|
|
1186
|
+
.command("mcpgov-fail-invocation-v2 <id> [reason]")
|
|
1187
|
+
.description("Fail invocation")
|
|
1188
|
+
.action(async (id, reason) => {
|
|
1189
|
+
console.log(
|
|
1190
|
+
JSON.stringify((await L()).failMcpgovInvocationV2(id, reason), null, 2),
|
|
1191
|
+
);
|
|
1192
|
+
});
|
|
1193
|
+
parent
|
|
1194
|
+
.command("mcpgov-cancel-invocation-v2 <id> [reason]")
|
|
1195
|
+
.description("Cancel invocation")
|
|
1196
|
+
.action(async (id, reason) => {
|
|
1197
|
+
console.log(
|
|
1198
|
+
JSON.stringify(
|
|
1199
|
+
(await L()).cancelMcpgovInvocationV2(id, reason),
|
|
1200
|
+
null,
|
|
1201
|
+
2,
|
|
1202
|
+
),
|
|
1203
|
+
);
|
|
1204
|
+
});
|
|
1205
|
+
parent
|
|
1206
|
+
.command("mcpgov-get-invocation-v2 <id>")
|
|
1207
|
+
.description("Get invocation")
|
|
1208
|
+
.action(async (id) => {
|
|
1209
|
+
console.log(
|
|
1210
|
+
JSON.stringify((await L()).getMcpgovInvocationV2(id), null, 2),
|
|
1211
|
+
);
|
|
1212
|
+
});
|
|
1213
|
+
parent
|
|
1214
|
+
.command("mcpgov-list-invocations-v2")
|
|
1215
|
+
.description("List invocations")
|
|
1216
|
+
.action(async () => {
|
|
1217
|
+
console.log(
|
|
1218
|
+
JSON.stringify((await L()).listMcpgovInvocationsV2(), null, 2),
|
|
1219
|
+
);
|
|
1220
|
+
});
|
|
1221
|
+
parent
|
|
1222
|
+
.command("mcpgov-auto-suspend-idle-v2")
|
|
1223
|
+
.description("Auto-suspend idle")
|
|
1224
|
+
.action(async () => {
|
|
1225
|
+
console.log(
|
|
1226
|
+
JSON.stringify((await L()).autoSuspendIdleMcpgovProfilesV2(), null, 2),
|
|
1227
|
+
);
|
|
1228
|
+
});
|
|
1229
|
+
parent
|
|
1230
|
+
.command("mcpgov-auto-fail-stuck-v2")
|
|
1231
|
+
.description("Auto-fail stuck invocations")
|
|
1232
|
+
.action(async () => {
|
|
1233
|
+
console.log(
|
|
1234
|
+
JSON.stringify((await L()).autoFailStuckMcpgovInvocationsV2(), null, 2),
|
|
1235
|
+
);
|
|
1236
|
+
});
|
|
1237
|
+
parent
|
|
1238
|
+
.command("mcpgov-gov-stats-v2")
|
|
1239
|
+
.description("V2 gov stats")
|
|
1240
|
+
.action(async () => {
|
|
1241
|
+
console.log(
|
|
1242
|
+
JSON.stringify((await L()).getMcpRegistryGovStatsV2(), null, 2),
|
|
1243
|
+
);
|
|
1244
|
+
});
|
|
1245
|
+
}
|
package/src/commands/memory.js
CHANGED
|
@@ -703,3 +703,212 @@ export function registerMemoryCommand(program) {
|
|
|
703
703
|
.description("Flip stuck running jobs → failed")
|
|
704
704
|
.action(() => console.log(JSON.stringify(autoFailStuckJobsV2(), null, 2)));
|
|
705
705
|
}
|
|
706
|
+
|
|
707
|
+
// === Iter21 V2 governance overlay ===
|
|
708
|
+
export function registerMemgovV2Commands(program) {
|
|
709
|
+
const parent = program.commands.find((c) => c.name() === "memory");
|
|
710
|
+
if (!parent) return;
|
|
711
|
+
const L = async () => await import("../lib/memory-manager.js");
|
|
712
|
+
parent
|
|
713
|
+
.command("memgov-enums-v2")
|
|
714
|
+
.description("Show V2 enums")
|
|
715
|
+
.action(async () => {
|
|
716
|
+
const m = await L();
|
|
717
|
+
console.log(
|
|
718
|
+
JSON.stringify(
|
|
719
|
+
{
|
|
720
|
+
profileMaturity: m.MEMGOV_PROFILE_MATURITY_V2,
|
|
721
|
+
recallLifecycle: m.MEMGOV_RECALL_LIFECYCLE_V2,
|
|
722
|
+
},
|
|
723
|
+
null,
|
|
724
|
+
2,
|
|
725
|
+
),
|
|
726
|
+
);
|
|
727
|
+
});
|
|
728
|
+
parent
|
|
729
|
+
.command("memgov-config-v2")
|
|
730
|
+
.description("Show V2 config")
|
|
731
|
+
.action(async () => {
|
|
732
|
+
const m = await L();
|
|
733
|
+
console.log(
|
|
734
|
+
JSON.stringify(
|
|
735
|
+
{
|
|
736
|
+
maxActive: m.getMaxActiveMemgovProfilesPerOwnerV2(),
|
|
737
|
+
maxPending: m.getMaxPendingMemgovRecallsPerProfileV2(),
|
|
738
|
+
idleMs: m.getMemgovProfileIdleMsV2(),
|
|
739
|
+
stuckMs: m.getMemgovRecallStuckMsV2(),
|
|
740
|
+
},
|
|
741
|
+
null,
|
|
742
|
+
2,
|
|
743
|
+
),
|
|
744
|
+
);
|
|
745
|
+
});
|
|
746
|
+
parent
|
|
747
|
+
.command("memgov-set-max-active-v2 <n>")
|
|
748
|
+
.description("Set max active")
|
|
749
|
+
.action(async (n) => {
|
|
750
|
+
(await L()).setMaxActiveMemgovProfilesPerOwnerV2(Number(n));
|
|
751
|
+
console.log("ok");
|
|
752
|
+
});
|
|
753
|
+
parent
|
|
754
|
+
.command("memgov-set-max-pending-v2 <n>")
|
|
755
|
+
.description("Set max pending")
|
|
756
|
+
.action(async (n) => {
|
|
757
|
+
(await L()).setMaxPendingMemgovRecallsPerProfileV2(Number(n));
|
|
758
|
+
console.log("ok");
|
|
759
|
+
});
|
|
760
|
+
parent
|
|
761
|
+
.command("memgov-set-idle-ms-v2 <n>")
|
|
762
|
+
.description("Set idle threshold ms")
|
|
763
|
+
.action(async (n) => {
|
|
764
|
+
(await L()).setMemgovProfileIdleMsV2(Number(n));
|
|
765
|
+
console.log("ok");
|
|
766
|
+
});
|
|
767
|
+
parent
|
|
768
|
+
.command("memgov-set-stuck-ms-v2 <n>")
|
|
769
|
+
.description("Set stuck threshold ms")
|
|
770
|
+
.action(async (n) => {
|
|
771
|
+
(await L()).setMemgovRecallStuckMsV2(Number(n));
|
|
772
|
+
console.log("ok");
|
|
773
|
+
});
|
|
774
|
+
parent
|
|
775
|
+
.command("memgov-register-v2 <id> <owner>")
|
|
776
|
+
.description("Register V2 profile")
|
|
777
|
+
.option("--scope <v>", "scope")
|
|
778
|
+
.action(async (id, owner, o) => {
|
|
779
|
+
const m = await L();
|
|
780
|
+
console.log(
|
|
781
|
+
JSON.stringify(
|
|
782
|
+
m.registerMemgovProfileV2({ id, owner, scope: o.scope }),
|
|
783
|
+
null,
|
|
784
|
+
2,
|
|
785
|
+
),
|
|
786
|
+
);
|
|
787
|
+
});
|
|
788
|
+
parent
|
|
789
|
+
.command("memgov-activate-v2 <id>")
|
|
790
|
+
.description("Activate profile")
|
|
791
|
+
.action(async (id) => {
|
|
792
|
+
console.log(
|
|
793
|
+
JSON.stringify((await L()).activateMemgovProfileV2(id), null, 2),
|
|
794
|
+
);
|
|
795
|
+
});
|
|
796
|
+
parent
|
|
797
|
+
.command("memgov-stale-v2 <id>")
|
|
798
|
+
.description("Stale profile")
|
|
799
|
+
.action(async (id) => {
|
|
800
|
+
console.log(
|
|
801
|
+
JSON.stringify((await L()).staleMemgovProfileV2(id), null, 2),
|
|
802
|
+
);
|
|
803
|
+
});
|
|
804
|
+
parent
|
|
805
|
+
.command("memgov-archive-v2 <id>")
|
|
806
|
+
.description("Archive profile")
|
|
807
|
+
.action(async (id) => {
|
|
808
|
+
console.log(
|
|
809
|
+
JSON.stringify((await L()).archiveMemgovProfileV2(id), null, 2),
|
|
810
|
+
);
|
|
811
|
+
});
|
|
812
|
+
parent
|
|
813
|
+
.command("memgov-touch-v2 <id>")
|
|
814
|
+
.description("Touch profile")
|
|
815
|
+
.action(async (id) => {
|
|
816
|
+
console.log(
|
|
817
|
+
JSON.stringify((await L()).touchMemgovProfileV2(id), null, 2),
|
|
818
|
+
);
|
|
819
|
+
});
|
|
820
|
+
parent
|
|
821
|
+
.command("memgov-get-v2 <id>")
|
|
822
|
+
.description("Get profile")
|
|
823
|
+
.action(async (id) => {
|
|
824
|
+
console.log(JSON.stringify((await L()).getMemgovProfileV2(id), null, 2));
|
|
825
|
+
});
|
|
826
|
+
parent
|
|
827
|
+
.command("memgov-list-v2")
|
|
828
|
+
.description("List profiles")
|
|
829
|
+
.action(async () => {
|
|
830
|
+
console.log(JSON.stringify((await L()).listMemgovProfilesV2(), null, 2));
|
|
831
|
+
});
|
|
832
|
+
parent
|
|
833
|
+
.command("memgov-create-recall-v2 <id> <profileId>")
|
|
834
|
+
.description("Create recall")
|
|
835
|
+
.option("--key <v>", "key")
|
|
836
|
+
.action(async (id, profileId, o) => {
|
|
837
|
+
const m = await L();
|
|
838
|
+
console.log(
|
|
839
|
+
JSON.stringify(
|
|
840
|
+
m.createMemgovRecallV2({ id, profileId, key: o.key }),
|
|
841
|
+
null,
|
|
842
|
+
2,
|
|
843
|
+
),
|
|
844
|
+
);
|
|
845
|
+
});
|
|
846
|
+
parent
|
|
847
|
+
.command("memgov-recalling-recall-v2 <id>")
|
|
848
|
+
.description("Mark recall as recalling")
|
|
849
|
+
.action(async (id) => {
|
|
850
|
+
console.log(
|
|
851
|
+
JSON.stringify((await L()).recallingMemgovRecallV2(id), null, 2),
|
|
852
|
+
);
|
|
853
|
+
});
|
|
854
|
+
parent
|
|
855
|
+
.command("memgov-complete-recall-v2 <id>")
|
|
856
|
+
.description("Complete recall")
|
|
857
|
+
.action(async (id) => {
|
|
858
|
+
console.log(
|
|
859
|
+
JSON.stringify((await L()).completeRecallMemgovV2(id), null, 2),
|
|
860
|
+
);
|
|
861
|
+
});
|
|
862
|
+
parent
|
|
863
|
+
.command("memgov-fail-recall-v2 <id> [reason]")
|
|
864
|
+
.description("Fail recall")
|
|
865
|
+
.action(async (id, reason) => {
|
|
866
|
+
console.log(
|
|
867
|
+
JSON.stringify((await L()).failMemgovRecallV2(id, reason), null, 2),
|
|
868
|
+
);
|
|
869
|
+
});
|
|
870
|
+
parent
|
|
871
|
+
.command("memgov-cancel-recall-v2 <id> [reason]")
|
|
872
|
+
.description("Cancel recall")
|
|
873
|
+
.action(async (id, reason) => {
|
|
874
|
+
console.log(
|
|
875
|
+
JSON.stringify((await L()).cancelMemgovRecallV2(id, reason), null, 2),
|
|
876
|
+
);
|
|
877
|
+
});
|
|
878
|
+
parent
|
|
879
|
+
.command("memgov-get-recall-v2 <id>")
|
|
880
|
+
.description("Get recall")
|
|
881
|
+
.action(async (id) => {
|
|
882
|
+
console.log(JSON.stringify((await L()).getMemgovRecallV2(id), null, 2));
|
|
883
|
+
});
|
|
884
|
+
parent
|
|
885
|
+
.command("memgov-list-recalls-v2")
|
|
886
|
+
.description("List recalls")
|
|
887
|
+
.action(async () => {
|
|
888
|
+
console.log(JSON.stringify((await L()).listMemgovRecallsV2(), null, 2));
|
|
889
|
+
});
|
|
890
|
+
parent
|
|
891
|
+
.command("memgov-auto-stale-idle-v2")
|
|
892
|
+
.description("Auto-stale idle")
|
|
893
|
+
.action(async () => {
|
|
894
|
+
console.log(
|
|
895
|
+
JSON.stringify((await L()).autoStaleIdleMemgovProfilesV2(), null, 2),
|
|
896
|
+
);
|
|
897
|
+
});
|
|
898
|
+
parent
|
|
899
|
+
.command("memgov-auto-fail-stuck-v2")
|
|
900
|
+
.description("Auto-fail stuck recalls")
|
|
901
|
+
.action(async () => {
|
|
902
|
+
console.log(
|
|
903
|
+
JSON.stringify((await L()).autoFailStuckMemgovRecallsV2(), null, 2),
|
|
904
|
+
);
|
|
905
|
+
});
|
|
906
|
+
parent
|
|
907
|
+
.command("memgov-gov-stats-v2")
|
|
908
|
+
.description("V2 gov stats")
|
|
909
|
+
.action(async () => {
|
|
910
|
+
console.log(
|
|
911
|
+
JSON.stringify((await L()).getMemoryManagerGovStatsV2(), null, 2),
|
|
912
|
+
);
|
|
913
|
+
});
|
|
914
|
+
}
|
|
@@ -698,3 +698,206 @@ export function registerMultimodalCommand(program) {
|
|
|
698
698
|
|
|
699
699
|
program.addCommand(mm);
|
|
700
700
|
}
|
|
701
|
+
|
|
702
|
+
// === Iter18 V2 governance overlay ===
|
|
703
|
+
export function registerMmgovV2Commands(program) {
|
|
704
|
+
const parent = program.commands.find((c) => c.name() === "multimodal");
|
|
705
|
+
if (!parent) return;
|
|
706
|
+
const L = async () => await import("../lib/multimodal.js");
|
|
707
|
+
parent
|
|
708
|
+
.command("mmgov-enums-v2")
|
|
709
|
+
.description("Show V2 enums")
|
|
710
|
+
.action(async () => {
|
|
711
|
+
const m = await L();
|
|
712
|
+
console.log(
|
|
713
|
+
JSON.stringify(
|
|
714
|
+
{
|
|
715
|
+
profileMaturity: m.MMGOV_PROFILE_MATURITY_V2,
|
|
716
|
+
jobLifecycle: m.MMGOV_JOB_LIFECYCLE_V2,
|
|
717
|
+
},
|
|
718
|
+
null,
|
|
719
|
+
2,
|
|
720
|
+
),
|
|
721
|
+
);
|
|
722
|
+
});
|
|
723
|
+
parent
|
|
724
|
+
.command("mmgov-config-v2")
|
|
725
|
+
.description("Show V2 config")
|
|
726
|
+
.action(async () => {
|
|
727
|
+
const m = await L();
|
|
728
|
+
console.log(
|
|
729
|
+
JSON.stringify(
|
|
730
|
+
{
|
|
731
|
+
maxActive: m.getMaxActiveMmgovProfilesPerOwnerV2(),
|
|
732
|
+
maxPending: m.getMaxPendingMmgovJobsPerProfileV2(),
|
|
733
|
+
idleMs: m.getMmgovProfileIdleMsV2(),
|
|
734
|
+
stuckMs: m.getMmgovJobStuckMsV2(),
|
|
735
|
+
},
|
|
736
|
+
null,
|
|
737
|
+
2,
|
|
738
|
+
),
|
|
739
|
+
);
|
|
740
|
+
});
|
|
741
|
+
parent
|
|
742
|
+
.command("mmgov-set-max-active-v2 <n>")
|
|
743
|
+
.description("Set max active")
|
|
744
|
+
.action(async (n) => {
|
|
745
|
+
(await L()).setMaxActiveMmgovProfilesPerOwnerV2(Number(n));
|
|
746
|
+
console.log("ok");
|
|
747
|
+
});
|
|
748
|
+
parent
|
|
749
|
+
.command("mmgov-set-max-pending-v2 <n>")
|
|
750
|
+
.description("Set max pending")
|
|
751
|
+
.action(async (n) => {
|
|
752
|
+
(await L()).setMaxPendingMmgovJobsPerProfileV2(Number(n));
|
|
753
|
+
console.log("ok");
|
|
754
|
+
});
|
|
755
|
+
parent
|
|
756
|
+
.command("mmgov-set-idle-ms-v2 <n>")
|
|
757
|
+
.description("Set idle threshold ms")
|
|
758
|
+
.action(async (n) => {
|
|
759
|
+
(await L()).setMmgovProfileIdleMsV2(Number(n));
|
|
760
|
+
console.log("ok");
|
|
761
|
+
});
|
|
762
|
+
parent
|
|
763
|
+
.command("mmgov-set-stuck-ms-v2 <n>")
|
|
764
|
+
.description("Set stuck threshold ms")
|
|
765
|
+
.action(async (n) => {
|
|
766
|
+
(await L()).setMmgovJobStuckMsV2(Number(n));
|
|
767
|
+
console.log("ok");
|
|
768
|
+
});
|
|
769
|
+
parent
|
|
770
|
+
.command("mmgov-register-v2 <id> <owner>")
|
|
771
|
+
.description("Register V2 profile")
|
|
772
|
+
.option("--kind <v>", "kind")
|
|
773
|
+
.action(async (id, owner, o) => {
|
|
774
|
+
const m = await L();
|
|
775
|
+
console.log(
|
|
776
|
+
JSON.stringify(
|
|
777
|
+
m.registerMmgovProfileV2({ id, owner, kind: o.kind }),
|
|
778
|
+
null,
|
|
779
|
+
2,
|
|
780
|
+
),
|
|
781
|
+
);
|
|
782
|
+
});
|
|
783
|
+
parent
|
|
784
|
+
.command("mmgov-activate-v2 <id>")
|
|
785
|
+
.description("Activate profile")
|
|
786
|
+
.action(async (id) => {
|
|
787
|
+
console.log(
|
|
788
|
+
JSON.stringify((await L()).activateMmgovProfileV2(id), null, 2),
|
|
789
|
+
);
|
|
790
|
+
});
|
|
791
|
+
parent
|
|
792
|
+
.command("mmgov-stale-v2 <id>")
|
|
793
|
+
.description("Stale profile")
|
|
794
|
+
.action(async (id) => {
|
|
795
|
+
console.log(JSON.stringify((await L()).staleMmgovProfileV2(id), null, 2));
|
|
796
|
+
});
|
|
797
|
+
parent
|
|
798
|
+
.command("mmgov-archive-v2 <id>")
|
|
799
|
+
.description("Archive profile")
|
|
800
|
+
.action(async (id) => {
|
|
801
|
+
console.log(
|
|
802
|
+
JSON.stringify((await L()).archiveMmgovProfileV2(id), null, 2),
|
|
803
|
+
);
|
|
804
|
+
});
|
|
805
|
+
parent
|
|
806
|
+
.command("mmgov-touch-v2 <id>")
|
|
807
|
+
.description("Touch profile")
|
|
808
|
+
.action(async (id) => {
|
|
809
|
+
console.log(JSON.stringify((await L()).touchMmgovProfileV2(id), null, 2));
|
|
810
|
+
});
|
|
811
|
+
parent
|
|
812
|
+
.command("mmgov-get-v2 <id>")
|
|
813
|
+
.description("Get profile")
|
|
814
|
+
.action(async (id) => {
|
|
815
|
+
console.log(JSON.stringify((await L()).getMmgovProfileV2(id), null, 2));
|
|
816
|
+
});
|
|
817
|
+
parent
|
|
818
|
+
.command("mmgov-list-v2")
|
|
819
|
+
.description("List profiles")
|
|
820
|
+
.action(async () => {
|
|
821
|
+
console.log(JSON.stringify((await L()).listMmgovProfilesV2(), null, 2));
|
|
822
|
+
});
|
|
823
|
+
parent
|
|
824
|
+
.command("mmgov-create-job-v2 <id> <profileId>")
|
|
825
|
+
.description("Create job")
|
|
826
|
+
.option("--input <v>", "input")
|
|
827
|
+
.action(async (id, profileId, o) => {
|
|
828
|
+
const m = await L();
|
|
829
|
+
console.log(
|
|
830
|
+
JSON.stringify(
|
|
831
|
+
m.createMmgovJobV2({ id, profileId, input: o.input }),
|
|
832
|
+
null,
|
|
833
|
+
2,
|
|
834
|
+
),
|
|
835
|
+
);
|
|
836
|
+
});
|
|
837
|
+
parent
|
|
838
|
+
.command("mmgov-processing-job-v2 <id>")
|
|
839
|
+
.description("Mark job as processing")
|
|
840
|
+
.action(async (id) => {
|
|
841
|
+
console.log(
|
|
842
|
+
JSON.stringify((await L()).processingMmgovJobV2(id), null, 2),
|
|
843
|
+
);
|
|
844
|
+
});
|
|
845
|
+
parent
|
|
846
|
+
.command("mmgov-complete-job-v2 <id>")
|
|
847
|
+
.description("Complete job")
|
|
848
|
+
.action(async (id) => {
|
|
849
|
+
console.log(JSON.stringify((await L()).completeJobMmgovV2(id), null, 2));
|
|
850
|
+
});
|
|
851
|
+
parent
|
|
852
|
+
.command("mmgov-fail-job-v2 <id> [reason]")
|
|
853
|
+
.description("Fail job")
|
|
854
|
+
.action(async (id, reason) => {
|
|
855
|
+
console.log(
|
|
856
|
+
JSON.stringify((await L()).failMmgovJobV2(id, reason), null, 2),
|
|
857
|
+
);
|
|
858
|
+
});
|
|
859
|
+
parent
|
|
860
|
+
.command("mmgov-cancel-job-v2 <id> [reason]")
|
|
861
|
+
.description("Cancel job")
|
|
862
|
+
.action(async (id, reason) => {
|
|
863
|
+
console.log(
|
|
864
|
+
JSON.stringify((await L()).cancelMmgovJobV2(id, reason), null, 2),
|
|
865
|
+
);
|
|
866
|
+
});
|
|
867
|
+
parent
|
|
868
|
+
.command("mmgov-get-job-v2 <id>")
|
|
869
|
+
.description("Get job")
|
|
870
|
+
.action(async (id) => {
|
|
871
|
+
console.log(JSON.stringify((await L()).getMmgovJobV2(id), null, 2));
|
|
872
|
+
});
|
|
873
|
+
parent
|
|
874
|
+
.command("mmgov-list-jobs-v2")
|
|
875
|
+
.description("List jobs")
|
|
876
|
+
.action(async () => {
|
|
877
|
+
console.log(JSON.stringify((await L()).listMmgovJobsV2(), null, 2));
|
|
878
|
+
});
|
|
879
|
+
parent
|
|
880
|
+
.command("mmgov-auto-stale-idle-v2")
|
|
881
|
+
.description("Auto-stale idle")
|
|
882
|
+
.action(async () => {
|
|
883
|
+
console.log(
|
|
884
|
+
JSON.stringify((await L()).autoStaleIdleMmgovProfilesV2(), null, 2),
|
|
885
|
+
);
|
|
886
|
+
});
|
|
887
|
+
parent
|
|
888
|
+
.command("mmgov-auto-fail-stuck-v2")
|
|
889
|
+
.description("Auto-fail stuck jobs")
|
|
890
|
+
.action(async () => {
|
|
891
|
+
console.log(
|
|
892
|
+
JSON.stringify((await L()).autoFailStuckMmgovJobsV2(), null, 2),
|
|
893
|
+
);
|
|
894
|
+
});
|
|
895
|
+
parent
|
|
896
|
+
.command("mmgov-gov-stats-v2")
|
|
897
|
+
.description("V2 gov stats")
|
|
898
|
+
.action(async () => {
|
|
899
|
+
console.log(
|
|
900
|
+
JSON.stringify((await L()).getMultimodalGovStatsV2(), null, 2),
|
|
901
|
+
);
|
|
902
|
+
});
|
|
903
|
+
}
|