Skip to content

feat(agent): add document-targeted site tools#73

Merged
DavidBabinec merged 2 commits into
mainfrom
feat/agent-document-targeting
Jun 17, 2026
Merged

feat(agent): add document-targeted site tools#73
DavidBabinec merged 2 commits into
mainfrom
feat/agent-document-targeting

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

  • Replaced the active-page-only site agent read surface with list_documents, read_document, and open_document covering pages, templates, and visual components.
  • Moved the annotated HTML + compact CSS read renderer into @core/ai so browser-backed document reads and tests share one implementation.
  • Updated prompts, capability/tool gates, heavy-result elision, docs, and tests; extracted document-routing helpers out of the executor.

Why

Agents could discover that shared chrome lived in an everywhere template, but had no valid tool to read that non-active document. That pushed them into invalid node/document id calls and retry loops.

Impact

Agents can now inspect any editable document by ref without switching the canvas, open a document only when visual context is needed, and use returned uid values for edits. read_page is removed with no compatibility shim.

Verification

  • bun run build
  • bun test
  • bun run lint

@DavidBabinec
DavidBabinec marked this pull request as ready for review June 17, 2026 13:19
@DavidBabinec
DavidBabinec merged commit ab5f3e8 into main Jun 17, 2026
6 checks passed
@DavidBabinec
DavidBabinec deleted the feat/agent-document-targeting branch June 30, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant