fix: wire goalSessionStore in MCP transports, normalize error formats#252
Merged
windoliver merged 1 commit intomainfrom Apr 14, 2026
Merged
Conversation
…#214) goalSessionStore was initialized by createLocalRuntime but never passed into the McpDeps object in either stdio or HTTP MCP entry points, causing all four goal/session tools to silently return [NOT_CONFIGURED] on the primary agent transport. Also normalizes error formats: toolValidationError() now uses [CODE] bracket format matching error-handler.ts, inline error objects across tool files refactored to shared toolError(), and HTTP-level errors in serve-http.ts normalized to { code, message } via httpError() helper.
7213a74 to
a16b9bd
Compare
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.
Summary
Closes #214.
goalSessionStoreinto both stdio MCP (serve.ts) and HTTP MCP (serve-http.ts) deps — fixesgrove_goal,grove_set_goal,grove_list_sessions,grove_create_sessionsilently returning[NOT_CONFIGURED]on the two most common agent transportstoolError()fromerror-handler.tsas the single canonical error formattertoolValidationError()format fromVALIDATION_ERROR: msg(colon) to[VALIDATION_ERROR] msg(brackets) matching all other error pathsgoal.ts,session.ts,handoffs.ts,ingest.tsto use sharedtoolError()— removes ~70 lines of duplicated boilerplateserve-http.tsfrom plain strings ("Internal server error") to structured{ error: { code, message } }via newhttpError()helper — matches theSESSION_NOT_READYpattern already in usedeps-parity.test.ts) to catch future store wiring omissionsTest plan
deps-parity.test.tspasses (3 tests)