Commit Graph

4324 Commits

Author SHA1 Message Date
YeonGyu-Kim 9bcaddf732 Use shared background task notification template
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:43:33 +09:00
YeonGyu-Kim 833fb12331 Add background task notification template coverage
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:43:33 +09:00
YeonGyu-Kim f39a0182eb Merge pull request #3054 from code-yeongyu/fix/p0-6-mcp-local-scope-subdirectory
Fix local MCP scope loading in subdirectories
2026-04-03 17:32:11 +09:00
YeonGyu-Kim b2b8f73d0d Fix tar traversal error normalization
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:28:22 +09:00
YeonGyu-Kim 22c8e8388f Fix Linux ZIP preflight entry listing
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:23:09 +09:00
YeonGyu-Kim 6b8d9df316 Add MCP scope subdirectory regression tests
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:14:40 +09:00
YeonGyu-Kim f269d2fcc5 Fix local MCP scope path containment
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:14:40 +09:00
YeonGyu-Kim ed06428ba3 fix(delegate-task): strip wrapping chars from subagent_type before lookup
LLMs sometimes wrap agent names in backslashes, quotes, or slashes
(e.g. \hephaestus\ instead of hephaestus). The trim() call only
removed whitespace, causing "Agent not found" errors during delegation.

Now strips leading/trailing backslashes, quotes, and slashes before
the case-insensitive agent lookup.

Adds regression tests for backslash-wrapped, double-quoted, and
single-quoted agent names.

Fixes: release blocker — delegate_task to hephaestus failing in
pre-publish review sessions.
2026-04-03 17:13:11 +09:00
YeonGyu-Kim c78a9e640a Revert "Merge pull request #3047 from code-yeongyu/fix/p0-4-tmux-default-isolation"
This reverts commit 2d13e125bb, reversing
changes made to c45fc83caa.
2026-04-03 17:10:23 +09:00
YeonGyu-Kim f84d311c64 Revert "Merge pull request #3048 from code-yeongyu/fix/p0-2-https-enforcement-gaps"
This reverts commit ede561cb74, reversing
changes made to 2d13e125bb.
2026-04-03 17:10:23 +09:00
YeonGyu-Kim ede561cb74 Merge pull request #3048 from code-yeongyu/fix/p0-2-https-enforcement-gaps
Fix HTTP hook HTTPS enforcement gaps
2026-04-03 17:09:19 +09:00
YeonGyu-Kim 2d13e125bb Merge pull request #3047 from code-yeongyu/fix/p0-4-tmux-default-isolation
Revert tmux default isolation to inline
2026-04-03 17:09:19 +09:00
YeonGyu-Kim 3eb1430a43 Fix HTTP hook HTTPS enforcement gaps
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:07:17 +09:00
YeonGyu-Kim 6722b395ea Regenerate schema for inline tmux isolation default
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:06:22 +09:00
YeonGyu-Kim 3f0d68bfa3 Align tmux plugin fallback with inline isolation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:06:22 +09:00
YeonGyu-Kim 9fb9e15222 Revert tmux config default isolation to inline
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:06:22 +09:00
github-actions[bot] c45fc83caa @haimingZZ has signed the CLA in code-yeongyu/oh-my-openagent#3044 2026-04-03 04:10:25 +00:00
github-actions[bot] b7f97723e8 @xsfX20 has signed the CLA in code-yeongyu/oh-my-openagent#3043 2026-04-03 03:03:01 +00:00
github-actions[bot] 0478d278f1 @adefiqri12 has signed the CLA in code-yeongyu/oh-my-openagent#3042 2026-04-02 21:05:51 +00:00
YeonGyu-Kim 9c67585519 Merge pull request #3028 from code-yeongyu/fix/issue-2923-gpt41mini-toolcall
fix(models): mark gpt-4.1-mini and gpt-4.1-nano as supporting tool calls
2026-04-02 15:46:09 +09:00
YeonGyu-Kim 871d525074 Merge pull request #3027 from code-yeongyu/fix/issue-3021-skill-mcp-session
fix(skill-mcp): use correct sessionID when registering skill MCP connections
2026-04-02 15:46:05 +09:00
YeonGyu-Kim 156c1f4aeb fix(models): mark gpt-4.1-mini and gpt-4.1-nano as supporting tool calls
Fixes #2923
2026-04-02 15:45:39 +09:00
YeonGyu-Kim 027a6b0039 fix(skill-mcp): use correct sessionID when registering skill MCP connections
Fixes #3021
2026-04-02 15:45:39 +09:00
YeonGyu-Kim 34a37dc946 3.14.1 2026-04-02 15:16:39 +09:00
YeonGyu-Kim a599376787 chore: regenerate schema 2026-04-02 15:16:37 +09:00
YeonGyu-Kim fba20f9f09 Merge pull request #3019 from code-yeongyu/fix/issue-2986-prometheus-fallback
fix(prometheus): respect fallback chain when no explicit model configured
2026-04-02 15:10:43 +09:00
YeonGyu-Kim 39eefe4d4d Merge pull request #3018 from code-yeongyu/fix/issue-2996-tavily-graceful
fix(mcp): handle missing Tavily API key gracefully
2026-04-02 15:10:41 +09:00
YeonGyu-Kim 1b5114b256 Merge pull request #3017 from code-yeongyu/fix/issue-3014-tool-pair-validation
fix(hook): add tool_use/tool_result pair validator
2026-04-02 15:10:38 +09:00
YeonGyu-Kim f0309dff24 Merge pull request #3016 from code-yeongyu/fix/issue-3003-ripgrep-autodownload
fix(grep): enable ripgrep auto-download when not found in PATH
2026-04-02 15:10:35 +09:00
YeonGyu-Kim c173bb1337 Merge pull request #3015 from code-yeongyu/fix/issue-2946-mcp-merge-order
fix(mcp): user config overrides Claude Code .mcp.json with collision warning
2026-04-02 15:10:32 +09:00
YeonGyu-Kim 710a8ed4ee Merge pull request #3026 from code-yeongyu/fix/security-mcp-env-expansion
fix(security): restrict env var expansion in MCP configs
2026-04-02 15:10:13 +09:00
YeonGyu-Kim 04876d88f7 Merge pull request #3025 from code-yeongyu/fix/security-http-hooks
fix(security): enforce HTTPS for HTTP hook URLs
2026-04-02 15:10:10 +09:00
YeonGyu-Kim 9a7bb5eeb7 Merge pull request #3024 from code-yeongyu/fix/security-tar-containment
fix(security): add archive extraction containment validation
2026-04-02 15:09:52 +09:00
YeonGyu-Kim 97349c91eb Merge pull request #3023 from code-yeongyu/fix/security-file-traversal
fix(security): confine file resolution to project roots
2026-04-02 15:09:50 +09:00
YeonGyu-Kim c05113bc03 Merge pull request #3022 from code-yeongyu/fix/security-env-cleaner
fix(security): filter merged MCP env before spawn
2026-04-02 15:09:47 +09:00
YeonGyu-Kim 5a2814980e fix(security): enforce HTTPS for HTTP hook URLs
Add TLS requirement for HTTP hook destinations:
- Warn when plain http:// URLs are used
- Reject remote http:// in production mode
- Allow http://localhost and http://127.0.0.1 for dev

