Commit Graph

5077 Commits

Author SHA1 Message Date
YeonGyu-Kim f34a074f12 docs: bump claude-opus-4-6 to claude-opus-4-7 across docs, examples, and AGENTS.md
Syncs the README translations, CONTRIBUTING, docs/reference,
docs/guide, docs/examples JSONC configs, and the hierarchical
src/**/AGENTS.md files with the model version bump already landed
in the source and migration commits.
2026-04-17 14:52:19 +09:00
YeonGyu-Kim 4ca4c06698 refactor(migration): auto-upgrade claude-opus-4-5 and 4-6 to claude-opus-4-7
MODEL_VERSION_MAP now chains the legacy claude-opus-4-5 entry straight
to claude-opus-4-7 and adds an explicit claude-opus-4-6 to 4-7 bump
path, letting existing user configs upgrade on next load without an
intermediate 4-6 stop.

MODEL_TO_CATEGORY_MAP picks up claude-opus-4-7 as the canonical
unspecified-high model (prior 4-6 entry is covered by the chained
version map above, so legacy hardcoded configs still resolve).

Migration tests rewritten to reflect the chained 4-5 to 4-7 behavior
and the new 4-6 to 4-7 bump path, including the sidecar-union
scenario.
2026-04-17 14:52:02 +09:00
YeonGyu-Kim def44338ff refactor(models): bump claude-opus-4-6 to claude-opus-4-7 across fallback chains, categories, and hooks
Updates the canonical Anthropic Opus model in every fallback chain
(sisyphus, oracle, prometheus, metis, momus, visual-engineering,
ultrabrain, deep, artistry, unspecified-high), the unspecified-high
category default, the think-mode HIGH_VARIANT_MAP, the Claude Code
alias map, the claude-thinking legacy alias, the context-limit GA
regex, and event.ts fallback strings.

Widens supportsCachedAnthropicLimit to accept both claude-*-4-6 and
claude-*-4-7 so the 1M context cache still applies across the bump.

Regenerates the bundled model-capabilities snapshot from models.dev
and the model-fallback snapshot to match the new source output.
2026-04-17 14:51:52 +09:00
YeonGyu-Kim b1764a880c Merge pull request #3484 from code-yeongyu/fix/ci-remaining-test-fixes
fix(test): complete session_id→task_id migration in CI-breaking tests
2026-04-17 12:48:00 +09:00
YeonGyu-Kim 2fca3dced8 fix(test): complete session_id→task_id migration in test assertions
The previous PR #3481 only added a not.toContain check but left the
final toContain assertion still expecting task(session_id=...).
Also updates dynamic-agent-core-sections.ts and verification-reminders.ts
which still had session_id format after the refactor.
2026-04-17 12:47:49 +09:00
YeonGyu-Kim 3a956b2103 fix(test): align session_id→task_id across tests and source files
Several places still emitted task(session_id=...) after the refactor:
- src/hooks/atlas/verification-reminders.ts: 2 occurrences
- src/agents/dynamic-agent-core-sections.ts: buildNonClaudePlannerSection prompt

Tests updated to match: atlas index.test.ts and dynamic-agent-prompt-builder.test.ts
2026-04-17 12:46:44 +09:00
YeonGyu-Kim 28a896d093 fix(test): update dynamic-agent-prompt-builder test to expect task_id
Same session_id->task_id migration as the atlas hook test.
2026-04-17 12:46:44 +09:00
YeonGyu-Kim 843f1dbdbf Merge pull request #3483 from code-yeongyu/fix/bin-alias-oh-my-openagent
fix: add oh-my-openagent bin alias for renamed package
2026-04-17 12:42:37 +09:00
YeonGyu-Kim fec50c5d85 fix: add oh-my-openagent bin alias for renamed package
After the package was renamed from oh-my-opencode to oh-my-openagent,
the bin entry only had 'oh-my-opencode'. Users running:
  npm install -g oh-my-openagent
could not invoke 'oh-my-openagent' from the command line.

Add 'oh-my-openagent' as a second bin entry pointing to the same
bin/oh-my-opencode.js entry point. Both aliases now work.

Fixes #3482
2026-04-17 12:42:21 +09:00
YeonGyu-Kim 62d185cf72 Merge pull request #3481 from code-yeongyu/fix/atlas-test-task-id-parameter
fix(test): update atlas test to expect task_id parameter instead of session_id
2026-04-17 12:12:41 +09:00
YeonGyu-Kim 91ebffa9da fix(test): update atlas test to expect task_id parameter instead of session_id
verification-reminders.ts was updated to use task(task_id=...) but the
'should ignore extracted session ids' test still expected the old
task(session_id=...) format, causing a consistent CI failure on dev.

