feat(word-addin): run workflows and actions the way the web app does
The pane previously pasted workflow skill_md - and the Actions tab pasted
the whole document body - directly into the user message. The web app
never does either: a workflow travels as a `{ id, title }` reference the
backend resolves server-side (inside the semi-trusted
<workflow-instructions> fence), and document text reaches the model only
through nonce-fenced context blocks.
Pasting the body client-side quietly upgraded its trust level: a shared
workflow with a hostile body, or a document with embedded instructions,
arrived as the user's own words and bypassed the spotlighting the backend
builds for exactly this content. It also guaranteed behavioral drift -
server-side improvements to a workflow's prompt would never reach the
pane.
Now:
- WorkflowPicker sends the workflow reference on the message and lets the
backend fetch and fence skill_md, same as the web.
- Proofread/Anonymise send the document via `document_context` (fenced
server-side) with an instruction-only user message.
- The client uses the route's snake_case `document_context` field.
E2E request-body assertions updated to pin the new wire shape.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| Repository | open-legal-products/mike |
|---|---|
| Author | Amal <mamalanand3@gmail.com> |
| Authored | |
| Committed | |
| Parents | 5d1d0301 |
| Stats | 6 files changed , +45 , -20 |
| Part of | Add a Word add-in for chat and tracked rewrites |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-6ae25260.md
from inside the repo you want the change in.