Stage A of #370: wire the MCP client transport for the already-shipped server
save-version handler (PR-1 #374). An agent can now pin an intentional named
version (kind='agent', derived server-side from the signed actor) of a page's
CURRENT live collaboration content.
- collab-session.ts: add CollabSession.sendStatelessAndAwait(payload, predicate,
timeoutMs) — sends a stateless message over the live provider and resolves on
the first matching reply, with a bounded timeout; lifecycle (inflightReject,
ready-guard, concurrent fail-fast, idle re-arm) mirrors mutate(). Extend
CollabProviderLike with sendStateless + the stateless on/off overloads.
- collaboration.ts: add savePageVersionRealtime() — under withPageLock, reuse the
cached agent-authenticated CollabSession (#400), send {type:'save-version'},
await {type:'version.saved', …}; no REST read (would race the stale page row).
- client/pages.ts: add savePageVersion(pageId) — resolvePageId +
getCollabTokenWithReauth + writeWithCollabAuthRetry (#486 self-heal).
- tool-specs.ts: add the deferred savePageVersion spec (+ DocmostClientLike Pick);
auto-registered on both hosts by the shared loops.
- server-instructions.ts: HISTORY family + routing-prose mention.
- ai-chat-tools.service.ts: contract type-assert for the new client method.
- agent-roles-catalog: tell the content-authoring roles (researcher,
call-summarizer, ru+en) to save a version when the document is done; bump
their catalog versions.
- test: unit coverage for savePageVersionRealtime (ack + bounded-timeout paths).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>