chainlesschain 0.143.0 → 0.145.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 +157 -27
- package/src/commands/agent.js +587 -103
- package/src/commands/audit.js +206 -0
- package/src/commands/bi.js +152 -27
- package/src/commands/bm25.js +111 -27
- package/src/commands/browse.js +190 -29
- package/src/commands/ccron.js +128 -28
- package/src/commands/chat.js +207 -0
- package/src/commands/compliance.js +414 -34
- package/src/commands/compt.js +127 -29
- package/src/commands/consol.js +8 -2
- package/src/commands/cowork.js +580 -34
- package/src/commands/crosschain.js +182 -28
- package/src/commands/dao.js +182 -28
- package/src/commands/dlp.js +172 -27
- package/src/commands/economy.js +205 -50
- package/src/commands/evolution.js +203 -50
- package/src/commands/evomap.js +182 -27
- package/src/commands/fflag.js +74 -22
- package/src/commands/git.js +177 -37
- package/src/commands/hardening.js +209 -0
- package/src/commands/hmemory.js +204 -50
- package/src/commands/incentive.js +209 -0
- package/src/commands/inference.js +170 -34
- package/src/commands/itbudget.js +149 -33
- package/src/commands/kg.js +206 -0
- package/src/commands/lowcode.js +195 -38
- package/src/commands/marketplace.js +206 -0
- package/src/commands/matrix.js +179 -27
- package/src/commands/mcpscaf.js +145 -33
- package/src/commands/meminj.js +145 -33
- package/src/commands/nostr.js +178 -27
- package/src/commands/orchestrate.js +217 -0
- package/src/commands/orchgov.js +144 -33
- package/src/commands/pdfp.js +109 -27
- package/src/commands/perf.js +169 -32
- package/src/commands/perm.js +144 -33
- package/src/commands/pipeline.js +207 -52
- package/src/commands/planmode.js +141 -32
- package/src/commands/privacy.js +203 -0
- package/src/commands/promcomp.js +111 -27
- package/src/commands/recommend.js +177 -34
- package/src/commands/reputation.js +208 -0
- package/src/commands/sandbox.js +206 -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/sganal.js +123 -29
- package/src/commands/siem.js +201 -34
- package/src/commands/sla.js +212 -0
- package/src/commands/slotfill.js +146 -33
- package/src/commands/social.js +157 -32
- package/src/commands/stress.js +206 -0
- package/src/commands/svccont.js +145 -33
- package/src/commands/terraform.js +206 -0
- package/src/commands/tms.js +171 -33
- package/src/commands/topiccls.js +146 -33
- package/src/commands/uprof.js +141 -32
- package/src/commands/vcheck.js +122 -28
- package/src/commands/webfetch.js +141 -32
- package/src/commands/zkp.js +184 -28
- package/src/index.js +40 -0
- package/src/lib/a2a-protocol.js +319 -51
- package/src/lib/activitypub-bridge.js +288 -50
- package/src/lib/agent-economy.js +304 -51
- package/src/lib/app-builder.js +279 -46
- package/src/lib/audit-logger.js +321 -0
- package/src/lib/autonomous-agent.js +284 -48
- package/src/lib/bi-engine.js +283 -49
- package/src/lib/bm25-search.js +301 -49
- package/src/lib/browser-automation.js +296 -49
- package/src/lib/chat-core.js +336 -0
- package/src/lib/claude-code-bridge.js +341 -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-recommender.js +317 -52
- package/src/lib/cowork-cron.js +298 -49
- package/src/lib/cowork-learning.js +333 -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/dlp-engine.js +287 -49
- package/src/lib/evolution-system.js +278 -47
- 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/git-integration.js +285 -47
- package/src/lib/hardening-manager.js +341 -0
- package/src/lib/hierarchical-memory.js +284 -48
- package/src/lib/inference-network.js +308 -51
- package/src/lib/iteration-budget.js +302 -50
- package/src/lib/knowledge-graph.js +333 -0
- package/src/lib/matrix-bridge.js +281 -47
- package/src/lib/mcp-scaffold.js +318 -54
- package/src/lib/memory-injection.js +288 -49
- package/src/lib/nostr-bridge.js +286 -49
- package/src/lib/orchestrator.js +293 -48
- package/src/lib/pdf-parser.js +298 -49
- package/src/lib/perf-tuning.js +309 -50
- 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/privacy-computing.js +335 -0
- package/src/lib/reputation-optimizer.js +340 -0
- package/src/lib/sandbox-v2.js +327 -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-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-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/stress-tester.js +342 -0
- package/src/lib/sub-agent-registry.js +302 -53
- package/src/lib/task-model-selector.js +302 -50
- package/src/lib/terraform-manager.js +333 -0
- package/src/lib/todo-manager.js +281 -47
- package/src/lib/token-incentive.js +341 -0
- package/src/lib/topic-classifier.js +297 -49
- package/src/lib/user-profile.js +294 -50
- package/src/lib/version-checker.js +304 -50
- package/src/lib/web-fetch.js +292 -51
- package/src/lib/zkp-engine.js +286 -49
package/src/commands/siem.js
CHANGED
|
@@ -405,38 +405,205 @@ export function registerSiemCommand(program) {
|
|
|
405
405
|
|
|
406
406
|
function _registerSiemExporterV2Commands(parent) {
|
|
407
407
|
const L = async () => await import("../lib/siem-exporter.js");
|
|
408
|
-
parent
|
|
409
|
-
.
|
|
410
|
-
|
|
411
|
-
.action(async () => {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
parent
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
408
|
+
parent
|
|
409
|
+
.command("enums-v2")
|
|
410
|
+
.description("Show V2 enums (target maturity + export lifecycle)")
|
|
411
|
+
.action(async () => {
|
|
412
|
+
const m = await L();
|
|
413
|
+
console.log(
|
|
414
|
+
JSON.stringify(
|
|
415
|
+
{
|
|
416
|
+
targetMaturity: m.SIEM_TARGET_MATURITY_V2,
|
|
417
|
+
exportLifecycle: m.SIEM_EXPORT_LIFECYCLE_V2,
|
|
418
|
+
},
|
|
419
|
+
null,
|
|
420
|
+
2,
|
|
421
|
+
),
|
|
422
|
+
);
|
|
423
|
+
});
|
|
424
|
+
parent
|
|
425
|
+
.command("config-v2")
|
|
426
|
+
.description("Show V2 config thresholds")
|
|
427
|
+
.action(async () => {
|
|
428
|
+
const m = await L();
|
|
429
|
+
console.log(
|
|
430
|
+
JSON.stringify(
|
|
431
|
+
{
|
|
432
|
+
maxActiveSiemTargetsPerOperator:
|
|
433
|
+
m.getMaxActiveSiemTargetsPerOperatorV2(),
|
|
434
|
+
maxPendingSiemExportsPerTarget:
|
|
435
|
+
m.getMaxPendingSiemExportsPerTargetV2(),
|
|
436
|
+
siemTargetIdleMs: m.getSiemTargetIdleMsV2(),
|
|
437
|
+
siemExportStuckMs: m.getSiemExportStuckMsV2(),
|
|
438
|
+
},
|
|
439
|
+
null,
|
|
440
|
+
2,
|
|
441
|
+
),
|
|
442
|
+
);
|
|
443
|
+
});
|
|
444
|
+
parent
|
|
445
|
+
.command("set-max-active-targets-v2 <n>")
|
|
446
|
+
.description("Set max active targets per operator")
|
|
447
|
+
.action(async (n) => {
|
|
448
|
+
const m = await L();
|
|
449
|
+
m.setMaxActiveSiemTargetsPerOperatorV2(Number(n));
|
|
450
|
+
console.log("ok");
|
|
451
|
+
});
|
|
452
|
+
parent
|
|
453
|
+
.command("set-max-pending-exports-v2 <n>")
|
|
454
|
+
.description("Set max pending exports per target")
|
|
455
|
+
.action(async (n) => {
|
|
456
|
+
const m = await L();
|
|
457
|
+
m.setMaxPendingSiemExportsPerTargetV2(Number(n));
|
|
458
|
+
console.log("ok");
|
|
459
|
+
});
|
|
460
|
+
parent
|
|
461
|
+
.command("set-target-idle-ms-v2 <n>")
|
|
462
|
+
.description("Set target idle threshold (ms)")
|
|
463
|
+
.action(async (n) => {
|
|
464
|
+
const m = await L();
|
|
465
|
+
m.setSiemTargetIdleMsV2(Number(n));
|
|
466
|
+
console.log("ok");
|
|
467
|
+
});
|
|
468
|
+
parent
|
|
469
|
+
.command("set-export-stuck-ms-v2 <n>")
|
|
470
|
+
.description("Set export stuck threshold (ms)")
|
|
471
|
+
.action(async (n) => {
|
|
472
|
+
const m = await L();
|
|
473
|
+
m.setSiemExportStuckMsV2(Number(n));
|
|
474
|
+
console.log("ok");
|
|
475
|
+
});
|
|
476
|
+
parent
|
|
477
|
+
.command("register-target-v2 <id> <operator>")
|
|
478
|
+
.description("Register V2 SIEM target")
|
|
479
|
+
.option("--kind <k>", "Target kind")
|
|
480
|
+
.action(async (id, operator, o) => {
|
|
481
|
+
const m = await L();
|
|
482
|
+
console.log(
|
|
483
|
+
JSON.stringify(
|
|
484
|
+
m.registerSiemTargetV2({ id, operator, kind: o.kind }),
|
|
485
|
+
null,
|
|
486
|
+
2,
|
|
487
|
+
),
|
|
488
|
+
);
|
|
489
|
+
});
|
|
490
|
+
parent
|
|
491
|
+
.command("activate-target-v2 <id>")
|
|
492
|
+
.description("Activate target")
|
|
493
|
+
.action(async (id) => {
|
|
494
|
+
const m = await L();
|
|
495
|
+
console.log(JSON.stringify(m.activateSiemTargetV2(id), null, 2));
|
|
496
|
+
});
|
|
497
|
+
parent
|
|
498
|
+
.command("degrade-target-v2 <id>")
|
|
499
|
+
.description("Degrade target")
|
|
500
|
+
.action(async (id) => {
|
|
501
|
+
const m = await L();
|
|
502
|
+
console.log(JSON.stringify(m.degradeSiemTargetV2(id), null, 2));
|
|
503
|
+
});
|
|
504
|
+
parent
|
|
505
|
+
.command("retire-target-v2 <id>")
|
|
506
|
+
.description("Retire target (terminal)")
|
|
507
|
+
.action(async (id) => {
|
|
508
|
+
const m = await L();
|
|
509
|
+
console.log(JSON.stringify(m.retireSiemTargetV2(id), null, 2));
|
|
510
|
+
});
|
|
511
|
+
parent
|
|
512
|
+
.command("touch-target-v2 <id>")
|
|
513
|
+
.description("Touch target lastTouchedAt")
|
|
514
|
+
.action(async (id) => {
|
|
515
|
+
const m = await L();
|
|
516
|
+
console.log(JSON.stringify(m.touchSiemTargetV2(id), null, 2));
|
|
517
|
+
});
|
|
518
|
+
parent
|
|
519
|
+
.command("get-target-v2 <id>")
|
|
520
|
+
.description("Get V2 target")
|
|
521
|
+
.action(async (id) => {
|
|
522
|
+
const m = await L();
|
|
523
|
+
console.log(JSON.stringify(m.getSiemTargetV2(id), null, 2));
|
|
524
|
+
});
|
|
525
|
+
parent
|
|
526
|
+
.command("list-targets-v2")
|
|
527
|
+
.description("List V2 targets")
|
|
528
|
+
.action(async () => {
|
|
529
|
+
const m = await L();
|
|
530
|
+
console.log(JSON.stringify(m.listSiemTargetsV2(), null, 2));
|
|
531
|
+
});
|
|
532
|
+
parent
|
|
533
|
+
.command("create-export-v2 <id> <targetId>")
|
|
534
|
+
.description("Create V2 export (queued)")
|
|
535
|
+
.option("--format <f>", "Format", "json")
|
|
536
|
+
.action(async (id, targetId, o) => {
|
|
537
|
+
const m = await L();
|
|
538
|
+
console.log(
|
|
539
|
+
JSON.stringify(
|
|
540
|
+
m.createSiemExportV2({ id, targetId, format: o.format }),
|
|
541
|
+
null,
|
|
542
|
+
2,
|
|
543
|
+
),
|
|
544
|
+
);
|
|
545
|
+
});
|
|
546
|
+
parent
|
|
547
|
+
.command("start-export-v2 <id>")
|
|
548
|
+
.description("Start export")
|
|
549
|
+
.action(async (id) => {
|
|
550
|
+
const m = await L();
|
|
551
|
+
console.log(JSON.stringify(m.startSiemExportV2(id), null, 2));
|
|
552
|
+
});
|
|
553
|
+
parent
|
|
554
|
+
.command("deliver-export-v2 <id>")
|
|
555
|
+
.description("Deliver export")
|
|
556
|
+
.action(async (id) => {
|
|
557
|
+
const m = await L();
|
|
558
|
+
console.log(JSON.stringify(m.deliverSiemExportV2(id), null, 2));
|
|
559
|
+
});
|
|
560
|
+
parent
|
|
561
|
+
.command("fail-export-v2 <id> [reason]")
|
|
562
|
+
.description("Fail export")
|
|
563
|
+
.action(async (id, reason) => {
|
|
564
|
+
const m = await L();
|
|
565
|
+
console.log(JSON.stringify(m.failSiemExportV2(id, reason), null, 2));
|
|
566
|
+
});
|
|
567
|
+
parent
|
|
568
|
+
.command("cancel-export-v2 <id> [reason]")
|
|
569
|
+
.description("Cancel export")
|
|
570
|
+
.action(async (id, reason) => {
|
|
571
|
+
const m = await L();
|
|
572
|
+
console.log(JSON.stringify(m.cancelSiemExportV2(id, reason), null, 2));
|
|
573
|
+
});
|
|
574
|
+
parent
|
|
575
|
+
.command("get-export-v2 <id>")
|
|
576
|
+
.description("Get V2 export")
|
|
577
|
+
.action(async (id) => {
|
|
578
|
+
const m = await L();
|
|
579
|
+
console.log(JSON.stringify(m.getSiemExportV2(id), null, 2));
|
|
580
|
+
});
|
|
581
|
+
parent
|
|
582
|
+
.command("list-exports-v2")
|
|
583
|
+
.description("List V2 exports")
|
|
584
|
+
.action(async () => {
|
|
585
|
+
const m = await L();
|
|
586
|
+
console.log(JSON.stringify(m.listSiemExportsV2(), null, 2));
|
|
587
|
+
});
|
|
588
|
+
parent
|
|
589
|
+
.command("auto-degrade-idle-v2")
|
|
590
|
+
.description("Auto-degrade idle targets")
|
|
591
|
+
.action(async () => {
|
|
592
|
+
const m = await L();
|
|
593
|
+
console.log(JSON.stringify(m.autoDegradeIdleSiemTargetsV2(), null, 2));
|
|
594
|
+
});
|
|
595
|
+
parent
|
|
596
|
+
.command("auto-fail-stuck-v2")
|
|
597
|
+
.description("Auto-fail stuck sending exports")
|
|
598
|
+
.action(async () => {
|
|
599
|
+
const m = await L();
|
|
600
|
+
console.log(JSON.stringify(m.autoFailStuckSiemExportsV2(), null, 2));
|
|
601
|
+
});
|
|
602
|
+
parent
|
|
603
|
+
.command("gov-stats-v2")
|
|
604
|
+
.description("V2 governance aggregate stats")
|
|
605
|
+
.action(async () => {
|
|
606
|
+
const m = await L();
|
|
607
|
+
console.log(JSON.stringify(m.getSiemExporterGovStatsV2(), null, 2));
|
|
608
|
+
});
|
|
442
609
|
}
|
package/src/commands/sla.js
CHANGED
|
@@ -609,3 +609,215 @@ export function registerSlaCommand(program) {
|
|
|
609
609
|
console.log(JSON.stringify(getSLAStatsV2(), null, 2));
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
|
+
|
|
613
|
+
// === Iter16 V2 governance overlay ===
|
|
614
|
+
export function registerSlagovV2Commands(program) {
|
|
615
|
+
const parent = program.commands.find((c) => c.name() === "sla");
|
|
616
|
+
if (!parent) return;
|
|
617
|
+
const L = async () => await import("../lib/sla-manager.js");
|
|
618
|
+
parent
|
|
619
|
+
.command("slagov-enums-v2")
|
|
620
|
+
.description("Show V2 enums (slagov maturity + measurement lifecycle)")
|
|
621
|
+
.action(async () => {
|
|
622
|
+
const m = await L();
|
|
623
|
+
console.log(
|
|
624
|
+
JSON.stringify(
|
|
625
|
+
{
|
|
626
|
+
profileMaturity: m.SLAGOV_PROFILE_MATURITY_V2,
|
|
627
|
+
measurementLifecycle: m.SLAGOV_MEASUREMENT_LIFECYCLE_V2,
|
|
628
|
+
},
|
|
629
|
+
null,
|
|
630
|
+
2,
|
|
631
|
+
),
|
|
632
|
+
);
|
|
633
|
+
});
|
|
634
|
+
parent
|
|
635
|
+
.command("slagov-config-v2")
|
|
636
|
+
.description("Show V2 config thresholds")
|
|
637
|
+
.action(async () => {
|
|
638
|
+
const m = await L();
|
|
639
|
+
console.log(
|
|
640
|
+
JSON.stringify(
|
|
641
|
+
{
|
|
642
|
+
maxActive: m.getMaxActiveSlagovProfilesPerOwnerV2(),
|
|
643
|
+
maxPending: m.getMaxPendingSlagovMeasurementsPerProfileV2(),
|
|
644
|
+
idleMs: m.getSlagovProfileIdleMsV2(),
|
|
645
|
+
stuckMs: m.getSlagovMeasurementStuckMsV2(),
|
|
646
|
+
},
|
|
647
|
+
null,
|
|
648
|
+
2,
|
|
649
|
+
),
|
|
650
|
+
);
|
|
651
|
+
});
|
|
652
|
+
parent
|
|
653
|
+
.command("slagov-set-max-active-v2 <n>")
|
|
654
|
+
.description("Set max active profiles per owner")
|
|
655
|
+
.action(async (n) => {
|
|
656
|
+
const m = await L();
|
|
657
|
+
m.setMaxActiveSlagovProfilesPerOwnerV2(Number(n));
|
|
658
|
+
console.log("ok");
|
|
659
|
+
});
|
|
660
|
+
parent
|
|
661
|
+
.command("slagov-set-max-pending-v2 <n>")
|
|
662
|
+
.description("Set max pending measurements per profile")
|
|
663
|
+
.action(async (n) => {
|
|
664
|
+
const m = await L();
|
|
665
|
+
m.setMaxPendingSlagovMeasurementsPerProfileV2(Number(n));
|
|
666
|
+
console.log("ok");
|
|
667
|
+
});
|
|
668
|
+
parent
|
|
669
|
+
.command("slagov-set-idle-ms-v2 <n>")
|
|
670
|
+
.description("Set profile idle threshold (ms)")
|
|
671
|
+
.action(async (n) => {
|
|
672
|
+
const m = await L();
|
|
673
|
+
m.setSlagovProfileIdleMsV2(Number(n));
|
|
674
|
+
console.log("ok");
|
|
675
|
+
});
|
|
676
|
+
parent
|
|
677
|
+
.command("slagov-set-stuck-ms-v2 <n>")
|
|
678
|
+
.description("Set measurement stuck threshold (ms)")
|
|
679
|
+
.action(async (n) => {
|
|
680
|
+
const m = await L();
|
|
681
|
+
m.setSlagovMeasurementStuckMsV2(Number(n));
|
|
682
|
+
console.log("ok");
|
|
683
|
+
});
|
|
684
|
+
parent
|
|
685
|
+
.command("slagov-register-v2 <id> <owner>")
|
|
686
|
+
.description("Register V2 slagov profile")
|
|
687
|
+
.option("--tier <v>", "tier")
|
|
688
|
+
.action(async (id, owner, o) => {
|
|
689
|
+
const m = await L();
|
|
690
|
+
console.log(
|
|
691
|
+
JSON.stringify(
|
|
692
|
+
m.registerSlagovProfileV2({ id, owner, tier: o.tier }),
|
|
693
|
+
null,
|
|
694
|
+
2,
|
|
695
|
+
),
|
|
696
|
+
);
|
|
697
|
+
});
|
|
698
|
+
parent
|
|
699
|
+
.command("slagov-activate-v2 <id>")
|
|
700
|
+
.description("Activate profile")
|
|
701
|
+
.action(async (id) => {
|
|
702
|
+
const m = await L();
|
|
703
|
+
console.log(JSON.stringify(m.activateSlagovProfileV2(id), null, 2));
|
|
704
|
+
});
|
|
705
|
+
parent
|
|
706
|
+
.command("slagov-breach-v2 <id>")
|
|
707
|
+
.description("Breach profile")
|
|
708
|
+
.action(async (id) => {
|
|
709
|
+
const m = await L();
|
|
710
|
+
console.log(JSON.stringify(m.breachSlagovProfileV2(id), null, 2));
|
|
711
|
+
});
|
|
712
|
+
parent
|
|
713
|
+
.command("slagov-archive-v2 <id>")
|
|
714
|
+
.description("Archive profile (terminal)")
|
|
715
|
+
.action(async (id) => {
|
|
716
|
+
const m = await L();
|
|
717
|
+
console.log(JSON.stringify(m.archiveSlagovProfileV2(id), null, 2));
|
|
718
|
+
});
|
|
719
|
+
parent
|
|
720
|
+
.command("slagov-touch-v2 <id>")
|
|
721
|
+
.description("Touch profile")
|
|
722
|
+
.action(async (id) => {
|
|
723
|
+
const m = await L();
|
|
724
|
+
console.log(JSON.stringify(m.touchSlagovProfileV2(id), null, 2));
|
|
725
|
+
});
|
|
726
|
+
parent
|
|
727
|
+
.command("slagov-get-v2 <id>")
|
|
728
|
+
.description("Get profile")
|
|
729
|
+
.action(async (id) => {
|
|
730
|
+
const m = await L();
|
|
731
|
+
console.log(JSON.stringify(m.getSlagovProfileV2(id), null, 2));
|
|
732
|
+
});
|
|
733
|
+
parent
|
|
734
|
+
.command("slagov-list-v2")
|
|
735
|
+
.description("List profiles")
|
|
736
|
+
.action(async () => {
|
|
737
|
+
const m = await L();
|
|
738
|
+
console.log(JSON.stringify(m.listSlagovProfilesV2(), null, 2));
|
|
739
|
+
});
|
|
740
|
+
parent
|
|
741
|
+
.command("slagov-create-measurement-v2 <id> <profileId>")
|
|
742
|
+
.description("Create measurement (queued)")
|
|
743
|
+
.option("--metric <v>", "metric")
|
|
744
|
+
.action(async (id, profileId, o) => {
|
|
745
|
+
const m = await L();
|
|
746
|
+
console.log(
|
|
747
|
+
JSON.stringify(
|
|
748
|
+
m.createSlagovMeasurementV2({ id, profileId, metric: o.metric }),
|
|
749
|
+
null,
|
|
750
|
+
2,
|
|
751
|
+
),
|
|
752
|
+
);
|
|
753
|
+
});
|
|
754
|
+
parent
|
|
755
|
+
.command("slagov-measuring-measurement-v2 <id>")
|
|
756
|
+
.description("Mark measurement as measuring")
|
|
757
|
+
.action(async (id) => {
|
|
758
|
+
const m = await L();
|
|
759
|
+
console.log(JSON.stringify(m.measuringSlagovMeasurementV2(id), null, 2));
|
|
760
|
+
});
|
|
761
|
+
parent
|
|
762
|
+
.command("slagov-complete-measurement-v2 <id>")
|
|
763
|
+
.description("Complete measurement")
|
|
764
|
+
.action(async (id) => {
|
|
765
|
+
const m = await L();
|
|
766
|
+
console.log(JSON.stringify(m.completeMeasurementSlagovV2(id), null, 2));
|
|
767
|
+
});
|
|
768
|
+
parent
|
|
769
|
+
.command("slagov-fail-measurement-v2 <id> [reason]")
|
|
770
|
+
.description("Fail measurement")
|
|
771
|
+
.action(async (id, reason) => {
|
|
772
|
+
const m = await L();
|
|
773
|
+
console.log(
|
|
774
|
+
JSON.stringify(m.failSlagovMeasurementV2(id, reason), null, 2),
|
|
775
|
+
);
|
|
776
|
+
});
|
|
777
|
+
parent
|
|
778
|
+
.command("slagov-cancel-measurement-v2 <id> [reason]")
|
|
779
|
+
.description("Cancel measurement")
|
|
780
|
+
.action(async (id, reason) => {
|
|
781
|
+
const m = await L();
|
|
782
|
+
console.log(
|
|
783
|
+
JSON.stringify(m.cancelSlagovMeasurementV2(id, reason), null, 2),
|
|
784
|
+
);
|
|
785
|
+
});
|
|
786
|
+
parent
|
|
787
|
+
.command("slagov-get-measurement-v2 <id>")
|
|
788
|
+
.description("Get measurement")
|
|
789
|
+
.action(async (id) => {
|
|
790
|
+
const m = await L();
|
|
791
|
+
console.log(JSON.stringify(m.getSlagovMeasurementV2(id), null, 2));
|
|
792
|
+
});
|
|
793
|
+
parent
|
|
794
|
+
.command("slagov-list-measurements-v2")
|
|
795
|
+
.description("List measurements")
|
|
796
|
+
.action(async () => {
|
|
797
|
+
const m = await L();
|
|
798
|
+
console.log(JSON.stringify(m.listSlagovMeasurementsV2(), null, 2));
|
|
799
|
+
});
|
|
800
|
+
parent
|
|
801
|
+
.command("slagov-auto-breach-idle-v2")
|
|
802
|
+
.description("Auto-breach idle profiles")
|
|
803
|
+
.action(async () => {
|
|
804
|
+
const m = await L();
|
|
805
|
+
console.log(JSON.stringify(m.autoBreachIdleSlagovProfilesV2(), null, 2));
|
|
806
|
+
});
|
|
807
|
+
parent
|
|
808
|
+
.command("slagov-auto-fail-stuck-v2")
|
|
809
|
+
.description("Auto-fail stuck measurements")
|
|
810
|
+
.action(async () => {
|
|
811
|
+
const m = await L();
|
|
812
|
+
console.log(
|
|
813
|
+
JSON.stringify(m.autoFailStuckSlagovMeasurementsV2(), null, 2),
|
|
814
|
+
);
|
|
815
|
+
});
|
|
816
|
+
parent
|
|
817
|
+
.command("slagov-gov-stats-v2")
|
|
818
|
+
.description("V2 gov aggregate stats")
|
|
819
|
+
.action(async () => {
|
|
820
|
+
const m = await L();
|
|
821
|
+
console.log(JSON.stringify(m.getSlaManagerGovStatsV2(), null, 2));
|
|
822
|
+
});
|
|
823
|
+
}
|
package/src/commands/slotfill.js
CHANGED
|
@@ -2,40 +2,153 @@
|
|
|
2
2
|
* `cc slotfill` — Slot Filler V2 governance overlay (in-memory, atop lib/slot-filler.js).
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
|
-
SLOTF_PROFILE_MATURITY_V2,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
SLOTF_PROFILE_MATURITY_V2,
|
|
6
|
+
SLOTF_FILL_LIFECYCLE_V2,
|
|
7
|
+
setMaxActiveSlotfTemplatesPerOwnerV2,
|
|
8
|
+
getMaxActiveSlotfTemplatesPerOwnerV2,
|
|
9
|
+
setMaxPendingSlotfFillsPerTemplateV2,
|
|
10
|
+
getMaxPendingSlotfFillsPerTemplateV2,
|
|
11
|
+
setSlotfTemplateIdleMsV2,
|
|
12
|
+
getSlotfTemplateIdleMsV2,
|
|
13
|
+
setSlotfFillStuckMsV2,
|
|
14
|
+
getSlotfFillStuckMsV2,
|
|
15
|
+
registerSlotfTemplateV2,
|
|
16
|
+
activateSlotfTemplateV2,
|
|
17
|
+
staleSlotfTemplateV2,
|
|
18
|
+
archiveSlotfTemplateV2,
|
|
19
|
+
touchSlotfTemplateV2,
|
|
20
|
+
getSlotfTemplateV2,
|
|
21
|
+
listSlotfTemplatesV2,
|
|
22
|
+
createSlotfFillV2,
|
|
23
|
+
fillingSlotfFillV2,
|
|
24
|
+
fillSlotfFillV2,
|
|
25
|
+
failSlotfFillV2,
|
|
26
|
+
cancelSlotfFillV2,
|
|
27
|
+
getSlotfFillV2,
|
|
28
|
+
listSlotfFillsV2,
|
|
29
|
+
autoStaleIdleSlotfTemplatesV2,
|
|
30
|
+
autoFailStuckSlotfFillsV2,
|
|
31
|
+
getSlotFillerGovStatsV2,
|
|
32
|
+
_resetStateSlotFillerV2,
|
|
13
33
|
} from "../lib/slot-filler.js";
|
|
14
34
|
|
|
15
35
|
export function registerSlotfillCommand(program) {
|
|
16
|
-
const sf = program
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
sf.command("
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
sf.command("
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
const sf = program
|
|
37
|
+
.command("slotfill")
|
|
38
|
+
.description("Slot Filler V2 governance");
|
|
39
|
+
sf.command("enums-v2").action(() =>
|
|
40
|
+
console.log(
|
|
41
|
+
JSON.stringify(
|
|
42
|
+
{
|
|
43
|
+
profileMaturity: SLOTF_PROFILE_MATURITY_V2,
|
|
44
|
+
fillLifecycle: SLOTF_FILL_LIFECYCLE_V2,
|
|
45
|
+
},
|
|
46
|
+
null,
|
|
47
|
+
2,
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
sf.command("config-v2").action(() =>
|
|
52
|
+
console.log(
|
|
53
|
+
JSON.stringify(
|
|
54
|
+
{
|
|
55
|
+
maxActiveSlotfTemplatesPerOwner:
|
|
56
|
+
getMaxActiveSlotfTemplatesPerOwnerV2(),
|
|
57
|
+
maxPendingSlotfFillsPerTemplate:
|
|
58
|
+
getMaxPendingSlotfFillsPerTemplateV2(),
|
|
59
|
+
slotfTemplateIdleMs: getSlotfTemplateIdleMsV2(),
|
|
60
|
+
slotfFillStuckMs: getSlotfFillStuckMsV2(),
|
|
61
|
+
},
|
|
62
|
+
null,
|
|
63
|
+
2,
|
|
64
|
+
),
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
sf.command("set-max-active-v2 <n>").action((n) => {
|
|
68
|
+
setMaxActiveSlotfTemplatesPerOwnerV2(Number(n));
|
|
69
|
+
console.log("ok");
|
|
70
|
+
});
|
|
71
|
+
sf.command("set-max-pending-v2 <n>").action((n) => {
|
|
72
|
+
setMaxPendingSlotfFillsPerTemplateV2(Number(n));
|
|
73
|
+
console.log("ok");
|
|
74
|
+
});
|
|
75
|
+
sf.command("set-idle-ms-v2 <n>").action((n) => {
|
|
76
|
+
setSlotfTemplateIdleMsV2(Number(n));
|
|
77
|
+
console.log("ok");
|
|
78
|
+
});
|
|
79
|
+
sf.command("set-stuck-ms-v2 <n>").action((n) => {
|
|
80
|
+
setSlotfFillStuckMsV2(Number(n));
|
|
81
|
+
console.log("ok");
|
|
82
|
+
});
|
|
83
|
+
sf.command("register-template-v2 <id> <owner>")
|
|
84
|
+
.option("--schema <s>", "schema")
|
|
85
|
+
.action((id, owner, o) =>
|
|
86
|
+
console.log(
|
|
87
|
+
JSON.stringify(
|
|
88
|
+
registerSlotfTemplateV2({ id, owner, schema: o.schema }),
|
|
89
|
+
null,
|
|
90
|
+
2,
|
|
91
|
+
),
|
|
92
|
+
),
|
|
93
|
+
);
|
|
94
|
+
sf.command("activate-template-v2 <id>").action((id) =>
|
|
95
|
+
console.log(JSON.stringify(activateSlotfTemplateV2(id), null, 2)),
|
|
96
|
+
);
|
|
97
|
+
sf.command("stale-template-v2 <id>").action((id) =>
|
|
98
|
+
console.log(JSON.stringify(staleSlotfTemplateV2(id), null, 2)),
|
|
99
|
+
);
|
|
100
|
+
sf.command("archive-template-v2 <id>").action((id) =>
|
|
101
|
+
console.log(JSON.stringify(archiveSlotfTemplateV2(id), null, 2)),
|
|
102
|
+
);
|
|
103
|
+
sf.command("touch-template-v2 <id>").action((id) =>
|
|
104
|
+
console.log(JSON.stringify(touchSlotfTemplateV2(id), null, 2)),
|
|
105
|
+
);
|
|
106
|
+
sf.command("get-template-v2 <id>").action((id) =>
|
|
107
|
+
console.log(JSON.stringify(getSlotfTemplateV2(id), null, 2)),
|
|
108
|
+
);
|
|
109
|
+
sf.command("list-templates-v2").action(() =>
|
|
110
|
+
console.log(JSON.stringify(listSlotfTemplatesV2(), null, 2)),
|
|
111
|
+
);
|
|
112
|
+
sf.command("create-fill-v2 <id> <templateId>")
|
|
113
|
+
.option("--input <s>", "input")
|
|
114
|
+
.action((id, templateId, o) =>
|
|
115
|
+
console.log(
|
|
116
|
+
JSON.stringify(
|
|
117
|
+
createSlotfFillV2({ id, templateId, input: o.input }),
|
|
118
|
+
null,
|
|
119
|
+
2,
|
|
120
|
+
),
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
sf.command("filling-fill-v2 <id>").action((id) =>
|
|
124
|
+
console.log(JSON.stringify(fillingSlotfFillV2(id), null, 2)),
|
|
125
|
+
);
|
|
126
|
+
sf.command("fill-fill-v2 <id>").action((id) =>
|
|
127
|
+
console.log(JSON.stringify(fillSlotfFillV2(id), null, 2)),
|
|
128
|
+
);
|
|
129
|
+
sf.command("fail-fill-v2 <id> [reason]").action((id, reason) =>
|
|
130
|
+
console.log(JSON.stringify(failSlotfFillV2(id, reason), null, 2)),
|
|
131
|
+
);
|
|
132
|
+
sf.command("cancel-fill-v2 <id> [reason]").action((id, reason) =>
|
|
133
|
+
console.log(JSON.stringify(cancelSlotfFillV2(id, reason), null, 2)),
|
|
134
|
+
);
|
|
135
|
+
sf.command("get-fill-v2 <id>").action((id) =>
|
|
136
|
+
console.log(JSON.stringify(getSlotfFillV2(id), null, 2)),
|
|
137
|
+
);
|
|
138
|
+
sf.command("list-fills-v2").action(() =>
|
|
139
|
+
console.log(JSON.stringify(listSlotfFillsV2(), null, 2)),
|
|
140
|
+
);
|
|
141
|
+
sf.command("auto-stale-idle-v2").action(() =>
|
|
142
|
+
console.log(JSON.stringify(autoStaleIdleSlotfTemplatesV2(), null, 2)),
|
|
143
|
+
);
|
|
144
|
+
sf.command("auto-fail-stuck-v2").action(() =>
|
|
145
|
+
console.log(JSON.stringify(autoFailStuckSlotfFillsV2(), null, 2)),
|
|
146
|
+
);
|
|
147
|
+
sf.command("gov-stats-v2").action(() =>
|
|
148
|
+
console.log(JSON.stringify(getSlotFillerGovStatsV2(), null, 2)),
|
|
149
|
+
);
|
|
150
|
+
sf.command("reset-state-v2").action(() => {
|
|
151
|
+
_resetStateSlotFillerV2();
|
|
152
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
153
|
+
});
|
|
41
154
|
}
|