You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A person asks their AI app "Where did we decide the venue budget?". The answer cannot link there, because no read tool returns a link. The app also cannot see which sentence a Comment quotes, so it misreads replies such as "too high".
After this change, get_outline and read_document return heading links, and list_chat_rooms returns chat links. read_chat_thread shows each Comment's quote.
Acceptance criteria
One module in apps/hocuspocus.server/src/lib/ exports buildDocumentUrl(appUrl, slug) and buildHeadingUrl(documentUrl, tocId | null). buildDocumentUrl encodes the slug. buildHeadingUrl encodes the toc-id.
The digest's sectionUrl is deleted. Digest tests pass with unchanged URLs.
create_document and the digest's withResolvedName use buildDocumentUrl.
get_outline gives each node a url, or url: null when section_id is null.
read_document carries url: the heading link with section_id, else the document link.
list_chat_rooms gives each room a url from buildChatActionUrl. A cold open of it opens that heading chat.
Links appear in structuredContent and in the text, outside the data frame.
read_chat_thread shows a text Comment as (comment on: "<quote>"), capped at 200 characters, with line breaks as spaces. A media Comment shows (comment on media). No src, html, caption or preview leaves the server.
From metadata, readThread selects only named paths (comment->>kind, comment->>content), never the whole object.
Tool descriptions, docs/mcp/reference.md and apps/hocuspocus.server/API.md §MCP connector name the new fields.
Model the helpers on buildChatActionUrl (apps/hocuspocus.server/src/lib/push/chatActionUrl.ts). The module imports nothing, so tests load it without Redis.
The browser writes Comment JSON (apps/webapp/src/api/messages/sendCommentMessage.ts). So one pure function in modules/mcp/domain/ type-checks it.
Rules: apps/hocuspocus.server/CLAUDE.md §MCP Connector and §Testability Seams. AGENTS.md §Test Policy (c): one formatter unit test, proved by sabotage.
Verify: bun test src/modules/mcp tests/unit/contentChangeDigest.test.ts, typecheck, lint, format. Open each returned url in a fresh profile.
Parent
#328. Related: #230, #336
What to build
A person asks their AI app "Where did we decide the venue budget?". The answer cannot link there, because no read tool returns a link. The app also cannot see which sentence a Comment quotes, so it misreads replies such as "too high".
After this change,
get_outlineandread_documentreturn heading links, andlist_chat_roomsreturns chat links.read_chat_threadshows each Comment's quote.Acceptance criteria
apps/hocuspocus.server/src/lib/exportsbuildDocumentUrl(appUrl, slug)andbuildHeadingUrl(documentUrl, tocId | null).buildDocumentUrlencodes the slug.buildHeadingUrlencodes thetoc-id.sectionUrlis deleted. Digest tests pass with unchanged URLs.create_documentand the digest'swithResolvedNameusebuildDocumentUrl.get_outlinegives each node aurl, orurl: nullwhensection_idis null.read_documentcarriesurl: the heading link withsection_id, else the document link.list_chat_roomsgives each room aurlfrombuildChatActionUrl. A cold open of it opens that heading chat.structuredContentand in the text, outside the data frame.read_chat_threadshows a text Comment as(comment on: "<quote>"), capped at 200 characters, with line breaks as spaces. A media Comment shows(comment on media). Nosrc,html,captionorpreviewleaves the server.metadata,readThreadselects only named paths (comment->>kind,comment->>content), never the whole object.docs/mcp/reference.mdandapps/hocuspocus.server/API.md§MCP connector name the new fields.Blocked by
Agent brief
Type: AFK.
buildChatActionUrl(apps/hocuspocus.server/src/lib/push/chatActionUrl.ts). The module imports nothing, so tests load it without Redis.apps/webapp/src/api/messages/sendCommentMessage.ts). So one pure function inmodules/mcp/domain/type-checks it.apps/hocuspocus.server/CLAUDE.md§MCP Connector and §Testability Seams.AGENTS.md§Test Policy (c): one formatter unit test, proved by sabotage.bun test src/modules/mcp tests/unit/contentChangeDigest.test.ts, typecheck, lint, format. Open each returnedurlin a fresh profile.Out of scope
via connected apptag — Mark MCP chat posts with a fixed connected-app metadata key #336.?id=link — Land a heading link on its heading, even when the heading is folded or filtered #338.