Commit Graph

4630 Commits

Author SHA1 Message Date
YeonGyu-Kim 649a83d046 fix(mcp): user config overrides Claude Code .mcp.json with collision warning
Previously, Claude Code's .mcp.json would silently override OpenCode user
config when MCP server names collided. This was unexpected behavior since
users expect their explicit OpenCode configuration to take precedence.

Changes:
1. Swapped merge order: Claude Code .mcp.json is now merged BEFORE user
   config, so user config wins on collision
2. Added warning log when user config overrides a Claude Code MCP server:
   'warning: MCP server X from user config overrides Claude Code .mcp.json'
3. Added comprehensive tests for collision scenarios

Fixes #2946
2026-04-02 13:32:11 +09:00
YeonGyu-Kim 680bd682c7 fix(prometheus): respect fallback chain when no explicit model configured
Previously, Prometheus always used params.currentModel (UI-selected model)
when no explicit configuration existed. This bypassed the intended fallback
chain (claude-opus-4-6 → gpt-5.4 → glm-5 → gemini-3.1-pro).

Now, the UI-selected model is only used if it matches one of the models
in Prometheus's fallback chain. Otherwise, the fallback chain resolution
takes over and finds an available model.

Fixes #2986
2026-04-02 13:32:00 +09:00
YeonGyu-Kim 2440ed9a6f fix(hook): add tool_use/tool_result pair validator to prevent API errors
Adds a defensive tool-pair-validator hook that runs as the final step in
the messages transform pipeline. When compaction or context-window recovery
removes user messages containing tool_result blocks without removing the
preceding assistant message with tool_use blocks, this validator detects
the mismatch and either:

1. Injects missing tool_result parts into the next user message, or
2. Creates a synthetic user message with placeholder tool_results

This prevents Anthropic API errors like 'tool_use ids found without
tool_result blocks immediately after'.

Fixes #3014
2026-04-02 13:31:48 +09:00
YeonGyu-Kim a637cca702 Merge pull request #3013 from code-yeongyu/fix/issue-2971-skill-shortname
fix(skill): resolve namespaced skills by short name
2026-04-02 10:43:52 +09:00
YeonGyu-Kim 4d751d110b Merge pull request #3012 from code-yeongyu/fix/issue-3010-commands-file
fix(command-discovery): skip non-directory .claude/commands path
2026-04-02 10:43:50 +09:00
YeonGyu-Kim 2275d87a16 fix(skill): resolve namespaced skills by short name
When a skill has a namespaced name like 'superpowers/systematic-debugging',
users see the short name 'systematic-debugging' in the listing but can't
invoke it — the resolver only accepts exact full names.

Add short-name fallback: if exact match fails, try matching the basename
of namespaced skills. Only resolves when unambiguous (single match).

- Exact match still takes priority
- Ambiguous short names (multiple namespaces) fall through to error
- 4 new tests covering all cases

Fixes #2971
2026-04-02 10:40:11 +09:00
YeonGyu-Kim bb85e40a78 fix(command-discovery): skip non-directory .claude/commands path
When .claude/commands exists as a file instead of a directory,
readdirSync throws ENOTDIR and crashes command discovery, stalling
OMO initialization. Add statSync().isDirectory() guard with a
warning log.

