chainlesschain 0.132.0 → 0.143.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 +62 -0
- package/src/commands/activitypub.js +61 -0
- package/src/commands/agent.js +117 -0
- package/src/commands/bi.js +61 -0
- package/src/commands/bm25.js +78 -0
- package/src/commands/browse.js +64 -0
- package/src/commands/ccron.js +78 -0
- package/src/commands/compliance.js +40 -0
- package/src/commands/compt.js +78 -0
- package/src/commands/consol.js +231 -0
- package/src/commands/cowork.js +42 -0
- package/src/commands/crosschain.js +62 -0
- package/src/commands/dao.js +62 -0
- package/src/commands/dlp.js +61 -0
- package/src/commands/economy.js +56 -0
- package/src/commands/evolution.js +56 -0
- package/src/commands/evomap.js +61 -0
- package/src/commands/fflag.js +178 -0
- package/src/commands/git.js +45 -0
- package/src/commands/hmemory.js +56 -0
- package/src/commands/inference.js +42 -0
- package/src/commands/itbudget.js +45 -0
- package/src/commands/lowcode.js +44 -0
- package/src/commands/matrix.js +62 -0
- package/src/commands/mcpscaf.js +41 -0
- package/src/commands/meminj.js +41 -0
- package/src/commands/nostr.js +62 -0
- package/src/commands/orchgov.js +45 -0
- package/src/commands/pdfp.js +78 -0
- package/src/commands/perf.js +39 -0
- package/src/commands/perm.js +45 -0
- package/src/commands/pipeline.js +57 -1
- package/src/commands/planmode.js +45 -0
- package/src/commands/promcomp.js +82 -0
- package/src/commands/recommend.js +42 -0
- package/src/commands/seshhook.js +41 -0
- package/src/commands/seshsearch.js +41 -0
- package/src/commands/seshtail.js +41 -0
- package/src/commands/seshu.js +41 -0
- package/src/commands/sganal.js +78 -0
- package/src/commands/siem.js +40 -0
- package/src/commands/slotfill.js +41 -0
- package/src/commands/social.js +34 -0
- package/src/commands/svccont.js +45 -0
- package/src/commands/tms.js +45 -0
- package/src/commands/topiccls.js +45 -0
- package/src/commands/uprof.js +45 -0
- package/src/commands/vcheck.js +78 -0
- package/src/commands/webfetch.js +41 -0
- package/src/commands/zkp.js +62 -0
- package/src/harness/prompt-compressor.js +331 -0
- package/src/index.js +61 -1
- package/src/lib/a2a-protocol.js +105 -0
- package/src/lib/activitypub-bridge.js +105 -0
- package/src/lib/agent-economy.js +105 -0
- package/src/lib/app-builder.js +105 -0
- package/src/lib/autonomous-agent.js +105 -0
- package/src/lib/bi-engine.js +105 -0
- package/src/lib/bm25-search.js +81 -0
- package/src/lib/browser-automation.js +105 -0
- package/src/lib/compliance-framework-reporter.js +105 -0
- package/src/lib/compression-telemetry.js +81 -0
- package/src/lib/content-recommender.js +105 -0
- package/src/lib/cowork-cron.js +81 -0
- package/src/lib/cowork-task-runner.js +105 -0
- package/src/lib/cross-chain.js +105 -0
- package/src/lib/dao-governance.js +105 -0
- package/src/lib/dlp-engine.js +105 -0
- package/src/lib/evolution-system.js +105 -0
- package/src/lib/evomap-manager.js +105 -0
- package/src/lib/execution-backend.js +105 -0
- package/src/lib/feature-flags.js +85 -0
- package/src/lib/git-integration.js +105 -0
- package/src/lib/hierarchical-memory.js +105 -0
- package/src/lib/inference-network.js +105 -0
- package/src/lib/iteration-budget.js +105 -0
- package/src/lib/matrix-bridge.js +105 -0
- package/src/lib/mcp-scaffold.js +81 -0
- package/src/lib/memory-injection.js +81 -0
- package/src/lib/nostr-bridge.js +105 -0
- package/src/lib/orchestrator.js +105 -0
- package/src/lib/pdf-parser.js +81 -0
- package/src/lib/perf-tuning.js +105 -0
- package/src/lib/permission-engine.js +81 -0
- package/src/lib/pipeline-orchestrator.js +105 -0
- package/src/lib/plan-mode.js +81 -0
- package/src/lib/prompt-compressor.js +1 -10
- package/src/lib/service-container.js +81 -0
- package/src/lib/session-consolidator.js +105 -0
- package/src/lib/session-hooks.js +81 -0
- package/src/lib/session-search.js +81 -0
- package/src/lib/session-tail.js +81 -0
- package/src/lib/session-usage.js +83 -0
- package/src/lib/siem-exporter.js +105 -0
- package/src/lib/slot-filler.js +81 -0
- package/src/lib/social-graph-analytics.js +81 -0
- package/src/lib/social-graph.js +81 -0
- package/src/lib/sub-agent-registry.js +110 -0
- package/src/lib/task-model-selector.js +81 -0
- package/src/lib/todo-manager.js +105 -0
- package/src/lib/topic-classifier.js +105 -0
- package/src/lib/user-profile.js +81 -0
- package/src/lib/version-checker.js +81 -0
- package/src/lib/web-fetch.js +81 -0
- package/src/lib/zkp-engine.js +105 -0
package/package.json
CHANGED
package/src/commands/a2a.js
CHANGED
|
@@ -751,4 +751,66 @@ export function registerA2aCommand(program) {
|
|
|
751
751
|
logger.log(` Subs (typed): ${s.subscriptions.typed}`);
|
|
752
752
|
}
|
|
753
753
|
});
|
|
754
|
+
registerA2aV2Command(a2a);
|
|
754
755
|
}
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
import {
|
|
759
|
+
A2A_AGENT_MATURITY_V2,
|
|
760
|
+
A2A_MESSAGE_LIFECYCLE_V2,
|
|
761
|
+
registerA2aAgentV2,
|
|
762
|
+
activateA2aAgentV2,
|
|
763
|
+
suspendA2aAgentV2,
|
|
764
|
+
retireA2aAgentV2,
|
|
765
|
+
touchA2aAgentV2,
|
|
766
|
+
getA2aAgentV2,
|
|
767
|
+
listA2aAgentsV2,
|
|
768
|
+
createA2aMessageV2,
|
|
769
|
+
startA2aMessageV2,
|
|
770
|
+
deliverA2aMessageV2,
|
|
771
|
+
failA2aMessageV2,
|
|
772
|
+
cancelA2aMessageV2,
|
|
773
|
+
getA2aMessageV2,
|
|
774
|
+
listA2aMessagesV2,
|
|
775
|
+
setMaxActiveA2aAgentsPerOwnerV2,
|
|
776
|
+
getMaxActiveA2aAgentsPerOwnerV2,
|
|
777
|
+
setMaxPendingA2aMessagesPerAgentV2,
|
|
778
|
+
getMaxPendingA2aMessagesPerAgentV2,
|
|
779
|
+
setA2aAgentIdleMsV2,
|
|
780
|
+
getA2aAgentIdleMsV2,
|
|
781
|
+
setA2aMessageStuckMsV2,
|
|
782
|
+
getA2aMessageStuckMsV2,
|
|
783
|
+
autoSuspendIdleA2aAgentsV2,
|
|
784
|
+
autoFailStuckA2aMessagesV2,
|
|
785
|
+
getA2aProtocolGovStatsV2,
|
|
786
|
+
} from "../lib/a2a-protocol.js";
|
|
787
|
+
|
|
788
|
+
export function registerA2aV2Command(a2a) {
|
|
789
|
+
a2a.command("enums-v2").description("Show V2 governance enums").action(() => { console.log(JSON.stringify({ A2A_AGENT_MATURITY_V2, A2A_MESSAGE_LIFECYCLE_V2 }, null, 2)); });
|
|
790
|
+
a2a.command("register-agent-v2").description("Register an a2a agent profile (pending)")
|
|
791
|
+
.requiredOption("--id <id>").requiredOption("--owner <owner>").option("--capabilities <csv>")
|
|
792
|
+
.action((o) => { const caps = o.capabilities ? o.capabilities.split(",").map(s=>s.trim()).filter(Boolean) : []; console.log(JSON.stringify(registerA2aAgentV2({ id: o.id, owner: o.owner, capabilities: caps }), null, 2)); });
|
|
793
|
+
a2a.command("activate-agent-v2 <id>").description("Activate agent").action((id) => { console.log(JSON.stringify(activateA2aAgentV2(id), null, 2)); });
|
|
794
|
+
a2a.command("suspend-agent-v2 <id>").description("Suspend agent").action((id) => { console.log(JSON.stringify(suspendA2aAgentV2(id), null, 2)); });
|
|
795
|
+
a2a.command("retire-agent-v2 <id>").description("Retire agent (terminal)").action((id) => { console.log(JSON.stringify(retireA2aAgentV2(id), null, 2)); });
|
|
796
|
+
a2a.command("touch-agent-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchA2aAgentV2(id), null, 2)); });
|
|
797
|
+
a2a.command("get-agent-v2 <id>").description("Get agent").action((id) => { console.log(JSON.stringify(getA2aAgentV2(id), null, 2)); });
|
|
798
|
+
a2a.command("list-agents-v2").description("List agents").action(() => { console.log(JSON.stringify(listA2aAgentsV2(), null, 2)); });
|
|
799
|
+
a2a.command("create-message-v2").description("Create an a2a message (queued)")
|
|
800
|
+
.requiredOption("--id <id>").requiredOption("--agent-id <agentId>").option("--peer-id <peerId>").option("--payload <payload>")
|
|
801
|
+
.action((o) => { console.log(JSON.stringify(createA2aMessageV2({ id: o.id, agentId: o.agentId, peerId: o.peerId, payload: o.payload }), null, 2)); });
|
|
802
|
+
a2a.command("start-message-v2 <id>").description("Transition message to sending").action((id) => { console.log(JSON.stringify(startA2aMessageV2(id), null, 2)); });
|
|
803
|
+
a2a.command("deliver-message-v2 <id>").description("Transition message to delivered").action((id) => { console.log(JSON.stringify(deliverA2aMessageV2(id), null, 2)); });
|
|
804
|
+
a2a.command("fail-message-v2 <id>").description("Fail message").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failA2aMessageV2(id, o.reason), null, 2)); });
|
|
805
|
+
a2a.command("cancel-message-v2 <id>").description("Cancel message").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelA2aMessageV2(id, o.reason), null, 2)); });
|
|
806
|
+
a2a.command("get-message-v2 <id>").description("Get message").action((id) => { console.log(JSON.stringify(getA2aMessageV2(id), null, 2)); });
|
|
807
|
+
a2a.command("list-messages-v2").description("List messages").action(() => { console.log(JSON.stringify(listA2aMessagesV2(), null, 2)); });
|
|
808
|
+
a2a.command("set-max-active-agents-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveA2aAgentsPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveA2aAgentsPerOwner: getMaxActiveA2aAgentsPerOwnerV2() }, null, 2)); });
|
|
809
|
+
a2a.command("set-max-pending-messages-v2 <n>").description("Set per-agent pending cap").action((n) => { setMaxPendingA2aMessagesPerAgentV2(Number(n)); console.log(JSON.stringify({ maxPendingA2aMessagesPerAgent: getMaxPendingA2aMessagesPerAgentV2() }, null, 2)); });
|
|
810
|
+
a2a.command("set-agent-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setA2aAgentIdleMsV2(Number(n)); console.log(JSON.stringify({ a2aAgentIdleMs: getA2aAgentIdleMsV2() }, null, 2)); });
|
|
811
|
+
a2a.command("set-message-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setA2aMessageStuckMsV2(Number(n)); console.log(JSON.stringify({ a2aMessageStuckMs: getA2aMessageStuckMsV2() }, null, 2)); });
|
|
812
|
+
a2a.command("auto-suspend-idle-agents-v2").description("Auto-suspend idle agents").action(() => { console.log(JSON.stringify(autoSuspendIdleA2aAgentsV2(), null, 2)); });
|
|
813
|
+
a2a.command("auto-fail-stuck-messages-v2").description("Auto-fail stuck sending messages").action(() => { console.log(JSON.stringify(autoFailStuckA2aMessagesV2(), null, 2)); });
|
|
814
|
+
a2a.command("gov-stats-v2").description("V2 governance aggregate stats").action(() => { console.log(JSON.stringify(getA2aProtocolGovStatsV2(), null, 2)); });
|
|
815
|
+
}
|
|
816
|
+
|
|
@@ -530,4 +530,65 @@ export function registerActivityPubCommand(program) {
|
|
|
530
530
|
process.exit(1);
|
|
531
531
|
}
|
|
532
532
|
});
|
|
533
|
+
registerActivityPubV2Command(ap);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
import {
|
|
538
|
+
AP_ACTOR_MATURITY_V2,
|
|
539
|
+
AP_ACTIVITY_LIFECYCLE_V2,
|
|
540
|
+
registerApActorV2,
|
|
541
|
+
activateApActorV2,
|
|
542
|
+
suspendApActorV2,
|
|
543
|
+
deactivateApActorV2,
|
|
544
|
+
touchApActorV2,
|
|
545
|
+
getApActorV2,
|
|
546
|
+
listApActorsV2,
|
|
547
|
+
createApActivityV2,
|
|
548
|
+
startApActivityV2,
|
|
549
|
+
deliverApActivityV2,
|
|
550
|
+
failApActivityV2,
|
|
551
|
+
cancelApActivityV2,
|
|
552
|
+
getApActivityV2,
|
|
553
|
+
listApActivitiesV2,
|
|
554
|
+
setMaxActiveApActorsPerOwnerV2,
|
|
555
|
+
getMaxActiveApActorsPerOwnerV2,
|
|
556
|
+
setMaxPendingApActivitiesPerActorV2,
|
|
557
|
+
getMaxPendingApActivitiesPerActorV2,
|
|
558
|
+
setApActorIdleMsV2,
|
|
559
|
+
getApActorIdleMsV2,
|
|
560
|
+
setApActivityStuckMsV2,
|
|
561
|
+
getApActivityStuckMsV2,
|
|
562
|
+
autoSuspendIdleApActorsV2,
|
|
563
|
+
autoFailStuckApActivitiesV2,
|
|
564
|
+
getActivityPubBridgeStatsV2,
|
|
565
|
+
} from "../lib/activitypub-bridge.js";
|
|
566
|
+
|
|
567
|
+
export function registerActivityPubV2Command(ap) {
|
|
568
|
+
ap.command("enums-v2").description("Show V2 enums").action(() => { console.log(JSON.stringify({ AP_ACTOR_MATURITY_V2, AP_ACTIVITY_LIFECYCLE_V2 }, null, 2)); });
|
|
569
|
+
ap.command("register-actor-v2").description("Register an AP actor profile (pending)")
|
|
570
|
+
.requiredOption("--id <id>").requiredOption("--owner <owner>").option("--handle <handle>")
|
|
571
|
+
.action((o) => { console.log(JSON.stringify(registerApActorV2(o), null, 2)); });
|
|
572
|
+
ap.command("activate-actor-v2 <id>").description("Activate actor").action((id) => { console.log(JSON.stringify(activateApActorV2(id), null, 2)); });
|
|
573
|
+
ap.command("suspend-actor-v2 <id>").description("Suspend actor").action((id) => { console.log(JSON.stringify(suspendApActorV2(id), null, 2)); });
|
|
574
|
+
ap.command("deactivate-actor-v2 <id>").description("Deactivate actor (terminal)").action((id) => { console.log(JSON.stringify(deactivateApActorV2(id), null, 2)); });
|
|
575
|
+
ap.command("touch-actor-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchApActorV2(id), null, 2)); });
|
|
576
|
+
ap.command("get-actor-v2 <id>").description("Get actor").action((id) => { console.log(JSON.stringify(getApActorV2(id), null, 2)); });
|
|
577
|
+
ap.command("list-actors-v2").description("List actors").action(() => { console.log(JSON.stringify(listApActorsV2(), null, 2)); });
|
|
578
|
+
ap.command("create-activity-v2").description("Create an AP activity (queued)")
|
|
579
|
+
.requiredOption("--id <id>").requiredOption("--actor-id <actorId>").option("--kind <kind>")
|
|
580
|
+
.action((o) => { console.log(JSON.stringify(createApActivityV2({ id: o.id, actorId: o.actorId, kind: o.kind }), null, 2)); });
|
|
581
|
+
ap.command("start-activity-v2 <id>").description("Transition activity to delivering").action((id) => { console.log(JSON.stringify(startApActivityV2(id), null, 2)); });
|
|
582
|
+
ap.command("deliver-activity-v2 <id>").description("Transition activity to delivered").action((id) => { console.log(JSON.stringify(deliverApActivityV2(id), null, 2)); });
|
|
583
|
+
ap.command("fail-activity-v2 <id>").description("Fail activity").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failApActivityV2(id, o.reason), null, 2)); });
|
|
584
|
+
ap.command("cancel-activity-v2 <id>").description("Cancel activity").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelApActivityV2(id, o.reason), null, 2)); });
|
|
585
|
+
ap.command("get-activity-v2 <id>").description("Get activity").action((id) => { console.log(JSON.stringify(getApActivityV2(id), null, 2)); });
|
|
586
|
+
ap.command("list-activities-v2").description("List activities").action(() => { console.log(JSON.stringify(listApActivitiesV2(), null, 2)); });
|
|
587
|
+
ap.command("set-max-active-actors-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveApActorsPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveApActorsPerOwner: getMaxActiveApActorsPerOwnerV2() }, null, 2)); });
|
|
588
|
+
ap.command("set-max-pending-activities-v2 <n>").description("Set per-actor pending cap").action((n) => { setMaxPendingApActivitiesPerActorV2(Number(n)); console.log(JSON.stringify({ maxPendingApActivitiesPerActor: getMaxPendingApActivitiesPerActorV2() }, null, 2)); });
|
|
589
|
+
ap.command("set-actor-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setApActorIdleMsV2(Number(n)); console.log(JSON.stringify({ apActorIdleMs: getApActorIdleMsV2() }, null, 2)); });
|
|
590
|
+
ap.command("set-activity-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setApActivityStuckMsV2(Number(n)); console.log(JSON.stringify({ apActivityStuckMs: getApActivityStuckMsV2() }, null, 2)); });
|
|
591
|
+
ap.command("auto-suspend-idle-actors-v2").description("Auto-suspend idle actors").action(() => { console.log(JSON.stringify(autoSuspendIdleApActorsV2(), null, 2)); });
|
|
592
|
+
ap.command("auto-fail-stuck-activities-v2").description("Auto-fail stuck delivering activities").action(() => { console.log(JSON.stringify(autoFailStuckApActivitiesV2(), null, 2)); });
|
|
593
|
+
ap.command("gov-stats-v2").description("V2 governance aggregate stats").action(() => { console.log(JSON.stringify(getActivityPubBridgeStatsV2(), null, 2)); });
|
|
533
594
|
}
|
package/src/commands/agent.js
CHANGED
|
@@ -54,3 +54,120 @@ export function registerAgentCommand(program) {
|
|
|
54
54
|
await runtime.startAgentSession();
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
export function registerSubAgentV2Command(program) {
|
|
60
|
+
const sa = program.command("subagent").description("Sub-agent registry V2 governance");
|
|
61
|
+
sa.command("maturities-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.SUBAGENT_PROFILE_MATURITY_V2, null, 2)); });
|
|
62
|
+
sa.command("task-lifecycle-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.SUBAGENT_TASK_LIFECYCLE_V2, null, 2)); });
|
|
63
|
+
sa.command("stats-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.getSubAgentRegistryStatsV2(), null, 2)); });
|
|
64
|
+
sa.command("config-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify({ maxActiveSubagentsPerOwner: m.getMaxActiveSubagentsPerOwnerV2(), maxPendingTasksPerSubagent: m.getMaxPendingTasksPerSubagentV2(), subagentIdleMs: m.getSubagentIdleMsV2(), subagentTaskStuckMs: m.getSubagentTaskStuckMsV2() }, null, 2)); });
|
|
65
|
+
sa.command("register-profile-v2 <id> <owner> [role]").action(async (id, owner, role) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.registerSubagentProfileV2({ id, owner, role }), null, 2)); });
|
|
66
|
+
sa.command("activate-profile-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.activateSubagentProfileV2(id), null, 2)); });
|
|
67
|
+
sa.command("pause-profile-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.pauseSubagentProfileV2(id), null, 2)); });
|
|
68
|
+
sa.command("retire-profile-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.retireSubagentProfileV2(id), null, 2)); });
|
|
69
|
+
sa.command("touch-profile-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.touchSubagentProfileV2(id), null, 2)); });
|
|
70
|
+
sa.command("get-profile-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.getSubagentProfileV2(id), null, 2)); });
|
|
71
|
+
sa.command("list-profiles-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.listSubagentProfilesV2(), null, 2)); });
|
|
72
|
+
sa.command("create-task-v2 <id> <profileId> [desc]").action(async (id, profileId, desc) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.createSubagentTaskV2({ id, profileId, description: desc }), null, 2)); });
|
|
73
|
+
sa.command("start-task-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.startSubagentTaskV2(id), null, 2)); });
|
|
74
|
+
sa.command("complete-task-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.completeSubagentTaskV2(id), null, 2)); });
|
|
75
|
+
sa.command("fail-task-v2 <id> [reason]").action(async (id, reason) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.failSubagentTaskV2(id, reason), null, 2)); });
|
|
76
|
+
sa.command("cancel-task-v2 <id> [reason]").action(async (id, reason) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.cancelSubagentTaskV2(id, reason), null, 2)); });
|
|
77
|
+
sa.command("get-task-v2 <id>").action(async (id) => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.getSubagentTaskV2(id), null, 2)); });
|
|
78
|
+
sa.command("list-tasks-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.listSubagentTasksV2(), null, 2)); });
|
|
79
|
+
sa.command("auto-pause-idle-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.autoPauseIdleSubagentsV2(), null, 2)); });
|
|
80
|
+
sa.command("auto-fail-stuck-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); console.log(JSON.stringify(m.autoFailStuckSubagentTasksV2(), null, 2)); });
|
|
81
|
+
sa.command("set-max-active-v2 <n>").action(async (n) => { const m = await import("../lib/sub-agent-registry.js"); m.setMaxActiveSubagentsPerOwnerV2(parseInt(n, 10)); console.log(JSON.stringify({ maxActiveSubagentsPerOwner: m.getMaxActiveSubagentsPerOwnerV2() }, null, 2)); });
|
|
82
|
+
sa.command("set-max-pending-v2 <n>").action(async (n) => { const m = await import("../lib/sub-agent-registry.js"); m.setMaxPendingTasksPerSubagentV2(parseInt(n, 10)); console.log(JSON.stringify({ maxPendingTasksPerSubagent: m.getMaxPendingTasksPerSubagentV2() }, null, 2)); });
|
|
83
|
+
sa.command("set-idle-ms-v2 <n>").action(async (n) => { const m = await import("../lib/sub-agent-registry.js"); m.setSubagentIdleMsV2(parseInt(n, 10)); console.log(JSON.stringify({ subagentIdleMs: m.getSubagentIdleMsV2() }, null, 2)); });
|
|
84
|
+
sa.command("set-stuck-ms-v2 <n>").action(async (n) => { const m = await import("../lib/sub-agent-registry.js"); m.setSubagentTaskStuckMsV2(parseInt(n, 10)); console.log(JSON.stringify({ subagentTaskStuckMs: m.getSubagentTaskStuckMsV2() }, null, 2)); });
|
|
85
|
+
sa.command("reset-state-v2").action(async () => { const m = await import("../lib/sub-agent-registry.js"); m._resetStateSubAgentRegistryV2(); console.log(JSON.stringify({ ok: true }, null, 2)); });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function registerExecBackendV2Command(program) {
|
|
89
|
+
const eb = program.command("execbe").description("Execution backend V2 governance");
|
|
90
|
+
eb.command("maturities-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.EXECBE_BACKEND_MATURITY_V2, null, 2)); });
|
|
91
|
+
eb.command("job-lifecycle-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.EXECBE_JOB_LIFECYCLE_V2, null, 2)); });
|
|
92
|
+
eb.command("stats-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.getExecutionBackendStatsV2(), null, 2)); });
|
|
93
|
+
eb.command("config-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify({ maxActiveBackendsPerOwner: m.getMaxActiveBackendsPerOwnerV2(), maxPendingJobsPerBackend: m.getMaxPendingJobsPerBackendV2(), backendIdleMs: m.getBackendIdleMsV2(), execJobStuckMs: m.getExecJobStuckMsV2() }, null, 2)); });
|
|
94
|
+
eb.command("register-backend-v2 <id> <owner> [kind]").action(async (id, owner, kind) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.registerBackendV2({ id, owner, kind }), null, 2)); });
|
|
95
|
+
eb.command("activate-backend-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.activateBackendV2(id), null, 2)); });
|
|
96
|
+
eb.command("degrade-backend-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.degradeBackendV2(id), null, 2)); });
|
|
97
|
+
eb.command("retire-backend-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.retireBackendV2(id), null, 2)); });
|
|
98
|
+
eb.command("touch-backend-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.touchBackendV2(id), null, 2)); });
|
|
99
|
+
eb.command("get-backend-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.getBackendV2(id), null, 2)); });
|
|
100
|
+
eb.command("list-backends-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.listBackendsV2(), null, 2)); });
|
|
101
|
+
eb.command("create-job-v2 <id> <backendId> [cmd]").action(async (id, backendId, cmd) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.createExecJobV2({ id, backendId, command: cmd }), null, 2)); });
|
|
102
|
+
eb.command("start-job-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.startExecJobV2(id), null, 2)); });
|
|
103
|
+
eb.command("succeed-job-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.succeedExecJobV2(id), null, 2)); });
|
|
104
|
+
eb.command("fail-job-v2 <id> [reason]").action(async (id, reason) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.failExecJobV2(id, reason), null, 2)); });
|
|
105
|
+
eb.command("cancel-job-v2 <id> [reason]").action(async (id, reason) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.cancelExecJobV2(id, reason), null, 2)); });
|
|
106
|
+
eb.command("get-job-v2 <id>").action(async (id) => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.getExecJobV2(id), null, 2)); });
|
|
107
|
+
eb.command("list-jobs-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.listExecJobsV2(), null, 2)); });
|
|
108
|
+
eb.command("auto-degrade-idle-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.autoDegradeIdleBackendsV2(), null, 2)); });
|
|
109
|
+
eb.command("auto-fail-stuck-v2").action(async () => { const m = await import("../lib/execution-backend.js"); console.log(JSON.stringify(m.autoFailStuckExecJobsV2(), null, 2)); });
|
|
110
|
+
eb.command("set-max-active-v2 <n>").action(async (n) => { const m = await import("../lib/execution-backend.js"); m.setMaxActiveBackendsPerOwnerV2(parseInt(n, 10)); console.log(JSON.stringify({ maxActiveBackendsPerOwner: m.getMaxActiveBackendsPerOwnerV2() }, null, 2)); });
|
|
111
|
+
eb.command("set-max-pending-v2 <n>").action(async (n) => { const m = await import("../lib/execution-backend.js"); m.setMaxPendingJobsPerBackendV2(parseInt(n, 10)); console.log(JSON.stringify({ maxPendingJobsPerBackend: m.getMaxPendingJobsPerBackendV2() }, null, 2)); });
|
|
112
|
+
eb.command("set-idle-ms-v2 <n>").action(async (n) => { const m = await import("../lib/execution-backend.js"); m.setBackendIdleMsV2(parseInt(n, 10)); console.log(JSON.stringify({ backendIdleMs: m.getBackendIdleMsV2() }, null, 2)); });
|
|
113
|
+
eb.command("set-stuck-ms-v2 <n>").action(async (n) => { const m = await import("../lib/execution-backend.js"); m.setExecJobStuckMsV2(parseInt(n, 10)); console.log(JSON.stringify({ execJobStuckMs: m.getExecJobStuckMsV2() }, null, 2)); });
|
|
114
|
+
eb.command("reset-state-v2").action(async () => { const m = await import("../lib/execution-backend.js"); m._resetStateExecutionBackendV2(); console.log(JSON.stringify({ ok: true }, null, 2)); });
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function registerTodoV2Command(program) {
|
|
118
|
+
const td = program.command("todo").description("Todo manager V2 governance");
|
|
119
|
+
td.command("maturities-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.TODO_LIST_MATURITY_V2, null, 2)); });
|
|
120
|
+
td.command("item-lifecycle-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.TODO_ITEM_LIFECYCLE_V2, null, 2)); });
|
|
121
|
+
td.command("stats-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.getTodoManagerStatsV2(), null, 2)); });
|
|
122
|
+
td.command("config-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify({ maxActiveTodoListsPerOwner: m.getMaxActiveTodoListsPerOwnerV2(), maxPendingItemsPerTodoList: m.getMaxPendingItemsPerTodoListV2(), todoListIdleMs: m.getTodoListIdleMsV2(), todoItemStuckMs: m.getTodoItemStuckMsV2() }, null, 2)); });
|
|
123
|
+
td.command("register-list-v2 <id> <owner> [title]").action(async (id, owner, title) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.registerTodoListV2({ id, owner, title }), null, 2)); });
|
|
124
|
+
td.command("activate-list-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.activateTodoListV2(id), null, 2)); });
|
|
125
|
+
td.command("pause-list-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.pauseTodoListV2(id), null, 2)); });
|
|
126
|
+
td.command("archive-list-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.archiveTodoListV2(id), null, 2)); });
|
|
127
|
+
td.command("touch-list-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.touchTodoListV2(id), null, 2)); });
|
|
128
|
+
td.command("get-list-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.getTodoListV2(id), null, 2)); });
|
|
129
|
+
td.command("list-lists-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.listTodoListsV2(), null, 2)); });
|
|
130
|
+
td.command("create-item-v2 <id> <listId> [desc]").action(async (id, listId, desc) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.createTodoItemV2({ id, listId, description: desc }), null, 2)); });
|
|
131
|
+
td.command("start-item-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.startTodoItemV2(id), null, 2)); });
|
|
132
|
+
td.command("complete-item-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.completeTodoItemV2(id), null, 2)); });
|
|
133
|
+
td.command("fail-item-v2 <id> [reason]").action(async (id, reason) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.failTodoItemV2(id, reason), null, 2)); });
|
|
134
|
+
td.command("cancel-item-v2 <id> [reason]").action(async (id, reason) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.cancelTodoItemV2(id, reason), null, 2)); });
|
|
135
|
+
td.command("get-item-v2 <id>").action(async (id) => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.getTodoItemV2(id), null, 2)); });
|
|
136
|
+
td.command("list-items-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.listTodoItemsV2(), null, 2)); });
|
|
137
|
+
td.command("auto-pause-idle-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.autoPauseIdleTodoListsV2(), null, 2)); });
|
|
138
|
+
td.command("auto-fail-stuck-v2").action(async () => { const m = await import("../lib/todo-manager.js"); console.log(JSON.stringify(m.autoFailStuckTodoItemsV2(), null, 2)); });
|
|
139
|
+
td.command("set-max-active-v2 <n>").action(async (n) => { const m = await import("../lib/todo-manager.js"); m.setMaxActiveTodoListsPerOwnerV2(parseInt(n, 10)); console.log(JSON.stringify({ maxActiveTodoListsPerOwner: m.getMaxActiveTodoListsPerOwnerV2() }, null, 2)); });
|
|
140
|
+
td.command("set-max-pending-v2 <n>").action(async (n) => { const m = await import("../lib/todo-manager.js"); m.setMaxPendingItemsPerTodoListV2(parseInt(n, 10)); console.log(JSON.stringify({ maxPendingItemsPerTodoList: m.getMaxPendingItemsPerTodoListV2() }, null, 2)); });
|
|
141
|
+
td.command("set-idle-ms-v2 <n>").action(async (n) => { const m = await import("../lib/todo-manager.js"); m.setTodoListIdleMsV2(parseInt(n, 10)); console.log(JSON.stringify({ todoListIdleMs: m.getTodoListIdleMsV2() }, null, 2)); });
|
|
142
|
+
td.command("set-stuck-ms-v2 <n>").action(async (n) => { const m = await import("../lib/todo-manager.js"); m.setTodoItemStuckMsV2(parseInt(n, 10)); console.log(JSON.stringify({ todoItemStuckMs: m.getTodoItemStuckMsV2() }, null, 2)); });
|
|
143
|
+
td.command("reset-state-v2").action(async () => { const m = await import("../lib/todo-manager.js"); m._resetStateTodoManagerV2(); console.log(JSON.stringify({ ok: true }, null, 2)); });
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function registerAutoAgentV2Command(program) {
|
|
147
|
+
const aa = program.command("autoagent").description("Autonomous agent V2 governance");
|
|
148
|
+
const L = async () => await import("../lib/autonomous-agent.js");
|
|
149
|
+
aa.command("enums-v2").action(async () => { const m = await L(); console.log(JSON.stringify({ agentMaturity: m.AUTOAGENT_MATURITY_V2, runLifecycle: m.AUTOAGENT_RUN_LIFECYCLE_V2 }, null, 2)); });
|
|
150
|
+
aa.command("config-v2").action(async () => { const m = await L(); console.log(JSON.stringify({ maxActiveAutoAgentsPerOwner: m.getMaxActiveAutoAgentsPerOwnerV2(), maxPendingAutoAgentRunsPerAgent: m.getMaxPendingAutoAgentRunsPerAgentV2(), autoAgentIdleMs: m.getAutoAgentIdleMsV2(), autoAgentRunStuckMs: m.getAutoAgentRunStuckMsV2() }, null, 2)); });
|
|
151
|
+
aa.command("set-max-active-v2 <n>").action(async (n) => { const m = await L(); m.setMaxActiveAutoAgentsPerOwnerV2(Number(n)); console.log("ok"); });
|
|
152
|
+
aa.command("set-max-pending-v2 <n>").action(async (n) => { const m = await L(); m.setMaxPendingAutoAgentRunsPerAgentV2(Number(n)); console.log("ok"); });
|
|
153
|
+
aa.command("set-idle-ms-v2 <n>").action(async (n) => { const m = await L(); m.setAutoAgentIdleMsV2(Number(n)); console.log("ok"); });
|
|
154
|
+
aa.command("set-stuck-ms-v2 <n>").action(async (n) => { const m = await L(); m.setAutoAgentRunStuckMsV2(Number(n)); console.log("ok"); });
|
|
155
|
+
aa.command("register-agent-v2 <id> <owner>").option("--goal <g>", "Goal").action(async (id, owner, o) => { const m = await L(); console.log(JSON.stringify(m.registerAutoAgentV2({ id, owner, goal: o.goal }), null, 2)); });
|
|
156
|
+
aa.command("activate-agent-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.activateAutoAgentV2(id), null, 2)); });
|
|
157
|
+
aa.command("pause-agent-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.pauseAutoAgentV2(id), null, 2)); });
|
|
158
|
+
aa.command("archive-agent-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.archiveAutoAgentV2(id), null, 2)); });
|
|
159
|
+
aa.command("touch-agent-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.touchAutoAgentV2(id), null, 2)); });
|
|
160
|
+
aa.command("get-agent-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getAutoAgentV2(id), null, 2)); });
|
|
161
|
+
aa.command("list-agents-v2").action(async () => { const m = await L(); console.log(JSON.stringify(m.listAutoAgentsV2(), null, 2)); });
|
|
162
|
+
aa.command("create-run-v2 <id> <agentId>").option("--prompt <p>", "Prompt").action(async (id, agentId, o) => { const m = await L(); console.log(JSON.stringify(m.createAutoAgentRunV2({ id, agentId, prompt: o.prompt }), null, 2)); });
|
|
163
|
+
aa.command("start-run-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.startAutoAgentRunV2(id), null, 2)); });
|
|
164
|
+
aa.command("complete-run-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.completeAutoAgentRunV2(id), null, 2)); });
|
|
165
|
+
aa.command("fail-run-v2 <id> [reason]").action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.failAutoAgentRunV2(id, reason), null, 2)); });
|
|
166
|
+
aa.command("cancel-run-v2 <id> [reason]").action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.cancelAutoAgentRunV2(id, reason), null, 2)); });
|
|
167
|
+
aa.command("get-run-v2 <id>").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getAutoAgentRunV2(id), null, 2)); });
|
|
168
|
+
aa.command("list-runs-v2").action(async () => { const m = await L(); console.log(JSON.stringify(m.listAutoAgentRunsV2(), null, 2)); });
|
|
169
|
+
aa.command("auto-pause-idle-v2").action(async () => { const m = await L(); console.log(JSON.stringify(m.autoPauseIdleAutoAgentsV2(), null, 2)); });
|
|
170
|
+
aa.command("auto-fail-stuck-v2").action(async () => { const m = await L(); console.log(JSON.stringify(m.autoFailStuckAutoAgentRunsV2(), null, 2)); });
|
|
171
|
+
aa.command("gov-stats-v2").action(async () => { const m = await L(); console.log(JSON.stringify(m.getAutonomousAgentGovStatsV2(), null, 2)); });
|
|
172
|
+
aa.command("reset-state-v2").action(async () => { const m = await L(); m._resetStateAutonomousAgentV2(); console.log(JSON.stringify({ ok: true }, null, 2)); });
|
|
173
|
+
}
|
package/src/commands/bi.js
CHANGED
|
@@ -585,4 +585,65 @@ export function registerBiCommand(program) {
|
|
|
585
585
|
process.exit(1);
|
|
586
586
|
}
|
|
587
587
|
});
|
|
588
|
+
registerBiV2Command(bi);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
import {
|
|
593
|
+
BI_DATASET_MATURITY_V2,
|
|
594
|
+
BI_QUERY_LIFECYCLE_V2,
|
|
595
|
+
registerBiDatasetV2,
|
|
596
|
+
activateBiDatasetV2,
|
|
597
|
+
staleBiDatasetV2,
|
|
598
|
+
archiveBiDatasetV2,
|
|
599
|
+
touchBiDatasetV2,
|
|
600
|
+
getBiDatasetV2,
|
|
601
|
+
listBiDatasetsV2,
|
|
602
|
+
createBiQueryV2,
|
|
603
|
+
startBiQueryV2,
|
|
604
|
+
completeBiQueryV2,
|
|
605
|
+
failBiQueryV2,
|
|
606
|
+
cancelBiQueryV2,
|
|
607
|
+
getBiQueryV2,
|
|
608
|
+
listBiQueriesV2,
|
|
609
|
+
setMaxActiveBiDatasetsPerOwnerV2,
|
|
610
|
+
getMaxActiveBiDatasetsPerOwnerV2,
|
|
611
|
+
setMaxPendingBiQueriesPerDatasetV2,
|
|
612
|
+
getMaxPendingBiQueriesPerDatasetV2,
|
|
613
|
+
setBiDatasetIdleMsV2,
|
|
614
|
+
getBiDatasetIdleMsV2,
|
|
615
|
+
setBiQueryStuckMsV2,
|
|
616
|
+
getBiQueryStuckMsV2,
|
|
617
|
+
autoStaleIdleBiDatasetsV2,
|
|
618
|
+
autoFailStuckBiQueriesV2,
|
|
619
|
+
getBiEngineStatsV2,
|
|
620
|
+
} from "../lib/bi-engine.js";
|
|
621
|
+
|
|
622
|
+
export function registerBiV2Command(bi) {
|
|
623
|
+
bi.command("enums-v2").description("Show V2 enums").action(() => { console.log(JSON.stringify({ BI_DATASET_MATURITY_V2, BI_QUERY_LIFECYCLE_V2 }, null, 2)); });
|
|
624
|
+
bi.command("register-dataset-v2").description("Register a BI dataset profile (pending)")
|
|
625
|
+
.requiredOption("--id <id>").requiredOption("--owner <owner>").option("--source <source>")
|
|
626
|
+
.action((o) => { console.log(JSON.stringify(registerBiDatasetV2(o), null, 2)); });
|
|
627
|
+
bi.command("activate-dataset-v2 <id>").description("Activate dataset").action((id) => { console.log(JSON.stringify(activateBiDatasetV2(id), null, 2)); });
|
|
628
|
+
bi.command("stale-dataset-v2 <id>").description("Mark dataset stale").action((id) => { console.log(JSON.stringify(staleBiDatasetV2(id), null, 2)); });
|
|
629
|
+
bi.command("archive-dataset-v2 <id>").description("Archive dataset (terminal)").action((id) => { console.log(JSON.stringify(archiveBiDatasetV2(id), null, 2)); });
|
|
630
|
+
bi.command("touch-dataset-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchBiDatasetV2(id), null, 2)); });
|
|
631
|
+
bi.command("get-dataset-v2 <id>").description("Get dataset").action((id) => { console.log(JSON.stringify(getBiDatasetV2(id), null, 2)); });
|
|
632
|
+
bi.command("list-datasets-v2").description("List datasets").action(() => { console.log(JSON.stringify(listBiDatasetsV2(), null, 2)); });
|
|
633
|
+
bi.command("create-query-v2").description("Create a BI query (queued)")
|
|
634
|
+
.requiredOption("--id <id>").requiredOption("--dataset-id <datasetId>").option("--sql <sql>")
|
|
635
|
+
.action((o) => { console.log(JSON.stringify(createBiQueryV2({ id: o.id, datasetId: o.datasetId, sql: o.sql }), null, 2)); });
|
|
636
|
+
bi.command("start-query-v2 <id>").description("Transition query to running").action((id) => { console.log(JSON.stringify(startBiQueryV2(id), null, 2)); });
|
|
637
|
+
bi.command("complete-query-v2 <id>").description("Transition query to completed").action((id) => { console.log(JSON.stringify(completeBiQueryV2(id), null, 2)); });
|
|
638
|
+
bi.command("fail-query-v2 <id>").description("Fail query").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failBiQueryV2(id, o.reason), null, 2)); });
|
|
639
|
+
bi.command("cancel-query-v2 <id>").description("Cancel query").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelBiQueryV2(id, o.reason), null, 2)); });
|
|
640
|
+
bi.command("get-query-v2 <id>").description("Get query").action((id) => { console.log(JSON.stringify(getBiQueryV2(id), null, 2)); });
|
|
641
|
+
bi.command("list-queries-v2").description("List queries").action(() => { console.log(JSON.stringify(listBiQueriesV2(), null, 2)); });
|
|
642
|
+
bi.command("set-max-active-datasets-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveBiDatasetsPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveBiDatasetsPerOwner: getMaxActiveBiDatasetsPerOwnerV2() }, null, 2)); });
|
|
643
|
+
bi.command("set-max-pending-queries-v2 <n>").description("Set per-dataset pending cap").action((n) => { setMaxPendingBiQueriesPerDatasetV2(Number(n)); console.log(JSON.stringify({ maxPendingBiQueriesPerDataset: getMaxPendingBiQueriesPerDatasetV2() }, null, 2)); });
|
|
644
|
+
bi.command("set-dataset-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setBiDatasetIdleMsV2(Number(n)); console.log(JSON.stringify({ biDatasetIdleMs: getBiDatasetIdleMsV2() }, null, 2)); });
|
|
645
|
+
bi.command("set-query-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setBiQueryStuckMsV2(Number(n)); console.log(JSON.stringify({ biQueryStuckMs: getBiQueryStuckMsV2() }, null, 2)); });
|
|
646
|
+
bi.command("auto-stale-idle-datasets-v2").description("Auto-stale idle datasets").action(() => { console.log(JSON.stringify(autoStaleIdleBiDatasetsV2(), null, 2)); });
|
|
647
|
+
bi.command("auto-fail-stuck-queries-v2").description("Auto-fail stuck running queries").action(() => { console.log(JSON.stringify(autoFailStuckBiQueriesV2(), null, 2)); });
|
|
648
|
+
bi.command("gov-stats-v2").description("V2 governance aggregate stats").action(() => { console.log(JSON.stringify(getBiEngineStatsV2(), null, 2)); });
|
|
588
649
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BM25 Search V2 governance commands — `cc bm25 ...`
|
|
3
|
+
* 在内存中治理 BM25 profile (pending/active/stale/archived) + query 生命周期。
|
|
4
|
+
*/
|
|
5
|
+
import {
|
|
6
|
+
BM25_PROFILE_MATURITY_V2,
|
|
7
|
+
BM25_QUERY_LIFECYCLE_V2,
|
|
8
|
+
registerBm25ProfileV2,
|
|
9
|
+
activateBm25ProfileV2,
|
|
10
|
+
staleBm25ProfileV2,
|
|
11
|
+
archiveBm25ProfileV2,
|
|
12
|
+
touchBm25ProfileV2,
|
|
13
|
+
getBm25ProfileV2,
|
|
14
|
+
listBm25ProfilesV2,
|
|
15
|
+
createBm25QueryV2,
|
|
16
|
+
searchingBm25QueryV2,
|
|
17
|
+
completeBm25QueryV2,
|
|
18
|
+
failBm25QueryV2,
|
|
19
|
+
cancelBm25QueryV2,
|
|
20
|
+
getBm25QueryV2,
|
|
21
|
+
listBm25QueriesV2,
|
|
22
|
+
setMaxActiveBm25ProfilesPerOwnerV2,
|
|
23
|
+
getMaxActiveBm25ProfilesPerOwnerV2,
|
|
24
|
+
setMaxPendingBm25QueriesPerProfileV2,
|
|
25
|
+
getMaxPendingBm25QueriesPerProfileV2,
|
|
26
|
+
setBm25ProfileIdleMsV2,
|
|
27
|
+
getBm25ProfileIdleMsV2,
|
|
28
|
+
setBm25QueryStuckMsV2,
|
|
29
|
+
getBm25QueryStuckMsV2,
|
|
30
|
+
autoStaleIdleBm25ProfilesV2,
|
|
31
|
+
autoFailStuckBm25QueriesV2,
|
|
32
|
+
getBm25SearchGovStatsV2,
|
|
33
|
+
} from "../lib/bm25-search.js";
|
|
34
|
+
|
|
35
|
+
export function registerBm25Command(program) {
|
|
36
|
+
const b = program
|
|
37
|
+
.command("bm25")
|
|
38
|
+
.description("BM25 Search V2 governance (in-memory, CLI v0.143.0)");
|
|
39
|
+
|
|
40
|
+
b.command("enums-v2").action(() => console.log(JSON.stringify({ BM25_PROFILE_MATURITY_V2, BM25_QUERY_LIFECYCLE_V2 }, null, 2)));
|
|
41
|
+
b.command("register-profile-v2")
|
|
42
|
+
.requiredOption("--id <id>")
|
|
43
|
+
.requiredOption("--owner <owner>")
|
|
44
|
+
.option("--field <field>", "indexed field", "content")
|
|
45
|
+
.action((o) => console.log(JSON.stringify(registerBm25ProfileV2(o), null, 2)));
|
|
46
|
+
b.command("activate-profile-v2 <id>").action((id) => console.log(JSON.stringify(activateBm25ProfileV2(id), null, 2)));
|
|
47
|
+
b.command("stale-profile-v2 <id>").action((id) => console.log(JSON.stringify(staleBm25ProfileV2(id), null, 2)));
|
|
48
|
+
b.command("archive-profile-v2 <id>").action((id) => console.log(JSON.stringify(archiveBm25ProfileV2(id), null, 2)));
|
|
49
|
+
b.command("touch-profile-v2 <id>").action((id) => console.log(JSON.stringify(touchBm25ProfileV2(id), null, 2)));
|
|
50
|
+
b.command("get-profile-v2 <id>").action((id) => console.log(JSON.stringify(getBm25ProfileV2(id), null, 2)));
|
|
51
|
+
b.command("list-profiles-v2").action(() => console.log(JSON.stringify(listBm25ProfilesV2(), null, 2)));
|
|
52
|
+
|
|
53
|
+
b.command("create-query-v2")
|
|
54
|
+
.requiredOption("--id <id>")
|
|
55
|
+
.requiredOption("--profile-id <profileId>")
|
|
56
|
+
.option("--q <q>", "query text", "")
|
|
57
|
+
.action((o) => console.log(JSON.stringify(createBm25QueryV2(o), null, 2)));
|
|
58
|
+
b.command("searching-query-v2 <id>").action((id) => console.log(JSON.stringify(searchingBm25QueryV2(id), null, 2)));
|
|
59
|
+
b.command("complete-query-v2 <id>").action((id) => console.log(JSON.stringify(completeBm25QueryV2(id), null, 2)));
|
|
60
|
+
b.command("fail-query-v2 <id>").option("--reason <r>").action((id, o) => console.log(JSON.stringify(failBm25QueryV2(id, o.reason), null, 2)));
|
|
61
|
+
b.command("cancel-query-v2 <id>").option("--reason <r>").action((id, o) => console.log(JSON.stringify(cancelBm25QueryV2(id, o.reason), null, 2)));
|
|
62
|
+
b.command("get-query-v2 <id>").action((id) => console.log(JSON.stringify(getBm25QueryV2(id), null, 2)));
|
|
63
|
+
b.command("list-queries-v2").action(() => console.log(JSON.stringify(listBm25QueriesV2(), null, 2)));
|
|
64
|
+
|
|
65
|
+
b.command("config-v2").action(() => console.log(JSON.stringify({
|
|
66
|
+
maxActiveBm25ProfilesPerOwner: getMaxActiveBm25ProfilesPerOwnerV2(),
|
|
67
|
+
maxPendingBm25QueriesPerProfile: getMaxPendingBm25QueriesPerProfileV2(),
|
|
68
|
+
bm25ProfileIdleMs: getBm25ProfileIdleMsV2(),
|
|
69
|
+
bm25QueryStuckMs: getBm25QueryStuckMsV2(),
|
|
70
|
+
}, null, 2)));
|
|
71
|
+
b.command("set-max-active-profiles-v2 <n>").action((n) => { setMaxActiveBm25ProfilesPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveBm25ProfilesPerOwner: getMaxActiveBm25ProfilesPerOwnerV2() }, null, 2)); });
|
|
72
|
+
b.command("set-max-pending-queries-v2 <n>").action((n) => { setMaxPendingBm25QueriesPerProfileV2(Number(n)); console.log(JSON.stringify({ maxPendingBm25QueriesPerProfile: getMaxPendingBm25QueriesPerProfileV2() }, null, 2)); });
|
|
73
|
+
b.command("set-profile-idle-ms-v2 <ms>").action((ms) => { setBm25ProfileIdleMsV2(Number(ms)); console.log(JSON.stringify({ bm25ProfileIdleMs: getBm25ProfileIdleMsV2() }, null, 2)); });
|
|
74
|
+
b.command("set-query-stuck-ms-v2 <ms>").action((ms) => { setBm25QueryStuckMsV2(Number(ms)); console.log(JSON.stringify({ bm25QueryStuckMs: getBm25QueryStuckMsV2() }, null, 2)); });
|
|
75
|
+
b.command("auto-stale-idle-v2").action(() => console.log(JSON.stringify(autoStaleIdleBm25ProfilesV2(), null, 2)));
|
|
76
|
+
b.command("auto-fail-stuck-v2").action(() => console.log(JSON.stringify(autoFailStuckBm25QueriesV2(), null, 2)));
|
|
77
|
+
b.command("gov-stats-v2").action(() => console.log(JSON.stringify(getBm25SearchGovStatsV2(), null, 2)));
|
|
78
|
+
}
|
package/src/commands/browse.js
CHANGED
|
@@ -181,4 +181,68 @@ export function registerBrowseCommand(program) {
|
|
|
181
181
|
process.exit(1);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
|
+
|
|
185
|
+
registerBrowseV2Command(browse);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
import {
|
|
190
|
+
BROWSE_TARGET_MATURITY_V2,
|
|
191
|
+
BROWSE_ACTION_LIFECYCLE_V2,
|
|
192
|
+
registerBrowseTargetV2,
|
|
193
|
+
activateBrowseTargetV2,
|
|
194
|
+
degradeBrowseTargetV2,
|
|
195
|
+
retireBrowseTargetV2,
|
|
196
|
+
touchBrowseTargetV2,
|
|
197
|
+
getBrowseTargetV2,
|
|
198
|
+
listBrowseTargetsV2,
|
|
199
|
+
createBrowseActionV2,
|
|
200
|
+
startBrowseActionV2,
|
|
201
|
+
completeBrowseActionV2,
|
|
202
|
+
failBrowseActionV2,
|
|
203
|
+
cancelBrowseActionV2,
|
|
204
|
+
getBrowseActionV2,
|
|
205
|
+
listBrowseActionsV2,
|
|
206
|
+
setMaxActiveBrowseTargetsPerOwnerV2,
|
|
207
|
+
getMaxActiveBrowseTargetsPerOwnerV2,
|
|
208
|
+
setMaxPendingBrowseActionsPerTargetV2,
|
|
209
|
+
getMaxPendingBrowseActionsPerTargetV2,
|
|
210
|
+
setBrowseTargetIdleMsV2,
|
|
211
|
+
getBrowseTargetIdleMsV2,
|
|
212
|
+
setBrowseActionStuckMsV2,
|
|
213
|
+
getBrowseActionStuckMsV2,
|
|
214
|
+
autoDegradeIdleBrowseTargetsV2,
|
|
215
|
+
autoFailStuckBrowseActionsV2,
|
|
216
|
+
getBrowserAutomationStatsV2,
|
|
217
|
+
} from "../lib/browser-automation.js";
|
|
218
|
+
|
|
219
|
+
export function registerBrowseV2Command(browse) {
|
|
220
|
+
browse.command("enums-v2").description("Show V2 enums").action(() => {
|
|
221
|
+
console.log(JSON.stringify({ BROWSE_TARGET_MATURITY_V2, BROWSE_ACTION_LIFECYCLE_V2 }, null, 2));
|
|
222
|
+
});
|
|
223
|
+
browse.command("register-target-v2").description("Register a browse target (pending)")
|
|
224
|
+
.requiredOption("--id <id>").requiredOption("--owner <owner>").option("--url <url>")
|
|
225
|
+
.action((o) => { console.log(JSON.stringify(registerBrowseTargetV2(o), null, 2)); });
|
|
226
|
+
browse.command("activate-target-v2 <id>").description("Activate target").action((id) => { console.log(JSON.stringify(activateBrowseTargetV2(id), null, 2)); });
|
|
227
|
+
browse.command("degrade-target-v2 <id>").description("Degrade target").action((id) => { console.log(JSON.stringify(degradeBrowseTargetV2(id), null, 2)); });
|
|
228
|
+
browse.command("retire-target-v2 <id>").description("Retire target (terminal)").action((id) => { console.log(JSON.stringify(retireBrowseTargetV2(id), null, 2)); });
|
|
229
|
+
browse.command("touch-target-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchBrowseTargetV2(id), null, 2)); });
|
|
230
|
+
browse.command("get-target-v2 <id>").description("Get a target").action((id) => { console.log(JSON.stringify(getBrowseTargetV2(id), null, 2)); });
|
|
231
|
+
browse.command("list-targets-v2").description("List targets").action(() => { console.log(JSON.stringify(listBrowseTargetsV2(), null, 2)); });
|
|
232
|
+
browse.command("create-action-v2").description("Create a browse action (queued)")
|
|
233
|
+
.requiredOption("--id <id>").requiredOption("--target-id <targetId>").option("--kind <kind>", "fetch/scrape/screenshot", "fetch")
|
|
234
|
+
.action((o) => { console.log(JSON.stringify(createBrowseActionV2({ id: o.id, targetId: o.targetId, kind: o.kind }), null, 2)); });
|
|
235
|
+
browse.command("start-action-v2 <id>").description("Start action").action((id) => { console.log(JSON.stringify(startBrowseActionV2(id), null, 2)); });
|
|
236
|
+
browse.command("complete-action-v2 <id>").description("Complete action").action((id) => { console.log(JSON.stringify(completeBrowseActionV2(id), null, 2)); });
|
|
237
|
+
browse.command("fail-action-v2 <id>").description("Fail action").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failBrowseActionV2(id, o.reason), null, 2)); });
|
|
238
|
+
browse.command("cancel-action-v2 <id>").description("Cancel action").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelBrowseActionV2(id, o.reason), null, 2)); });
|
|
239
|
+
browse.command("get-action-v2 <id>").description("Get action").action((id) => { console.log(JSON.stringify(getBrowseActionV2(id), null, 2)); });
|
|
240
|
+
browse.command("list-actions-v2").description("List actions").action(() => { console.log(JSON.stringify(listBrowseActionsV2(), null, 2)); });
|
|
241
|
+
browse.command("set-max-active-targets-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveBrowseTargetsPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveBrowseTargetsPerOwner: getMaxActiveBrowseTargetsPerOwnerV2() }, null, 2)); });
|
|
242
|
+
browse.command("set-max-pending-actions-v2 <n>").description("Set per-target pending cap").action((n) => { setMaxPendingBrowseActionsPerTargetV2(Number(n)); console.log(JSON.stringify({ maxPendingBrowseActionsPerTarget: getMaxPendingBrowseActionsPerTargetV2() }, null, 2)); });
|
|
243
|
+
browse.command("set-target-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setBrowseTargetIdleMsV2(Number(n)); console.log(JSON.stringify({ browseTargetIdleMs: getBrowseTargetIdleMsV2() }, null, 2)); });
|
|
244
|
+
browse.command("set-action-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setBrowseActionStuckMsV2(Number(n)); console.log(JSON.stringify({ browseActionStuckMs: getBrowseActionStuckMsV2() }, null, 2)); });
|
|
245
|
+
browse.command("auto-degrade-idle-targets-v2").description("Auto-degrade idle targets").action(() => { console.log(JSON.stringify(autoDegradeIdleBrowseTargetsV2(), null, 2)); });
|
|
246
|
+
browse.command("auto-fail-stuck-actions-v2").description("Auto-fail stuck actions").action(() => { console.log(JSON.stringify(autoFailStuckBrowseActionsV2(), null, 2)); });
|
|
247
|
+
browse.command("stats-v2").description("V2 aggregate stats").action(() => { console.log(JSON.stringify(getBrowserAutomationStatsV2(), null, 2)); });
|
|
184
248
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cowork Cron V2 governance commands — `cc ccron ...`
|
|
3
|
+
* 在内存中治理 CCRON profile (pending/active/paused/archived) + tick 生命周期。
|
|
4
|
+
*/
|
|
5
|
+
import {
|
|
6
|
+
CCRON_PROFILE_MATURITY_V2,
|
|
7
|
+
CCRON_TICK_LIFECYCLE_V2,
|
|
8
|
+
registerCcronProfileV2,
|
|
9
|
+
activateCcronProfileV2,
|
|
10
|
+
pauseCcronProfileV2,
|
|
11
|
+
archiveCcronProfileV2,
|
|
12
|
+
touchCcronProfileV2,
|
|
13
|
+
getCcronProfileV2,
|
|
14
|
+
listCcronProfilesV2,
|
|
15
|
+
createCcronTickV2,
|
|
16
|
+
runningCcronTickV2,
|
|
17
|
+
completeCcronTickV2,
|
|
18
|
+
failCcronTickV2,
|
|
19
|
+
cancelCcronTickV2,
|
|
20
|
+
getCcronTickV2,
|
|
21
|
+
listCcronTicksV2,
|
|
22
|
+
setMaxActiveCcronProfilesPerOwnerV2,
|
|
23
|
+
getMaxActiveCcronProfilesPerOwnerV2,
|
|
24
|
+
setMaxPendingCcronTicksPerProfileV2,
|
|
25
|
+
getMaxPendingCcronTicksPerProfileV2,
|
|
26
|
+
setCcronProfileIdleMsV2,
|
|
27
|
+
getCcronProfileIdleMsV2,
|
|
28
|
+
setCcronTickStuckMsV2,
|
|
29
|
+
getCcronTickStuckMsV2,
|
|
30
|
+
autoPauseIdleCcronProfilesV2,
|
|
31
|
+
autoFailStuckCcronTicksV2,
|
|
32
|
+
getCoworkCronGovStatsV2,
|
|
33
|
+
} from "../lib/cowork-cron.js";
|
|
34
|
+
|
|
35
|
+
export function registerCcronCommand(program) {
|
|
36
|
+
const c = program
|
|
37
|
+
.command("ccron")
|
|
38
|
+
.description("Cowork Cron V2 governance (in-memory, CLI v0.143.0)");
|
|
39
|
+
|
|
40
|
+
c.command("enums-v2").action(() => console.log(JSON.stringify({ CCRON_PROFILE_MATURITY_V2, CCRON_TICK_LIFECYCLE_V2 }, null, 2)));
|
|
41
|
+
c.command("register-profile-v2")
|
|
42
|
+
.requiredOption("--id <id>")
|
|
43
|
+
.requiredOption("--owner <owner>")
|
|
44
|
+
.option("--expr <expr>", "cron expression", "0 0 * * *")
|
|
45
|
+
.action((o) => console.log(JSON.stringify(registerCcronProfileV2(o), null, 2)));
|
|
46
|
+
c.command("activate-profile-v2 <id>").action((id) => console.log(JSON.stringify(activateCcronProfileV2(id), null, 2)));
|
|
47
|
+
c.command("pause-profile-v2 <id>").action((id) => console.log(JSON.stringify(pauseCcronProfileV2(id), null, 2)));
|
|
48
|
+
c.command("archive-profile-v2 <id>").action((id) => console.log(JSON.stringify(archiveCcronProfileV2(id), null, 2)));
|
|
49
|
+
c.command("touch-profile-v2 <id>").action((id) => console.log(JSON.stringify(touchCcronProfileV2(id), null, 2)));
|
|
50
|
+
c.command("get-profile-v2 <id>").action((id) => console.log(JSON.stringify(getCcronProfileV2(id), null, 2)));
|
|
51
|
+
c.command("list-profiles-v2").action(() => console.log(JSON.stringify(listCcronProfilesV2(), null, 2)));
|
|
52
|
+
|
|
53
|
+
c.command("create-tick-v2")
|
|
54
|
+
.requiredOption("--id <id>")
|
|
55
|
+
.requiredOption("--profile-id <profileId>")
|
|
56
|
+
.option("--tick-at <ts>", "tick timestamp", "")
|
|
57
|
+
.action((o) => console.log(JSON.stringify(createCcronTickV2({ id: o.id, profileId: o.profileId, tickAt: o.tickAt }), null, 2)));
|
|
58
|
+
c.command("running-tick-v2 <id>").action((id) => console.log(JSON.stringify(runningCcronTickV2(id), null, 2)));
|
|
59
|
+
c.command("complete-tick-v2 <id>").action((id) => console.log(JSON.stringify(completeCcronTickV2(id), null, 2)));
|
|
60
|
+
c.command("fail-tick-v2 <id>").option("--reason <r>").action((id, o) => console.log(JSON.stringify(failCcronTickV2(id, o.reason), null, 2)));
|
|
61
|
+
c.command("cancel-tick-v2 <id>").option("--reason <r>").action((id, o) => console.log(JSON.stringify(cancelCcronTickV2(id, o.reason), null, 2)));
|
|
62
|
+
c.command("get-tick-v2 <id>").action((id) => console.log(JSON.stringify(getCcronTickV2(id), null, 2)));
|
|
63
|
+
c.command("list-ticks-v2").action(() => console.log(JSON.stringify(listCcronTicksV2(), null, 2)));
|
|
64
|
+
|
|
65
|
+
c.command("config-v2").action(() => console.log(JSON.stringify({
|
|
66
|
+
maxActiveCcronProfilesPerOwner: getMaxActiveCcronProfilesPerOwnerV2(),
|
|
67
|
+
maxPendingCcronTicksPerProfile: getMaxPendingCcronTicksPerProfileV2(),
|
|
68
|
+
ccronProfileIdleMs: getCcronProfileIdleMsV2(),
|
|
69
|
+
ccronTickStuckMs: getCcronTickStuckMsV2(),
|
|
70
|
+
}, null, 2)));
|
|
71
|
+
c.command("set-max-active-profiles-v2 <n>").action((n) => { setMaxActiveCcronProfilesPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveCcronProfilesPerOwner: getMaxActiveCcronProfilesPerOwnerV2() }, null, 2)); });
|
|
72
|
+
c.command("set-max-pending-ticks-v2 <n>").action((n) => { setMaxPendingCcronTicksPerProfileV2(Number(n)); console.log(JSON.stringify({ maxPendingCcronTicksPerProfile: getMaxPendingCcronTicksPerProfileV2() }, null, 2)); });
|
|
73
|
+
c.command("set-profile-idle-ms-v2 <ms>").action((ms) => { setCcronProfileIdleMsV2(Number(ms)); console.log(JSON.stringify({ ccronProfileIdleMs: getCcronProfileIdleMsV2() }, null, 2)); });
|
|
74
|
+
c.command("set-tick-stuck-ms-v2 <ms>").action((ms) => { setCcronTickStuckMsV2(Number(ms)); console.log(JSON.stringify({ ccronTickStuckMs: getCcronTickStuckMsV2() }, null, 2)); });
|
|
75
|
+
c.command("auto-pause-idle-v2").action(() => console.log(JSON.stringify(autoPauseIdleCcronProfilesV2(), null, 2)));
|
|
76
|
+
c.command("auto-fail-stuck-v2").action(() => console.log(JSON.stringify(autoFailStuckCcronTicksV2(), null, 2)));
|
|
77
|
+
c.command("gov-stats-v2").action(() => console.log(JSON.stringify(getCoworkCronGovStatsV2(), null, 2)));
|
|
78
|
+
}
|