Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ notes. Entries describe what users experience, not internal refactors.

## [Unreleased]

### Removed

- External MCP and Google Drive connections in the AI assistant. Local file
references, citations and saved artifacts remain available without account
authorization or a connector backend.

### Fixed

- Editing a document after more than seven idle days keeps the new recovery
Expand Down
20 changes: 9 additions & 11 deletions docs/developer/assistant-workspace.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
# Assistant workspace owners

The panel composes existing inference and document-review lifecycles with two independent features. A model service is an execution destination, a connector is a reference source, and an artifact is an explicitly saved result. None creates a site account.
The panel composes existing inference and document-review lifecycles with two independent features. A model service is an execution destination, a local reference is an explicitly selected file, and an artifact is an explicitly saved result. None creates a site account. External account connectors and the external-service MCP client were removed to keep the editor account-free and statically deployable; see the [MCP investigation and product decision](../explorations/2026-10-18-mcp-connectors-and-frontend-boundaries.md).

## Sources

`connectors/reference-sources.ts` owns immutable reference snapshots, per-conversation attachment sets and a read-only MCP client. Local references support `.txt`, `.md`, `.csv`, `.tsv` and `.json` up to 256 KiB, plus standalone DOCX, XLSX, PPTX and text-bearing PDF readers with 20 MiB input and 256 KiB extracted-text limits. These local readers do not replace or mutate the open document. OOXML extraction bounds archives to 2,000 entries, 32 MiB cumulative inflation and 100,000 XML elements, with 10,000 paragraphs or 10,000 cells across 20 sheets; PDF extraction allows 100 pages. All extraction has a 15-second deadline; scanned images require OCR, which is not provided. See [reference limits](../reference.md) for format and offline requirements. Up to five attachments are selected explicitly. Attachments remain in memory and are not silently restored from disk.
`references/reference-sources.ts` owns immutable local reference snapshots and per-conversation attachment sets. Local references support `.txt`, `.md`, `.csv`, `.tsv` and `.json` up to 256 KiB, plus standalone DOCX, XLSX, PPTX and text-bearing PDF readers with 20 MiB input and 256 KiB extracted-text limits. These local readers do not replace or mutate the open document. OOXML extraction bounds archives to 2,000 entries, 32 MiB cumulative inflation and 100,000 XML elements, with 10,000 paragraphs or 10,000 cells across 20 sheets; PDF extraction allows 100 pages. All extraction has a 15-second deadline; scanned images require OCR, which is not provided. See [reference limits](../reference.md) for format and offline requirements. Up to five attachments are selected explicitly. Attachments remain in memory and are not silently restored from disk.

The MCP client supports the 2025-11-25 Streamable HTTP resource protocol with JSON and SSE responses. It lists up to 100 resources per explicit page and reads selected text resources. Load more follows only the currently returned cursor, with repeated-cursor protection, at most 10 pages and 500 unique resources; no page is prefetched. It does not invoke tools, run server instructions, implement stdio or handle provider OAuth. Use an explicitly configured HTTPS endpoint or HTTP loopback endpoint, with browser CORS access. An optional bearer token remains in memory. This is separate from the editor's outbound WebMCP tool exposure.
`ui/sources-view.ts` owns local file attachment, removal, search and read-only preview. Attachment capacity errors identify the five-source limit. Local reads have byte limits and deadlines; epoch checks prevent late reads from entering another conversation. `panel.ts` captures selected references at enqueue, guards them before execution and continuation, and cancels execution when its attachments are invalidated. Adding another attachment cannot change an already queued snapshot.

`ui/sources-view.ts` owns source management and authorization completion presentation. Authorization failures restore connection controls and clear expired discovery results without silently dropping attached snapshots or retrying. Attachment capacity errors identify the five-source limit. Source reads have byte limits and deadlines; epoch checks prevent late reads from entering another conversation or reattaching after disconnect. `panel.ts` captures selected references at enqueue, guards them before execution and continuation, and cancels execution when its attachments are invalidated. Adding another attachment cannot change an already queued snapshot.
`references/reference-search.ts` owns literal local filtering and query-centered excerpt windows. Source disclosures show up to 8,000 characters, highlight the actual match and label partial previews. Expanding a source or a captured citation never fetches content or starts inference.

`connectors/reference-search.ts` owns literal local filtering and query-centered excerpt windows. Source disclosures show up to 8,000 characters, highlight the actual match and label partial previews. Expanding a source or a captured citation never fetches content or starts inference. Google filename search runs only on explicit Browse; changing the query cancels the previous presentation owner and resets continuation. Drive discovery deduplicates up to 300 files across 10 explicit pages.
`ui/request-context.ts` creates bounded JSON excerpts with controlled ids S1–S5, source titles, source-kind metadata and truncation flags. Host locators stay outside the model payload. It returns the exact serialized evidence, and native/ordinary-chat routes publish their final serialization before streaming. The runtime reports any additional clipping before each inference. `ui/source-evidence.ts` reconciles this with the immutable captured snapshot. `ui/source-citations.ts` decorates only matching literal citations using text-only captured excerpts; unknown ids remain plain text and original Copy/Save content is unchanged.