Fixes #3010
2026-04-02 10:36:18 +09:00
YeonGyu-Kim 941e265aa1 Merge branch 'fix/p0-2-atomic-migration' into dev 2026-04-01 18:34:05 -07:00
YeonGyu-Kim 9418927162 fix(config): make plugin entry migration atomic with temp-file + rename
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 18:33:29 -07:00
YeonGyu-Kim 5bd0b5fa08 fix(tests): align agent-config test with task_system default revert 2026-04-01 18:26:12 -07:00
YeonGyu-Kim 7a13807cbb Merge branch 'fix/p0-10-nested-ci-tests' into dev 2026-04-01 18:23:18 -07:00
YeonGyu-Kim 98c1c72fff Merge branch 'fix/p0-9-remove-ai-slops' into dev 2026-04-01 18:23:18 -07:00
YeonGyu-Kim fa8a9f8669 Merge branch 'fix/p0-7-tmux-cleanup' into dev 2026-04-01 18:23:18 -07:00
YeonGyu-Kim 56cd1edb11 Merge branch 'fix/p0-5-task-system-default' into dev 2026-04-01 18:23:18 -07:00
YeonGyu-Kim 985c72d8d3 Merge branch 'fix/p0-4-omo-agent-variant' into dev 2026-04-01 18:23:18 -07:00
YeonGyu-Kim 842434c81f fix(commands): use dynamic base branch and safe rollback in remove-ai-slops
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 18:21:00 -07:00
YeonGyu-Kim 624a6becc7 fix(config): revert task_system default to false to avoid breaking change 2026-04-01 18:20:05 -07:00
YeonGyu-Kim 951bca5399 fix(ci): include nested test files in isolated test execution
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 18:19:48 -07:00
YeonGyu-Kim db23533adf fix(tmux): properly cleanup isolated container pane on first subagent deletion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 18:18:32 -07:00
YeonGyu-Kim 9c85ef446e fix(call-omo-agent): use variant-aware model parsing for overrides
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 18:17:15 -07:00
YeonGyu-Kim 43023b1eb4 fix(delegate-task): preserve inline variant from category model string
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 18:16:37 -07:00
YeonGyu-Kim 51d9685571 fix(start-work): use Atlas list key in command config 2026-04-01 17:45:16 -07:00
YeonGyu-Kim f4b8e1c365 fix(claude-code-hooks): cache idle hook config and parent lookups
Reduce repeated session.idle work by reusing hook config loads across a short TTL and by retrying parent session lookup instead of permanently caching transient failures.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 17:43:00 -07:00
YeonGyu-Kim 724d21b3cc fix(start-work): restore atlas-first slash discovery
Static slash-command discovery runs before agent registration, so /start-work regressed to Sisyphus even though config-time wiring still needed Atlas-aware fallback. Split builtin command resolution so discovery stays Atlas-first while command config remains availability-aware.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 17:32:46 -07:00
YeonGyu-Kim 1fed569cab fix(ulw-loop): read loop task from user_message
Preserve the actual /ulw-loop task text from the skill tool payload instead of falling back to the default prompt when command arguments are passed separately.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 17:19:45 -07:00
YeonGyu-Kim 8fe057b34a fix(start-work): restore atlas native command routing
Route the builtin /start-work command to Atlas when Atlas is available so OpenCode resolves the native command agent correctly before plugin hooks run.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-01 17:19:37 -07:00
github-actions[bot] 134dd15c29 @yehweihsu has signed the CLA in code-yeongyu/oh-my-openagent#3011 2026-04-01 23:37:05 +00:00
github-actions[bot] 804ca0b988 @sihy233 has signed the CLA in code-yeongyu/oh-my-openagent#3004 2026-04-01 15:17:01 +00:00
github-actions[bot] e49ad5cb54 @GreenPi290 has signed the CLA in code-yeongyu/oh-my-openagent#2991 2026-04-01 06:53:14 +00:00
YeonGyu-Kim ea14a1a346 fix(auto-slash-command): resolve project commands from session dir
Use the plugin session directory instead of process.cwd() when resolving project slash commands. This restores project and opencode-project slashcommand behavior when the runtime cwd differs from the actual session workspace.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-31 22:24:54 -07:00
YeonGyu-Kim 7f846b2da3 fix(start-work): restore atlas handoff
Keep native /start-work resolvable on Sisyphus, but switch the work session back to Atlas when Atlas is registered. Stamp the outgoing agent with Atlas's actual list-display key so config→start-work execution resolves correctly and still falls back to Sisyphus when Atlas is unavailable.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-31 22:24:54 -07:00
YeonGyu-Kim d029bc7621 Merge pull request #2992 from code-yeongyu/fix/primary-only-agents
fix(agents): make sisyphus, hephaestus, atlas primary-only (not callable as subagents)
2026-03-31 22:22:16 -07:00
YeonGyu-Kim 1316a7d8d1 fix(agents): make sisyphus, hephaestus, atlas primary-only (not callable as subagents)
These agents should only be usable as primary session agents, not as
subagent targets via call_omo_agent/task(). Previously MODE was 'all'
which allowed them to be spawned as subagents, leading to confusing
behavior (e.g. Atlas delegating to Hephaestus as a subagent).

