Commit Graph

4766 Commits

Author SHA1 Message Date
YeonGyu-Kim dfcd8134ee Merge pull request #3242 from code-yeongyu/fix/zwsp-api-leak
fix(agents): remove ZWSP prefixes from config.agent keys (#3238)
2026-04-08 23:05:49 +09:00
YeonGyu-Kim 47283f9238 fix(agents): remove ZWSP prefixes from config.agent keys (#3238)
Agent names in the config.agent object (which becomes the /agent API
response) contained invisible Zero-Width Space (U+200B) characters
baked in by getAgentListDisplayName(). These ZWSP prefixes were used
for TUI sort ordering, but they leaked into the public API surface.

Impact: any prompt_async consumer that discovered agent names via the
/agent endpoint and passed them back to prompt_async without manual
ZWSP stripping got silent message drops — the agent name didn't match.
hy-pony's feishu-bridge integration went dark after upgrading to 3.16.0
with no error, no warning, and no indication that invisible Unicode
characters in agent names were the cause.

Fix: switch all four callsites from getAgentListDisplayName() (which
prepends \u200B×N) to getAgentDisplayName() (clean names):

- agent-key-remapper.ts: config keys → display names (was the primary
  injection point)
- agent-priority-order.ts: CORE_AGENT_ORDER lookup (must agree with
  the keys emitted by the remapper)
- command-config-handler.ts: command agent field normalization
- tool-config-handler.ts: agent config lookup (simplified fallback
  chain since the primary lookup is now clean)

Sort ordering is preserved by:
1. JS object insertion order from reorderAgentsByPriority()
2. The injected `order` field (1-4) added by injectOrderField()

getAgentListDisplayName() is marked @deprecated with a link to #3238.
AGENT_LIST_SORT_PREFIXES and stripAgentListSortPrefix() are kept for
any internal callers that strip prefixes from legacy data.

Closes #3238
2026-04-08 22:51:59 +09:00
YeonGyu-Kim ed62f827e3 Merge pull request #3236 from code-yeongyu/fix/compaction-failure-toast
fix(preemptive-compaction): notify user on failure and reduce timeout
2026-04-08 20:15:09 +09:00
YeonGyu-Kim 1ea0ee4319 fix(preemptive-compaction): notify user on failure and reduce timeout
Reports from david_66 on Discord: sessions get perceived as 'stuck' when
context usage crosses the 78% threshold. Investigation confirmed two
issues in the preemptive compaction hook:

1. PREEMPTIVE_COMPACTION_TIMEOUT_MS was 120s. While the summarize
   request is in flight, tool.execute.after short-circuits via the
   compactionInProgress guard. A hung summarize blocked the session
   for two full minutes before giving up, which users reasonably
   experience as a hang.

2. On failure (timeout or exception) only a log line was emitted. The
   user had no visibility into why their session was unresponsive or
   why auto-compaction never ran, so a transient upstream error could
   silently leave them well above the threshold with no signal.

Fix:

- Reduce timeout 120s -> 60s. Still gives the upstream a generous
  window, but caps the worst-case perceived hang at one minute.
- Show a warning toast via ctx.client.tui.showToast whenever the
  catch block fires, including the underlying error string so users
  can act (retry, manual /compact, or adjust provider).
- Include providerID/modelID in the Compaction failed log entry so
  wild failures are easier to correlate to a specific target model.

Two existing failure-path assertions were updated to match the new
log shape and a new test covers the toast notification contract.

Discord report: https://discord.com/channels/1452487457085063218/1490536332961906829/1491345441399505037
2026-04-08 20:10:25 +09:00
github-actions[bot] 686f903d1f @FrancoStino has signed the CLA in code-yeongyu/oh-my-openagent#3234 2026-04-08 10:52:51 +00:00
github-actions[bot] fbd3e7aabe release: v3.16.0 2026-04-08 10:04:19 +00:00
YeonGyu-Kim c5b6d59c94 Merge pull request #3227 from code-yeongyu/fix/installer-and-auto-update
fix(installer): enforce min version + upgrade pinned entries
2026-04-08 17:40:54 +09:00
YeonGyu-Kim d781b7537f Merge pull request #3226 from code-yeongyu/fix/plan-progress-and-trust
fix(plan): skill MCP trust + non-ASCII names + simple-mode progress + ralph-loop cap
2026-04-08 17:40:51 +09:00
YeonGyu-Kim bdf6e4195a Merge pull request #3225 from code-yeongyu/fix/agent-name-safety
fix(agent): narrow ULW auto-start + strip ZWSP on background path + fix auto-update identity
2026-04-08 17:40:48 +09:00
YeonGyu-Kim c37e440ba8 Merge pull request #3224 from code-yeongyu/fix/oauth-wiring
fix(oauth): wire refresh mutex + post-request auth handler
2026-04-08 17:40:46 +09:00
YeonGyu-Kim e1cbbed41a Merge pull request #3223 from code-yeongyu/fix/core-runtime-bugs
fix(runtime): complete maxOutputTokens migration + parent variant + descendant quota
2026-04-08 17:40:28 +09:00
YeonGyu-Kim 5abab08eef test(tmux): add missing tmux exports to zombie-pane mock module 2026-04-08 17:36:28 +09:00
YeonGyu-Kim 7f8ed7b056 test(tmux): add missing tmux exports to zombie-pane mock module 2026-04-08 17:36:27 +09:00
YeonGyu-Kim 600d68da04 test(tmux): add missing tmux exports to zombie-pane mock module 2026-04-08 17:36:26 +09:00
YeonGyu-Kim d53be83634 test(tmux): add missing tmux exports to zombie-pane mock module 2026-04-08 17:36:24 +09:00
YeonGyu-Kim 4c0225a23f test(tmux): add missing tmux exports to zombie-pane mock module 2026-04-08 17:36:23 +09:00
YeonGyu-Kim 2f4bd480fc fix(ci): isolate mock.module tests per-file to prevent cross-contamination 2026-04-08 17:31:04 +09:00
YeonGyu-Kim 9fb7cfb3f5 fix(ci): isolate mock.module tests per-file to prevent cross-contamination 2026-04-08 17:31:03 +09:00
YeonGyu-Kim 28b9f777d2 fix(ci): isolate mock.module tests per-file to prevent cross-contamination 2026-04-08 17:30:54 +09:00
YeonGyu-Kim dc1546c613 fix(ci): isolate mock.module tests per-file to prevent cross-contamination 2026-04-08 17:30:53 +09:00
YeonGyu-Kim 70955b2b97 fix(ci): isolate mock.module tests per-file to prevent cross-contamination 2026-04-08 17:30:43 +09:00
YeonGyu-Kim 85fa939051 test(skill-mcp): fix connection env var tests after oauth-handler import changes
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:26:00 +09:00
YeonGyu-Kim 119c23342a test(background): fix variant propagation test to match parent-context resolution 2026-04-08 17:25:54 +09:00
YeonGyu-Kim 6d8d82d760 fix(installer): enforce minimum OpenCode version check during install
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:20:00 +09:00
YeonGyu-Kim 389b194fbf fix(installer): actually upgrade pinned plugin version instead of preserving old entry
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:19:52 +09:00
YeonGyu-Kim bbbbf68382 fix(ralph-loop): update template to reflect 500 iteration cap
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:18:37 +09:00
YeonGyu-Kim 0cb938e3ac fix(boulder): count only top-level checkboxes in simple-mode plan progress
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:18:29 +09:00
YeonGyu-Kim aa0de17f03 fix(start-work): preserve non-ASCII characters in plan name normalization
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:18:23 +09:00
YeonGyu-Kim 001d29ea8e fix(skill-mcp): treat opencode-project and local scopes as untrusted for env var access
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:18:17 +09:00
YeonGyu-Kim 15e3b14cca fix(auto-update): match both canonical and legacy plugin names in entry finder
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:17:41 +09:00
YeonGyu-Kim 359f74132a fix(delegate-task): strip ZWSP from agent names on background launch path
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:17:26 +09:00
YeonGyu-Kim 917ae4dfc3 fix(keyword-detector): narrow ULW auto-start to leading keyword position only
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:17:14 +09:00
YeonGyu-Kim 0479693ca3 fix(oauth): wire post-request 401/403 handler into skill-mcp withOperationRetry
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:16:36 +09:00
YeonGyu-Kim 63ba16bcce fix(oauth): wire refresh mutex into provider.refresh() for concurrent deduplication
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 17:16:28 +09:00
YeonGyu-Kim 80c74c8849 fix(background): prevent double-decrement of descendant quota in processKey error cleanup 2026-04-08 17:15:18 +09:00
YeonGyu-Kim 1cf4119dd4 fix(background): use parent session variant in notifyParentSession instead of child task variant 2026-04-08 17:15:02 +09:00
YeonGyu-Kim ed16dc0608 fix(chat-params): complete maxOutputTokens migration in session prompt params 2026-04-08 17:14:17 +09:00
YeonGyu-Kim 06b825dd74 fix(start-work): reuse registered opencode agent names 2026-04-08 16:18:26 +09:00
YeonGyu-Kim 24629643f0 fix(start-work): use canonical display name for command routing 2026-04-08 16:09:09 +09:00
YeonGyu-Kim 8925ec3a16 fix(start-work): align command routing with exported agent keys 2026-04-08 16:00:47 +09:00
YeonGyu-Kim 4394129667 fix(compaction): harden continuation directive markers 2026-04-08 15:58:02 +09:00
YeonGyu-Kim cd95172e42 fix(start-work): keep native command agents on config keys 2026-04-08 15:58:02 +09:00
YeonGyu-Kim aa1a18c5d8 Merge pull request #3218 from code-yeongyu/fix/3216-plugin-scope-filter
fix(plugin-loader): filter project-scoped plugins by cwd (#3216)
2026-04-08 15:51:47 +09:00
YeonGyu-Kim b28567251d fix(plugin-loader): filter project-scoped plugins by cwd
discoverInstalledPlugins read scope from installed_plugins.json but
never filtered by it, so project/local scoped Claude Code plugins
leaked into every session regardless of process.cwd().

Add projectPath to PluginInstallation and InstalledPluginEntryV3,
propagate it through v3EntryToInstallation, and introduce
shouldLoadPluginForCwd which reuses shared/contains-path for safe
symlink- and ancestor-aware matching and expands a leading tilde.
user and managed scopes still always load; project and local without
a projectPath are skipped as a safe default.

Covered by 13 new shouldLoadPluginForCwd unit tests (including tilde
expansion against a mocked homedir) and 13 new discoverInstalledPlugins
integration tests spanning v1, v2, and v3 database formats plus the
existing enabledPluginsOverride path.

Fixes #3216
2026-04-08 15:28:17 +09:00
github-actions[bot] c2816e728c @dhruvkej9 has signed the CLA in code-yeongyu/oh-my-openagent#3217 2026-04-08 05:42:35 +00:00
YeonGyu-Kim d22c3f23db test(plugin-interface): fix Atlas display name expectation
- Update expected value to match actual output after ZWSP prefix stripping

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:40:43 +09:00
YeonGyu-Kim 2c6a161441 test(runtime-fallback): fix OpenAI auto-retry test expectations
- Add timeout_seconds to mock config for auto-retry signal detection

- Add 'usage limit' pattern to quota_exceeded error classification

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:40:40 +09:00
YeonGyu-Kim 902b2f9f58 test(ci): update workflow test to match actual CI command
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:40:38 +09:00
YeonGyu-Kim 4d9652c028 test(start-work): update display name expectations for ZWSP fix
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:33:19 +09:00
YeonGyu-Kim 94449e0a24 test(delegate-task): update isPlanAgent test for exact match fix
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-08 13:33:18 +09:00