taskchef 5.5.2 → 5.7.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.5.2",
3
+ "version": "5.7.0",
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
@@ -237,15 +237,16 @@ taskchef project remove <name>
237
237
  taskchef dispatch prepare
238
238
  taskchef task record
239
239
  taskchef task resolve <task-id> --thread-id <thread-id>
240
- taskchef task show <task-id>
240
+ taskchef task show <task-id-or-8-character-prefix>
241
241
  taskchef task list
242
242
  taskchef task summary
243
243
  ```
244
244
 
245
245
  Workspace resolution is deterministic: `--workspace <path>`, then the
246
246
  `TASKCHEF_WORKSPACE` environment variable, then `~/.agents/taskchef`. The
247
- current directory is never an implicit workspace. Data commands accept
248
- `--json` for machine-readable output. Run `taskchef help` for every option.
247
+ current directory is never an implicit workspace. Data commands use concise
248
+ human-readable output by default and accept `--json` for machine-readable
249
+ output. Run `taskchef help` for every option.
249
250
 
250
251
  `taskchef dispatch prepare --json` is the CLI equivalent of the MCP
251
252
  `prepare_dispatch` operation: it resolves the canonical workspace, loads and
@@ -370,7 +371,8 @@ taskchef task resolve c0f010ff-84f2-4838-a69d-0ff1f5d721d7 \
370
371
  Inspect the task history without querying Codex tasks:
371
372
 
372
373
  ```sh
373
- taskchef task show t1
374
+ taskchef task show c0f010ff
375
+ taskchef task show c0f010ff --json
374
376
  taskchef task list
375
377
  taskchef task list --project payments
376
378
  taskchef task list --ascending
@@ -386,6 +388,29 @@ with other empty table cells. Tasks are newest-first by default; pass
386
388
  the complete values in `--json` output, and the selected order applies to its
387
389
  `tasks` array.
388
390
 
391
+ `task show` accepts either the full task ID or the exact eight-character task
392
+ ID printed by the default human-readable list. A short ID must identify exactly
393
+ one recorded task; use `task list --full-id` when a short ID is missing or
394
+ ambiguous. Its default output labels the title, project name and path, creation
395
+ time, full task and thread IDs, and instruction. A null thread ID appears as
396
+ `-`, and multiline instructions retain their original line breaks and
397
+ indentation. Pass `--json` to receive the unchanged complete task object.
398
+
399
+ ```text
400
+ Title: Add retry logs
401
+ Project: payments
402
+ Project path: /workspace/payments
403
+ Created: 2026-08-12T10:00:00.000Z
404
+ Task ID: c0f010ff-84f2-4838-a69d-0ff1f5d721d7
405
+ Thread ID: 019f9d46-f42c-7482-9707-3c107bf241ee
406
+ Instruction:
407
+ <!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->
408
+
409
+ Add structured logs for failed payment retries and test them.
410
+ ```
411
+
412
+ The list remains a compact table:
413
+
389
414
  ```text
390
415
  TITLE PROJECT CREATED ID THREAD ID
391
416
  Add retry logs payments 2026-08-12T10:00:00.000Z c0f010ff 019f9d46
package/SPEC.md CHANGED
@@ -296,7 +296,15 @@ it was not recorded.
296
296
 
297
297
  The CLI reads persisted history without contacting Codex:
298
298
 
299
- - `task show <id>` returns one entry.
299
+ - `task show <id-or-8-character-prefix>` returns one entry. By default it emits
300
+ labeled human-readable lines for title, project name and path, creation time,
301
+ full task ID, thread ID, and instruction. A null thread ID renders as `-`.
302
+ The instruction starts on the line after `Instruction:` and retains its
303
+ stored line breaks and indentation. `--json` returns the unchanged complete
304
+ task object. The short form is the exact ID text printed by the default
305
+ human-readable `task list` output and succeeds only when it identifies
306
+ exactly one recorded task. Missing, ambiguous, malformed, shorter, and
307
+ wrong-case prefixes fail without selecting a task.
300
308
  - `task list` returns entries newest-first by creation time, optionally filtered
301
309
  by historical project name or exact path. `--ascending` returns oldest-first.
302
310
  Human rows include task and thread ID columns, abbreviating UUID-shaped IDs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "5.5.2",
3
+ "version": "5.7.0",
4
4
  "description": "A non-blocking interactive dispatcher for visible Codex tasks.",
5
5
  "license": "MIT",
6
6
  "author": "Favo Yang",
package/src/cli.js CHANGED
@@ -12,10 +12,11 @@ import {
12
12
  importProjects,
13
13
  initializeWorkspace,
14
14
  listProjects,
15
+ listTasks,
15
16
  prepareDispatch,
16
- readTask,
17
17
  recordTask,
18
18
  removeProject,
19
+ requireSafeId,
19
20
  resolveTask,
20
21
  } from "./workspace.js";
21
22
 
@@ -160,6 +161,52 @@ function displayId(value, fullId) {
160
161
  return uuidSection ? uuidSection[0] : value;
161
162
  }
162
163
 
164
+ function taskDetails(task) {
165
+ return [
166
+ `Title: ${task.title}`,
167
+ `Project: ${task.project.name}`,
168
+ `Project path: ${task.project.path}`,
169
+ `Created: ${task.createdAt}`,
170
+ `Task ID: ${task.id}`,
171
+ `Thread ID: ${task.threadId ?? "-"}`,
172
+ "Instruction:",
173
+ task.instruction,
174
+ ].join("\n");
175
+ }
176
+
177
+ async function readTaskForShow(workspace, taskId) {
178
+ const id = requireSafeId(taskId, "taskId");
179
+ const tasks = await listTasks(workspace);
180
+ if (!/^[0-9a-fA-F]{8}$/.test(id)) {
181
+ const exact = tasks.find((task) => task.id === id);
182
+ if (exact) return exact;
183
+ if (id.length < 8) {
184
+ throw new Error(
185
+ `task ID prefix is too short: ${id}; use all 8 characters shown by taskchef task list`,
186
+ );
187
+ }
188
+ if (id.length === 8) {
189
+ throw new Error(
190
+ `malformed task ID prefix: ${id}; use the 8 hexadecimal characters shown by taskchef task list`,
191
+ );
192
+ }
193
+ throw new Error(`task not found: ${id}`);
194
+ }
195
+
196
+ const matches = tasks.filter((task) => displayId(task.id, false) === id);
197
+ if (matches.length === 0) {
198
+ throw new Error(
199
+ `task not found for ID prefix: ${id}; run taskchef task list --full-id to verify the task ID`,
200
+ );
201
+ }
202
+ if (matches.length > 1) {
203
+ throw new Error(
204
+ `task ID prefix is ambiguous: ${id}; run taskchef task list --full-id and pass the full task ID`,
205
+ );
206
+ }
207
+ return matches[0];
208
+ }
209
+
163
210
  async function initialize(args) {
164
211
  validateCommandArgs(args, 2, {
165
212
  values: ["--workspace", "--codex-cli"],
@@ -314,7 +361,7 @@ async function taskResolve(args) {
314
361
 
315
362
  async function taskShow(args) {
316
363
  validateCommandArgs(args, 3, { values: ["--workspace"], switches: ["--json"] });
317
- print(await readTask(workspaceRoot(args), args[2]), args);
364
+ print(await readTaskForShow(workspaceRoot(args), args[2]), args, taskDetails);
318
365
  return 0;
319
366
  }
320
367
 
@@ -367,11 +414,13 @@ Usage:
367
414
  taskchef dispatch prepare [--json] [--workspace <path>]
368
415
  taskchef task record [--json] [--workspace <path>]
369
416
  taskchef task resolve <task-id> --thread-id <thread-id> [--json] [--workspace <path>]
370
- taskchef task show <task-id> [--json] [--workspace <path>]
417
+ taskchef task show <task-id-or-8-character-prefix> [--json] [--workspace <path>]
371
418
  taskchef task list [--project <name-or-path>] [--ascending] [--full-id] [--json] [--workspace <path>]
372
419
  taskchef task summary [--json] [--workspace <path>]
373
420
 
374
421
  Task record reads one JSON value from closed, non-interactive standard input.
422
+ Task show accepts a full task ID or the exact 8-character ID printed by task list.
423
+ Task show prints human-readable details by default; --json prints the complete task object.
375
424
  Project import reads a JSON
376
425
  array from a file, or from standard input when the source is '-' or omitted.
377
426
  Workspace resolution precedence is --workspace, TASKCHEF_WORKSPACE, then