Files
multica/server
Bohan-J 478e9eb0a5 feat(cli): allow task-scoped daemon status and disk-usage (MUL-5742)
PR #6407 rejected every daemon command inside a managed task. Two of them
are read-only diagnostics an agent legitimately needs to inspect the runtime
hosting it, and blocking them removed that ability with no replacement.

Re-enable `daemon status` and `daemon disk-usage`, scoped to the daemon that
owns the task rather than to whatever the caller names:

- the daemon now exports MULTICA_TASK_WORKSPACES_ROOT, so a task scans the
  root its daemon actually manages instead of the $HOME- and profile-derived
  default, which for a named-profile daemon is an unrelated tree;
- `status` probes the injected MULTICA_DAEMON_PORT instead of re-deriving a
  port from --profile, which would report a daemon that is not hosting it;
- both reject --profile, and disk-usage also rejects --all-profiles (it
  enumerates ~/.multica/profiles) and --workspaces-root;
- the STATUS column and the other-roots hint are skipped in a task: both
  reach for Owner profile state, which is what the boundary exists to stop.

Everything else stays rejected. `daemon stop` in particular would terminate
the daemon running the task that issued it, along with every sibling task.

Co-authored-by: multica-agent <github@multica.ai>
2026-08-10 12:32:00 +08:00
..