Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ This table is kept current — the phase status is updated as work progresses (s
| 30 | **ClaudeQ becomes DispatchQ** (2.0, major) — new name, icon and binaries, with an installation from ClaudeQ moved over in place | ✅ done | Everything user-visible is renamed: `DispatchQ.app` with bundle id and LaunchAgent label `de.maierdaniel.dispatchq`, binaries `dispatchq`/`dispatchqd`/`dispatchqapp` (`cmd/` dirs renamed), data dir `~/Library/Application Support/dispatchq`, `DISPATCHQ_*` variables, `/etc/sudoers.d/dispatchq`, `dispatchq-<version>.pkg`, `Uninstall DispatchQ.pkg`, `.dispatchq` task files, the violet logo from `docs/branding/dispatchq`. The Go module path and the GitHub repository stay `danielmaier42/claudeq`: 1.x installs look for updates there, and any `.pkg` asset is taken, so they find 2.0. Migration: `store.DefaultHome` renames the ClaudeQ data dir and leaves a relative symlink at the old path (absolute log paths in `history.jsonl` and external scripts keep resolving); `CLAUDEQ_HOME` is still honoured, and every run gets each `DISPATCHQ_*` variable under its `CLAUDEQ_*` name too; `dispatchqd install` boots out the `de.maierdaniel.claudeq` agent before killing stray `claudeqd run` processes (launchd would restart them otherwise); `dispatchqd install` does this before it resolves (and so moves) the data dir; the window runs it on start when ClaudeQ's agent is still there (an install with nobody logged in); preinstall closes `claudeqapp`, and after a verified takeover the postinstall moves `ClaudeQ.app` to the user's Bin (bundle id checked; nothing under `/Applications` is ever deleted), removes `/etc/sudoers.d/claudeq` and forgets the old receipt. The uninstaller removes ClaudeQ's leftovers as well. `.claudeq` bundles (`claudeq-task`) still import; old `claudeq_status` log lines still render. Task prompts are **not** rewritten silently: a one-time **What's new** dialog (`GET /api/whats-new`, `POST /api/whats-new/dismiss`, `state.json` `whats_new_seen`, primed on a fresh install so only upgraders see it) introduces the rename, the redesign and the public beta features, and its **Check tasks** button runs the prompt reviewer with new `review.KindRename` rules (a script's commands are looked up on the PATH as for a script review) over every task prompt that mentions ClaudeQ and the custom system prompt (`POST /api/rename-check`, background, three at a time, polled via `GET /api/rename-check`); the operator unticks what to keep and `POST /api/rename-check/apply` writes the selected rewrites, skipping a task edited since the check. Closing the dialog with the check running or unapplied fixes asks first. The default webhook body now says `"source":"dispatchq"` (README notes it). Not carried over (keyed to the bundle id by macOS): notification permission and the window's localStorage view preferences. Tests: data-dir move/link/idempotence, env fallback and aliases, What's new priming and endpoints, the rename check end to end with a per-prompt fake reviewer, legacy bundle format; `scripts/acceptance.sh` checks the uninstaller's ClaudeQ cleanup and guards that `ClaudeQ.app` is moved, never deleted. |
| 31 | **Ask DispatchQ** — a chat that operates DispatchQ replaces *New task* as the sidebar's first button | ✅ done | New `internal/assistant` package, an *aside* like the feedback assistant (tool-free, project-free, own directory), on the provider/model the feedback page already used; the two settings became `assistant_provider`/`assistant_model` (`feedback_provider` migrates in place unless the new key is set; `feedback_model` is dropped rather than moved, so a small model picked for issues cannot take the chat off its default; `--feedback-provider`/`--feedback-model` stay as CLI aliases), with a per-job default on Claude Code (Sonnet for the chat, Haiku for feedback) and the harness's own default elsewhere; Codex answers too, since main gained Codex asides. Every model turn is schema-bound to `{reply, lookups, actions}`. **Knowledge:** each message carries a compact overview built from the store (local time and offset, pause switch, providers, every task without its prompt but with schedule/next run/last outcome, the last 12 runs, the last 10 artifacts); an unchanged overview is not re-sent within a session (SHA-256 digest). Details come through read-only **lookups** the daemon answers and feeds back into the same session — `task`, `run` (final output, error, a log tail reduced to agent text and tool names, its artifacts), `runs`, `artifact` (text content, HTML reduced to text), `artifacts`, `usage` — at most 4 per round and 3 rounds per message, the last one told to answer. **Acting:** `open_view`/`open_run`/`open_artifact`/`open_task` run in the app as soon as the answer arrives; `add_task`, `update_task`, `run_now`, `enable_task`, `disable_task`, `delete_task`, `cancel_run`, `pause_all`, `resume_all` are cards the operator confirms, executed by the dashboard through the existing endpoints (so the API's own validation applies). Before a reply leaves the daemon, `StoreSource.Check` drops actions naming nothing real, labels the rest, infers a trigger from a cron or time, normalises `fixed_at` to RFC 3339 in local time, fills the default working directory, and marks a draft that would not validate, names an unknown provider, or points at a folder missing on this Mac. A newer proposal of the same kind replaces a pending card. Sessions resume via the aside's session id (2 h TTL); a forgotten session starts fresh with the last 12 messages replayed. UI: a 380 px panel docked right of the main view (stays open across views, ⌘J, Esc), *Ask DispatchQ* in the sidebar with a **+** beside it for the plain task form (⌘N unchanged), and an *Ask DispatchQ "…"* entry at the end of the command palette. API: `GET /api/assistant`, `POST /api/assistant/turn`. Verified against the real Claude CLI through a scratch-home daemon and in the browser: a failed-run diagnosis with one lookup (~9 s), "show me the report" opening the artifact viewer (~4 s), planning a job and pausing a task from one message, a follow-up changing the time in the same session, an off-topic question declined in one line. Unit tests: turn loop (state digest, resume, history replay, lookup rounds and caps, unvalidated answers, harness errors, session rename and expiry), overview/lookups/check against a real temp store, settings migration, API status/turn/unavailable paths, and the dashboard store (history and focus sent, navigation, card replacement, confirmation bodies, error on a card). |
| 32 | **Assistant with full CLI parity** — the chat knows and can do everything `dispatchq` can, on the machine it actually runs on | ✅ done | New `internal/cliref`: one description of every command, argument and flag (with access read/write/destructive/interactive, credential and path markers), held to the real parser by tests in `cmd/dispatchq` that read the dispatch switches from the source and every flag set from `-h`, and that check the usage text names each flag (which caught `--group` and eight `settings` flags missing from it). The assistant's system prompt is generated from it plus a runtime block the daemon fills in (system, version, CLI path, data dir, script shell, native notification center), POSIX or PowerShell by `runtime.GOOS`, never by guessing from a path. Every command has a route a test enforces: read-only ones run as a new `cli` lookup, task commands map to `add_task`/`update_task` (whose draft now carries every task flag: id, pool, reasoning effort, the switches, `depends_on`/`include_results`) and the existing typed actions, everything else is a new `run_cli` card, and `uninstall`, credentials (`--env`, Pushover/ntfy/webhook secrets) and provider login are handed to the operator. A confirmed card goes to `POST /api/assistant/cli` (loopback Host and JSON body required, as for uninstall), is checked against the reference again and runs the bundled CLI as a program with its arguments, never through a shell, outside any run's environment. Tests include the minute notification scenario end to end: a fake model that only answers when told the notify syntax and CLI path, the daemon's check, and the confirmed script run by the real executor with the real CLI built into a path with spaces and umlauts, landing in a throwaway outbox. |
| 33 | **Reliable notifications** — a push raised without network is not lost, and a failing job does not flood the phone | ✅ done | Prompted by an audit of the live daemon log (97 undelivered pushes, 89 of them DNS failures in clamshell DarkWakes; 633 hold lines; watchers pushing every failure). **Delivery outbox:** `engine.send` writes one `store.PendingDelivery` per channel to `deliveries.json` before trying; an accepted delivery is removed and logged with its receipt (Pushover `request`, ntfy `id`), a failed one is retried (30 s doubling to 5 min, at once after a wake or when the network is back, across restarts) for 24 h on remote channels and 1 h on the desktop, then logged as `NOTIFICATION LOST`; a 4xx other than 408/429 is not retried. Channels are named (`notify.Channel`, `liveNotifier.Channels`). **No network, no start:** agent tasks on Claude Code and Codex are held while their API host does not resolve (`engine.LookupHost`, injected). **Policy:** failures carry `notify.PriorityHigh` and the run id; one push per failing streak (`failing.json`), a reminder after 12 h, one recovery push; rate-limit pauses announced once at 2 h; due tasks announced once after 30 min (backfill 24 h) unless held for a reason announced elsewhere; cancellations not announced. README corrected: `caffeinate -i` does not keep a closed lid awake. |

---

Expand Down
Loading
Loading