Commit Graph

6340 Commits

Author SHA1 Message Date
YeonGyu-Kim bc2ed016e4 Merge pull request #4141 from code-yeongyu/fix/3396-config-skills-paths-discovery
fix: discover skills from host config.skills.paths set by other plugins
2026-05-18 13:50:34 +09:00
YeonGyu-Kim b0f432dbe5 Merge pull request #4136 from code-yeongyu/fix/4059-blocker4-reland
fix(runtime-fallback): reland BLOCKER-4 delegated empty-history fallback (#4059)
2026-05-18 13:50:03 +09:00
YeonGyu-Kim c8c06d601c Merge pull request #4020 from scw1109/fix/default-agent-sort-order
fix: respect default_agent in sort shim ordering
2026-05-18 13:48:58 +09:00
YeonGyu-Kim c37725bb7f Merge pull request #4139 from code-yeongyu/fix/3450-anthropic-context-limit-revisited
fix(shared): return GA 1M context limit for Anthropic 4.6/4.7 models without cached entry
2026-05-18 13:44:56 +09:00
YeonGyu-Kim ecb87608e6 fix: wire host config.skills.paths into command skill discovery
Mirrors the agent-config-handler change: command-config-handler now also discovers skills from host config.skills.paths set by other plugins, making them available as slash commands.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:56 +09:00
YeonGyu-Kim 971be27b79 docs(known-issues): mark blocker-4 resolved
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:41 +09:00
YeonGyu-Kim d5b1d3618c docs(changelog): add 4.2.1 blocker-4 entry
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:41 +09:00
YeonGyu-Kim 1412795825 fix: wire host config.skills.paths into agent skill discovery
When another plugin (e.g. superpowers) injects skill directories via config.skills.paths in the config hook, the agent-config-handler now discovers those skills via a second discoverConfigSourceSkills call using the adapted host config. Fixes #3396.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:38 +09:00
YeonGyu-Kim 043e84be56 fix: add adaptHostSkillConfig utility for host config.skills.paths
Converts the host OpenCode config.skills object (with paths/urls arrays set by other plugins like superpowers) into the SkillsConfig format used by discoverConfigSourceSkills. Filters blank/whitespace entries and non-string values.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:08 +09:00
YeonGyu-Kim f5e063b00a fix: only call setDefaultAgentForSort when user explicitly sets default_agent
The previous code read params.config.default_agent which is always populated to
"Sisyphus - Ultraworker" by existing logic (lines 196-204) even when the user
never configured default_agent. This silently overrode any custom agent_order.

Now we gate on configuredDefaultAgent (the user's explicit value) so the sort
shim rank map is only mutated when the user actually set default_agent.

Add regression test: agent_order without default_agent must preserve order.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:42:59 +09:00
YeonGyu-Kim f17623d450 test(shared): isolate logger module in full suite
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:42:57 +09:00
YeonGyu-Kim 0f8fc548f1 fix(runtime-fallback): consume delegated bootstrap retry payload
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:42:57 +09:00
YeonGyu-Kim f0f798d1b8 Merge pull request #4138 from code-yeongyu/fix/3207-git-master-shell-detect-reland
fix(git-master): use shared shell detection for cross-platform env prefix (fix #3207)
2026-05-18 13:40:33 +09:00
YeonGyu-Kim fdf7ba2e6f Merge pull request #4129 from code-yeongyu/feature/stage-c-lsp-mcp
Extract LSP tools into Tier-1 MCP server via lsp-tools-mcp submodule
2026-05-18 13:39:17 +09:00
YeonGyu-Kim 6251a63219 Merge pull request #4135 from code-yeongyu/fix/3893-team-mode-fresh-install
fix: add team mode fresh install diagnostics
2026-05-18 13:38:30 +09:00
YeonGyu-Kim 2387f1e702 Merge pull request #4134 from code-yeongyu/ulw/rule-comment-baseline-20260518
Optimize rules injector caches
2026-05-18 13:37:09 +09:00
YeonGyu-Kim 35df911919 test(hooks): update preemptive-compaction token thresholds for GA 1M context
Raise test token counts from 170K/180K to 800K/810K so compaction triggers at 78% of 1M instead of 78% of 200K, matching the actual GA context limit for 4.6 models.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:36:17 +09:00
YeonGyu-Kim b9a8ffec51 fix(shared): return GA 1M context limit for Anthropic 4.6/4.7 models without cached entry
Anthropic made the 1M context window GA for Opus 4.6, Sonnet 4.6, and 4.7 models on March 13, 2026 — no beta header required. The resolver was still falling back to 200K when no modelContextLimitsCache entry existed, causing premature compaction and over-truncation.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:36:01 +09:00
YeonGyu-Kim 161813c1e6 test(doctor): remove unstable unavailable-binary assertion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:34:24 +09:00
YeonGyu-Kim a0b015507d Merge pull request #4137 from code-yeongyu/fix/3763-exa-bearer-auth-reland
fix(websearch): use Bearer auth for Exa MCP
2026-05-18 13:33:37 +09:00
YeonGyu-Kim d7caeb0178 fix(git-master): use shared shell detection for cross-platform env prefix (fix #3207)
Use detectShellType() and buildEnvPrefix() from src/shared/shell-env.ts instead of hardcoding bash-only VAR=value syntax. PowerShell users get $env:VAR='value'; cmd users get set VAR="value" &&; unix/Git Bash users keep VAR=value. Skips injecting non-bash prefixes into bash code blocks to avoid syntax mismatch.

Reland of #3214 (ekkoitac) which had unresolvable CLA + used custom shell detection instead of the shared utility.

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

Co-authored-by: ekkoitac <lobster@example.com>

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:31:55 +09:00
YeonGyu-Kim 00e6c82409 Merge pull request #4117 from ririnto/fix/plan-subagent-hidden-registry
fix(delegate-task): restore hidden plan subagent delegation
2026-05-18 13:30:35 +09:00
YeonGyu-Kim 50ae2e110e perf(rules-injector): cache match decisions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:30:23 +09:00
YeonGyu-Kim a4cd7457e1 test(doctor): force unavailable lsp binary branch in CI
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:29:10 +09:00
YeonGyu-Kim 5ae0db042d fix(websearch): use Bearer auth for Exa MCP
Switch from query-param (?exaApiKey=...) to Authorization: Bearer header
for Exa MCP authentication. The MCP SDK's SSE endpoint resolution discards
query parameters when the server replies with a relative path, causing
EXA_API_KEY to be silently lost and falling back to rate-limited free tier.

Bearer auth via header survives URL resolution and is consistent with the
Tavily MCP config pattern already in use.

Fixes #3763
Relands #4090 (CLA unsigned by original author)

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

Co-authored-by: Minsoo Choi <Neo1228@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:28:31 +09:00
YeonGyu-Kim 364c7fee3d docs: note team mode fresh install fix
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:24:08 +09:00
YeonGyu-Kim 364092701f docs: add team mode fresh install note
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:24:08 +09:00
YeonGyu-Kim 03f04ca3da test(shared): isolate logger test overrides
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:24:08 +09:00
YeonGyu-Kim 21b782de93 test(plugin): cover fresh install team mode tools
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:24:08 +09:00
YeonGyu-Kim 9bae873395 fix(plugin): log team tool registry state
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:24:08 +09:00
YeonGyu-Kim e5653f1655 fix(config): log resolved team mode state
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:24:08 +09:00
YeonGyu-Kim 9560e93235 docs: correct tool directory counts and lsp alias wording
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:21:25 +09:00
YeonGyu-Kim 7e777b0cde chore(mcp): ship vendored lsp cli in npm artifacts
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:21:13 +09:00
YeonGyu-Kim 69371b78b7 test(mcp): stabilize lsp builtin and doctor checks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:21:02 +09:00
YeonGyu-Kim f7b60e360f fix(mcp): harden lsp cli resolution and doctor disable checks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:20:41 +09:00
YeonGyu-Kim 5555dbfc67 Merge pull request #4133 from code-yeongyu/fix/3816-frozen-output-args
fix: replace direct output.args mutation with replaceToolArgs helper (fixes #3816)
2026-05-18 13:09:30 +09:00
YeonGyu-Kim b20e2c9c55 fix: refactor 5 additional aliased output.args mutations + strengthen audit test
Address Oracle review feedback: refactor 4 aliased mutations via argsObject
in plugin/tool-execute-before.ts and 1 via toolOutput in atlas/tool-execute-before.ts.
Strengthen audit test regex to catch Output.args mutations regardless of the
variable name prefix (toolOutput, argsObject aliases).

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:04:10 +09:00
YeonGyu-Kim 61890f0857 fix(rules-injector): bound parsed rule cache
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:58:41 +09:00
YeonGyu-Kim 46b965b9da fix(rules-injector): bound matcher cache
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:58:41 +09:00
YeonGyu-Kim 1ab1b54ce6 perf(rules-injector): cache compiled glob matchers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:58:41 +09:00
YeonGyu-Kim a7e5a657e9 Merge pull request #4131 from code-yeongyu/fix/3563-effort-max-pre-set-clamp
fix(anthropic-effort): clamp pre-set effort=max for constrained providers regardless of variant (fixes #3563)
2026-05-18 12:50:26 +09:00
YeonGyu-Kim 3a63a8b205 test(shared): add audit test forbidding direct output.args mutation + fix 9th site
Add replace-tool-args.audit.test.ts that scans src/**/*.ts for direct
output.args property assignments and Object.assign(output.args, ...) outside
the helper. Also fix the 9th mutation site discovered by the audit in
compaction-todo-preserver/hook.ts.

Add replace-tool-args.test.ts with 12 regression tests covering both mutable
and Object.freeze'd output.args scenarios for all hook patterns.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:46:52 +09:00
YeonGyu-Kim 13d8857415 refactor(hooks): replace direct output.args mutation with replaceToolArgs (question/webfetch/null-byte)
Replace Object.assign(output.args, truncatedArgs), output.args.url = resolution.url,
and output.args.command = ... .replace(/\x00/g, "") with replaceToolArgs() calls
in question-label-truncator, webfetch-redirect-guard, and plugin/tool-execute-before.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:46:52 +09:00
YeonGyu-Kim af66b8de0b refactor(hooks): replace direct output.args mutation with replaceToolArgs (env + prompt injectors)
Replace output.args.command and output.args.prompt direct assignments
with replaceToolArgs() in non-interactive-env, prometheus-md-only,
and sisyphus-junior-notepad hooks.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:37:45 +09:00
YeonGyu-Kim 63a3021094 test(anthropic-effort): cover pre-set effort=max clamping for constrained providers (#3563)
Add 4 regression tests covering the pre-set effort path:

- pre-set effort=max + variant=max + github-copilot Opus -> clamped to high

- pre-set effort=max + variant=high + github-copilot Opus -> clamped to high (cubic violation case from PR #3608)

- pre-set effort=max + non-constrained Opus -> max preserved (no regression)

- pre-set effort=high + github-copilot Opus -> high preserved (don't overwrite valid pre-set)

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:36:56 +09:00
YeonGyu-Kim 96767b5d1a fix(anthropic-effort): clamp pre-set effort=max for constrained providers regardless of variant
Move the pre-set effort handling BEFORE the message.variant !== "max" early-return so that output.options.effort="max" set via session params or model-requirements fallback chains is always clamped to "high" on constrained providers (github-copilot, Anthropic OAuth), even when message.variant is not "max".

This addresses the cubic violation from PR #3608 where the clamp block was gated behind the variant-based return.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:36:45 +09:00
YeonGyu-Kim f72bb3fe8f refactor(hooks): replace direct output.args mutation with replaceToolArgs (claude-code-hooks)
Replace output.args.todos = parsed and Object.assign(output.args, result.modifiedInput)
with replaceToolArgs() calls that create a shallow clone instead of
mutating the potentially-frozen args object.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:33:32 +09:00
YeonGyu-Kim 6bffb2c40f feat(shared): add replaceToolArgs helper for safe tool-args mutation
opencode >=1.14 freezes output.args via Immer before plugin hooks run.
Direct property assignment or Object.assign on a frozen object throws
TypeError. This helper replaces output.args with a shallow clone
containing the patch, avoiding mutation of the frozen original.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 12:32:10 +09:00
YeonGyu-Kim b149ce5331 docs: update AGENTS docs for MCP-backed LSP architecture 2026-05-18 12:24:44 +09:00
YeonGyu-Kim 54eb3963af chore(ci): init and build vendor lsp submodule in CI 2026-05-18 12:22:54 +09:00