chainlesschain 0.143.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/a2a.js +196 -28
- package/src/commands/activitypub.js +364 -27
- package/src/commands/agent-network.js +217 -0
- package/src/commands/agent.js +587 -103
- package/src/commands/audit.js +206 -0
- package/src/commands/automation.js +201 -0
- package/src/commands/bi.js +355 -27
- package/src/commands/bm25.js +111 -27
- package/src/commands/browse.js +403 -29
- package/src/commands/ccron.js +128 -28
- package/src/commands/chat.js +207 -0
- package/src/commands/codegen.js +207 -0
- package/src/commands/collab.js +211 -0
- package/src/commands/compliance.js +824 -34
- package/src/commands/compt.js +127 -29
- package/src/commands/consol.js +8 -2
- package/src/commands/cowork.js +783 -34
- package/src/commands/crosschain.js +182 -28
- package/src/commands/dao.js +182 -28
- 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 +385 -27
- package/src/commands/economy.js +205 -50
- package/src/commands/evolution.js +203 -50
- package/src/commands/evomap.js +387 -27
- package/src/commands/export.js +213 -0
- package/src/commands/federation.js +209 -0
- package/src/commands/fflag.js +74 -22
- package/src/commands/fusion.js +205 -0
- package/src/commands/git.js +177 -37
- package/src/commands/governance.js +209 -0
- package/src/commands/hardening.js +209 -0
- package/src/commands/hmemory.js +204 -50
- package/src/commands/hook.js +209 -0
- package/src/commands/import.js +209 -0
- package/src/commands/incentive.js +209 -0
- package/src/commands/inference.js +170 -34
- package/src/commands/infra.js +203 -0
- package/src/commands/instinct.js +209 -0
- package/src/commands/ipfs.js +207 -0
- package/src/commands/itbudget.js +149 -33
- package/src/commands/kg.js +206 -0
- package/src/commands/llm.js +217 -0
- package/src/commands/lowcode.js +195 -38
- package/src/commands/marketplace.js +206 -0
- package/src/commands/matrix.js +386 -27
- package/src/commands/mcp.js +217 -0
- package/src/commands/mcpscaf.js +145 -33
- package/src/commands/meminj.js +145 -33
- 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 +387 -27
- package/src/commands/note.js +205 -0
- package/src/commands/ops.js +219 -0
- package/src/commands/orchestrate.js +217 -0
- package/src/commands/orchgov.js +144 -33
- package/src/commands/org.js +209 -0
- package/src/commands/p2p.js +209 -0
- package/src/commands/pdfp.js +109 -27
- package/src/commands/perception.js +209 -0
- package/src/commands/perf.js +169 -32
- package/src/commands/perm.js +144 -33
- package/src/commands/permmem.js +203 -0
- package/src/commands/pipeline.js +207 -52
- package/src/commands/planmode.js +141 -32
- package/src/commands/plugin-ecosystem.js +209 -0
- package/src/commands/pqc.js +213 -0
- package/src/commands/privacy.js +203 -0
- package/src/commands/promcomp.js +111 -27
- package/src/commands/quantization.js +207 -0
- package/src/commands/rcache.js +205 -0
- package/src/commands/recommend.js +410 -34
- package/src/commands/reputation.js +208 -0
- package/src/commands/runtime.js +205 -0
- package/src/commands/sandbox.js +206 -0
- package/src/commands/scim.js +209 -0
- package/src/commands/seshhook.js +145 -33
- package/src/commands/seshsearch.js +141 -33
- package/src/commands/seshtail.js +144 -33
- package/src/commands/seshu.js +152 -33
- package/src/commands/session.js +209 -0
- package/src/commands/sganal.js +123 -29
- package/src/commands/siem.js +201 -34
- package/src/commands/skill.js +207 -0
- package/src/commands/sla.js +212 -0
- package/src/commands/slotfill.js +146 -33
- package/src/commands/social.js +358 -32
- package/src/commands/sso.js +209 -0
- package/src/commands/stress.js +206 -0
- package/src/commands/svccont.js +145 -33
- package/src/commands/sync.js +209 -0
- package/src/commands/tech.js +209 -0
- package/src/commands/tenant.js +217 -0
- package/src/commands/terraform.js +206 -0
- package/src/commands/tms.js +171 -33
- package/src/commands/tokens.js +209 -0
- package/src/commands/topiccls.js +146 -33
- package/src/commands/trust.js +217 -0
- package/src/commands/uprof.js +141 -32
- package/src/commands/vcheck.js +122 -28
- package/src/commands/wallet.js +209 -0
- package/src/commands/webfetch.js +141 -32
- package/src/commands/workflow.js +203 -0
- package/src/commands/zkp.js +184 -28
- package/src/index.js +180 -0
- package/src/lib/a2a-protocol.js +319 -51
- package/src/lib/activitypub-bridge.js +622 -50
- package/src/lib/agent-economy.js +304 -51
- package/src/lib/agent-network.js +341 -0
- package/src/lib/aiops.js +346 -0
- package/src/lib/app-builder.js +279 -46
- package/src/lib/audit-logger.js +321 -0
- package/src/lib/automation-engine.js +335 -0
- package/src/lib/autonomous-agent.js +284 -48
- package/src/lib/autonomous-developer.js +332 -0
- package/src/lib/bi-engine.js +616 -49
- package/src/lib/bm25-search.js +301 -49
- package/src/lib/browser-automation.js +630 -49
- package/src/lib/chat-core.js +336 -0
- package/src/lib/claude-code-bridge.js +341 -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/compliance-framework-reporter.js +305 -51
- package/src/lib/compliance-manager.js +330 -0
- package/src/lib/compression-telemetry.js +301 -49
- package/src/lib/content-recommendation.js +351 -0
- package/src/lib/content-recommender.js +317 -52
- package/src/lib/cowork-cron.js +298 -49
- package/src/lib/cowork-learning.js +333 -0
- package/src/lib/cowork-share.js +338 -0
- package/src/lib/cowork-task-runner.js +308 -51
- package/src/lib/cowork-workflow.js +327 -0
- package/src/lib/cross-chain.js +311 -51
- package/src/lib/dao-governance.js +280 -46
- 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 +626 -49
- package/src/lib/evolution-system.js +278 -47
- package/src/lib/evomap-governance.js +334 -0
- package/src/lib/evomap-manager.js +280 -46
- package/src/lib/execution-backend.js +294 -48
- package/src/lib/feature-flags.js +294 -49
- package/src/lib/federation-hardening.js +340 -0
- package/src/lib/git-integration.js +285 -47
- package/src/lib/hardening-manager.js +341 -0
- package/src/lib/hierarchical-memory.js +284 -48
- package/src/lib/hook-manager.js +341 -0
- package/src/lib/inference-network.js +308 -51
- package/src/lib/instinct-manager.js +346 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/iteration-budget.js +302 -50
- package/src/lib/knowledge-exporter.js +341 -0
- package/src/lib/knowledge-graph.js +333 -0
- package/src/lib/knowledge-importer.js +341 -0
- package/src/lib/llm-providers.js +346 -0
- package/src/lib/matrix-bridge.js +620 -47
- package/src/lib/mcp-registry.js +346 -0
- package/src/lib/mcp-scaffold.js +318 -54
- package/src/lib/memory-injection.js +288 -49
- 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 +622 -49
- package/src/lib/note-versioning.js +339 -0
- package/src/lib/orchestrator.js +293 -48
- package/src/lib/org-manager.js +336 -0
- package/src/lib/p2p-manager.js +341 -0
- package/src/lib/pdf-parser.js +298 -49
- package/src/lib/perception.js +346 -0
- package/src/lib/perf-tuning.js +309 -50
- package/src/lib/permanent-memory.js +327 -0
- package/src/lib/permission-engine.js +287 -49
- package/src/lib/pipeline-orchestrator.js +289 -49
- package/src/lib/plan-mode.js +298 -51
- package/src/lib/plugin-ecosystem.js +346 -0
- package/src/lib/pqc-manager.js +346 -0
- package/src/lib/privacy-computing.js +335 -0
- package/src/lib/protocol-fusion.js +338 -0
- package/src/lib/quantization.js +337 -0
- package/src/lib/reputation-optimizer.js +340 -0
- package/src/lib/response-cache.js +333 -0
- package/src/lib/sandbox-v2.js +327 -0
- package/src/lib/scim-manager.js +346 -0
- package/src/lib/service-container.js +313 -52
- package/src/lib/session-consolidator.js +296 -49
- package/src/lib/session-hooks.js +312 -53
- package/src/lib/session-manager.js +334 -0
- package/src/lib/session-search.js +304 -51
- package/src/lib/session-tail.js +288 -49
- package/src/lib/session-usage.js +298 -52
- package/src/lib/siem-exporter.js +298 -51
- package/src/lib/skill-loader.js +334 -0
- package/src/lib/skill-marketplace.js +345 -0
- package/src/lib/sla-manager.js +341 -0
- package/src/lib/slot-filler.js +303 -51
- package/src/lib/social-graph-analytics.js +295 -49
- package/src/lib/social-graph.js +272 -49
- package/src/lib/social-manager.js +330 -0
- package/src/lib/sso-manager.js +340 -0
- package/src/lib/stress-tester.js +342 -0
- package/src/lib/sub-agent-registry.js +302 -53
- package/src/lib/sync-manager.js +336 -0
- package/src/lib/task-model-selector.js +302 -50
- package/src/lib/tech-learning-engine.js +341 -0
- package/src/lib/tenant-saas.js +341 -0
- package/src/lib/terraform-manager.js +333 -0
- package/src/lib/threat-intel.js +330 -0
- package/src/lib/todo-manager.js +281 -47
- package/src/lib/token-incentive.js +341 -0
- package/src/lib/token-tracker.js +336 -0
- package/src/lib/topic-classifier.js +297 -49
- 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/user-profile.js +294 -50
- package/src/lib/version-checker.js +304 -50
- package/src/lib/wallet-manager.js +336 -0
- package/src/lib/web-fetch.js +292 -51
- package/src/lib/workflow-engine.js +330 -0
- package/src/lib/zkp-engine.js +286 -49
package/src/commands/permmem.js
CHANGED
|
@@ -249,3 +249,206 @@ export function registerPermMemCommand(program) {
|
|
|
249
249
|
.description("Auto-fail stuck V2 retention jobs")
|
|
250
250
|
.action(() => out(autoFailStuckJobsV2()));
|
|
251
251
|
}
|
|
252
|
+
|
|
253
|
+
// === Iter23 V2 governance overlay ===
|
|
254
|
+
export function registerPmgovV2Commands(program) {
|
|
255
|
+
const parent = program.commands.find((c) => c.name() === "permmem");
|
|
256
|
+
if (!parent) return;
|
|
257
|
+
const L = async () => await import("../lib/permanent-memory.js");
|
|
258
|
+
parent
|
|
259
|
+
.command("pmgov-enums-v2")
|
|
260
|
+
.description("Show V2 enums")
|
|
261
|
+
.action(async () => {
|
|
262
|
+
const m = await L();
|
|
263
|
+
console.log(
|
|
264
|
+
JSON.stringify(
|
|
265
|
+
{
|
|
266
|
+
profileMaturity: m.PMGOV_PROFILE_MATURITY_V2,
|
|
267
|
+
pinLifecycle: m.PMGOV_PIN_LIFECYCLE_V2,
|
|
268
|
+
},
|
|
269
|
+
null,
|
|
270
|
+
2,
|
|
271
|
+
),
|
|
272
|
+
);
|
|
273
|
+
});
|
|
274
|
+
parent
|
|
275
|
+
.command("pmgov-config-v2")
|
|
276
|
+
.description("Show V2 config")
|
|
277
|
+
.action(async () => {
|
|
278
|
+
const m = await L();
|
|
279
|
+
console.log(
|
|
280
|
+
JSON.stringify(
|
|
281
|
+
{
|
|
282
|
+
maxActive: m.getMaxActivePmgovProfilesPerOwnerV2(),
|
|
283
|
+
maxPending: m.getMaxPendingPmgovPinsPerProfileV2(),
|
|
284
|
+
idleMs: m.getPmgovProfileIdleMsV2(),
|
|
285
|
+
stuckMs: m.getPmgovPinStuckMsV2(),
|
|
286
|
+
},
|
|
287
|
+
null,
|
|
288
|
+
2,
|
|
289
|
+
),
|
|
290
|
+
);
|
|
291
|
+
});
|
|
292
|
+
parent
|
|
293
|
+
.command("pmgov-set-max-active-v2 <n>")
|
|
294
|
+
.description("Set max active")
|
|
295
|
+
.action(async (n) => {
|
|
296
|
+
(await L()).setMaxActivePmgovProfilesPerOwnerV2(Number(n));
|
|
297
|
+
console.log("ok");
|
|
298
|
+
});
|
|
299
|
+
parent
|
|
300
|
+
.command("pmgov-set-max-pending-v2 <n>")
|
|
301
|
+
.description("Set max pending")
|
|
302
|
+
.action(async (n) => {
|
|
303
|
+
(await L()).setMaxPendingPmgovPinsPerProfileV2(Number(n));
|
|
304
|
+
console.log("ok");
|
|
305
|
+
});
|
|
306
|
+
parent
|
|
307
|
+
.command("pmgov-set-idle-ms-v2 <n>")
|
|
308
|
+
.description("Set idle threshold ms")
|
|
309
|
+
.action(async (n) => {
|
|
310
|
+
(await L()).setPmgovProfileIdleMsV2(Number(n));
|
|
311
|
+
console.log("ok");
|
|
312
|
+
});
|
|
313
|
+
parent
|
|
314
|
+
.command("pmgov-set-stuck-ms-v2 <n>")
|
|
315
|
+
.description("Set stuck threshold ms")
|
|
316
|
+
.action(async (n) => {
|
|
317
|
+
(await L()).setPmgovPinStuckMsV2(Number(n));
|
|
318
|
+
console.log("ok");
|
|
319
|
+
});
|
|
320
|
+
parent
|
|
321
|
+
.command("pmgov-register-v2 <id> <owner>")
|
|
322
|
+
.description("Register V2 profile")
|
|
323
|
+
.option("--bucket <v>", "bucket")
|
|
324
|
+
.action(async (id, owner, o) => {
|
|
325
|
+
const m = await L();
|
|
326
|
+
console.log(
|
|
327
|
+
JSON.stringify(
|
|
328
|
+
m.registerPmgovProfileV2({ id, owner, bucket: o.bucket }),
|
|
329
|
+
null,
|
|
330
|
+
2,
|
|
331
|
+
),
|
|
332
|
+
);
|
|
333
|
+
});
|
|
334
|
+
parent
|
|
335
|
+
.command("pmgov-activate-v2 <id>")
|
|
336
|
+
.description("Activate profile")
|
|
337
|
+
.action(async (id) => {
|
|
338
|
+
console.log(
|
|
339
|
+
JSON.stringify((await L()).activatePmgovProfileV2(id), null, 2),
|
|
340
|
+
);
|
|
341
|
+
});
|
|
342
|
+
parent
|
|
343
|
+
.command("pmgov-dormant-v2 <id>")
|
|
344
|
+
.description("Dormant profile")
|
|
345
|
+
.action(async (id) => {
|
|
346
|
+
console.log(
|
|
347
|
+
JSON.stringify((await L()).dormantPmgovProfileV2(id), null, 2),
|
|
348
|
+
);
|
|
349
|
+
});
|
|
350
|
+
parent
|
|
351
|
+
.command("pmgov-archive-v2 <id>")
|
|
352
|
+
.description("Archive profile")
|
|
353
|
+
.action(async (id) => {
|
|
354
|
+
console.log(
|
|
355
|
+
JSON.stringify((await L()).archivePmgovProfileV2(id), null, 2),
|
|
356
|
+
);
|
|
357
|
+
});
|
|
358
|
+
parent
|
|
359
|
+
.command("pmgov-touch-v2 <id>")
|
|
360
|
+
.description("Touch profile")
|
|
361
|
+
.action(async (id) => {
|
|
362
|
+
console.log(JSON.stringify((await L()).touchPmgovProfileV2(id), null, 2));
|
|
363
|
+
});
|
|
364
|
+
parent
|
|
365
|
+
.command("pmgov-get-v2 <id>")
|
|
366
|
+
.description("Get profile")
|
|
367
|
+
.action(async (id) => {
|
|
368
|
+
console.log(JSON.stringify((await L()).getPmgovProfileV2(id), null, 2));
|
|
369
|
+
});
|
|
370
|
+
parent
|
|
371
|
+
.command("pmgov-list-v2")
|
|
372
|
+
.description("List profiles")
|
|
373
|
+
.action(async () => {
|
|
374
|
+
console.log(JSON.stringify((await L()).listPmgovProfilesV2(), null, 2));
|
|
375
|
+
});
|
|
376
|
+
parent
|
|
377
|
+
.command("pmgov-create-pin-v2 <id> <profileId>")
|
|
378
|
+
.description("Create pin")
|
|
379
|
+
.option("--key <v>", "key")
|
|
380
|
+
.action(async (id, profileId, o) => {
|
|
381
|
+
const m = await L();
|
|
382
|
+
console.log(
|
|
383
|
+
JSON.stringify(
|
|
384
|
+
m.createPmgovPinV2({ id, profileId, key: o.key }),
|
|
385
|
+
null,
|
|
386
|
+
2,
|
|
387
|
+
),
|
|
388
|
+
);
|
|
389
|
+
});
|
|
390
|
+
parent
|
|
391
|
+
.command("pmgov-pinning-pin-v2 <id>")
|
|
392
|
+
.description("Mark pin as pinning")
|
|
393
|
+
.action(async (id) => {
|
|
394
|
+
console.log(JSON.stringify((await L()).pinningPmgovPinV2(id), null, 2));
|
|
395
|
+
});
|
|
396
|
+
parent
|
|
397
|
+
.command("pmgov-complete-pin-v2 <id>")
|
|
398
|
+
.description("Complete pin")
|
|
399
|
+
.action(async (id) => {
|
|
400
|
+
console.log(JSON.stringify((await L()).completePinPmgovV2(id), null, 2));
|
|
401
|
+
});
|
|
402
|
+
parent
|
|
403
|
+
.command("pmgov-fail-pin-v2 <id> [reason]")
|
|
404
|
+
.description("Fail pin")
|
|
405
|
+
.action(async (id, reason) => {
|
|
406
|
+
console.log(
|
|
407
|
+
JSON.stringify((await L()).failPmgovPinV2(id, reason), null, 2),
|
|
408
|
+
);
|
|
409
|
+
});
|
|
410
|
+
parent
|
|
411
|
+
.command("pmgov-cancel-pin-v2 <id> [reason]")
|
|
412
|
+
.description("Cancel pin")
|
|
413
|
+
.action(async (id, reason) => {
|
|
414
|
+
console.log(
|
|
415
|
+
JSON.stringify((await L()).cancelPmgovPinV2(id, reason), null, 2),
|
|
416
|
+
);
|
|
417
|
+
});
|
|
418
|
+
parent
|
|
419
|
+
.command("pmgov-get-pin-v2 <id>")
|
|
420
|
+
.description("Get pin")
|
|
421
|
+
.action(async (id) => {
|
|
422
|
+
console.log(JSON.stringify((await L()).getPmgovPinV2(id), null, 2));
|
|
423
|
+
});
|
|
424
|
+
parent
|
|
425
|
+
.command("pmgov-list-pins-v2")
|
|
426
|
+
.description("List pins")
|
|
427
|
+
.action(async () => {
|
|
428
|
+
console.log(JSON.stringify((await L()).listPmgovPinsV2(), null, 2));
|
|
429
|
+
});
|
|
430
|
+
parent
|
|
431
|
+
.command("pmgov-auto-dormant-idle-v2")
|
|
432
|
+
.description("Auto-dormant idle")
|
|
433
|
+
.action(async () => {
|
|
434
|
+
console.log(
|
|
435
|
+
JSON.stringify((await L()).autoDormantIdlePmgovProfilesV2(), null, 2),
|
|
436
|
+
);
|
|
437
|
+
});
|
|
438
|
+
parent
|
|
439
|
+
.command("pmgov-auto-fail-stuck-v2")
|
|
440
|
+
.description("Auto-fail stuck pins")
|
|
441
|
+
.action(async () => {
|
|
442
|
+
console.log(
|
|
443
|
+
JSON.stringify((await L()).autoFailStuckPmgovPinsV2(), null, 2),
|
|
444
|
+
);
|
|
445
|
+
});
|
|
446
|
+
parent
|
|
447
|
+
.command("pmgov-gov-stats-v2")
|
|
448
|
+
.description("V2 gov stats")
|
|
449
|
+
.action(async () => {
|
|
450
|
+
console.log(
|
|
451
|
+
JSON.stringify((await L()).getPermanentMemoryGovStatsV2(), null, 2),
|
|
452
|
+
);
|
|
453
|
+
});
|
|
454
|
+
}
|
package/src/commands/pipeline.js
CHANGED
|
@@ -445,61 +445,216 @@ export function registerPipelineCommand(program) {
|
|
|
445
445
|
_json(getStats(db));
|
|
446
446
|
});
|
|
447
447
|
|
|
448
|
-
|
|
449
448
|
_registerPipelineV2Commands(pipeline);
|
|
450
|
-
program.addCommand(pipeline);
|
|
449
|
+
program.addCommand(pipeline);
|
|
451
450
|
}
|
|
452
451
|
function _registerPipelineV2Commands(parent) {
|
|
453
452
|
const L = async () => await import("../lib/pipeline-orchestrator.js");
|
|
454
453
|
|
|
455
|
-
parent
|
|
456
|
-
.
|
|
457
|
-
|
|
458
|
-
.action(async () => {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
.
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
.
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
parent
|
|
499
|
-
.
|
|
500
|
-
|
|
501
|
-
.action(async () => {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
454
|
+
parent
|
|
455
|
+
.command("enums-v2")
|
|
456
|
+
.description("Show V2 enums (pipeline maturity + run lifecycle)")
|
|
457
|
+
.action(async () => {
|
|
458
|
+
const m = await L();
|
|
459
|
+
console.log(
|
|
460
|
+
JSON.stringify(
|
|
461
|
+
{
|
|
462
|
+
pipelineMaturity: m.PIPELINE_MATURITY_V2,
|
|
463
|
+
runLifecycle: m.PIPELINE_RUN_LIFECYCLE_V2,
|
|
464
|
+
},
|
|
465
|
+
null,
|
|
466
|
+
2,
|
|
467
|
+
),
|
|
468
|
+
);
|
|
469
|
+
});
|
|
470
|
+
parent
|
|
471
|
+
.command("config-v2")
|
|
472
|
+
.description("Show V2 config thresholds")
|
|
473
|
+
.action(async () => {
|
|
474
|
+
const m = await L();
|
|
475
|
+
console.log(
|
|
476
|
+
JSON.stringify(
|
|
477
|
+
{
|
|
478
|
+
maxActivePipelinesPerOwner: m.getMaxActivePipelinesPerOwnerV2(),
|
|
479
|
+
maxPendingPipelineRunsPerPipeline:
|
|
480
|
+
m.getMaxPendingPipelineRunsPerPipelineV2(),
|
|
481
|
+
pipelineIdleMs: m.getPipelineIdleMsV2(),
|
|
482
|
+
pipelineRunStuckMs: m.getPipelineRunStuckMsV2(),
|
|
483
|
+
},
|
|
484
|
+
null,
|
|
485
|
+
2,
|
|
486
|
+
),
|
|
487
|
+
);
|
|
488
|
+
});
|
|
489
|
+
parent
|
|
490
|
+
.command("set-max-active-pipelines-v2 <n>")
|
|
491
|
+
.description("Set max active pipelines per owner")
|
|
492
|
+
.action(async (n) => {
|
|
493
|
+
const m = await L();
|
|
494
|
+
m.setMaxActivePipelinesPerOwnerV2(Number(n));
|
|
495
|
+
console.log("ok");
|
|
496
|
+
});
|
|
497
|
+
parent
|
|
498
|
+
.command("set-max-pending-runs-v2 <n>")
|
|
499
|
+
.description("Set max pending runs per pipeline")
|
|
500
|
+
.action(async (n) => {
|
|
501
|
+
const m = await L();
|
|
502
|
+
m.setMaxPendingPipelineRunsPerPipelineV2(Number(n));
|
|
503
|
+
console.log("ok");
|
|
504
|
+
});
|
|
505
|
+
parent
|
|
506
|
+
.command("set-pipeline-idle-ms-v2 <n>")
|
|
507
|
+
.description("Set pipeline idle threshold (ms)")
|
|
508
|
+
.action(async (n) => {
|
|
509
|
+
const m = await L();
|
|
510
|
+
m.setPipelineIdleMsV2(Number(n));
|
|
511
|
+
console.log("ok");
|
|
512
|
+
});
|
|
513
|
+
parent
|
|
514
|
+
.command("set-run-stuck-ms-v2 <n>")
|
|
515
|
+
.description("Set run stuck threshold (ms)")
|
|
516
|
+
.action(async (n) => {
|
|
517
|
+
const m = await L();
|
|
518
|
+
m.setPipelineRunStuckMsV2(Number(n));
|
|
519
|
+
console.log("ok");
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
parent
|
|
523
|
+
.command("register-pipeline-v2 <id> <owner>")
|
|
524
|
+
.description("Register V2 pipeline")
|
|
525
|
+
.option("--name <n>", "Pipeline name")
|
|
526
|
+
.action(async (id, owner, o) => {
|
|
527
|
+
const m = await L();
|
|
528
|
+
console.log(
|
|
529
|
+
JSON.stringify(
|
|
530
|
+
m.registerPipelineV2({ id, owner, name: o.name }),
|
|
531
|
+
null,
|
|
532
|
+
2,
|
|
533
|
+
),
|
|
534
|
+
);
|
|
535
|
+
});
|
|
536
|
+
parent
|
|
537
|
+
.command("activate-pipeline-v2 <id>")
|
|
538
|
+
.description("Activate pipeline")
|
|
539
|
+
.action(async (id) => {
|
|
540
|
+
const m = await L();
|
|
541
|
+
console.log(JSON.stringify(m.activatePipelineV2(id), null, 2));
|
|
542
|
+
});
|
|
543
|
+
parent
|
|
544
|
+
.command("pause-pipeline-v2 <id>")
|
|
545
|
+
.description("Pause pipeline")
|
|
546
|
+
.action(async (id) => {
|
|
547
|
+
const m = await L();
|
|
548
|
+
console.log(JSON.stringify(m.pausePipelineV2(id), null, 2));
|
|
549
|
+
});
|
|
550
|
+
parent
|
|
551
|
+
.command("archive-pipeline-v2 <id>")
|
|
552
|
+
.description("Archive pipeline (terminal)")
|
|
553
|
+
.action(async (id) => {
|
|
554
|
+
const m = await L();
|
|
555
|
+
console.log(JSON.stringify(m.archivePipelineV2(id), null, 2));
|
|
556
|
+
});
|
|
557
|
+
parent
|
|
558
|
+
.command("touch-pipeline-v2 <id>")
|
|
559
|
+
.description("Touch pipeline lastTouchedAt")
|
|
560
|
+
.action(async (id) => {
|
|
561
|
+
const m = await L();
|
|
562
|
+
console.log(JSON.stringify(m.touchPipelineV2(id), null, 2));
|
|
563
|
+
});
|
|
564
|
+
parent
|
|
565
|
+
.command("get-pipeline-v2 <id>")
|
|
566
|
+
.description("Get V2 pipeline")
|
|
567
|
+
.action(async (id) => {
|
|
568
|
+
const m = await L();
|
|
569
|
+
console.log(JSON.stringify(m.getPipelineV2(id), null, 2));
|
|
570
|
+
});
|
|
571
|
+
parent
|
|
572
|
+
.command("list-pipelines-v2")
|
|
573
|
+
.description("List all V2 pipelines")
|
|
574
|
+
.action(async () => {
|
|
575
|
+
const m = await L();
|
|
576
|
+
console.log(JSON.stringify(m.listPipelinesV2(), null, 2));
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
parent
|
|
580
|
+
.command("create-run-v2 <id> <pipelineId>")
|
|
581
|
+
.description("Create V2 pipeline run (queued)")
|
|
582
|
+
.option("--trigger <t>", "Trigger", "manual")
|
|
583
|
+
.action(async (id, pipelineId, o) => {
|
|
584
|
+
const m = await L();
|
|
585
|
+
console.log(
|
|
586
|
+
JSON.stringify(
|
|
587
|
+
m.createPipelineRunV2({ id, pipelineId, trigger: o.trigger }),
|
|
588
|
+
null,
|
|
589
|
+
2,
|
|
590
|
+
),
|
|
591
|
+
);
|
|
592
|
+
});
|
|
593
|
+
parent
|
|
594
|
+
.command("start-run-v2 <id>")
|
|
595
|
+
.description("Start run (queued→running)")
|
|
596
|
+
.action(async (id) => {
|
|
597
|
+
const m = await L();
|
|
598
|
+
console.log(JSON.stringify(m.startPipelineRunV2(id), null, 2));
|
|
599
|
+
});
|
|
600
|
+
parent
|
|
601
|
+
.command("complete-run-v2 <id>")
|
|
602
|
+
.description("Complete run (running→completed)")
|
|
603
|
+
.action(async (id) => {
|
|
604
|
+
const m = await L();
|
|
605
|
+
console.log(JSON.stringify(m.completePipelineRunV2(id), null, 2));
|
|
606
|
+
});
|
|
607
|
+
parent
|
|
608
|
+
.command("fail-run-v2 <id> [reason]")
|
|
609
|
+
.description("Fail run")
|
|
610
|
+
.action(async (id, reason) => {
|
|
611
|
+
const m = await L();
|
|
612
|
+
console.log(JSON.stringify(m.failPipelineRunV2(id, reason), null, 2));
|
|
613
|
+
});
|
|
614
|
+
parent
|
|
615
|
+
.command("cancel-run-v2 <id> [reason]")
|
|
616
|
+
.description("Cancel run")
|
|
617
|
+
.action(async (id, reason) => {
|
|
618
|
+
const m = await L();
|
|
619
|
+
console.log(JSON.stringify(m.cancelPipelineRunV2(id, reason), null, 2));
|
|
620
|
+
});
|
|
621
|
+
parent
|
|
622
|
+
.command("get-run-v2 <id>")
|
|
623
|
+
.description("Get V2 run")
|
|
624
|
+
.action(async (id) => {
|
|
625
|
+
const m = await L();
|
|
626
|
+
console.log(JSON.stringify(m.getPipelineRunV2(id), null, 2));
|
|
627
|
+
});
|
|
628
|
+
parent
|
|
629
|
+
.command("list-runs-v2")
|
|
630
|
+
.description("List all V2 runs")
|
|
631
|
+
.action(async () => {
|
|
632
|
+
const m = await L();
|
|
633
|
+
console.log(JSON.stringify(m.listPipelineRunsV2(), null, 2));
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
parent
|
|
637
|
+
.command("auto-pause-idle-v2")
|
|
638
|
+
.description("Auto-pause idle active pipelines")
|
|
639
|
+
.action(async () => {
|
|
640
|
+
const m = await L();
|
|
641
|
+
console.log(JSON.stringify(m.autoPauseIdlePipelinesV2(), null, 2));
|
|
642
|
+
});
|
|
643
|
+
parent
|
|
644
|
+
.command("auto-fail-stuck-v2")
|
|
645
|
+
.description("Auto-fail stuck running runs")
|
|
646
|
+
.action(async () => {
|
|
647
|
+
const m = await L();
|
|
648
|
+
console.log(JSON.stringify(m.autoFailStuckPipelineRunsV2(), null, 2));
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
parent
|
|
652
|
+
.command("gov-stats-v2")
|
|
653
|
+
.description("V2 governance aggregate stats")
|
|
654
|
+
.action(async () => {
|
|
655
|
+
const m = await L();
|
|
656
|
+
console.log(
|
|
657
|
+
JSON.stringify(m.getPipelineOrchestratorGovStatsV2(), null, 2),
|
|
658
|
+
);
|
|
659
|
+
});
|
|
505
660
|
}
|
package/src/commands/planmode.js
CHANGED
|
@@ -6,40 +6,149 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
PLAN_PROFILE_MATURITY_V2,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
PLAN_PROFILE_MATURITY_V2,
|
|
10
|
+
PLAN_STEP_LIFECYCLE_V2,
|
|
11
|
+
setMaxActivePlanProfilesPerOwnerV2,
|
|
12
|
+
getMaxActivePlanProfilesPerOwnerV2,
|
|
13
|
+
setMaxPendingPlanStepsPerProfileV2,
|
|
14
|
+
getMaxPendingPlanStepsPerProfileV2,
|
|
15
|
+
setPlanProfileIdleMsV2,
|
|
16
|
+
getPlanProfileIdleMsV2,
|
|
17
|
+
setPlanStepStuckMsV2,
|
|
18
|
+
getPlanStepStuckMsV2,
|
|
19
|
+
registerPlanProfileV2,
|
|
20
|
+
activatePlanProfileV2,
|
|
21
|
+
pausePlanProfileV2,
|
|
22
|
+
archivePlanProfileV2,
|
|
23
|
+
touchPlanProfileV2,
|
|
24
|
+
getPlanProfileV2,
|
|
25
|
+
listPlanProfilesV2,
|
|
26
|
+
createPlanStepV2,
|
|
27
|
+
startPlanStepV2,
|
|
28
|
+
completePlanStepV2,
|
|
29
|
+
failPlanStepV2,
|
|
30
|
+
cancelPlanStepV2,
|
|
31
|
+
getPlanStepV2,
|
|
32
|
+
listPlanStepsV2,
|
|
33
|
+
autoPauseIdlePlanProfilesV2,
|
|
34
|
+
autoFailStuckPlanStepsV2,
|
|
35
|
+
getPlanModeGovStatsV2,
|
|
36
|
+
_resetStatePlanModeV2,
|
|
17
37
|
} from "../lib/plan-mode.js";
|
|
18
38
|
|
|
19
39
|
export function registerPlanModeCommand(program) {
|
|
20
40
|
const pm = program.command("planmode").description("Plan Mode V2 governance");
|
|
21
|
-
pm.command("enums-v2").action(() =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
pm.command("
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
pm.command("enums-v2").action(() =>
|
|
42
|
+
console.log(
|
|
43
|
+
JSON.stringify(
|
|
44
|
+
{
|
|
45
|
+
profileMaturity: PLAN_PROFILE_MATURITY_V2,
|
|
46
|
+
stepLifecycle: PLAN_STEP_LIFECYCLE_V2,
|
|
47
|
+
},
|
|
48
|
+
null,
|
|
49
|
+
2,
|
|
50
|
+
),
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
pm.command("config-v2").action(() =>
|
|
54
|
+
console.log(
|
|
55
|
+
JSON.stringify(
|
|
56
|
+
{
|
|
57
|
+
maxActivePlanProfilesPerOwner: getMaxActivePlanProfilesPerOwnerV2(),
|
|
58
|
+
maxPendingPlanStepsPerProfile: getMaxPendingPlanStepsPerProfileV2(),
|
|
59
|
+
planProfileIdleMs: getPlanProfileIdleMsV2(),
|
|
60
|
+
planStepStuckMs: getPlanStepStuckMsV2(),
|
|
61
|
+
},
|
|
62
|
+
null,
|
|
63
|
+
2,
|
|
64
|
+
),
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
pm.command("set-max-active-v2 <n>").action((n) => {
|
|
68
|
+
setMaxActivePlanProfilesPerOwnerV2(Number(n));
|
|
69
|
+
console.log("ok");
|
|
70
|
+
});
|
|
71
|
+
pm.command("set-max-pending-v2 <n>").action((n) => {
|
|
72
|
+
setMaxPendingPlanStepsPerProfileV2(Number(n));
|
|
73
|
+
console.log("ok");
|
|
74
|
+
});
|
|
75
|
+
pm.command("set-idle-ms-v2 <n>").action((n) => {
|
|
76
|
+
setPlanProfileIdleMsV2(Number(n));
|
|
77
|
+
console.log("ok");
|
|
78
|
+
});
|
|
79
|
+
pm.command("set-stuck-ms-v2 <n>").action((n) => {
|
|
80
|
+
setPlanStepStuckMsV2(Number(n));
|
|
81
|
+
console.log("ok");
|
|
82
|
+
});
|
|
83
|
+
pm.command("register-profile-v2 <id> <owner>")
|
|
84
|
+
.option("--goal <g>", "goal")
|
|
85
|
+
.action((id, owner, o) =>
|
|
86
|
+
console.log(
|
|
87
|
+
JSON.stringify(
|
|
88
|
+
registerPlanProfileV2({ id, owner, goal: o.goal }),
|
|
89
|
+
null,
|
|
90
|
+
2,
|
|
91
|
+
),
|
|
92
|
+
),
|
|
93
|
+
);
|
|
94
|
+
pm.command("activate-profile-v2 <id>").action((id) =>
|
|
95
|
+
console.log(JSON.stringify(activatePlanProfileV2(id), null, 2)),
|
|
96
|
+
);
|
|
97
|
+
pm.command("pause-profile-v2 <id>").action((id) =>
|
|
98
|
+
console.log(JSON.stringify(pausePlanProfileV2(id), null, 2)),
|
|
99
|
+
);
|
|
100
|
+
pm.command("archive-profile-v2 <id>").action((id) =>
|
|
101
|
+
console.log(JSON.stringify(archivePlanProfileV2(id), null, 2)),
|
|
102
|
+
);
|
|
103
|
+
pm.command("touch-profile-v2 <id>").action((id) =>
|
|
104
|
+
console.log(JSON.stringify(touchPlanProfileV2(id), null, 2)),
|
|
105
|
+
);
|
|
106
|
+
pm.command("get-profile-v2 <id>").action((id) =>
|
|
107
|
+
console.log(JSON.stringify(getPlanProfileV2(id), null, 2)),
|
|
108
|
+
);
|
|
109
|
+
pm.command("list-profiles-v2").action(() =>
|
|
110
|
+
console.log(JSON.stringify(listPlanProfilesV2(), null, 2)),
|
|
111
|
+
);
|
|
112
|
+
pm.command("create-step-v2 <id> <profileId>")
|
|
113
|
+
.option("--action <a>", "action")
|
|
114
|
+
.action((id, profileId, o) =>
|
|
115
|
+
console.log(
|
|
116
|
+
JSON.stringify(
|
|
117
|
+
createPlanStepV2({ id, profileId, action: o.action }),
|
|
118
|
+
null,
|
|
119
|
+
2,
|
|
120
|
+
),
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
pm.command("start-step-v2 <id>").action((id) =>
|
|
124
|
+
console.log(JSON.stringify(startPlanStepV2(id), null, 2)),
|
|
125
|
+
);
|
|
126
|
+
pm.command("complete-step-v2 <id>").action((id) =>
|
|
127
|
+
console.log(JSON.stringify(completePlanStepV2(id), null, 2)),
|
|
128
|
+
);
|
|
129
|
+
pm.command("fail-step-v2 <id> [reason]").action((id, reason) =>
|
|
130
|
+
console.log(JSON.stringify(failPlanStepV2(id, reason), null, 2)),
|
|
131
|
+
);
|
|
132
|
+
pm.command("cancel-step-v2 <id> [reason]").action((id, reason) =>
|
|
133
|
+
console.log(JSON.stringify(cancelPlanStepV2(id, reason), null, 2)),
|
|
134
|
+
);
|
|
135
|
+
pm.command("get-step-v2 <id>").action((id) =>
|
|
136
|
+
console.log(JSON.stringify(getPlanStepV2(id), null, 2)),
|
|
137
|
+
);
|
|
138
|
+
pm.command("list-steps-v2").action(() =>
|
|
139
|
+
console.log(JSON.stringify(listPlanStepsV2(), null, 2)),
|
|
140
|
+
);
|
|
141
|
+
pm.command("auto-pause-idle-v2").action(() =>
|
|
142
|
+
console.log(JSON.stringify(autoPauseIdlePlanProfilesV2(), null, 2)),
|
|
143
|
+
);
|
|
144
|
+
pm.command("auto-fail-stuck-v2").action(() =>
|
|
145
|
+
console.log(JSON.stringify(autoFailStuckPlanStepsV2(), null, 2)),
|
|
146
|
+
);
|
|
147
|
+
pm.command("gov-stats-v2").action(() =>
|
|
148
|
+
console.log(JSON.stringify(getPlanModeGovStatsV2(), null, 2)),
|
|
149
|
+
);
|
|
150
|
+
pm.command("reset-state-v2").action(() => {
|
|
151
|
+
_resetStatePlanModeV2();
|
|
152
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
153
|
+
});
|
|
45
154
|
}
|