Fix self_hosted CLI routing gaps#7
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.
|
Closing this as stale/superseded rather than rejected on intent. Evidence as of 2026-07-13: this PR head ff89914 is based on older main ancestry and conflicts with current main c9d5ec8 in package.json, src/cli/index.tsx, src/cli/storage.ts, src/lib/apply.ts, src/lib/sync.ts, and src/mcp/server.ts. The storage CLI file modified here has since been deleted on main. Since this PR was opened, main has shipped the current Store/API architecture through @hasna/instructions v0.4.6, including later cloud-mode fixes. This PR targets the older v0.3.4-era shape, including store.mode === "cloud" and legacy storage surfaces, while current main uses the current API transport contract. The July 7 CI success only applies to the stale PR head, not to a conflict-resolved branch against current main, and the PR has no reviews. Any remaining self_hosted/API-mode gap should be handled as a fresh branch from current main with focused tests against the current Store contract. |
Summary
Validation
Task: 6e8c4460-6af1-427f-bad0-cad593acc298
Source PR: #6
GitHub author is andrei-hasna
GitHub reviewer pool: andrei-hasna, kriptoburak
Selected non-author reviewer: kriptoburak