taskchef 7.21.0 → 7.21.2
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 +10 -9
- package/docs/spec.md +5 -1
- package/package.json +1 -1
- package/src/dashboard/state.js +11 -1
- package/src/dashboard.js +6 -0
- package/src/workspace.js +3 -3
package/README.md
CHANGED
|
@@ -274,9 +274,9 @@ Task details offer infrequent administrative actions without cluttering task
|
|
|
274
274
|
cards. Selecting **More task actions** (`…`) reveals the action list immediately
|
|
275
275
|
beside the disclosure and changes it to a back/hide control. The list contains
|
|
276
276
|
**Copy Task ID**, direct **Mark completed** and **Mark failed** actions for a
|
|
277
|
-
`working` or `needs_input` task
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
`working` or `needs_input` task. The menu disclosure is the deliberate first
|
|
278
|
+
step; choosing a terminal outcome submits it immediately without a second
|
|
279
|
+
confirmation. There is no
|
|
280
280
|
free-form reason: the audit turn records a fixed summary, timestamp, dashboard
|
|
281
281
|
provenance, optimistic preconditions, and a unique action ID while preserving
|
|
282
282
|
every executor turn. Terminal tasks cannot be rewritten. Stale or concurrent
|
|
@@ -284,12 +284,13 @@ changes are rejected and the dialog refreshes to the current task. A stalled
|
|
|
284
284
|
local request is aborted after a bounded wait so the dialog cannot remain
|
|
285
285
|
permanently locked; retry keeps the same idempotency identity.
|
|
286
286
|
|
|
287
|
-
The
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
287
|
+
The archive implementation is retained behind a disabled capability gate, and
|
|
288
|
+
the **Archive chat** control is hidden. The bundled `codex archive` command can
|
|
289
|
+
reject a valid idle desktop-app thread even when the dashboard runs in the MCP
|
|
290
|
+
host environment, while Codex's native app archive operation succeeds. TaskChef
|
|
291
|
+
will keep the feature disabled until Codex exposes a reliable supported
|
|
292
|
+
app-callable archive interface or guarantees CLI compatibility. The dormant
|
|
293
|
+
server path also rejects requests before discovering or invoking the CLI.
|
|
293
294
|
|
|
294
295
|
Task details also show whole-task and per-turn token usage when `ccusage` can
|
|
295
296
|
map the linked Codex thread. A completed turn briefly shows “Tokens:
|
package/docs/spec.md
CHANGED
|
@@ -490,7 +490,11 @@ administrative action out of list cards. A keyboard-accessible **More task
|
|
|
490
490
|
actions** disclosure MUST reveal its action list immediately beside it and
|
|
491
491
|
change from an ellipsis to an accessible back/hide control while expanded. The
|
|
492
492
|
list MUST group **Copy Task ID**, **Mark completed**, and **Mark failed** for
|
|
493
|
-
eligible tasks
|
|
493
|
+
eligible tasks. **Archive chat** MUST remain hidden while the archive capability
|
|
494
|
+
gate is disabled because the bundled CLI does not reliably archive desktop-app
|
|
495
|
+
threads. The dormant server endpoint MUST reject requests before discovering or
|
|
496
|
+
invoking the CLI. Re-enabling requires a reliable supported app-callable archive
|
|
497
|
+
interface or guaranteed CLI compatibility. Opening the
|
|
494
498
|
list is the deliberate disclosure step; choosing a terminal outcome submits it
|
|
495
499
|
immediately without a second confirmation. Escape MUST close the idle list,
|
|
496
500
|
pending controls MUST be
|
package/package.json
CHANGED
package/src/dashboard/state.js
CHANGED
|
@@ -15,6 +15,12 @@ export const STATUS_FILTERS = [
|
|
|
15
15
|
];
|
|
16
16
|
const CODEX_THREAD_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
17
17
|
|
|
18
|
+
// Disabled because the bundled `codex archive` command can reject valid idle
|
|
19
|
+
// desktop-app threads while Codex's native archive operation succeeds. Keep
|
|
20
|
+
// the implementation behind this gate until Codex exposes a reliable,
|
|
21
|
+
// supported app-callable archive interface or guarantees CLI compatibility.
|
|
22
|
+
export const CODEX_CHAT_ARCHIVE_ENABLED = false;
|
|
23
|
+
|
|
18
24
|
const NOTIFICATION_TITLES = new Map([
|
|
19
25
|
["created", "Task created"],
|
|
20
26
|
["task_started", "Task started"],
|
|
@@ -41,12 +47,16 @@ export function taskStatusLabel(task) {
|
|
|
41
47
|
return task.status === null ? "unresolved" : task.status.replaceAll("_", " ");
|
|
42
48
|
}
|
|
43
49
|
|
|
44
|
-
export function
|
|
50
|
+
export function isArchiveTaskEligible(task) {
|
|
45
51
|
return task.status !== "working"
|
|
46
52
|
&& typeof task.threadId === "string"
|
|
47
53
|
&& CODEX_THREAD_ID_PATTERN.test(task.threadId);
|
|
48
54
|
}
|
|
49
55
|
|
|
56
|
+
export function canArchiveTask(task) {
|
|
57
|
+
return CODEX_CHAT_ARCHIVE_ENABLED && isArchiveTaskEligible(task);
|
|
58
|
+
}
|
|
59
|
+
|
|
50
60
|
export function canManuallyTransitionTask(task) {
|
|
51
61
|
return ["working", "needs_input"].includes(task.status);
|
|
52
62
|
}
|
package/src/dashboard.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
} from "./workspace.js";
|
|
24
24
|
import { DASHBOARD_SERVER_VERSION, TASKCHEF_VERSION } from "./version.js";
|
|
25
25
|
import { taskGitHubProjection } from "./dashboard/github-links.js";
|
|
26
|
+
import { CODEX_CHAT_ARCHIVE_ENABLED } from "./dashboard/state.js";
|
|
26
27
|
import { createUsageTracker } from "./usage-tracker.js";
|
|
27
28
|
|
|
28
29
|
const TASKS_FILE_NAME = "tasks.jsonl";
|
|
@@ -529,6 +530,7 @@ function publicMonitorError() {
|
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
export async function createDashboardServer({
|
|
533
|
+
archiveEnabled = CODEX_CHAT_ARCHIVE_ENABLED,
|
|
532
534
|
archiveThread = archiveThreadInCodex,
|
|
533
535
|
discoverArchiveCli = discoverBundledCodexCli,
|
|
534
536
|
workspace,
|
|
@@ -759,6 +761,10 @@ export async function createDashboardServer({
|
|
|
759
761
|
|
|
760
762
|
const archiveMatch = url.pathname.match(/^\/api\/tasks\/([a-zA-Z0-9._-]+)\/archive-codex$/);
|
|
761
763
|
if (archiveMatch && method === "POST") {
|
|
764
|
+
if (!archiveEnabled) {
|
|
765
|
+
sendJson(response, 404, { message: "Chat archiving is not available." });
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
762
768
|
if (request.headers.origin !== allowedOrigin) {
|
|
763
769
|
sendJson(response, 403, { message: "Dashboard origin validation failed." });
|
|
764
770
|
return;
|
package/src/workspace.js
CHANGED
|
@@ -1218,7 +1218,7 @@ async function validateDispatchShape(dispatch, name = "task") {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
if (
|
|
1220
1220
|
normalized.schemaVersion >= FIRST_TURN_HISTORY_TASK_SCHEMA_VERSION
|
|
1221
|
-
&& normalized.schemaVersion <
|
|
1221
|
+
&& normalized.schemaVersion < TURN_REF_TASK_SCHEMA_VERSION
|
|
1222
1222
|
&& normalized.turnId !== normalized.turnRef
|
|
1223
1223
|
) {
|
|
1224
1224
|
throw new Error(`${name}.turnId must match the latest legacy turn identity`);
|
|
@@ -1279,7 +1279,7 @@ async function validateDispatchShape(dispatch, name = "task") {
|
|
|
1279
1279
|
throw new Error(`${name}.turns must be ordered by startedAt`);
|
|
1280
1280
|
}
|
|
1281
1281
|
if (
|
|
1282
|
-
normalized.schemaVersion <
|
|
1282
|
+
normalized.schemaVersion < TURN_REF_TASK_SCHEMA_VERSION
|
|
1283
1283
|
&& isSelfLinkingRecord
|
|
1284
1284
|
&& index > 0
|
|
1285
1285
|
&& turn.turnId <= normalized.turns[index - 1].turnId
|
|
@@ -1287,7 +1287,7 @@ async function validateDispatchShape(dispatch, name = "task") {
|
|
|
1287
1287
|
throw new Error(`${name}.turns must be ordered by turnId`);
|
|
1288
1288
|
}
|
|
1289
1289
|
if (
|
|
1290
|
-
normalized.schemaVersion
|
|
1290
|
+
normalized.schemaVersion >= TURN_REF_TASK_SCHEMA_VERSION
|
|
1291
1291
|
&& isSelfLinkingRecord
|
|
1292
1292
|
&& turn.turnId !== null
|
|
1293
1293
|
) {
|