Skip to content

feat(mcp): extract buildFocusManifestValidation into @loopover/engine so loopover_validate_config can work offline #6269

Description

@JSONbored

Context

Concrete instance of #6227's shared-core question, partially ready unlike its two siblings. loopover_validate_config's underlying manifest-PARSING core (parseFocusManifestContent) is already engine-side via a partial shim (src/signals/focus-manifest.ts over packages/loopover-engine/src/focus-manifest.ts). But the thin wrapper that actually builds the validation RESULT, buildFocusManifestValidation (src/services/focus-manifest-validation.ts), is app-only — it hasn't been extracted to the engine yet. src/mcp/server.ts:3094-3100 (remote) calls it directly; packages/loopover-mcp/bin/loopover-mcp.js:794-801 (local) proxies over HTTP (apiPost("/v1/validate/focus-manifest", input)).

Requirements

  • Extract buildFocusManifestValidation from src/services/focus-manifest-validation.ts into packages/loopover-engine/src/ (following this repo's established extraction pattern — see how other src/services/* functions were previously moved into the engine, e.g. via #4879-style PRs), leaving a re-export shim at the original src/ location for any other existing callers.
  • Add the necessary exports map entry to packages/loopover-engine/package.json.
  • Update packages/loopover-mcp/bin/loopover-mcp.js's loopover_validate_config tool handler to call the extracted function directly instead of apiPost.
  • Verify no behavior change to the remote server (which should continue working via its existing import, now resolving through the shim).

Test Coverage Requirements

99%+ Codecov patch coverage on the extraction and the local handler change; all existing tests for focus-manifest-validation.ts must continue passing against the new location.

Deliverables

  • buildFocusManifestValidation extracted into @loopover/engine, with a shim left at its original location.
  • Local loopover_validate_config computes the result in-process.

Expected Outcome

A user running the local MCP server can validate a .loopover.yml/focus manifest fully offline.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions