Skip to content

Embed documentation and examples in tome-builder MCP server at build time#1741

Merged
JonLMyers merged 1 commit intoJonLMyers/Eldritch-vscode-Extensionfrom
vscode-tome-builder-embed-assets-18259529299702978922
Feb 28, 2026
Merged

Embed documentation and examples in tome-builder MCP server at build time#1741
JonLMyers merged 1 commit intoJonLMyers/Eldritch-vscode-Extensionfrom
vscode-tome-builder-embed-assets-18259529299702978922

Conversation

@JonLMyers
Copy link
Copy Markdown
Collaborator

This change modifies the vscode-tome-builder MCP server to embed documentation and tome examples at build time. This removes the runtime dependency on the repository file structure and allows the extension to be distributed with all necessary content. A new build script bundle-assets.js generates a src/assets.ts file containing the content of docs/ and tavern/tomes/, which is then imported by the server. The generated file is gitignored.


PR created automatically by Jules for task 18259529299702978922 started by @JonLMyers

- Created `scripts/bundle-assets.js` to read docs and tomes at build time and generate `src/assets.ts`.
- Added `prebuild` script to `package.json` to trigger asset bundling.
- Refactored `src/index.ts` to use embedded assets instead of runtime file reading.
- Removed unused `src/docs.ts` and `src/examples.ts`.
- Added `src/assets.ts` to `.gitignore`.

Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@JonLMyers JonLMyers merged commit bf5192e into JonLMyers/Eldritch-vscode-Extension Feb 28, 2026
@JonLMyers JonLMyers deleted the vscode-tome-builder-embed-assets-18259529299702978922 branch February 28, 2026 02:37
github-merge-queue Bot pushed a commit that referenced this pull request Mar 5, 2026
* Adding Extension

* Generate vscode-tome-builder assets from source (#1721)

* feat: generate vscode-tome-builder documentation and examples from source

- Add `scripts/generate-assets.ts` to read documentation and tome examples from the repo root.
- Update `package.json` to run generation before compilation.
- Update `tsconfig.json` to exclude the scripts directory.
- Update `docs.ts` and `examples.ts` with generated content.

Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>

* feat: generate vscode-tome-builder assets from source

- Add `scripts/generate-assets.ts` to read documentation and tome examples from the repo root.
- Update `package.json` to run generation before compilation.
- Update `tsconfig.json` to exclude the scripts directory.
- Update `.gitignore` to ignore generated `docs.ts` and `examples.ts` in `mcp-server/src`.
- Remove existing `docs.ts` and `examples.ts` to stop tracking them.

Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>

* feat: vscode-tome-builder reads docs and examples from disk at runtime

- Update `mcp-server/src/docs.ts` to locate the repo root and read markdown docs from `docs/_docs/user-guide/`.
- Update `mcp-server/src/examples.ts` to locate the repo root and read tome examples from `tavern/tomes/`.
- Update `mcp-server/src/index.ts` to use the new runtime file reading functions.
- Revert previous build-time generation scripts and config changes.

Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>

* feat: vscode-tome-builder reads docs and examples from disk at runtime

- Update `mcp-server/src/index.ts` to locate the repo root and read markdown docs from `docs/_docs/user-guide/` and tome examples from `tavern/tomes/` at runtime.
- Remove redundant `mcp-server/src/docs.ts` and `mcp-server/src/examples.ts` files.
- Revert previous build-time generation scripts, config changes, and dependencies.
- Revert `.gitignore` changes as no files are generated anymore.

Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>

* feat: introduce eldritch-lsp and switch tome-builder to runtime assets

- **vscode-tome-builder**: Switch to runtime parsing for documentation and examples.
    - `index.ts` now locates repo root and reads files directly.
    - Removed redundant `docs.ts` and `examples.ts`.
- **eldritch-lsp**: Create new Rust Language Server crate.
    - Located in `implants/lib/eldritch/eldritch-lsp`.
    - Added to `implants` workspace.
    - Features linter with optimization hooks (`LintRule`).
    - Indexes standard library from `implants/lib/eldritch/stdlib`.
    - Integrates `eldritch-core` for parsing.

Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>

* premerge

* removing build files

* Embed docs and examples in tome-builder MCP server (#1741)

- Created `scripts/bundle-assets.js` to read docs and tomes at build time and generate `src/assets.ts`.
- Added `prebuild` script to `package.json` to trigger asset bundling.
- Refactored `src/index.ts` to use embedded assets instead of runtime file reading.
- Removed unused `src/docs.ts` and `src/examples.ts`.
- Added `src/assets.ts` to `.gitignore`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: JonLMyers <14082284+JonLMyers@users.noreply.github.com>
Co-authored-by: Hulto <7121375+hulto@users.noreply.github.com>
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