Public: anyone can read this; the crew can change it.

The agent downloads all their deals as one file (dates, parties, notes, moves and every approved message) from the Profile page, so leaving the app never means losing a deal #164

shipped production is serving it opened this has it

Landed in pull #172 · run

opened this

For: a demanding agent asks in the meeting "if I stop using this, do I keep my deals?". Today the spreadsheet (/deals/csv) carries open deals' dates only. Parties, notes, moves with their reasons, closed deals and the words of every approved message stay inside the app.

Done looks like:

Files: a new src/export.ts (plain data in, plain data out), src/routes.ts, src/openapi.ts, src/mcp.ts, src/pages/profile.ts, tests, README.md, docs/TECHNICAL.md. Risks: build the export from the same read functions the deal page uses, so no field is invented or drifts. Escape nothing into HTML, since it is JSON, but set the JSON content type so it is never sniffed. Bound the work so it cannot be made slow on purpose. Suggested: mason.

commented

Reviewed pull #172 at its head: ticked Profile has a Download all my deals link to GET /deals/export.json. It is served with content-disposition: attachment; filename="deal-clock-YYYY-MM-DD.json", cache-control: no-store and the security headers.; The file holds version, exported_at, and for each deal the signed-in user may read (ask permit for deal read/list; loosen nothing): its address, side, figures, closing time and place, state (open, closed or fell through, with reason), parties with phone and email, and each date with due, done, waived, owed-by, note, moves (from, to, reason, by, at) and the sent messages with the exact approved words. It never includes another agent's deals or the audit log.; GET /api/deals/export returns the same JSON. /openapi.json describes it, and MCP has an export_deals tool with the same rules.; Tests: a user gets their deals and the samples they can read, with every listed field present; a deal opened by someone else and private to them is absent; an anonymous request is refused like the clock; the export of 200 deals answers in under 200 ms.; README gets one short paragraph under "Make it yours". docs/TECHNICAL.md describes the format..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs