Feature/headless agent layer - #133
Open
dannydoor wants to merge 31 commits into
Open
Conversation
…make schema concise
…al stuffs, including error format, and naming issue
…ent-layer Change top hits into best hit
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed truncation bugs in new remark-generation code and an overly broad .gitignore rule that would ignore all Markdown files repository-wide.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces a new mcp/ subtree that packages Foldseek Server capabilities as an MCP server for headless/agent use, including deterministic build artifacts and a release workflow, while also refactoring shared frontend helpers into standalone modules.
Changes:
- Add
mcp/core(private library) andmcp/server(MCP server) with schemas, artifact resources, local input handling, and extensive offline tests. - Add deterministic packaging scripts for a minimal plugin runtime and a Desktop
.mcpbbundle, plus a GitHub Actions release workflow. - Refactor/move several frontend helpers into
frontend/lib/*modules and build tooling (frontend/build-tools/*), removing the previous page-global “resultsApi” surface.
File summaries
| File | Description |
|---|---|
| mcp/server/test/transport.test.js | Adds transport/HTTP/security contract tests for the MCP server. |
| mcp/server/test/surface.test.js | Verifies the advertised MCP tool surface and stable error codes. |
| mcp/server/test/resources.test.js | Tests artifact resource listing/reading and traversal/size protections. |
| mcp/server/test/release.test.js | Ensures release graph isolation and manifest/tool parity. |
| mcp/server/test/plugin-runtime.test.js | Verifies deterministic plugin-runtime zip build and tool surface. |
| mcp/server/test/inputs.test.js | Tests allowlisted local file inputs and refusal cases. |
| mcp/server/src/resources.js | Implements artifact resource listing and bounded reads. |
| mcp/server/package.json | Defines the MCP server package, deps, and test/build scripts. |
| mcp/server/pack-plugin-runtime.mjs | Builds a minimal, self-contained runtime zip via esbuild + licenses. |
| mcp/server/pack-mcpb.mjs | Builds a Claude Desktop .mcpb bundle from the same runtime. |
| mcp/server/manifest.json | Desktop manifest describing tools and configuration. |
| mcp/server/build.mjs | Bundles server + core for release artifacts. |
| mcp/server/bin/foldseek-server-mcp.js | Entry point selecting source vs bundled runtime and argv/env handling. |
| mcp/server/.mcpbignore | Excludes dev-only files from Desktop bundle packaging. |
| mcp/README.md | Documents the new mcp/ packages, quick start, and test expectations. |
| mcp/core/test/schemas.test.js | Adds/extends schema validation tests for summaries and artifacts. |
| mcp/core/test/artifact-gc.test.js | Adds tests for GC behavior, symlink safety, and result cache cleanup. |
| mcp/core/src/taxonomy.js | Adds taxonomy-name resolution and filter parsing/inspection helpers. |
| mcp/core/src/summary.js | Adds bounded “result summary” generation with validation. |
| mcp/core/src/submit.js | Adds forwarding/submission builders for different destinations. |
| mcp/core/src/structures.js | Adds structure fetching/reconstruction helpers and accession loading. |
| mcp/core/src/store.js | Implements filesystem state store for tickets/results/selections. |
| mcp/core/src/schemas.js | Defines public contract schemas + validators. |
| mcp/core/src/results.js | Adds result table/row/selection helpers and forwarding integration. |
| mcp/core/src/motif.js | Adds motif parsing/validation and chain normalization logic. |
| mcp/core/src/metrics.js | Adds metric semantics and default ranking/sorting helpers. |
| mcp/core/src/inputs.js | Adds allowlisted local input path resolution + shared dir management. |
| mcp/core/src/index.js | Exposes core library surface and re-exports shared frontend helpers. |
| mcp/core/src/facts.js | Adds pure helpers for identity/counts/completeness/provenance/serialization. |
| mcp/core/README.md | Documents responsibilities, layout, and offline testing for core. |
| mcp/core/package.json | Defines the private core package and its export entry. |
| frontend/webpack.frontend.config.js | Updates PO tooling paths and babel-loader roots for the refactor. |
| frontend/SendToMixin.vue | Removes the old send-to mixin implementation. |
| frontend/Search.vue | Removes SearchApi mixin usage. |
| frontend/ResultFoldseekDB.vue | Removes large inline explanatory comments (functional logic unchanged here). |
| frontend/ResultFoldMason.vue | Removes API augmentation/sending code tied to the deleted page API. |
| frontend/ResultFoldDiscoDB.vue | Removes large inline explanatory comments (functional logic unchanged here). |
| frontend/Queue.vue | Removes queue page API registration code tied to the deleted page API. |
| frontend/MultimerSearch.vue | Removes SearchApi mixin usage. |
| frontend/lib/vue-simple-portal/index.js | Adds explicit .js extensions for ESM compatibility. |
| frontend/lib/vue-simple-portal/components/Portal.js | Adds explicit .js extensions for ESM compatibility. |
| frontend/lib/ticketRoute.js | Trims comment blocks while keeping routing helpers. |
| frontend/lib/taxonomyFilter.js | Trims comment blocks while keeping subtree expansion logic. |
| frontend/lib/targetName.js | New helper module extracted from Utilities for accession/chain parsing. |
| frontend/lib/resultSort.js | Trims comment blocks; keeps shared sorting helpers. |
| frontend/lib/resultsApi.js | Removes the global page API registry module. |
| frontend/lib/pdbAssembly.js | New helper module extracted from Utilities for PDB assembly operations. |
| frontend/lib/package.json | Marks frontend/lib as ESM with sideEffects disabled. |
| frontend/lib/hitId.js | New helper module for canonical hit id normalization/splitting. |
| frontend/lib/alignmentColumns.js | New helper module for alignment-column ↔ residue mapping. |
| frontend/lib/accession.js | Switches accession fetching to fetch and expands Q-BioLiP mapping outputs. |
| frontend/lib/.babelrc | Adds a .babelrc to extend the parent config for the ESM lib subtree. |
| frontend/FoldMasonSearch.vue | Removes page API surface code tied to deleted resultsApi. |
| frontend/FoldDiscoSearch.vue | Removes SearchApi mixin + Q-BioLiP API surface code tied to deleted resultsApi. |
| frontend/build-tools/po-reader.js | Adds PO parser implementation under build-tools. |
| frontend/build-tools/po-loader.js | Adds PO webpack loader under build-tools. |
| .gitignore | Adds ignores for MCP server dist artifacts and (currently) all *.md. |
| .github/workflows/mcp-release.yml | Adds a workflow to test/build and optionally publish immutable MCP runtime assets. |
Review details
Files not reviewed (1)
- mcp/server/package-lock.json: Generated file
- Files reviewed: 73/79 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.