Hoist shared ripgrep CLI resolution helpers (resolveGrepCli, resolveGrepCliWithAutoInstall, GrepBackend, DEFAULT_RG_THREADS, ResolvedCli) out of src/tools/grep/constants.ts into src/shared/ripgrep-cli.ts so they no longer straddle two sibling tool directories.
Before: src/tools/glob/constants.ts re-exported from src/tools/grep/constants.ts, violating the project's "tools should not import from sibling tools" rule enforced by .sisyphus/rules/modular-code-enforcement.md.
After: both src/tools/glob/ and src/tools/grep/ consume the shared helpers from src/shared/ripgrep-cli.ts. src/tools/grep/constants.ts keeps only the grep-specific UI-exposed constants.
Remove the dead plugin-dispose module and its dedicated test now that V1 plugin migration removed the last production call site. Clean the remaining bootstrap test mocks so src no longer references createPluginDispose.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Move the pending fallback, toast, and session-chain maps behind a shared controller initialized from the hook factory. This preserves the existing singleton semantics because exported helpers and hook instances still resolve the same lazily initialized controller while hook.ts stays under the 200-line limit.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Extract the tool description/category metadata into tool-description.ts and move argument normalization plus validation into tool-argument-preparation.ts. This keeps createDelegateTask focused on orchestration while preserving behavior and bringing tools.ts under the module LOC rule.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Move parseModelString into src/shared so callers can depend on a neutral module instead of reaching into delegate-task internals.
Cross-tool coupling violates module boundaries, and this keeps call-omo-agent plus runtime-fallback from importing through a sibling tool.
Extract input preparation and image conversion handling into look-at-input-preparer.ts.
Extract prompt construction and multimodal session execution into look-at-prompt.ts and look-at-session-runner.ts while keeping createLookAt stable.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Convert the default export from the legacy callable Plugin to the V1 PluginModule shape (`{ id, server }`) documented by opencode's plugin SDK. This aligns oh-my-openagent with the canonical plugin entry format and removes plugin-format legacy debt.
Drop the module-level `let activePluginDispose` cleanup guard: opencode instantiates plugins in a scope-bound Layer per server and dynamic-imports fresh modules on reload, so module-level state is not preserved across reloads. Individual managers already register their own SIGINT/SIGTERM cleanup (skill-mcp-manager, background-agent process-cleanup), so the orphaned createPluginDispose call provided no runtime value.
Remove the non-standard `name` return field that opencode's Hooks interface does not include. The PluginModule's `id` now carries the plugin identity instead.
Drop the unused `lspManager` import that only fed the orphaned createPluginDispose.
Update src/index.test.ts and src/index.telemetry.test.ts to call `plugin.server(ctx)` instead of `plugin(ctx)`, and assert the V1 shape.
Match opencode core 'task' tool behavior for metadata consistency:
1. Model fallback: When categoryModel/task.model/resumeModel is undefined,
fall back to parentContext.model so subagent metadata always includes
model info. Thread parentContext into executeSyncContinuation for parity.
2. Task ID consistency: unstable-agent-task was missing taskId and
backgroundTaskId in metadata. background_output used inconsistent
snake_case 'task_id' vs camelCase 'taskId' elsewhere. Standardize on
camelCase: taskId = sessionID (resume id), backgroundTaskId = bg task id.
Update text output blocks to use buildTaskMetadataBlock helper.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add helper that picks primary model with fallback to a secondary model
(e.g., categoryModel → parentContext.model). Enforces consistent
{providerID, modelID} shape.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sed-based bulk replace only touched hyphenated IDs (claude-opus-4-6)
but the tutorial prose and comparison tables used the dotted human
form 'Claude Opus 4.6' / 'Opus 4.6'. Sync those occurrences to 4.7
in:
- docs/guide/installation.md (model families table + Sisyphus tutorial)
- docs/guide/agent-model-matching.md (recommended-model table)
- docs/guide/overview.md (three references to Opus default)
Without this commit, users following the installation guide would be
told Sisyphus 'strongly recommends Opus 4.6' while the plugin itself
already routes to Opus 4.7.
Addresses review feedback on #3486:
1. claude-thinking-legacy-alias now matches both claude-opus-4-6-thinking
and claude-opus-4-7-thinking, canonicalizing both to claude-opus-4-7.
The previous diff retargeted the regex to 4-7 only, which dropped
backward compatibility for users still pinned to the 4-6 thinking
suffix.
2. MODEL_TO_CATEGORY_MAP keeps the claude-opus-4-6 to unspecified-high
entry alongside the new 4-7 entry. The map is order-independent from
MODEL_VERSION_MAP, so preserving the 4-6 key avoids relying on a
specific migration ordering for legacy agent configs.
3. Fix stale 'Claude Opus 4.6' labels and BDD test comments that the
sed-based bump missed.
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.
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.
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.
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.
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
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
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.
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
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.