chainlesschain 0.152.0 → 0.156.2
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/README.md +52 -3
- package/package.json +1 -1
- package/src/commands/a2a.js +201 -0
- package/src/commands/agent.js +1250 -0
- package/src/commands/chat.js +605 -0
- package/src/commands/cli-anything.js +426 -0
- package/src/commands/compliance.js +412 -0
- package/src/commands/config.js +213 -0
- package/src/commands/cowork.js +1463 -0
- package/src/commands/crosschain.js +203 -0
- package/src/commands/dao.js +203 -0
- package/src/commands/economy.js +199 -0
- package/src/commands/encrypt.js +201 -0
- package/src/commands/evolution.js +199 -0
- package/src/commands/evomap.js +625 -0
- package/src/commands/hmemory.js +203 -0
- package/src/commands/inference.js +207 -0
- package/src/commands/kg.js +195 -0
- package/src/commands/llm.js +209 -0
- package/src/commands/memory.js +203 -0
- package/src/commands/orchestrate.js +406 -0
- package/src/commands/pipeline.js +199 -0
- package/src/commands/planmode.js +426 -0
- package/src/commands/plugin.js +209 -0
- package/src/commands/services.js +207 -0
- package/src/commands/setup.js +205 -0
- package/src/commands/skill.js +207 -0
- package/src/commands/start.js +209 -0
- package/src/commands/stream.js +213 -0
- package/src/commands/ui.js +225 -0
- package/src/commands/workflow.js +209 -0
- package/src/index.js +112 -0
- package/src/lib/a2a-protocol.js +332 -0
- package/src/lib/agent-coordinator.js +334 -0
- package/src/lib/agent-economy.js +334 -0
- package/src/lib/agent-router.js +333 -0
- package/src/lib/autonomous-agent.js +332 -0
- package/src/lib/chat-core.js +335 -0
- package/src/lib/cli-anything-bridge.js +341 -0
- package/src/lib/cli-context-engineering.js +351 -0
- package/src/lib/compliance-manager.js +334 -0
- package/src/lib/cowork-adapter.js +336 -0
- package/src/lib/cowork-evomap-adapter.js +341 -0
- package/src/lib/cowork-mcp-tools.js +341 -0
- package/src/lib/cowork-observe-html.js +341 -0
- package/src/lib/cowork-observe.js +341 -0
- package/src/lib/cowork-task-templates.js +342 -1
- package/src/lib/cowork-template-marketplace.js +340 -0
- package/src/lib/cross-chain.js +339 -0
- package/src/lib/crypto-manager.js +334 -0
- package/src/lib/dao-governance.js +339 -0
- package/src/lib/downloader.js +334 -0
- package/src/lib/evolution-system.js +334 -0
- package/src/lib/evomap-client.js +342 -0
- package/src/lib/evomap-federation.js +338 -0
- package/src/lib/evomap-manager.js +330 -0
- package/src/lib/execution-backend.js +330 -0
- package/src/lib/hashline.js +338 -0
- package/src/lib/hierarchical-memory.js +334 -0
- package/src/lib/inference-network.js +341 -0
- package/src/lib/interaction-adapter.js +330 -0
- package/src/lib/interactive-planner.js +354 -0
- package/src/lib/knowledge-graph.js +331 -0
- package/src/lib/pipeline-orchestrator.js +332 -0
- package/src/lib/plan-mode.js +336 -0
- package/src/lib/plugin-autodiscovery.js +334 -0
- package/src/lib/process-manager.js +336 -0
- package/src/lib/provider-options.js +346 -0
- package/src/lib/provider-stream.js +348 -0
- package/src/lib/service-manager.js +337 -0
- package/src/lib/session-core-singletons.js +341 -0
- package/src/lib/skill-mcp.js +336 -0
- package/src/lib/stix-parser.js +346 -0
- package/src/lib/sub-agent-context.js +343 -0
- package/src/lib/sub-agent-profiles.js +335 -0
- package/src/lib/sub-agent-registry.js +336 -0
- package/src/lib/todo-manager.js +336 -0
- package/src/lib/web-ui-server.js +348 -0
- package/src/lib/workflow-expr.js +346 -0
- package/src/lib/ws-chat-handler.js +337 -0
package/src/commands/services.js
CHANGED
|
@@ -92,3 +92,210 @@ async function withCompose(fn) {
|
|
|
92
92
|
process.exit(1);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
// === Iter27 V2 governance overlay ===
|
|
97
|
+
export function registerSmgrgovV2Commands(program) {
|
|
98
|
+
const parent = program.commands.find((c) => c.name() === "services");
|
|
99
|
+
if (!parent) return;
|
|
100
|
+
const L = async () => await import("../lib/service-manager.js");
|
|
101
|
+
parent
|
|
102
|
+
.command("smgrgov-enums-v2")
|
|
103
|
+
.description("Show V2 enums")
|
|
104
|
+
.action(async () => {
|
|
105
|
+
const m = await L();
|
|
106
|
+
console.log(
|
|
107
|
+
JSON.stringify(
|
|
108
|
+
{
|
|
109
|
+
profileMaturity: m.SMGRGOV_PROFILE_MATURITY_V2,
|
|
110
|
+
opLifecycle: m.SMGRGOV_OP_LIFECYCLE_V2,
|
|
111
|
+
},
|
|
112
|
+
null,
|
|
113
|
+
2,
|
|
114
|
+
),
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
parent
|
|
118
|
+
.command("smgrgov-config-v2")
|
|
119
|
+
.description("Show V2 config")
|
|
120
|
+
.action(async () => {
|
|
121
|
+
const m = await L();
|
|
122
|
+
console.log(
|
|
123
|
+
JSON.stringify(
|
|
124
|
+
{
|
|
125
|
+
maxActive: m.getMaxActiveSmgrgovProfilesPerOwnerV2(),
|
|
126
|
+
maxPending: m.getMaxPendingSmgrgovOpsPerProfileV2(),
|
|
127
|
+
idleMs: m.getSmgrgovProfileIdleMsV2(),
|
|
128
|
+
stuckMs: m.getSmgrgovOpStuckMsV2(),
|
|
129
|
+
},
|
|
130
|
+
null,
|
|
131
|
+
2,
|
|
132
|
+
),
|
|
133
|
+
);
|
|
134
|
+
});
|
|
135
|
+
parent
|
|
136
|
+
.command("smgrgov-set-max-active-v2 <n>")
|
|
137
|
+
.description("Set max active")
|
|
138
|
+
.action(async (n) => {
|
|
139
|
+
(await L()).setMaxActiveSmgrgovProfilesPerOwnerV2(Number(n));
|
|
140
|
+
console.log("ok");
|
|
141
|
+
});
|
|
142
|
+
parent
|
|
143
|
+
.command("smgrgov-set-max-pending-v2 <n>")
|
|
144
|
+
.description("Set max pending")
|
|
145
|
+
.action(async (n) => {
|
|
146
|
+
(await L()).setMaxPendingSmgrgovOpsPerProfileV2(Number(n));
|
|
147
|
+
console.log("ok");
|
|
148
|
+
});
|
|
149
|
+
parent
|
|
150
|
+
.command("smgrgov-set-idle-ms-v2 <n>")
|
|
151
|
+
.description("Set idle threshold ms")
|
|
152
|
+
.action(async (n) => {
|
|
153
|
+
(await L()).setSmgrgovProfileIdleMsV2(Number(n));
|
|
154
|
+
console.log("ok");
|
|
155
|
+
});
|
|
156
|
+
parent
|
|
157
|
+
.command("smgrgov-set-stuck-ms-v2 <n>")
|
|
158
|
+
.description("Set stuck threshold ms")
|
|
159
|
+
.action(async (n) => {
|
|
160
|
+
(await L()).setSmgrgovOpStuckMsV2(Number(n));
|
|
161
|
+
console.log("ok");
|
|
162
|
+
});
|
|
163
|
+
parent
|
|
164
|
+
.command("smgrgov-register-v2 <id> <owner>")
|
|
165
|
+
.description("Register V2 profile")
|
|
166
|
+
.option("--service <v>", "service")
|
|
167
|
+
.action(async (id, owner, o) => {
|
|
168
|
+
const m = await L();
|
|
169
|
+
console.log(
|
|
170
|
+
JSON.stringify(
|
|
171
|
+
m.registerSmgrgovProfileV2({ id, owner, service: o.service }),
|
|
172
|
+
null,
|
|
173
|
+
2,
|
|
174
|
+
),
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
parent
|
|
178
|
+
.command("smgrgov-activate-v2 <id>")
|
|
179
|
+
.description("Activate profile")
|
|
180
|
+
.action(async (id) => {
|
|
181
|
+
console.log(
|
|
182
|
+
JSON.stringify((await L()).activateSmgrgovProfileV2(id), null, 2),
|
|
183
|
+
);
|
|
184
|
+
});
|
|
185
|
+
parent
|
|
186
|
+
.command("smgrgov-degrade-v2 <id>")
|
|
187
|
+
.description("Degrade profile")
|
|
188
|
+
.action(async (id) => {
|
|
189
|
+
console.log(
|
|
190
|
+
JSON.stringify((await L()).degradeSmgrgovProfileV2(id), null, 2),
|
|
191
|
+
);
|
|
192
|
+
});
|
|
193
|
+
parent
|
|
194
|
+
.command("smgrgov-archive-v2 <id>")
|
|
195
|
+
.description("Archive profile")
|
|
196
|
+
.action(async (id) => {
|
|
197
|
+
console.log(
|
|
198
|
+
JSON.stringify((await L()).archiveSmgrgovProfileV2(id), null, 2),
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
parent
|
|
202
|
+
.command("smgrgov-touch-v2 <id>")
|
|
203
|
+
.description("Touch profile")
|
|
204
|
+
.action(async (id) => {
|
|
205
|
+
console.log(
|
|
206
|
+
JSON.stringify((await L()).touchSmgrgovProfileV2(id), null, 2),
|
|
207
|
+
);
|
|
208
|
+
});
|
|
209
|
+
parent
|
|
210
|
+
.command("smgrgov-get-v2 <id>")
|
|
211
|
+
.description("Get profile")
|
|
212
|
+
.action(async (id) => {
|
|
213
|
+
console.log(JSON.stringify((await L()).getSmgrgovProfileV2(id), null, 2));
|
|
214
|
+
});
|
|
215
|
+
parent
|
|
216
|
+
.command("smgrgov-list-v2")
|
|
217
|
+
.description("List profiles")
|
|
218
|
+
.action(async () => {
|
|
219
|
+
console.log(JSON.stringify((await L()).listSmgrgovProfilesV2(), null, 2));
|
|
220
|
+
});
|
|
221
|
+
parent
|
|
222
|
+
.command("smgrgov-create-op-v2 <id> <profileId>")
|
|
223
|
+
.description("Create op")
|
|
224
|
+
.option("--action <v>", "action")
|
|
225
|
+
.action(async (id, profileId, o) => {
|
|
226
|
+
const m = await L();
|
|
227
|
+
console.log(
|
|
228
|
+
JSON.stringify(
|
|
229
|
+
m.createSmgrgovOpV2({ id, profileId, action: o.action }),
|
|
230
|
+
null,
|
|
231
|
+
2,
|
|
232
|
+
),
|
|
233
|
+
);
|
|
234
|
+
});
|
|
235
|
+
parent
|
|
236
|
+
.command("smgrgov-operating-op-v2 <id>")
|
|
237
|
+
.description("Mark op as operating")
|
|
238
|
+
.action(async (id) => {
|
|
239
|
+
console.log(
|
|
240
|
+
JSON.stringify((await L()).operatingSmgrgovOpV2(id), null, 2),
|
|
241
|
+
);
|
|
242
|
+
});
|
|
243
|
+
parent
|
|
244
|
+
.command("smgrgov-complete-op-v2 <id>")
|
|
245
|
+
.description("Complete op")
|
|
246
|
+
.action(async (id) => {
|
|
247
|
+
console.log(JSON.stringify((await L()).completeOpSmgrgovV2(id), null, 2));
|
|
248
|
+
});
|
|
249
|
+
parent
|
|
250
|
+
.command("smgrgov-fail-op-v2 <id> [reason]")
|
|
251
|
+
.description("Fail op")
|
|
252
|
+
.action(async (id, reason) => {
|
|
253
|
+
console.log(
|
|
254
|
+
JSON.stringify((await L()).failSmgrgovOpV2(id, reason), null, 2),
|
|
255
|
+
);
|
|
256
|
+
});
|
|
257
|
+
parent
|
|
258
|
+
.command("smgrgov-cancel-op-v2 <id> [reason]")
|
|
259
|
+
.description("Cancel op")
|
|
260
|
+
.action(async (id, reason) => {
|
|
261
|
+
console.log(
|
|
262
|
+
JSON.stringify((await L()).cancelSmgrgovOpV2(id, reason), null, 2),
|
|
263
|
+
);
|
|
264
|
+
});
|
|
265
|
+
parent
|
|
266
|
+
.command("smgrgov-get-op-v2 <id>")
|
|
267
|
+
.description("Get op")
|
|
268
|
+
.action(async (id) => {
|
|
269
|
+
console.log(JSON.stringify((await L()).getSmgrgovOpV2(id), null, 2));
|
|
270
|
+
});
|
|
271
|
+
parent
|
|
272
|
+
.command("smgrgov-list-ops-v2")
|
|
273
|
+
.description("List ops")
|
|
274
|
+
.action(async () => {
|
|
275
|
+
console.log(JSON.stringify((await L()).listSmgrgovOpsV2(), null, 2));
|
|
276
|
+
});
|
|
277
|
+
parent
|
|
278
|
+
.command("smgrgov-auto-degrade-idle-v2")
|
|
279
|
+
.description("Auto-degrade idle")
|
|
280
|
+
.action(async () => {
|
|
281
|
+
console.log(
|
|
282
|
+
JSON.stringify((await L()).autoDegradeIdleSmgrgovProfilesV2(), null, 2),
|
|
283
|
+
);
|
|
284
|
+
});
|
|
285
|
+
parent
|
|
286
|
+
.command("smgrgov-auto-fail-stuck-v2")
|
|
287
|
+
.description("Auto-fail stuck ops")
|
|
288
|
+
.action(async () => {
|
|
289
|
+
console.log(
|
|
290
|
+
JSON.stringify((await L()).autoFailStuckSmgrgovOpsV2(), null, 2),
|
|
291
|
+
);
|
|
292
|
+
});
|
|
293
|
+
parent
|
|
294
|
+
.command("smgrgov-gov-stats-v2")
|
|
295
|
+
.description("V2 gov stats")
|
|
296
|
+
.action(async () => {
|
|
297
|
+
console.log(
|
|
298
|
+
JSON.stringify((await L()).getServiceManagerGovStatsV2(), null, 2),
|
|
299
|
+
);
|
|
300
|
+
});
|
|
301
|
+
}
|
package/src/commands/setup.js
CHANGED
|
@@ -197,3 +197,208 @@ async function runSetup(options) {
|
|
|
197
197
|
);
|
|
198
198
|
logger.newline();
|
|
199
199
|
}
|
|
200
|
+
|
|
201
|
+
// === Iter27 V2 governance overlay ===
|
|
202
|
+
export function registerDlgovV2Commands(program) {
|
|
203
|
+
const parent = program.commands.find((c) => c.name() === "setup");
|
|
204
|
+
if (!parent) return;
|
|
205
|
+
const L = async () => await import("../lib/downloader.js");
|
|
206
|
+
parent
|
|
207
|
+
.command("dlgov-enums-v2")
|
|
208
|
+
.description("Show V2 enums")
|
|
209
|
+
.action(async () => {
|
|
210
|
+
const m = await L();
|
|
211
|
+
console.log(
|
|
212
|
+
JSON.stringify(
|
|
213
|
+
{
|
|
214
|
+
profileMaturity: m.DLGOV_PROFILE_MATURITY_V2,
|
|
215
|
+
downloadLifecycle: m.DLGOV_DOWNLOAD_LIFECYCLE_V2,
|
|
216
|
+
},
|
|
217
|
+
null,
|
|
218
|
+
2,
|
|
219
|
+
),
|
|
220
|
+
);
|
|
221
|
+
});
|
|
222
|
+
parent
|
|
223
|
+
.command("dlgov-config-v2")
|
|
224
|
+
.description("Show V2 config")
|
|
225
|
+
.action(async () => {
|
|
226
|
+
const m = await L();
|
|
227
|
+
console.log(
|
|
228
|
+
JSON.stringify(
|
|
229
|
+
{
|
|
230
|
+
maxActive: m.getMaxActiveDlgovProfilesPerOwnerV2(),
|
|
231
|
+
maxPending: m.getMaxPendingDlgovDownloadsPerProfileV2(),
|
|
232
|
+
idleMs: m.getDlgovProfileIdleMsV2(),
|
|
233
|
+
stuckMs: m.getDlgovDownloadStuckMsV2(),
|
|
234
|
+
},
|
|
235
|
+
null,
|
|
236
|
+
2,
|
|
237
|
+
),
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
parent
|
|
241
|
+
.command("dlgov-set-max-active-v2 <n>")
|
|
242
|
+
.description("Set max active")
|
|
243
|
+
.action(async (n) => {
|
|
244
|
+
(await L()).setMaxActiveDlgovProfilesPerOwnerV2(Number(n));
|
|
245
|
+
console.log("ok");
|
|
246
|
+
});
|
|
247
|
+
parent
|
|
248
|
+
.command("dlgov-set-max-pending-v2 <n>")
|
|
249
|
+
.description("Set max pending")
|
|
250
|
+
.action(async (n) => {
|
|
251
|
+
(await L()).setMaxPendingDlgovDownloadsPerProfileV2(Number(n));
|
|
252
|
+
console.log("ok");
|
|
253
|
+
});
|
|
254
|
+
parent
|
|
255
|
+
.command("dlgov-set-idle-ms-v2 <n>")
|
|
256
|
+
.description("Set idle threshold ms")
|
|
257
|
+
.action(async (n) => {
|
|
258
|
+
(await L()).setDlgovProfileIdleMsV2(Number(n));
|
|
259
|
+
console.log("ok");
|
|
260
|
+
});
|
|
261
|
+
parent
|
|
262
|
+
.command("dlgov-set-stuck-ms-v2 <n>")
|
|
263
|
+
.description("Set stuck threshold ms")
|
|
264
|
+
.action(async (n) => {
|
|
265
|
+
(await L()).setDlgovDownloadStuckMsV2(Number(n));
|
|
266
|
+
console.log("ok");
|
|
267
|
+
});
|
|
268
|
+
parent
|
|
269
|
+
.command("dlgov-register-v2 <id> <owner>")
|
|
270
|
+
.description("Register V2 profile")
|
|
271
|
+
.option("--mirror <v>", "mirror")
|
|
272
|
+
.action(async (id, owner, o) => {
|
|
273
|
+
const m = await L();
|
|
274
|
+
console.log(
|
|
275
|
+
JSON.stringify(
|
|
276
|
+
m.registerDlgovProfileV2({ id, owner, mirror: o.mirror }),
|
|
277
|
+
null,
|
|
278
|
+
2,
|
|
279
|
+
),
|
|
280
|
+
);
|
|
281
|
+
});
|
|
282
|
+
parent
|
|
283
|
+
.command("dlgov-activate-v2 <id>")
|
|
284
|
+
.description("Activate profile")
|
|
285
|
+
.action(async (id) => {
|
|
286
|
+
console.log(
|
|
287
|
+
JSON.stringify((await L()).activateDlgovProfileV2(id), null, 2),
|
|
288
|
+
);
|
|
289
|
+
});
|
|
290
|
+
parent
|
|
291
|
+
.command("dlgov-stale-v2 <id>")
|
|
292
|
+
.description("Stale profile")
|
|
293
|
+
.action(async (id) => {
|
|
294
|
+
console.log(JSON.stringify((await L()).staleDlgovProfileV2(id), null, 2));
|
|
295
|
+
});
|
|
296
|
+
parent
|
|
297
|
+
.command("dlgov-archive-v2 <id>")
|
|
298
|
+
.description("Archive profile")
|
|
299
|
+
.action(async (id) => {
|
|
300
|
+
console.log(
|
|
301
|
+
JSON.stringify((await L()).archiveDlgovProfileV2(id), null, 2),
|
|
302
|
+
);
|
|
303
|
+
});
|
|
304
|
+
parent
|
|
305
|
+
.command("dlgov-touch-v2 <id>")
|
|
306
|
+
.description("Touch profile")
|
|
307
|
+
.action(async (id) => {
|
|
308
|
+
console.log(JSON.stringify((await L()).touchDlgovProfileV2(id), null, 2));
|
|
309
|
+
});
|
|
310
|
+
parent
|
|
311
|
+
.command("dlgov-get-v2 <id>")
|
|
312
|
+
.description("Get profile")
|
|
313
|
+
.action(async (id) => {
|
|
314
|
+
console.log(JSON.stringify((await L()).getDlgovProfileV2(id), null, 2));
|
|
315
|
+
});
|
|
316
|
+
parent
|
|
317
|
+
.command("dlgov-list-v2")
|
|
318
|
+
.description("List profiles")
|
|
319
|
+
.action(async () => {
|
|
320
|
+
console.log(JSON.stringify((await L()).listDlgovProfilesV2(), null, 2));
|
|
321
|
+
});
|
|
322
|
+
parent
|
|
323
|
+
.command("dlgov-create-download-v2 <id> <profileId>")
|
|
324
|
+
.description("Create download")
|
|
325
|
+
.option("--url <v>", "url")
|
|
326
|
+
.action(async (id, profileId, o) => {
|
|
327
|
+
const m = await L();
|
|
328
|
+
console.log(
|
|
329
|
+
JSON.stringify(
|
|
330
|
+
m.createDlgovDownloadV2({ id, profileId, url: o.url }),
|
|
331
|
+
null,
|
|
332
|
+
2,
|
|
333
|
+
),
|
|
334
|
+
);
|
|
335
|
+
});
|
|
336
|
+
parent
|
|
337
|
+
.command("dlgov-fetching-download-v2 <id>")
|
|
338
|
+
.description("Mark download as fetching")
|
|
339
|
+
.action(async (id) => {
|
|
340
|
+
console.log(
|
|
341
|
+
JSON.stringify((await L()).fetchingDlgovDownloadV2(id), null, 2),
|
|
342
|
+
);
|
|
343
|
+
});
|
|
344
|
+
parent
|
|
345
|
+
.command("dlgov-complete-download-v2 <id>")
|
|
346
|
+
.description("Complete download")
|
|
347
|
+
.action(async (id) => {
|
|
348
|
+
console.log(
|
|
349
|
+
JSON.stringify((await L()).completeDownloadDlgovV2(id), null, 2),
|
|
350
|
+
);
|
|
351
|
+
});
|
|
352
|
+
parent
|
|
353
|
+
.command("dlgov-fail-download-v2 <id> [reason]")
|
|
354
|
+
.description("Fail download")
|
|
355
|
+
.action(async (id, reason) => {
|
|
356
|
+
console.log(
|
|
357
|
+
JSON.stringify((await L()).failDlgovDownloadV2(id, reason), null, 2),
|
|
358
|
+
);
|
|
359
|
+
});
|
|
360
|
+
parent
|
|
361
|
+
.command("dlgov-cancel-download-v2 <id> [reason]")
|
|
362
|
+
.description("Cancel download")
|
|
363
|
+
.action(async (id, reason) => {
|
|
364
|
+
console.log(
|
|
365
|
+
JSON.stringify((await L()).cancelDlgovDownloadV2(id, reason), null, 2),
|
|
366
|
+
);
|
|
367
|
+
});
|
|
368
|
+
parent
|
|
369
|
+
.command("dlgov-get-download-v2 <id>")
|
|
370
|
+
.description("Get download")
|
|
371
|
+
.action(async (id) => {
|
|
372
|
+
console.log(JSON.stringify((await L()).getDlgovDownloadV2(id), null, 2));
|
|
373
|
+
});
|
|
374
|
+
parent
|
|
375
|
+
.command("dlgov-list-downloads-v2")
|
|
376
|
+
.description("List downloads")
|
|
377
|
+
.action(async () => {
|
|
378
|
+
console.log(JSON.stringify((await L()).listDlgovDownloadsV2(), null, 2));
|
|
379
|
+
});
|
|
380
|
+
parent
|
|
381
|
+
.command("dlgov-auto-stale-idle-v2")
|
|
382
|
+
.description("Auto-stale idle")
|
|
383
|
+
.action(async () => {
|
|
384
|
+
console.log(
|
|
385
|
+
JSON.stringify((await L()).autoStaleIdleDlgovProfilesV2(), null, 2),
|
|
386
|
+
);
|
|
387
|
+
});
|
|
388
|
+
parent
|
|
389
|
+
.command("dlgov-auto-fail-stuck-v2")
|
|
390
|
+
.description("Auto-fail stuck downloads")
|
|
391
|
+
.action(async () => {
|
|
392
|
+
console.log(
|
|
393
|
+
JSON.stringify((await L()).autoFailStuckDlgovDownloadsV2(), null, 2),
|
|
394
|
+
);
|
|
395
|
+
});
|
|
396
|
+
parent
|
|
397
|
+
.command("dlgov-gov-stats-v2")
|
|
398
|
+
.description("V2 gov stats")
|
|
399
|
+
.action(async () => {
|
|
400
|
+
console.log(
|
|
401
|
+
JSON.stringify((await L()).getDownloaderGovStatsV2(), null, 2),
|
|
402
|
+
);
|
|
403
|
+
});
|
|
404
|
+
}
|
package/src/commands/skill.js
CHANGED
|
@@ -1169,3 +1169,210 @@ export function registerSklgovV2Commands(program) {
|
|
|
1169
1169
|
);
|
|
1170
1170
|
});
|
|
1171
1171
|
}
|
|
1172
|
+
|
|
1173
|
+
// === Iter27 V2 governance overlay ===
|
|
1174
|
+
export function registerSmcpgovV2Commands(program) {
|
|
1175
|
+
const parent = program.commands.find((c) => c.name() === "skill");
|
|
1176
|
+
if (!parent) return;
|
|
1177
|
+
const L = async () => await import("../lib/skill-mcp.js");
|
|
1178
|
+
parent
|
|
1179
|
+
.command("smcpgov-enums-v2")
|
|
1180
|
+
.description("Show V2 enums")
|
|
1181
|
+
.action(async () => {
|
|
1182
|
+
const m = await L();
|
|
1183
|
+
console.log(
|
|
1184
|
+
JSON.stringify(
|
|
1185
|
+
{
|
|
1186
|
+
profileMaturity: m.SMCPGOV_PROFILE_MATURITY_V2,
|
|
1187
|
+
callLifecycle: m.SMCPGOV_CALL_LIFECYCLE_V2,
|
|
1188
|
+
},
|
|
1189
|
+
null,
|
|
1190
|
+
2,
|
|
1191
|
+
),
|
|
1192
|
+
);
|
|
1193
|
+
});
|
|
1194
|
+
parent
|
|
1195
|
+
.command("smcpgov-config-v2")
|
|
1196
|
+
.description("Show V2 config")
|
|
1197
|
+
.action(async () => {
|
|
1198
|
+
const m = await L();
|
|
1199
|
+
console.log(
|
|
1200
|
+
JSON.stringify(
|
|
1201
|
+
{
|
|
1202
|
+
maxActive: m.getMaxActiveSmcpgovProfilesPerOwnerV2(),
|
|
1203
|
+
maxPending: m.getMaxPendingSmcpgovCallsPerProfileV2(),
|
|
1204
|
+
idleMs: m.getSmcpgovProfileIdleMsV2(),
|
|
1205
|
+
stuckMs: m.getSmcpgovCallStuckMsV2(),
|
|
1206
|
+
},
|
|
1207
|
+
null,
|
|
1208
|
+
2,
|
|
1209
|
+
),
|
|
1210
|
+
);
|
|
1211
|
+
});
|
|
1212
|
+
parent
|
|
1213
|
+
.command("smcpgov-set-max-active-v2 <n>")
|
|
1214
|
+
.description("Set max active")
|
|
1215
|
+
.action(async (n) => {
|
|
1216
|
+
(await L()).setMaxActiveSmcpgovProfilesPerOwnerV2(Number(n));
|
|
1217
|
+
console.log("ok");
|
|
1218
|
+
});
|
|
1219
|
+
parent
|
|
1220
|
+
.command("smcpgov-set-max-pending-v2 <n>")
|
|
1221
|
+
.description("Set max pending")
|
|
1222
|
+
.action(async (n) => {
|
|
1223
|
+
(await L()).setMaxPendingSmcpgovCallsPerProfileV2(Number(n));
|
|
1224
|
+
console.log("ok");
|
|
1225
|
+
});
|
|
1226
|
+
parent
|
|
1227
|
+
.command("smcpgov-set-idle-ms-v2 <n>")
|
|
1228
|
+
.description("Set idle threshold ms")
|
|
1229
|
+
.action(async (n) => {
|
|
1230
|
+
(await L()).setSmcpgovProfileIdleMsV2(Number(n));
|
|
1231
|
+
console.log("ok");
|
|
1232
|
+
});
|
|
1233
|
+
parent
|
|
1234
|
+
.command("smcpgov-set-stuck-ms-v2 <n>")
|
|
1235
|
+
.description("Set stuck threshold ms")
|
|
1236
|
+
.action(async (n) => {
|
|
1237
|
+
(await L()).setSmcpgovCallStuckMsV2(Number(n));
|
|
1238
|
+
console.log("ok");
|
|
1239
|
+
});
|
|
1240
|
+
parent
|
|
1241
|
+
.command("smcpgov-register-v2 <id> <owner>")
|
|
1242
|
+
.description("Register V2 profile")
|
|
1243
|
+
.option("--server <v>", "server")
|
|
1244
|
+
.action(async (id, owner, o) => {
|
|
1245
|
+
const m = await L();
|
|
1246
|
+
console.log(
|
|
1247
|
+
JSON.stringify(
|
|
1248
|
+
m.registerSmcpgovProfileV2({ id, owner, server: o.server }),
|
|
1249
|
+
null,
|
|
1250
|
+
2,
|
|
1251
|
+
),
|
|
1252
|
+
);
|
|
1253
|
+
});
|
|
1254
|
+
parent
|
|
1255
|
+
.command("smcpgov-activate-v2 <id>")
|
|
1256
|
+
.description("Activate profile")
|
|
1257
|
+
.action(async (id) => {
|
|
1258
|
+
console.log(
|
|
1259
|
+
JSON.stringify((await L()).activateSmcpgovProfileV2(id), null, 2),
|
|
1260
|
+
);
|
|
1261
|
+
});
|
|
1262
|
+
parent
|
|
1263
|
+
.command("smcpgov-stale-v2 <id>")
|
|
1264
|
+
.description("Stale profile")
|
|
1265
|
+
.action(async (id) => {
|
|
1266
|
+
console.log(
|
|
1267
|
+
JSON.stringify((await L()).staleSmcpgovProfileV2(id), null, 2),
|
|
1268
|
+
);
|
|
1269
|
+
});
|
|
1270
|
+
parent
|
|
1271
|
+
.command("smcpgov-archive-v2 <id>")
|
|
1272
|
+
.description("Archive profile")
|
|
1273
|
+
.action(async (id) => {
|
|
1274
|
+
console.log(
|
|
1275
|
+
JSON.stringify((await L()).archiveSmcpgovProfileV2(id), null, 2),
|
|
1276
|
+
);
|
|
1277
|
+
});
|
|
1278
|
+
parent
|
|
1279
|
+
.command("smcpgov-touch-v2 <id>")
|
|
1280
|
+
.description("Touch profile")
|
|
1281
|
+
.action(async (id) => {
|
|
1282
|
+
console.log(
|
|
1283
|
+
JSON.stringify((await L()).touchSmcpgovProfileV2(id), null, 2),
|
|
1284
|
+
);
|
|
1285
|
+
});
|
|
1286
|
+
parent
|
|
1287
|
+
.command("smcpgov-get-v2 <id>")
|
|
1288
|
+
.description("Get profile")
|
|
1289
|
+
.action(async (id) => {
|
|
1290
|
+
console.log(JSON.stringify((await L()).getSmcpgovProfileV2(id), null, 2));
|
|
1291
|
+
});
|
|
1292
|
+
parent
|
|
1293
|
+
.command("smcpgov-list-v2")
|
|
1294
|
+
.description("List profiles")
|
|
1295
|
+
.action(async () => {
|
|
1296
|
+
console.log(JSON.stringify((await L()).listSmcpgovProfilesV2(), null, 2));
|
|
1297
|
+
});
|
|
1298
|
+
parent
|
|
1299
|
+
.command("smcpgov-create-call-v2 <id> <profileId>")
|
|
1300
|
+
.description("Create call")
|
|
1301
|
+
.option("--tool <v>", "tool")
|
|
1302
|
+
.action(async (id, profileId, o) => {
|
|
1303
|
+
const m = await L();
|
|
1304
|
+
console.log(
|
|
1305
|
+
JSON.stringify(
|
|
1306
|
+
m.createSmcpgovCallV2({ id, profileId, tool: o.tool }),
|
|
1307
|
+
null,
|
|
1308
|
+
2,
|
|
1309
|
+
),
|
|
1310
|
+
);
|
|
1311
|
+
});
|
|
1312
|
+
parent
|
|
1313
|
+
.command("smcpgov-invoking-call-v2 <id>")
|
|
1314
|
+
.description("Mark call as invoking")
|
|
1315
|
+
.action(async (id) => {
|
|
1316
|
+
console.log(
|
|
1317
|
+
JSON.stringify((await L()).invokingSmcpgovCallV2(id), null, 2),
|
|
1318
|
+
);
|
|
1319
|
+
});
|
|
1320
|
+
parent
|
|
1321
|
+
.command("smcpgov-complete-call-v2 <id>")
|
|
1322
|
+
.description("Complete call")
|
|
1323
|
+
.action(async (id) => {
|
|
1324
|
+
console.log(
|
|
1325
|
+
JSON.stringify((await L()).completeCallSmcpgovV2(id), null, 2),
|
|
1326
|
+
);
|
|
1327
|
+
});
|
|
1328
|
+
parent
|
|
1329
|
+
.command("smcpgov-fail-call-v2 <id> [reason]")
|
|
1330
|
+
.description("Fail call")
|
|
1331
|
+
.action(async (id, reason) => {
|
|
1332
|
+
console.log(
|
|
1333
|
+
JSON.stringify((await L()).failSmcpgovCallV2(id, reason), null, 2),
|
|
1334
|
+
);
|
|
1335
|
+
});
|
|
1336
|
+
parent
|
|
1337
|
+
.command("smcpgov-cancel-call-v2 <id> [reason]")
|
|
1338
|
+
.description("Cancel call")
|
|
1339
|
+
.action(async (id, reason) => {
|
|
1340
|
+
console.log(
|
|
1341
|
+
JSON.stringify((await L()).cancelSmcpgovCallV2(id, reason), null, 2),
|
|
1342
|
+
);
|
|
1343
|
+
});
|
|
1344
|
+
parent
|
|
1345
|
+
.command("smcpgov-get-call-v2 <id>")
|
|
1346
|
+
.description("Get call")
|
|
1347
|
+
.action(async (id) => {
|
|
1348
|
+
console.log(JSON.stringify((await L()).getSmcpgovCallV2(id), null, 2));
|
|
1349
|
+
});
|
|
1350
|
+
parent
|
|
1351
|
+
.command("smcpgov-list-calls-v2")
|
|
1352
|
+
.description("List calls")
|
|
1353
|
+
.action(async () => {
|
|
1354
|
+
console.log(JSON.stringify((await L()).listSmcpgovCallsV2(), null, 2));
|
|
1355
|
+
});
|
|
1356
|
+
parent
|
|
1357
|
+
.command("smcpgov-auto-stale-idle-v2")
|
|
1358
|
+
.description("Auto-stale idle")
|
|
1359
|
+
.action(async () => {
|
|
1360
|
+
console.log(
|
|
1361
|
+
JSON.stringify((await L()).autoStaleIdleSmcpgovProfilesV2(), null, 2),
|
|
1362
|
+
);
|
|
1363
|
+
});
|
|
1364
|
+
parent
|
|
1365
|
+
.command("smcpgov-auto-fail-stuck-v2")
|
|
1366
|
+
.description("Auto-fail stuck calls")
|
|
1367
|
+
.action(async () => {
|
|
1368
|
+
console.log(
|
|
1369
|
+
JSON.stringify((await L()).autoFailStuckSmcpgovCallsV2(), null, 2),
|
|
1370
|
+
);
|
|
1371
|
+
});
|
|
1372
|
+
parent
|
|
1373
|
+
.command("smcpgov-gov-stats-v2")
|
|
1374
|
+
.description("V2 gov stats")
|
|
1375
|
+
.action(async () => {
|
|
1376
|
+
console.log(JSON.stringify((await L()).getSkillMcpGovStatsV2(), null, 2));
|
|
1377
|
+
});
|
|
1378
|
+
}
|