taskchef 5.7.2 → 5.9.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "5.7.2",
3
+ "version": "5.9.0",
4
4
  "description": "Dispatch work from a data-only workspace to visible Codex project tasks.",
5
5
  "author": {
6
6
  "name": "Favo Yang",
@@ -20,7 +20,7 @@
20
20
  "interface": {
21
21
  "displayName": "TaskChef",
22
22
  "shortDescription": "Dispatch work to the right Codex project task.",
23
- "longDescription": "Route actionable requests to independently openable Codex project tasks, keep an append-only task history, and query live reports on demand.",
23
+ "longDescription": "Route work to visible Codex project tasks, cache their latest semantic result, and query fresh reports on demand.",
24
24
  "developerName": "Favo Yang",
25
25
  "category": "Productivity",
26
26
  "capabilities": [
package/BACKLOG.md CHANGED
@@ -50,7 +50,7 @@ clear data model before implementation.
50
50
  `resolve_client_thread(clientThreadId) -> { status, threadId? }`. Returning a
51
51
  reserved durable ID from `create_thread`, or emitting a materialization event
52
52
  containing it, would also close the lifecycle gap.
53
- - Re-evaluate TaskChef's sparse marker-discovery fallback when Codex exposes
54
- one of these APIs. Keep exact marker verification before persisting the
55
- returned durable ID unless the official contract provides equivalent
56
- correlation guarantees.
53
+ - Re-evaluate whether the initial-hook identity link and exact-marker manual
54
+ recovery can be simplified when Codex exposes one of these APIs. Keep exact
55
+ correlation verification before persisting the returned durable ID unless
56
+ the official contract provides equivalent guarantees.
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Bring work for all your local Codex projects to one inbox. TaskChef reads each
4
4
  request, chooses the right project, and opens a normal Codex task there. It
5
- keeps a task history so you can find the work later. The created Codex tasks
6
- remain the source of truth for progress and results.
5
+ keeps a task history plus the executor's latest semantic result so you can find
6
+ the work later. Codex task state remains authoritative for current activity.
7
7
 
8
8
  If a request contains independent work for different projects, TaskChef can
9
9
  open several tasks. It returns as soon as they are created, so you can send the
@@ -28,13 +28,15 @@ request in dispatcher
28
28
  +-- task entry --> executor in project B
29
29
  ```
30
30
 
31
- TaskChef does not copy executor results into its workspace. When you ask for a
32
- report, it reads the recorded task IDs, checks those Codex tasks once, and
33
- shows their current state without saving another snapshot.
31
+ Executors report a compact `completed`, `needs_input`, or `failed` result into
32
+ their existing task entry. When you ask for a report, TaskChef filters old
33
+ terminal work and checks cheap live metadata once for every selected task.
34
+ Active or approval-waiting metadata overrides the cache immediately; idle MCP
35
+ results are trusted by default, with detailed reads reserved for anomalies. It
36
+ never infers completion from hook events.
34
37
 
35
- See [Delegation design](docs/delegation-design.md) for the complete illustrated
36
- workflow, durable and provisional-ID examples, safety invariants, and measured
37
- CLI-versus-MCP latency comparison.
38
+ See [Delegation design](docs/delegation-design.md) for the illustrated workflow,
39
+ writer boundaries, locking, trust model, freshness rules, and follow-up example.
38
40
 
39
41
  ## Quickstart
40
42
 
@@ -50,6 +52,12 @@ codex plugin marketplace add favoyang/codex-plugins
50
52
  codex plugin add taskchef@favoyang-plugins
51
53
  ```
52
54
 
55
+ In a new Codex task, run `/hooks`, review the TaskChef hook, and trust it. Codex
56
+ skips new or changed plugin hooks until you approve their current definition,
57
+ so repeat this review after an update changes the hook. TaskChef uses this hook
58
+ to link the marked initial executor prompt and to provide read-only current-turn
59
+ identity on later prompts in that same executor. It never writes task outcomes.
60
+
53
61
  ### 2. Bootstrap the dispatcher workspace
54
62
 
55
63
  Invoke the bootstrap skill from any Codex project:
@@ -122,21 +130,19 @@ the same project.
122
130
  Open an executor and prompt it like any other Codex task. Its thread is the
123
131
  live source of truth for progress, questions, and results.
124
132
 
125
- The dispatcher workspace keeps `tasks.jsonl`, a history of submitted
126
- delegations. New tasks are appended; the only later change allowed is filling
127
- an unresolved task's nullable thread ID. The log records what TaskChef sent,
128
- when it sent it, which project it selected, and which Codex task received the
129
- work.
133
+ The dispatcher workspace keeps `tasks.jsonl`, one line per submitted
134
+ delegation. New tasks are appended. Later locked atomic updates may fill the
135
+ nullable thread ID and replace the task's latest status, summary, turn ID,
136
+ timestamp, and writer. There is no transition-event log.
130
137
 
131
138
  Every delegated instruction begins with a unique
132
139
  `<!-- taskchef_id=<UUID> -->` marker followed by a blank line, an
133
- executor-ownership paragraph, another blank line, and the assignment. The
140
+ executor-ownership paragraph, a result-callback paragraph, and the assignment. The
134
141
  valid HTML comment stays invisible in rendered Markdown.
135
- If worktree creation does not return a thread ID immediately, TaskChef records
136
- the marked delegation as unresolved, then makes at most two exact-marker checks
137
- during a short bounded window. Candidate reads use one programmatic batch per
138
- check. If the batch cannot execute or TaskChef cannot identify exactly one
139
- task, the recorded marker remains available for recovery.
142
+ TaskChef records the marked delegation before executor creation. If creation
143
+ does not return a durable thread ID, the trusted initial-prompt hook receives
144
+ the root session ID and atomically links it to the existing entry. Delegation
145
+ does not wait, poll, list tasks, or retry discovery.
140
146
 
141
147
  ### Ask for a live report
142
148
 
@@ -146,9 +152,62 @@ Ask the dispatcher when you want a current overview:
146
152
  Report on the work TaskChef has dispatched.
147
153
  ```
148
154
 
149
- This runs `$taskchef-report`. It reads the task history, checks the relevant
150
- Codex tasks once, and reports their current states and outcomes. Nothing is
151
- written back to the log, and TaskChef does not keep polling after the report.
155
+ This runs `$taskchef-report`. Overviews always consider working, needs-input,
156
+ unresolved, legacy, and terminal tasks changed in the last seven days. Older
157
+ terminal tasks are skipped unless requested or live metadata shows that they
158
+ are active or awaiting approval. Cached MCP results are trusted for idle tasks
159
+ in broad overviews. Active or approval-waiting tasks are reported directly from
160
+ the one broad metadata snapshot. Focused reports read a selected idle task once
161
+ when its metadata is newer than the callback; missing callbacks and other
162
+ anomalies also receive at most one targeted read. Reporting writes nothing and
163
+ never polls.
164
+
165
+ ### Watch the local dashboard
166
+
167
+ Run a local dashboard when you want the task history to remain visible while
168
+ executors report results:
169
+
170
+ ```sh
171
+ taskchef dashboard
172
+ ```
173
+
174
+ Open the printed capability URL, which starts with `http://127.0.0.1:3210` and
175
+ contains a one-time launch token. Do not share it: the browser exchanges it for
176
+ a local session cookie before loading task data, then removes the token from the
177
+ address bar. Use `--port <number>` to choose another port and `--workspace
178
+ <path>` to override the normal workspace resolution. Press Ctrl+C in the
179
+ terminal to stop the server.
180
+
181
+ The dashboard:
182
+
183
+ - orders tasks by their latest semantic or identity update;
184
+ - filters by project and status;
185
+ - shows dismissible notifications when tasks are added or changed;
186
+ - reveals the original instruction, latest semantic result, and task metadata;
187
+ - opens a task's project in Codex on request, while preserving the recorded
188
+ thread ID for manual task selection.
189
+
190
+ The server binds only to the numeric IPv4 loopback interface, requires the
191
+ unguessable launch capability before serving instructions or results, validates
192
+ the same task schema as the CLI, retains its last valid snapshot if the log
193
+ becomes invalid, and never writes dispatcher-workspace files. It limits event
194
+ streams and disconnects slow clients instead of buffering snapshots without
195
+ bound. It watches the workspace directory
196
+ so TaskChef's atomic log replacement remains visible, uses a low-frequency file
197
+ metadata check to recover from missed watcher events, and streams snapshots to
198
+ the browser with automatic reconnect. To keep untrusted history from exhausting
199
+ the server or browser, the dashboard rejects logs above 16 MiB, histories above
200
+ 2,000 tasks, and unusually large display fields while retaining the last valid
201
+ snapshot. The data CLI remains unaffected by these display limits.
202
+
203
+ Direct desktop navigation to a recorded thread is not exposed by the supported
204
+ `codex app` CLI, which accepts only a workspace path. A task-level refresh would
205
+ require native Codex metadata tools that are available to the report skill, not
206
+ to a standalone browser page. TaskChef also does not submit replies from the
207
+ dashboard: `codex resume <session> [prompt]` starts an interactive CLI session
208
+ and may execute the prompt immediately, rather than opening a reviewed draft in
209
+ the desktop app. These integrations remain deferred until Codex provides a
210
+ stable task deep link or explicit draft handoff.
152
211
 
153
212
  ### Manage configured projects
154
213
 
@@ -177,17 +236,19 @@ project metadata that TaskChef used when it delegated the work.
177
236
 
178
237
  ## Important boundaries
179
238
 
180
- - TaskChef is an interactive dispatcher. It is not a scheduler, daemon, hook
181
- service, or background worker.
182
- - Executors are visible Codex tasks. The dispatcher may wait briefly to resolve
183
- a worktree task's thread ID, but it does not supervise executors or wait for
184
- them to finish.
239
+ - TaskChef is an interactive dispatcher, not a scheduler, daemon, or background
240
+ worker. Its single lifecycle hook writes initial executor identity, then only
241
+ provides read-only current-turn context on follow-up prompts.
242
+ - Executors are visible Codex tasks. The dispatcher does not supervise them or
243
+ wait for them to finish.
185
244
  - TaskChef routes only to projects on the same local execution host.
186
- - The task history contains successful delegations, not current task status or
187
- task results.
245
+ - Each task line contains the latest reported semantic result, not a complete
246
+ lifecycle or event history.
188
247
  - TaskChef does not store executor transcripts, hidden reasoning, or `hostId`.
189
- - A live report is a one-time read of recorded Codex tasks. TaskChef discards
190
- the fetched state after presenting it.
248
+ - A live report uses one metadata snapshot for all selected tasks and
249
+ immediately overrides active or approval-waiting state. Broad overviews stay
250
+ cache-first; focused reports read selected idle tasks once when metadata is
251
+ newer than the callback. Reporting never persists inferred live state.
191
252
 
192
253
  ## Updating
193
254
 
@@ -245,7 +306,9 @@ taskchef task summary
245
306
 
246
307
  Workspace resolution is deterministic: `--workspace <path>`, then the
247
308
  `TASKCHEF_WORKSPACE` environment variable, then `~/.agents/taskchef`. The
248
- current directory is never an implicit workspace. Data commands use concise
309
+ environment override must be absolute (or start with `~/`) so plugin processes
310
+ with different working directories resolve the same workspace. The current
311
+ directory is never an implicit workspace. Data commands use concise
249
312
  human-readable output by default and accept `--json` for machine-readable
250
313
  output. Run `taskchef help` for every option.
251
314
 
@@ -345,7 +408,7 @@ The current configuration schema is version 2. Version 1 remains readable:
345
408
  legacy `githubRepo: null` normalizes to `githubRepos: []`, and a legacy string
346
409
  normalizes to a one-item `githubRepos` list. `workspace init` persists this
347
410
  migration atomically; other configuration writes also emit version 2. Legacy
348
- task lines remain readable without an eager rewrite of the append-only history.
411
+ task lines remain readable without an eager rewrite of the JSONL history.
349
412
 
350
413
  ### Task history
351
414
 
@@ -353,16 +416,15 @@ task lines remain readable without an eager rewrite of the append-only history.
353
416
  `project` value is the exact configured project path:
354
417
 
355
418
  ```sh
356
- printf '%s\n' '{"id":"c0f010ff-84f2-4838-a69d-0ff1f5d721d7","project":"/workspace/payments","title":"Add retry logs","instruction":"<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nThis task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.\n\nAdd structured logs for failed retries and test them.","threadId":"019f..."}' |
419
+ printf '%s\n' '{"id":"c0f010ff-84f2-4838-a69d-0ff1f5d721d7","project":"/workspace/payments","title":"Add retry logs","instruction":"<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nThis task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.\n\nBefore ending, call the TaskChef report_result MCP tool with completed, needs_input, or failed and a concise summary. Use needs_input only for a semantic decision or information the user must provide; a native approval prompt is live Codex state, not a TaskChef result. Do not include secrets, transcripts, or raw command output.\n\nAdd structured logs for failed retries and test them.","threadId":"019f..."}' |
357
420
  taskchef task record --json
358
421
  ```
359
422
 
360
- If a task has `threadId: null`, a later Codex workflow can find its exact
361
- marker and pass the verified durable ID through its prescribed interface. The
362
- delegate skill uses the MCP `resolve_task` tool during bounded post-creation
363
- recovery; the report skill and direct manual recovery use the equivalent CLI
364
- operation below. Both reach the same atomic logic, which permits only the
365
- one-way transition from null to one unique thread ID:
423
+ If a task has `threadId: null`, the initial plugin hook normally resolves its
424
+ exact marker to the root session ID. Direct manual recovery may use the
425
+ equivalent CLI operation below after verifying one exact structured marker
426
+ match. Both hook and CLI reach the same locked atomic logic, which permits only
427
+ the one-way transition from null to one unique thread ID:
366
428
 
367
429
  ```sh
368
430
  taskchef task resolve c0f010ff-84f2-4838-a69d-0ff1f5d721d7 \
@@ -392,8 +454,8 @@ the complete values in `--json` output, and the selected order applies to its
392
454
  `task show` accepts either the full task ID or the exact eight-character task
393
455
  ID printed by the default human-readable list. A short ID must identify exactly
394
456
  one recorded task; use `task list --full-id` when a short ID is missing or
395
- ambiguous. Its default output labels the title, project name and path, creation
396
- time, full task and thread IDs, and instruction. A null thread ID appears as
457
+ ambiguous. Its default output labels the title, project, latest result fields,
458
+ creation and update times, task/thread/turn IDs, and instruction. A null thread ID appears as
397
459
  `-`. Line breaks in labeled values are escaped as `\\r` and `\\n`, while
398
460
  multiline instructions retain their original line breaks and indentation. Pass
399
461
  `--json` to receive the unchanged complete task object.
@@ -401,32 +463,50 @@ multiline instructions retain their original line breaks and indentation. Pass
401
463
  ```text
402
464
  Title: Add retry logs
403
465
  Project: payments
466
+ Status: completed
467
+ Summary: Added structured retry logs and regression coverage.
404
468
  Project path: /workspace/payments
405
469
  Created: 2026-08-12T10:00:00.000Z
470
+ Updated: 2026-08-12T10:08:00.000Z
471
+ Updated by: mcp
406
472
  Task ID: c0f010ff-84f2-4838-a69d-0ff1f5d721d7
407
473
  Thread ID: 019f9d46-f42c-7482-9707-3c107bf241ee
474
+ Turn ID: 019f9d47-result-turn
408
475
  Instruction:
409
476
  <!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->
410
477
 
411
478
  This task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.
412
479
 
480
+ Before ending, call the TaskChef report_result MCP tool with completed, needs_input, or failed and a concise summary. Use needs_input only for a semantic decision or information the user must provide; a native approval prompt is live Codex state, not a TaskChef result. Do not include secrets, transcripts, or raw command output.
481
+
413
482
  Add structured logs for failed payment retries and test them.
414
483
  ```
415
484
 
416
485
  The list remains a compact table:
417
486
 
418
487
  ```text
419
- TITLE PROJECT CREATED ID THREAD ID
420
- Add retry logs payments 2026-08-12T10:00:00.000Z c0f010ff 019f9d46
488
+ TITLE PROJECT STATUS UPDATED ID THREAD ID
489
+ Add retry logs payments completed 2026-08-12T10:08:00.000Z c0f010ff 019f9d46
421
490
  ```
422
491
 
423
492
  The complete data contract is in [SPEC.md](SPEC.md). The illustrated runtime
424
- workflow and latency analysis are in
493
+ workflow, writer boundaries, and freshness rules are in
425
494
  [Delegation design](docs/delegation-design.md). Deferred ideas are in
426
495
  [BACKLOG.md](BACKLOG.md).
427
496
 
428
497
  ## Development and release
429
498
 
499
+ This result-callback redesign changes the public
500
+ `createAndRecordDelegation` contract from post-creation thread discovery to
501
+ record-before-create plus hook resolution. Release it as a new major version.
502
+ Library callers migrating from TaskChef 5.x should remove `listThreads`,
503
+ `readThread`, checkpoint, and timeout arguments; provide `recordTask` before
504
+ creation and optional `resolveRecordedTask` and `reportRecordedResult`
505
+ callbacks instead. The old pure thread-inspection exports remain temporarily
506
+ available as deprecated compatibility helpers, but TaskChef no longer calls
507
+ them. Creation errors expose `taskChefTaskId` and `taskChefResultReporting` so
508
+ library callers can recover a record when the failure callback was unavailable.
509
+
430
510
  ```sh
431
511
  npm test
432
512
  npm pack --dry-run