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/pqc.js
CHANGED
|
@@ -587,3 +587,216 @@ export function registerPqcCommand(program) {
|
|
|
587
587
|
else logger.log(JSON.stringify(s, null, 2));
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
|
+
|
|
591
|
+
// === Iter22 V2 governance overlay ===
|
|
592
|
+
export function registerPqcgovV2Commands(program) {
|
|
593
|
+
const parent = program.commands.find((c) => c.name() === "pqc");
|
|
594
|
+
if (!parent) return;
|
|
595
|
+
const L = async () => await import("../lib/pqc-manager.js");
|
|
596
|
+
parent
|
|
597
|
+
.command("pqcgov-enums-v2")
|
|
598
|
+
.description("Show V2 enums")
|
|
599
|
+
.action(async () => {
|
|
600
|
+
const m = await L();
|
|
601
|
+
console.log(
|
|
602
|
+
JSON.stringify(
|
|
603
|
+
{
|
|
604
|
+
profileMaturity: m.PQCGOV_PROFILE_MATURITY_V2,
|
|
605
|
+
keygenLifecycle: m.PQCGOV_KEYGEN_LIFECYCLE_V2,
|
|
606
|
+
},
|
|
607
|
+
null,
|
|
608
|
+
2,
|
|
609
|
+
),
|
|
610
|
+
);
|
|
611
|
+
});
|
|
612
|
+
parent
|
|
613
|
+
.command("pqcgov-config-v2")
|
|
614
|
+
.description("Show V2 config")
|
|
615
|
+
.action(async () => {
|
|
616
|
+
const m = await L();
|
|
617
|
+
console.log(
|
|
618
|
+
JSON.stringify(
|
|
619
|
+
{
|
|
620
|
+
maxActive: m.getMaxActivePqcgovProfilesPerOwnerV2(),
|
|
621
|
+
maxPending: m.getMaxPendingPqcgovKeygensPerProfileV2(),
|
|
622
|
+
idleMs: m.getPqcgovProfileIdleMsV2(),
|
|
623
|
+
stuckMs: m.getPqcgovKeygenStuckMsV2(),
|
|
624
|
+
},
|
|
625
|
+
null,
|
|
626
|
+
2,
|
|
627
|
+
),
|
|
628
|
+
);
|
|
629
|
+
});
|
|
630
|
+
parent
|
|
631
|
+
.command("pqcgov-set-max-active-v2 <n>")
|
|
632
|
+
.description("Set max active")
|
|
633
|
+
.action(async (n) => {
|
|
634
|
+
(await L()).setMaxActivePqcgovProfilesPerOwnerV2(Number(n));
|
|
635
|
+
console.log("ok");
|
|
636
|
+
});
|
|
637
|
+
parent
|
|
638
|
+
.command("pqcgov-set-max-pending-v2 <n>")
|
|
639
|
+
.description("Set max pending")
|
|
640
|
+
.action(async (n) => {
|
|
641
|
+
(await L()).setMaxPendingPqcgovKeygensPerProfileV2(Number(n));
|
|
642
|
+
console.log("ok");
|
|
643
|
+
});
|
|
644
|
+
parent
|
|
645
|
+
.command("pqcgov-set-idle-ms-v2 <n>")
|
|
646
|
+
.description("Set idle threshold ms")
|
|
647
|
+
.action(async (n) => {
|
|
648
|
+
(await L()).setPqcgovProfileIdleMsV2(Number(n));
|
|
649
|
+
console.log("ok");
|
|
650
|
+
});
|
|
651
|
+
parent
|
|
652
|
+
.command("pqcgov-set-stuck-ms-v2 <n>")
|
|
653
|
+
.description("Set stuck threshold ms")
|
|
654
|
+
.action(async (n) => {
|
|
655
|
+
(await L()).setPqcgovKeygenStuckMsV2(Number(n));
|
|
656
|
+
console.log("ok");
|
|
657
|
+
});
|
|
658
|
+
parent
|
|
659
|
+
.command("pqcgov-register-v2 <id> <owner>")
|
|
660
|
+
.description("Register V2 profile")
|
|
661
|
+
.option("--algorithm <v>", "algorithm")
|
|
662
|
+
.action(async (id, owner, o) => {
|
|
663
|
+
const m = await L();
|
|
664
|
+
console.log(
|
|
665
|
+
JSON.stringify(
|
|
666
|
+
m.registerPqcgovProfileV2({ id, owner, algorithm: o.algorithm }),
|
|
667
|
+
null,
|
|
668
|
+
2,
|
|
669
|
+
),
|
|
670
|
+
);
|
|
671
|
+
});
|
|
672
|
+
parent
|
|
673
|
+
.command("pqcgov-activate-v2 <id>")
|
|
674
|
+
.description("Activate profile")
|
|
675
|
+
.action(async (id) => {
|
|
676
|
+
console.log(
|
|
677
|
+
JSON.stringify((await L()).activatePqcgovProfileV2(id), null, 2),
|
|
678
|
+
);
|
|
679
|
+
});
|
|
680
|
+
parent
|
|
681
|
+
.command("pqcgov-deprecate-v2 <id>")
|
|
682
|
+
.description("Deprecate profile")
|
|
683
|
+
.action(async (id) => {
|
|
684
|
+
console.log(
|
|
685
|
+
JSON.stringify((await L()).deprecatePqcgovProfileV2(id), null, 2),
|
|
686
|
+
);
|
|
687
|
+
});
|
|
688
|
+
parent
|
|
689
|
+
.command("pqcgov-archive-v2 <id>")
|
|
690
|
+
.description("Archive profile")
|
|
691
|
+
.action(async (id) => {
|
|
692
|
+
console.log(
|
|
693
|
+
JSON.stringify((await L()).archivePqcgovProfileV2(id), null, 2),
|
|
694
|
+
);
|
|
695
|
+
});
|
|
696
|
+
parent
|
|
697
|
+
.command("pqcgov-touch-v2 <id>")
|
|
698
|
+
.description("Touch profile")
|
|
699
|
+
.action(async (id) => {
|
|
700
|
+
console.log(
|
|
701
|
+
JSON.stringify((await L()).touchPqcgovProfileV2(id), null, 2),
|
|
702
|
+
);
|
|
703
|
+
});
|
|
704
|
+
parent
|
|
705
|
+
.command("pqcgov-get-v2 <id>")
|
|
706
|
+
.description("Get profile")
|
|
707
|
+
.action(async (id) => {
|
|
708
|
+
console.log(JSON.stringify((await L()).getPqcgovProfileV2(id), null, 2));
|
|
709
|
+
});
|
|
710
|
+
parent
|
|
711
|
+
.command("pqcgov-list-v2")
|
|
712
|
+
.description("List profiles")
|
|
713
|
+
.action(async () => {
|
|
714
|
+
console.log(JSON.stringify((await L()).listPqcgovProfilesV2(), null, 2));
|
|
715
|
+
});
|
|
716
|
+
parent
|
|
717
|
+
.command("pqcgov-create-keygen-v2 <id> <profileId>")
|
|
718
|
+
.description("Create keygen")
|
|
719
|
+
.option("--purpose <v>", "purpose")
|
|
720
|
+
.action(async (id, profileId, o) => {
|
|
721
|
+
const m = await L();
|
|
722
|
+
console.log(
|
|
723
|
+
JSON.stringify(
|
|
724
|
+
m.createPqcgovKeygenV2({ id, profileId, purpose: o.purpose }),
|
|
725
|
+
null,
|
|
726
|
+
2,
|
|
727
|
+
),
|
|
728
|
+
);
|
|
729
|
+
});
|
|
730
|
+
parent
|
|
731
|
+
.command("pqcgov-generating-keygen-v2 <id>")
|
|
732
|
+
.description("Mark keygen as generating")
|
|
733
|
+
.action(async (id) => {
|
|
734
|
+
console.log(
|
|
735
|
+
JSON.stringify((await L()).generatingPqcgovKeygenV2(id), null, 2),
|
|
736
|
+
);
|
|
737
|
+
});
|
|
738
|
+
parent
|
|
739
|
+
.command("pqcgov-complete-keygen-v2 <id>")
|
|
740
|
+
.description("Complete keygen")
|
|
741
|
+
.action(async (id) => {
|
|
742
|
+
console.log(
|
|
743
|
+
JSON.stringify((await L()).completeKeygenPqcgovV2(id), null, 2),
|
|
744
|
+
);
|
|
745
|
+
});
|
|
746
|
+
parent
|
|
747
|
+
.command("pqcgov-fail-keygen-v2 <id> [reason]")
|
|
748
|
+
.description("Fail keygen")
|
|
749
|
+
.action(async (id, reason) => {
|
|
750
|
+
console.log(
|
|
751
|
+
JSON.stringify((await L()).failPqcgovKeygenV2(id, reason), null, 2),
|
|
752
|
+
);
|
|
753
|
+
});
|
|
754
|
+
parent
|
|
755
|
+
.command("pqcgov-cancel-keygen-v2 <id> [reason]")
|
|
756
|
+
.description("Cancel keygen")
|
|
757
|
+
.action(async (id, reason) => {
|
|
758
|
+
console.log(
|
|
759
|
+
JSON.stringify((await L()).cancelPqcgovKeygenV2(id, reason), null, 2),
|
|
760
|
+
);
|
|
761
|
+
});
|
|
762
|
+
parent
|
|
763
|
+
.command("pqcgov-get-keygen-v2 <id>")
|
|
764
|
+
.description("Get keygen")
|
|
765
|
+
.action(async (id) => {
|
|
766
|
+
console.log(JSON.stringify((await L()).getPqcgovKeygenV2(id), null, 2));
|
|
767
|
+
});
|
|
768
|
+
parent
|
|
769
|
+
.command("pqcgov-list-keygens-v2")
|
|
770
|
+
.description("List keygens")
|
|
771
|
+
.action(async () => {
|
|
772
|
+
console.log(JSON.stringify((await L()).listPqcgovKeygensV2(), null, 2));
|
|
773
|
+
});
|
|
774
|
+
parent
|
|
775
|
+
.command("pqcgov-auto-deprecate-idle-v2")
|
|
776
|
+
.description("Auto-deprecate idle")
|
|
777
|
+
.action(async () => {
|
|
778
|
+
console.log(
|
|
779
|
+
JSON.stringify(
|
|
780
|
+
(await L()).autoDeprecateIdlePqcgovProfilesV2(),
|
|
781
|
+
null,
|
|
782
|
+
2,
|
|
783
|
+
),
|
|
784
|
+
);
|
|
785
|
+
});
|
|
786
|
+
parent
|
|
787
|
+
.command("pqcgov-auto-fail-stuck-v2")
|
|
788
|
+
.description("Auto-fail stuck keygens")
|
|
789
|
+
.action(async () => {
|
|
790
|
+
console.log(
|
|
791
|
+
JSON.stringify((await L()).autoFailStuckPqcgovKeygensV2(), null, 2),
|
|
792
|
+
);
|
|
793
|
+
});
|
|
794
|
+
parent
|
|
795
|
+
.command("pqcgov-gov-stats-v2")
|
|
796
|
+
.description("V2 gov stats")
|
|
797
|
+
.action(async () => {
|
|
798
|
+
console.log(
|
|
799
|
+
JSON.stringify((await L()).getPqcManagerGovStatsV2(), null, 2),
|
|
800
|
+
);
|
|
801
|
+
});
|
|
802
|
+
}
|
|
@@ -629,3 +629,210 @@ export function registerQuantizationCommand(program) {
|
|
|
629
629
|
|
|
630
630
|
program.addCommand(quant);
|
|
631
631
|
}
|
|
632
|
+
|
|
633
|
+
// === Iter18 V2 governance overlay ===
|
|
634
|
+
export function registerQntgovV2Commands(program) {
|
|
635
|
+
const parent = program.commands.find((c) => c.name() === "quantize");
|
|
636
|
+
if (!parent) return;
|
|
637
|
+
const L = async () => await import("../lib/quantization.js");
|
|
638
|
+
parent
|
|
639
|
+
.command("qntgov-enums-v2")
|
|
640
|
+
.description("Show V2 enums")
|
|
641
|
+
.action(async () => {
|
|
642
|
+
const m = await L();
|
|
643
|
+
console.log(
|
|
644
|
+
JSON.stringify(
|
|
645
|
+
{
|
|
646
|
+
profileMaturity: m.QNTGOV_PROFILE_MATURITY_V2,
|
|
647
|
+
jobLifecycle: m.QNTGOV_JOB_LIFECYCLE_V2,
|
|
648
|
+
},
|
|
649
|
+
null,
|
|
650
|
+
2,
|
|
651
|
+
),
|
|
652
|
+
);
|
|
653
|
+
});
|
|
654
|
+
parent
|
|
655
|
+
.command("qntgov-config-v2")
|
|
656
|
+
.description("Show V2 config")
|
|
657
|
+
.action(async () => {
|
|
658
|
+
const m = await L();
|
|
659
|
+
console.log(
|
|
660
|
+
JSON.stringify(
|
|
661
|
+
{
|
|
662
|
+
maxActive: m.getMaxActiveQntgovProfilesPerOwnerV2(),
|
|
663
|
+
maxPending: m.getMaxPendingQntgovJobsPerProfileV2(),
|
|
664
|
+
idleMs: m.getQntgovProfileIdleMsV2(),
|
|
665
|
+
stuckMs: m.getQntgovJobStuckMsV2(),
|
|
666
|
+
},
|
|
667
|
+
null,
|
|
668
|
+
2,
|
|
669
|
+
),
|
|
670
|
+
);
|
|
671
|
+
});
|
|
672
|
+
parent
|
|
673
|
+
.command("qntgov-set-max-active-v2 <n>")
|
|
674
|
+
.description("Set max active")
|
|
675
|
+
.action(async (n) => {
|
|
676
|
+
(await L()).setMaxActiveQntgovProfilesPerOwnerV2(Number(n));
|
|
677
|
+
console.log("ok");
|
|
678
|
+
});
|
|
679
|
+
parent
|
|
680
|
+
.command("qntgov-set-max-pending-v2 <n>")
|
|
681
|
+
.description("Set max pending")
|
|
682
|
+
.action(async (n) => {
|
|
683
|
+
(await L()).setMaxPendingQntgovJobsPerProfileV2(Number(n));
|
|
684
|
+
console.log("ok");
|
|
685
|
+
});
|
|
686
|
+
parent
|
|
687
|
+
.command("qntgov-set-idle-ms-v2 <n>")
|
|
688
|
+
.description("Set idle threshold ms")
|
|
689
|
+
.action(async (n) => {
|
|
690
|
+
(await L()).setQntgovProfileIdleMsV2(Number(n));
|
|
691
|
+
console.log("ok");
|
|
692
|
+
});
|
|
693
|
+
parent
|
|
694
|
+
.command("qntgov-set-stuck-ms-v2 <n>")
|
|
695
|
+
.description("Set stuck threshold ms")
|
|
696
|
+
.action(async (n) => {
|
|
697
|
+
(await L()).setQntgovJobStuckMsV2(Number(n));
|
|
698
|
+
console.log("ok");
|
|
699
|
+
});
|
|
700
|
+
parent
|
|
701
|
+
.command("qntgov-register-v2 <id> <owner>")
|
|
702
|
+
.description("Register V2 profile")
|
|
703
|
+
.option("--precision <v>", "precision")
|
|
704
|
+
.action(async (id, owner, o) => {
|
|
705
|
+
const m = await L();
|
|
706
|
+
console.log(
|
|
707
|
+
JSON.stringify(
|
|
708
|
+
m.registerQntgovProfileV2({ id, owner, precision: o.precision }),
|
|
709
|
+
null,
|
|
710
|
+
2,
|
|
711
|
+
),
|
|
712
|
+
);
|
|
713
|
+
});
|
|
714
|
+
parent
|
|
715
|
+
.command("qntgov-activate-v2 <id>")
|
|
716
|
+
.description("Activate profile")
|
|
717
|
+
.action(async (id) => {
|
|
718
|
+
console.log(
|
|
719
|
+
JSON.stringify((await L()).activateQntgovProfileV2(id), null, 2),
|
|
720
|
+
);
|
|
721
|
+
});
|
|
722
|
+
parent
|
|
723
|
+
.command("qntgov-stale-v2 <id>")
|
|
724
|
+
.description("Stale profile")
|
|
725
|
+
.action(async (id) => {
|
|
726
|
+
console.log(
|
|
727
|
+
JSON.stringify((await L()).staleQntgovProfileV2(id), null, 2),
|
|
728
|
+
);
|
|
729
|
+
});
|
|
730
|
+
parent
|
|
731
|
+
.command("qntgov-archive-v2 <id>")
|
|
732
|
+
.description("Archive profile")
|
|
733
|
+
.action(async (id) => {
|
|
734
|
+
console.log(
|
|
735
|
+
JSON.stringify((await L()).archiveQntgovProfileV2(id), null, 2),
|
|
736
|
+
);
|
|
737
|
+
});
|
|
738
|
+
parent
|
|
739
|
+
.command("qntgov-touch-v2 <id>")
|
|
740
|
+
.description("Touch profile")
|
|
741
|
+
.action(async (id) => {
|
|
742
|
+
console.log(
|
|
743
|
+
JSON.stringify((await L()).touchQntgovProfileV2(id), null, 2),
|
|
744
|
+
);
|
|
745
|
+
});
|
|
746
|
+
parent
|
|
747
|
+
.command("qntgov-get-v2 <id>")
|
|
748
|
+
.description("Get profile")
|
|
749
|
+
.action(async (id) => {
|
|
750
|
+
console.log(JSON.stringify((await L()).getQntgovProfileV2(id), null, 2));
|
|
751
|
+
});
|
|
752
|
+
parent
|
|
753
|
+
.command("qntgov-list-v2")
|
|
754
|
+
.description("List profiles")
|
|
755
|
+
.action(async () => {
|
|
756
|
+
console.log(JSON.stringify((await L()).listQntgovProfilesV2(), null, 2));
|
|
757
|
+
});
|
|
758
|
+
parent
|
|
759
|
+
.command("qntgov-create-job-v2 <id> <profileId>")
|
|
760
|
+
.description("Create job")
|
|
761
|
+
.option("--model <v>", "model")
|
|
762
|
+
.action(async (id, profileId, o) => {
|
|
763
|
+
const m = await L();
|
|
764
|
+
console.log(
|
|
765
|
+
JSON.stringify(
|
|
766
|
+
m.createQntgovJobV2({ id, profileId, model: o.model }),
|
|
767
|
+
null,
|
|
768
|
+
2,
|
|
769
|
+
),
|
|
770
|
+
);
|
|
771
|
+
});
|
|
772
|
+
parent
|
|
773
|
+
.command("qntgov-quantizing-job-v2 <id>")
|
|
774
|
+
.description("Mark job as quantizing")
|
|
775
|
+
.action(async (id) => {
|
|
776
|
+
console.log(
|
|
777
|
+
JSON.stringify((await L()).quantizingQntgovJobV2(id), null, 2),
|
|
778
|
+
);
|
|
779
|
+
});
|
|
780
|
+
parent
|
|
781
|
+
.command("qntgov-complete-job-v2 <id>")
|
|
782
|
+
.description("Complete job")
|
|
783
|
+
.action(async (id) => {
|
|
784
|
+
console.log(JSON.stringify((await L()).completeJobQntgovV2(id), null, 2));
|
|
785
|
+
});
|
|
786
|
+
parent
|
|
787
|
+
.command("qntgov-fail-job-v2 <id> [reason]")
|
|
788
|
+
.description("Fail job")
|
|
789
|
+
.action(async (id, reason) => {
|
|
790
|
+
console.log(
|
|
791
|
+
JSON.stringify((await L()).failQntgovJobV2(id, reason), null, 2),
|
|
792
|
+
);
|
|
793
|
+
});
|
|
794
|
+
parent
|
|
795
|
+
.command("qntgov-cancel-job-v2 <id> [reason]")
|
|
796
|
+
.description("Cancel job")
|
|
797
|
+
.action(async (id, reason) => {
|
|
798
|
+
console.log(
|
|
799
|
+
JSON.stringify((await L()).cancelQntgovJobV2(id, reason), null, 2),
|
|
800
|
+
);
|
|
801
|
+
});
|
|
802
|
+
parent
|
|
803
|
+
.command("qntgov-get-job-v2 <id>")
|
|
804
|
+
.description("Get job")
|
|
805
|
+
.action(async (id) => {
|
|
806
|
+
console.log(JSON.stringify((await L()).getQntgovJobV2(id), null, 2));
|
|
807
|
+
});
|
|
808
|
+
parent
|
|
809
|
+
.command("qntgov-list-jobs-v2")
|
|
810
|
+
.description("List jobs")
|
|
811
|
+
.action(async () => {
|
|
812
|
+
console.log(JSON.stringify((await L()).listQntgovJobsV2(), null, 2));
|
|
813
|
+
});
|
|
814
|
+
parent
|
|
815
|
+
.command("qntgov-auto-stale-idle-v2")
|
|
816
|
+
.description("Auto-stale idle")
|
|
817
|
+
.action(async () => {
|
|
818
|
+
console.log(
|
|
819
|
+
JSON.stringify((await L()).autoStaleIdleQntgovProfilesV2(), null, 2),
|
|
820
|
+
);
|
|
821
|
+
});
|
|
822
|
+
parent
|
|
823
|
+
.command("qntgov-auto-fail-stuck-v2")
|
|
824
|
+
.description("Auto-fail stuck jobs")
|
|
825
|
+
.action(async () => {
|
|
826
|
+
console.log(
|
|
827
|
+
JSON.stringify((await L()).autoFailStuckQntgovJobsV2(), null, 2),
|
|
828
|
+
);
|
|
829
|
+
});
|
|
830
|
+
parent
|
|
831
|
+
.command("qntgov-gov-stats-v2")
|
|
832
|
+
.description("V2 gov stats")
|
|
833
|
+
.action(async () => {
|
|
834
|
+
console.log(
|
|
835
|
+
JSON.stringify((await L()).getQuantizationGovStatsV2(), null, 2),
|
|
836
|
+
);
|
|
837
|
+
});
|
|
838
|
+
}
|
package/src/commands/rcache.js
CHANGED
|
@@ -269,3 +269,208 @@ export function registerRCacheCommand(program) {
|
|
|
269
269
|
.description("Auto-fail stuck V2 refresh jobs")
|
|
270
270
|
.action(() => out(autoFailStuckRefreshJobsV2()));
|
|
271
271
|
}
|
|
272
|
+
|
|
273
|
+
// === Iter23 V2 governance overlay ===
|
|
274
|
+
export function registerRcgovV2Commands(program) {
|
|
275
|
+
const parent = program.commands.find((c) => c.name() === "rcache");
|
|
276
|
+
if (!parent) return;
|
|
277
|
+
const L = async () => await import("../lib/response-cache.js");
|
|
278
|
+
parent
|
|
279
|
+
.command("rcgov-enums-v2")
|
|
280
|
+
.description("Show V2 enums")
|
|
281
|
+
.action(async () => {
|
|
282
|
+
const m = await L();
|
|
283
|
+
console.log(
|
|
284
|
+
JSON.stringify(
|
|
285
|
+
{
|
|
286
|
+
profileMaturity: m.RCGOV_PROFILE_MATURITY_V2,
|
|
287
|
+
refreshLifecycle: m.RCGOV_REFRESH_LIFECYCLE_V2,
|
|
288
|
+
},
|
|
289
|
+
null,
|
|
290
|
+
2,
|
|
291
|
+
),
|
|
292
|
+
);
|
|
293
|
+
});
|
|
294
|
+
parent
|
|
295
|
+
.command("rcgov-config-v2")
|
|
296
|
+
.description("Show V2 config")
|
|
297
|
+
.action(async () => {
|
|
298
|
+
const m = await L();
|
|
299
|
+
console.log(
|
|
300
|
+
JSON.stringify(
|
|
301
|
+
{
|
|
302
|
+
maxActive: m.getMaxActiveRcgovProfilesPerOwnerV2(),
|
|
303
|
+
maxPending: m.getMaxPendingRcgovRefreshsPerProfileV2(),
|
|
304
|
+
idleMs: m.getRcgovProfileIdleMsV2(),
|
|
305
|
+
stuckMs: m.getRcgovRefreshStuckMsV2(),
|
|
306
|
+
},
|
|
307
|
+
null,
|
|
308
|
+
2,
|
|
309
|
+
),
|
|
310
|
+
);
|
|
311
|
+
});
|
|
312
|
+
parent
|
|
313
|
+
.command("rcgov-set-max-active-v2 <n>")
|
|
314
|
+
.description("Set max active")
|
|
315
|
+
.action(async (n) => {
|
|
316
|
+
(await L()).setMaxActiveRcgovProfilesPerOwnerV2(Number(n));
|
|
317
|
+
console.log("ok");
|
|
318
|
+
});
|
|
319
|
+
parent
|
|
320
|
+
.command("rcgov-set-max-pending-v2 <n>")
|
|
321
|
+
.description("Set max pending")
|
|
322
|
+
.action(async (n) => {
|
|
323
|
+
(await L()).setMaxPendingRcgovRefreshsPerProfileV2(Number(n));
|
|
324
|
+
console.log("ok");
|
|
325
|
+
});
|
|
326
|
+
parent
|
|
327
|
+
.command("rcgov-set-idle-ms-v2 <n>")
|
|
328
|
+
.description("Set idle threshold ms")
|
|
329
|
+
.action(async (n) => {
|
|
330
|
+
(await L()).setRcgovProfileIdleMsV2(Number(n));
|
|
331
|
+
console.log("ok");
|
|
332
|
+
});
|
|
333
|
+
parent
|
|
334
|
+
.command("rcgov-set-stuck-ms-v2 <n>")
|
|
335
|
+
.description("Set stuck threshold ms")
|
|
336
|
+
.action(async (n) => {
|
|
337
|
+
(await L()).setRcgovRefreshStuckMsV2(Number(n));
|
|
338
|
+
console.log("ok");
|
|
339
|
+
});
|
|
340
|
+
parent
|
|
341
|
+
.command("rcgov-register-v2 <id> <owner>")
|
|
342
|
+
.description("Register V2 profile")
|
|
343
|
+
.option("--lane <v>", "lane")
|
|
344
|
+
.action(async (id, owner, o) => {
|
|
345
|
+
const m = await L();
|
|
346
|
+
console.log(
|
|
347
|
+
JSON.stringify(
|
|
348
|
+
m.registerRcgovProfileV2({ id, owner, lane: o.lane }),
|
|
349
|
+
null,
|
|
350
|
+
2,
|
|
351
|
+
),
|
|
352
|
+
);
|
|
353
|
+
});
|
|
354
|
+
parent
|
|
355
|
+
.command("rcgov-activate-v2 <id>")
|
|
356
|
+
.description("Activate profile")
|
|
357
|
+
.action(async (id) => {
|
|
358
|
+
console.log(
|
|
359
|
+
JSON.stringify((await L()).activateRcgovProfileV2(id), null, 2),
|
|
360
|
+
);
|
|
361
|
+
});
|
|
362
|
+
parent
|
|
363
|
+
.command("rcgov-stale-v2 <id>")
|
|
364
|
+
.description("Stale profile")
|
|
365
|
+
.action(async (id) => {
|
|
366
|
+
console.log(JSON.stringify((await L()).staleRcgovProfileV2(id), null, 2));
|
|
367
|
+
});
|
|
368
|
+
parent
|
|
369
|
+
.command("rcgov-archive-v2 <id>")
|
|
370
|
+
.description("Archive profile")
|
|
371
|
+
.action(async (id) => {
|
|
372
|
+
console.log(
|
|
373
|
+
JSON.stringify((await L()).archiveRcgovProfileV2(id), null, 2),
|
|
374
|
+
);
|
|
375
|
+
});
|
|
376
|
+
parent
|
|
377
|
+
.command("rcgov-touch-v2 <id>")
|
|
378
|
+
.description("Touch profile")
|
|
379
|
+
.action(async (id) => {
|
|
380
|
+
console.log(JSON.stringify((await L()).touchRcgovProfileV2(id), null, 2));
|
|
381
|
+
});
|
|
382
|
+
parent
|
|
383
|
+
.command("rcgov-get-v2 <id>")
|
|
384
|
+
.description("Get profile")
|
|
385
|
+
.action(async (id) => {
|
|
386
|
+
console.log(JSON.stringify((await L()).getRcgovProfileV2(id), null, 2));
|
|
387
|
+
});
|
|
388
|
+
parent
|
|
389
|
+
.command("rcgov-list-v2")
|
|
390
|
+
.description("List profiles")
|
|
391
|
+
.action(async () => {
|
|
392
|
+
console.log(JSON.stringify((await L()).listRcgovProfilesV2(), null, 2));
|
|
393
|
+
});
|
|
394
|
+
parent
|
|
395
|
+
.command("rcgov-create-refresh-v2 <id> <profileId>")
|
|
396
|
+
.description("Create refresh")
|
|
397
|
+
.option("--source <v>", "source")
|
|
398
|
+
.action(async (id, profileId, o) => {
|
|
399
|
+
const m = await L();
|
|
400
|
+
console.log(
|
|
401
|
+
JSON.stringify(
|
|
402
|
+
m.createRcgovRefreshV2({ id, profileId, source: o.source }),
|
|
403
|
+
null,
|
|
404
|
+
2,
|
|
405
|
+
),
|
|
406
|
+
);
|
|
407
|
+
});
|
|
408
|
+
parent
|
|
409
|
+
.command("rcgov-refreshing-refresh-v2 <id>")
|
|
410
|
+
.description("Mark refresh as refreshing")
|
|
411
|
+
.action(async (id) => {
|
|
412
|
+
console.log(
|
|
413
|
+
JSON.stringify((await L()).refreshingRcgovRefreshV2(id), null, 2),
|
|
414
|
+
);
|
|
415
|
+
});
|
|
416
|
+
parent
|
|
417
|
+
.command("rcgov-complete-refresh-v2 <id>")
|
|
418
|
+
.description("Complete refresh")
|
|
419
|
+
.action(async (id) => {
|
|
420
|
+
console.log(
|
|
421
|
+
JSON.stringify((await L()).completeRefreshRcgovV2(id), null, 2),
|
|
422
|
+
);
|
|
423
|
+
});
|
|
424
|
+
parent
|
|
425
|
+
.command("rcgov-fail-refresh-v2 <id> [reason]")
|
|
426
|
+
.description("Fail refresh")
|
|
427
|
+
.action(async (id, reason) => {
|
|
428
|
+
console.log(
|
|
429
|
+
JSON.stringify((await L()).failRcgovRefreshV2(id, reason), null, 2),
|
|
430
|
+
);
|
|
431
|
+
});
|
|
432
|
+
parent
|
|
433
|
+
.command("rcgov-cancel-refresh-v2 <id> [reason]")
|
|
434
|
+
.description("Cancel refresh")
|
|
435
|
+
.action(async (id, reason) => {
|
|
436
|
+
console.log(
|
|
437
|
+
JSON.stringify((await L()).cancelRcgovRefreshV2(id, reason), null, 2),
|
|
438
|
+
);
|
|
439
|
+
});
|
|
440
|
+
parent
|
|
441
|
+
.command("rcgov-get-refresh-v2 <id>")
|
|
442
|
+
.description("Get refresh")
|
|
443
|
+
.action(async (id) => {
|
|
444
|
+
console.log(JSON.stringify((await L()).getRcgovRefreshV2(id), null, 2));
|
|
445
|
+
});
|
|
446
|
+
parent
|
|
447
|
+
.command("rcgov-list-refreshs-v2")
|
|
448
|
+
.description("List refreshs")
|
|
449
|
+
.action(async () => {
|
|
450
|
+
console.log(JSON.stringify((await L()).listRcgovRefreshsV2(), null, 2));
|
|
451
|
+
});
|
|
452
|
+
parent
|
|
453
|
+
.command("rcgov-auto-stale-idle-v2")
|
|
454
|
+
.description("Auto-stale idle")
|
|
455
|
+
.action(async () => {
|
|
456
|
+
console.log(
|
|
457
|
+
JSON.stringify((await L()).autoStaleIdleRcgovProfilesV2(), null, 2),
|
|
458
|
+
);
|
|
459
|
+
});
|
|
460
|
+
parent
|
|
461
|
+
.command("rcgov-auto-fail-stuck-v2")
|
|
462
|
+
.description("Auto-fail stuck refreshs")
|
|
463
|
+
.action(async () => {
|
|
464
|
+
console.log(
|
|
465
|
+
JSON.stringify((await L()).autoFailStuckRcgovRefreshsV2(), null, 2),
|
|
466
|
+
);
|
|
467
|
+
});
|
|
468
|
+
parent
|
|
469
|
+
.command("rcgov-gov-stats-v2")
|
|
470
|
+
.description("V2 gov stats")
|
|
471
|
+
.action(async () => {
|
|
472
|
+
console.log(
|
|
473
|
+
JSON.stringify((await L()).getResponseCacheGovStatsV2(), null, 2),
|
|
474
|
+
);
|
|
475
|
+
});
|
|
476
|
+
}
|