Fixes the pre-existing test failure unrelated to any code changes.
2026-04-17 12:12:26 +09:00
YeonGyu-Kim 22942c25da Merge pull request #3480 from code-yeongyu/fix/zod-external-bundle
fix(build): externalize zod from plugin bundle to prevent dual-instance crash
2026-04-17 12:09:03 +09:00
YeonGyu-Kim e97953e390 fix(build): externalize zod from plugin bundle to prevent dual-instance crash
When oh-my-openagent is loaded by opencode 1.4.6+, both sides ship zod v4
but as two separate instances. zod v4 uses instance-identity checks
(schema._zod.def) that fail across module boundaries, causing:
  TypeError: undefined is not an object (evaluating 'n._zod.def')

Fix:
- Add --external zod to the plugin bundle build command so the plugin
  resolves zod from opencode's runtime instead of embedding its own copy
- Move zod from dependencies to peerDependencies (^4.0.0) so package
  managers know to deduplicate on a single shared instance
- Keep zod in devDependencies so local build/test continues to work

The plugin dist/index.js no longer contains node_modules/zod/v4 internals.

Fixes #3479
2026-04-17 12:08:39 +09:00
YeonGyu-Kim 99ffb5f585 refactor(task): drop session_id resume alias 2026-04-16 23:18:38 +09:00
YeonGyu-Kim d89e257d8a refactor(task): align continuation ids with task_id 2026-04-16 23:13:44 +09:00
YeonGyu-Kim 56be458ede fix(config): remove obsolete maxDescendants config 2026-04-16 23:13:34 +09:00
YeonGyu-Kim 611f1cc932 fix(background-agent): remove descendant spawn cap 2026-04-16 23:02:27 +09:00
github-actions[bot] e2f7fbb4c7 @EnochLi15 has signed the CLA in code-yeongyu/oh-my-openagent#3473 2026-04-16 11:45:12 +00:00
YeonGyu-Kim 5c349fac06 Merge pull request #3471 from code-yeongyu/fix/copilot-effort-max
fix(anthropic-effort): clamp variant=max for github-copilot Claude models
2026-04-16 18:41:29 +09:00
YeonGyu-Kim 1ae32283ef fix(anthropic-effort): clamp variant=max for github-copilot Claude models
GitHub Copilot proxies Anthropic's API but does not support
output_config.effort: "max" (same constraint as Anthropic OAuth).

Previously the anthropic-effort hook early-returned for github-copilot
provider, skipping all effort clamping. Users on github-copilot/claude-opus-4.6
with variant=max got HTTP 400 'invalid_reasoning_effort'.

Fix: Remove the github-copilot early return. Treat github-copilot as a
constrained provider (alongside Anthropic OAuth), clamping max→high.

Rename isAnthropicOAuth→isConstrainedProvider to reflect the broader scope.

