Update various modules to use centralized constants from plugin-identity:
- get-local-version/formatter: Use PUBLISHED_PACKAGE_NAME
- run/session-resolver: Use PUBLISHED_PACKAGE_NAME
- background-agent/task-poller: Use PUBLISHED_PACKAGE_NAME
- mcp-oauth/provider: Use PUBLISHED_PACKAGE_NAME
- auto-update-checker/constants: Use ACCEPTED_PACKAGE_NAMES
- comment-checker/downloader: Use PUBLISHED_PACKAGE_NAME
- legacy-plugin-toast/hook: Use PLUGIN_NAME
- shared/data-path: Use CACHE_DIR_NAME
- shared/external-plugin-detector: Use ACCEPTED_PACKAGE_NAMES
- shared/logger: Use LOG_FILENAME
- tools/ast-grep/downloader: Use PUBLISHED_PACKAGE_NAME
- tools/call-omo-agent/tools: Use PUBLISHED_PACKAGE_NAME
- tools/delegate-task/category-resolver: Use PUBLISHED_PACKAGE_NAME
- tools/grep/constants: Use PUBLISHED_PACKAGE_NAME
- tools/grep/downloader: Use PUBLISHED_PACKAGE_NAME
- tools/lsp/lsp-client-wrapper: Use PUBLISHED_PACKAGE_NAME
🤖 Generated with assistance of OhMyOpenCode
Update doctor checks to use centralized constants from plugin-identity:
- PACKAGE_NAME now references PUBLISHED_PACKAGE_NAME
- System check uses PLUGIN_NAME and LEGACY_PLUGIN_NAME for plugin
registration validation and legacy name detection
- Formatters updated for consistency
🤖 Generated with assistance of OhMyOpenCode
Update CLI installer to show oh-my-opencode (published name) instead
of oh-my-openagent (plugin name) in usage instructions.
🤖 Generated with assistance of OhMyOpenCode
Update systemLoadedVersion check to detect installs under both
oh-my-opencode and oh-my-openagent package names. Adds package
candidate selection logic for dual-published packages.
🤖 Generated with assistance of OhMyOpenCode
Update writeOmoConfig to detect and migrate legacy config files before
writing. Adds logic to handle oh-my-opencode.json -> oh-my-openagent.json
migration with proper path resolution and fallback handling.
🤖 Generated with assistance of OhMyOpenCode
Extract hardcoded GPT apply_patch permission logic into a reusable module
to ensure consistent behavior across all agents. This prevents GPT models
from using the unreliable apply_patch tool while allowing other models.
- Add gpt-apply-patch-guard.ts with GPT_APPLY_PATCH_GUIDANCE and getGptApplyPatchPermission
- Update Hephaestus agent to use centralized permission logic
- Update Sisyphus-Junior agent to use centralized permission logic
- Update all GPT prompt builders to reference shared guidance constant
🤖 Generated with assistance of OhMyOpenCode
The doctor's 'Model override uses unavailable provider' check only
looked at providers from ~/.cache/opencode/models.json (built-in
providers from models.dev). Custom OpenAI-compatible providers defined
in the user's opencode.json (under the 'provider' key) were not
included, causing false-positive warnings.
Now loadAvailableModelsFromCache() also reads provider names from
~/.config/opencode/opencode.json and ~/.config/opencode/opencode.jsonc,
merging them with the cache providers. This eliminates the false
positive while preserving real warnings for truly unknown providers.
7 new tests cover: cache-only, custom-only, merged, deduplicated,
JSONC variant, and malformed config resilience.
Fixes#3199
Display names with parentheses like 'Atlas (Plan Executor)' cause HTTP
header validation errors in x-opencode-agent-name. This was blocking
Atlas/Prometheus from working via /start-work and auto-retry.
Changes:
- Display names: parens -> dashes ('Atlas - Plan Executor')
- Hooks (start-work, no-hephaestus-non-gpt, no-sisyphus-gpt): use
config keys ('atlas', 'sisyphus', 'hephaestus') for agent API fields
- auto-retry: use config key instead of display name for promptAsync
- agent-override-protection: handle dash-suffix normalization
- Updated all test expectations to match new format
Closes#3138
- install.test.ts: save and restore globalThis.fetch in beforeEach/afterEach
to prevent leaking a mock fetch (without .preconnect) into subsequent test files
- provider.test.ts: guard against originalFetch missing .preconnect when captured
from a leaked mock (defensive null-safe binding)
- discovery.test.ts: add writable:true to all Object.defineProperty fetch assignments
so downstream plain assignments (globalThis.fetch = ...) are not silently ignored
Root cause: install.test.ts set globalThis.fetch = mock(...) inside test bodies
without restoring it, leaving a mock fetch (no .preconnect method) that caused
provider.test.ts refresh tests to throw TypeError at the fetchMock construction
- Fix zod/v4 imports in background-task schema tests
- Remove ZWSP prefix from agent-key-remapper test (fixed in #3136)
- Use toMatchObject for openai-only catalog tests (fallback_models added by #3144)
- Replace z.toJSONSchema (zod v4) with zodToJsonSchema (zod v3 compat)
- Fix task-list.ts type narrowing for zod v3 inferred types
Tests relied on leaked agent registration from other tests when run locally.
In CI, each test batch runs in isolation so the session agent was null,
causing getLastAgentFromSession to return null and the test to incorrectly
pass (return true instead of false).
- Update continuation-state to use session_origins from boulder state
- Add isTrackedDescendantSession helper for lineage detection
- Integrate getLastAgentFromSession for reliable agent detection
- Update completion tests for new lineage-aware continuation logic
- Add JSON backend tests for continuation state
🤖 Generated with assistance of OhMyOpenCode
- Update continuation-state to use session_origins from boulder state
- Add isTrackedDescendantSession helper for lineage detection
- Integrate getLastAgentFromSession for reliable agent detection
- Update completion tests for new lineage-aware continuation logic
- Add JSON backend tests for continuation state
🤖 Generated with assistance of OhMyOpenCode
Make getContinuationState async to support client-side lineage checks.
Add hasActiveBoulderContinuation with agent eligibility verification
and subagent session tracking for proper boulder session inheritance.
🤖 Generated with assistance of OhMyOpenCode
Root cause: loadPluginConfig() unconditionally switched userConfigPath to the
canonical name after calling migrateLegacyConfigFile(), even when migration
failed (e.g. file lock on Windows, permission denied). This left the config
path pointing to a non-existent file, so the plugin config silently loaded
as empty defaults.
Additionally, several fallback/default paths were hardcoded to the legacy
'oh-my-opencode' basename instead of using CONFIG_BASENAME ('oh-my-openagent'),
causing CLI config commands (writeOmoConfig, detectCurrentConfig) to write to
the wrong filename.
Changes:
- plugin-config.ts: check migrateLegacyConfigFile() return value; only switch
to canonical path if migration succeeded OR the canonical file already exists
- opencode-config-dir.ts: use CONFIG_BASENAME for omoConfig path in
getOpenCodeConfigPaths()
- config-context.ts: getOmoConfigPath() now uses detectPluginConfigFile() to
find whichever name variant actually exists on disk
- plugin-config.ts: default fallback paths use CONFIG_BASENAME instead of
hardcoded legacy name
- Added test: loadPluginConfig still loads config when migration fails
(read-only directory simulation)
- Move mock.module() calls from top-level into importFreshSystemModule()
- Restore real modules in afterAll to prevent cross-test contamination
- Reset mocks before each test
🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode