githubnext/chopinPublic

Let's compose rich plans together

Return the canonical URL from read_document

read_document returned a document's UUID, title, brief, source and revision but
never its readable /documents/:owner/:repository/:slug URL, although
create_document and update_document return it and docs/local-agent-mcp.md tells
agents to take "the current title and canonical URL" from a fresh read. An agent
holding only a UUID, such as one retrying a handoff after a Planner sign-in
failure, could not recover the link to hand to a person.

The hosted reader now derives url from the channel's current repository and slug
on both the live and stored paths, so a read after a rename returns the new slug.
The output schema requires it, and DocumentReader.read returns LinkedDocument
(formerly CreatedDocument), the type create and update already shared.

Assistant-model: Claude Opus 5.5
Assistant-workflow: inline
Assistant-verification: bun test failed before the fix: hosted.test.ts 4 fail, the read assertions expect url
Assistant-verification: bun test passed: 3666 pass, 3 skip, 0 fail, including a read after rename returning /documents/octo-org/score/launch-plan
Assistant-verification: bun run types passed: editor, server, web
Assistant-verification: bun run ci passed: dprint, oxlint, tokens, design contract, design record, Impeccable (no new findings)
ALAlex Lavaee authored
ca8af69Patch
Parent07dd27f
9 files changed+44-23
StackedSplit
apps/server/src/mcp.test.ts+3 โˆ’2
apps/server/src/mcp.ts+6 โˆ’5
apps/server/src/mcp/create.test.ts+3 โˆ’2
apps/server/src/mcp/documents.test.ts+3 โˆ’2
apps/server/src/mcp/hosted.test.ts+18 โˆ’7
apps/server/src/mcp/hosted.ts+3 โˆ’0
apps/server/src/mcp/update.test.ts+3 โˆ’2
apps/server/src/mcp/update.ts+2 โˆ’2
docs/local-agent-mcp.md+3 โˆ’1