chainlesschain 0.143.0 → 0.145.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/a2a.js +196 -28
- package/src/commands/activitypub.js +157 -27
- package/src/commands/agent.js +587 -103
- package/src/commands/audit.js +206 -0
- package/src/commands/bi.js +152 -27
- package/src/commands/bm25.js +111 -27
- package/src/commands/browse.js +190 -29
- package/src/commands/ccron.js +128 -28
- package/src/commands/chat.js +207 -0
- package/src/commands/compliance.js +414 -34
- package/src/commands/compt.js +127 -29
- package/src/commands/consol.js +8 -2
- package/src/commands/cowork.js +580 -34
- package/src/commands/crosschain.js +182 -28
- package/src/commands/dao.js +182 -28
- package/src/commands/dlp.js +172 -27
- package/src/commands/economy.js +205 -50
- package/src/commands/evolution.js +203 -50
- package/src/commands/evomap.js +182 -27
- package/src/commands/fflag.js +74 -22
- package/src/commands/git.js +177 -37
- package/src/commands/hardening.js +209 -0
- package/src/commands/hmemory.js +204 -50
- package/src/commands/incentive.js +209 -0
- package/src/commands/inference.js +170 -34
- package/src/commands/itbudget.js +149 -33
- package/src/commands/kg.js +206 -0
- package/src/commands/lowcode.js +195 -38
- package/src/commands/marketplace.js +206 -0
- package/src/commands/matrix.js +179 -27
- package/src/commands/mcpscaf.js +145 -33
- package/src/commands/meminj.js +145 -33
- package/src/commands/nostr.js +178 -27
- package/src/commands/orchestrate.js +217 -0
- package/src/commands/orchgov.js +144 -33
- package/src/commands/pdfp.js +109 -27
- package/src/commands/perf.js +169 -32
- package/src/commands/perm.js +144 -33
- package/src/commands/pipeline.js +207 -52
- package/src/commands/planmode.js +141 -32
- package/src/commands/privacy.js +203 -0
- package/src/commands/promcomp.js +111 -27
- package/src/commands/recommend.js +177 -34
- package/src/commands/reputation.js +208 -0
- package/src/commands/sandbox.js +206 -0
- package/src/commands/seshhook.js +145 -33
- package/src/commands/seshsearch.js +141 -33
- package/src/commands/seshtail.js +144 -33
- package/src/commands/seshu.js +152 -33
- package/src/commands/sganal.js +123 -29
- package/src/commands/siem.js +201 -34
- package/src/commands/sla.js +212 -0
- package/src/commands/slotfill.js +146 -33
- package/src/commands/social.js +157 -32
- package/src/commands/stress.js +206 -0
- package/src/commands/svccont.js +145 -33
- package/src/commands/terraform.js +206 -0
- package/src/commands/tms.js +171 -33
- package/src/commands/topiccls.js +146 -33
- package/src/commands/uprof.js +141 -32
- package/src/commands/vcheck.js +122 -28
- package/src/commands/webfetch.js +141 -32
- package/src/commands/zkp.js +184 -28
- package/src/index.js +40 -0
- package/src/lib/a2a-protocol.js +319 -51
- package/src/lib/activitypub-bridge.js +288 -50
- package/src/lib/agent-economy.js +304 -51
- package/src/lib/app-builder.js +279 -46
- package/src/lib/audit-logger.js +321 -0
- package/src/lib/autonomous-agent.js +284 -48
- package/src/lib/bi-engine.js +283 -49
- package/src/lib/bm25-search.js +301 -49
- package/src/lib/browser-automation.js +296 -49
- package/src/lib/chat-core.js +336 -0
- package/src/lib/claude-code-bridge.js +341 -0
- package/src/lib/compliance-framework-reporter.js +305 -51
- package/src/lib/compliance-manager.js +330 -0
- package/src/lib/compression-telemetry.js +301 -49
- package/src/lib/content-recommender.js +317 -52
- package/src/lib/cowork-cron.js +298 -49
- package/src/lib/cowork-learning.js +333 -0
- package/src/lib/cowork-task-runner.js +308 -51
- package/src/lib/cowork-workflow.js +327 -0
- package/src/lib/cross-chain.js +311 -51
- package/src/lib/dao-governance.js +280 -46
- package/src/lib/dlp-engine.js +287 -49
- package/src/lib/evolution-system.js +278 -47
- package/src/lib/evomap-manager.js +280 -46
- package/src/lib/execution-backend.js +294 -48
- package/src/lib/feature-flags.js +294 -49
- package/src/lib/git-integration.js +285 -47
- package/src/lib/hardening-manager.js +341 -0
- package/src/lib/hierarchical-memory.js +284 -48
- package/src/lib/inference-network.js +308 -51
- package/src/lib/iteration-budget.js +302 -50
- package/src/lib/knowledge-graph.js +333 -0
- package/src/lib/matrix-bridge.js +281 -47
- package/src/lib/mcp-scaffold.js +318 -54
- package/src/lib/memory-injection.js +288 -49
- package/src/lib/nostr-bridge.js +286 -49
- package/src/lib/orchestrator.js +293 -48
- package/src/lib/pdf-parser.js +298 -49
- package/src/lib/perf-tuning.js +309 -50
- package/src/lib/permission-engine.js +287 -49
- package/src/lib/pipeline-orchestrator.js +289 -49
- package/src/lib/plan-mode.js +298 -51
- package/src/lib/privacy-computing.js +335 -0
- package/src/lib/reputation-optimizer.js +340 -0
- package/src/lib/sandbox-v2.js +327 -0
- package/src/lib/service-container.js +313 -52
- package/src/lib/session-consolidator.js +296 -49
- package/src/lib/session-hooks.js +312 -53
- package/src/lib/session-search.js +304 -51
- package/src/lib/session-tail.js +288 -49
- package/src/lib/session-usage.js +298 -52
- package/src/lib/siem-exporter.js +298 -51
- package/src/lib/skill-marketplace.js +345 -0
- package/src/lib/sla-manager.js +341 -0
- package/src/lib/slot-filler.js +303 -51
- package/src/lib/social-graph-analytics.js +295 -49
- package/src/lib/social-graph.js +272 -49
- package/src/lib/stress-tester.js +342 -0
- package/src/lib/sub-agent-registry.js +302 -53
- package/src/lib/task-model-selector.js +302 -50
- package/src/lib/terraform-manager.js +333 -0
- package/src/lib/todo-manager.js +281 -47
- package/src/lib/token-incentive.js +341 -0
- package/src/lib/topic-classifier.js +297 -49
- package/src/lib/user-profile.js +294 -50
- package/src/lib/version-checker.js +304 -50
- package/src/lib/web-fetch.js +292 -51
- package/src/lib/zkp-engine.js +286 -49
package/src/commands/promcomp.js
CHANGED
|
@@ -39,44 +39,128 @@ export function registerPromcompCommand(program) {
|
|
|
39
39
|
|
|
40
40
|
pc.command("enums-v2")
|
|
41
41
|
.description("Show V2 enums")
|
|
42
|
-
.action(() =>
|
|
42
|
+
.action(() =>
|
|
43
|
+
console.log(
|
|
44
|
+
JSON.stringify(
|
|
45
|
+
{ PCOMP_PROFILE_MATURITY_V2, PCOMP_RUN_LIFECYCLE_V2 },
|
|
46
|
+
null,
|
|
47
|
+
2,
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
);
|
|
43
51
|
pc.command("register-profile-v2")
|
|
44
52
|
.requiredOption("--id <id>")
|
|
45
53
|
.requiredOption("--owner <owner>")
|
|
46
54
|
.option("--variant <variant>", "compressor variant", "default")
|
|
47
|
-
.action((o) =>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
pc.command("
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
pc.command("
|
|
55
|
+
.action((o) =>
|
|
56
|
+
console.log(JSON.stringify(registerPcompProfileV2(o), null, 2)),
|
|
57
|
+
);
|
|
58
|
+
pc.command("activate-profile-v2 <id>").action((id) =>
|
|
59
|
+
console.log(JSON.stringify(activatePcompProfileV2(id), null, 2)),
|
|
60
|
+
);
|
|
61
|
+
pc.command("stale-profile-v2 <id>").action((id) =>
|
|
62
|
+
console.log(JSON.stringify(stalePcompProfileV2(id), null, 2)),
|
|
63
|
+
);
|
|
64
|
+
pc.command("archive-profile-v2 <id>").action((id) =>
|
|
65
|
+
console.log(JSON.stringify(archivePcompProfileV2(id), null, 2)),
|
|
66
|
+
);
|
|
67
|
+
pc.command("touch-profile-v2 <id>").action((id) =>
|
|
68
|
+
console.log(JSON.stringify(touchPcompProfileV2(id), null, 2)),
|
|
69
|
+
);
|
|
70
|
+
pc.command("get-profile-v2 <id>").action((id) =>
|
|
71
|
+
console.log(JSON.stringify(getPcompProfileV2(id), null, 2)),
|
|
72
|
+
);
|
|
73
|
+
pc.command("list-profiles-v2").action(() =>
|
|
74
|
+
console.log(JSON.stringify(listPcompProfilesV2(), null, 2)),
|
|
75
|
+
);
|
|
54
76
|
|
|
55
77
|
pc.command("create-run-v2")
|
|
56
78
|
.requiredOption("--id <id>")
|
|
57
79
|
.requiredOption("--profile-id <profileId>")
|
|
58
80
|
.option("--input <input>", "input prompt", "")
|
|
59
81
|
.action((o) => console.log(JSON.stringify(createPcompRunV2(o), null, 2)));
|
|
60
|
-
pc.command("compressing-run-v2 <id>").action((id) =>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
pc.command("
|
|
64
|
-
|
|
65
|
-
|
|
82
|
+
pc.command("compressing-run-v2 <id>").action((id) =>
|
|
83
|
+
console.log(JSON.stringify(compressingPcompRunV2(id), null, 2)),
|
|
84
|
+
);
|
|
85
|
+
pc.command("compress-run-v2 <id>").action((id) =>
|
|
86
|
+
console.log(JSON.stringify(compressPcompRunV2(id), null, 2)),
|
|
87
|
+
);
|
|
88
|
+
pc.command("fail-run-v2 <id>")
|
|
89
|
+
.option("--reason <r>")
|
|
90
|
+
.action((id, o) =>
|
|
91
|
+
console.log(JSON.stringify(failPcompRunV2(id, o.reason), null, 2)),
|
|
92
|
+
);
|
|
93
|
+
pc.command("cancel-run-v2 <id>")
|
|
94
|
+
.option("--reason <r>")
|
|
95
|
+
.action((id, o) =>
|
|
96
|
+
console.log(JSON.stringify(cancelPcompRunV2(id, o.reason), null, 2)),
|
|
97
|
+
);
|
|
98
|
+
pc.command("get-run-v2 <id>").action((id) =>
|
|
99
|
+
console.log(JSON.stringify(getPcompRunV2(id), null, 2)),
|
|
100
|
+
);
|
|
101
|
+
pc.command("list-runs-v2").action(() =>
|
|
102
|
+
console.log(JSON.stringify(listPcompRunsV2(), null, 2)),
|
|
103
|
+
);
|
|
66
104
|
|
|
67
105
|
pc.command("config-v2").action(() =>
|
|
68
|
-
console.log(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
106
|
+
console.log(
|
|
107
|
+
JSON.stringify(
|
|
108
|
+
{
|
|
109
|
+
maxActivePcompProfilesPerOwner: getMaxActivePcompProfilesPerOwnerV2(),
|
|
110
|
+
maxPendingPcompRunsPerProfile: getMaxPendingPcompRunsPerProfileV2(),
|
|
111
|
+
pcompProfileIdleMs: getPcompProfileIdleMsV2(),
|
|
112
|
+
pcompRunStuckMs: getPcompRunStuckMsV2(),
|
|
113
|
+
},
|
|
114
|
+
null,
|
|
115
|
+
2,
|
|
116
|
+
),
|
|
117
|
+
),
|
|
118
|
+
);
|
|
119
|
+
pc.command("set-max-active-profiles-v2 <n>").action((n) => {
|
|
120
|
+
setMaxActivePcompProfilesPerOwnerV2(Number(n));
|
|
121
|
+
console.log(
|
|
122
|
+
JSON.stringify(
|
|
123
|
+
{
|
|
124
|
+
maxActivePcompProfilesPerOwner: getMaxActivePcompProfilesPerOwnerV2(),
|
|
125
|
+
},
|
|
126
|
+
null,
|
|
127
|
+
2,
|
|
128
|
+
),
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
pc.command("set-max-pending-runs-v2 <n>").action((n) => {
|
|
132
|
+
setMaxPendingPcompRunsPerProfileV2(Number(n));
|
|
133
|
+
console.log(
|
|
134
|
+
JSON.stringify(
|
|
135
|
+
{ maxPendingPcompRunsPerProfile: getMaxPendingPcompRunsPerProfileV2() },
|
|
136
|
+
null,
|
|
137
|
+
2,
|
|
138
|
+
),
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
pc.command("set-profile-idle-ms-v2 <ms>").action((ms) => {
|
|
142
|
+
setPcompProfileIdleMsV2(Number(ms));
|
|
143
|
+
console.log(
|
|
144
|
+
JSON.stringify(
|
|
145
|
+
{ pcompProfileIdleMs: getPcompProfileIdleMsV2() },
|
|
146
|
+
null,
|
|
147
|
+
2,
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
pc.command("set-run-stuck-ms-v2 <ms>").action((ms) => {
|
|
152
|
+
setPcompRunStuckMsV2(Number(ms));
|
|
153
|
+
console.log(
|
|
154
|
+
JSON.stringify({ pcompRunStuckMs: getPcompRunStuckMsV2() }, null, 2),
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
pc.command("auto-stale-idle-v2").action(() =>
|
|
158
|
+
console.log(JSON.stringify(autoStaleIdlePcompProfilesV2(), null, 2)),
|
|
159
|
+
);
|
|
160
|
+
pc.command("auto-fail-stuck-v2").action(() =>
|
|
161
|
+
console.log(JSON.stringify(autoFailStuckPcompRunsV2(), null, 2)),
|
|
162
|
+
);
|
|
163
|
+
pc.command("gov-stats-v2").action(() =>
|
|
164
|
+
console.log(JSON.stringify(getPromptCompressorGovStatsV2(), null, 2)),
|
|
74
165
|
);
|
|
75
|
-
pc.command("set-max-active-profiles-v2 <n>").action((n) => { setMaxActivePcompProfilesPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActivePcompProfilesPerOwner: getMaxActivePcompProfilesPerOwnerV2() }, null, 2)); });
|
|
76
|
-
pc.command("set-max-pending-runs-v2 <n>").action((n) => { setMaxPendingPcompRunsPerProfileV2(Number(n)); console.log(JSON.stringify({ maxPendingPcompRunsPerProfile: getMaxPendingPcompRunsPerProfileV2() }, null, 2)); });
|
|
77
|
-
pc.command("set-profile-idle-ms-v2 <ms>").action((ms) => { setPcompProfileIdleMsV2(Number(ms)); console.log(JSON.stringify({ pcompProfileIdleMs: getPcompProfileIdleMsV2() }, null, 2)); });
|
|
78
|
-
pc.command("set-run-stuck-ms-v2 <ms>").action((ms) => { setPcompRunStuckMsV2(Number(ms)); console.log(JSON.stringify({ pcompRunStuckMs: getPcompRunStuckMsV2() }, null, 2)); });
|
|
79
|
-
pc.command("auto-stale-idle-v2").action(() => console.log(JSON.stringify(autoStaleIdlePcompProfilesV2(), null, 2)));
|
|
80
|
-
pc.command("auto-fail-stuck-v2").action(() => console.log(JSON.stringify(autoFailStuckPcompRunsV2(), null, 2)));
|
|
81
|
-
pc.command("gov-stats-v2").action(() => console.log(JSON.stringify(getPromptCompressorGovStatsV2(), null, 2)));
|
|
82
166
|
}
|
|
@@ -677,42 +677,185 @@ 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
|
+
});
|
|
718
861
|
}
|
|
@@ -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
|
+
}
|