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/browse.js
CHANGED
|
@@ -185,7 +185,6 @@ export function registerBrowseCommand(program) {
|
|
|
185
185
|
registerBrowseV2Command(browse);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
189
188
|
import {
|
|
190
189
|
BROWSE_TARGET_MATURITY_V2,
|
|
191
190
|
BROWSE_ACTION_LIFECYCLE_V2,
|
|
@@ -217,32 +216,194 @@ import {
|
|
|
217
216
|
} from "../lib/browser-automation.js";
|
|
218
217
|
|
|
219
218
|
export function registerBrowseV2Command(browse) {
|
|
220
|
-
browse
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
browse
|
|
233
|
-
.
|
|
234
|
-
.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
browse
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
browse
|
|
219
|
+
browse
|
|
220
|
+
.command("enums-v2")
|
|
221
|
+
.description("Show V2 enums")
|
|
222
|
+
.action(() => {
|
|
223
|
+
console.log(
|
|
224
|
+
JSON.stringify(
|
|
225
|
+
{ BROWSE_TARGET_MATURITY_V2, BROWSE_ACTION_LIFECYCLE_V2 },
|
|
226
|
+
null,
|
|
227
|
+
2,
|
|
228
|
+
),
|
|
229
|
+
);
|
|
230
|
+
});
|
|
231
|
+
browse
|
|
232
|
+
.command("register-target-v2")
|
|
233
|
+
.description("Register a browse target (pending)")
|
|
234
|
+
.requiredOption("--id <id>")
|
|
235
|
+
.requiredOption("--owner <owner>")
|
|
236
|
+
.option("--url <url>")
|
|
237
|
+
.action((o) => {
|
|
238
|
+
console.log(JSON.stringify(registerBrowseTargetV2(o), null, 2));
|
|
239
|
+
});
|
|
240
|
+
browse
|
|
241
|
+
.command("activate-target-v2 <id>")
|
|
242
|
+
.description("Activate target")
|
|
243
|
+
.action((id) => {
|
|
244
|
+
console.log(JSON.stringify(activateBrowseTargetV2(id), null, 2));
|
|
245
|
+
});
|
|
246
|
+
browse
|
|
247
|
+
.command("degrade-target-v2 <id>")
|
|
248
|
+
.description("Degrade target")
|
|
249
|
+
.action((id) => {
|
|
250
|
+
console.log(JSON.stringify(degradeBrowseTargetV2(id), null, 2));
|
|
251
|
+
});
|
|
252
|
+
browse
|
|
253
|
+
.command("retire-target-v2 <id>")
|
|
254
|
+
.description("Retire target (terminal)")
|
|
255
|
+
.action((id) => {
|
|
256
|
+
console.log(JSON.stringify(retireBrowseTargetV2(id), null, 2));
|
|
257
|
+
});
|
|
258
|
+
browse
|
|
259
|
+
.command("touch-target-v2 <id>")
|
|
260
|
+
.description("Refresh lastTouchedAt")
|
|
261
|
+
.action((id) => {
|
|
262
|
+
console.log(JSON.stringify(touchBrowseTargetV2(id), null, 2));
|
|
263
|
+
});
|
|
264
|
+
browse
|
|
265
|
+
.command("get-target-v2 <id>")
|
|
266
|
+
.description("Get a target")
|
|
267
|
+
.action((id) => {
|
|
268
|
+
console.log(JSON.stringify(getBrowseTargetV2(id), null, 2));
|
|
269
|
+
});
|
|
270
|
+
browse
|
|
271
|
+
.command("list-targets-v2")
|
|
272
|
+
.description("List targets")
|
|
273
|
+
.action(() => {
|
|
274
|
+
console.log(JSON.stringify(listBrowseTargetsV2(), null, 2));
|
|
275
|
+
});
|
|
276
|
+
browse
|
|
277
|
+
.command("create-action-v2")
|
|
278
|
+
.description("Create a browse action (queued)")
|
|
279
|
+
.requiredOption("--id <id>")
|
|
280
|
+
.requiredOption("--target-id <targetId>")
|
|
281
|
+
.option("--kind <kind>", "fetch/scrape/screenshot", "fetch")
|
|
282
|
+
.action((o) => {
|
|
283
|
+
console.log(
|
|
284
|
+
JSON.stringify(
|
|
285
|
+
createBrowseActionV2({
|
|
286
|
+
id: o.id,
|
|
287
|
+
targetId: o.targetId,
|
|
288
|
+
kind: o.kind,
|
|
289
|
+
}),
|
|
290
|
+
null,
|
|
291
|
+
2,
|
|
292
|
+
),
|
|
293
|
+
);
|
|
294
|
+
});
|
|
295
|
+
browse
|
|
296
|
+
.command("start-action-v2 <id>")
|
|
297
|
+
.description("Start action")
|
|
298
|
+
.action((id) => {
|
|
299
|
+
console.log(JSON.stringify(startBrowseActionV2(id), null, 2));
|
|
300
|
+
});
|
|
301
|
+
browse
|
|
302
|
+
.command("complete-action-v2 <id>")
|
|
303
|
+
.description("Complete action")
|
|
304
|
+
.action((id) => {
|
|
305
|
+
console.log(JSON.stringify(completeBrowseActionV2(id), null, 2));
|
|
306
|
+
});
|
|
307
|
+
browse
|
|
308
|
+
.command("fail-action-v2 <id>")
|
|
309
|
+
.description("Fail action")
|
|
310
|
+
.option("--reason <r>")
|
|
311
|
+
.action((id, o) => {
|
|
312
|
+
console.log(JSON.stringify(failBrowseActionV2(id, o.reason), null, 2));
|
|
313
|
+
});
|
|
314
|
+
browse
|
|
315
|
+
.command("cancel-action-v2 <id>")
|
|
316
|
+
.description("Cancel action")
|
|
317
|
+
.option("--reason <r>")
|
|
318
|
+
.action((id, o) => {
|
|
319
|
+
console.log(JSON.stringify(cancelBrowseActionV2(id, o.reason), null, 2));
|
|
320
|
+
});
|
|
321
|
+
browse
|
|
322
|
+
.command("get-action-v2 <id>")
|
|
323
|
+
.description("Get action")
|
|
324
|
+
.action((id) => {
|
|
325
|
+
console.log(JSON.stringify(getBrowseActionV2(id), null, 2));
|
|
326
|
+
});
|
|
327
|
+
browse
|
|
328
|
+
.command("list-actions-v2")
|
|
329
|
+
.description("List actions")
|
|
330
|
+
.action(() => {
|
|
331
|
+
console.log(JSON.stringify(listBrowseActionsV2(), null, 2));
|
|
332
|
+
});
|
|
333
|
+
browse
|
|
334
|
+
.command("set-max-active-targets-v2 <n>")
|
|
335
|
+
.description("Set per-owner active cap")
|
|
336
|
+
.action((n) => {
|
|
337
|
+
setMaxActiveBrowseTargetsPerOwnerV2(Number(n));
|
|
338
|
+
console.log(
|
|
339
|
+
JSON.stringify(
|
|
340
|
+
{
|
|
341
|
+
maxActiveBrowseTargetsPerOwner:
|
|
342
|
+
getMaxActiveBrowseTargetsPerOwnerV2(),
|
|
343
|
+
},
|
|
344
|
+
null,
|
|
345
|
+
2,
|
|
346
|
+
),
|
|
347
|
+
);
|
|
348
|
+
});
|
|
349
|
+
browse
|
|
350
|
+
.command("set-max-pending-actions-v2 <n>")
|
|
351
|
+
.description("Set per-target pending cap")
|
|
352
|
+
.action((n) => {
|
|
353
|
+
setMaxPendingBrowseActionsPerTargetV2(Number(n));
|
|
354
|
+
console.log(
|
|
355
|
+
JSON.stringify(
|
|
356
|
+
{
|
|
357
|
+
maxPendingBrowseActionsPerTarget:
|
|
358
|
+
getMaxPendingBrowseActionsPerTargetV2(),
|
|
359
|
+
},
|
|
360
|
+
null,
|
|
361
|
+
2,
|
|
362
|
+
),
|
|
363
|
+
);
|
|
364
|
+
});
|
|
365
|
+
browse
|
|
366
|
+
.command("set-target-idle-ms-v2 <n>")
|
|
367
|
+
.description("Set idle threshold")
|
|
368
|
+
.action((n) => {
|
|
369
|
+
setBrowseTargetIdleMsV2(Number(n));
|
|
370
|
+
console.log(
|
|
371
|
+
JSON.stringify(
|
|
372
|
+
{ browseTargetIdleMs: getBrowseTargetIdleMsV2() },
|
|
373
|
+
null,
|
|
374
|
+
2,
|
|
375
|
+
),
|
|
376
|
+
);
|
|
377
|
+
});
|
|
378
|
+
browse
|
|
379
|
+
.command("set-action-stuck-ms-v2 <n>")
|
|
380
|
+
.description("Set stuck threshold")
|
|
381
|
+
.action((n) => {
|
|
382
|
+
setBrowseActionStuckMsV2(Number(n));
|
|
383
|
+
console.log(
|
|
384
|
+
JSON.stringify(
|
|
385
|
+
{ browseActionStuckMs: getBrowseActionStuckMsV2() },
|
|
386
|
+
null,
|
|
387
|
+
2,
|
|
388
|
+
),
|
|
389
|
+
);
|
|
390
|
+
});
|
|
391
|
+
browse
|
|
392
|
+
.command("auto-degrade-idle-targets-v2")
|
|
393
|
+
.description("Auto-degrade idle targets")
|
|
394
|
+
.action(() => {
|
|
395
|
+
console.log(JSON.stringify(autoDegradeIdleBrowseTargetsV2(), null, 2));
|
|
396
|
+
});
|
|
397
|
+
browse
|
|
398
|
+
.command("auto-fail-stuck-actions-v2")
|
|
399
|
+
.description("Auto-fail stuck actions")
|
|
400
|
+
.action(() => {
|
|
401
|
+
console.log(JSON.stringify(autoFailStuckBrowseActionsV2(), null, 2));
|
|
402
|
+
});
|
|
403
|
+
browse
|
|
404
|
+
.command("stats-v2")
|
|
405
|
+
.description("V2 aggregate stats")
|
|
406
|
+
.action(() => {
|
|
407
|
+
console.log(JSON.stringify(getBrowserAutomationStatsV2(), null, 2));
|
|
408
|
+
});
|
|
248
409
|
}
|
package/src/commands/ccron.js
CHANGED
|
@@ -37,42 +37,142 @@ export function registerCcronCommand(program) {
|
|
|
37
37
|
.command("ccron")
|
|
38
38
|
.description("Cowork Cron V2 governance (in-memory, CLI v0.143.0)");
|
|
39
39
|
|
|
40
|
-
c.command("enums-v2").action(() =>
|
|
40
|
+
c.command("enums-v2").action(() =>
|
|
41
|
+
console.log(
|
|
42
|
+
JSON.stringify(
|
|
43
|
+
{ CCRON_PROFILE_MATURITY_V2, CCRON_TICK_LIFECYCLE_V2 },
|
|
44
|
+
null,
|
|
45
|
+
2,
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
41
49
|
c.command("register-profile-v2")
|
|
42
50
|
.requiredOption("--id <id>")
|
|
43
51
|
.requiredOption("--owner <owner>")
|
|
44
52
|
.option("--expr <expr>", "cron expression", "0 0 * * *")
|
|
45
|
-
.action((o) =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
c.command("
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
c.command("
|
|
53
|
+
.action((o) =>
|
|
54
|
+
console.log(JSON.stringify(registerCcronProfileV2(o), null, 2)),
|
|
55
|
+
);
|
|
56
|
+
c.command("activate-profile-v2 <id>").action((id) =>
|
|
57
|
+
console.log(JSON.stringify(activateCcronProfileV2(id), null, 2)),
|
|
58
|
+
);
|
|
59
|
+
c.command("pause-profile-v2 <id>").action((id) =>
|
|
60
|
+
console.log(JSON.stringify(pauseCcronProfileV2(id), null, 2)),
|
|
61
|
+
);
|
|
62
|
+
c.command("archive-profile-v2 <id>").action((id) =>
|
|
63
|
+
console.log(JSON.stringify(archiveCcronProfileV2(id), null, 2)),
|
|
64
|
+
);
|
|
65
|
+
c.command("touch-profile-v2 <id>").action((id) =>
|
|
66
|
+
console.log(JSON.stringify(touchCcronProfileV2(id), null, 2)),
|
|
67
|
+
);
|
|
68
|
+
c.command("get-profile-v2 <id>").action((id) =>
|
|
69
|
+
console.log(JSON.stringify(getCcronProfileV2(id), null, 2)),
|
|
70
|
+
);
|
|
71
|
+
c.command("list-profiles-v2").action(() =>
|
|
72
|
+
console.log(JSON.stringify(listCcronProfilesV2(), null, 2)),
|
|
73
|
+
);
|
|
52
74
|
|
|
53
75
|
c.command("create-tick-v2")
|
|
54
76
|
.requiredOption("--id <id>")
|
|
55
77
|
.requiredOption("--profile-id <profileId>")
|
|
56
78
|
.option("--tick-at <ts>", "tick timestamp", "")
|
|
57
|
-
.action((o) =>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
79
|
+
.action((o) =>
|
|
80
|
+
console.log(
|
|
81
|
+
JSON.stringify(
|
|
82
|
+
createCcronTickV2({
|
|
83
|
+
id: o.id,
|
|
84
|
+
profileId: o.profileId,
|
|
85
|
+
tickAt: o.tickAt,
|
|
86
|
+
}),
|
|
87
|
+
null,
|
|
88
|
+
2,
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
);
|
|
92
|
+
c.command("running-tick-v2 <id>").action((id) =>
|
|
93
|
+
console.log(JSON.stringify(runningCcronTickV2(id), null, 2)),
|
|
94
|
+
);
|
|
95
|
+
c.command("complete-tick-v2 <id>").action((id) =>
|
|
96
|
+
console.log(JSON.stringify(completeCcronTickV2(id), null, 2)),
|
|
97
|
+
);
|
|
98
|
+
c.command("fail-tick-v2 <id>")
|
|
99
|
+
.option("--reason <r>")
|
|
100
|
+
.action((id, o) =>
|
|
101
|
+
console.log(JSON.stringify(failCcronTickV2(id, o.reason), null, 2)),
|
|
102
|
+
);
|
|
103
|
+
c.command("cancel-tick-v2 <id>")
|
|
104
|
+
.option("--reason <r>")
|
|
105
|
+
.action((id, o) =>
|
|
106
|
+
console.log(JSON.stringify(cancelCcronTickV2(id, o.reason), null, 2)),
|
|
107
|
+
);
|
|
108
|
+
c.command("get-tick-v2 <id>").action((id) =>
|
|
109
|
+
console.log(JSON.stringify(getCcronTickV2(id), null, 2)),
|
|
110
|
+
);
|
|
111
|
+
c.command("list-ticks-v2").action(() =>
|
|
112
|
+
console.log(JSON.stringify(listCcronTicksV2(), null, 2)),
|
|
113
|
+
);
|
|
64
114
|
|
|
65
|
-
c.command("config-v2").action(() =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
115
|
+
c.command("config-v2").action(() =>
|
|
116
|
+
console.log(
|
|
117
|
+
JSON.stringify(
|
|
118
|
+
{
|
|
119
|
+
maxActiveCcronProfilesPerOwner: getMaxActiveCcronProfilesPerOwnerV2(),
|
|
120
|
+
maxPendingCcronTicksPerProfile: getMaxPendingCcronTicksPerProfileV2(),
|
|
121
|
+
ccronProfileIdleMs: getCcronProfileIdleMsV2(),
|
|
122
|
+
ccronTickStuckMs: getCcronTickStuckMsV2(),
|
|
123
|
+
},
|
|
124
|
+
null,
|
|
125
|
+
2,
|
|
126
|
+
),
|
|
127
|
+
),
|
|
128
|
+
);
|
|
129
|
+
c.command("set-max-active-profiles-v2 <n>").action((n) => {
|
|
130
|
+
setMaxActiveCcronProfilesPerOwnerV2(Number(n));
|
|
131
|
+
console.log(
|
|
132
|
+
JSON.stringify(
|
|
133
|
+
{
|
|
134
|
+
maxActiveCcronProfilesPerOwner: getMaxActiveCcronProfilesPerOwnerV2(),
|
|
135
|
+
},
|
|
136
|
+
null,
|
|
137
|
+
2,
|
|
138
|
+
),
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
c.command("set-max-pending-ticks-v2 <n>").action((n) => {
|
|
142
|
+
setMaxPendingCcronTicksPerProfileV2(Number(n));
|
|
143
|
+
console.log(
|
|
144
|
+
JSON.stringify(
|
|
145
|
+
{
|
|
146
|
+
maxPendingCcronTicksPerProfile: getMaxPendingCcronTicksPerProfileV2(),
|
|
147
|
+
},
|
|
148
|
+
null,
|
|
149
|
+
2,
|
|
150
|
+
),
|
|
151
|
+
);
|
|
152
|
+
});
|
|
153
|
+
c.command("set-profile-idle-ms-v2 <ms>").action((ms) => {
|
|
154
|
+
setCcronProfileIdleMsV2(Number(ms));
|
|
155
|
+
console.log(
|
|
156
|
+
JSON.stringify(
|
|
157
|
+
{ ccronProfileIdleMs: getCcronProfileIdleMsV2() },
|
|
158
|
+
null,
|
|
159
|
+
2,
|
|
160
|
+
),
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
c.command("set-tick-stuck-ms-v2 <ms>").action((ms) => {
|
|
164
|
+
setCcronTickStuckMsV2(Number(ms));
|
|
165
|
+
console.log(
|
|
166
|
+
JSON.stringify({ ccronTickStuckMs: getCcronTickStuckMsV2() }, null, 2),
|
|
167
|
+
);
|
|
168
|
+
});
|
|
169
|
+
c.command("auto-pause-idle-v2").action(() =>
|
|
170
|
+
console.log(JSON.stringify(autoPauseIdleCcronProfilesV2(), null, 2)),
|
|
171
|
+
);
|
|
172
|
+
c.command("auto-fail-stuck-v2").action(() =>
|
|
173
|
+
console.log(JSON.stringify(autoFailStuckCcronTicksV2(), null, 2)),
|
|
174
|
+
);
|
|
175
|
+
c.command("gov-stats-v2").action(() =>
|
|
176
|
+
console.log(JSON.stringify(getCoworkCronGovStatsV2(), null, 2)),
|
|
177
|
+
);
|
|
78
178
|
}
|
package/src/commands/chat.js
CHANGED
|
@@ -38,3 +38,210 @@ export function registerChatCommand(program) {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
// === Iter17 V2 governance overlay ===
|
|
43
|
+
export function registerChatgovV2Commands(program) {
|
|
44
|
+
const parent = program.commands.find((c) => c.name() === "chat");
|
|
45
|
+
if (!parent) return;
|
|
46
|
+
const L = async () => await import("../lib/chat-core.js");
|
|
47
|
+
parent
|
|
48
|
+
.command("chatgov-enums-v2")
|
|
49
|
+
.description("Show V2 enums")
|
|
50
|
+
.action(async () => {
|
|
51
|
+
const m = await L();
|
|
52
|
+
console.log(
|
|
53
|
+
JSON.stringify(
|
|
54
|
+
{
|
|
55
|
+
profileMaturity: m.CHATGOV_PROFILE_MATURITY_V2,
|
|
56
|
+
messageLifecycle: m.CHATGOV_MESSAGE_LIFECYCLE_V2,
|
|
57
|
+
},
|
|
58
|
+
null,
|
|
59
|
+
2,
|
|
60
|
+
),
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
parent
|
|
64
|
+
.command("chatgov-config-v2")
|
|
65
|
+
.description("Show V2 config")
|
|
66
|
+
.action(async () => {
|
|
67
|
+
const m = await L();
|
|
68
|
+
console.log(
|
|
69
|
+
JSON.stringify(
|
|
70
|
+
{
|
|
71
|
+
maxActive: m.getMaxActiveChatgovProfilesPerOwnerV2(),
|
|
72
|
+
maxPending: m.getMaxPendingChatgovMessagesPerProfileV2(),
|
|
73
|
+
idleMs: m.getChatgovProfileIdleMsV2(),
|
|
74
|
+
stuckMs: m.getChatgovMessageStuckMsV2(),
|
|
75
|
+
},
|
|
76
|
+
null,
|
|
77
|
+
2,
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
parent
|
|
82
|
+
.command("chatgov-set-max-active-v2 <n>")
|
|
83
|
+
.description("Set max active")
|
|
84
|
+
.action(async (n) => {
|
|
85
|
+
(await L()).setMaxActiveChatgovProfilesPerOwnerV2(Number(n));
|
|
86
|
+
console.log("ok");
|
|
87
|
+
});
|
|
88
|
+
parent
|
|
89
|
+
.command("chatgov-set-max-pending-v2 <n>")
|
|
90
|
+
.description("Set max pending")
|
|
91
|
+
.action(async (n) => {
|
|
92
|
+
(await L()).setMaxPendingChatgovMessagesPerProfileV2(Number(n));
|
|
93
|
+
console.log("ok");
|
|
94
|
+
});
|
|
95
|
+
parent
|
|
96
|
+
.command("chatgov-set-idle-ms-v2 <n>")
|
|
97
|
+
.description("Set idle threshold ms")
|
|
98
|
+
.action(async (n) => {
|
|
99
|
+
(await L()).setChatgovProfileIdleMsV2(Number(n));
|
|
100
|
+
console.log("ok");
|
|
101
|
+
});
|
|
102
|
+
parent
|
|
103
|
+
.command("chatgov-set-stuck-ms-v2 <n>")
|
|
104
|
+
.description("Set stuck threshold ms")
|
|
105
|
+
.action(async (n) => {
|
|
106
|
+
(await L()).setChatgovMessageStuckMsV2(Number(n));
|
|
107
|
+
console.log("ok");
|
|
108
|
+
});
|
|
109
|
+
parent
|
|
110
|
+
.command("chatgov-register-v2 <id> <owner>")
|
|
111
|
+
.description("Register V2 profile")
|
|
112
|
+
.option("--mode <v>", "mode")
|
|
113
|
+
.action(async (id, owner, o) => {
|
|
114
|
+
const m = await L();
|
|
115
|
+
console.log(
|
|
116
|
+
JSON.stringify(
|
|
117
|
+
m.registerChatgovProfileV2({ id, owner, mode: o.mode }),
|
|
118
|
+
null,
|
|
119
|
+
2,
|
|
120
|
+
),
|
|
121
|
+
);
|
|
122
|
+
});
|
|
123
|
+
parent
|
|
124
|
+
.command("chatgov-activate-v2 <id>")
|
|
125
|
+
.description("Activate profile")
|
|
126
|
+
.action(async (id) => {
|
|
127
|
+
console.log(
|
|
128
|
+
JSON.stringify((await L()).activateChatgovProfileV2(id), null, 2),
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
parent
|
|
132
|
+
.command("chatgov-stale-v2 <id>")
|
|
133
|
+
.description("Stale profile")
|
|
134
|
+
.action(async (id) => {
|
|
135
|
+
console.log(
|
|
136
|
+
JSON.stringify((await L()).staleChatgovProfileV2(id), null, 2),
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
parent
|
|
140
|
+
.command("chatgov-archive-v2 <id>")
|
|
141
|
+
.description("Archive profile")
|
|
142
|
+
.action(async (id) => {
|
|
143
|
+
console.log(
|
|
144
|
+
JSON.stringify((await L()).archiveChatgovProfileV2(id), null, 2),
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
parent
|
|
148
|
+
.command("chatgov-touch-v2 <id>")
|
|
149
|
+
.description("Touch profile")
|
|
150
|
+
.action(async (id) => {
|
|
151
|
+
console.log(
|
|
152
|
+
JSON.stringify((await L()).touchChatgovProfileV2(id), null, 2),
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
parent
|
|
156
|
+
.command("chatgov-get-v2 <id>")
|
|
157
|
+
.description("Get profile")
|
|
158
|
+
.action(async (id) => {
|
|
159
|
+
console.log(JSON.stringify((await L()).getChatgovProfileV2(id), null, 2));
|
|
160
|
+
});
|
|
161
|
+
parent
|
|
162
|
+
.command("chatgov-list-v2")
|
|
163
|
+
.description("List profiles")
|
|
164
|
+
.action(async () => {
|
|
165
|
+
console.log(JSON.stringify((await L()).listChatgovProfilesV2(), null, 2));
|
|
166
|
+
});
|
|
167
|
+
parent
|
|
168
|
+
.command("chatgov-create-message-v2 <id> <profileId>")
|
|
169
|
+
.description("Create message")
|
|
170
|
+
.option("--role <v>", "role")
|
|
171
|
+
.action(async (id, profileId, o) => {
|
|
172
|
+
const m = await L();
|
|
173
|
+
console.log(
|
|
174
|
+
JSON.stringify(
|
|
175
|
+
m.createChatgovMessageV2({ id, profileId, role: o.role }),
|
|
176
|
+
null,
|
|
177
|
+
2,
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
});
|
|
181
|
+
parent
|
|
182
|
+
.command("chatgov-sending-message-v2 <id>")
|
|
183
|
+
.description("Mark message as sending")
|
|
184
|
+
.action(async (id) => {
|
|
185
|
+
console.log(
|
|
186
|
+
JSON.stringify((await L()).sendingChatgovMessageV2(id), null, 2),
|
|
187
|
+
);
|
|
188
|
+
});
|
|
189
|
+
parent
|
|
190
|
+
.command("chatgov-complete-message-v2 <id>")
|
|
191
|
+
.description("Complete message")
|
|
192
|
+
.action(async (id) => {
|
|
193
|
+
console.log(
|
|
194
|
+
JSON.stringify((await L()).completeMessageChatgovV2(id), null, 2),
|
|
195
|
+
);
|
|
196
|
+
});
|
|
197
|
+
parent
|
|
198
|
+
.command("chatgov-fail-message-v2 <id> [reason]")
|
|
199
|
+
.description("Fail message")
|
|
200
|
+
.action(async (id, reason) => {
|
|
201
|
+
console.log(
|
|
202
|
+
JSON.stringify((await L()).failChatgovMessageV2(id, reason), null, 2),
|
|
203
|
+
);
|
|
204
|
+
});
|
|
205
|
+
parent
|
|
206
|
+
.command("chatgov-cancel-message-v2 <id> [reason]")
|
|
207
|
+
.description("Cancel message")
|
|
208
|
+
.action(async (id, reason) => {
|
|
209
|
+
console.log(
|
|
210
|
+
JSON.stringify((await L()).cancelChatgovMessageV2(id, reason), null, 2),
|
|
211
|
+
);
|
|
212
|
+
});
|
|
213
|
+
parent
|
|
214
|
+
.command("chatgov-get-message-v2 <id>")
|
|
215
|
+
.description("Get message")
|
|
216
|
+
.action(async (id) => {
|
|
217
|
+
console.log(JSON.stringify((await L()).getChatgovMessageV2(id), null, 2));
|
|
218
|
+
});
|
|
219
|
+
parent
|
|
220
|
+
.command("chatgov-list-messages-v2")
|
|
221
|
+
.description("List messages")
|
|
222
|
+
.action(async () => {
|
|
223
|
+
console.log(JSON.stringify((await L()).listChatgovMessagesV2(), null, 2));
|
|
224
|
+
});
|
|
225
|
+
parent
|
|
226
|
+
.command("chatgov-auto-stale-idle-v2")
|
|
227
|
+
.description("Auto-stale idle")
|
|
228
|
+
.action(async () => {
|
|
229
|
+
console.log(
|
|
230
|
+
JSON.stringify((await L()).autoStaleIdleChatgovProfilesV2(), null, 2),
|
|
231
|
+
);
|
|
232
|
+
});
|
|
233
|
+
parent
|
|
234
|
+
.command("chatgov-auto-fail-stuck-v2")
|
|
235
|
+
.description("Auto-fail stuck messages")
|
|
236
|
+
.action(async () => {
|
|
237
|
+
console.log(
|
|
238
|
+
JSON.stringify((await L()).autoFailStuckChatgovMessagesV2(), null, 2),
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
parent
|
|
242
|
+
.command("chatgov-gov-stats-v2")
|
|
243
|
+
.description("V2 gov stats")
|
|
244
|
+
.action(async () => {
|
|
245
|
+
console.log(JSON.stringify((await L()).getChatCoreGovStatsV2(), null, 2));
|
|
246
|
+
});
|
|
247
|
+
}
|