taskchef 8.2.2 → 8.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/.codex-plugin/plugin.json +1 -1
- package/README.md +53 -56
- package/docs/dashboard-lifecycle.md +108 -194
- package/docs/spec.md +75 -89
- package/docs/workflows.md +39 -22
- package/package.json +1 -1
- package/scripts/roles/resolve_roles.py +2 -2
- package/skills/taskchef-delegate/SKILL.md +11 -11
- package/skills/taskchef-delegate/references/model-roles.md +21 -44
- package/skills/taskchef-executor/SKILL.md +34 -0
- package/src/dashboard/dist/app.js +1 -1
- package/src/dashboard/dist/app.js.map +1 -1
- package/src/dashboard/react/components/ModelSettings.tsx +1 -1
- package/src/dashboard-control.js +34 -0
- package/src/dashboard-manager.js +183 -842
- package/src/dashboard-session-process.js +35 -126
- package/src/dashboard-session.js +0 -5
- package/src/dashboard.js +29 -282
- package/src/mcp.js +3 -3
- package/src/model-roles.js +3 -3
- package/src/dashboard-ownership.js +0 -251
package/docs/spec.md
CHANGED
|
@@ -59,15 +59,10 @@ is dated research, not contract.
|
|
|
59
59
|
|
|
60
60
|
## Workspace contract
|
|
61
61
|
|
|
62
|
-
TaskChef MUST manage only `AGENTS.md`, `taskchef.json`, `tasks.jsonl`, the
|
|
63
|
-
optional `.taskchef-usage.json` cache
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
preserve unrelated paths. The owner record MUST be a retained mode-`0600`
|
|
67
|
-
current-listener identity and control credential that is atomically replaced by
|
|
68
|
-
a new owner. The handoff record MUST be a retained mode-`0600`, secret-free,
|
|
69
|
-
credential-signed final lease snapshot that is atomically overwritten by the
|
|
70
|
-
next finalized handoff.
|
|
62
|
+
TaskChef MUST manage only `AGENTS.md`, `taskchef.json`, `tasks.jsonl`, and the
|
|
63
|
+
optional `.taskchef-usage.json` cache inside the dispatcher workspace. It MUST
|
|
64
|
+
preserve unrelated paths. Dashboard process identity and Codex-session leases
|
|
65
|
+
MUST remain in memory and MUST NOT create owner, secret, or handoff files.
|
|
71
66
|
|
|
72
67
|
`taskchef.json` MUST have schema version 2, the following required fields, and
|
|
73
68
|
an optional exact `dashboard` object:
|
|
@@ -259,7 +254,8 @@ the final link, preserving the delegate skill's immediate-return contract.
|
|
|
259
254
|
NOT place a blank line between the invocation and marker or inline the
|
|
260
255
|
executor protocol into a new instruction.
|
|
261
256
|
4. It MUST call `record_task` with `threadId: null` before native creation.
|
|
262
|
-
5. It MUST create exactly one native Codex executor
|
|
257
|
+
5. It MUST create exactly one native Codex executor using the resolved
|
|
258
|
+
Orchestrator preference when configured, then return immediately.
|
|
263
259
|
6. The executor MUST read its own `CODEX_THREAD_ID` and call `link_task`
|
|
264
260
|
before substantive work. It MUST NOT use parent/session identity or guess.
|
|
265
261
|
7. After initial linking, the executor MUST establish a `turnRef`. It MUST use
|
|
@@ -274,6 +270,17 @@ the final link, preserving the delegate skill's immediate-return contract.
|
|
|
274
270
|
TaskChef MUST atomically close it as `interrupted` before appending the new
|
|
275
271
|
working turn; the executor MUST NOT report semantic `failed` for recovery.
|
|
276
272
|
|
|
273
|
+
For repository work, the visible executor MUST route an explicit combined
|
|
274
|
+
investigate-or-plan-and-implement request through a fresh Planner, then a fresh
|
|
275
|
+
Implementer, then a fresh Reviewer. A direct implementation request, or a later
|
|
276
|
+
request to implement prior investigation or planning, MUST skip the Planner and
|
|
277
|
+
use a fresh Implementer followed by a fresh Reviewer in the same visible task.
|
|
278
|
+
It MUST resolve the applicable role preference immediately before creating a
|
|
279
|
+
child when agent TOML exists; absent agent configuration inherits the parent's
|
|
280
|
+
model settings without requiring Python. It MUST keep at most one writing agent
|
|
281
|
+
active and verify child results. TaskChef persists only the visible executor's
|
|
282
|
+
lifecycle and MUST NOT store or infer child phases, identities, or usage.
|
|
283
|
+
|
|
277
284
|
Normal executor completion MUST stop after the terminal callback and return
|
|
278
285
|
normally. It MUST NOT archive, hand off, close, navigate away from, or otherwise
|
|
279
286
|
terminate the Codex task merely because work completed. Archive is authorized
|
|
@@ -331,11 +338,8 @@ object. Validation, marker, identity, uniqueness, freshness, or filesystem
|
|
|
331
338
|
failures are surfaced as tool errors and MUST NOT partially mutate the log.
|
|
332
339
|
|
|
333
340
|
### `ensure_dashboard`
|
|
334
|
-
**Caller:** dispatcher. **Mutation:** starts or reuses the
|
|
335
|
-
Codex-session-scoped loopback dashboard.
|
|
336
|
-
dashboard ownership record in the canonical workspace. The record remains
|
|
337
|
-
after shutdown and the next owner atomically replaces it before reporting
|
|
338
|
-
startup success.
|
|
341
|
+
**Caller:** dispatcher. **Mutation:** starts or reuses the
|
|
342
|
+
Codex-session-scoped loopback dashboard.
|
|
339
343
|
|
|
340
344
|
**Input:** empty object.
|
|
341
345
|
|
|
@@ -344,7 +348,7 @@ startup success.
|
|
|
344
348
|
```text
|
|
345
349
|
{ dashboard: {
|
|
346
350
|
action: "started" | "reused",
|
|
347
|
-
launcher: "session",
|
|
351
|
+
launcher: "session" | "standalone" | "mcp",
|
|
348
352
|
url: "http://127.0.0.1:3210/",
|
|
349
353
|
workspace: string,
|
|
350
354
|
taskchefVersion: string,
|
|
@@ -360,84 +364,65 @@ and concurrent calls are idempotent. The stable default MUST bind only to
|
|
|
360
364
|
session PID, or credential.
|
|
361
365
|
|
|
362
366
|
Exact reuse MUST require the fixed service/schema, TaskChef version,
|
|
363
|
-
dashboard-server version, canonical workspace, and
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
separate response HMAC bound to the request nonce and complete accepted result.
|
|
367
|
+
dashboard-server version, canonical workspace, and recognized launcher identity.
|
|
368
|
+
A `session` listener MUST register the MCP's original Codex parent PID in its
|
|
369
|
+
in-memory lease. Every launcher MUST complete another exact health probe before
|
|
370
|
+
ensure reports `reused`, and the response MUST report the observed launcher.
|
|
368
371
|
The independent dashboard MUST survive closure of an individual MCP transport.
|
|
369
372
|
The session manager MUST require an explicit nonzero port because a detached
|
|
370
373
|
child cannot safely return an ephemeral bound port without an additional IPC
|
|
371
|
-
|
|
374
|
+
readiness channel. Direct foreground server callers MAY continue to bind port
|
|
372
375
|
zero when they retain the returned listener.
|
|
373
376
|
|
|
374
|
-
The dashboard MUST track only explicitly registered PIDs using non-signalling
|
|
377
|
+
The dashboard MUST track only same-version explicitly registered PIDs using non-signalling
|
|
375
378
|
existence probes. Once every registered PID is absent for the grace period, it
|
|
376
|
-
MUST gracefully close its HTTP listener and exit. A new
|
|
379
|
+
MUST gracefully close its HTTP listener and exit. A new live
|
|
377
380
|
registration during the grace period MUST cancel expiry. This is a local
|
|
378
381
|
best-effort session guard, not a Codex restart guarantee.
|
|
379
382
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
rename it, and sync the containing canonical workspace directory before
|
|
418
|
-
reporting success. Finalization MUST fence further handoff joins before taking
|
|
419
|
-
and persisting the immutable snapshot.
|
|
420
|
-
The new MCP MAY then start its current `session` version and MUST NOT downgrade
|
|
421
|
-
a newer listener. Concurrent startup and handoff MUST converge on one
|
|
422
|
-
authenticated listener. Single-use control nonces MUST be retained in a fixed,
|
|
423
|
-
time-bounded replay cache that refuses overflow while entries remain valid.
|
|
424
|
-
|
|
425
|
-
The credential MUST NOT appear in health responses, requests, diagnostics, or
|
|
426
|
-
logs. A standalone, unknown, malformed, different-workspace, newer, unproven,
|
|
427
|
-
spoofed, or legacy listener without valid ownership metadata MUST produce a
|
|
428
|
-
concise actionable conflict and MUST NOT receive a shutdown request, signal,
|
|
429
|
-
or process-level termination attempt. TaskChef MUST NOT discover or kill port
|
|
430
|
-
owners. An invalid workspace, initial task log, or ownership write MUST leave
|
|
431
|
-
no newly owned listener.
|
|
383
|
+
When exact structured health identifies an older TaskChef dashboard for the
|
|
384
|
+
same canonical workspace, the new MCP MUST request simple graceful shutdown,
|
|
385
|
+
wait a bounded time for port release, and start its installed `session` version
|
|
386
|
+
within the same ensure operation. It MUST NOT transfer in-memory PID leases
|
|
387
|
+
across versions. The replacement initially knows only the activating session;
|
|
388
|
+
a later ensure MAY register another live session or restart the dashboard after
|
|
389
|
+
the activating lease expires.
|
|
390
|
+
|
|
391
|
+
A recognized newer TaskChef listener MUST NOT be downgraded. Concurrent
|
|
392
|
+
activation and replacement MUST converge through health probing and exclusive
|
|
393
|
+
port binding. Unknown, malformed, different-workspace, or unrelated occupants
|
|
394
|
+
MUST receive no control request or process signal and MUST remain untouched.
|
|
395
|
+
TaskChef MUST NOT discover or kill port owners.
|
|
396
|
+
|
|
397
|
+
TaskChef's dashboard uses a trusted, single-user localhost threat model. Exact
|
|
398
|
+
bounded health identity is sufficient service recognition and MUST NOT be
|
|
399
|
+
described as cryptographic authentication. The dashboard MUST NOT create or use
|
|
400
|
+
an owner secret, HMAC challenge, durable ownership record, handoff record,
|
|
401
|
+
prepare/commit protocol, recovery lease, or cross-version lease transfer.
|
|
402
|
+
|
|
403
|
+
The session-registration and shutdown controls MUST remain loopback-only and
|
|
404
|
+
MUST require the exact listener Host and Origin, JSON content type, a non-simple
|
|
405
|
+
TaskChef control header, and an exact bounded request body containing the exact
|
|
406
|
+
structured health identity observed by the caller. The receiver MUST compare
|
|
407
|
+
that expected identity with its own identity before registering a session or
|
|
408
|
+
accepting shutdown. It MUST refuse a mismatch, and the manager MUST probe again
|
|
409
|
+
before applying lifecycle rules to the current occupant. These request-shape
|
|
410
|
+
checks protect against ordinary cross-site browser requests; they MUST NOT be
|
|
411
|
+
described as authentication. Future LAN access is outside this contract and
|
|
412
|
+
requires a separate opt-in design with password-backed user authentication and
|
|
413
|
+
suitable transport protection.
|
|
414
|
+
|
|
415
|
+
A listener using the former HMAC control protocol will refuse the new simple
|
|
416
|
+
shutdown request. It MUST be reported as a recognized older TaskChef conflict
|
|
417
|
+
and left running. Crossing that one-time compatibility boundary requires the
|
|
418
|
+
verified legacy listener to stop through its existing lifecycle before ensure
|
|
419
|
+
is retried; TaskChef MUST NOT add a process-kill fallback.
|
|
432
420
|
|
|
433
421
|
Detached session startup MUST use a private child readiness acknowledgement
|
|
434
|
-
sent only after listener bind and
|
|
435
|
-
MUST propagate through that channel. A bounded
|
|
436
|
-
cooperatively cancel the exact child so late
|
|
437
|
-
|
|
438
|
-
atomic replacement, and the listener MUST retain the port until that write
|
|
439
|
-
commits or aborts on every shutdown path so an older writer cannot overwrite a
|
|
440
|
-
successor's credential.
|
|
422
|
+
sent only after listener bind, initialization, and initial in-memory lease
|
|
423
|
+
creation. Startup errors MUST propagate through that channel. A bounded
|
|
424
|
+
readiness timeout MUST cooperatively cancel the exact child so late
|
|
425
|
+
initialization cannot strand an unreported listener.
|
|
441
426
|
|
|
442
427
|
MCP EOF, explicit close, protocol close, SIGINT, SIGTERM, transport-start
|
|
443
428
|
failure, and MCP-parent loss MUST still bound MCP shutdown. They MUST close the
|
|
@@ -756,15 +741,16 @@ permissions for dashboard availability. Availability is best-effort while a
|
|
|
756
741
|
registered Codex session process is alive and is not guaranteed while Codex is
|
|
757
742
|
closed.
|
|
758
743
|
|
|
759
|
-
Releases
|
|
760
|
-
verified legacy listener MUST be reported distinctly from an unknown port
|
|
761
|
-
conflict
|
|
762
|
-
|
|
763
|
-
|
|
744
|
+
Releases using the former HMAC dashboard control protocol are legacy listeners.
|
|
745
|
+
A verified legacy listener MUST be reported distinctly from an unknown port
|
|
746
|
+
conflict and MUST remain running when it refuses simple graceful shutdown. One
|
|
747
|
+
final stop through that listener's existing lifecycle is required when crossing
|
|
748
|
+
this boundary. Releases implementing simple localhost control replace older
|
|
749
|
+
recognized versions automatically.
|
|
764
750
|
|
|
765
751
|
Installing or replacing plugin files MUST NOT be described as activating the
|
|
766
752
|
new MCP code. Release verification MUST install the plugin, activate or reload
|
|
767
753
|
the new MCP process, ensure the dashboard, and verify the expected TaskChef
|
|
768
|
-
version, dashboard protocol `serverVersion`,
|
|
754
|
+
version, dashboard protocol `serverVersion`, reported launcher, canonical workspace,
|
|
769
755
|
and canonical URL. Exact-compatible session-listener reuse remains valid; installation MUST NOT be
|
|
770
756
|
claimed to reload Codex automatically.
|
package/docs/workflows.md
CHANGED
|
@@ -24,8 +24,8 @@ start, upgrade, shutdown, and security rationale.
|
|
|
24
24
|
| `src/config-audit.js` | Durable prepared/terminal configuration-mutation journal. |
|
|
25
25
|
| `src/cli.js` | Administration, normalized cached briefs, inspection, diagnostics, and dashboard startup. |
|
|
26
26
|
| `src/dashboard.js` | Versioned health identity, validated compact snapshots, SSE fan-out, on-demand details, and bounded open actions. |
|
|
27
|
-
| `src/dashboard-manager.js` | Concurrent session ensure,
|
|
28
|
-
| `src/dashboard-session-process.js` | Independent loopback server,
|
|
27
|
+
| `src/dashboard-manager.js` | Concurrent session ensure, exact health reuse, bounded version replacement, and safe conflicts. |
|
|
28
|
+
| `src/dashboard-session-process.js` | Independent loopback server, signals, and in-memory Codex-session lease. |
|
|
29
29
|
| `src/dashboard-session.js` | Exact registered-PID liveness checks and grace-period expiry. |
|
|
30
30
|
| `src/usage.js` | Optional bounded ccusage execution, exact primary-thread mapping, normalized aggregation, and the private usage cache. |
|
|
31
31
|
| `src/usage-tracker.js` | Deferred sampling, cumulative boundaries, historical availability, and per-turn deltas. |
|
|
@@ -46,31 +46,31 @@ sequenceDiagram
|
|
|
46
46
|
participant D as Dispatcher
|
|
47
47
|
participant M as TaskChef MCP
|
|
48
48
|
participant H as Loopback health
|
|
49
|
-
participant S as Dashboard
|
|
49
|
+
participant S as Dashboard process
|
|
50
50
|
M->>M: Read dashboard.autostart (absent means true)
|
|
51
51
|
M->>M: Best-effort ensure before MCP transport connects
|
|
52
52
|
D->>M: ensure_dashboard()
|
|
53
53
|
M->>M: Serialize concurrent ensure calls
|
|
54
54
|
M->>H: GET 127.0.0.1:3210/api/health
|
|
55
|
-
alt Exact service, versions, canonical workspace, and
|
|
55
|
+
alt Exact service, versions, canonical workspace, and recognized launcher
|
|
56
56
|
H-->>M: Bounded compatible identity
|
|
57
|
-
M->>S:
|
|
58
|
-
M
|
|
57
|
+
M->>S: Register Codex parent PID when launcher is session
|
|
58
|
+
M->>H: Verify exact health again
|
|
59
|
+
M-->>D: reused, URL, workspace, versions, actual launcher
|
|
59
60
|
else No listener
|
|
60
61
|
H--xM: Connection refused
|
|
61
62
|
M->>S: Launch session process on 127.0.0.1:3210
|
|
62
|
-
S-->>M:
|
|
63
|
+
S-->>M: Ready after bind, initialization, and initial lease
|
|
63
64
|
M-->>D: started, URL, workspace, versions
|
|
64
|
-
else
|
|
65
|
-
M->>S:
|
|
66
|
-
S-->>M:
|
|
65
|
+
else Recognized older TaskChef listener for this workspace
|
|
66
|
+
M->>S: Simple guarded graceful shutdown request
|
|
67
|
+
S-->>M: Port released within bounded wait
|
|
67
68
|
M->>S: Launch installed session version
|
|
68
69
|
M-->>D: started, URL, workspace, versions
|
|
69
|
-
else
|
|
70
|
+
else Newer, unknown, malformed, or different workspace
|
|
70
71
|
H-->>M: Missing or incompatible identity
|
|
71
72
|
M-->>D: Actionable conflict, listener untouched
|
|
72
73
|
end
|
|
73
|
-
Note over D: Continue even when ensure failed
|
|
74
74
|
D-->>D: Answer, report, or dispatch
|
|
75
75
|
Note over D: Created-thread directive, when any, precedes final dashboard link
|
|
76
76
|
```
|
|
@@ -78,32 +78,39 @@ sequenceDiagram
|
|
|
78
78
|
When one MCP transport or plugin process closes, the dashboard remains while a
|
|
79
79
|
registered Codex session PID is alive. After every registered PID disappears
|
|
80
80
|
for the grace period, the dashboard closes and exits. A foreground
|
|
81
|
-
`taskchef dashboard` listener identifies itself as standalone
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
`taskchef dashboard` listener identifies itself as `standalone`. An
|
|
82
|
+
exact-current, healthy same-workspace listener with a recognized `standalone`,
|
|
83
|
+
`mcp`, or `session` launcher may be reused; ensure reports its actual launcher,
|
|
84
|
+
and only `session` listeners register Codex PID leases. No TaskChef path
|
|
85
|
+
terminates an incompatible listener or installs OS persistence.
|
|
84
86
|
|
|
85
87
|
Autostart and explicit ensures share the same manager promise, while
|
|
86
|
-
cross-process port races converge through
|
|
88
|
+
cross-process port races converge through exact health recognition and port binding. An
|
|
87
89
|
explicit `dashboard.autostart: false` skips only activation-time ensure. Any
|
|
88
90
|
failure is reduced to a fixed stderr diagnostic; tool registration and MCP
|
|
89
91
|
availability continue. Activation never opens a browser.
|
|
90
92
|
|
|
91
93
|
## Release-install verification
|
|
92
94
|
|
|
93
|
-
The practical release
|
|
95
|
+
The practical release-install sequence ends in this order:
|
|
94
96
|
|
|
95
97
|
1. Install the released plugin.
|
|
96
98
|
2. Activate or reload its new TaskChef MCP process.
|
|
97
99
|
3. Run `$taskchef-dashboard` or call `ensure_dashboard`.
|
|
98
|
-
4. Verify the expected TaskChef version, protocol `serverVersion`,
|
|
100
|
+
4. Verify the expected TaskChef version, protocol `serverVersion`, reported
|
|
99
101
|
launcher, canonical workspace, and canonical URL returned by the dashboard identity.
|
|
100
102
|
|
|
101
103
|
Replacing plugin files alone cannot execute autostart because old code remains
|
|
102
104
|
in an already-running MCP process. Installation does not necessarily reload
|
|
103
|
-
Codex. Activation of the installed MCP
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
Codex. Activation of the installed MCP asks a recognized older same-workspace
|
|
106
|
+
TaskChef listener to shut down gracefully. If the listener accepts, TaskChef
|
|
107
|
+
waits boundedly for its port and starts the installed session version. If the
|
|
108
|
+
listener lacks the compatible callback or refuses the request, it remains
|
|
109
|
+
running and ensure reports a conflict. An exact-compatible same-workspace
|
|
110
|
+
dashboard with any recognized launcher may be reused; a newer or unknown
|
|
111
|
+
listener is never terminated or replaced. A release using the former HMAC
|
|
112
|
+
control protocol needs one verified stop through its existing lifecycle before
|
|
113
|
+
the simple control protocol can take over.
|
|
107
114
|
|
|
108
115
|
## Normal delegation and self-linking
|
|
109
116
|
|
|
@@ -149,6 +156,16 @@ Record-before-create makes native creation failure observable. Executor
|
|
|
149
156
|
self-linking removes dispatcher-side polling, task search, title matching, and
|
|
150
157
|
parent/child identity inference.
|
|
151
158
|
|
|
159
|
+
The created executor is the stable visible owner. For repository work, an
|
|
160
|
+
explicit combined investigate-or-plan-and-implement request runs a fresh
|
|
161
|
+
Planner, Implementer, and Reviewer in that order. Direct implementation and a
|
|
162
|
+
later request to implement prior investigation skip the Planner and run a fresh
|
|
163
|
+
Implementer and Reviewer in the same visible task. Each role is resolved
|
|
164
|
+
immediately before use when agent TOML exists; absent configuration inherits the
|
|
165
|
+
parent's settings without requiring Python. Only one writer may be active.
|
|
166
|
+
TaskChef records only the executor's ordinary request/result timeline; it does
|
|
167
|
+
not track child phases or identities.
|
|
168
|
+
|
|
152
169
|
The generated task begins with the complete assignment, adds the local reporting
|
|
153
170
|
authorization paragraph separated by a blank line, leaves one blank line,
|
|
154
171
|
then places one explicit `$taskchef-executor` invocation immediately before its
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ import re
|
|
|
12
12
|
import sys
|
|
13
13
|
import tomllib
|
|
14
14
|
|
|
15
|
-
ROLES = ('planner', 'implementer', 'reviewer')
|
|
15
|
+
ROLES = ('orchestrator', 'planner', 'implementer', 'reviewer')
|
|
16
16
|
EFFORTS = ('none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max', 'ultra')
|
|
17
17
|
|
|
18
18
|
|
|
@@ -120,7 +120,7 @@ def resolve(codex_home=None, explicit_model=None, explicit_effort=None):
|
|
|
120
120
|
'availability': availability, 'problems': errors,
|
|
121
121
|
'taskOverrides': overrides,
|
|
122
122
|
'subagentOverrides': {('reasoning_effort' if k == 'thinking' else k): v for k, v in overrides.items()},
|
|
123
|
-
'fallback': '
|
|
123
|
+
'fallback': 'native new-task default' if role == 'orchestrator' else 'inherit parent settings'})
|
|
124
124
|
model_options = [] if catalog is None else [
|
|
125
125
|
{'value': slug, 'label': entry.get('display_name') or slug,
|
|
126
126
|
'efforts': [level['effort'] for level in entry['supported_reasoning_levels']]}
|
|
@@ -5,8 +5,8 @@ description: "Dispatch work received in the canonical TaskChef workspace into Co
|
|
|
5
5
|
|
|
6
6
|
# TaskChef Delegate
|
|
7
7
|
|
|
8
|
-
Create
|
|
9
|
-
and return immediately.
|
|
8
|
+
Create stable visible TaskChef parent tasks through the canonical per-user
|
|
9
|
+
TaskChef data workspace and return immediately.
|
|
10
10
|
|
|
11
11
|
## Invocation boundary
|
|
12
12
|
|
|
@@ -33,7 +33,8 @@ stop and report that the TaskChef plugin must be reloaded or installed.
|
|
|
33
33
|
- Treat only AGENTS.md, taskchef.json, tasks.jsonl, config-audit.jsonl, and
|
|
34
34
|
TaskChef's private backups and maintenance artifacts as managed dispatcher
|
|
35
35
|
state. Preserve unrelated user-owned paths.
|
|
36
|
-
- Use real Codex tasks
|
|
36
|
+
- Use real Codex tasks for visible delegated work. The dispatcher never uses
|
|
37
|
+
collaboration or subagent tools; the created executor may use them internally.
|
|
37
38
|
- Never use hooks, schedules, daemons, background monitors, recent-task
|
|
38
39
|
searches, transcripts, hidden reasoning, or polling for identity.
|
|
39
40
|
- Never wait for delegated work after native creation.
|
|
@@ -50,13 +51,11 @@ stop and report that the TaskChef plugin must be reloaded or installed.
|
|
|
50
51
|
3. Route against configured project `name`, `description`, and canonical
|
|
51
52
|
`githubRepos`; use `path` only as checkout identity. Require exactly one
|
|
52
53
|
match and an exact native-project path. Ask instead of guessing.
|
|
53
|
-
Select `
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
assignment; do not switch models during a turn or coordinate phases automatically.
|
|
59
|
-
Resolve configuration problems before recording the task.
|
|
54
|
+
Select the `orchestrator` preference from preparation for every visible
|
|
55
|
+
parent. Resolve explicit choices and follow
|
|
56
|
+
[model roles](references/model-roles.md). Missing configuration means omit
|
|
57
|
+
model overrides; surface invalid or unavailable configuration before
|
|
58
|
+
recording the task.
|
|
60
59
|
4. Build each executor instruction in this exact shape:
|
|
61
60
|
|
|
62
61
|
- Begin with the actual assignment on the first line and keep its complete
|
|
@@ -76,7 +75,8 @@ stop and report that the TaskChef plugin must be reloaded or installed.
|
|
|
76
75
|
5. Before creating each executor, call `record_task` exactly once with `id`,
|
|
77
76
|
`project`, `title`, the exact marked `instruction`, and `threadId: null`.
|
|
78
77
|
6. Create one real Codex task using the exact configured project, an appropriate
|
|
79
|
-
native environment, the marked instruction,
|
|
78
|
+
native environment, the marked instruction, a short title, and the resolved
|
|
79
|
+
orchestrator model and effort overrides when present.
|
|
80
80
|
7. Return immediately. Preserve a returned provisional client ID only for the
|
|
81
81
|
created-thread directive. Do not call `link_task` from the dispatcher even
|
|
82
82
|
when creation returns a durable ID; the child must self-link.
|
|
@@ -1,52 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Model roles
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
TaskChef reads optional personal role preferences from native Codex agent TOML
|
|
4
|
+
in `$CODEX_HOME/agents/` (default `~/.codex/agents/`). Only model and reasoning
|
|
5
|
+
effort are adapted; TaskChef does not load the files' instructions, tools, or
|
|
6
|
+
permissions.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
its `taskOverrides` as native `model` and
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
For a new visible task, select `orchestrator` from the `modelRoles` returned by
|
|
9
|
+
`prepare_dispatch`. Pass its `taskOverrides` as the native task's `model` and
|
|
10
|
+
`thinking` only after checking that the current creation interface supports
|
|
11
|
+
them. Missing configuration means omit both overrides. Invalid or unavailable
|
|
12
|
+
configuration must be reported rather than silently ignored.
|
|
12
13
|
|
|
13
|
-
Explicit user
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
alone replaces the resolved role effort. To resolve explicit choices, or recheck a preview after configuration
|
|
18
|
-
changes, run:
|
|
14
|
+
Explicit user choices take precedence. An explicit model without an explicit
|
|
15
|
+
effort omits effort; do not combine it with a configured effort from another
|
|
16
|
+
model. To resolve an explicit choice, run the packaged resolver before creating
|
|
17
|
+
the task:
|
|
19
18
|
|
|
20
19
|
```sh
|
|
21
|
-
python3 <plugin-root>/scripts/roles/resolve_roles.py --role
|
|
20
|
+
python3 <plugin-root>/scripts/roles/resolve_roles.py --role orchestrator --model <model> [--effort <effort>]
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
Resolve `<plugin-root>` from this skill's installed path. Omit flags the user
|
|
24
|
+
did not specify. The local model catalog is advisory; the current native tool
|
|
25
|
+
is authoritative about supported model and effort values.
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
its stale warning. Otherwise resolve the problem or obtain a valid explicit
|
|
32
|
-
choice before task creation. Native creation failures retain normal TaskChef
|
|
33
|
-
failure reporting. A preparation without role fields supports historical
|
|
34
|
-
installations: check role files before deciding that no preferences exist.
|
|
35
|
-
|
|
36
|
-
Only model and effort are adapted. The native agent file's instructions, tools,
|
|
37
|
-
permissions, and other settings are not applied by create-task arguments. A
|
|
38
|
-
role name in a title is not a native role selector. If the native interface adds
|
|
39
|
-
a role selector, use it only with verified effective settings.
|
|
40
|
-
|
|
41
|
-
For a plan-to-implementation handoff, a planner assignment can save
|
|
42
|
-
`plans/addition.md` describing a pure addition function and the acceptance
|
|
43
|
-
example `2 + 3 = 5`. A later implementer assignment reads that exact plan,
|
|
44
|
-
implements the function, runs the example, and uses fresh reviewer subagents.
|
|
45
|
-
The dispatcher returns after each creation; it does not wait for or launch
|
|
46
|
-
subsequent phases automatically. A small addition change can instead go
|
|
47
|
-
straight to the implementer.
|
|
48
|
-
|
|
49
|
-
A single assignment that asks to plan and then execute is an implementation
|
|
50
|
-
assignment. Use the implementer model for that whole task; do not switch models
|
|
51
|
-
mid-turn. To apply both configured roles, dispatch a planner task first, wait
|
|
52
|
-
for its saved plan, then dispatch a separate implementer task using that plan.
|
|
27
|
+
The visible executor resolves Planner, Implementer, and Reviewer preferences
|
|
28
|
+
itself when it starts those subagents. The dispatcher does not create or wait
|
|
29
|
+
for those children.
|
|
@@ -60,6 +60,40 @@ UUID is the lifecycle identity. Retry a possibly lost working callback with the
|
|
|
60
60
|
same `turnRef`; never generate a replacement for the same prompt or bypass a
|
|
61
61
|
link-pending state.
|
|
62
62
|
|
|
63
|
+
## Coordinate the assignment
|
|
64
|
+
|
|
65
|
+
Keep this visible task as the stable owner of the assignment and its follow-ups.
|
|
66
|
+
For repository work, use these tight routes:
|
|
67
|
+
|
|
68
|
+
- An explicit investigate-or-plan-and-implement request starts a fresh Planner,
|
|
69
|
+
then a fresh Implementer, then a fresh Reviewer.
|
|
70
|
+
- A direct implementation request starts a fresh Implementer, then a fresh
|
|
71
|
+
Reviewer; skip the Planner.
|
|
72
|
+
- A later request to implement prior investigation or planning stays in this
|
|
73
|
+
visible task and starts a fresh Implementer, then a fresh Reviewer.
|
|
74
|
+
|
|
75
|
+
Make the Reviewer read-only and cover the complete change. Use the installed
|
|
76
|
+
`$branch-review-subagent-loop` when available or required by repository policy.
|
|
77
|
+
TaskChef tracks only this parent task's lifecycle; do not report child phases or
|
|
78
|
+
identities to TaskChef.
|
|
79
|
+
|
|
80
|
+
Immediately before starting a child, check the Codex agents directory. If it
|
|
81
|
+
contains no TOML files, inherit the parent's model settings without invoking
|
|
82
|
+
Python. Otherwise resolve that role with the packaged resolver and use its
|
|
83
|
+
`subagentOverrides` when valid:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
python3 <plugin-root>/scripts/roles/resolve_roles.py --role <planner|implementer|reviewer>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Resolve `<plugin-root>` from this skill's installed path. Missing configuration
|
|
90
|
+
means inherit the parent's model settings. Surface invalid or unavailable
|
|
91
|
+
configuration instead of silently ignoring it. Give each child only the goal,
|
|
92
|
+
scope, repository or worktree, relevant instructions, and validation expected;
|
|
93
|
+
ask it to return changed files, tests, and blockers. Keep at most one writing
|
|
94
|
+
agent active, verify its result, and use a fresh writer before another review
|
|
95
|
+
when review finds a valid issue.
|
|
96
|
+
|
|
63
97
|
## Finish every execution turn
|
|
64
98
|
|
|
65
99
|
Before ending, call `report_state` with the same `turnRef` and `turnId` values
|