Prevents secret exfiltration over unencrypted channels.
2026-04-02 15:01:15 +09:00
YeonGyu-Kim d861d51959 fix(security): add archive extraction containment validation
Validate tar and zip entries before extraction to prevent path traversal:
- Reject absolute paths in archives
- Reject .. traversal paths
- Reject symlinks pointing outside extraction dir
- New archive-entry-validator module with comprehensive tests

Addresses: security audit finding for unsafe archive extraction.
2026-04-02 15:01:15 +09:00
YeonGyu-Kim 98659783c0 fix(security): confine file resolution to project roots
Block traversal, out-of-root absolute path, and symlink escapes for @file references, file:// URIs, and config skill file loading while logging rejected attempts.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-02 14:55:35 +09:00
YeonGyu-Kim e8c5727a22 fix(mcp): restrict env var expansion in MCP configs
Block sensitive env var interpolation in MCP config expansion so repo and plugin MCP definitions cannot exfiltrate secrets by default.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-02 14:55:01 +09:00
YeonGyu-Kim 4fe49a6151 fix(skill-mcp-manager): filter merged MCP env before spawn
Apply env filtering after customEnv merge to prevent filtered
variables (API keys, secrets) from being reintroduced through
custom environment configuration.
2026-04-02 14:52:02 +09:00
YeonGyu-Kim b151ebbc17 chore: remove test artifacts from worker run 2026-04-02 13:57:14 +09:00
YeonGyu-Kim 5bf3aa1cfb fix(test): remove mock.module tests that corrupt other test suites
Bun's mock.module() leaks across test files in single-process runs,
causing 357 unrelated test failures. Removing these tests for now.
The code fix is correct and verified manually.
2026-04-02 13:57:05 +09:00
YeonGyu-Kim 5d68de79d0 fix(types): return type RemoteMcpConfig | undefined for createWebsearchConfig 2026-04-02 13:55:21 +09:00
YeonGyu-Kim bc07c21e50 fix(test): rewrite prometheus tests to verify behavior not log messages 2026-04-02 13:54:52 +09:00
YeonGyu-Kim a695730891 fix(mcp): handle missing Tavily API key gracefully
Previously, when websearch was configured with Tavily provider and the
TAVILY_API_KEY environment variable was not set, the entire plugin would
fail to load with no visible error to the user.

Changes:
1. createWebsearchConfig now returns undefined when Tavily key is missing
2. Added warning log: '[websearch] Tavily API key not found, skipping websearch MCP'
3. createBuiltinMcps now skips undefined configs instead of adding them
4. Added tests for both missing and present Tavily API key scenarios

Fixes #2996
2026-04-02 13:32:44 +09:00
YeonGyu-Kim 4c4efc416a fix(grep): enable ripgrep auto-download when not found in PATH
The auto-download mechanism for ripgrep existed but was never called.
When 'rg' wasn't in PATH, the grep tool silently fell back to GNU grep,
which wastes ~10% token budget due to noisy results.

Changes:
1. Wired up resolveGrepCliWithAutoInstall() in the CLI resolution path
2. When 'rg' is not found in PATH, auto-downloads ripgrep v14.1.1
3. Caches the downloaded binary in OpenCode data directory
4. Falls back to GNU grep only if auto-download fails (with warning)

Fixes #3003
2026-04-02 13:32:23 +09:00
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