harnery 0.14.0 → 0.16.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/README.md +1 -0
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +2 -0
- package/dist/commands/supervisor.d.ts +4 -0
- package/dist/commands/supervisor.d.ts.map +1 -0
- package/dist/commands/supervisor.js +446 -0
- package/dist/core/supervisor/index.d.ts +4 -0
- package/dist/core/supervisor/index.d.ts.map +1 -0
- package/dist/core/supervisor/index.js +3 -0
- package/dist/core/supervisor/read.d.ts +4 -0
- package/dist/core/supervisor/read.d.ts.map +1 -0
- package/dist/core/supervisor/read.js +2 -0
- package/dist/core/supervisor/runner.d.ts +34 -0
- package/dist/core/supervisor/runner.d.ts.map +1 -0
- package/dist/core/supervisor/runner.js +198 -0
- package/dist/core/supervisor/service-read.d.ts +6 -0
- package/dist/core/supervisor/service-read.d.ts.map +1 -0
- package/dist/core/supervisor/service-read.js +127 -0
- package/dist/core/supervisor/service.d.ts +114 -0
- package/dist/core/supervisor/service.d.ts.map +1 -0
- package/dist/core/supervisor/service.js +699 -0
- package/dist/core/supervisor/state.d.ts +69 -0
- package/dist/core/supervisor/state.d.ts.map +1 -0
- package/dist/core/supervisor/state.js +413 -0
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +21 -8
- package/dist/core/workflow/index.d.ts +1 -1
- package/dist/core/workflow/index.d.ts.map +1 -1
- package/dist/core/workflow/proof.d.ts.map +1 -1
- package/dist/core/workflow/proof.js +1 -0
- package/dist/core/workflow/run-state.d.ts +2 -0
- package/dist/core/workflow/run-state.d.ts.map +1 -1
- package/dist/core/workflow/run-state.js +12 -0
- package/dist/core/workflow/specialists.d.ts +7 -0
- package/dist/core/workflow/specialists.d.ts.map +1 -0
- package/dist/core/workflow/specialists.js +78 -0
- package/dist/core/workflow/types.d.ts +17 -0
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/lib/tunnel/gate.d.ts.map +1 -1
- package/dist/lib/tunnel/gate.js +6 -1
- package/package.json +11 -1
- package/src/commander.ts +2 -0
- package/src/commands/supervisor.ts +575 -0
- package/src/core/supervisor/index.ts +51 -0
- package/src/core/supervisor/read.ts +29 -0
- package/src/core/supervisor/runner.ts +278 -0
- package/src/core/supervisor/service-read.ts +144 -0
- package/src/core/supervisor/service.ts +920 -0
- package/src/core/supervisor/state.ts +552 -0
- package/src/core/workflow/engine.ts +21 -8
- package/src/core/workflow/index.ts +1 -0
- package/src/core/workflow/proof.ts +1 -0
- package/src/core/workflow/run-state.ts +17 -0
- package/src/core/workflow/specialists.ts +97 -0
- package/src/core/workflow/types.ts +18 -0
- package/src/lib/tunnel/gate.ts +7 -1
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
- **Cross-machine presence:** sessions on every machine that shares a repo see each other, labeled by machine. Zero-config over the repo's own git remote (presence refs), with an optional live-socket upgrade via an end-to-end-encrypted relay — the public `relay.harnery.com`, or self-host with `harn relay serve` / the bundled Cloudflare Worker (`relay/worker/`). The relay sees only ciphertext in opaquely-named rooms.
|
|
24
24
|
- **Coordination-aware workflows:** `harn workflow run <script>` executes bounded, schema-gated multi-subagent workflow scripts — plain JS stages fanning out to headless harness-CLI subagents that are born coordination-registered (heartbeats, events, claim guards), with deterministic code deciding the routing between stages. An optional host-owned policy gates dispatch and declared external mutations with `ALLOW`, `ASK`, and `DENY`; CLI `ASK` requests park durably for an explicit approve/deny and same-run resume, while library callers remain fail-closed by default.
|
|
25
25
|
- **Durable work above attempts:** `harn work` preserves an objective across bounded workflow attempts, dependencies, approval parks, failures, and review. Its one-shot reconciler derives state from append-only local evidence and reports the next explicit action without silently spawning, retrying, or accepting work.
|
|
26
|
+
- **Bounded goal supervision:** `harn supervisor` freezes a specialist team and safety limits around a root durable-work graph, then runs scheduling cycles until success, human attention, no progress, or budget exhaustion. Use explicit foreground ticks or enroll goals in the optional heartbeat-backed background service; specialist roles survive as configuration while every child remains a bounded process.
|
|
26
27
|
- **Standalone web UI:** `harn web up` boots a local Next.js dashboard for the coord layer, councils, per-project state, and a local coding-agent status view (Claude Code / Codex / Cursor usage, backed by `harn devtools`). Ships with the git clone, not the npm package (see [Install](#install)).
|
|
27
28
|
- **Backup + sync:** `harn backup` snapshots `.harnery/` via [restic](https://restic.net/); `harn sync` keeps a curated subset live across machines via [rclone](https://rclone.org/) (Google Drive or any rclone remote).
|
|
28
29
|
|
package/dist/commander.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commander.d.ts","sourceRoot":"","sources":["../src/commander.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"commander.d.ts","sourceRoot":"","sources":["../src/commander.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwCpC,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAEhC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,8CAA8C;AAC9C,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEnD,MAAM,WAAW,qBAAqB;IACpC,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvD;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,KAAK,MAAM,GAAG,SAAS,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACvE;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CACjE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,IAAI,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACxC,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;IAC5C,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3D,KAAK,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,KAAK,GAAG,OAAO,GAAG,IAAI,CAAC;IACrF,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACpE,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,EAAE,WAkCzB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAoD3E"}
|
package/dist/commander.js
CHANGED
|
@@ -47,6 +47,7 @@ import { registerReadCommand } from "./commands/read.js";
|
|
|
47
47
|
import { registerRelayCommand } from "./commands/relay.js";
|
|
48
48
|
import { registerScratchCommand } from "./commands/scratch.js";
|
|
49
49
|
import { registerSessionCommand } from "./commands/session.js";
|
|
50
|
+
import { registerSupervisorCommand } from "./commands/supervisor.js";
|
|
50
51
|
import { registerSyncCommand } from "./commands/sync.js";
|
|
51
52
|
import { registerSectionCommand, registerTocCommand } from "./commands/toc.js";
|
|
52
53
|
import { registerTokensCommand } from "./commands/tokens.js";
|
|
@@ -134,6 +135,7 @@ export function createHarneryProgram(opts = {}) {
|
|
|
134
135
|
registerSyncCommand(program, emit);
|
|
135
136
|
registerWorkflowCommand(program, emit);
|
|
136
137
|
registerWorkCommand(program, emit);
|
|
138
|
+
registerSupervisorCommand(program, emit);
|
|
137
139
|
if (include("web"))
|
|
138
140
|
registerWebCommand(program, emit);
|
|
139
141
|
return program;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../src/commands/supervisor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA4DnD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CA2FnF"}
|
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { workflowSubscriptionOnly } from "../core/config.js";
|
|
4
|
+
import { createBuiltinHarnessRegistry } from "../core/harnesses/index.js";
|
|
5
|
+
import { findCoordRoot } from "../core/hooks/resolve/coord-root.js";
|
|
6
|
+
import { loadPolicyFile } from "../core/policy/index.js";
|
|
7
|
+
import { configureSupervisorService, createSupervisor, listSupervisors, readSupervisor, readSupervisorServiceConfig, readSupervisorServiceStatus, requestSupervisorServiceStop, runSupervisor, runSupervisorServiceDaemon, spawnSupervisorService, supervisorServiceLogPath, } from "../core/supervisor/index.js";
|
|
8
|
+
export function registerSupervisorCommand(program, emit) {
|
|
9
|
+
const registry = createBuiltinHarnessRegistry();
|
|
10
|
+
const supervisor = program
|
|
11
|
+
.command("supervisor")
|
|
12
|
+
.description("Run a bounded specialist team over a durable-work dependency graph.");
|
|
13
|
+
supervisor
|
|
14
|
+
.command("create <root-work-id>")
|
|
15
|
+
.description("Freeze a goal, specialist team, automation policy, and execution limits.")
|
|
16
|
+
.requiredOption("--team <file>", "JSON object mapping specialist ids to profiles")
|
|
17
|
+
.option("--id <goal-id>", "Stable goal id (generated by default)")
|
|
18
|
+
.option("--title <text>", "Goal title (defaults to root work title)")
|
|
19
|
+
.option("--max-cycles <n>", "Foreground cycle ceiling (default 50)")
|
|
20
|
+
.option("--max-runtime-ms <n>", "Foreground wall-time ceiling (default 14400000)")
|
|
21
|
+
.option("--max-parallel-work <n>", "Concurrent work-item ceiling (default 1)")
|
|
22
|
+
.option("--max-total-attempts <n>", "Graph-wide attempt ceiling (default 100)")
|
|
23
|
+
.option("--max-agents-per-work <n>", "Child-agent ceiling per work item (default 20)")
|
|
24
|
+
.option("--agent-concurrency <n>", "Child concurrency per work item (default 4)")
|
|
25
|
+
.option("--accept-passing-proof", "Allow the supervisor to explicitly accept passing proof")
|
|
26
|
+
.option("--no-resume-approved", "Stop after an approval instead of resuming its parked run")
|
|
27
|
+
.option("--retry-blocked", "Allow bounded retry of blocked work")
|
|
28
|
+
.option("--json", "Emit the complete supervisor record as JSON")
|
|
29
|
+
.action((rootWorkId, opts) => {
|
|
30
|
+
withSupervisorRoot(emit, (coordRoot) => {
|
|
31
|
+
const specialists = readTeamFile(opts.team);
|
|
32
|
+
for (const [id, profile] of Object.entries(specialists)) {
|
|
33
|
+
if (profile.harness && !registry.get(profile.harness)) {
|
|
34
|
+
throw new Error(`specialist ${id} names unknown harness ${JSON.stringify(profile.harness)}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
emitSupervisor(createSupervisor({
|
|
38
|
+
coordRoot,
|
|
39
|
+
rootWorkId,
|
|
40
|
+
specialists,
|
|
41
|
+
id: opts.id,
|
|
42
|
+
title: opts.title,
|
|
43
|
+
limits: {
|
|
44
|
+
max_cycles: integer(opts.maxCycles),
|
|
45
|
+
max_runtime_ms: integer(opts.maxRuntimeMs),
|
|
46
|
+
max_parallel_work: integer(opts.maxParallelWork),
|
|
47
|
+
max_total_attempts: integer(opts.maxTotalAttempts),
|
|
48
|
+
max_agents_per_work: integer(opts.maxAgentsPerWork),
|
|
49
|
+
agent_concurrency: integer(opts.agentConcurrency),
|
|
50
|
+
},
|
|
51
|
+
automation: {
|
|
52
|
+
accept_passing_proof: opts.acceptPassingProof,
|
|
53
|
+
resume_approved: opts.resumeApproved,
|
|
54
|
+
retry_blocked: opts.retryBlocked,
|
|
55
|
+
},
|
|
56
|
+
}), opts.json, emit, true);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
supervisor
|
|
60
|
+
.command("list")
|
|
61
|
+
.description("List durable goals and their derived next action.")
|
|
62
|
+
.option("--json", "Emit complete supervisor records as JSON")
|
|
63
|
+
.action((opts) => {
|
|
64
|
+
withSupervisorRoot(emit, (coordRoot) => {
|
|
65
|
+
const records = listSupervisors(coordRoot);
|
|
66
|
+
if (opts.json) {
|
|
67
|
+
emit.config({ format: "json" });
|
|
68
|
+
emit.data(records);
|
|
69
|
+
}
|
|
70
|
+
else if (records.length === 0) {
|
|
71
|
+
emit.text("no durable supervisors\n");
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
emit.text(`${records.map(renderSupervisorRow).join("\n")}\n`);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
supervisor
|
|
79
|
+
.command("show <goal-id>")
|
|
80
|
+
.description("Show one goal, frozen team, bounds, graph state, and next action.")
|
|
81
|
+
.option("--json", "Emit the complete supervisor record as JSON")
|
|
82
|
+
.action((goalId, opts) => {
|
|
83
|
+
withSupervisorRoot(emit, (coordRoot) => {
|
|
84
|
+
emitSupervisor(readSupervisor(coordRoot, goalId), opts.json, emit, true);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
registerServiceCommand(supervisor, registry, emit);
|
|
88
|
+
registerRunCommand(supervisor, "tick", registry, emit);
|
|
89
|
+
registerRunCommand(supervisor, "run", registry, emit);
|
|
90
|
+
}
|
|
91
|
+
function registerServiceCommand(supervisor, registry, emit) {
|
|
92
|
+
const service = supervisor
|
|
93
|
+
.command("service")
|
|
94
|
+
.description("Run explicitly enrolled durable goals in a restartable background service.");
|
|
95
|
+
addServiceOptions(service
|
|
96
|
+
.command("start [goal-ids...]")
|
|
97
|
+
.description("Configure and start the detached per-repository supervisor service."))
|
|
98
|
+
.option("--json", "Emit complete service status as JSON")
|
|
99
|
+
.action(async (goalIds, opts) => {
|
|
100
|
+
await withSupervisorRootAsync(emit, async (coordRoot) => {
|
|
101
|
+
prepareServiceConfig(coordRoot, goalIds, opts, registry);
|
|
102
|
+
const status = await spawnSupervisorService(coordRoot);
|
|
103
|
+
emitServiceStatus(status, opts.json, emit);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
addServiceOptions(service
|
|
107
|
+
.command("run [goal-ids...]")
|
|
108
|
+
.description("Run the persistent service loop in the foreground for a process manager."))
|
|
109
|
+
.option("--json", "Emit terminal service status as JSON")
|
|
110
|
+
.action(async (goalIds, opts) => {
|
|
111
|
+
await withSupervisorRootAsync(emit, async (coordRoot) => {
|
|
112
|
+
const config = prepareServiceConfig(coordRoot, goalIds, opts, registry);
|
|
113
|
+
const status = await runSupervisorServiceDaemon({
|
|
114
|
+
coordRoot,
|
|
115
|
+
engine: serviceEngine(config, registry),
|
|
116
|
+
onLog: opts.json ? undefined : (line) => emit.text(`${line}\n`),
|
|
117
|
+
});
|
|
118
|
+
if (opts.json) {
|
|
119
|
+
emit.config({ format: "json" });
|
|
120
|
+
emit.data(status);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
service
|
|
125
|
+
.command("status")
|
|
126
|
+
.description("Show service liveness, heartbeat, enrolled goals, and durable wake state.")
|
|
127
|
+
.option("--json", "Emit complete service status as JSON")
|
|
128
|
+
.action((opts) => {
|
|
129
|
+
withSupervisorRoot(emit, (coordRoot) => {
|
|
130
|
+
emitServiceStatus(readSupervisorServiceStatus(coordRoot), opts.json, emit);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
service
|
|
134
|
+
.command("stop")
|
|
135
|
+
.description("Request a graceful stop; an active goal tick is allowed to finish safely.")
|
|
136
|
+
.option("--json", "Emit complete service status as JSON")
|
|
137
|
+
.action(async (opts) => {
|
|
138
|
+
await withSupervisorRootAsync(emit, async (coordRoot) => {
|
|
139
|
+
let status = requestSupervisorServiceStop(coordRoot);
|
|
140
|
+
const deadline = Date.now() + 5_000;
|
|
141
|
+
while (status.running && Date.now() < deadline) {
|
|
142
|
+
await delay(50);
|
|
143
|
+
status = readSupervisorServiceStatus(coordRoot);
|
|
144
|
+
}
|
|
145
|
+
emitServiceStatus(status, opts.json, emit);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
service
|
|
149
|
+
.command("logs")
|
|
150
|
+
.description("Show the tail of the private background-service log.")
|
|
151
|
+
.option("--lines <n>", "Number of lines to show (default 50)", "50")
|
|
152
|
+
.action((opts) => {
|
|
153
|
+
withSupervisorRoot(emit, (coordRoot) => {
|
|
154
|
+
const lines = integer(opts.lines) ?? 50;
|
|
155
|
+
if (lines > 10_000)
|
|
156
|
+
throw new Error("service log lines must not exceed 10000");
|
|
157
|
+
const path = supervisorServiceLogPath(coordRoot);
|
|
158
|
+
if (!existsSync(path)) {
|
|
159
|
+
emit.text("no supervisor service log\n");
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const selected = readFileSync(path, "utf8")
|
|
163
|
+
.split("\n")
|
|
164
|
+
.slice(-(lines + 1))
|
|
165
|
+
.join("\n");
|
|
166
|
+
emit.text(selected.endsWith("\n") ? selected : `${selected}\n`);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
service
|
|
170
|
+
.command("daemon", { hidden: true })
|
|
171
|
+
.description("Internal detached service entrypoint.")
|
|
172
|
+
.action(async () => {
|
|
173
|
+
await withSupervisorRootAsync(emit, async (coordRoot) => {
|
|
174
|
+
const config = readSupervisorServiceConfig(coordRoot);
|
|
175
|
+
await runSupervisorServiceDaemon({
|
|
176
|
+
coordRoot,
|
|
177
|
+
engine: serviceEngine(config, registry),
|
|
178
|
+
onLog: (line) => emit.text(`${line}\n`),
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function addServiceOptions(command) {
|
|
184
|
+
return command
|
|
185
|
+
.option("--wake-interval-ms <n>", "State-change poll interval (default 5000)")
|
|
186
|
+
.option("--heartbeat-interval-ms <n>", "Heartbeat interval (default 2000)")
|
|
187
|
+
.option("--error-backoff-base-ms <n>", "Initial service-error backoff (default 2000)")
|
|
188
|
+
.option("--error-backoff-max-ms <n>", "Maximum service-error backoff (default 300000)")
|
|
189
|
+
.option("--harness <name>", "Fallback harness for agent calls without a specialist")
|
|
190
|
+
.option("--cwd <dir>", "Working directory for child agents")
|
|
191
|
+
.option("--subscription-only", "Require stored harness-login billing")
|
|
192
|
+
.option("--allow-api-billing", "Permit API-key override billing")
|
|
193
|
+
.option("--policy <file>", "Host policy JSON/JSONC")
|
|
194
|
+
.option("--isolation <mode>", "shared | worktree | sandbox | remote")
|
|
195
|
+
.option("--approval-to <address>", "Address durable ASK requests");
|
|
196
|
+
}
|
|
197
|
+
function prepareServiceConfig(coordRoot, goalIds, opts, registry) {
|
|
198
|
+
if (goalIds.length === 0) {
|
|
199
|
+
if (hasServiceConfigOverrides(opts)) {
|
|
200
|
+
throw new Error("goal ids are required when changing supervisor service options");
|
|
201
|
+
}
|
|
202
|
+
return readSupervisorServiceConfig(coordRoot);
|
|
203
|
+
}
|
|
204
|
+
if (opts.harness && !registry.get(opts.harness)) {
|
|
205
|
+
throw new Error(`unknown harness ${JSON.stringify(opts.harness)}`);
|
|
206
|
+
}
|
|
207
|
+
const policy = opts.policy ? loadPolicyFile(opts.policy) : undefined;
|
|
208
|
+
return configureSupervisorService({
|
|
209
|
+
coordRoot,
|
|
210
|
+
goalIds,
|
|
211
|
+
wakeIntervalMs: integer(opts.wakeIntervalMs),
|
|
212
|
+
heartbeatIntervalMs: integer(opts.heartbeatIntervalMs),
|
|
213
|
+
errorBackoffBaseMs: integer(opts.errorBackoffBaseMs),
|
|
214
|
+
errorBackoffMaxMs: integer(opts.errorBackoffMaxMs),
|
|
215
|
+
engine: {
|
|
216
|
+
default_harness: opts.harness,
|
|
217
|
+
cwd: opts.cwd,
|
|
218
|
+
subscription_only: opts.subscriptionOnly === true ? true : workflowSubscriptionOnly(coordRoot),
|
|
219
|
+
allow_api_billing: opts.allowApiBilling,
|
|
220
|
+
policy,
|
|
221
|
+
isolation: opts.isolation,
|
|
222
|
+
approval_addressee: opts.approvalTo,
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function hasServiceConfigOverrides(opts) {
|
|
227
|
+
return Boolean(opts.wakeIntervalMs ||
|
|
228
|
+
opts.heartbeatIntervalMs ||
|
|
229
|
+
opts.errorBackoffBaseMs ||
|
|
230
|
+
opts.errorBackoffMaxMs ||
|
|
231
|
+
opts.harness ||
|
|
232
|
+
opts.cwd ||
|
|
233
|
+
opts.subscriptionOnly ||
|
|
234
|
+
opts.allowApiBilling ||
|
|
235
|
+
opts.policy ||
|
|
236
|
+
opts.isolation ||
|
|
237
|
+
opts.approvalTo);
|
|
238
|
+
}
|
|
239
|
+
function serviceEngine(config, registry) {
|
|
240
|
+
return {
|
|
241
|
+
spawners: registry.spawners(),
|
|
242
|
+
defaultHarness: config.engine.default_harness,
|
|
243
|
+
cwd: config.engine.cwd,
|
|
244
|
+
subscriptionOnly: config.engine.subscription_only,
|
|
245
|
+
allowApiBilling: config.engine.allow_api_billing,
|
|
246
|
+
harnessEvidence: Object.fromEntries(registry
|
|
247
|
+
.list()
|
|
248
|
+
.map((adapter) => [
|
|
249
|
+
adapter.profile.id,
|
|
250
|
+
{ toolEvidence: adapter.profile.capabilities.toolEvidence },
|
|
251
|
+
])),
|
|
252
|
+
policy: config.engine.policy,
|
|
253
|
+
approvalMode: "park",
|
|
254
|
+
approvalAddressee: config.engine.approval_addressee,
|
|
255
|
+
isolation: config.engine.isolation,
|
|
256
|
+
networkAccess: "enabled",
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function emitServiceStatus(status, json, emit) {
|
|
260
|
+
if (json) {
|
|
261
|
+
emit.config({ format: "json" });
|
|
262
|
+
emit.data(status);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
if (!status.config && !status.record) {
|
|
266
|
+
emit.text("supervisor service: unconfigured\n");
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const state = status.running
|
|
270
|
+
? (status.record?.state ?? "running")
|
|
271
|
+
: status.stale
|
|
272
|
+
? "stale"
|
|
273
|
+
: "stopped";
|
|
274
|
+
const lines = [
|
|
275
|
+
`supervisor service: ${state}`,
|
|
276
|
+
`goals: ${status.config?.goal_ids.join(", ") || "none"}`,
|
|
277
|
+
];
|
|
278
|
+
if (status.record) {
|
|
279
|
+
lines.push(`pid: ${status.record.pid} on ${status.record.host}`);
|
|
280
|
+
lines.push(`heartbeat: ${status.record.heartbeat_at}`);
|
|
281
|
+
lines.push(`sweeps: ${status.record.sweep_count}`);
|
|
282
|
+
if (status.record.active_goal_id)
|
|
283
|
+
lines.push(`active: ${status.record.active_goal_id}`);
|
|
284
|
+
if (status.record.next_wake_at)
|
|
285
|
+
lines.push(`next wake: ${status.record.next_wake_at}`);
|
|
286
|
+
if (status.record.last_error)
|
|
287
|
+
lines.push(`error: ${status.record.last_error}`);
|
|
288
|
+
}
|
|
289
|
+
const backingOff = Object.entries(status.runtime?.goals ?? {}).filter(([, runtime]) => runtime.state === "backoff");
|
|
290
|
+
if (backingOff.length) {
|
|
291
|
+
lines.push(`backoff: ${backingOff.map(([goalId]) => goalId).join(", ")}`);
|
|
292
|
+
}
|
|
293
|
+
emit.text(`${lines.join("\n")}\n`);
|
|
294
|
+
}
|
|
295
|
+
function registerRunCommand(supervisor, mode, registry, emit) {
|
|
296
|
+
supervisor
|
|
297
|
+
.command(`${mode} <goal-id>`)
|
|
298
|
+
.description(mode === "tick"
|
|
299
|
+
? "Perform at most one bounded scheduling cycle."
|
|
300
|
+
: "Run bounded cycles until success, attention, no progress, or budget exhaustion.")
|
|
301
|
+
.option("--harness <name>", "Fallback harness for agent calls without a specialist")
|
|
302
|
+
.option("--cwd <dir>", "Working directory for child agents")
|
|
303
|
+
.option("--subscription-only", "Require stored harness-login billing")
|
|
304
|
+
.option("--allow-api-billing", "Permit API-key override billing")
|
|
305
|
+
.option("--policy <file>", "Host policy JSON/JSONC")
|
|
306
|
+
.option("--isolation <mode>", "shared | worktree | sandbox | remote")
|
|
307
|
+
.option("--approval-to <address>", "Address durable ASK requests")
|
|
308
|
+
.option("--actor <name>", "Actor recorded on supervisor work decisions")
|
|
309
|
+
.option("--json", "Emit the complete run report as JSON")
|
|
310
|
+
.action(async (goalId, opts) => {
|
|
311
|
+
await withSupervisorRootAsync(emit, async (coordRoot) => {
|
|
312
|
+
if (opts.harness && !registry.get(opts.harness)) {
|
|
313
|
+
throw new Error(`unknown harness ${JSON.stringify(opts.harness)}`);
|
|
314
|
+
}
|
|
315
|
+
const report = await runSupervisor({
|
|
316
|
+
coordRoot,
|
|
317
|
+
goalId,
|
|
318
|
+
mode,
|
|
319
|
+
actor: opts.actor,
|
|
320
|
+
onLog: opts.json ? undefined : (line) => emit.text(`${line}\n`),
|
|
321
|
+
engine: {
|
|
322
|
+
spawners: registry.spawners(),
|
|
323
|
+
defaultHarness: opts.harness,
|
|
324
|
+
cwd: opts.cwd,
|
|
325
|
+
subscriptionOnly: opts.subscriptionOnly === true ? true : workflowSubscriptionOnly(coordRoot),
|
|
326
|
+
allowApiBilling: opts.allowApiBilling,
|
|
327
|
+
harnessEvidence: Object.fromEntries(registry
|
|
328
|
+
.list()
|
|
329
|
+
.map((adapter) => [
|
|
330
|
+
adapter.profile.id,
|
|
331
|
+
{ toolEvidence: adapter.profile.capabilities.toolEvidence },
|
|
332
|
+
])),
|
|
333
|
+
policy: opts.policy ? loadPolicyFile(opts.policy) : undefined,
|
|
334
|
+
approvalMode: "park",
|
|
335
|
+
approvalAddressee: opts.approvalTo,
|
|
336
|
+
isolation: opts.isolation,
|
|
337
|
+
networkAccess: "enabled",
|
|
338
|
+
},
|
|
339
|
+
});
|
|
340
|
+
emitSupervisorReport(report, opts.json, emit);
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
function readTeamFile(path) {
|
|
345
|
+
const absolute = resolve(path);
|
|
346
|
+
let value;
|
|
347
|
+
try {
|
|
348
|
+
value = JSON.parse(readFileSync(absolute, "utf8"));
|
|
349
|
+
}
|
|
350
|
+
catch (error) {
|
|
351
|
+
throw new Error(`cannot read supervisor team at ${absolute}: ${error.message}`);
|
|
352
|
+
}
|
|
353
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
354
|
+
throw new Error("supervisor team must be a JSON object keyed by specialist id");
|
|
355
|
+
}
|
|
356
|
+
return value;
|
|
357
|
+
}
|
|
358
|
+
function emitSupervisor(record, json, emit, detail = false) {
|
|
359
|
+
if (json) {
|
|
360
|
+
emit.config({ format: "json" });
|
|
361
|
+
emit.data(record);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (!detail) {
|
|
365
|
+
emit.text(`${renderSupervisorRow(record)}\n`);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const projection = record.projection;
|
|
369
|
+
const lines = [
|
|
370
|
+
`${record.intent.id}: ${record.intent.title}`,
|
|
371
|
+
`state: ${projection.state}`,
|
|
372
|
+
`root: ${record.intent.root_work_id}`,
|
|
373
|
+
`reason: ${projection.reason}`,
|
|
374
|
+
`next: ${projection.next_action}`,
|
|
375
|
+
`work: ${projection.work_ids.length}`,
|
|
376
|
+
`attempts: ${projection.attempts_used}/${record.intent.limits.max_total_attempts}`,
|
|
377
|
+
`specialists: ${projection.specialists.join(", ") || "none"}`,
|
|
378
|
+
`automation: accept=${record.intent.automation.accept_passing_proof}, ` +
|
|
379
|
+
`resume=${record.intent.automation.resume_approved}, retry=${record.intent.automation.retry_blocked}`,
|
|
380
|
+
];
|
|
381
|
+
if (projection.attention_work.length) {
|
|
382
|
+
lines.push(`attention: ${projection.attention_work.join(", ")}`);
|
|
383
|
+
}
|
|
384
|
+
emit.text(`${lines.join("\n")}\n`);
|
|
385
|
+
}
|
|
386
|
+
function emitSupervisorReport(report, json, emit) {
|
|
387
|
+
if (json) {
|
|
388
|
+
emit.config({ format: "json" });
|
|
389
|
+
emit.data(report);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
emit.text(`supervisor ${report.goal_id}: ${report.stop_reason}\n` +
|
|
393
|
+
`reason: ${report.reason}\n` +
|
|
394
|
+
`cycles: ${report.cycles}; dispatches: ${report.dispatches}; acceptances: ${report.acceptances}\n` +
|
|
395
|
+
`state: ${report.projection.state}; next: ${report.projection.next_action}\n`);
|
|
396
|
+
}
|
|
397
|
+
function renderSupervisorRow(record) {
|
|
398
|
+
const projection = record.projection;
|
|
399
|
+
return `${record.intent.id} ${projection.state.padEnd(20)} ${projection.attempts_used}/${record.intent.limits.max_total_attempts} ${projection.next_action.padEnd(18)} ${record.intent.title}`;
|
|
400
|
+
}
|
|
401
|
+
function integer(value) {
|
|
402
|
+
if (value === undefined)
|
|
403
|
+
return undefined;
|
|
404
|
+
if (!/^\d+$/.test(value))
|
|
405
|
+
throw new Error(`expected a positive integer, got ${JSON.stringify(value)}`);
|
|
406
|
+
return Number.parseInt(value, 10);
|
|
407
|
+
}
|
|
408
|
+
function delay(ms) {
|
|
409
|
+
return new Promise((resolveDelay) => setTimeout(resolveDelay, ms));
|
|
410
|
+
}
|
|
411
|
+
function withSupervisorRoot(emit, fn) {
|
|
412
|
+
const coordRoot = findCoordRoot();
|
|
413
|
+
if (!coordRoot) {
|
|
414
|
+
emit.error({
|
|
415
|
+
code: "no_coord_root",
|
|
416
|
+
message: "no .harnery/ coordination root found; run `init` first",
|
|
417
|
+
});
|
|
418
|
+
emit.setExitCode(1);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
try {
|
|
422
|
+
fn(coordRoot);
|
|
423
|
+
}
|
|
424
|
+
catch (error) {
|
|
425
|
+
emit.error({ code: "supervisor_failed", message: error.message });
|
|
426
|
+
emit.setExitCode(1);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
async function withSupervisorRootAsync(emit, fn) {
|
|
430
|
+
const coordRoot = findCoordRoot();
|
|
431
|
+
if (!coordRoot) {
|
|
432
|
+
emit.error({
|
|
433
|
+
code: "no_coord_root",
|
|
434
|
+
message: "no .harnery/ coordination root found; run `init` first",
|
|
435
|
+
});
|
|
436
|
+
emit.setExitCode(1);
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
try {
|
|
440
|
+
await fn(coordRoot);
|
|
441
|
+
}
|
|
442
|
+
catch (error) {
|
|
443
|
+
emit.error({ code: "supervisor_failed", message: error.message });
|
|
444
|
+
emit.setExitCode(1);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { type RunSupervisorInput, runSupervisor, type SupervisorDispatchOutcome, type SupervisorRunReport, type SupervisorStopReason, } from "./runner.js";
|
|
2
|
+
export { type ConfigureSupervisorServiceInput, configureSupervisorService, type RunSupervisorServiceDaemonInput, type RunSupervisorServiceSweepInput, readSupervisorServiceConfig, readSupervisorServiceRuntime, readSupervisorServiceStatus, requestSupervisorServiceStop, runSupervisorServiceDaemon, runSupervisorServiceSweep, SUPERVISOR_SERVICE_CONFIG_SCHEMA_VERSION, SUPERVISOR_SERVICE_RUNTIME_SCHEMA_VERSION, SUPERVISOR_SERVICE_STATUS_SCHEMA_VERSION, type SupervisorServiceConfig, type SupervisorServiceEngineConfig, type SupervisorServiceGoalRuntime, type SupervisorServiceGoalState, type SupervisorServiceProcessState, type SupervisorServiceRuntime, type SupervisorServiceStatus, type SupervisorServiceStatusRecord, type SupervisorServiceSweepOutcome, type SupervisorServiceSweepReport, spawnSupervisorService, supervisorServiceLogPath, } from "./service.js";
|
|
3
|
+
export { assertSupervisorId, type CreateSupervisorInput, collectSupervisorWork, createSupervisor, listSupervisors, newSupervisorId, readSupervisor, SUPERVISOR_INTENT_SCHEMA_VERSION, type SupervisorAutomationPolicy, type SupervisorIntent, type SupervisorLimits, type SupervisorNextAction, type SupervisorProjection, type SupervisorRecord, type SupervisorState, } from "./state.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/supervisor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,+BAA+B,EACpC,0BAA0B,EAC1B,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,EACzB,wCAAwC,EACxC,yCAAyC,EACzC,wCAAwC,EACxC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACd,gCAAgC,EAChC,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { runSupervisor, } from "./runner.js";
|
|
2
|
+
export { configureSupervisorService, readSupervisorServiceConfig, readSupervisorServiceRuntime, readSupervisorServiceStatus, requestSupervisorServiceStop, runSupervisorServiceDaemon, runSupervisorServiceSweep, SUPERVISOR_SERVICE_CONFIG_SCHEMA_VERSION, SUPERVISOR_SERVICE_RUNTIME_SCHEMA_VERSION, SUPERVISOR_SERVICE_STATUS_SCHEMA_VERSION, spawnSupervisorService, supervisorServiceLogPath, } from "./service.js";
|
|
3
|
+
export { assertSupervisorId, collectSupervisorWork, createSupervisor, listSupervisors, newSupervisorId, readSupervisor, SUPERVISOR_INTENT_SCHEMA_VERSION, } from "./state.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { SupervisorServiceConfig, SupervisorServiceGoalRuntime, SupervisorServiceGoalState, SupervisorServiceProcessState, SupervisorServiceRuntime, SupervisorServiceStatus, SupervisorServiceStatusRecord, } from "./service.js";
|
|
2
|
+
export { readSupervisorServiceConfig, readSupervisorServiceRuntime, readSupervisorServiceStatus, supervisorServiceLogPath, } from "./service-read.js";
|
|
3
|
+
export { assertSupervisorId, collectSupervisorWork, listSupervisors, readSupervisor, SUPERVISOR_INTENT_SCHEMA_VERSION, type SupervisorAutomationPolicy, type SupervisorIntent, type SupervisorLimits, type SupervisorNextAction, type SupervisorProjection, type SupervisorRecord, type SupervisorState, } from "./state.js";
|
|
4
|
+
//# sourceMappingURL=read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/core/supervisor/read.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,gCAAgC,EAChC,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { readSupervisorServiceConfig, readSupervisorServiceRuntime, readSupervisorServiceStatus, supervisorServiceLogPath, } from "./service-read.js";
|
|
2
|
+
export { assertSupervisorId, collectSupervisorWork, listSupervisors, readSupervisor, SUPERVISOR_INTENT_SCHEMA_VERSION, } from "./state.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type RunWorkItemInput } from "../work/index.js";
|
|
2
|
+
import { type SupervisorProjection } from "./state.js";
|
|
3
|
+
export type SupervisorStopReason = "succeeded" | "awaiting_attention" | "blocked" | "budget_exhausted" | "no_progress" | "tick_complete";
|
|
4
|
+
export interface SupervisorDispatchOutcome {
|
|
5
|
+
work_id: string;
|
|
6
|
+
action: "run" | "resume" | "retry";
|
|
7
|
+
status: "completed" | "parked" | "failed";
|
|
8
|
+
run_id?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SupervisorRunReport {
|
|
12
|
+
goal_id: string;
|
|
13
|
+
mode: "tick" | "run";
|
|
14
|
+
stop_reason: SupervisorStopReason;
|
|
15
|
+
reason: string;
|
|
16
|
+
started_at: string;
|
|
17
|
+
ended_at: string;
|
|
18
|
+
duration_ms: number;
|
|
19
|
+
cycles: number;
|
|
20
|
+
dispatches: number;
|
|
21
|
+
acceptances: number;
|
|
22
|
+
outcomes: SupervisorDispatchOutcome[];
|
|
23
|
+
projection: SupervisorProjection;
|
|
24
|
+
}
|
|
25
|
+
export interface RunSupervisorInput {
|
|
26
|
+
coordRoot: string;
|
|
27
|
+
goalId: string;
|
|
28
|
+
mode?: "tick" | "run";
|
|
29
|
+
actor?: string;
|
|
30
|
+
engine: Omit<RunWorkItemInput["engine"], "maxAgents" | "concurrency" | "specialists">;
|
|
31
|
+
onLog?: (line: string) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function runSupervisor(input: RunSupervisorInput): Promise<SupervisorRunReport>;
|
|
34
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/core/supervisor/runner.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EAItB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGL,KAAK,oBAAoB,EAE1B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,oBAAoB,GACpB,SAAS,GACT,kBAAkB,GAClB,aAAa,GACb,eAAe,CAAC;AAEpB,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACnC,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IACrB,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IACtC,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC;IACtF,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAQD,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAuJ3F"}
|