v0.11.3
Released May 4, 2026 · All releases
Changes
- Fix two bugs in the MCP server:
serverInfo.versionwas hardcoded as0.10.1and never tracked the package version. It now reads the version frompackage.jsonat startup so each release reports correctly.- Tool calls that returned arrays (notably
refrakt.plugins_list) failed the SDK's response validator becausestructuredContentwas set unconditionally and the SDK rejects non-record values. Arrays are now wrapped under{ items: [...] }, and the field is omitted entirely for non-object results. - Fix plan tools failing with
ENOENT: ... 'plan'when the MCP server is launched from outside the project directory (e.g. viascripts/start-mcp.sh, whichcds to/tmpbefore exec). - The MCP server already accepted
--cwdand forwarded it to its core tools, but plugin-contributed tools dropped it:buildPluginToolcalledcommand.mcpHandler(input)without the cwd context, so@refrakt-md/plan's handlers fell back toprocess.cwd()when resolvingrefrakt.config.jsonand the default'plan'directory. @refrakt-md/types:CliPluginCommand.mcpHandlernow takes an optional secondctx?: McpHandlerContextargument carrying the server's resolved cwd. NewMcpHandlerContexttype is re-exported from the package entry. The change is non-breaking — existing handlers that ignore the second argument keep compiling.@refrakt-md/mcp:buildPluginToolforwards the server'sctxto the plugin'smcpHandler. The argv-shimming fallback path is unchanged (it still usesprocess.cwd()); plugins that need project-cwd awareness should provide an explicitmcpHandler.@refrakt-md/plan: every*McpHandleraccepts the newctx, threads it intoresolvePlanDir, and absolutizes the resolveddiragainstctx.cwdso relative paths from any source (flag, env, config, default) consistently resolve against the project root.