@autodidacticon/orchestrator 0.2.0 → 0.3.1
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 +24 -10
- package/dist/src/agent/mcp-shim.js +1 -1
- package/dist/src/agent/server.js +11 -6
- package/dist/src/agent/server.js.map +1 -1
- package/dist/src/config.js +6 -0
- package/dist/src/config.js.map +1 -1
- package/dist/src/graph/diff.js +3 -1
- package/dist/src/graph/diff.js.map +1 -1
- package/dist/src/import/mapping.js +10 -4
- package/dist/src/import/mapping.js.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/log.js +20 -0
- package/dist/src/log.js.map +1 -0
- package/dist/src/loop/orchestrator.js +5 -0
- package/dist/src/loop/orchestrator.js.map +1 -1
- package/dist/src/loop/tick.js +4 -0
- package/dist/src/loop/tick.js.map +1 -1
- package/dist/src/main.js +35 -21
- package/dist/src/main.js.map +1 -1
- package/dist/src/operator/mcp-server.js +10 -4
- package/dist/src/operator/mcp-server.js.map +1 -1
- package/dist/src/operator/routes.js +43 -4
- package/dist/src/operator/routes.js.map +1 -1
- package/dist/src/runs/childEnv.js +32 -0
- package/dist/src/runs/childEnv.js.map +1 -0
- package/dist/src/runs/lifecycle.js +42 -2
- package/dist/src/runs/lifecycle.js.map +1 -1
- package/dist/src/runs/runDir.js.map +1 -1
- package/dist/src/state/store.js.map +1 -1
- package/dist/src/verify/verifier.js +5 -3
- package/dist/src/verify/verifier.js.map +1 -1
- package/hosts/claude-code/.claude-plugin/plugin.json +1 -1
- package/hosts/claude-code/package-lock.json +4 -4
- package/hosts/claude-code/package.json +1 -1
- package/hosts/claude-code/skills/import/SKILL.md +55 -12
- package/hosts/claude-code/skills/run/SKILL.md +35 -13
- package/hosts/claude-code/skills/work/SKILL.md +16 -6
- package/hosts/claude-code/workflows/work.js +19 -8
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runDir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@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/state/store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/state/store.ts"],"names":[],"mappings":"AAyPA,4DAA4D;AAC5D,MAAM,UAAU,SAAS,CAAC,KAAY;IACpC,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,GAAG,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAY,EAAE,GAAkB;IACzD,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAY;IAClC,OAAO,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAY,EAAE,EAAU;IAC/C,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Every step after a durable progress record has a crash point.
|
|
6
6
|
*/
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
|
+
import { childEnv } from '../runs/childEnv.js';
|
|
8
9
|
import { mkdir, realpath, rm } from 'node:fs/promises';
|
|
9
10
|
import path from 'node:path';
|
|
10
11
|
import { crashPoint } from '../crash.js';
|
|
@@ -62,7 +63,7 @@ export class GitVerifierBackend {
|
|
|
62
63
|
if (checkCommand === undefined) {
|
|
63
64
|
return { kind: 'failed', reason: { kind: 'checkFailed', message: 'no check command is configured for this repository', output: '' } };
|
|
64
65
|
}
|
|
65
|
-
const check = await runCheck(checkCommand, temp, this.opts.checkTimeoutMs, this.maxOut);
|
|
66
|
+
const check = await runCheck(checkCommand, temp, this.opts.checkTimeoutMs, this.maxOut, this.opts.dataDir ?? path.dirname(this.opts.tempRoot));
|
|
66
67
|
crashPoint('verify.afterCheck');
|
|
67
68
|
if (check.timedOut) {
|
|
68
69
|
return { kind: 'failed', reason: { kind: 'checkTimeout', message: `check exceeded ${this.opts.checkTimeoutMs}ms`, output: check.output } };
|
|
@@ -134,9 +135,10 @@ export class GitVerifierBackend {
|
|
|
134
135
|
function tail(text, max) {
|
|
135
136
|
return text.length > max ? text.slice(text.length - max) : text;
|
|
136
137
|
}
|
|
137
|
-
export async function runCheck(command, cwd, timeoutMs, maxOut) {
|
|
138
|
+
export async function runCheck(command, cwd, timeoutMs, maxOut, dataDir) {
|
|
138
139
|
return new Promise((resolve) => {
|
|
139
|
-
|
|
140
|
+
// Repository code runs here: same isolation as a spawned agent. See specs/integration-pipeline "Check environment".
|
|
141
|
+
const child = spawn('/bin/sh', ['-c', command], { cwd, env: childEnv(dataDir, identity), stdio: ['ignore', 'pipe', 'pipe'], detached: true });
|
|
140
142
|
let output = '';
|
|
141
143
|
let timedOut = false;
|
|
142
144
|
const collect = (chunk) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifier.js","sourceRoot":"","sources":["../../../src/verify/verifier.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACL,cAAc,EACd,WAAW,EACX,GAAG,EACH,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,cAAc,GACf,MAAM,qBAAqB,CAAC;AAG7B,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;A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
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "Run a dependency graph of tasks with parallel coding agents: import an epic, start a run, monitor it, answer questions, review milestones.",
|
|
6
6
|
"author": { "name": "Richard" },
|
|
7
7
|
"license": "MIT",
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"": {
|
|
7
7
|
"name": "orchestrator-claude-code-plugin",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@autodidacticon/orchestrator": "0.
|
|
9
|
+
"@autodidacticon/orchestrator": "0.3.0"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"node_modules/@autodidacticon/orchestrator": {
|
|
13
|
-
"version": "0.
|
|
14
|
-
"resolved": "https://registry.npmjs.org/@autodidacticon/orchestrator/-/orchestrator-0.
|
|
15
|
-
"integrity": "sha512-
|
|
13
|
+
"version": "0.3.0",
|
|
14
|
+
"resolved": "https://registry.npmjs.org/@autodidacticon/orchestrator/-/orchestrator-0.3.0.tgz",
|
|
15
|
+
"integrity": "sha512-05GPBdVnckj+iCubUH4r6ErIxnMOlRVzCccaliN0JpzYFYMACySTIh3Rswt9ZJ2gUweZpH5nDMAFKtGJU/wFrw==",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
18
18
|
"yaml": "^2.6.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: import
|
|
3
|
-
description: Import an epic or parent issue from Linear or
|
|
3
|
+
description: Import an epic or parent issue from Linear, Jira, or GitHub Issues into the orchestrator's run graph for this repository. Use when the user wants to turn a tracker epic, parent issue, project milestone, GitHub milestone, or list of issues into an orchestrated run.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Import an epic into the run graph
|
|
@@ -11,11 +11,14 @@ session and hand over normalized records.
|
|
|
11
11
|
|
|
12
12
|
## 1. Check the prerequisites
|
|
13
13
|
|
|
14
|
-
- A Linear or Atlassian (Jira) MCP server
|
|
15
|
-
with `mcp__plugin_linear`, `mcp__linear`, `mcp__plugin_atlassian`, or
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
- A tracker connector must be available: a Linear or Atlassian (Jira) MCP server (tools whose
|
|
15
|
+
names start with `mcp__plugin_linear`, `mcp__linear`, `mcp__plugin_atlassian`, or
|
|
16
|
+
`mcp__atlassian`), a GitHub MCP server, or the `gh` CLI for GitHub Issues: run
|
|
17
|
+
`gh auth status` with Bash and treat success as the connector. If none is available, stop
|
|
18
|
+
and tell the user: "No tracker connector is available in this session; connect the Linear or
|
|
19
|
+
Atlassian plugin, a GitHub MCP server, or log in with `gh auth login`, and run the import
|
|
20
|
+
again." Do not call `import_issues`. When more than one is available, use the one the
|
|
21
|
+
user's root belongs to (a GitHub URL or `#123` means GitHub).
|
|
19
22
|
- The orchestrator daemon must be running for this repository. Call the `start` tool; it is
|
|
20
23
|
idempotent and returns the run directory, the graph path, and the resolved configuration.
|
|
21
24
|
Report the toolchain in one line: the check command and the integration branch with the
|
|
@@ -37,6 +40,30 @@ For **Jira**: fetch the root (an epic or any parent); fetch the issues whose par
|
|
|
37
40
|
(or whose epic link is the root); for every child, read the issue links of type "is blocked
|
|
38
41
|
by"; fetch each blocker outside the child set.
|
|
39
42
|
|
|
43
|
+
For **GitHub**: the root is an issue (`#123`, `owner/repo#123`, or its URL) or a milestone
|
|
44
|
+
(by name or URL). Query the GraphQL API through `gh api graphql` (or the GitHub MCP server).
|
|
45
|
+
For an issue root fetch its `subIssues` as the children; for a milestone root fetch the issues
|
|
46
|
+
in the milestone. For every child read `blockedBy` and collect the blockers; fetch each blocker
|
|
47
|
+
outside the child set for its state. One query shape covers every issue:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
query($owner:String!, $repo:String!, $n:Int!) { repository(owner:$owner, name:$repo) { issue(number:$n) {
|
|
51
|
+
number url title body state stateReason
|
|
52
|
+
labels(first:50) { nodes { name } }
|
|
53
|
+
milestone { number url title state }
|
|
54
|
+
parent { number url repository { nameWithOwner } }
|
|
55
|
+
subIssues(first:100) { nodes { number url title body state stateReason labels(first:50) { nodes { name } } repository { nameWithOwner } } }
|
|
56
|
+
blockedBy(first:50) { nodes { number url state stateReason repository { nameWithOwner } } }
|
|
57
|
+
} } }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If the root has no sub-issues (or the milestone no issues), say so and stop: this skill does
|
|
61
|
+
not parse task lists or "blocked by" text in issue bodies, and an empty epic is not imported.
|
|
62
|
+
A re-import after the run has published tasks needs no special handling: send the tracker's
|
|
63
|
+
current states as they are. The daemon accepts a published task becoming a closed (done)
|
|
64
|
+
external node; a task the tracker shows reopened is not reopened by import but with `reopen`.
|
|
65
|
+
Repositories on plans without sub-issues or dependencies need the parent to be a milestone.
|
|
66
|
+
|
|
40
67
|
## 3. Build normalized records
|
|
41
68
|
|
|
42
69
|
One record per issue you fetched, including the root:
|
|
@@ -46,7 +73,9 @@ One record per issue you fetched, including the root:
|
|
|
46
73
|
```
|
|
47
74
|
|
|
48
75
|
- `id` is the tracker key (`ENG-123`, `PROJ-45`).
|
|
49
|
-
- `state` is one of `open`, `inProgress`, `done`, `cancelled`.
|
|
76
|
+
- `state` is one of `open`, `inProgress`, `done`, `cancelled`. A `done` or `cancelled` child
|
|
77
|
+
becomes an external node that already counts as satisfied: it neither holds the milestone
|
|
78
|
+
nor blocks a dependant. Map tracker states: anything
|
|
50
79
|
unstarted or backlog is `open`; started or in review is `inProgress`; completed is `done`;
|
|
51
80
|
cancelled, duplicate, or won't-do is `cancelled`.
|
|
52
81
|
- `parent` is the root id for each child.
|
|
@@ -60,7 +89,15 @@ One record per issue you fetched, including the root:
|
|
|
60
89
|
break ties between ready tasks with equally long chains behind them. Linear: send the
|
|
61
90
|
issue's `priority` field as is (its 0, meaning none, is dropped). Jira: send the position
|
|
62
91
|
of the issue's priority in the site's priority list, counted from the most urgent as 1.
|
|
63
|
-
|
|
92
|
+
GitHub: the number from a label `P0`..`P4` or `priority:<n>`, otherwise omit it; the label
|
|
93
|
+
stays in `labels`. Omit it when the tracker has no priority.
|
|
94
|
+
- GitHub records differ in three ways. `id` is `GH-<number>` for an issue in the tracker's
|
|
95
|
+
repository, `GH-<owner>-<repo>-<number>` for an issue in another repository, and `GH-M<number>`
|
|
96
|
+
for a milestone root (GitHub's own key, `owner/repo#123`, is not usable: ids travel through
|
|
97
|
+
URL paths and git branch names); always set `url`, which is what the run skill acts on.
|
|
98
|
+
`state` is `open` for an open issue, `inProgress` for an open issue carrying the in-progress
|
|
99
|
+
label when one is configured, `done` for a closed issue whose `stateReason` is `COMPLETED`,
|
|
100
|
+
and `cancelled` for `NOT_PLANNED` or `DUPLICATE`. `parent` is the root's id for every child.
|
|
64
101
|
- `labels` are passed through. Two label shapes choose the worker for the task: `model:<name>`
|
|
65
102
|
(for example `model:claude-sonnet-5-5`) and `effort:<level>` (`low`, `medium`, `high`,
|
|
66
103
|
`xhigh`, or `max`). Without them a task runs with the run's defaults (`claude-opus-5-5` at
|
|
@@ -75,10 +112,16 @@ taken over; set `task` to orchestrate them), `gated` (the root milestone waits f
|
|
|
75
112
|
review, default true).
|
|
76
113
|
|
|
77
114
|
Always pass `tracker`: `{ kind: "linear" }` when you fetched through the Linear tools,
|
|
78
|
-
`{ kind: "atlassian" }` through the Atlassian tools,
|
|
79
|
-
workspace (its URL key)
|
|
80
|
-
|
|
81
|
-
in progress
|
|
115
|
+
`{ kind: "atlassian" }` through the Atlassian tools, `{ kind: "github" }` through `gh` or a
|
|
116
|
+
GitHub MCP server, plus `workspace` naming the Linear workspace (its URL key), the Jira site,
|
|
117
|
+
or the GitHub repository as `owner/repo`. For GitHub also pass `inProgressLabel` when the
|
|
118
|
+
repository uses a label for work in progress: GitHub has no started state, so this label is
|
|
119
|
+
both how an open issue reads as in progress at import and what the run skill adds when a task
|
|
120
|
+
starts. When no label was given and the repository has one that looks like it (`in-progress`,
|
|
121
|
+
`in progress`, `status: in progress`), offer it to the user before importing; without one, in
|
|
122
|
+
progress is simply not mirrored. The daemon records the tracker and from then on mirrors the
|
|
123
|
+
run back through the `run` skill: issues move to in progress, done, or cancelled, and comments
|
|
124
|
+
appear where a human is needed.
|
|
82
125
|
|
|
83
126
|
## 5. Report
|
|
84
127
|
|
|
@@ -58,13 +58,18 @@ with a worker count no larger than the run's `capacity` (from `status`), usually
|
|
|
58
58
|
a run tag such as `work-1`:
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
Workflow({ scriptPath: "<plugin dir>/workflows/work.js", args: { workers: 2, runTag: "work-1" } })
|
|
61
|
+
Workflow({ scriptPath: "<plugin dir>/workflows/work.js", args: { workers: 2, runTag: "work-1", capacity: <status.config.capacity.value> } })
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Each worker loop
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
Each worker loop runs a cheap claimer agent (`claude-haiku-5-5` at `low` by default; pass
|
|
65
|
+
`claimModel` and `claimEffort` only when the user asks otherwise) that claims a launch, polling
|
|
66
|
+
up to three times with 90-second waits when nothing is claimable, then runs a worker subagent
|
|
67
|
+
on its brief in the prepared worktree with the launch's model and effort, reports through the
|
|
68
|
+
worker tools, and claims again until nothing is claimable. Agents are labelled `claim
|
|
69
|
+
<workerId>` and `work <workerId> <taskId>`. Workers edit files in worktrees under the run
|
|
70
|
+
directory, outside the repository, so an `acceptEdits` session prompts for each file there
|
|
71
|
+
unless it was started with `--add-dir ~/.orchestrator`. The workflow runs in the background; do
|
|
72
|
+
not wait for its completion notice, monitor with `wait` (section 2). When the workflow has ended while launches are still claimable (a question was
|
|
68
73
|
answered after it stopped, or a task was retried), re-run it with the same run tag: a worker
|
|
69
74
|
with the same id claims its launch back. In `spawn` mode run no workflow; the daemon's agents
|
|
70
75
|
do the work and you only monitor.
|
|
@@ -105,7 +110,10 @@ answers (section 2b), then act on the digest:
|
|
|
105
110
|
user's decision. On acceptance in a run imported from a tracker, first create the issue
|
|
106
111
|
with this session's tracker tools: a child of the epic, blocked by the proposing task's
|
|
107
112
|
issue, with the acceptance criteria under the configured heading in its description; then
|
|
108
|
-
call `accept_proposal` with the new issue's key as `nodeId`.
|
|
113
|
+
call `accept_proposal` with the new issue's key as `nodeId`. GitHub: `gh issue create
|
|
114
|
+
--repo <owner/repo> --parent <root url> --title ... --body-file -` creates the sub-issue;
|
|
115
|
+
add the dependency with the GraphQL mutation `addBlockedBy(input: { issueId, blockingIssueId })`
|
|
116
|
+
(node ids from `gh api graphql`); the `nodeId` is `GH-<new number>`. In a file-based run call
|
|
109
117
|
`accept_proposal` without `nodeId` and report the new node id. On rejection call
|
|
110
118
|
`reject_proposal` with the user's note. Never accept a proposal the user has not approved.
|
|
111
119
|
- **pausedReason** is `costBudget`: the run cost reached its ceiling. Report `cost.runUsd`
|
|
@@ -132,12 +140,25 @@ tracker tools in this session, acknowledging each one before the next:
|
|
|
132
140
|
type `started` for `inProgress`, `completed` for `done`, `canceled` for `cancelled`. Jira:
|
|
133
141
|
transition to a status in category In Progress or Done; for `cancelled`, a canceled-type
|
|
134
142
|
status when the workflow has one. When the tracker has no canceled-type state, leave the
|
|
135
|
-
status, post a comment saying the task was cancelled, and acknowledge.
|
|
136
|
-
`
|
|
137
|
-
|
|
138
|
-
`
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
status, post a comment saying the task was cancelled, and acknowledge. GitHub (act on the
|
|
144
|
+
effect's `url` with `gh`, never on the `GH-` id):
|
|
145
|
+
`done`: `gh issue close <url> --reason completed`;
|
|
146
|
+
`cancelled`: `gh issue close <url> --reason "not planned"`;
|
|
147
|
+
both followed by `gh issue edit <url> --remove-label <policy.tracker.inProgressLabel>` when
|
|
148
|
+
the policy has a label (a no-op when the issue does not carry it);
|
|
149
|
+
`inProgress`: `gh issue reopen <url>` when the issue is closed, then
|
|
150
|
+
`gh issue edit <url> --add-label <policy.tracker.inProgressLabel>`; when the policy has no
|
|
151
|
+
`inProgressLabel`, call `ack { id, result: { skipped: true } }` and change nothing.
|
|
152
|
+
A milestone root (`GH-M<n>`, the effect's `url` is a milestone): `done` closes the milestone
|
|
153
|
+
with `gh api`; acknowledge `inProgress` as skipped. On success call
|
|
154
|
+
`ack { id, result: { stateId } }` (for GitHub, `{ state }`).
|
|
155
|
+
- `comment`: list the issue's recent comments first (GitHub: `gh issue view <url> --comments`
|
|
156
|
+
or the GraphQL `comments` connection). If one already contains the effect's `marker`, call
|
|
157
|
+
`ack { id, result: { commentId } }` with that comment's id and do not post again (a previous
|
|
158
|
+
session posted it and crashed before acknowledging). Otherwise post `body`, a blank line,
|
|
159
|
+
and the `marker` as the last line (GitHub: `gh issue comment <url> --body-file -`), then
|
|
160
|
+
`ack { id, result: { commentId } }`. A GitHub milestone root takes no comments: acknowledge
|
|
161
|
+
the effect as skipped.
|
|
141
162
|
- On a tracker error: `ack { id, error: "<message>" }`, then skip the remaining effects for
|
|
142
163
|
that issue in this drain; they come back next time. The daemon retries a rejected effect
|
|
143
164
|
up to its cap and then lists it in `trackerErrors`; when the digest shows `trackerErrors`,
|
|
@@ -149,7 +170,8 @@ conversation.
|
|
|
149
170
|
### 2b. Relay answers from the tracker
|
|
150
171
|
|
|
151
172
|
When `policy.answersFromComments` is true and the digest lists `openQuestions`: for each
|
|
152
|
-
task, list its issue's comments
|
|
173
|
+
task, list its issue's comments (GitHub: `gh issue view <url> --comments`); ignore any
|
|
174
|
+
containing "— orchestrator run"; take the first
|
|
153
175
|
human comment posted after the latest marked comment that you have not relayed before; send
|
|
154
176
|
it with `answer`; remember that comment's id so you never relay it twice. If the daemon
|
|
155
177
|
answers 409, the task is no longer waiting or blocked (someone answered first): tell the
|
|
@@ -31,16 +31,26 @@ the workflow hands back: questions, reviews, and the end.
|
|
|
31
31
|
## 2. Run the workflow
|
|
32
32
|
|
|
33
33
|
Pick a worker count no larger than the run's `capacity` (from `status`), usually 2 to 4, and a
|
|
34
|
-
run tag such as `work-1`. Run the plugin's workflow `work.js` with the Workflow tool
|
|
34
|
+
run tag such as `work-1`. Run the plugin's workflow `work.js` with the Workflow tool, passing
|
|
35
|
+
the capacity so the workflow clamps the count itself:
|
|
35
36
|
|
|
36
37
|
```
|
|
37
|
-
Workflow({ scriptPath: "<plugin dir>/workflows/work.js", args: { workers: 2, runTag: "work-1" } })
|
|
38
|
+
Workflow({ scriptPath: "<plugin dir>/workflows/work.js", args: { workers: 2, runTag: "work-1", capacity: <status.config.capacity.value> } })
|
|
38
39
|
```
|
|
39
40
|
|
|
40
|
-
Each worker loop claims a launch with the worker id `<runTag>-<n
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
Each worker loop runs a claimer agent that claims a launch with the worker id `<runTag>-<n>`;
|
|
42
|
+
when nothing is claimable it waits up to 90 seconds, reads `status`, and tries again, up to
|
|
43
|
+
three polls before returning. The claimer makes no decisions, so it runs on a fixed cheap
|
|
44
|
+
model: `claude-haiku-5-5` at `low` effort. Pass `claimModel` and `claimEffort` in `args` only
|
|
45
|
+
when the user asks for a different claimer. On a claim the loop runs a worker agent on the
|
|
46
|
+
brief with the model and effort the claim carries (the task's choice, else the run default),
|
|
47
|
+
then claims again until nothing is claimable. In the agent view the claimer is labelled
|
|
48
|
+
`claim <workerId>` and the worker `work <workerId> <taskId>`, so the two agents of a loop
|
|
49
|
+
share the worker id. The workflow runs in the background and returns short outcomes per
|
|
50
|
+
launch; never paste briefs or logs into the conversation. Workers edit files in worktrees under
|
|
51
|
+
the run directory (`~/.orchestrator/runs/<id>/worktrees`, outside the repository), so a session
|
|
52
|
+
in `acceptEdits` mode prompts for each file there unless it was started with
|
|
53
|
+
`--add-dir ~/.orchestrator`; tell the user when the first such prompt appears.
|
|
44
54
|
|
|
45
55
|
## 3. Monitor while it runs
|
|
46
56
|
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
export const meta = {
|
|
2
2
|
name: 'orchestrator-work',
|
|
3
|
-
description: 'Fan out N worker loops that claim prepared launches from the orchestrator daemon, do the work in the prepared worktree, and report; stop when nothing is claimable.',
|
|
4
|
-
whenToUse: 'When the work skill runs a pull-mode or mixed-mode orchestrator run inside this session.',
|
|
3
|
+
description: 'Fan out N worker loops that claim prepared launches from the orchestrator daemon (a cheap claimer polls; the worker runs with the launch\'s model and effort), do the work in the prepared worktree, and report; stop when nothing is claimable.',
|
|
4
|
+
whenToUse: 'When the work skill runs a pull-mode or mixed-mode orchestrator run inside this session. Args: workers, runTag, capacity (clamps workers), claimModel and claimEffort (the claimer; default claude-haiku-5-5 at low).',
|
|
5
5
|
phases: [{ title: 'Claim' }, { title: 'Work' }],
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// The claimer makes no decision (claim, wait, status, a spelled-out stop rule), so it runs on a fixed cheap model unless the user asks otherwise. See specs/host-integration "Work skill and workflow".
|
|
9
|
+
const EFFORTS = ['low', 'medium', 'high', 'xhigh', 'max']
|
|
10
|
+
const claimModel = String((args && args.claimModel) || 'claude-haiku-5-5')
|
|
11
|
+
const claimEffort = EFFORTS.includes(args && args.claimEffort) ? args.claimEffort : 'low'
|
|
12
|
+
const CLAIM_POLLS = 3
|
|
13
|
+
const CLAIM_WAIT_MS = 90000
|
|
14
|
+
const requested = Math.max(1, Math.min(16, Number((args && args.workers) || 2)))
|
|
15
|
+
const capacity = Number(args && args.capacity)
|
|
16
|
+
// A loop beyond the daemon's capacity would only poll for a slot that is never filled.
|
|
17
|
+
const workers = Number.isInteger(capacity) && capacity > 0 && capacity < requested ? capacity : requested
|
|
18
|
+
if (workers !== requested) log(`workers clamped from ${requested} to the run's capacity ${workers}`)
|
|
9
19
|
const runTag = String((args && args.runTag) || 'work')
|
|
10
20
|
const held = {}
|
|
11
21
|
const outcomes = []
|
|
@@ -47,11 +57,12 @@ const OUTCOME_SCHEMA = {
|
|
|
47
57
|
|
|
48
58
|
function claimPrompt(workerId, heldCount) {
|
|
49
59
|
return [
|
|
50
|
-
`You are the claimer for orchestrator worker "${workerId}". Use the orchestrator operator MCP tools (names end in claim, wait, status; load them with ToolSearch if needed).`,
|
|
60
|
+
`You are the claimer for orchestrator worker "${workerId}". Use the orchestrator operator MCP tools (names end in claim, wait, status; load them with ToolSearch if needed). You make no decisions: follow these steps exactly.`,
|
|
51
61
|
`1. Call claim with workerId "${workerId}" and access "local".`,
|
|
52
62
|
'2. If it returns a launch (status 200): read the markdown brief at briefPath and return { claimed: true, launchId, taskId, token, worktree, briefPath, briefMarkdown: <the full brief file>, model, effort, pendingSeq, pendingAnswer } (model and effort exactly as the response gives them; pending fields only when the response carries pending).',
|
|
53
|
-
|
|
63
|
+
`3. If it returns 404 (nothing claimable or paused): call wait with until "any" and timeoutMs ${CLAIM_WAIT_MS}, then call status, and compute stop:`,
|
|
54
64
|
` stop is true when finished is true, or stalled is true, or (claimable is 0 and ${heldCount} launches are held by other loops is false and (openQuestions is non-empty or awaitingReview is non-empty)). Otherwise stop is false.`,
|
|
65
|
+
` If stop is false and you have done fewer than ${CLAIM_POLLS} polls (a poll is one claim followed by one wait and one status), go back to step 1. Otherwise return { claimed: false, stop, finished, stalled, openQuestions, awaitingReview, claimable } from the last status.`,
|
|
55
66
|
'4. On any other error return { claimed: false, stop: true }.',
|
|
56
67
|
'Return only the structured output; do not do any task work.',
|
|
57
68
|
].join('\n')
|
|
@@ -82,7 +93,7 @@ async function loop(i) {
|
|
|
82
93
|
const workerId = `${runTag}-${i + 1}`
|
|
83
94
|
for (let cycle = 0; cycle < 200; cycle++) {
|
|
84
95
|
const heldCount = Object.keys(held).filter((k) => k !== workerId).length
|
|
85
|
-
const c = await agent(claimPrompt(workerId, heldCount), { label: `claim
|
|
96
|
+
const c = await agent(claimPrompt(workerId, heldCount), { label: `claim ${workerId}`, phase: 'Claim', schema: CLAIM_SCHEMA, model: claimModel, effort: claimEffort })
|
|
86
97
|
if (!c) break
|
|
87
98
|
if (!c.claimed) {
|
|
88
99
|
lastDigest = { finished: c.finished, stalled: c.stalled, openQuestions: c.openQuestions || [], awaitingReview: c.awaitingReview || [], claimable: c.claimable || 0 }
|
|
@@ -92,7 +103,7 @@ async function loop(i) {
|
|
|
92
103
|
held[workerId] = c.taskId
|
|
93
104
|
log(`${workerId}: working ${c.taskId}`)
|
|
94
105
|
// The launch's model and effort were fixed when the daemon prepared it; the worker agent runs with them. See specs/model-selection.
|
|
95
|
-
const r = await agent(workerPrompt(c), { label: `work
|
|
106
|
+
const r = await agent(workerPrompt(c), { label: `work ${workerId} ${c.taskId}`, phase: 'Work', schema: OUTCOME_SCHEMA, ...(c.model ? { model: c.model } : {}), ...(c.effort ? { effort: c.effort } : {}) })
|
|
96
107
|
delete held[workerId]
|
|
97
108
|
const outcome = r || { taskId: c.taskId, outcome: 'failed', summary: 'worker agent returned nothing' }
|
|
98
109
|
outcomes.push({ worker: workerId, ...outcome })
|
|
@@ -101,4 +112,4 @@ async function loop(i) {
|
|
|
101
112
|
}
|
|
102
113
|
|
|
103
114
|
await parallel(Array.from({ length: workers }, (_, i) => () => loop(i)))
|
|
104
|
-
return { runTag, workers, outcomes, digest: lastDigest }
|
|
115
|
+
return { runTag, workers, claimModel, claimEffort, outcomes, digest: lastDigest }
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autodidacticon/orchestrator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Parallel coding-agent orchestrator over a task DAG",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22.13.0"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"orchestrator": "
|
|
11
|
-
"orchestrator-ctl": "
|
|
12
|
-
"orchestrator-mcp": "
|
|
13
|
-
"orchestrator-mcp-shim": "
|
|
10
|
+
"orchestrator": "dist/src/main.js",
|
|
11
|
+
"orchestrator-ctl": "dist/src/operator/cli.js",
|
|
12
|
+
"orchestrator-mcp": "dist/src/operator/mcp.js",
|
|
13
|
+
"orchestrator-mcp-shim": "dist/src/agent/mcp-shim.js"
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|