chainlesschain 0.132.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 +230 -0
- package/src/commands/activitypub.js +191 -0
- package/src/commands/agent.js +601 -0
- package/src/commands/audit.js +206 -0
- package/src/commands/bi.js +186 -0
- package/src/commands/bm25.js +162 -0
- package/src/commands/browse.js +225 -0
- package/src/commands/ccron.js +178 -0
- package/src/commands/chat.js +207 -0
- package/src/commands/compliance.js +420 -0
- package/src/commands/compt.js +176 -0
- package/src/commands/consol.js +237 -0
- package/src/commands/cowork.js +588 -0
- package/src/commands/crosschain.js +216 -0
- package/src/commands/dao.js +216 -0
- package/src/commands/dlp.js +206 -0
- package/src/commands/economy.js +211 -0
- package/src/commands/evolution.js +209 -0
- package/src/commands/evomap.js +216 -0
- package/src/commands/fflag.js +230 -0
- package/src/commands/git.js +185 -0
- package/src/commands/hardening.js +209 -0
- package/src/commands/hmemory.js +210 -0
- package/src/commands/incentive.js +209 -0
- package/src/commands/inference.js +178 -0
- package/src/commands/itbudget.js +161 -0
- package/src/commands/kg.js +206 -0
- package/src/commands/lowcode.js +201 -0
- package/src/commands/marketplace.js +206 -0
- package/src/commands/matrix.js +214 -0
- package/src/commands/mcpscaf.js +153 -0
- package/src/commands/meminj.js +153 -0
- package/src/commands/nostr.js +213 -0
- package/src/commands/orchestrate.js +217 -0
- package/src/commands/orchgov.js +156 -0
- package/src/commands/pdfp.js +160 -0
- package/src/commands/perf.js +176 -0
- package/src/commands/perm.js +156 -0
- package/src/commands/pipeline.js +211 -0
- package/src/commands/planmode.js +154 -0
- package/src/commands/privacy.js +203 -0
- package/src/commands/promcomp.js +166 -0
- package/src/commands/recommend.js +185 -0
- package/src/commands/reputation.js +208 -0
- package/src/commands/sandbox.js +206 -0
- package/src/commands/seshhook.js +153 -0
- package/src/commands/seshsearch.js +149 -0
- package/src/commands/seshtail.js +152 -0
- package/src/commands/seshu.js +160 -0
- package/src/commands/sganal.js +172 -0
- package/src/commands/siem.js +207 -0
- package/src/commands/sla.js +212 -0
- package/src/commands/slotfill.js +154 -0
- package/src/commands/social.js +159 -0
- package/src/commands/stress.js +206 -0
- package/src/commands/svccont.js +157 -0
- package/src/commands/terraform.js +206 -0
- package/src/commands/tms.js +183 -0
- package/src/commands/topiccls.js +158 -0
- package/src/commands/uprof.js +154 -0
- package/src/commands/vcheck.js +172 -0
- package/src/commands/webfetch.js +150 -0
- package/src/commands/zkp.js +218 -0
- package/src/harness/prompt-compressor.js +331 -0
- package/src/index.js +101 -1
- package/src/lib/a2a-protocol.js +373 -0
- package/src/lib/activitypub-bridge.js +343 -0
- package/src/lib/agent-economy.js +358 -0
- package/src/lib/app-builder.js +338 -0
- package/src/lib/audit-logger.js +321 -0
- package/src/lib/autonomous-agent.js +341 -0
- package/src/lib/bi-engine.js +339 -0
- package/src/lib/bm25-search.js +333 -0
- package/src/lib/browser-automation.js +352 -0
- package/src/lib/chat-core.js +336 -0
- package/src/lib/claude-code-bridge.js +341 -0
- package/src/lib/compliance-framework-reporter.js +359 -0
- package/src/lib/compliance-manager.js +330 -0
- package/src/lib/compression-telemetry.js +333 -0
- package/src/lib/content-recommender.js +370 -0
- package/src/lib/cowork-cron.js +330 -0
- package/src/lib/cowork-learning.js +333 -0
- package/src/lib/cowork-task-runner.js +362 -0
- package/src/lib/cowork-workflow.js +327 -0
- package/src/lib/cross-chain.js +365 -0
- package/src/lib/dao-governance.js +339 -0
- package/src/lib/dlp-engine.js +343 -0
- package/src/lib/evolution-system.js +336 -0
- package/src/lib/evomap-manager.js +339 -0
- package/src/lib/execution-backend.js +351 -0
- package/src/lib/feature-flags.js +330 -0
- package/src/lib/git-integration.js +343 -0
- package/src/lib/hardening-manager.js +341 -0
- package/src/lib/hierarchical-memory.js +341 -0
- package/src/lib/inference-network.js +362 -0
- package/src/lib/iteration-budget.js +357 -0
- package/src/lib/knowledge-graph.js +333 -0
- package/src/lib/matrix-bridge.js +339 -0
- package/src/lib/mcp-scaffold.js +345 -0
- package/src/lib/memory-injection.js +320 -0
- package/src/lib/nostr-bridge.js +342 -0
- package/src/lib/orchestrator.js +350 -0
- package/src/lib/pdf-parser.js +330 -0
- package/src/lib/perf-tuning.js +364 -0
- package/src/lib/permission-engine.js +319 -0
- package/src/lib/pipeline-orchestrator.js +345 -0
- package/src/lib/plan-mode.js +328 -0
- package/src/lib/privacy-computing.js +335 -0
- package/src/lib/prompt-compressor.js +1 -10
- package/src/lib/reputation-optimizer.js +340 -0
- package/src/lib/sandbox-v2.js +327 -0
- package/src/lib/service-container.js +342 -0
- package/src/lib/session-consolidator.js +352 -0
- package/src/lib/session-hooks.js +340 -0
- package/src/lib/session-search.js +334 -0
- package/src/lib/session-tail.js +320 -0
- package/src/lib/session-usage.js +329 -0
- package/src/lib/siem-exporter.js +352 -0
- package/src/lib/skill-marketplace.js +345 -0
- package/src/lib/sla-manager.js +341 -0
- package/src/lib/slot-filler.js +333 -0
- package/src/lib/social-graph-analytics.js +327 -0
- package/src/lib/social-graph.js +304 -0
- package/src/lib/stress-tester.js +342 -0
- package/src/lib/sub-agent-registry.js +359 -0
- package/src/lib/task-model-selector.js +333 -0
- package/src/lib/terraform-manager.js +333 -0
- package/src/lib/todo-manager.js +339 -0
- package/src/lib/token-incentive.js +341 -0
- package/src/lib/topic-classifier.js +353 -0
- package/src/lib/user-profile.js +325 -0
- package/src/lib/version-checker.js +335 -0
- package/src/lib/web-fetch.js +322 -0
- package/src/lib/zkp-engine.js +342 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Consolidator V2 governance commands — `cc consol ...`
|
|
3
|
+
*
|
|
4
|
+
* V2 surface layered atop session-consolidator.js, independent of
|
|
5
|
+
* legacy `buildTraceStoreFromJsonl`/`consolidateJsonlSession` helpers.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
CONSOL_PROFILE_MATURITY_V2,
|
|
10
|
+
CONSOL_JOB_LIFECYCLE_V2,
|
|
11
|
+
registerConsolProfileV2,
|
|
12
|
+
activateConsolProfileV2,
|
|
13
|
+
pauseConsolProfileV2,
|
|
14
|
+
archiveConsolProfileV2,
|
|
15
|
+
touchConsolProfileV2,
|
|
16
|
+
getConsolProfileV2,
|
|
17
|
+
listConsolProfilesV2,
|
|
18
|
+
createConsolJobV2,
|
|
19
|
+
startConsolJobV2,
|
|
20
|
+
completeConsolJobV2,
|
|
21
|
+
failConsolJobV2,
|
|
22
|
+
cancelConsolJobV2,
|
|
23
|
+
getConsolJobV2,
|
|
24
|
+
listConsolJobsV2,
|
|
25
|
+
setMaxActiveConsolProfilesPerOwnerV2,
|
|
26
|
+
getMaxActiveConsolProfilesPerOwnerV2,
|
|
27
|
+
setMaxPendingConsolJobsPerProfileV2,
|
|
28
|
+
getMaxPendingConsolJobsPerProfileV2,
|
|
29
|
+
setConsolProfileIdleMsV2,
|
|
30
|
+
getConsolProfileIdleMsV2,
|
|
31
|
+
setConsolJobStuckMsV2,
|
|
32
|
+
getConsolJobStuckMsV2,
|
|
33
|
+
autoPauseIdleConsolProfilesV2,
|
|
34
|
+
autoFailStuckConsolJobsV2,
|
|
35
|
+
getSessionConsolidatorStatsV2,
|
|
36
|
+
} from "../lib/session-consolidator.js";
|
|
37
|
+
|
|
38
|
+
export function registerConsolCommand(program) {
|
|
39
|
+
const consol = program
|
|
40
|
+
.command("consol")
|
|
41
|
+
.description(
|
|
42
|
+
"Session Consolidator V2 governance (in-memory, CLI v0.134.0)",
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
consol
|
|
46
|
+
.command("enums-v2")
|
|
47
|
+
.description("Show V2 maturity + lifecycle enums")
|
|
48
|
+
.action(() => {
|
|
49
|
+
console.log(
|
|
50
|
+
JSON.stringify(
|
|
51
|
+
{
|
|
52
|
+
CONSOL_PROFILE_MATURITY_V2,
|
|
53
|
+
CONSOL_JOB_LIFECYCLE_V2,
|
|
54
|
+
},
|
|
55
|
+
null,
|
|
56
|
+
2,
|
|
57
|
+
),
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
consol
|
|
62
|
+
.command("register-profile-v2")
|
|
63
|
+
.description("Register a consolidation profile (pending)")
|
|
64
|
+
.requiredOption("--id <id>")
|
|
65
|
+
.requiredOption("--owner <owner>")
|
|
66
|
+
.option("--scope <scope>", "agent|session|global", "agent")
|
|
67
|
+
.action((o) => {
|
|
68
|
+
console.log(JSON.stringify(registerConsolProfileV2(o), null, 2));
|
|
69
|
+
});
|
|
70
|
+
consol
|
|
71
|
+
.command("activate-profile-v2 <id>")
|
|
72
|
+
.description("Transition profile to active")
|
|
73
|
+
.action((id) => {
|
|
74
|
+
console.log(JSON.stringify(activateConsolProfileV2(id), null, 2));
|
|
75
|
+
});
|
|
76
|
+
consol
|
|
77
|
+
.command("pause-profile-v2 <id>")
|
|
78
|
+
.description("Transition profile to paused")
|
|
79
|
+
.action((id) => {
|
|
80
|
+
console.log(JSON.stringify(pauseConsolProfileV2(id), null, 2));
|
|
81
|
+
});
|
|
82
|
+
consol
|
|
83
|
+
.command("archive-profile-v2 <id>")
|
|
84
|
+
.description("Transition profile to archived (terminal)")
|
|
85
|
+
.action((id) => {
|
|
86
|
+
console.log(JSON.stringify(archiveConsolProfileV2(id), null, 2));
|
|
87
|
+
});
|
|
88
|
+
consol
|
|
89
|
+
.command("touch-profile-v2 <id>")
|
|
90
|
+
.description("Refresh lastTouchedAt")
|
|
91
|
+
.action((id) => {
|
|
92
|
+
console.log(JSON.stringify(touchConsolProfileV2(id), null, 2));
|
|
93
|
+
});
|
|
94
|
+
consol
|
|
95
|
+
.command("get-profile-v2 <id>")
|
|
96
|
+
.description("Get a profile by id")
|
|
97
|
+
.action((id) => {
|
|
98
|
+
console.log(JSON.stringify(getConsolProfileV2(id), null, 2));
|
|
99
|
+
});
|
|
100
|
+
consol
|
|
101
|
+
.command("list-profiles-v2")
|
|
102
|
+
.description("List all profiles")
|
|
103
|
+
.action(() => {
|
|
104
|
+
console.log(JSON.stringify(listConsolProfilesV2(), null, 2));
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
consol
|
|
108
|
+
.command("create-job-v2")
|
|
109
|
+
.description("Create a consolidation job (queued)")
|
|
110
|
+
.requiredOption("--id <id>")
|
|
111
|
+
.requiredOption("--profile-id <profileId>")
|
|
112
|
+
.option("--session-id <sessionId>")
|
|
113
|
+
.action((o) => {
|
|
114
|
+
console.log(
|
|
115
|
+
JSON.stringify(
|
|
116
|
+
createConsolJobV2({
|
|
117
|
+
id: o.id,
|
|
118
|
+
profileId: o.profileId,
|
|
119
|
+
sessionId: o.sessionId,
|
|
120
|
+
}),
|
|
121
|
+
null,
|
|
122
|
+
2,
|
|
123
|
+
),
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
consol
|
|
127
|
+
.command("start-job-v2 <id>")
|
|
128
|
+
.description("Transition job to running")
|
|
129
|
+
.action((id) => {
|
|
130
|
+
console.log(JSON.stringify(startConsolJobV2(id), null, 2));
|
|
131
|
+
});
|
|
132
|
+
consol
|
|
133
|
+
.command("complete-job-v2 <id>")
|
|
134
|
+
.description("Transition job to completed")
|
|
135
|
+
.action((id) => {
|
|
136
|
+
console.log(JSON.stringify(completeConsolJobV2(id), null, 2));
|
|
137
|
+
});
|
|
138
|
+
consol
|
|
139
|
+
.command("fail-job-v2 <id>")
|
|
140
|
+
.description("Transition job to failed")
|
|
141
|
+
.option("--reason <reason>")
|
|
142
|
+
.action((id, o) => {
|
|
143
|
+
console.log(JSON.stringify(failConsolJobV2(id, o.reason), null, 2));
|
|
144
|
+
});
|
|
145
|
+
consol
|
|
146
|
+
.command("cancel-job-v2 <id>")
|
|
147
|
+
.description("Transition job to cancelled")
|
|
148
|
+
.option("--reason <reason>")
|
|
149
|
+
.action((id, o) => {
|
|
150
|
+
console.log(JSON.stringify(cancelConsolJobV2(id, o.reason), null, 2));
|
|
151
|
+
});
|
|
152
|
+
consol
|
|
153
|
+
.command("get-job-v2 <id>")
|
|
154
|
+
.description("Get a job by id")
|
|
155
|
+
.action((id) => {
|
|
156
|
+
console.log(JSON.stringify(getConsolJobV2(id), null, 2));
|
|
157
|
+
});
|
|
158
|
+
consol
|
|
159
|
+
.command("list-jobs-v2")
|
|
160
|
+
.description("List all jobs")
|
|
161
|
+
.action(() => {
|
|
162
|
+
console.log(JSON.stringify(listConsolJobsV2(), null, 2));
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
consol
|
|
166
|
+
.command("set-max-active-profiles-v2 <n>")
|
|
167
|
+
.description("Set per-owner active profile cap")
|
|
168
|
+
.action((n) => {
|
|
169
|
+
setMaxActiveConsolProfilesPerOwnerV2(Number(n));
|
|
170
|
+
console.log(
|
|
171
|
+
JSON.stringify(
|
|
172
|
+
{
|
|
173
|
+
maxActiveConsolProfilesPerOwner:
|
|
174
|
+
getMaxActiveConsolProfilesPerOwnerV2(),
|
|
175
|
+
},
|
|
176
|
+
null,
|
|
177
|
+
2,
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
});
|
|
181
|
+
consol
|
|
182
|
+
.command("set-max-pending-jobs-v2 <n>")
|
|
183
|
+
.description("Set per-profile pending job cap")
|
|
184
|
+
.action((n) => {
|
|
185
|
+
setMaxPendingConsolJobsPerProfileV2(Number(n));
|
|
186
|
+
console.log(
|
|
187
|
+
JSON.stringify(
|
|
188
|
+
{
|
|
189
|
+
maxPendingConsolJobsPerProfile:
|
|
190
|
+
getMaxPendingConsolJobsPerProfileV2(),
|
|
191
|
+
},
|
|
192
|
+
null,
|
|
193
|
+
2,
|
|
194
|
+
),
|
|
195
|
+
);
|
|
196
|
+
});
|
|
197
|
+
consol
|
|
198
|
+
.command("set-profile-idle-ms-v2 <n>")
|
|
199
|
+
.description("Set profile idle threshold (ms)")
|
|
200
|
+
.action((n) => {
|
|
201
|
+
setConsolProfileIdleMsV2(Number(n));
|
|
202
|
+
console.log(
|
|
203
|
+
JSON.stringify(
|
|
204
|
+
{ consolProfileIdleMs: getConsolProfileIdleMsV2() },
|
|
205
|
+
null,
|
|
206
|
+
2,
|
|
207
|
+
),
|
|
208
|
+
);
|
|
209
|
+
});
|
|
210
|
+
consol
|
|
211
|
+
.command("set-job-stuck-ms-v2 <n>")
|
|
212
|
+
.description("Set job stuck threshold (ms)")
|
|
213
|
+
.action((n) => {
|
|
214
|
+
setConsolJobStuckMsV2(Number(n));
|
|
215
|
+
console.log(
|
|
216
|
+
JSON.stringify({ consolJobStuckMs: getConsolJobStuckMsV2() }, null, 2),
|
|
217
|
+
);
|
|
218
|
+
});
|
|
219
|
+
consol
|
|
220
|
+
.command("auto-pause-idle-profiles-v2")
|
|
221
|
+
.description("Auto-pause idle active profiles")
|
|
222
|
+
.action(() => {
|
|
223
|
+
console.log(JSON.stringify(autoPauseIdleConsolProfilesV2(), null, 2));
|
|
224
|
+
});
|
|
225
|
+
consol
|
|
226
|
+
.command("auto-fail-stuck-jobs-v2")
|
|
227
|
+
.description("Auto-fail stuck running jobs")
|
|
228
|
+
.action(() => {
|
|
229
|
+
console.log(JSON.stringify(autoFailStuckConsolJobsV2(), null, 2));
|
|
230
|
+
});
|
|
231
|
+
consol
|
|
232
|
+
.command("stats-v2")
|
|
233
|
+
.description("Show V2 aggregate stats")
|
|
234
|
+
.action(() => {
|
|
235
|
+
console.log(JSON.stringify(getSessionConsolidatorStatsV2(), null, 2));
|
|
236
|
+
});
|
|
237
|
+
}
|