taskchef 5.4.0 → 5.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "Dispatch work from a data-only workspace to visible Codex project tasks.",
5
5
  "author": {
6
6
  "name": "Favo Yang",
package/README.md CHANGED
@@ -123,10 +123,10 @@ Every delegated instruction begins with a unique
123
123
  `<!-- taskchef_id=<UUID> -->` marker followed by a blank line. The valid HTML
124
124
  comment stays invisible in rendered Markdown.
125
125
  If worktree creation does not return a thread ID immediately, TaskChef records
126
- the marked delegation as unresolved, then waits briefly for the durable task.
127
- It prefers a native Codex client-ID resolver when available and otherwise makes
128
- two exact-marker checks during a short bounded window. If it still cannot
129
- identify exactly one task, the recorded marker remains available for recovery.
126
+ the marked delegation as unresolved, then makes at most two exact-marker checks
127
+ during a short bounded window. Candidate reads use one programmatic batch per
128
+ check. If the batch cannot execute or TaskChef cannot identify exactly one
129
+ task, the recorded marker remains available for recovery.
130
130
 
131
131
  ### Ask for a live report
132
132
 
package/SPEC.md CHANGED
@@ -179,11 +179,10 @@ cases.
179
179
  For each assignment, `$taskchef-delegate`:
180
180
 
181
181
  1. runs `dispatch prepare` and native Codex project discovery concurrently;
182
- only when neither a native provisional-ID resolver nor programmatic tool
183
- orchestration is available, it also takes one recent-thread baseline
184
- snapshot in that parallel group. The preparation command resolves the
185
- canonical workspace, loads and validates configured projects, and generates
186
- the full UUID, preparation timestamp, and exact marker in one process
182
+ the preparation command resolves the canonical workspace, loads and
183
+ validates configured projects, and generates the full UUID, preparation
184
+ timestamp, and exact marker in one process; it never takes a pre-creation
185
+ thread snapshot
187
186
  2. selects one unambiguous configured target and matches its exact path against
188
187
  the already-loaded native projects
189
188
  3. prefixes the instruction with the prepared exact
@@ -195,33 +194,31 @@ For each assignment, `$taskchef-delegate`:
195
194
  temporary record file, and requests canonical-workspace write permission on
196
195
  the first attempt when the command sandbox does not allow that path
197
196
  6. when creation returns only a provisional client ID, immediately appends the
198
- marked entry with `threadId: null`, then prefers one native client-ID wait or
199
- resolution call with a 30-second timeout when Codex exposes one
200
- 7. when no native operation is available, excludes durable Codex IDs from the
201
- successful pre-creation baseline, then takes at most two recent-thread
197
+ marked entry with `threadId: null`; the current supported Codex surface has
198
+ no provisional-ID resolver, so the skill performs no post-creation tool
199
+ availability inspection
200
+ 7. takes at most two recent-thread
202
201
  snapshots on a nominal 10- and 30-second schedule after the provisional
203
202
  result; a late first checkpoint runs immediately, and the second starts at
204
203
  least 20 seconds after the first actually started. It filters candidates by
205
204
  available host/project/time/worktree metadata, uses title only as an advisory
206
- ordering hint, batches independent reads programmatically when supported,
207
- and accepts only one thread whose structured delegated input starts with the
208
- exact marker
205
+ ordering hint, issues all independent candidate reads in exactly one
206
+ programmatic batch per snapshot, and accepts only one thread whose structured
207
+ delegated input starts with the exact marker; inability to execute that
208
+ required batch leaves the nullable record unresolved instead of switching to
209
+ serial reads
209
210
  8. atomically fills the nullable thread ID after an exact match
210
211
  9. returns after recording or after reporting that bounded resolution was
211
212
  unresolved, without waiting for executor work completion.
212
213
 
213
- The exact random marker remains the sole correlation proof. A successful
214
- pre-creation snapshot is only a candidate-elimination baseline; its failure
215
- does not block creation or weaken the marker check. Creation-time filtering
216
- allows five seconds of clock skew. Candidate reads run concurrently where the
217
- host permits, use one programmatic batch when available, and inspect only
214
+ The exact random marker remains the sole correlation proof. Creation-time
215
+ filtering allows five seconds of clock skew. Candidate reads use exactly one
216
+ programmatic batch per snapshot and inspect only
218
217
  structured `codexDelegation.input`, never untrusted title, summary, preview, or
219
- plain-text marker echoes. A native resolver result is verified against the same
220
- structured
221
- marker before persistence. Zero exact matches remain unresolved; multiple exact
222
- matches are ambiguous. Snapshot, candidate-read, native-resolution, or
223
- task-resolution errors leave the already-recorded nullable entry intact. The
224
- fallback is bounded by two snapshots rather than an absolute wall-clock cutoff:
218
+ plain-text marker echoes. Zero exact matches remain unresolved; multiple exact
219
+ matches are ambiguous. Snapshot, candidate-read, or task-resolution errors
220
+ leave the already-recorded nullable entry intact. The workflow is bounded by
221
+ two snapshots rather than an absolute wall-clock cutoff:
225
222
  mandatory recording or tool latency can shift both attempts later, but cannot
226
223
  erase an attempt or reduce the minimum 20-second interval between their start
227
224
  times.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "A non-blocking interactive dispatcher for visible Codex tasks.",
5
5
  "license": "MIT",
6
6
  "author": "Favo Yang",
@@ -21,27 +21,22 @@ for all deterministic workspace and task-record operations.
21
21
  - Never use hooks, callbacks, schedules, daemons, indefinite polling, or
22
22
  background monitors.
23
23
  - Use only bounded provisional-ID resolution after `create_thread` returns a
24
- provisional client ID. Prefer a native Codex wait or resolver when available.
24
+ provisional client ID. Use the fixed marker-based workflow below.
25
25
  - Never wait for delegated work after executor creation.
26
26
  - Never collect transcripts or hidden reasoning.
27
27
 
28
28
  ## Dispatch
29
29
 
30
- 1. In parallel, run `<plugin-root>/bin/taskchef.js dispatch prepare --json`,
31
- list the native Codex projects once, and, only when neither a dedicated
32
- provisional-ID resolver nor programmatic tool orchestration is available,
33
- take one pre-creation `list_threads` snapshot with limit 50. Do not add this
34
- snapshot when candidate reads can be issued in one programmatic batch. The
35
- prepare command resolves the
30
+ 1. In parallel, run `<plugin-root>/bin/taskchef.js dispatch prepare --json`
31
+ and list the native Codex projects once. The prepare command resolves the
36
32
  canonical workspace, loads and validates the configured routing targets,
37
33
  generates the lowercase full UUID task ID, and returns `preparedAt` plus the
38
34
  exact first-line marker. Use
39
35
  `$taskchef-bootstrap` if the workspace is missing or unhealthy.
40
36
  The CLI resolves `--workspace`, then `TASKCHEF_WORKSPACE`, then
41
37
  `~/.agents/taskchef`; do not substitute the current project. Reject the
42
- dispatcher workspace itself as a target. From the pre-creation snapshot,
43
- retain only durable Codex thread IDs as a candidate-elimination baseline.
44
- Snapshot failure must not block creation; continue without a baseline.
38
+ dispatcher workspace itself as a target. Never take a pre-creation thread
39
+ snapshot.
45
40
  2. Split the request into the smallest independently useful outcomes. Include
46
41
  constraints, expected testing, and reporting in every instruction.
47
42
  3. Classify against configured `name`, every URL in the `githubRepos` list, and
@@ -61,8 +56,7 @@ for all deterministic workspace and task-record operations.
61
56
  exactly `<!-- taskchef_id=<full UUID> -->` as the first line, followed by a
62
57
  blank line and the instruction body. Preserve this
63
58
  marked instruction for recording, and note the creation time. The exact
64
- random marker remains the sole correlation proof; the pre-creation IDs only
65
- eliminate threads that already existed.
59
+ random marker is the sole correlation proof.
66
60
  6. Create one real Codex task using the exact configured project, a local
67
61
  environment on its executor host, the marked instruction, and a short title.
68
62
  7. When `create_thread` returns a durable `threadId`, immediately run
@@ -83,13 +77,10 @@ for all deterministic workspace and task-record operations.
83
77
  Immediately record the marked instruction with `threadId: null` using the
84
78
  command from step 7, then resolve the durable ID with this bounded workflow:
85
79
 
86
- - If the current Codex tool surface provides a dedicated operation that
87
- accepts the provisional ID and waits for or resolves its durable thread
88
- ID, call it exactly once with a timeout of at most 30 seconds. Do not invent
89
- an operation or pass the provisional ID to tools that require `threadId`.
90
- - When no native operation is available, take at most two post-creation
91
- `list_threads` snapshots with limit 50. Exclude every durable Codex ID from
92
- the successful pre-creation baseline before reading candidates. The
80
+ - The supported Codex surface has no provisional-ID resolver. Do not inspect
81
+ the tool surface for one after creation and do not pass the provisional ID
82
+ to tools that require `threadId`.
83
+ - Take at most two post-creation `list_threads` snapshots with limit 50. The
93
84
  nominal schedule is 10 and 30 seconds after
94
85
  the provisional result. Treat the first checkpoint as due, not expired: if
95
86
  nullable recording or other required work finishes after 10 seconds, take
@@ -103,9 +94,11 @@ for all deterministic workspace and task-record operations.
103
94
  those fields are present. Use the title only to prioritize reads; Codex
104
95
  may normalize it, so never exclude a candidate because its title differs.
105
96
  - Read every remaining candidate with `read_thread`, requesting one turn and
106
- no command output. Read candidates concurrently when the tool surface
107
- permits; when programmatic tool orchestration is available, issue the
108
- independent reads together in one programmatic batch. Inspect only the
97
+ no command output. Issue all independent reads together in exactly one
98
+ programmatic batch per snapshot. Do not probe for batching support and do
99
+ not fall back to serial tool-call round trips. When the required batch
100
+ cannot be executed, preserve the nullable record as unresolved. Inspect
101
+ only the
109
102
  structured
110
103
  `userMessage.content[].codexDelegation.input`; do not trust titles,
111
104
  summaries, previews, plain-text echoes, or assistant output as proof.
@@ -113,13 +106,11 @@ for all deterministic workspace and task-record operations.
113
106
  the task's `<!-- taskchef_id=<full UUID> -->` marker and exactly one
114
107
  candidate matches. Require an immediately following blank line. Reject old
115
108
  heading-style markers, malformed comments, missing blank separators, and
116
- marker-like text anywhere else. Apply the same marker verification to a
117
- thread ID returned by a native resolver. Reject any returned or discovered
118
- thread ID equal to the provisional identifier or in its `local:` namespace.
119
- Then use
109
+ marker-like text anywhere else. Reject any discovered thread ID equal to
110
+ the provisional identifier or in its `local:` namespace. Then use
120
111
  the task-resolution command under **Later resolution** to atomically fill
121
112
  the nullable field.
122
- - Treat native-resolution, snapshot, candidate-read, wait, and task-resolution
113
+ - Treat snapshot, candidate-read, wait, and task-resolution
123
114
  failures as indeterminate. If the workflow ends with zero exact matches,
124
115
  multiple matches, or errors, leave the already-recorded `threadId: null`,
125
116
  clearly report the unresolved reason and provisional diagnostic ID, and
package/src/delegation.js CHANGED
@@ -250,7 +250,6 @@ export async function createAndRecordDelegation({
250
250
  recordTask,
251
251
  resolveRecordedTask = null,
252
252
  resolveProvisionalThread = null,
253
- baselineThreadIds = new Set(),
254
253
  taskId = randomUUID(),
255
254
  checkpointsMs = THREAD_RESOLUTION_CHECKPOINTS_MS,
256
255
  timeoutMs = THREAD_RESOLUTION_TIMEOUT_MS,
@@ -275,9 +274,6 @@ export async function createAndRecordDelegation({
275
274
  if (resolveRecordedTask !== null && typeof resolveRecordedTask !== "function") {
276
275
  throw new Error("resolveRecordedTask must be a function or null");
277
276
  }
278
- if (!(baselineThreadIds instanceof Set)) {
279
- throw new Error("baselineThreadIds must be a Set");
280
- }
281
277
  validateResolutionSchedule(checkpointsMs, timeoutMs);
282
278
 
283
279
  const prepared = prepareDelegation(instruction, { taskId });
@@ -511,7 +507,6 @@ export async function createAndRecordDelegation({
511
507
  try {
512
508
  const snapshot = await listThreads({ limit: recentLimit });
513
509
  candidates = filterThreadCandidates(snapshot, {
514
- baselineThreadIds,
515
510
  excludedThreadIds: provisionalIds,
516
511
  hostId: expected.hostId ?? null,
517
512
  projectId: expected.projectId ?? target.projectId ?? null,