Conversation
…OpenCode schema compliance
Fix two validation errors in generated OpenCode configuration:
- Agent frontmatter: change `tools` from comma-separated string to YAML object
mapping (e.g., `tools: {read: true, write: true}`) per OpenCode schema
- MCP config (`opencode.json`): merge `command` + `args` into a single
`command` array and add required `enabled: true` field
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.
Fixes issue
Fixes #128, Fixes #129
Changes proposed
Issue #129 — Agent tools field uses invalid string format
OpenCode schema expects
toolsasobject | undefinedin agent YAML frontmatter, butnoskills initgenerated a comma-separated string.Before:
After:
Changed in
buildExecutorAgentMd()andbuildVerifierAgentMd()inopencode.ts.Issue #128 — MCP config uses invalid command/args structure
OpenCode schema expects
commandasstring[]and requiresenabled: boolean, butnoskills initgeneratedcommandas string +argsarray withoutenabled.Before:
{ "mcp": { "noskills": { "type": "local", "command": "npx", "args": ["eser@latest", "noskills", "mcp-serve"] } } }After:
{ "mcp": { "noskills": { "type": "local", "command": ["npx", "eser@latest", "noskills", "mcp-serve"], "enabled": true } } }Changed in
OpenCodeMcpEntrytype andsyncMcp()inopencode.ts.Tests
Updated 5 existing tests and re-structured 2 validation tests to cover the new schema format. Existing config preservation behavior is unchanged.
Affected files
pkg/@eserstack/noskills/sync/adapters/opencode.tspkg/@eserstack/noskills/sync/adapters/opencode.test.tsCheck List (Check all the applicable boxes)
Screenshots
Note to reviewers
opencode.jsonconfigs with user-added MCP servers are preserved via deep merge — only thenoskillsentry is overwritten.