Commit Graph

9 Commits

Author SHA1 Message Date
can1357 bfd9b6efec fix(discovery): load project .opencode config files 2026-08-13 01:14:48 +02:00
roboomp c77dcb1dd7 fix(discovery): merged OpenCode MCP layers before extraction
Deep-merged each MCP server across config layers in ascending precedence, matching OpenCode config merge, so a partial higher-precedence override inherits command/url and env from lower layers instead of shadowing and invalidating the complete definition.

Added a regression test asserting a project override of a single field keeps the user command, transport, and merged env.
2026-08-09 20:25:51 +00:00
roboomp 2a65316c5e fix(discovery): ordered OpenCode MCP sources by precedence
Emitted OpenCode MCP servers highest precedence first so the name-keyed first-wins dedupe keeps the project/opencode.jsonc entry OpenCode would use instead of a shadowing user or opencode.json definition.

Added a regression test asserting same-named servers resolve to the highest-precedence source, including a project enabled:false override.
2026-08-09 20:16:33 +00:00
roboomp 757b332e5c test(discovery): isolated OpenCode config tests
Stubbed os.homedir for every OpenCode discovery test so developer and CI home configs cannot add unexpected MCP servers.
2026-08-09 20:12:18 +00:00
roboomp 73eec8a1e2 fix(discovery): supported OpenCode JSONC configs
Discovered opencode.jsonc at user and project scopes and parsed both supported extensions with Bun JSONC semantics.

Added coverage for JSONC settings, MCP servers, and comments in opencode.json.

Fixes #8104
2026-08-09 20:05:17 +00:00
can1357 74d7dfd2fa Merge PR #3354: fix: migrate coding-agent tests to removeWithRetries (@oldschoola) 2026-06-27 02:06:38 +02:00
Dr Kennedy Umege 5ea467aa3c fix: address gc review edge cases 2026-06-26 12:58:30 +01:00
oldschoola a2854ba768 fix: migrate coding-agent tests from fs.rm to removeWithRetries
Migrate 203 test files (356 call sites) from fs.rm/fs.rmSync to
removeWithRetries/removeSyncWithRetries to reduce EBUSY test failures
on Windows. removeWithRetries is now exported from @oh-my-pi/pi-utils.

The migration uses a regex-based approach that:
- Replaces fs.rm(path, { recursive, force }) → removeWithRetries(path)
- Replaces fs.rmSync(path, { recursive, force }) → removeSyncWithRetries(path)
- Replaces fs.rm(path) → removeWithRetries(path) (no options)
- Skips fs.rm/fs.rmSync inside template literals (bun --eval scripts)
- Adds imports to existing @oh-my-pi/pi-utils import or creates new one
- Removes unused fs imports where fs.rm was the only fs usage (4 files)
2026-06-23 15:28:05 -07:00
roboomp c531117869 fix(mcp): normalized opencode command arrays
Mapped OpenCode MCP array commands to stdio command plus args and accepted environment as the provider-native env key.\n\nAdded regression coverage for array command normalization, environment mapping, env fallback, and empty args omission.\n\nFixes #3180
2026-06-21 09:23:54 +00:00