Subagent-callable agents remain: oracle, explore, librarian,
multimodal-looker, metis, momus, sisyphus-junior.

Note: Prometheus is not a BuiltinAgentName and is only invoked via
slash commands, so no change needed there.
2026-04-01 14:15:08 +09:00
YeonGyu-Kim a3f9eb1337 fix(start-work): fall back to sisyphus without atlas
/start-work should leave plan mode even when Atlas is unavailable. This prevents Prometheus from being persisted into boulder state and keeping resumed work sessions in md-only mode.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-31 18:52:09 -07:00
YeonGyu-Kim dc1c410405 fix(delegate-task): update test category references from deep to quick
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 18:11:29 -07:00
YeonGyu-Kim 256aaba482 fix(anthropic-recovery): improve executor test coverage and assertions
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 18:11:28 -07:00
YeonGyu-Kim 366ebb33c4 feat(openclaw): improve dispatcher and integration
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:45 -07:00
YeonGyu-Kim 94a2b8ec2c feat(lsp): add extension inference and improve diagnostics
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:42 -07:00
YeonGyu-Kim 3c77c048dd fix(comment-checker): improve pending calls handling and add tests
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:38 -07:00
YeonGyu-Kim 439c9a6499 feat(claude-code-hooks): improve session handling and add tests
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:29 -07:00
YeonGyu-Kim a720ef5334 feat(context-injector): enhance context collector functionality
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:26 -07:00
YeonGyu-Kim 116b1f9e4e fix(anthropic-recovery): fix retry timer memory leak in context window recovery
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:24 -07:00
YeonGyu-Kim 990095d22e fix(dispose): improve hook disposal and plugin cleanup
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:19 -07:00
YeonGyu-Kim 9795cc5b3d docs: update deep category model references from gpt-5.3-codex to gpt-5.4 2026-03-31 17:26:40 -07:00
YeonGyu-Kim 3d56df4e1b feat(deep): upgrade default model from gpt-5.3-codex to gpt-5.4
Deep category now uses gpt-5.4 as its default model across all providers
(openai, github-copilot, venice, opencode), matching Hephaestus's GPT 5.4
upgrade. The requiresModel constraint is removed since gpt-5.4 is widely
available. Adds openai/gpt-5.3-codex -> openai/gpt-5.4 config migration
for existing user configs. Deep category prompt optimized for GPT 5.4's
stronger native capabilities (leaner, less verbose).
2026-03-31 17:26:30 -07:00
YeonGyu-Kim ce0d3581f0 fix: revert delegate-task to string category schema, fix mock isolation and restore UB7 originals 2026-03-31 17:25:00 -07:00
YeonGyu-Kim 92d70cff5b feat: add review-work and ai-slop-remover as built-in skills, add remove-ai-slops command
Embed user-level skills into the plugin's built-in system so they ship
with the product rather than requiring per-user configuration.

- review-work: 5-agent parallel post-implementation review orchestrator
- ai-slop-remover: per-file AI-generated code smell detector and remover
- /remove-ai-slops: command that orchestrates parallel ai-slop-remover runs
2026-03-31 17:22:34 -07:00
YeonGyu-Kim 0799b46d49 Merge branch 'fix/ub8-regression' into dev 2026-03-31 17:08:45 -07:00
YeonGyu-Kim 3f457fd8f1 Merge branch 'fix/ub7-regression' into dev 2026-03-31 17:08:45 -07:00
YeonGyu-Kim e84c1faffa Merge branch 'fix/ub6-regression' into dev 2026-03-31 17:08:45 -07:00