Skip to content

feat(admin): drive write agent edits through virtual bash - #2824

Draft
Innei wants to merge 1 commit into
masterfrom
feat/write-agent-document-bash
Draft

Innei wants to merge 1 commit into
masterfrom
feat/write-agent-document-bash

Conversation

@Innei

@Innei Innei commented Sep 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace haklex insert_node / replace_node / delete_node / search_document with a just-bash virtual workspace over /doc.xml.
  • Stop injecting the full document XML into the last user message; the agent reads the working copy with cat / grep / sed.
  • Diff LiteXML block ids back into the existing review overlay so edits still require user accept.
  • Pin @haklex/* to 0.41.0 (optional document-tool plugins) and add just-bash.

Test plan

  • pnpm exec vitest run src/vendor/rich-editor/utils/document-bash src/vendor/rich-editor/utils/image-tools.test.ts in apps/admin
  • pnpm exec tsc --noEmit in apps/admin
  • Open the write page, send an edit request, confirm the agent uses bash against /doc.xml instead of insert_node
  • Confirm python/node stubs redirect to sed/grep/heredoc
  • Confirm staged diffs appear in the editor and accept/reject still works
  • Confirm a follow-up turn reseeds from the live editor (unaccepted edits are gone)

Replace haklex insert/replace/delete/search with a just-bash workspace over
/doc.xml. Project LiteXML block-id diffs into the existing review overlay.
Pin @haklex/* to 0.41.0 for optional document-tool plugins.
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