flower
/

review · segments

Design agent-facing CREAM MCP/API surface (todo 483)

claude 79 events 1 segments main

segment 1 of 1

Design agent-facing CREAM MCP/API surface (design doc + findings + todo comment)

Done

The agent read the task scratchpad (862), gathered ground truth from cream.py, SessionStore.swift, CURRENT_STATE.md, BACKLOG.md, and the Swift model. It verified that hidden/sound-alert session IDs are persisted in UserDefaults (not ephemeral) but siloed to the GUI app, and that collapsed/extended state is in-memory only. It wrote a comprehensive design document settling the central architecture question (no daemon — wrap cream.py directly, share state via ~/.cream/agent-state-v1.json), then wrote a findings scratchpad and marked todo 483 as ready for review.

outcome

Design doc docs/design/agent-mcp-api.md written, findings scratchpad 483-mcp-design-findings (id 868) created, READY FOR REVIEW comment posted on todo 483. No code, no commit.

next steps

key decisions

  • MCP should wrap cream.py directly from a stateless-per-call server, not a long-running daemon
  • Shared state coordination via ~/.cream/agent-state-v1.json file, not UserDefaults
  • Stable write key is {provider}:{row_id} (transcript_id first, falling back to session_id)
  • Hidden and alert state must be relocated from macOS app UserDefaults to the shared ~/.cream/ file
  • Reads are open (no auth), writes require opt-in + scope/rate-limit + audit trail
  • Alert queue is request-and-drain: desktop notifications now, phone push can be added later without changing the API contract

open questions

2 weeks ago 2 weeks ago