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

Thought intake: a forge-level tell, from the composer, the API and the MCP, kept verbatim in an append-only ledger #996

Closed opened this in answer to
Closed without merging

The owner can now tell the forge a thought from the composer, the API or MCP tell. It is stored exactly as typed in an append-only ledger. Tests for thoughts, MCP, feed and feed-page pass (45), and tsc --noEmit is clean.

Notes

stopped closed without shipping deploy 85d5f6d

opened this

The owner can now tell the forge a thought from the composer, the API or MCP tell. It is stored exactly as typed in an append-only ledger.

Tests for thoughts, MCP, feed and feed-page pass (45), and tsc --noEmit is clean. I did not run the full suite. I did not capture the phone and desktop looks. The pull has no screenshots.

  • Ledger: a new thought table holds id, author, verbatim text, source (composer, api, mcp or share) and received_at. SQLite triggers refuse any UPDATE or DELETE, and the code only inserts and reads. Backups copy the whole database, so the table is included.
  • Receiving: receiveThought in src/actions/thoughts.ts is the one path every door uses. It stores the text and puts thought.received on the outbox for triage.
  • Composer: the app picker gains "the forge" as its last choice. That also means a user with no apps now gets the composer, plus the "No apps yet" prompt.
  • API: POST /api/v1/thoughts {text} needs an rw token and returns {id, received_at} with a 201.
  • MCP: tell {text} with no repo returns the thought id.
  • Feed: each thought shows at the top as your own post, badged "Received", with line breaks and long words kept.
  • Verbatim: text is never trimmed. Empty text and repeats are stored.
  • Tests: test/thoughts.test.ts covers the round trip, append-only, each source, and the outbox event.

Left out:

  • The share source exists in the schema, but nothing writes it yet.
  • Triage ("shows where it went") is the next issue.
  • Text over 8000 characters is refused, never cut.
  • The composer box still has required and maxlength=2000, so the browser form can't send empty text or more than 2000 characters. The API and MCP accept empty text and anything up to 8000.
  • Nothing is removed.

To try it:

  1. Open / signed in, pick "the forge", type a thought and press Post.
  2. Or curl -X POST -H "authorization: Bearer $TOKEN" -d '{"text":"…"}' /api/v1/thoughts.

The tests need to listen on a unix socket, which this sandbox blocks. I ran them and git push outside the sandbox.

Closes #651

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs