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/agent.js
CHANGED
|
@@ -55,119 +55,603 @@ export function registerAgentCommand(program) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
58
|
export function registerSubAgentV2Command(program) {
|
|
60
|
-
const sa = program
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
sa.command("
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
sa.command("
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
sa.command("
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
sa.command("
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
59
|
+
const sa = program
|
|
60
|
+
.command("subagent")
|
|
61
|
+
.description("Sub-agent registry V2 governance");
|
|
62
|
+
sa.command("maturities-v2").action(async () => {
|
|
63
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
64
|
+
console.log(JSON.stringify(m.SUBAGENT_PROFILE_MATURITY_V2, null, 2));
|
|
65
|
+
});
|
|
66
|
+
sa.command("task-lifecycle-v2").action(async () => {
|
|
67
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
68
|
+
console.log(JSON.stringify(m.SUBAGENT_TASK_LIFECYCLE_V2, null, 2));
|
|
69
|
+
});
|
|
70
|
+
sa.command("stats-v2").action(async () => {
|
|
71
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
72
|
+
console.log(JSON.stringify(m.getSubAgentRegistryStatsV2(), null, 2));
|
|
73
|
+
});
|
|
74
|
+
sa.command("config-v2").action(async () => {
|
|
75
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
76
|
+
console.log(
|
|
77
|
+
JSON.stringify(
|
|
78
|
+
{
|
|
79
|
+
maxActiveSubagentsPerOwner: m.getMaxActiveSubagentsPerOwnerV2(),
|
|
80
|
+
maxPendingTasksPerSubagent: m.getMaxPendingTasksPerSubagentV2(),
|
|
81
|
+
subagentIdleMs: m.getSubagentIdleMsV2(),
|
|
82
|
+
subagentTaskStuckMs: m.getSubagentTaskStuckMsV2(),
|
|
83
|
+
},
|
|
84
|
+
null,
|
|
85
|
+
2,
|
|
86
|
+
),
|
|
87
|
+
);
|
|
88
|
+
});
|
|
89
|
+
sa.command("register-profile-v2 <id> <owner> [role]").action(
|
|
90
|
+
async (id, owner, role) => {
|
|
91
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
92
|
+
console.log(
|
|
93
|
+
JSON.stringify(
|
|
94
|
+
m.registerSubagentProfileV2({ id, owner, role }),
|
|
95
|
+
null,
|
|
96
|
+
2,
|
|
97
|
+
),
|
|
98
|
+
);
|
|
99
|
+
},
|
|
100
|
+
);
|
|
101
|
+
sa.command("activate-profile-v2 <id>").action(async (id) => {
|
|
102
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
103
|
+
console.log(JSON.stringify(m.activateSubagentProfileV2(id), null, 2));
|
|
104
|
+
});
|
|
105
|
+
sa.command("pause-profile-v2 <id>").action(async (id) => {
|
|
106
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
107
|
+
console.log(JSON.stringify(m.pauseSubagentProfileV2(id), null, 2));
|
|
108
|
+
});
|
|
109
|
+
sa.command("retire-profile-v2 <id>").action(async (id) => {
|
|
110
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
111
|
+
console.log(JSON.stringify(m.retireSubagentProfileV2(id), null, 2));
|
|
112
|
+
});
|
|
113
|
+
sa.command("touch-profile-v2 <id>").action(async (id) => {
|
|
114
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
115
|
+
console.log(JSON.stringify(m.touchSubagentProfileV2(id), null, 2));
|
|
116
|
+
});
|
|
117
|
+
sa.command("get-profile-v2 <id>").action(async (id) => {
|
|
118
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
119
|
+
console.log(JSON.stringify(m.getSubagentProfileV2(id), null, 2));
|
|
120
|
+
});
|
|
121
|
+
sa.command("list-profiles-v2").action(async () => {
|
|
122
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
123
|
+
console.log(JSON.stringify(m.listSubagentProfilesV2(), null, 2));
|
|
124
|
+
});
|
|
125
|
+
sa.command("create-task-v2 <id> <profileId> [desc]").action(
|
|
126
|
+
async (id, profileId, desc) => {
|
|
127
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
128
|
+
console.log(
|
|
129
|
+
JSON.stringify(
|
|
130
|
+
m.createSubagentTaskV2({ id, profileId, description: desc }),
|
|
131
|
+
null,
|
|
132
|
+
2,
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
},
|
|
136
|
+
);
|
|
137
|
+
sa.command("start-task-v2 <id>").action(async (id) => {
|
|
138
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
139
|
+
console.log(JSON.stringify(m.startSubagentTaskV2(id), null, 2));
|
|
140
|
+
});
|
|
141
|
+
sa.command("complete-task-v2 <id>").action(async (id) => {
|
|
142
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
143
|
+
console.log(JSON.stringify(m.completeSubagentTaskV2(id), null, 2));
|
|
144
|
+
});
|
|
145
|
+
sa.command("fail-task-v2 <id> [reason]").action(async (id, reason) => {
|
|
146
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
147
|
+
console.log(JSON.stringify(m.failSubagentTaskV2(id, reason), null, 2));
|
|
148
|
+
});
|
|
149
|
+
sa.command("cancel-task-v2 <id> [reason]").action(async (id, reason) => {
|
|
150
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
151
|
+
console.log(JSON.stringify(m.cancelSubagentTaskV2(id, reason), null, 2));
|
|
152
|
+
});
|
|
153
|
+
sa.command("get-task-v2 <id>").action(async (id) => {
|
|
154
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
155
|
+
console.log(JSON.stringify(m.getSubagentTaskV2(id), null, 2));
|
|
156
|
+
});
|
|
157
|
+
sa.command("list-tasks-v2").action(async () => {
|
|
158
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
159
|
+
console.log(JSON.stringify(m.listSubagentTasksV2(), null, 2));
|
|
160
|
+
});
|
|
161
|
+
sa.command("auto-pause-idle-v2").action(async () => {
|
|
162
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
163
|
+
console.log(JSON.stringify(m.autoPauseIdleSubagentsV2(), null, 2));
|
|
164
|
+
});
|
|
165
|
+
sa.command("auto-fail-stuck-v2").action(async () => {
|
|
166
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
167
|
+
console.log(JSON.stringify(m.autoFailStuckSubagentTasksV2(), null, 2));
|
|
168
|
+
});
|
|
169
|
+
sa.command("set-max-active-v2 <n>").action(async (n) => {
|
|
170
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
171
|
+
m.setMaxActiveSubagentsPerOwnerV2(parseInt(n, 10));
|
|
172
|
+
console.log(
|
|
173
|
+
JSON.stringify(
|
|
174
|
+
{ maxActiveSubagentsPerOwner: m.getMaxActiveSubagentsPerOwnerV2() },
|
|
175
|
+
null,
|
|
176
|
+
2,
|
|
177
|
+
),
|
|
178
|
+
);
|
|
179
|
+
});
|
|
180
|
+
sa.command("set-max-pending-v2 <n>").action(async (n) => {
|
|
181
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
182
|
+
m.setMaxPendingTasksPerSubagentV2(parseInt(n, 10));
|
|
183
|
+
console.log(
|
|
184
|
+
JSON.stringify(
|
|
185
|
+
{ maxPendingTasksPerSubagent: m.getMaxPendingTasksPerSubagentV2() },
|
|
186
|
+
null,
|
|
187
|
+
2,
|
|
188
|
+
),
|
|
189
|
+
);
|
|
190
|
+
});
|
|
191
|
+
sa.command("set-idle-ms-v2 <n>").action(async (n) => {
|
|
192
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
193
|
+
m.setSubagentIdleMsV2(parseInt(n, 10));
|
|
194
|
+
console.log(
|
|
195
|
+
JSON.stringify({ subagentIdleMs: m.getSubagentIdleMsV2() }, null, 2),
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
sa.command("set-stuck-ms-v2 <n>").action(async (n) => {
|
|
199
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
200
|
+
m.setSubagentTaskStuckMsV2(parseInt(n, 10));
|
|
201
|
+
console.log(
|
|
202
|
+
JSON.stringify(
|
|
203
|
+
{ subagentTaskStuckMs: m.getSubagentTaskStuckMsV2() },
|
|
204
|
+
null,
|
|
205
|
+
2,
|
|
206
|
+
),
|
|
207
|
+
);
|
|
208
|
+
});
|
|
209
|
+
sa.command("reset-state-v2").action(async () => {
|
|
210
|
+
const m = await import("../lib/sub-agent-registry.js");
|
|
211
|
+
m._resetStateSubAgentRegistryV2();
|
|
212
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
213
|
+
});
|
|
86
214
|
}
|
|
87
215
|
|
|
88
216
|
export function registerExecBackendV2Command(program) {
|
|
89
|
-
const eb = program
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
eb.command("
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
eb.command("
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
eb.command("
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
eb.command("
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
217
|
+
const eb = program
|
|
218
|
+
.command("execbe")
|
|
219
|
+
.description("Execution backend V2 governance");
|
|
220
|
+
eb.command("maturities-v2").action(async () => {
|
|
221
|
+
const m = await import("../lib/execution-backend.js");
|
|
222
|
+
console.log(JSON.stringify(m.EXECBE_BACKEND_MATURITY_V2, null, 2));
|
|
223
|
+
});
|
|
224
|
+
eb.command("job-lifecycle-v2").action(async () => {
|
|
225
|
+
const m = await import("../lib/execution-backend.js");
|
|
226
|
+
console.log(JSON.stringify(m.EXECBE_JOB_LIFECYCLE_V2, null, 2));
|
|
227
|
+
});
|
|
228
|
+
eb.command("stats-v2").action(async () => {
|
|
229
|
+
const m = await import("../lib/execution-backend.js");
|
|
230
|
+
console.log(JSON.stringify(m.getExecutionBackendStatsV2(), null, 2));
|
|
231
|
+
});
|
|
232
|
+
eb.command("config-v2").action(async () => {
|
|
233
|
+
const m = await import("../lib/execution-backend.js");
|
|
234
|
+
console.log(
|
|
235
|
+
JSON.stringify(
|
|
236
|
+
{
|
|
237
|
+
maxActiveBackendsPerOwner: m.getMaxActiveBackendsPerOwnerV2(),
|
|
238
|
+
maxPendingJobsPerBackend: m.getMaxPendingJobsPerBackendV2(),
|
|
239
|
+
backendIdleMs: m.getBackendIdleMsV2(),
|
|
240
|
+
execJobStuckMs: m.getExecJobStuckMsV2(),
|
|
241
|
+
},
|
|
242
|
+
null,
|
|
243
|
+
2,
|
|
244
|
+
),
|
|
245
|
+
);
|
|
246
|
+
});
|
|
247
|
+
eb.command("register-backend-v2 <id> <owner> [kind]").action(
|
|
248
|
+
async (id, owner, kind) => {
|
|
249
|
+
const m = await import("../lib/execution-backend.js");
|
|
250
|
+
console.log(
|
|
251
|
+
JSON.stringify(m.registerBackendV2({ id, owner, kind }), null, 2),
|
|
252
|
+
);
|
|
253
|
+
},
|
|
254
|
+
);
|
|
255
|
+
eb.command("activate-backend-v2 <id>").action(async (id) => {
|
|
256
|
+
const m = await import("../lib/execution-backend.js");
|
|
257
|
+
console.log(JSON.stringify(m.activateBackendV2(id), null, 2));
|
|
258
|
+
});
|
|
259
|
+
eb.command("degrade-backend-v2 <id>").action(async (id) => {
|
|
260
|
+
const m = await import("../lib/execution-backend.js");
|
|
261
|
+
console.log(JSON.stringify(m.degradeBackendV2(id), null, 2));
|
|
262
|
+
});
|
|
263
|
+
eb.command("retire-backend-v2 <id>").action(async (id) => {
|
|
264
|
+
const m = await import("../lib/execution-backend.js");
|
|
265
|
+
console.log(JSON.stringify(m.retireBackendV2(id), null, 2));
|
|
266
|
+
});
|
|
267
|
+
eb.command("touch-backend-v2 <id>").action(async (id) => {
|
|
268
|
+
const m = await import("../lib/execution-backend.js");
|
|
269
|
+
console.log(JSON.stringify(m.touchBackendV2(id), null, 2));
|
|
270
|
+
});
|
|
271
|
+
eb.command("get-backend-v2 <id>").action(async (id) => {
|
|
272
|
+
const m = await import("../lib/execution-backend.js");
|
|
273
|
+
console.log(JSON.stringify(m.getBackendV2(id), null, 2));
|
|
274
|
+
});
|
|
275
|
+
eb.command("list-backends-v2").action(async () => {
|
|
276
|
+
const m = await import("../lib/execution-backend.js");
|
|
277
|
+
console.log(JSON.stringify(m.listBackendsV2(), null, 2));
|
|
278
|
+
});
|
|
279
|
+
eb.command("create-job-v2 <id> <backendId> [cmd]").action(
|
|
280
|
+
async (id, backendId, cmd) => {
|
|
281
|
+
const m = await import("../lib/execution-backend.js");
|
|
282
|
+
console.log(
|
|
283
|
+
JSON.stringify(
|
|
284
|
+
m.createExecJobV2({ id, backendId, command: cmd }),
|
|
285
|
+
null,
|
|
286
|
+
2,
|
|
287
|
+
),
|
|
288
|
+
);
|
|
289
|
+
},
|
|
290
|
+
);
|
|
291
|
+
eb.command("start-job-v2 <id>").action(async (id) => {
|
|
292
|
+
const m = await import("../lib/execution-backend.js");
|
|
293
|
+
console.log(JSON.stringify(m.startExecJobV2(id), null, 2));
|
|
294
|
+
});
|
|
295
|
+
eb.command("succeed-job-v2 <id>").action(async (id) => {
|
|
296
|
+
const m = await import("../lib/execution-backend.js");
|
|
297
|
+
console.log(JSON.stringify(m.succeedExecJobV2(id), null, 2));
|
|
298
|
+
});
|
|
299
|
+
eb.command("fail-job-v2 <id> [reason]").action(async (id, reason) => {
|
|
300
|
+
const m = await import("../lib/execution-backend.js");
|
|
301
|
+
console.log(JSON.stringify(m.failExecJobV2(id, reason), null, 2));
|
|
302
|
+
});
|
|
303
|
+
eb.command("cancel-job-v2 <id> [reason]").action(async (id, reason) => {
|
|
304
|
+
const m = await import("../lib/execution-backend.js");
|
|
305
|
+
console.log(JSON.stringify(m.cancelExecJobV2(id, reason), null, 2));
|
|
306
|
+
});
|
|
307
|
+
eb.command("get-job-v2 <id>").action(async (id) => {
|
|
308
|
+
const m = await import("../lib/execution-backend.js");
|
|
309
|
+
console.log(JSON.stringify(m.getExecJobV2(id), null, 2));
|
|
310
|
+
});
|
|
311
|
+
eb.command("list-jobs-v2").action(async () => {
|
|
312
|
+
const m = await import("../lib/execution-backend.js");
|
|
313
|
+
console.log(JSON.stringify(m.listExecJobsV2(), null, 2));
|
|
314
|
+
});
|
|
315
|
+
eb.command("auto-degrade-idle-v2").action(async () => {
|
|
316
|
+
const m = await import("../lib/execution-backend.js");
|
|
317
|
+
console.log(JSON.stringify(m.autoDegradeIdleBackendsV2(), null, 2));
|
|
318
|
+
});
|
|
319
|
+
eb.command("auto-fail-stuck-v2").action(async () => {
|
|
320
|
+
const m = await import("../lib/execution-backend.js");
|
|
321
|
+
console.log(JSON.stringify(m.autoFailStuckExecJobsV2(), null, 2));
|
|
322
|
+
});
|
|
323
|
+
eb.command("set-max-active-v2 <n>").action(async (n) => {
|
|
324
|
+
const m = await import("../lib/execution-backend.js");
|
|
325
|
+
m.setMaxActiveBackendsPerOwnerV2(parseInt(n, 10));
|
|
326
|
+
console.log(
|
|
327
|
+
JSON.stringify(
|
|
328
|
+
{ maxActiveBackendsPerOwner: m.getMaxActiveBackendsPerOwnerV2() },
|
|
329
|
+
null,
|
|
330
|
+
2,
|
|
331
|
+
),
|
|
332
|
+
);
|
|
333
|
+
});
|
|
334
|
+
eb.command("set-max-pending-v2 <n>").action(async (n) => {
|
|
335
|
+
const m = await import("../lib/execution-backend.js");
|
|
336
|
+
m.setMaxPendingJobsPerBackendV2(parseInt(n, 10));
|
|
337
|
+
console.log(
|
|
338
|
+
JSON.stringify(
|
|
339
|
+
{ maxPendingJobsPerBackend: m.getMaxPendingJobsPerBackendV2() },
|
|
340
|
+
null,
|
|
341
|
+
2,
|
|
342
|
+
),
|
|
343
|
+
);
|
|
344
|
+
});
|
|
345
|
+
eb.command("set-idle-ms-v2 <n>").action(async (n) => {
|
|
346
|
+
const m = await import("../lib/execution-backend.js");
|
|
347
|
+
m.setBackendIdleMsV2(parseInt(n, 10));
|
|
348
|
+
console.log(
|
|
349
|
+
JSON.stringify({ backendIdleMs: m.getBackendIdleMsV2() }, null, 2),
|
|
350
|
+
);
|
|
351
|
+
});
|
|
352
|
+
eb.command("set-stuck-ms-v2 <n>").action(async (n) => {
|
|
353
|
+
const m = await import("../lib/execution-backend.js");
|
|
354
|
+
m.setExecJobStuckMsV2(parseInt(n, 10));
|
|
355
|
+
console.log(
|
|
356
|
+
JSON.stringify({ execJobStuckMs: m.getExecJobStuckMsV2() }, null, 2),
|
|
357
|
+
);
|
|
358
|
+
});
|
|
359
|
+
eb.command("reset-state-v2").action(async () => {
|
|
360
|
+
const m = await import("../lib/execution-backend.js");
|
|
361
|
+
m._resetStateExecutionBackendV2();
|
|
362
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
363
|
+
});
|
|
115
364
|
}
|
|
116
365
|
|
|
117
366
|
export function registerTodoV2Command(program) {
|
|
118
367
|
const td = program.command("todo").description("Todo manager V2 governance");
|
|
119
|
-
td.command("maturities-v2").action(async () => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
td.command("
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
td.command("
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
td.command("
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
368
|
+
td.command("maturities-v2").action(async () => {
|
|
369
|
+
const m = await import("../lib/todo-manager.js");
|
|
370
|
+
console.log(JSON.stringify(m.TODO_LIST_MATURITY_V2, null, 2));
|
|
371
|
+
});
|
|
372
|
+
td.command("item-lifecycle-v2").action(async () => {
|
|
373
|
+
const m = await import("../lib/todo-manager.js");
|
|
374
|
+
console.log(JSON.stringify(m.TODO_ITEM_LIFECYCLE_V2, null, 2));
|
|
375
|
+
});
|
|
376
|
+
td.command("stats-v2").action(async () => {
|
|
377
|
+
const m = await import("../lib/todo-manager.js");
|
|
378
|
+
console.log(JSON.stringify(m.getTodoManagerStatsV2(), null, 2));
|
|
379
|
+
});
|
|
380
|
+
td.command("config-v2").action(async () => {
|
|
381
|
+
const m = await import("../lib/todo-manager.js");
|
|
382
|
+
console.log(
|
|
383
|
+
JSON.stringify(
|
|
384
|
+
{
|
|
385
|
+
maxActiveTodoListsPerOwner: m.getMaxActiveTodoListsPerOwnerV2(),
|
|
386
|
+
maxPendingItemsPerTodoList: m.getMaxPendingItemsPerTodoListV2(),
|
|
387
|
+
todoListIdleMs: m.getTodoListIdleMsV2(),
|
|
388
|
+
todoItemStuckMs: m.getTodoItemStuckMsV2(),
|
|
389
|
+
},
|
|
390
|
+
null,
|
|
391
|
+
2,
|
|
392
|
+
),
|
|
393
|
+
);
|
|
394
|
+
});
|
|
395
|
+
td.command("register-list-v2 <id> <owner> [title]").action(
|
|
396
|
+
async (id, owner, title) => {
|
|
397
|
+
const m = await import("../lib/todo-manager.js");
|
|
398
|
+
console.log(
|
|
399
|
+
JSON.stringify(m.registerTodoListV2({ id, owner, title }), null, 2),
|
|
400
|
+
);
|
|
401
|
+
},
|
|
402
|
+
);
|
|
403
|
+
td.command("activate-list-v2 <id>").action(async (id) => {
|
|
404
|
+
const m = await import("../lib/todo-manager.js");
|
|
405
|
+
console.log(JSON.stringify(m.activateTodoListV2(id), null, 2));
|
|
406
|
+
});
|
|
407
|
+
td.command("pause-list-v2 <id>").action(async (id) => {
|
|
408
|
+
const m = await import("../lib/todo-manager.js");
|
|
409
|
+
console.log(JSON.stringify(m.pauseTodoListV2(id), null, 2));
|
|
410
|
+
});
|
|
411
|
+
td.command("archive-list-v2 <id>").action(async (id) => {
|
|
412
|
+
const m = await import("../lib/todo-manager.js");
|
|
413
|
+
console.log(JSON.stringify(m.archiveTodoListV2(id), null, 2));
|
|
414
|
+
});
|
|
415
|
+
td.command("touch-list-v2 <id>").action(async (id) => {
|
|
416
|
+
const m = await import("../lib/todo-manager.js");
|
|
417
|
+
console.log(JSON.stringify(m.touchTodoListV2(id), null, 2));
|
|
418
|
+
});
|
|
419
|
+
td.command("get-list-v2 <id>").action(async (id) => {
|
|
420
|
+
const m = await import("../lib/todo-manager.js");
|
|
421
|
+
console.log(JSON.stringify(m.getTodoListV2(id), null, 2));
|
|
422
|
+
});
|
|
423
|
+
td.command("list-lists-v2").action(async () => {
|
|
424
|
+
const m = await import("../lib/todo-manager.js");
|
|
425
|
+
console.log(JSON.stringify(m.listTodoListsV2(), null, 2));
|
|
426
|
+
});
|
|
427
|
+
td.command("create-item-v2 <id> <listId> [desc]").action(
|
|
428
|
+
async (id, listId, desc) => {
|
|
429
|
+
const m = await import("../lib/todo-manager.js");
|
|
430
|
+
console.log(
|
|
431
|
+
JSON.stringify(
|
|
432
|
+
m.createTodoItemV2({ id, listId, description: desc }),
|
|
433
|
+
null,
|
|
434
|
+
2,
|
|
435
|
+
),
|
|
436
|
+
);
|
|
437
|
+
},
|
|
438
|
+
);
|
|
439
|
+
td.command("start-item-v2 <id>").action(async (id) => {
|
|
440
|
+
const m = await import("../lib/todo-manager.js");
|
|
441
|
+
console.log(JSON.stringify(m.startTodoItemV2(id), null, 2));
|
|
442
|
+
});
|
|
443
|
+
td.command("complete-item-v2 <id>").action(async (id) => {
|
|
444
|
+
const m = await import("../lib/todo-manager.js");
|
|
445
|
+
console.log(JSON.stringify(m.completeTodoItemV2(id), null, 2));
|
|
446
|
+
});
|
|
447
|
+
td.command("fail-item-v2 <id> [reason]").action(async (id, reason) => {
|
|
448
|
+
const m = await import("../lib/todo-manager.js");
|
|
449
|
+
console.log(JSON.stringify(m.failTodoItemV2(id, reason), null, 2));
|
|
450
|
+
});
|
|
451
|
+
td.command("cancel-item-v2 <id> [reason]").action(async (id, reason) => {
|
|
452
|
+
const m = await import("../lib/todo-manager.js");
|
|
453
|
+
console.log(JSON.stringify(m.cancelTodoItemV2(id, reason), null, 2));
|
|
454
|
+
});
|
|
455
|
+
td.command("get-item-v2 <id>").action(async (id) => {
|
|
456
|
+
const m = await import("../lib/todo-manager.js");
|
|
457
|
+
console.log(JSON.stringify(m.getTodoItemV2(id), null, 2));
|
|
458
|
+
});
|
|
459
|
+
td.command("list-items-v2").action(async () => {
|
|
460
|
+
const m = await import("../lib/todo-manager.js");
|
|
461
|
+
console.log(JSON.stringify(m.listTodoItemsV2(), null, 2));
|
|
462
|
+
});
|
|
463
|
+
td.command("auto-pause-idle-v2").action(async () => {
|
|
464
|
+
const m = await import("../lib/todo-manager.js");
|
|
465
|
+
console.log(JSON.stringify(m.autoPauseIdleTodoListsV2(), null, 2));
|
|
466
|
+
});
|
|
467
|
+
td.command("auto-fail-stuck-v2").action(async () => {
|
|
468
|
+
const m = await import("../lib/todo-manager.js");
|
|
469
|
+
console.log(JSON.stringify(m.autoFailStuckTodoItemsV2(), null, 2));
|
|
470
|
+
});
|
|
471
|
+
td.command("set-max-active-v2 <n>").action(async (n) => {
|
|
472
|
+
const m = await import("../lib/todo-manager.js");
|
|
473
|
+
m.setMaxActiveTodoListsPerOwnerV2(parseInt(n, 10));
|
|
474
|
+
console.log(
|
|
475
|
+
JSON.stringify(
|
|
476
|
+
{ maxActiveTodoListsPerOwner: m.getMaxActiveTodoListsPerOwnerV2() },
|
|
477
|
+
null,
|
|
478
|
+
2,
|
|
479
|
+
),
|
|
480
|
+
);
|
|
481
|
+
});
|
|
482
|
+
td.command("set-max-pending-v2 <n>").action(async (n) => {
|
|
483
|
+
const m = await import("../lib/todo-manager.js");
|
|
484
|
+
m.setMaxPendingItemsPerTodoListV2(parseInt(n, 10));
|
|
485
|
+
console.log(
|
|
486
|
+
JSON.stringify(
|
|
487
|
+
{ maxPendingItemsPerTodoList: m.getMaxPendingItemsPerTodoListV2() },
|
|
488
|
+
null,
|
|
489
|
+
2,
|
|
490
|
+
),
|
|
491
|
+
);
|
|
492
|
+
});
|
|
493
|
+
td.command("set-idle-ms-v2 <n>").action(async (n) => {
|
|
494
|
+
const m = await import("../lib/todo-manager.js");
|
|
495
|
+
m.setTodoListIdleMsV2(parseInt(n, 10));
|
|
496
|
+
console.log(
|
|
497
|
+
JSON.stringify({ todoListIdleMs: m.getTodoListIdleMsV2() }, null, 2),
|
|
498
|
+
);
|
|
499
|
+
});
|
|
500
|
+
td.command("set-stuck-ms-v2 <n>").action(async (n) => {
|
|
501
|
+
const m = await import("../lib/todo-manager.js");
|
|
502
|
+
m.setTodoItemStuckMsV2(parseInt(n, 10));
|
|
503
|
+
console.log(
|
|
504
|
+
JSON.stringify({ todoItemStuckMs: m.getTodoItemStuckMsV2() }, null, 2),
|
|
505
|
+
);
|
|
506
|
+
});
|
|
507
|
+
td.command("reset-state-v2").action(async () => {
|
|
508
|
+
const m = await import("../lib/todo-manager.js");
|
|
509
|
+
m._resetStateTodoManagerV2();
|
|
510
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
511
|
+
});
|
|
144
512
|
}
|
|
145
513
|
|
|
146
514
|
export function registerAutoAgentV2Command(program) {
|
|
147
|
-
const aa = program
|
|
515
|
+
const aa = program
|
|
516
|
+
.command("autoagent")
|
|
517
|
+
.description("Autonomous agent V2 governance");
|
|
148
518
|
const L = async () => await import("../lib/autonomous-agent.js");
|
|
149
|
-
aa.command("enums-v2").action(async () => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
aa.command("
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
519
|
+
aa.command("enums-v2").action(async () => {
|
|
520
|
+
const m = await L();
|
|
521
|
+
console.log(
|
|
522
|
+
JSON.stringify(
|
|
523
|
+
{
|
|
524
|
+
agentMaturity: m.AUTOAGENT_MATURITY_V2,
|
|
525
|
+
runLifecycle: m.AUTOAGENT_RUN_LIFECYCLE_V2,
|
|
526
|
+
},
|
|
527
|
+
null,
|
|
528
|
+
2,
|
|
529
|
+
),
|
|
530
|
+
);
|
|
531
|
+
});
|
|
532
|
+
aa.command("config-v2").action(async () => {
|
|
533
|
+
const m = await L();
|
|
534
|
+
console.log(
|
|
535
|
+
JSON.stringify(
|
|
536
|
+
{
|
|
537
|
+
maxActiveAutoAgentsPerOwner: m.getMaxActiveAutoAgentsPerOwnerV2(),
|
|
538
|
+
maxPendingAutoAgentRunsPerAgent:
|
|
539
|
+
m.getMaxPendingAutoAgentRunsPerAgentV2(),
|
|
540
|
+
autoAgentIdleMs: m.getAutoAgentIdleMsV2(),
|
|
541
|
+
autoAgentRunStuckMs: m.getAutoAgentRunStuckMsV2(),
|
|
542
|
+
},
|
|
543
|
+
null,
|
|
544
|
+
2,
|
|
545
|
+
),
|
|
546
|
+
);
|
|
547
|
+
});
|
|
548
|
+
aa.command("set-max-active-v2 <n>").action(async (n) => {
|
|
549
|
+
const m = await L();
|
|
550
|
+
m.setMaxActiveAutoAgentsPerOwnerV2(Number(n));
|
|
551
|
+
console.log("ok");
|
|
552
|
+
});
|
|
553
|
+
aa.command("set-max-pending-v2 <n>").action(async (n) => {
|
|
554
|
+
const m = await L();
|
|
555
|
+
m.setMaxPendingAutoAgentRunsPerAgentV2(Number(n));
|
|
556
|
+
console.log("ok");
|
|
557
|
+
});
|
|
558
|
+
aa.command("set-idle-ms-v2 <n>").action(async (n) => {
|
|
559
|
+
const m = await L();
|
|
560
|
+
m.setAutoAgentIdleMsV2(Number(n));
|
|
561
|
+
console.log("ok");
|
|
562
|
+
});
|
|
563
|
+
aa.command("set-stuck-ms-v2 <n>").action(async (n) => {
|
|
564
|
+
const m = await L();
|
|
565
|
+
m.setAutoAgentRunStuckMsV2(Number(n));
|
|
566
|
+
console.log("ok");
|
|
567
|
+
});
|
|
568
|
+
aa.command("register-agent-v2 <id> <owner>")
|
|
569
|
+
.option("--goal <g>", "Goal")
|
|
570
|
+
.action(async (id, owner, o) => {
|
|
571
|
+
const m = await L();
|
|
572
|
+
console.log(
|
|
573
|
+
JSON.stringify(
|
|
574
|
+
m.registerAutoAgentV2({ id, owner, goal: o.goal }),
|
|
575
|
+
null,
|
|
576
|
+
2,
|
|
577
|
+
),
|
|
578
|
+
);
|
|
579
|
+
});
|
|
580
|
+
aa.command("activate-agent-v2 <id>").action(async (id) => {
|
|
581
|
+
const m = await L();
|
|
582
|
+
console.log(JSON.stringify(m.activateAutoAgentV2(id), null, 2));
|
|
583
|
+
});
|
|
584
|
+
aa.command("pause-agent-v2 <id>").action(async (id) => {
|
|
585
|
+
const m = await L();
|
|
586
|
+
console.log(JSON.stringify(m.pauseAutoAgentV2(id), null, 2));
|
|
587
|
+
});
|
|
588
|
+
aa.command("archive-agent-v2 <id>").action(async (id) => {
|
|
589
|
+
const m = await L();
|
|
590
|
+
console.log(JSON.stringify(m.archiveAutoAgentV2(id), null, 2));
|
|
591
|
+
});
|
|
592
|
+
aa.command("touch-agent-v2 <id>").action(async (id) => {
|
|
593
|
+
const m = await L();
|
|
594
|
+
console.log(JSON.stringify(m.touchAutoAgentV2(id), null, 2));
|
|
595
|
+
});
|
|
596
|
+
aa.command("get-agent-v2 <id>").action(async (id) => {
|
|
597
|
+
const m = await L();
|
|
598
|
+
console.log(JSON.stringify(m.getAutoAgentV2(id), null, 2));
|
|
599
|
+
});
|
|
600
|
+
aa.command("list-agents-v2").action(async () => {
|
|
601
|
+
const m = await L();
|
|
602
|
+
console.log(JSON.stringify(m.listAutoAgentsV2(), null, 2));
|
|
603
|
+
});
|
|
604
|
+
aa.command("create-run-v2 <id> <agentId>")
|
|
605
|
+
.option("--prompt <p>", "Prompt")
|
|
606
|
+
.action(async (id, agentId, o) => {
|
|
607
|
+
const m = await L();
|
|
608
|
+
console.log(
|
|
609
|
+
JSON.stringify(
|
|
610
|
+
m.createAutoAgentRunV2({ id, agentId, prompt: o.prompt }),
|
|
611
|
+
null,
|
|
612
|
+
2,
|
|
613
|
+
),
|
|
614
|
+
);
|
|
615
|
+
});
|
|
616
|
+
aa.command("start-run-v2 <id>").action(async (id) => {
|
|
617
|
+
const m = await L();
|
|
618
|
+
console.log(JSON.stringify(m.startAutoAgentRunV2(id), null, 2));
|
|
619
|
+
});
|
|
620
|
+
aa.command("complete-run-v2 <id>").action(async (id) => {
|
|
621
|
+
const m = await L();
|
|
622
|
+
console.log(JSON.stringify(m.completeAutoAgentRunV2(id), null, 2));
|
|
623
|
+
});
|
|
624
|
+
aa.command("fail-run-v2 <id> [reason]").action(async (id, reason) => {
|
|
625
|
+
const m = await L();
|
|
626
|
+
console.log(JSON.stringify(m.failAutoAgentRunV2(id, reason), null, 2));
|
|
627
|
+
});
|
|
628
|
+
aa.command("cancel-run-v2 <id> [reason]").action(async (id, reason) => {
|
|
629
|
+
const m = await L();
|
|
630
|
+
console.log(JSON.stringify(m.cancelAutoAgentRunV2(id, reason), null, 2));
|
|
631
|
+
});
|
|
632
|
+
aa.command("get-run-v2 <id>").action(async (id) => {
|
|
633
|
+
const m = await L();
|
|
634
|
+
console.log(JSON.stringify(m.getAutoAgentRunV2(id), null, 2));
|
|
635
|
+
});
|
|
636
|
+
aa.command("list-runs-v2").action(async () => {
|
|
637
|
+
const m = await L();
|
|
638
|
+
console.log(JSON.stringify(m.listAutoAgentRunsV2(), null, 2));
|
|
639
|
+
});
|
|
640
|
+
aa.command("auto-pause-idle-v2").action(async () => {
|
|
641
|
+
const m = await L();
|
|
642
|
+
console.log(JSON.stringify(m.autoPauseIdleAutoAgentsV2(), null, 2));
|
|
643
|
+
});
|
|
644
|
+
aa.command("auto-fail-stuck-v2").action(async () => {
|
|
645
|
+
const m = await L();
|
|
646
|
+
console.log(JSON.stringify(m.autoFailStuckAutoAgentRunsV2(), null, 2));
|
|
647
|
+
});
|
|
648
|
+
aa.command("gov-stats-v2").action(async () => {
|
|
649
|
+
const m = await L();
|
|
650
|
+
console.log(JSON.stringify(m.getAutonomousAgentGovStatsV2(), null, 2));
|
|
651
|
+
});
|
|
652
|
+
aa.command("reset-state-v2").action(async () => {
|
|
653
|
+
const m = await L();
|
|
654
|
+
m._resetStateAutonomousAgentV2();
|
|
655
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
656
|
+
});
|
|
173
657
|
}
|