Fixes the remaining user report from #3429.
2026-04-16 18:41:09 +09:00
github-actions[bot] a5ae0b838c @omer-koren has signed the CLA in code-yeongyu/oh-my-openagent#3470 2026-04-16 06:35:11 +00:00
github-actions[bot] c9350c67fe release: v3.17.4 2026-04-16 06:27:22 +00:00
YeonGyu-Kim fe091ef2ae chore: bump version to 3.17.4 2026-04-16 15:15:58 +09:00
YeonGyu-Kim 9b72bf8e68 Merge pull request #3467 from code-yeongyu/refactor/delegate-task-metadata-hardening
refactor: harden delegate-task metadata pipeline
2026-04-16 15:12:38 +09:00
YeonGyu-Kim d612549b73 Merge pull request #3468 from code-yeongyu/fix/bugs-3429-3459
fix: installer writes hyphenated anthropic IDs, variant=max Anthropic OAuth compat
2026-04-16 14:30:10 +09:00
YeonGyu-Kim 7bc170fb86 fix: installer writes hyphenated anthropic IDs, variant=max Anthropic OAuth compat (#3429, #3459) 2026-04-16 14:28:56 +09:00
YeonGyu-Kim c6a407c486 refactor(tools): migrate producers to shared metadata bridge
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-16 13:52:20 +09:00
YeonGyu-Kim 4da3005797 fix(plugin): harden metadata recovery and extraction
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-16 13:52:12 +09:00
YeonGyu-Kim 80d3339c4c feat(background-agent): add wait-for-task-session helper
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-16 13:52:04 +09:00
YeonGyu-Kim a1842f2de7 feat(tool-metadata): add shared metadata contract and bridge
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-16 13:51:58 +09:00
github-actions[bot] 80e73f5727 @CHLK has signed the CLA in code-yeongyu/oh-my-openagent#3455 2026-04-15 13:10:42 +00:00
YeonGyu-Kim c55e08c1da Merge pull request #3444 from code-yeongyu/fix/issue-3443
fix: hide native plan agent when replace_plan is true
2026-04-15 17:05:14 +09:00
YeonGyu-Kim ccb2715ada fix: hide native plan agent when replace_plan is true (#3443)
When replace_plan is true (default), the native plan agent was demoted to
subagent but remained visible in the agent picker. This caused Sisyphus to
route planning to the native plan agent instead of Prometheus.

Add hidden: true to buildPlanDemoteConfig(), consistent with how the build
agent is hidden when default_builder_enabled is false.
2026-04-15 17:04:54 +09:00
YeonGyu-Kim 9aeb87c25f chore: bump version to 3.17.3 2026-04-15 15:32:56 +09:00
YeonGyu-Kim 453ac8d9eb Merge pull request #3441 from code-yeongyu/fix/disable-exception-autocapture
fix(posthog): disable exception autocapture to stay within free tier
2026-04-15 15:31:17 +09:00
YeonGyu-Kim 0764526aca fix(posthog): disable exception autocapture to stay within free tier
Error tracking exceeded 100K free tier limit (188K in 5 days).

Top exceptions were mostly noise:
- ProviderModelNotFoundError: 75K (user config issues)
- EPIPE/EOF/stream destroyed: 40K (normal pipe closures)
- ENOSPC: 3K (user disk space issues)

Manual captureException() for critical errors in runner.ts
is preserved. Only automatic unhandled exception capture is
disabled.
2026-04-15 15:30:40 +09:00
YeonGyu-Kim 47aa3025db fix(cli): use getAgentRuntimeName for agent resolution in run command 2026-04-15 14:46:50 +09:00
github-actions[bot] 81a03fa9d0 @orbisai0security has signed the CLA in code-yeongyu/oh-my-openagent#3440 2026-04-15 05:03:53 +00:00
YeonGyu-Kim a47f898636 Merge pull request #3321 from rlavkvmflzk/fix/grep-windows-crlf-and-drive-letter
fix(grep): handle Windows drive-letter paths and CRLF in parseOutput
2026-04-15 12:35:16 +09:00
YeonGyu-Kim e04b2ed726 Merge pull request #3438 from code-yeongyu/fix/bug-batch-3-regression-tests
test: add regression tests for isPlanFamily, code-review->review-work, anthropic transform
2026-04-15 11:32:55 +09:00
YeonGyu-Kim e1b2f97bfd fix: isPlanFamily regression tests, code-review -> review-work in test data (#3312, #3285, #3290) 2026-04-15 11:27:07 +09:00
YeonGyu-Kim 0217189852 Merge pull request #2299 from brandonwebb-vista/feat/dynamic-custom-agent-support
feat(call-omo-agent): support custom agents via dynamic resolution
2026-04-15 11:18:04 +09:00
YeonGyu-Kim ab11f2eb4e fix(tests): replace mock.module with spyOn to prevent test pollution
The opencode-config-agents-reader.test.ts was using mock.module() which
permanently replaced the module in bun's module cache, causing state
pollution in downstream tests (plugin-detection, write-omo-config,
config-loader). Replaced with spyOn() pattern that properly restores
in afterEach.
2026-04-15 11:14:52 +09:00
YeonGyu-Kim e5d3fe96c4 fix(agents): address all PR #2299 code review findings
Blocking fixes:
- B1: Return empty restrictions for unknown/custom agents instead of
  EXPLORATION_AGENT_DENYLIST, allowing custom agents full tool access
- B2: Use Object.create(null) consistently across all 5 agent-loading
  result objects to prevent prototype pollution
- B3: Add code comment documenting custom agent bash access trust model
- B4: Mock getOpenCodeConfigDir in opencode-config-agents-reader tests
  to prevent global config dir leakage

Non-blocking fixes:
- N1: Use resolveAgentDefinitionPaths with project boundary enforcement
  in opencode-config-agents-reader for path containment
- N2: Add session-scoped 30s TTL cache to resolveCallableAgents to
  avoid redundant SDK IPC calls per tool invocation
- N3: Extract shared parseToolsConfig into src/shared/parse-tools-config.ts
  replacing 4 duplicated local implementations
- N4: Add .min(1) to AgentDefinitionPathSchema rejecting empty paths
- N5: Add resolve-agent-definition-paths.test.ts covering tilde expansion,
  relative paths, boundary enforcement, and null containmentDir
- N6: Validate agent mode against allowed values instead of bare type
  assertion in opencode-config-agents-reader
2026-04-15 10:58:16 +09:00
Brandon Webb 4c77045c47 fix(agents): use null-prototype accumulator to prevent __proto__ pollution
Addresses cubic-dev-ai P1 review: Object.hasOwn() alone doesn't prevent
a crafted '__proto__' agent name from mutating the result object's
prototype chain. Using Object.create(null) eliminates inherited properties
entirely, making both the hasOwn checks and property assignments safe.
2026-04-15 10:57:54 +09:00
Brandon Webb cf4b231553 fix(agents): replace 'in' with Object.hasOwn() for prototype-safe property checks
Addresses cubic-dev-ai review: using 'in' on plain objects can skip valid
agent names that match inherited properties (toString, constructor, etc.).
Switched both occurrences in opencode-config-agents-reader.ts to
Object.hasOwn() for safe own-property checks.
2026-04-15 10:57:54 +09:00
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