Commit Graph

752 Commits

Author SHA1 Message Date
YeonGyu-Kim d5dfaaa3ad fix(delegate-task): remove kimi from unstable agent detection, harden callID resolution for metadata store
- Remove kimi from auto-detected unstable agents in category-resolver (only gemini/minimax remain)
- Add resolveCallID() to safely resolve callID/callId/call_id variants from tool context
- Use resolveCallID across all 5 delegate task execution paths (sync, background, unstable, continuations)
- Update writing category test to verify kimi runs sync when kimi provider is available
- Add atlas metadata preservation tests confirming tool-execute-after does not clobber metadata

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-05 15:30:36 +09:00
auyua9 0bb16e5149 fix(session-manager): use sdk data in getSessionInfo 2026-04-05 14:38:13 +09:00
YeonGyu-Kim 7b7526e2f6 docs(src): update counts across tools, features, config, cli AGENTS.md
- tools: 15 -> 16 dirs, writing model kimi-k2p5 -> gemini-3-flash
- features: builtin skills 6 -> 8 (+review-work, +ai-slop-remover)
- config: schema files 24 -> 27 (+git-env-prefix, model-capabilities, openclaw)
- cli: commands 5 -> 6 (+refresh-model-capabilities)
- plugin-handlers: 13 -> 14 non-test files
- shared: 95+ -> 100+ utility files
2026-04-05 14:12:31 +09:00
YeonGyu-Kim 130f4ac080 fix: resolve #3124 #3125 #3127 session tools, cache priming, and compaction loop
- #3124: Session tools now merge SDK and file-backed sessions for SQLite backend
- #3125: Cache priming fixed for OpenCode >=1.3.14 empty workspace
- #3127: Activity-based progress detection prevents infinite compaction on Kimi/Minimax

All 29 new tests pass, 4885 total tests passing.
2026-04-05 09:30:19 +09:00
YeonGyu-Kim da86b57f23 test: fix CI test isolation - upgrade Bun, fix mock contamination and fresh-import patterns 2026-04-05 01:01:19 +09:00
YeonGyu-Kim acfed926f8 test: isolate subagent-resolver.test.ts to prevent mock contamination 2026-04-04 21:31:28 +09:00
YeonGyu-Kim feaa674963 test: fix imports for mcp-index and subagent-resolver isolation 2026-04-04 21:30:42 +09:00
YeonGyu-Kim ba26b6f29d test: isolate skill-tools and mcp-index tests to prevent mock contamination
Moves test files with mock.module() calls into zauc-mocks-* directories
to prevent process-global mock pollution affecting subsequent tests.

- src/tools/skill/tools.test.ts -> zauc-mocks-skill-tools/
- src/mcp/index.test.ts -> zauc-mocks-mcp-index/

Fixes remaining 21 CI failures (resolveSubagentExecution + slashcommand).
2026-04-04 20:49:47 +09:00
YeonGyu-Kim 00f73de8d9 Merge pull request #3063 from code-yeongyu/fix/issue-3040
fix: respect user-configured category model over fallbackChain defaults
2026-04-04 20:34:12 +09:00
YeonGyu-Kim 55d5ecb9fb test: fresh-import remaining contamination-prone modules 2026-04-04 20:14:50 +09:00
YeonGyu-Kim a4db240d47 test: localize mock.module setup to fresh imports 2026-04-04 19:49:25 +09:00
YeonGyu-Kim f8398dbec3 fix(delegate-task): restrict task-callable agent modes 2026-04-04 19:33:11 +09:00
YeonGyu-Kim e40d3fb37a fix(session-manager): fall back to file storage on SDK outages 2026-04-04 16:42:51 +09:00
YeonGyu-Kim 1fae073009 fix(sync): forward delegated model tuning params
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 15:40:37 +09:00
YeonGyu-Kim e860108b60 refactor: replace em dashes with hyphens in test files and docs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 14:35:49 +09:00
YeonGyu-Kim fd252ea82e refactor: remove AI-generated code smells from prepublish changes
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 02:02:12 +09:00
YeonGyu-Kim 468827d08f test(skill): stabilize async description refresh assertion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 01:28:01 +09:00
YeonGyu-Kim fabbcaa4b7 refactor(runtime): replace unicode dashes in prompt strings
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-04 01:27:51 +09:00
YeonGyu-Kim 53eeac3f31 fix(ci): simplify test runner to plain bun test by fixing mock.module() leakage
- Add afterAll(() => { mock.restore() }) to 52 test files missing cleanup
- Rewrite create-tool-guard-hooks.test.ts to use spyOn instead of barrel mock
- Fix skill-mcp-manager OAuth tests with missing mockTokens/mockLogin definitions
- Fix start-work hook: show worktree active block on resume with existing worktree_path
- Extract createWorktreeActiveBlock to worktree-block.ts to avoid circular import
- Replace 80-line isolated test runner CI config with single `bun test` command
2026-04-04 00:34:03 +09:00
YeonGyu-Kim 22283fca6d refactor(tools): fix empty catches, remove AI slop from code comments 2026-04-03 19:17:09 +09:00
YeonGyu-Kim 3689ecd5b0 refactor(tools): decompose skill/tools.ts into focused tool creators 2026-04-03 19:17:03 +09:00
YeonGyu-Kim 3ce1f30310 refactor(tools): split delegate-task constants into category-specific modules 2026-04-03 19:16:57 +09:00
YeonGyu-Kim 8f449e1627 fix: respect user-configured category model over fallbackChain defaults
When a user configures a custom model for a category (e.g. quick.model),
the hardcoded CATEGORY_MODEL_REQUIREMENTS fallbackChain was overriding it.
This caused the user's model to be ignored and replaced with the default
(e.g. openai/gpt-5.4-mini).

Fix:
- Use userModelOverride directly instead of potentially stale actualModel
- Suppress hardcoded fallbackChain when explicitCategoryModel is provided
- Add regression test verifying user category model takes precedence

Closes #3040
2026-04-03 18:27:26 +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 027a6b0039 fix(skill-mcp): use correct sessionID when registering skill MCP connections
Fixes #3021
2026-04-02 15:45:39 +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 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 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 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 985c72d8d3 Merge branch 'fix/p0-4-omo-agent-variant' into dev 2026-04-01 18:23:18 -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 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 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 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 94a2b8ec2c feat(lsp): add extension inference and improve diagnostics
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:42 -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 0799b46d49 Merge branch 'fix/ub8-regression' into dev 2026-03-31 17:08:45 -07:00
YeonGyu-Kim 8fba90766d fix: apply scope filter to getSystemMcpServerNames and fix async native skill description refresh 2026-03-31 17:05:55 -07:00
YeonGyu-Kim de7d72db27 fix: honor category-derived model overrides in call_omo_agent 2026-03-31 17:03:42 -07:00
YeonGyu-Kim 9a0f2ff9a7 test(delegate-task): cover aborted concurrent background launches 2026-03-31 15:11:12 -07:00
YeonGyu-Kim 56cf16c4c5 refactor(background-task): stop cancelling launched tasks during session wait 2026-03-31 15:11:05 -07:00
YeonGyu-Kim 1d0135b230 fix(delegate-task): reject stray backend-style categories
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-31 13:05:44 -07: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
Sami Jawhar 3905d07273 fix(delegate-task): replace mutual exclusion throw with category-wins override 2026-03-29 15:07:42 +00:00