taskchef 7.21.1 → 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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "7.21.1",
3
+ "version": "7.21.2",
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
@@ -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, and **Archive chat** whenever archival is
278
- eligible. The menu disclosure is the deliberate first step; choosing a terminal
279
- outcome submits it immediately without a second confirmation. There is no
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 More actions list offers **Archive chat** for every linked task whose current
288
- TaskChef state is not `working`. After confirmation, TaskChef invokes only the
289
- Codex CLI at the canonical ChatGPT or Codex desktop app location under
290
- `/Applications`, to archive the exact thread UUID. The Codex chat leaves active chat lists while the TaskChef record
291
- and its activity timeline remain unchanged. If the bundled CLI is unavailable,
292
- the dashboard does not fall back to another `codex` executable from `PATH`.
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, plus **Archive chat** when archival is eligible. Opening the
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "7.21.1",
3
+ "version": "7.21.2",
4
4
  "description": "A non-blocking interactive dispatcher for visible Codex tasks.",
5
5
  "license": "MIT",
6
6
  "author": "Favo Yang",
@@ -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 canArchiveTask(task) {
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;