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
|
@@ -677,42 +677,418 @@ export function registerRecommendCommand(program) {
|
|
|
677
677
|
_registerRecommendCrV2(rec);
|
|
678
678
|
}
|
|
679
679
|
|
|
680
|
-
|
|
681
680
|
import {
|
|
682
|
-
RECOMMENDER_PROFILE_MATURITY_V2,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
681
|
+
RECOMMENDER_PROFILE_MATURITY_V2,
|
|
682
|
+
RECOMMENDATION_JOB_LIFECYCLE_V2,
|
|
683
|
+
setMaxActiveRecommenderProfilesPerOwnerV2,
|
|
684
|
+
setMaxPendingRecommendationJobsPerProfileV2,
|
|
685
|
+
setRecommenderProfileIdleMsV2,
|
|
686
|
+
setRecommendationJobStuckMsV2,
|
|
687
|
+
registerRecommenderProfileV2,
|
|
688
|
+
activateRecommenderProfileV2,
|
|
689
|
+
staleRecommenderProfileV2,
|
|
690
|
+
archiveRecommenderProfileV2,
|
|
691
|
+
touchRecommenderProfileV2,
|
|
692
|
+
getRecommenderProfileV2,
|
|
693
|
+
listRecommenderProfilesV2,
|
|
694
|
+
createRecommendationJobV2,
|
|
695
|
+
startRecommendationJobV2,
|
|
696
|
+
completeRecommendationJobV2,
|
|
697
|
+
failRecommendationJobV2,
|
|
698
|
+
cancelRecommendationJobV2,
|
|
699
|
+
getRecommendationJobV2,
|
|
700
|
+
listRecommendationJobsV2,
|
|
701
|
+
autoStaleIdleRecommenderProfilesV2,
|
|
702
|
+
autoFailStuckRecommendationJobsV2,
|
|
703
|
+
getContentRecommenderGovStatsV2,
|
|
687
704
|
} from "../lib/content-recommender.js";
|
|
688
705
|
|
|
689
706
|
function _registerRecommendCrV2(parent) {
|
|
690
|
-
parent
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
parent
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
707
|
+
parent
|
|
708
|
+
.command("cr-enums-v2")
|
|
709
|
+
.description("List Content Recommender V2 enums")
|
|
710
|
+
.option("--json", "JSON")
|
|
711
|
+
.action((opts) => {
|
|
712
|
+
const out = {
|
|
713
|
+
profileMaturity: RECOMMENDER_PROFILE_MATURITY_V2,
|
|
714
|
+
jobLifecycle: RECOMMENDATION_JOB_LIFECYCLE_V2,
|
|
715
|
+
};
|
|
716
|
+
if (opts.json) console.log(JSON.stringify(out, null, 2));
|
|
717
|
+
else console.log(out);
|
|
718
|
+
});
|
|
719
|
+
parent
|
|
720
|
+
.command("cr-config-set-v2")
|
|
721
|
+
.description("Set Content Recommender V2 caps/thresholds")
|
|
722
|
+
.option("--max-active <n>", "max active per owner")
|
|
723
|
+
.option("--max-pending <n>", "max pending per profile")
|
|
724
|
+
.option("--idle-ms <n>", "profile idle ms")
|
|
725
|
+
.option("--stuck-ms <n>", "job stuck ms")
|
|
726
|
+
.action((opts) => {
|
|
727
|
+
if (opts.maxActive)
|
|
728
|
+
setMaxActiveRecommenderProfilesPerOwnerV2(parseInt(opts.maxActive, 10));
|
|
729
|
+
if (opts.maxPending)
|
|
730
|
+
setMaxPendingRecommendationJobsPerProfileV2(
|
|
731
|
+
parseInt(opts.maxPending, 10),
|
|
732
|
+
);
|
|
733
|
+
if (opts.idleMs) setRecommenderProfileIdleMsV2(parseInt(opts.idleMs, 10));
|
|
734
|
+
if (opts.stuckMs)
|
|
735
|
+
setRecommendationJobStuckMsV2(parseInt(opts.stuckMs, 10));
|
|
736
|
+
console.log("ok");
|
|
737
|
+
});
|
|
738
|
+
parent
|
|
739
|
+
.command("cr-register-profile-v2 <id>")
|
|
740
|
+
.description("Register Recommender V2 profile")
|
|
741
|
+
.requiredOption("--owner <owner>", "owner")
|
|
742
|
+
.option("--strategy <s>", "strategy")
|
|
743
|
+
.action((id, opts) => {
|
|
744
|
+
console.log(
|
|
745
|
+
registerRecommenderProfileV2({
|
|
746
|
+
id,
|
|
747
|
+
owner: opts.owner,
|
|
748
|
+
strategy: opts.strategy,
|
|
749
|
+
}),
|
|
750
|
+
);
|
|
751
|
+
});
|
|
752
|
+
parent
|
|
753
|
+
.command("cr-activate-profile-v2 <id>")
|
|
754
|
+
.description("Activate Recommender V2 profile")
|
|
755
|
+
.action((id) => {
|
|
756
|
+
console.log(activateRecommenderProfileV2(id));
|
|
757
|
+
});
|
|
758
|
+
parent
|
|
759
|
+
.command("cr-stale-profile-v2 <id>")
|
|
760
|
+
.description("Mark Recommender V2 profile stale")
|
|
761
|
+
.action((id) => {
|
|
762
|
+
console.log(staleRecommenderProfileV2(id));
|
|
763
|
+
});
|
|
764
|
+
parent
|
|
765
|
+
.command("cr-archive-profile-v2 <id>")
|
|
766
|
+
.description("Archive Recommender V2 profile")
|
|
767
|
+
.action((id) => {
|
|
768
|
+
console.log(archiveRecommenderProfileV2(id));
|
|
769
|
+
});
|
|
770
|
+
parent
|
|
771
|
+
.command("cr-touch-profile-v2 <id>")
|
|
772
|
+
.description("Touch Recommender V2 profile")
|
|
773
|
+
.action((id) => {
|
|
774
|
+
console.log(touchRecommenderProfileV2(id));
|
|
775
|
+
});
|
|
776
|
+
parent
|
|
777
|
+
.command("cr-get-profile-v2 <id>")
|
|
778
|
+
.description("Get Recommender V2 profile")
|
|
779
|
+
.action((id) => {
|
|
780
|
+
console.log(getRecommenderProfileV2(id));
|
|
781
|
+
});
|
|
782
|
+
parent
|
|
783
|
+
.command("cr-list-profiles-v2")
|
|
784
|
+
.description("List Recommender V2 profiles")
|
|
785
|
+
.action(() => {
|
|
786
|
+
console.log(listRecommenderProfilesV2());
|
|
787
|
+
});
|
|
788
|
+
parent
|
|
789
|
+
.command("cr-create-job-v2 <id>")
|
|
790
|
+
.description("Create Recommendation V2 job")
|
|
791
|
+
.requiredOption("--profile-id <pid>", "profile id")
|
|
792
|
+
.option("--query <q>", "query")
|
|
793
|
+
.action((id, opts) => {
|
|
794
|
+
console.log(
|
|
795
|
+
createRecommendationJobV2({
|
|
796
|
+
id,
|
|
797
|
+
profileId: opts.profileId,
|
|
798
|
+
query: opts.query,
|
|
799
|
+
}),
|
|
800
|
+
);
|
|
801
|
+
});
|
|
802
|
+
parent
|
|
803
|
+
.command("cr-start-job-v2 <id>")
|
|
804
|
+
.description("Start Recommendation V2 job")
|
|
805
|
+
.action((id) => {
|
|
806
|
+
console.log(startRecommendationJobV2(id));
|
|
807
|
+
});
|
|
808
|
+
parent
|
|
809
|
+
.command("cr-complete-job-v2 <id>")
|
|
810
|
+
.description("Complete Recommendation V2 job")
|
|
811
|
+
.action((id) => {
|
|
812
|
+
console.log(completeRecommendationJobV2(id));
|
|
813
|
+
});
|
|
814
|
+
parent
|
|
815
|
+
.command("cr-fail-job-v2 <id>")
|
|
816
|
+
.description("Fail Recommendation V2 job")
|
|
817
|
+
.option("--reason <r>", "reason")
|
|
818
|
+
.action((id, opts) => {
|
|
819
|
+
console.log(failRecommendationJobV2(id, opts.reason));
|
|
820
|
+
});
|
|
821
|
+
parent
|
|
822
|
+
.command("cr-cancel-job-v2 <id>")
|
|
823
|
+
.description("Cancel Recommendation V2 job")
|
|
824
|
+
.option("--reason <r>", "reason")
|
|
825
|
+
.action((id, opts) => {
|
|
826
|
+
console.log(cancelRecommendationJobV2(id, opts.reason));
|
|
827
|
+
});
|
|
828
|
+
parent
|
|
829
|
+
.command("cr-get-job-v2 <id>")
|
|
830
|
+
.description("Get Recommendation V2 job")
|
|
831
|
+
.action((id) => {
|
|
832
|
+
console.log(getRecommendationJobV2(id));
|
|
833
|
+
});
|
|
834
|
+
parent
|
|
835
|
+
.command("cr-list-jobs-v2")
|
|
836
|
+
.description("List Recommendation V2 jobs")
|
|
837
|
+
.action(() => {
|
|
838
|
+
console.log(listRecommendationJobsV2());
|
|
839
|
+
});
|
|
840
|
+
parent
|
|
841
|
+
.command("cr-auto-stale-profiles-v2")
|
|
842
|
+
.description("Auto-stale idle Recommender V2 profiles")
|
|
843
|
+
.action(() => {
|
|
844
|
+
console.log(autoStaleIdleRecommenderProfilesV2());
|
|
845
|
+
});
|
|
846
|
+
parent
|
|
847
|
+
.command("cr-auto-fail-jobs-v2")
|
|
848
|
+
.description("Auto-fail stuck Recommendation V2 jobs")
|
|
849
|
+
.action(() => {
|
|
850
|
+
console.log(autoFailStuckRecommendationJobsV2());
|
|
851
|
+
});
|
|
852
|
+
parent
|
|
853
|
+
.command("cr-gov-stats-v2")
|
|
854
|
+
.description("Content Recommender V2 governance stats")
|
|
855
|
+
.option("--json", "JSON")
|
|
856
|
+
.action((opts) => {
|
|
857
|
+
const s = getContentRecommenderGovStatsV2();
|
|
858
|
+
if (opts.json) console.log(JSON.stringify(s, null, 2));
|
|
859
|
+
else console.log(s);
|
|
860
|
+
});
|
|
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
|
+
});
|
|
718
1094
|
}
|
|
@@ -608,3 +608,211 @@ export function registerReputationCommand(program) {
|
|
|
608
608
|
}
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
+
|
|
612
|
+
// === Iter16 V2 governance overlay ===
|
|
613
|
+
export function registerRepgovV2Commands(program) {
|
|
614
|
+
const parent = program.commands.find((c) => c.name() === "reputation");
|
|
615
|
+
if (!parent) return;
|
|
616
|
+
const L = async () => await import("../lib/reputation-optimizer.js");
|
|
617
|
+
parent
|
|
618
|
+
.command("repgov-enums-v2")
|
|
619
|
+
.description("Show V2 enums (repgov maturity + cycle lifecycle)")
|
|
620
|
+
.action(async () => {
|
|
621
|
+
const m = await L();
|
|
622
|
+
console.log(
|
|
623
|
+
JSON.stringify(
|
|
624
|
+
{
|
|
625
|
+
profileMaturity: m.REPGOV_PROFILE_MATURITY_V2,
|
|
626
|
+
cycleLifecycle: m.REPGOV_CYCLE_LIFECYCLE_V2,
|
|
627
|
+
},
|
|
628
|
+
null,
|
|
629
|
+
2,
|
|
630
|
+
),
|
|
631
|
+
);
|
|
632
|
+
});
|
|
633
|
+
parent
|
|
634
|
+
.command("repgov-config-v2")
|
|
635
|
+
.description("Show V2 config thresholds")
|
|
636
|
+
.action(async () => {
|
|
637
|
+
const m = await L();
|
|
638
|
+
console.log(
|
|
639
|
+
JSON.stringify(
|
|
640
|
+
{
|
|
641
|
+
maxActive: m.getMaxActiveRepgovProfilesPerOwnerV2(),
|
|
642
|
+
maxPending: m.getMaxPendingRepgovCyclesPerProfileV2(),
|
|
643
|
+
idleMs: m.getRepgovProfileIdleMsV2(),
|
|
644
|
+
stuckMs: m.getRepgovCycleStuckMsV2(),
|
|
645
|
+
},
|
|
646
|
+
null,
|
|
647
|
+
2,
|
|
648
|
+
),
|
|
649
|
+
);
|
|
650
|
+
});
|
|
651
|
+
parent
|
|
652
|
+
.command("repgov-set-max-active-v2 <n>")
|
|
653
|
+
.description("Set max active profiles per owner")
|
|
654
|
+
.action(async (n) => {
|
|
655
|
+
const m = await L();
|
|
656
|
+
m.setMaxActiveRepgovProfilesPerOwnerV2(Number(n));
|
|
657
|
+
console.log("ok");
|
|
658
|
+
});
|
|
659
|
+
parent
|
|
660
|
+
.command("repgov-set-max-pending-v2 <n>")
|
|
661
|
+
.description("Set max pending cycles per profile")
|
|
662
|
+
.action(async (n) => {
|
|
663
|
+
const m = await L();
|
|
664
|
+
m.setMaxPendingRepgovCyclesPerProfileV2(Number(n));
|
|
665
|
+
console.log("ok");
|
|
666
|
+
});
|
|
667
|
+
parent
|
|
668
|
+
.command("repgov-set-idle-ms-v2 <n>")
|
|
669
|
+
.description("Set profile idle threshold (ms)")
|
|
670
|
+
.action(async (n) => {
|
|
671
|
+
const m = await L();
|
|
672
|
+
m.setRepgovProfileIdleMsV2(Number(n));
|
|
673
|
+
console.log("ok");
|
|
674
|
+
});
|
|
675
|
+
parent
|
|
676
|
+
.command("repgov-set-stuck-ms-v2 <n>")
|
|
677
|
+
.description("Set cycle stuck threshold (ms)")
|
|
678
|
+
.action(async (n) => {
|
|
679
|
+
const m = await L();
|
|
680
|
+
m.setRepgovCycleStuckMsV2(Number(n));
|
|
681
|
+
console.log("ok");
|
|
682
|
+
});
|
|
683
|
+
parent
|
|
684
|
+
.command("repgov-register-v2 <id> <owner>")
|
|
685
|
+
.description("Register V2 repgov profile")
|
|
686
|
+
.option("--objective <v>", "objective")
|
|
687
|
+
.action(async (id, owner, o) => {
|
|
688
|
+
const m = await L();
|
|
689
|
+
console.log(
|
|
690
|
+
JSON.stringify(
|
|
691
|
+
m.registerRepgovProfileV2({ id, owner, objective: o.objective }),
|
|
692
|
+
null,
|
|
693
|
+
2,
|
|
694
|
+
),
|
|
695
|
+
);
|
|
696
|
+
});
|
|
697
|
+
parent
|
|
698
|
+
.command("repgov-activate-v2 <id>")
|
|
699
|
+
.description("Activate profile")
|
|
700
|
+
.action(async (id) => {
|
|
701
|
+
const m = await L();
|
|
702
|
+
console.log(JSON.stringify(m.activateRepgovProfileV2(id), null, 2));
|
|
703
|
+
});
|
|
704
|
+
parent
|
|
705
|
+
.command("repgov-stale-v2 <id>")
|
|
706
|
+
.description("Stale profile")
|
|
707
|
+
.action(async (id) => {
|
|
708
|
+
const m = await L();
|
|
709
|
+
console.log(JSON.stringify(m.staleRepgovProfileV2(id), null, 2));
|
|
710
|
+
});
|
|
711
|
+
parent
|
|
712
|
+
.command("repgov-archive-v2 <id>")
|
|
713
|
+
.description("Archive profile (terminal)")
|
|
714
|
+
.action(async (id) => {
|
|
715
|
+
const m = await L();
|
|
716
|
+
console.log(JSON.stringify(m.archiveRepgovProfileV2(id), null, 2));
|
|
717
|
+
});
|
|
718
|
+
parent
|
|
719
|
+
.command("repgov-touch-v2 <id>")
|
|
720
|
+
.description("Touch profile")
|
|
721
|
+
.action(async (id) => {
|
|
722
|
+
const m = await L();
|
|
723
|
+
console.log(JSON.stringify(m.touchRepgovProfileV2(id), null, 2));
|
|
724
|
+
});
|
|
725
|
+
parent
|
|
726
|
+
.command("repgov-get-v2 <id>")
|
|
727
|
+
.description("Get profile")
|
|
728
|
+
.action(async (id) => {
|
|
729
|
+
const m = await L();
|
|
730
|
+
console.log(JSON.stringify(m.getRepgovProfileV2(id), null, 2));
|
|
731
|
+
});
|
|
732
|
+
parent
|
|
733
|
+
.command("repgov-list-v2")
|
|
734
|
+
.description("List profiles")
|
|
735
|
+
.action(async () => {
|
|
736
|
+
const m = await L();
|
|
737
|
+
console.log(JSON.stringify(m.listRepgovProfilesV2(), null, 2));
|
|
738
|
+
});
|
|
739
|
+
parent
|
|
740
|
+
.command("repgov-create-cycle-v2 <id> <profileId>")
|
|
741
|
+
.description("Create cycle (queued)")
|
|
742
|
+
.option("--subject <v>", "subject")
|
|
743
|
+
.action(async (id, profileId, o) => {
|
|
744
|
+
const m = await L();
|
|
745
|
+
console.log(
|
|
746
|
+
JSON.stringify(
|
|
747
|
+
m.createRepgovCycleV2({ id, profileId, subject: o.subject }),
|
|
748
|
+
null,
|
|
749
|
+
2,
|
|
750
|
+
),
|
|
751
|
+
);
|
|
752
|
+
});
|
|
753
|
+
parent
|
|
754
|
+
.command("repgov-running-cycle-v2 <id>")
|
|
755
|
+
.description("Mark cycle as running")
|
|
756
|
+
.action(async (id) => {
|
|
757
|
+
const m = await L();
|
|
758
|
+
console.log(JSON.stringify(m.runningRepgovCycleV2(id), null, 2));
|
|
759
|
+
});
|
|
760
|
+
parent
|
|
761
|
+
.command("repgov-complete-cycle-v2 <id>")
|
|
762
|
+
.description("Complete cycle")
|
|
763
|
+
.action(async (id) => {
|
|
764
|
+
const m = await L();
|
|
765
|
+
console.log(JSON.stringify(m.completeCycleRepgovV2(id), null, 2));
|
|
766
|
+
});
|
|
767
|
+
parent
|
|
768
|
+
.command("repgov-fail-cycle-v2 <id> [reason]")
|
|
769
|
+
.description("Fail cycle")
|
|
770
|
+
.action(async (id, reason) => {
|
|
771
|
+
const m = await L();
|
|
772
|
+
console.log(JSON.stringify(m.failRepgovCycleV2(id, reason), null, 2));
|
|
773
|
+
});
|
|
774
|
+
parent
|
|
775
|
+
.command("repgov-cancel-cycle-v2 <id> [reason]")
|
|
776
|
+
.description("Cancel cycle")
|
|
777
|
+
.action(async (id, reason) => {
|
|
778
|
+
const m = await L();
|
|
779
|
+
console.log(JSON.stringify(m.cancelRepgovCycleV2(id, reason), null, 2));
|
|
780
|
+
});
|
|
781
|
+
parent
|
|
782
|
+
.command("repgov-get-cycle-v2 <id>")
|
|
783
|
+
.description("Get cycle")
|
|
784
|
+
.action(async (id) => {
|
|
785
|
+
const m = await L();
|
|
786
|
+
console.log(JSON.stringify(m.getRepgovCycleV2(id), null, 2));
|
|
787
|
+
});
|
|
788
|
+
parent
|
|
789
|
+
.command("repgov-list-cycles-v2")
|
|
790
|
+
.description("List cycles")
|
|
791
|
+
.action(async () => {
|
|
792
|
+
const m = await L();
|
|
793
|
+
console.log(JSON.stringify(m.listRepgovCyclesV2(), null, 2));
|
|
794
|
+
});
|
|
795
|
+
parent
|
|
796
|
+
.command("repgov-auto-stale-idle-v2")
|
|
797
|
+
.description("Auto-stale idle profiles")
|
|
798
|
+
.action(async () => {
|
|
799
|
+
const m = await L();
|
|
800
|
+
console.log(JSON.stringify(m.autoStaleIdleRepgovProfilesV2(), null, 2));
|
|
801
|
+
});
|
|
802
|
+
parent
|
|
803
|
+
.command("repgov-auto-fail-stuck-v2")
|
|
804
|
+
.description("Auto-fail stuck cycles")
|
|
805
|
+
.action(async () => {
|
|
806
|
+
const m = await L();
|
|
807
|
+
console.log(JSON.stringify(m.autoFailStuckRepgovCyclesV2(), null, 2));
|
|
808
|
+
});
|
|
809
|
+
parent
|
|
810
|
+
.command("repgov-gov-stats-v2")
|
|
811
|
+
.description("V2 gov aggregate stats")
|
|
812
|
+
.action(async () => {
|
|
813
|
+
const m = await L();
|
|
814
|
+
console.log(
|
|
815
|
+
JSON.stringify(m.getReputationOptimizerGovStatsV2(), null, 2),
|
|
816
|
+
);
|
|
817
|
+
});
|
|
818
|
+
}
|