`ui/request-context.ts` creates bounded JSON excerpts with controlled ids S1–S5, source titles, connector identity and truncation flags. Host locators stay outside the model payload. It returns the exact serialized evidence, and native/ordinary-chat routes publish their final serialization before streaming. The runtime reports any additional clipping before each inference. `ui/source-evidence.ts` reconciles this with the immutable captured snapshot. `ui/source-citations.ts` decorates only matching literal citations using text-only captured excerpts; unknown ids remain plain text and original Copy/Save content is unchanged.
Each inference response can carry a host-minted stable `hostPresentation.id` with bounded presentation metadata, attached directly to that response rather than matched by prose or history index. The runtime strips the annotation before all provider calls. Conversation opt-in is still required for persistence; removing a conversation removes its annotations. Only the bounded excerpts actually sent are retained, never the full attachment. Restored legacy responses without annotations do not invent citations. Instruction and existing request-envelope headroom are reserved. Native requests, conversational requests, document drafting and dedicated writing routes receive quoted reference data through their existing owners. Reference content never adds tool definitions or bypasses host review. The historical `connector` metadata field remains readable in saved conversations and artifact provenance; it does not restore a remote connection.

Each inference response can carry a host-minted stable `hostPresentation.id` with bounded presentation metadata, attached directly to that response rather than matched by prose or history index. The runtime strips the annotation before all provider calls. Conversation opt-in is still required for persistence; removing a conversation removes its annotations. Only the bounded excerpts actually sent are retained, never the full attachment. Restored legacy responses without annotations do not invent citations. Instruction and existing request-envelope headroom are reserved. Native requests, conversational requests, document drafting and dedicated writing routes receive quoted reference data through their existing owners. Remote content never adds tool definitions or bypasses host review.

Google Drive is optional and uses the [server connector](google-drive-connector.md). The service worker bypasses all `/api/connectors/` routes, including OAuth callback navigations, so authenticated responses cannot become offline assets. Cloudflare's `_routes.json` restricts function invocation to the Drive API path. Static deployments retain local/MCP references and explain unavailable cloud routes.
The service worker bypasses `/api/` requests rather than caching them as offline pages. No connector API, OAuth callback or Functions routing configuration is shipped. The editor's outbound WebMCP tool exposure remains independent from reference-file attachment.

## Artifacts

`artifacts/store.ts` owns a separate IndexedDB database with artifact bodies and metadata-only list summaries. Saving is explicit; conversation-history opt-in does not implicitly save results. A store holds at most 50 artifacts, 20 versions each and 128 KiB UTF-8 per version. Limits reject with a visible recovery message; existing versions are never silently pruned.

Updates check the expected version inside the same read-write transaction that appends the new version. Concurrent editors cannot overwrite one another. Selecting an older version and saving creates a new version. Deletion requires an explicit UI confirmation. Failed saves preserve editable drafts. Capacity errors distinguish artifact count, text size and version history. At 20 versions, an explicit save-as-new action preserves the draft and source provenance in a separate artifact without modifying existing history.

`ui/artifacts-view.ts` owns local text editing, version selection and conflict presentation. The generic chat package provides an optional host save action with opaque, render-time provenance. It does not know IndexedDB or connectors. Source titles and conversation identity are captured with live results; old restored results with no retained source metadata do not invent source provenance.
`ui/artifacts-view.ts` owns local text editing, version selection and conflict presentation. The generic chat package provides an optional host save action with opaque, render-time provenance. It does not know IndexedDB or reference storage. Source titles and conversation identity are captured with live results; old restored results with no retained source metadata do not invent source provenance.

`artifacts/edit-proposal.ts` owns immutable draft identity, title/body/revision freshness and native UTF-16 selection offsets. A collapsed selection means the complete artifact; selecting a range sends and replaces only that range. `ui/artifact-workflow.ts` owns a single disclosed instruction, bounded streaming preview and explicit diff acceptance. Accepting updates the editable draft only; Save version remains separate. Default previews show at most 8,000 characters; expanding the complete diff is explicit. Stop, rejection and failures keep the instruction and draft. A quiet scope line distinguishes selected text from the entire artifact before submission. Queue recovery routes instructions back to artifact refinement, never through the Office chat composer. If a restored selection belonged to an older body, a fresh selection or explicit entire-artifact choice is required; old offsets are not reused.

Expand All @@ -34,4 +32,4 @@ Applying an artifact captures a fresh Word target and creates the existing `Acti

## Offline availability

Offline mode hides Google Drive authorization and browsing, the downloadable model catalog and remote model URLs. It retains attached reference snapshots, local file attachment, saved artifact editing and versions, cached model management, local GGUF files, and local or LAN services/MCP. Existing cloud configuration remains inspectable. Connectivity restoration only restores controls; it never authorizes, downloads, reconnects or resends automatically. Browser connectivity is a presentation signal; actual request failures still receive actionable recovery messages.
Offline mode hides the downloadable model catalog and remote model URLs. It retains attached reference snapshots, local file attachment, saved artifact editing and versions, cached model management, local GGUF files, and local or LAN model services. Existing model configuration remains inspectable. Connectivity restoration only restores controls; it never downloads, reconnects or resends automatically. Browser connectivity is a presentation signal; actual request failures still receive actionable recovery messages.
Loading
Loading