Commit Graph

208 Commits

Author SHA1 Message Date
YeonGyu-Kim e3f3bcc063 fix(tests): type cliproxy fallback test harness
Convert the cliproxy fallback matrix test to use typed harness helpers instead of  so fallback coverage remains unchanged without violating test constraints.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:37:17 +09:00
YeonGyu-Kim 4e435dac73 fix(tests): type event handler test harness
Replace broad  casts in event handler tests with typed harness helpers so the regression coverage stays intact while matching the test-file typing rules.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-03 17:37:17 +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 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 51d9685571 fix(start-work): use Atlas list key in command config 2026-04-01 17:45:16 -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 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 7d6f47bf3d fix: resolve process-cleanup signal delay and hashline_edit tool name mismatch 2026-03-31 16:59:04 -07:00
YeonGyu-Kim 33c8b7f675 fix(tests): resolve 6 test isolation failures in full suite
3 failures in fallback.cliproxyapi-matrix.test.ts:
- Root cause: leaked spyOn(getMainSessionID) in
  tool-execute-before-session-notification.test.ts was never restored,
  poisoning module state for subsequent tests in the same worker
- Added mockRestore() call and _resetModelFallbackForTesting in afterEach

3 failures in background-agent/manager.test.ts:
- Root cause: connected-providers-cache memConnected/memProviderModels
  persisted across test files, making isReachable() skip fallback
  candidates in retry tests
- Added mock.module for connected-providers-cache at file level
- Added _resetMemCacheForTesting export and global beforeEach cleanup

Full suite: 4638/4638 pass, 0 fail
2026-04-01 04:30:34 +09:00
YeonGyu-Kim 51194e9434 Merge pull request #2919 from ryandielhenn/feat/config_tdd
Add Configurable TDD To Sisyphus Agent Schema
2026-03-29 18:55:21 -07:00
YeonGyu-Kim 2d46a71da4 Merge pull request #2929 from quangtran88/fix/rules-injector-respect-claude-code-config
fix(rules-injector): respect claude_code config for user rule loading
2026-03-29 18:54:27 -07:00
YeonGyu-Kim b12e32d855 Merge pull request #2912 from RaviTharuma/test/quotio-fallback-matrix-upstream
test(fallback): add CLIProxyAPI-only integration matrix
2026-03-29 18:45:34 -07:00
Sami Jawhar a3cc2d1c95 feat(tmux): add session isolation mode for subagent panes 2026-03-29 17:53:30 +00:00
Tran Quang 738b045e9b fix: use strict equality for claude_code flag checks
Use `=== false` instead of falsy negation so that missing/undefined
fields are not treated as explicitly disabled. Only skip ~/.claude/rules
when all three flags are explicitly set to false.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 10:22:54 +07:00
Tran Quang a1a2bb4b07 fix(rules-injector): respect claude_code config for user rule loading
When claude_code integration is disabled in oh-my-opencode.json, the
rules-injector now skips loading rules from ~/.claude/rules/ to prevent
Claude Code-specific instructions from leaking into non-Claude agents
(e.g., GPT-5.4 Sisyphus), which causes agent hallucination.

Also adds ~/.sisyphus/rules/ and ~/.opencode/rules/ as OpenCode-native
user rule directories that are always searched regardless of config.

Fixes #2920

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 10:13:55 +07:00
YeonGyu-Kim b2497f1327 fix: resolve 3 community-reported bugs (#2915, #2917, #2918)
- background_output: snapshot read cursor before consuming, restore on
  /undo message removal so re-reads return data (fixes #2915)
- MCP loader: preserve oauth field in transformMcpServer, add scope/
  projectPath filtering so local-scoped MCPs only load in matching
  directories (fixes #2917)
- runtime-fallback: add 'reached your usage limit' to retryable error
  patterns so quota exhaustion triggers model fallback (fixes #2918)

Verified: bun test (4606 pass / 0 fail), tsc --noEmit clean
2026-03-29 04:53:43 +09:00
Ryan Dielhenn 571dfe23a4 add bool value: tdd to sisyphus_agent config 2026-03-28 09:34:58 -07:00
Ravi Tharuma 92069d2e7f test(fallback): rename quotio matrix to cliproxyapi 2026-03-28 09:11:41 +01:00
Ravi Tharuma 57fcc9e842 test(fallback): add quotio-only integration matrix 2026-03-28 08:58:17 +01:00
YeonGyu-Kim d2c576c510 fix: resolve 25 pre-publish blockers
- postinstall.mjs: fix alias package detection
- migrate-legacy-plugin-entry: dedupe + regression tests
- task_system: default consistency across runtime paths
- task() contract: consistent tool behavior
- runtime model selection, tool cap, stale-task cancellation
- recovery sanitization, context-limit gating
- Ralph semantic DONE hardening, Atlas fallback persistence
- native-skill description/content, skill path traversal guard
- publish workflow: platform awaited via reusable workflow job
- release: version edits reapplied before commit/tag
- JSONC plugin migration: top-level plugin key safety
- cold-cache: user fallback models skip disconnected providers
- docs/version/release framing updates

Verified: bun test (4599 pass), tsc --noEmit clean, bun run build clean
2026-03-28 15:24:18 +09:00
YeonGyu-Kim 7b2b8be181 Merge pull request #2771 from MoerAI/fix/bash-file-read-guard
fix(hooks): add bash-file-read-guard to warn agents against cat/head/tail (fixes #2096)
2026-03-28 01:44:44 +09:00
YeonGyu-Kim ab0b084199 Merge pull request #2884 from RaviTharuma/fix/runtime-fallback-hook-isolation
Verified: bun test src/plugin/event.test.ts src/hooks/runtime-fallback/index.test.ts -- 68/68 pass. tsc clean.
2026-03-27 19:10:06 +09:00
YeonGyu-Kim 6662205646 fix(#2748): pass browserProvider into skill() discovery
skill-context already filtered browser-related skills using the configured
browser provider, but the skill tool rebuilt discovery without forwarding
browserProvider. That caused skills like agent-browser to be prompt-visible
while skill() could still fail to resolve them unless browser_automation_engine.provider
was explicitly threaded through both paths.

Fix:
- pass skillContext.browserProvider from tool-registry into createSkillTool
- extend SkillLoadOptions with browserProvider
- forward browserProvider to getAllSkills()
- add regression tests for execution and description visibility
2026-03-27 17:58:38 +09:00
YeonGyu-Kim 76bf269b39 fix(#2754): include native PluginInput skills in skill() discovery
The skill tool previously only merged disk-discovered skills and preloaded
options.skills, so skills registered natively via ctx.skills (for example
from config.skills.paths or other plugins) were prompt-visible but not
discoverable by skill().

Fix:
- pass ctx.skills from tool-registry into createSkillTool
- extend SkillLoadOptions with nativeSkills accessor
- merge nativeSkills.all() results into getSkills()
- add test covering native PluginInput skill discovery
2026-03-27 17:42:43 +09:00
Ravi Tharuma 3e4b988860 fix: isolate event hook failures during dispatch 2026-03-27 09:30:43 +01:00
YeonGyu-Kim d3dbb4976e fix(#2854): enable task system by default (oracle/subagent delegation)
task_system now defaults to true instead of false. Users on opencode-go
or other plans were unable to invoke oracle or use subagent delegation
because experimental.task_system defaulted off.

The task system is the primary mechanism for oracle, explore, and other
subagent invocations — it should not be behind an experimental flag.

Users can still explicitly set experimental.task_system: false to opt out.
2026-03-27 17:03:33 +09:00
YeonGyu-Kim e22e13cd29 fix(#2732): detect crashed subagent sessions with shorter timeout
When a subagent session disappears from the status registry (process
crashed), the main agent was waiting the full stale timeout before
acting. Fix:

- Add sessionGoneTimeoutMs config option (default 60s, vs 30min normal)
- task-poller: use shorter timeout when session is gone from status
- manager: verify session existence when gone, fail crashed tasks
  immediately with descriptive error
- Add legacy-plugin-toast hook for #2823 migration warnings
- Update schema with new config option
2026-03-27 15:43:01 +09:00
MoerAI 82d89fd5fc fix(tools): add max_tools config to cap registered tools for OpenAI compatibility (fixes #2848) 2026-03-27 11:11:56 +09:00
YeonGyu-Kim 1c54fdad26 feat(compat): package rename compatibility layer for oh-my-opencode → oh-my-openagent
- Add legacy plugin startup warning when oh-my-opencode config detected
- Update CLI installer and TUI installer for new package name
- Split monolithic config-manager.test.ts into focused test modules
- Add plugin config detection tests for legacy name fallback
- Update processed-command-store to use plugin-identity constants
- Add claude-code-plugin-loader discovery test for both config names
- Update chat-params and ultrawork-db tests for plugin identity

Part of #2823
2026-03-26 19:44:55 +09:00
YeonGyu-Kim 4efc181390 fix(ci): resolve all test failures + complete rename compat layer
Sisyphus-authored fixes across 15 files:

- plugin-identity: align CONFIG_BASENAME with actual config file name
- add-plugin-to-opencode-config: handle legacy→canonical name migration
- plugin-detection tests: update expectations for new identity constants
- doctor/system: fix legacy name warning test assertions
- install tests: align with new plugin name
- chat-params tests: fix mock isolation
- model-capabilities tests: fix snapshot expectations
- image-converter: fix platform-dependent test assertions (Linux CI)
- example configs: expanded with more detailed comments

Full suite: 4484 pass, 0 fail, typecheck clean.
2026-03-26 18:04:31 +09:00
Ravi Tharuma 2af9324400 feat: add models.dev-backed model capabilities 2026-03-25 14:47:46 +01:00
Ravi Tharuma f86b8b3336 fix(review): align model compatibility and prompt param helpers 2026-03-25 11:14:04 +01:00
Ravi Tharuma d4f962b55d feat(model-settings-compat): add variant/reasoningEffort compatibility resolver
- Registry-based model family detection (provider-agnostic)
- Variant and reasoningEffort ladder downgrade logic
- Three-tier resolution: metadata override → family heuristic → unknown drop
- Comprehensive test suite covering all model families
2026-03-25 11:13:53 +01:00
Ravi Tharuma a77a16c494 feat(config): support object-style fallback_models with per-model settings
Add support for object-style entries in fallback_models arrays, enabling
per-model configuration of variant, reasoningEffort, temperature, top_p,
maxTokens, and thinking settings.

- Zod schema for FallbackModelObject with full validation
- normalizeFallbackModels() and flattenToFallbackModelStrings() utilities
- Provider-agnostic model resolution pipeline with fallback chain
- Session prompt params state management
- Fallback chain construction with prefix-match lookup
- Integration across delegate-task, background-agent, and plugin layers
2026-03-25 11:04:49 +01:00
YeonGyu-Kim 63ebedc9a2 Merge pull request #2606 from RaviTharuma/fix/clamp-variant-on-non-opus-fallback
fix: clamp unsupported max variant for non-Opus Claude models
2026-03-25 11:06:31 +09:00
YeonGyu-Kim 26ac413dd9 Merge pull request #2801 from MoerAI/fix/null-byte-sanitization
fix(tool-execute-before): strip null bytes from bash commands to prevent crash (fixes #2220)
2026-03-25 01:12:45 +09:00
YeonGyu-Kim af301ab29a fix(webfetch): guard redirect loops in built-in flow 2026-03-24 23:58:53 +09:00
MoerAI c56a01c15d fix(tool-execute-before): strip null bytes from bash commands to prevent crash (fixes #2220) 2026-03-24 19:17:05 +09:00
YeonGyu-Kim 7fa2417c42 fix(plugin): persist selected model only for main session
Reuse the stored model only for subsequent main-session messages when the UI provides no model, while preserving first-message behavior, explicit overrides, and subagent isolation.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 18:11:27 +09:00
YeonGyu-Kim 5e856b4fde fix(schema): strip contentEncoding from MCP tool schemas for Gemini compatibility
The existing normalizeToolArgSchemas only applies to omo plugin tools
(via tool-registry.ts), but MCP server tool schemas bypass this
sanitization entirely. MCP schemas with contentEncoding/contentMediaType
cause Gemini 400 errors.

Add sanitizeJsonSchema() to strip unsupported keywords from MCP tool
inputSchema before serialization in formatMcpCapabilities.

Fixes #2200
Supersedes #2666
2026-03-24 16:24:44 +09:00
MoerAI 2f801f6c28 fix(hooks): add bash-file-read-guard to warn agents against cat/head/tail (fixes #2096) 2026-03-23 20:15:20 +09:00
YeonGyu-Kim f95d3b1ef5 fix: emit formatter events from hashline-edit tool (fixes #2117) 2026-03-23 18:40:27 +09:00
YeonGyu-Kim 4c4760a4ee fix: trigger compaction before continue after session error recovery (fixes #390) 2026-03-23 18:12:51 +09:00
YeonGyu-Kim 50094de73e docs: fix remaining AGENTS hook composition text
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 12:02:52 +09:00
YeonGyu-Kim 3aa2748c04 docs: sync hook counts after continuation hook removal
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 12:02:52 +09:00
YeonGyu-Kim ccaf759b6b fix(hooks): remove gpt permission continuation hook
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 12:02:52 +09:00
YeonGyu-Kim ce8957e1e1 fix(ralph-loop): harden oracle verification flow
Capture oracle verification sessions more reliably and accept parent-session VERIFIED evidence so ULW loops do not retry after successful review.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-18 17:45:59 +09:00
YeonGyu-Kim 55ac653eaa feat(hooks): add todo-description-override hook to enforce atomic todo format
Override TodoWrite description via tool.definition hook to require
WHERE/WHY/HOW/RESULT in each todo title and enforce 1-3 tool call
granularity.
2026-03-18 11:49:13 +09:00
Ravi Tharuma 71b1f7e807 fix(anthropic-effort): clamp variant against mutable request message 2026-03-17 11:57:56 +01:00