chainlesschain 0.145.0 → 0.156.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/README.md +52 -3
- package/package.json +1 -1
- package/src/commands/a2a.js +201 -0
- package/src/commands/activitypub.js +207 -0
- package/src/commands/agent-network.js +217 -0
- package/src/commands/agent.js +1250 -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/chat.js +605 -0
- package/src/commands/cli-anything.js +426 -0
- package/src/commands/codegen.js +207 -0
- package/src/commands/collab.js +211 -0
- package/src/commands/compliance.js +822 -0
- package/src/commands/config.js +213 -0
- package/src/commands/cowork.js +1666 -0
- package/src/commands/crosschain.js +203 -0
- package/src/commands/dao.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/economy.js +199 -0
- package/src/commands/encrypt.js +201 -0
- package/src/commands/evolution.js +199 -0
- package/src/commands/evomap.js +830 -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/hmemory.js +203 -0
- package/src/commands/hook.js +209 -0
- package/src/commands/import.js +209 -0
- package/src/commands/inference.js +207 -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/kg.js +195 -0
- package/src/commands/llm.js +426 -0
- package/src/commands/matrix.js +207 -0
- package/src/commands/mcp.js +217 -0
- package/src/commands/memory.js +412 -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/orchestrate.js +406 -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/pipeline.js +199 -0
- package/src/commands/planmode.js +426 -0
- package/src/commands/plugin-ecosystem.js +209 -0
- package/src/commands/plugin.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/services.js +207 -0
- package/src/commands/session.js +209 -0
- package/src/commands/setup.js +205 -0
- package/src/commands/skill.js +414 -0
- package/src/commands/social.js +201 -0
- package/src/commands/sso.js +209 -0
- package/src/commands/start.js +209 -0
- package/src/commands/stream.js +213 -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/ui.js +225 -0
- package/src/commands/wallet.js +209 -0
- package/src/commands/workflow.js +412 -0
- package/src/index.js +252 -0
- package/src/lib/a2a-protocol.js +332 -0
- package/src/lib/activitypub-bridge.js +334 -0
- package/src/lib/agent-coordinator.js +334 -0
- package/src/lib/agent-economy.js +334 -0
- package/src/lib/agent-network.js +341 -0
- package/src/lib/agent-router.js +333 -0
- package/src/lib/aiops.js +346 -0
- package/src/lib/automation-engine.js +335 -0
- package/src/lib/autonomous-agent.js +332 -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/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/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-manager.js +334 -0
- package/src/lib/content-recommendation.js +351 -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-share.js +338 -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/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/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-governance.js +334 -0
- package/src/lib/evomap-manager.js +330 -0
- package/src/lib/execution-backend.js +330 -0
- package/src/lib/federation-hardening.js +340 -0
- package/src/lib/hashline.js +338 -0
- package/src/lib/hierarchical-memory.js +334 -0
- package/src/lib/hook-manager.js +341 -0
- package/src/lib/inference-network.js +341 -0
- package/src/lib/instinct-manager.js +346 -0
- package/src/lib/interaction-adapter.js +330 -0
- package/src/lib/interactive-planner.js +354 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/knowledge-exporter.js +341 -0
- package/src/lib/knowledge-graph.js +331 -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/pipeline-orchestrator.js +332 -0
- package/src/lib/plan-mode.js +336 -0
- package/src/lib/plugin-autodiscovery.js +334 -0
- package/src/lib/plugin-ecosystem.js +346 -0
- package/src/lib/pqc-manager.js +346 -0
- package/src/lib/process-manager.js +336 -0
- package/src/lib/protocol-fusion.js +338 -0
- package/src/lib/provider-options.js +346 -0
- package/src/lib/provider-stream.js +348 -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/service-manager.js +337 -0
- package/src/lib/session-core-singletons.js +341 -0
- package/src/lib/session-manager.js +334 -0
- package/src/lib/skill-loader.js +334 -0
- package/src/lib/skill-mcp.js +336 -0
- package/src/lib/social-manager.js +330 -0
- package/src/lib/sso-manager.js +340 -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/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/todo-manager.js +336 -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/web-ui-server.js +348 -0
- package/src/lib/workflow-engine.js +330 -0
- package/src/lib/workflow-expr.js +346 -0
- package/src/lib/ws-chat-handler.js +337 -0
|
@@ -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
|
+
}
|
|
@@ -859,3 +859,236 @@ function _registerRecommendCrV2(parent) {
|
|
|
859
859
|
else console.log(s);
|
|
860
860
|
});
|
|
861
861
|
}
|
|
862
|
+
|
|
863
|
+
// === Iter24 V2 governance overlay ===
|
|
864
|
+
export function registerRcmdgovV2Commands(program) {
|
|
865
|
+
const parent = program.commands.find((c) => c.name() === "recommend");
|
|
866
|
+
if (!parent) return;
|
|
867
|
+
const L = async () => await import("../lib/content-recommendation.js");
|
|
868
|
+
parent
|
|
869
|
+
.command("rcmdgov-enums-v2")
|
|
870
|
+
.description("Show V2 enums")
|
|
871
|
+
.action(async () => {
|
|
872
|
+
const m = await L();
|
|
873
|
+
console.log(
|
|
874
|
+
JSON.stringify(
|
|
875
|
+
{
|
|
876
|
+
profileMaturity: m.RCMDGOV_PROFILE_MATURITY_V2,
|
|
877
|
+
recommendationLifecycle: m.RCMDGOV_RECOMMENDATION_LIFECYCLE_V2,
|
|
878
|
+
},
|
|
879
|
+
null,
|
|
880
|
+
2,
|
|
881
|
+
),
|
|
882
|
+
);
|
|
883
|
+
});
|
|
884
|
+
parent
|
|
885
|
+
.command("rcmdgov-config-v2")
|
|
886
|
+
.description("Show V2 config")
|
|
887
|
+
.action(async () => {
|
|
888
|
+
const m = await L();
|
|
889
|
+
console.log(
|
|
890
|
+
JSON.stringify(
|
|
891
|
+
{
|
|
892
|
+
maxActive: m.getMaxActiveRcmdgovProfilesPerOwnerV2(),
|
|
893
|
+
maxPending: m.getMaxPendingRcmdgovRecommendationsPerProfileV2(),
|
|
894
|
+
idleMs: m.getRcmdgovProfileIdleMsV2(),
|
|
895
|
+
stuckMs: m.getRcmdgovRecommendationStuckMsV2(),
|
|
896
|
+
},
|
|
897
|
+
null,
|
|
898
|
+
2,
|
|
899
|
+
),
|
|
900
|
+
);
|
|
901
|
+
});
|
|
902
|
+
parent
|
|
903
|
+
.command("rcmdgov-set-max-active-v2 <n>")
|
|
904
|
+
.description("Set max active")
|
|
905
|
+
.action(async (n) => {
|
|
906
|
+
(await L()).setMaxActiveRcmdgovProfilesPerOwnerV2(Number(n));
|
|
907
|
+
console.log("ok");
|
|
908
|
+
});
|
|
909
|
+
parent
|
|
910
|
+
.command("rcmdgov-set-max-pending-v2 <n>")
|
|
911
|
+
.description("Set max pending")
|
|
912
|
+
.action(async (n) => {
|
|
913
|
+
(await L()).setMaxPendingRcmdgovRecommendationsPerProfileV2(Number(n));
|
|
914
|
+
console.log("ok");
|
|
915
|
+
});
|
|
916
|
+
parent
|
|
917
|
+
.command("rcmdgov-set-idle-ms-v2 <n>")
|
|
918
|
+
.description("Set idle threshold ms")
|
|
919
|
+
.action(async (n) => {
|
|
920
|
+
(await L()).setRcmdgovProfileIdleMsV2(Number(n));
|
|
921
|
+
console.log("ok");
|
|
922
|
+
});
|
|
923
|
+
parent
|
|
924
|
+
.command("rcmdgov-set-stuck-ms-v2 <n>")
|
|
925
|
+
.description("Set stuck threshold ms")
|
|
926
|
+
.action(async (n) => {
|
|
927
|
+
(await L()).setRcmdgovRecommendationStuckMsV2(Number(n));
|
|
928
|
+
console.log("ok");
|
|
929
|
+
});
|
|
930
|
+
parent
|
|
931
|
+
.command("rcmdgov-register-v2 <id> <owner>")
|
|
932
|
+
.description("Register V2 profile")
|
|
933
|
+
.option("--channel <v>", "channel")
|
|
934
|
+
.action(async (id, owner, o) => {
|
|
935
|
+
const m = await L();
|
|
936
|
+
console.log(
|
|
937
|
+
JSON.stringify(
|
|
938
|
+
m.registerRcmdgovProfileV2({ id, owner, channel: o.channel }),
|
|
939
|
+
null,
|
|
940
|
+
2,
|
|
941
|
+
),
|
|
942
|
+
);
|
|
943
|
+
});
|
|
944
|
+
parent
|
|
945
|
+
.command("rcmdgov-activate-v2 <id>")
|
|
946
|
+
.description("Activate profile")
|
|
947
|
+
.action(async (id) => {
|
|
948
|
+
console.log(
|
|
949
|
+
JSON.stringify((await L()).activateRcmdgovProfileV2(id), null, 2),
|
|
950
|
+
);
|
|
951
|
+
});
|
|
952
|
+
parent
|
|
953
|
+
.command("rcmdgov-stale-v2 <id>")
|
|
954
|
+
.description("Stale profile")
|
|
955
|
+
.action(async (id) => {
|
|
956
|
+
console.log(
|
|
957
|
+
JSON.stringify((await L()).staleRcmdgovProfileV2(id), null, 2),
|
|
958
|
+
);
|
|
959
|
+
});
|
|
960
|
+
parent
|
|
961
|
+
.command("rcmdgov-archive-v2 <id>")
|
|
962
|
+
.description("Archive profile")
|
|
963
|
+
.action(async (id) => {
|
|
964
|
+
console.log(
|
|
965
|
+
JSON.stringify((await L()).archiveRcmdgovProfileV2(id), null, 2),
|
|
966
|
+
);
|
|
967
|
+
});
|
|
968
|
+
parent
|
|
969
|
+
.command("rcmdgov-touch-v2 <id>")
|
|
970
|
+
.description("Touch profile")
|
|
971
|
+
.action(async (id) => {
|
|
972
|
+
console.log(
|
|
973
|
+
JSON.stringify((await L()).touchRcmdgovProfileV2(id), null, 2),
|
|
974
|
+
);
|
|
975
|
+
});
|
|
976
|
+
parent
|
|
977
|
+
.command("rcmdgov-get-v2 <id>")
|
|
978
|
+
.description("Get profile")
|
|
979
|
+
.action(async (id) => {
|
|
980
|
+
console.log(JSON.stringify((await L()).getRcmdgovProfileV2(id), null, 2));
|
|
981
|
+
});
|
|
982
|
+
parent
|
|
983
|
+
.command("rcmdgov-list-v2")
|
|
984
|
+
.description("List profiles")
|
|
985
|
+
.action(async () => {
|
|
986
|
+
console.log(JSON.stringify((await L()).listRcmdgovProfilesV2(), null, 2));
|
|
987
|
+
});
|
|
988
|
+
parent
|
|
989
|
+
.command("rcmdgov-create-recommendation-v2 <id> <profileId>")
|
|
990
|
+
.description("Create recommendation")
|
|
991
|
+
.option("--user <v>", "user")
|
|
992
|
+
.action(async (id, profileId, o) => {
|
|
993
|
+
const m = await L();
|
|
994
|
+
console.log(
|
|
995
|
+
JSON.stringify(
|
|
996
|
+
m.createRcmdgovRecommendationV2({ id, profileId, user: o.user }),
|
|
997
|
+
null,
|
|
998
|
+
2,
|
|
999
|
+
),
|
|
1000
|
+
);
|
|
1001
|
+
});
|
|
1002
|
+
parent
|
|
1003
|
+
.command("rcmdgov-scoring-recommendation-v2 <id>")
|
|
1004
|
+
.description("Mark recommendation as scoring")
|
|
1005
|
+
.action(async (id) => {
|
|
1006
|
+
console.log(
|
|
1007
|
+
JSON.stringify((await L()).scoringRcmdgovRecommendationV2(id), null, 2),
|
|
1008
|
+
);
|
|
1009
|
+
});
|
|
1010
|
+
parent
|
|
1011
|
+
.command("rcmdgov-complete-recommendation-v2 <id>")
|
|
1012
|
+
.description("Complete recommendation")
|
|
1013
|
+
.action(async (id) => {
|
|
1014
|
+
console.log(
|
|
1015
|
+
JSON.stringify(
|
|
1016
|
+
(await L()).completeRecommendationRcmdgovV2(id),
|
|
1017
|
+
null,
|
|
1018
|
+
2,
|
|
1019
|
+
),
|
|
1020
|
+
);
|
|
1021
|
+
});
|
|
1022
|
+
parent
|
|
1023
|
+
.command("rcmdgov-fail-recommendation-v2 <id> [reason]")
|
|
1024
|
+
.description("Fail recommendation")
|
|
1025
|
+
.action(async (id, reason) => {
|
|
1026
|
+
console.log(
|
|
1027
|
+
JSON.stringify(
|
|
1028
|
+
(await L()).failRcmdgovRecommendationV2(id, reason),
|
|
1029
|
+
null,
|
|
1030
|
+
2,
|
|
1031
|
+
),
|
|
1032
|
+
);
|
|
1033
|
+
});
|
|
1034
|
+
parent
|
|
1035
|
+
.command("rcmdgov-cancel-recommendation-v2 <id> [reason]")
|
|
1036
|
+
.description("Cancel recommendation")
|
|
1037
|
+
.action(async (id, reason) => {
|
|
1038
|
+
console.log(
|
|
1039
|
+
JSON.stringify(
|
|
1040
|
+
(await L()).cancelRcmdgovRecommendationV2(id, reason),
|
|
1041
|
+
null,
|
|
1042
|
+
2,
|
|
1043
|
+
),
|
|
1044
|
+
);
|
|
1045
|
+
});
|
|
1046
|
+
parent
|
|
1047
|
+
.command("rcmdgov-get-recommendation-v2 <id>")
|
|
1048
|
+
.description("Get recommendation")
|
|
1049
|
+
.action(async (id) => {
|
|
1050
|
+
console.log(
|
|
1051
|
+
JSON.stringify((await L()).getRcmdgovRecommendationV2(id), null, 2),
|
|
1052
|
+
);
|
|
1053
|
+
});
|
|
1054
|
+
parent
|
|
1055
|
+
.command("rcmdgov-list-recommendations-v2")
|
|
1056
|
+
.description("List recommendations")
|
|
1057
|
+
.action(async () => {
|
|
1058
|
+
console.log(
|
|
1059
|
+
JSON.stringify((await L()).listRcmdgovRecommendationsV2(), null, 2),
|
|
1060
|
+
);
|
|
1061
|
+
});
|
|
1062
|
+
parent
|
|
1063
|
+
.command("rcmdgov-auto-stale-idle-v2")
|
|
1064
|
+
.description("Auto-stale idle")
|
|
1065
|
+
.action(async () => {
|
|
1066
|
+
console.log(
|
|
1067
|
+
JSON.stringify((await L()).autoStaleIdleRcmdgovProfilesV2(), null, 2),
|
|
1068
|
+
);
|
|
1069
|
+
});
|
|
1070
|
+
parent
|
|
1071
|
+
.command("rcmdgov-auto-fail-stuck-v2")
|
|
1072
|
+
.description("Auto-fail stuck recommendations")
|
|
1073
|
+
.action(async () => {
|
|
1074
|
+
console.log(
|
|
1075
|
+
JSON.stringify(
|
|
1076
|
+
(await L()).autoFailStuckRcmdgovRecommendationsV2(),
|
|
1077
|
+
null,
|
|
1078
|
+
2,
|
|
1079
|
+
),
|
|
1080
|
+
);
|
|
1081
|
+
});
|
|
1082
|
+
parent
|
|
1083
|
+
.command("rcmdgov-gov-stats-v2")
|
|
1084
|
+
.description("V2 gov stats")
|
|
1085
|
+
.action(async () => {
|
|
1086
|
+
console.log(
|
|
1087
|
+
JSON.stringify(
|
|
1088
|
+
(await L()).getContentRecommendationGovStatsV2(),
|
|
1089
|
+
null,
|
|
1090
|
+
2,
|
|
1091
|
+
),
|
|
1092
|
+
);
|
|
1093
|
+
});
|
|
1094
|
+
}
|