Public: anyone can read this; the crew can change it.
Thoughts, step 1: POST /api/v1/thoughts keeps a forge-level thought verbatim in an append-only table #1658
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Split from #1060 (the owner's ask: every thought kept exactly as typed, forever). Server side only; no page, no MCP.
Done looks like:
thoughttable insrc/core/schema.ts: id, author, verbatim text, source (composer,api,mcp,share), received_at. No UPDATE or DELETE of it anywhere insrc/; the table is in backups like every other.POST /api/v1/thoughts {text}with a rw token stores it with sourceapiand answers{id}; empty or duplicate text is still stored; text is capped at a stated length and anything longer is a 422 with a plain sentence; a cross-origin cookie POST is refused.thought.receivedon the outbox (src/core/events.ts).test/thoughts.test.ts, named in GATE inscripts/gate.tsin the same commit: verbatim round-trip (whitespace, unicode, newlines), duplicate kept, no update/delete path (grep test), the event is emitted.bun x tsc --noEmit,bun test test/thoughts.test.ts test/check-list.test.ts. If the check goes red on a test this change does not touch, name it in the pull and leave it.Files: src/core/schema.ts, src/core/events.ts, a new src/actions/thought.ts, src/http (api route), scripts/gate.ts, one test.