Commit Graph

5894 Commits

Author SHA1 Message Date
Brandon Webb 42445f5130 fix(agents): address cubic review findings on agent loader
- Case-insensitive .md extension stripping for agent name extraction
- Resolve project agent_definitions paths relative to config dir (.opencode/)
- Use getOpenCodeConfigDir() to respect OPENCODE_CONFIG_DIR/XDG_CONFIG_HOME
- First-write-wins semantics for both inline and definition-file agents
  so project-level agents always take precedence over global-level
2026-04-15 10:57:54 +09:00
Brandon Webb 3d0fb22cda fix(call-omo-agent): adapt dev's model override tests to use createMockCtx factory
Dev added 4 tests (#2852, model variant, category-derived overrides) that
referenced the old mockCtx constant. Our branch replaced it with a
createMockCtx() factory. Replace all 4 references.
2026-04-15 10:57:54 +09:00
Brandon Webb 39bda91bc7 feat(agents): wire agent_definitions and opencode.json agents into precedence chain
- Modified agent-config-handler.ts to load and integrate both new agent sources
- Added loadAgentDefinitions() and readOpencodeConfigAgents() calls in loading phase
- Integrated both sources into agent precedence chains (both Sisyphus-enabled and disabled paths)
- Added detailed logging for new agent sources
- Added filtering logic to respect disabled_agents configuration
- Extended agent-config-handler.test.ts with 7 new integration tests
- All tests passing (18/18 integration, 65/65 loader suite)

Wave 3 of agent definitions enhancement complete.
2026-04-15 10:57:54 +09:00
Brandon Webb 5755a90c3b feat(agents): add agent definitions file loader and opencode.json reader
- Add loadAgentDefinitions() for explicit file path loading (.md/.json/.jsonc)
- Add readOpencodeConfigAgents() for independent opencode.json(c) reading
- Extract parseMarkdownAgentFile() from loader.ts for reuse
- Refactor loader.ts to use extracted parser (-50 LOC)
- Add comprehensive test coverage (13 tests for definitions loader, 10 tests for opencode reader)
- Support inline agents + agent_definitions paths in opencode.json(c)
- Inline agents override definition-file agents (correct precedence)

Part of agent definitions enhancement (Wave 2/3)
2026-04-15 10:57:54 +09:00
Brandon Webb fd28f7e668 feat(agents): add agent_definitions schema, eager path resolution, and JSON agent loader
Wave 1 of agent definitions enhancement (PR #2299):

Schema & Configuration:
- Add agent_definitions field to oh-my-opencode config schema
- Support list of file paths to .md or .json agent definition files
- Add to PARTIAL_STRING_ARRAY_KEYS for Set-union merge semantics
- Implement eager path resolution in loadPluginConfig() before merging

Path Resolution:
- Create resolve-agent-definition-paths.ts helper
- User-level paths resolve from ~/.config/opencode/ (no containment)
- Project-level paths resolve from project root (with containment check)
- Homedir expansion, absolute/relative path handling

JSON Agent Loader:
- Create parseJsonAgentFile() for .json/.jsonc agent definitions
- Validate required fields (name, prompt)
- Support tools as string (comma-separated) or array
- Map model via mapClaudeModelToOpenCode()
- Comprehensive test suite (7 test cases, all passing)

Type Extensions:
- Extend AgentScope: add 'definition-file' and 'opencode-config'
- Add AgentJsonDefinition interface for JSON agent schema

All automated checks passing:
- lsp_diagnostics clean on all changed files
- json-agent-loader.test.ts: 7/7 passing
- Full typecheck: zero new errors
- QA evidence saved to .sisyphus/evidence/
2026-04-15 10:57:54 +09:00
Brandon Webb 1e85a88db0 fix(agent-restrictions): restore EXPLORATION_AGENT_DENYLIST as default fallback for unknown agents 2026-04-15 10:57:17 +09:00
Brandon Webb da91c53536 fix(call-omo-agent): address cubic review findings and add requirement-based tests
- Fix agent-resolver.ts: add defensive validation on agent name (typeof, trim, filter)
- Fix tools.test.ts: correct mock to return {data: agents} matching SDK contract
- Fix agent-config-handler.ts: include opencode global/project agents in customAgentSummaries
- Add agent-resolver.test.ts: 14 requirement-based tests covering R1-R7 behavioral specs
- Add tools-edge-cases.test.ts: 5 integration tests for rollback, whitespace, dedup, session_id
2026-04-15 10:56:50 +09:00
Brandon Webb 76c5356a80 test(agent-config): add regression tests for agent merge priority order 2026-04-15 10:56:50 +09:00
YeonGyu-Kim 1d8f8a03ca Merge pull request #3437 from code-yeongyu/fix/bug-batch-2
fix: Git Bash shell detection, legacy agent name resolution, backup spam
2026-04-15 10:53:46 +09:00
YeonGyu-Kim 1ce92fdf2e Merge pull request #3436 from code-yeongyu/fix/bug-batch-1
fix: numeric skill names, ZWSP agent lookups, ultrawork run_in_background
2026-04-15 10:53:44 +09:00
YeonGyu-Kim 62c60ae9d8 fix: numeric skill names, ultrawork missing run_in_background, ZWSP agent lookups
- #3354: Coerce data.name to String in loadSkillFromPath/loadSkillFromPathAsync
  to prevent crash when YAML parses numeric skill names (e.g., name: 12306)

- #3416: Add required run_in_background parameter to all task() examples in
  ultrawork prompts (default, gpt, gemini, planner) to match tool schema

- #3379/#3417/#3418/#3337/#3335: Strip ZWSP (U+200B) before agent name
  comparisons in agent-tool-restrictions, sync-prompt-sender, tool-execute-after,
  tool-execute-before, oracle-verification-detector, call-omo-agent,
  recovery-prompt-config, and agent-variant to prevent ZWSP-prefixed display
  names from breaking exact-match lookups
2026-04-15 10:46:41 +09:00
YeonGyu-Kim 0dab3116b7 fix: resolve 3 bugs (#3366, #3272, #3222)
- shell-env: detect Git Bash via MSYSTEM env var when SHELL is unset (#3366)
  On some Git Bash installations SHELL is not set but MSYSTEM (MINGW64/MSYS)
  is always present. Check MSYSTEM before PSModulePath to avoid emitting
  PowerShell syntax in bash shells.

- session-state: resolve legacy agent names in resolveRegisteredAgentName (#3272)
  Historical sessions stored agent names like 'Sisyphus (Ultraworker)' which
  don't match the current registered format. Fall back to getAgentConfigKey
  for legacy/parenthesized name resolution before returning the raw name.

- config-migration: skip backup when file content is unchanged (#3222)
  Compare serialized config with existing file content before creating a
  timestamped .bak file. Only create backup when the on-disk content
  actually differs from the migrated content.
2026-04-15 10:43:44 +09:00
github-actions[bot] 54a94d4169 @kithawk has signed the CLA in code-yeongyu/oh-my-openagent#3428 2026-04-14 16:19:57 +00:00
github-actions[bot] f8f7ac10bc @grandmaster451 has signed the CLA in code-yeongyu/oh-my-openagent#3420 2026-04-14 12:03:59 +00:00
Jilaz 003e45abed fix(auto-update): use semantic version comparison instead of string equality
The update checker was using strict string comparison (===) to compare
current and latest versions. This caused false-positive update notifications
when versions were semantically equal but had different string representations
(e.g., with/without 'v' prefix, different formatting).

Changed to use compareVersions() which properly parses and compares
semver versions, handling 'v' prefixes and other variations correctly.

Fixes: incorrect 'v3.17.2 available' notifications when already on latest version
2026-04-14 14:53:22 +03:00
github-actions[bot] eaf5ff2149 @fr1sk has signed the CLA in code-yeongyu/oh-my-openagent#3419 2026-04-14 11:45:38 +00:00
github-actions[bot] d97c067d6f @lightrabbit has signed the CLA in code-yeongyu/oh-my-openagent#3415 2026-04-14 08:14:09 +00:00
lightrabbit df172ac3d5 fix(skill-mcp): pass workspace directory as cwd to stdio MCP processes
In OpenCode web multi-workspace mode, skill_mcp spawned stdio child
processes inherited process.cwd() instead of the session's workspace
directory. Pass toolContext.directory through SkillMcpClientInfo to
StdioClientTransport's cwd parameter.
2026-04-14 07:56:24 +00:00
garnetlyx 177c51b640 fix: use in-process flag instead of existsSync for cache availability
In OpenCode plugin sandbox, existsSync fails across different hook
contexts (config vs chat.message) because each runs in an isolated
virtual filesystem. Add writtenInCurrentProcess flags to track cache
writes at the process level, eliminating spurious Model Cache Not
Found toast warnings.

Closes #3412
2026-04-13 23:40:51 -07:00
github-actions[bot] f98f7ec7a4 @garnetlyx has signed the CLA in code-yeongyu/oh-my-openagent#3409 2026-04-14 02:37:18 +00:00
github-actions[bot] 571cf1f162 @kywoo26 has signed the CLA in code-yeongyu/oh-my-openagent#3402 2026-04-13 18:04:41 +00:00
github-actions[bot] 1bb59c3e21 release: v3.17.2 2026-04-13 18:03:21 +00:00
YeonGyu-Kim b525055590 fix(telemetry): guard PostHog init failures 2026-04-14 02:50:50 +09:00
github-actions[bot] 3419bbc4a5 @mauriciozaffari has signed the CLA in code-yeongyu/oh-my-openagent#3398 2026-04-13 17:07:39 +00:00
YeonGyu-Kim 1b36194b51 fix(cli): treat missing session status as idle in run completion 2026-04-13 22:57:12 +09:00
YeonGyu-Kim 4ce1dde32d CLI: isolate provider model id transforms from shared mocks 2026-04-13 21:45:23 +09:00
YeonGyu-Kim d26ea7d788 Merge pull request #3393 from code-yeongyu/docs/update-contributing
docs(contributing): update tool/hook counts and version references
2026-04-13 21:35:16 +09:00
YeonGyu-Kim 9a6c279611 Merge pull request #3392 from code-yeongyu/docs/update-orchestration
docs(orchestration): update diagram model names and category tables
2026-04-13 21:33:40 +09:00
YeonGyu-Kim 00f7ffe4f0 Merge pull request #3390 from code-yeongyu/docs/update-overview
docs(overview): update model-role claims and complete category list
2026-04-13 21:33:12 +09:00
YeonGyu-Kim 7e2235bcb1 Merge pull request #3389 from code-yeongyu/docs/update-installation
docs(installation): replace npx with bunx and update provider flags
2026-04-13 21:33:09 +09:00
YeonGyu-Kim a4fb0a33aa Merge pull request #3388 from code-yeongyu/docs/update-features
docs(features): update built-in skills list
2026-04-13 21:33:06 +09:00
YeonGyu-Kim 726251271e Merge pull request #3387 from code-yeongyu/docs/update-configuration
docs(configuration): add sisyphus-junior to agent list
2026-04-13 21:33:03 +09:00
YeonGyu-Kim d9d85462ba Merge pull request #3386 from code-yeongyu/docs/update-cli
docs(cli): add --vercel-ai-gateway flag
2026-04-13 21:33:00 +09:00
YeonGyu-Kim 68d0870f0d Merge pull request #3385 from code-yeongyu/docs/update-readme-ja
docs(readme): add Japanese telemetry/legal section
2026-04-13 21:32:56 +09:00
YeonGyu-Kim f79ca295e0 Merge pull request #3391 from code-yeongyu/docs/update-agent-model-matching
docs(agent-model-matching): sync fallback chains with current source
2026-04-13 21:32:28 +09:00
YeonGyu-Kim 2d091352cd Merge pull request #3384 from code-yeongyu/docs/update-readme-ko
docs(readme): add Korean telemetry/legal section
2026-04-13 21:32:25 +09:00
YeonGyu-Kim c8dc7a9050 Merge pull request #3383 from code-yeongyu/docs/update-readme-ru
docs(readme): add Russian telemetry/legal section
2026-04-13 21:32:22 +09:00
YeonGyu-Kim 618054b6af Merge pull request #3382 from code-yeongyu/docs/update-readme-zh-cn
docs(readme): add Chinese telemetry/legal section
2026-04-13 21:32:19 +09:00
YeonGyu-Kim 0cb0a6c01d docs(contributing): update tool/hook counts and version references 2026-04-13 21:31:05 +09:00
YeonGyu-Kim 0ea701286e Merge pull request #3394 from code-yeongyu/docs/update-ollama
docs(ollama): update issue status notation
2026-04-13 21:30:28 +09:00
YeonGyu-Kim bbbd1bd084 docs(orchestration): update diagram model names and category tables
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-13 21:23:56 +09:00
YeonGyu-Kim b57a79750f docs(ollama): verify troubleshooting steps and issue links 2026-04-13 21:23:05 +09:00
YeonGyu-Kim 7c94ee45d4 docs(agent-model-matching): sync fallback chains with current source
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-13 21:23:01 +09:00
YeonGyu-Kim 05e54444c5 docs(overview): update model-role claims and complete category list 2026-04-13 21:22:38 +09:00
YeonGyu-Kim 9342e55bcf docs(installation): replace npx with bunx and update provider flags 2026-04-13 21:22:09 +09:00
YeonGyu-Kim cfd152ad07 docs(features): update agent count and verify category list 2026-04-13 21:22:03 +09:00
YeonGyu-Kim 678011c790 docs(contributing): update tool/hook counts and version references 2026-04-13 21:21:53 +09:00
YeonGyu-Kim e223ab208f docs(configuration): add sisyphus-junior to agent list 2026-04-13 21:21:17 +09:00
YeonGyu-Kim c91db2eb30 docs(cli): add --vercel-ai-gateway flag documentation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-13 21:21:09 +09:00
YeonGyu-Kim 12ed95013c docs(readme-ko): add telemetry and legal section translation 2026-04-13 21:20:34 +09:00