feat(client): route MCP + CLI to cloud /v1 in self_hosted mode (v0.3.4)#6
Closed
andrei-hasna wants to merge 1 commit into
Closed
feat(client): route MCP + CLI to cloud /v1 in self_hosted mode (v0.3.4)#6andrei-hasna wants to merge 1 commit into
andrei-hasna wants to merge 1 commit into
Conversation
…sted mode The MCP server and the CLI status/feedback commands called the synchronous local SQLite layer (getDatabase), which throws in self_hosted mode. That left the instructions client unable to route to the cloud API for those paths even though CloudConfigStore already existed. - mcp/server.ts: resolve the active store via resolveConfigStore() and route all config/profile/snapshot/stats tools through it; gate local-only tools (sync_*, storage_push/pull/sync, feedback) with a clear self_hosted message instead of crashing on the local DB. - cli status: in cloud mode, build status from the store (mode + counts) so it no longer throws. - cli feedback: no-op ack in cloud mode. - bump to 0.3.4 so fixed vs stale installs are distinguishable. All 278 unit tests pass; MCP verified end-to-end against instructions.hasna.xyz/v1.
Contributor
Author
|
OpenLoops worker review: not merging this PR yet. Validation passed:
Blockers before merge:
Follow-up todos created in the OpenLoops project:
|
Contributor
Author
|
Closing this as stale/superseded, not rejected on intent. Evidence as of 2026-07-13: PR #6 head 3c4c5dd conflicts with current main c9d5ec8 in package.json, src/cli/index.tsx, and src/mcp/server.ts. The PR has no reviews, and the only CI success is from 2026-07-07 on the stale PR head. This commit is also contained in PR #7's branch, and PR #7 was closed as stale/superseded after current main moved on to the newer 0.4.6 Store/API architecture. Any remaining self_hosted/API-mode gap should be handled as a fresh branch from current main with focused tests and fresh review artifacts tied to the new head SHA. |
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.
What
Wires the remaining instructions client paths to the cloud API so the app actually routes to
https://instructions.hasna.xyz/v1in self_hosted mode.Previously only the CLI list/CRUD used
CloudConfigStore; the MCP server and CLIstatus/feedbackstill called the synchronous local SQLite layer (getDatabase), which throws in self_hosted mode — so the MCP was unusable in cloud mode andstatuscrashed.Changes
mcp/server.ts: resolve the store viaresolveConfigStore(); route all config/profile/snapshot/stats tools through it (async). Local-only tools (sync_directory,sync_known,sync_project,storage_push/pull/sync,send_feedback) are gated with a clear self_hosted message instead of crashing.cli status: cloud-aware (mode + counts from the store).cli feedback: no-op ack in cloud mode.Verification
bun test: 278 pass / 0 fail.add/list/delete/status) round-trips against cloud.Architecture: client -> HTTPS + bearer only. No DSN on client.