taskchef 5.5.2 → 5.6.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.
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +6 -3
- package/SPEC.md +4 -1
- package/package.json +1 -1
- package/src/cli.js +38 -3
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ 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
|
```
|
|
@@ -370,7 +370,7 @@ taskchef task resolve c0f010ff-84f2-4838-a69d-0ff1f5d721d7 \
|
|
|
370
370
|
Inspect the task history without querying Codex tasks:
|
|
371
371
|
|
|
372
372
|
```sh
|
|
373
|
-
taskchef task show
|
|
373
|
+
taskchef task show c0f010ff
|
|
374
374
|
taskchef task list
|
|
375
375
|
taskchef task list --project payments
|
|
376
376
|
taskchef task list --ascending
|
|
@@ -384,7 +384,10 @@ UUID-shaped IDs use their first eight-character section by default; pass
|
|
|
384
384
|
with other empty table cells. Tasks are newest-first by default; pass
|
|
385
385
|
`--ascending` to list them from oldest to newest. ID formatting does not alter
|
|
386
386
|
the complete values in `--json` output, and the selected order applies to its
|
|
387
|
-
`tasks` array.
|
|
387
|
+
`tasks` array. `task show` accepts either the full task ID or the exact
|
|
388
|
+
eight-character task ID printed by the default human-readable list. A short ID
|
|
389
|
+
must identify exactly one recorded task; use `task list --full-id` when a short
|
|
390
|
+
ID is missing or ambiguous.
|
|
388
391
|
|
|
389
392
|
```text
|
|
390
393
|
TITLE PROJECT CREATED ID THREAD ID
|
package/SPEC.md
CHANGED
|
@@ -296,7 +296,10 @@ 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. The short form is
|
|
300
|
+
the exact ID text printed by the default human-readable `task list` output
|
|
301
|
+
and succeeds only when it identifies exactly one recorded task. Missing,
|
|
302
|
+
ambiguous, malformed, and shorter prefixes fail without selecting a task.
|
|
300
303
|
- `task list` returns entries newest-first by creation time, optionally filtered
|
|
301
304
|
by historical project name or exact path. `--ascending` returns oldest-first.
|
|
302
305
|
Human rows include task and thread ID columns, abbreviating UUID-shaped IDs
|
package/package.json
CHANGED
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,39 @@ function displayId(value, fullId) {
|
|
|
160
161
|
return uuidSection ? uuidSection[0] : value;
|
|
161
162
|
}
|
|
162
163
|
|
|
164
|
+
async function readTaskForShow(workspace, taskId) {
|
|
165
|
+
const id = requireSafeId(taskId, "taskId");
|
|
166
|
+
const tasks = await listTasks(workspace);
|
|
167
|
+
if (!/^[0-9a-fA-F]{8}$/.test(id)) {
|
|
168
|
+
const exact = tasks.find((task) => task.id === id);
|
|
169
|
+
if (exact) return exact;
|
|
170
|
+
if (id.length < 8) {
|
|
171
|
+
throw new Error(
|
|
172
|
+
`task ID prefix is too short: ${id}; use all 8 characters shown by taskchef task list`,
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
if (id.length === 8) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
`malformed task ID prefix: ${id}; use the 8 hexadecimal characters shown by taskchef task list`,
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
throw new Error(`task not found: ${id}`);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const matches = tasks.filter((task) => displayId(task.id, false) === id);
|
|
184
|
+
if (matches.length === 0) {
|
|
185
|
+
throw new Error(
|
|
186
|
+
`task not found for ID prefix: ${id}; run taskchef task list --full-id to verify the task ID`,
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
if (matches.length > 1) {
|
|
190
|
+
throw new Error(
|
|
191
|
+
`task ID prefix is ambiguous: ${id}; run taskchef task list --full-id and pass the full task ID`,
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
return matches[0];
|
|
195
|
+
}
|
|
196
|
+
|
|
163
197
|
async function initialize(args) {
|
|
164
198
|
validateCommandArgs(args, 2, {
|
|
165
199
|
values: ["--workspace", "--codex-cli"],
|
|
@@ -314,7 +348,7 @@ async function taskResolve(args) {
|
|
|
314
348
|
|
|
315
349
|
async function taskShow(args) {
|
|
316
350
|
validateCommandArgs(args, 3, { values: ["--workspace"], switches: ["--json"] });
|
|
317
|
-
print(await
|
|
351
|
+
print(await readTaskForShow(workspaceRoot(args), args[2]), args);
|
|
318
352
|
return 0;
|
|
319
353
|
}
|
|
320
354
|
|
|
@@ -367,11 +401,12 @@ Usage:
|
|
|
367
401
|
taskchef dispatch prepare [--json] [--workspace <path>]
|
|
368
402
|
taskchef task record [--json] [--workspace <path>]
|
|
369
403
|
taskchef task resolve <task-id> --thread-id <thread-id> [--json] [--workspace <path>]
|
|
370
|
-
taskchef task show <task-id> [--json] [--workspace <path>]
|
|
404
|
+
taskchef task show <task-id-or-8-character-prefix> [--json] [--workspace <path>]
|
|
371
405
|
taskchef task list [--project <name-or-path>] [--ascending] [--full-id] [--json] [--workspace <path>]
|
|
372
406
|
taskchef task summary [--json] [--workspace <path>]
|
|
373
407
|
|
|
374
408
|
Task record reads one JSON value from closed, non-interactive standard input.
|
|
409
|
+
Task show accepts a full task ID or the exact 8-character ID printed by task list.
|
|
375
410
|
Project import reads a JSON
|
|
376
411
|
array from a file, or from standard input when the source is '-' or omitted.
|
|
377
412
|
Workspace resolution precedence is --workspace, TASKCHEF_WORKSPACE, then
|