jackin❯ daemon
Status: Lifecycle foundation plus first attention adapter shipped — jackin daemon serve/start/stop/restart/status/logs/install/uninstall exists with a private Unix control socket, protocol/build skew checks, redacted logs, per-user launchd/systemd unit writers, and a muted-by-default one-way attention snapshot adapter. Reactive features that still depend on it (live auth sync, host bridge, broader Desktop Agent Hub APIs) remain deferred until their own adapter plans land.
Shipped facts
jackin❯ now has a per-user host daemon command group documented at jackin daemon. The daemon owns lifecycle, a same-user Unix socket at ~/.jackin/run/jackin-daemon.sock, JSONL request/response framing, hello/status/shutdown, log redaction, launchd/systemd user-unit file writers, and an attention_snapshot consumer. The in-container jackin-capsule PID 1 process remains a separate per-container control plane; Capsule Phase 4 still depends on future host-daemon event subscriptions.
The clearest concrete stand-in for a daemon-owned watcher remains the keep-awake reconciler in crates/jackin-host/src/caffeinate.rs: it still runs at every CLI command boundary, acquiring a lock file and starting/stopping caffeinate -imsu based on whether any keep-awake-labelled container is running. Moving that watcher into the daemon remains future work.
Research: jackin❯ daemon — design proposal has the full design rationale and the Plan 042 spike resolution: selected lifecycle, install, protocol, security posture, redaction rules, host-vs-Capsule relationship, and implementation phasing.
The Plan 047/048 production daemon lives in crates/jackin-runtime/src/host_daemon.rs and is wired through crates/jackin/src/cli/daemon.rs plus crates/jackin/src/app/daemon_cmd.rs. The older spike prototype remains feature-gated and not user-wired: crates/jackin-runtime/src/reactive_daemon.rs defines the original proof.
Remaining work
- Desktop-ready API. Add the small versioned endpoints jackin❯ Desktop Agent Hub needs first:
daemon/hello, workspace/session discovery, GitHub PR lookup, account status, event subscription, Ghostty/browser open actions. - Caffeinate migration. Move the keep-awake reconciler from per-command into a daemon-owned Docker-events watcher.
- Live auth sync. Add the per-axis watcher adapters for live bidirectional auth sync only after the daemon foundation has shipped and log/core-dump redaction is proven.
- Further reactive adapters. Container event watcher, cross-session notifications, and host bridge each plug into the daemon's adapter surface once it exists; host bridge remains blocked until per-request approval and audit are specified.
Related work
- Research: jackin❯ daemon — design proposal — full design rationale, open questions, phasing.
- Live bidirectional auth sync — the first reactive feature this daemon hosts.
- Agent attention prompts — host-side OS notifications when an agent waits on operator input. Plugs into this daemon.
- Host bridge — secrets and approved host actions — operator-mediated channel for agents to request secrets or invoke host commands. Plugs into this daemon and uses the same approval surface (TouchID / polkit / password) the daemon hosts.
- jackin❯ Capsule — the in-container per-container control plane; its Phase 4 (host daemon integration) is designed together with this item.
- jackin❯ Desktop Agent Hub — native macOS status bar and desktop companion that consumes daemon state for workspaces, sessions, GitHub PRs, account status, notifications, and approved host actions.
crates/jackin-host/src/caffeinate.rs— today's per-command keep-awake reconciler; first migration target once the daemon exists.crates/jackin-runtime/src/reactive_daemon.rs— feature-gated Plan 042 prototype proving the control socket shape and one-way attention adapter.- Reliable Claude authentication strategy — concurrent-session token-drift concerns the live-auth-sync feature ultimately answers, so the daemon hosts the answer.
- Credential source pattern — future unified credential resolver; the daemon's per-axis adapter trait should be expressible inside that pattern.