Agents like claude-acp and codex-acp wrap external CLIs (claude, codex)
and have an npx/binary distribution in the registry. Previously, missing
external CLIs caused available: false, hiding the Install button entirely
— even though the agent package itself CAN be installed independently.
agent-catalog: for uninstalled agents, available = dist !== null
Availability now means 'has a distribution to install', not 'all deps
met'. Missing deps are still surfaced via missingDeps for the UI.
agent-installer: remove hard dep-check block before installation
Installation proceeds even when external CLIs are absent. The required
setup steps (e.g. 'npm install -g @anthropic-ai/claude-code') are
returned in the result so callers can guide the user post-install.
The uvx runtime check is kept as it is a true hard requirement.
Display the resolved path from 'command -v node' alongside the version
so users and logs immediately show which node is active (e.g. nvm vs
system). Also bump installer version to 1.0.3.
Two related bugs caused npm install -g to fail with EACCES on machines
where both system node and nvm-managed node are installed:
1. ensure_default_node_active_shell returned early when system node met
the minimum version requirement, never sourcing nvm. This caused the
installer to use system npm (prefix /usr/local, root-owned) instead
of nvm's npm which has a user-writable prefix.
2. fix_npm_permissions checked -w $prefix/lib which can be writable on
Intel Macs with Homebrew (/usr/local/lib is user-owned) while
/usr/local/lib/node_modules remains root-owned from a prior pkg
install. The check now targets node_modules specifically.
fix_npm_permissions was only called in the npm install branch, but the
git install path also runs `npm install -g pnpm` as a fallback when
corepack is unavailable. On macOS with Homebrew/system Node, this would
fail with EACCES for the same reason as the main npm install.
Move fix_npm_permissions to run unconditionally before the install
method branch so both paths benefit from the permission fix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix_npm_permissions() was guarded with `[[ "$OS" != "linux" ]]`, so it
was a no-op on macOS. Users with Node installed via Homebrew or a system
installer have /usr/local/lib/node_modules owned by root, causing EACCES
on `npm install -g`. Remove the OS guard so the function reconfigures npm
to use ~/.npm-global on any platform where the prefix is not writable.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without selective, Telegram automatically opens the reply compose box
in private chats when bot sends a force_reply message.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the install script runs in a non-login shell (e.g. launched from
a GUI app), PATH-based node managers like nvm are not initialized.
Call ensure_default_node_active_shell before check_node so that an
already-installed node is discovered without triggering a redundant
install_node call.
API-sourced prompts (from the App) were bypassing MESSAGE_QUEUED and
MESSAGE_PROCESSING emission, so only the sending App window showed the
user message. Other connected windows only saw the AI response.
- routes/sessions.ts: generate turnId, emit MESSAGE_QUEUED before
enqueuePrompt, return turnId in response body
- session-bridge.ts: remove 'api' exclusion from MESSAGE_PROCESSING
so all connected SSE clients receive the streaming stub event
When launched from a GUI app (e.g. OpenACP Desktop), the shell is
non-login so ~/.zshrc is never sourced and NVM_DIR is unset — even
if nvm is properly installed. ensure_default_node_active_shell now
falls back to ~/.nvm/nvm.sh and $XDG_CONFIG_HOME/nvm/nvm.sh when
NVM_DIR is not in the environment.
When the installer runs as 'bash install.sh' or 'curl | bash', the shell
is non-login and non-interactive — ~/.zprofile is never sourced, so
Homebrew's /opt/homebrew/bin (Apple Silicon) or /usr/local/bin (Intel)
is missing from PATH. This caused 'command -v node' to return nothing even
when Node 20+ was already installed via Homebrew.
Two changes:
- Init Homebrew shellenv at the very top of the script (before any checks),
so the full PATH is available for all subsequent commands.
- Add Homebrew path fallback in ensure_default_node_active_shell as a
belt-and-suspenders guard for cases where early init was skipped.
Add Remote Access section to `openacp --help` output with all supported
flags. Add `core:remote` assistant section so the AI agent knows how to
generate remote access links, explain roles, tunnel vs local links, and
QR code behavior.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Top-level extractInstanceFlags strips these flags before passing args
to cmdInstances, so cmdInstancesCreate never receives them. Re-inject
parent flags into subArgs when dispatching to create subcommand.
Workspace path handling:
- Add `allowExternalWorkspaces` config flag (default: true) to allow workspace
paths outside baseDir; external paths must exist on disk (no auto-create)
- Remove absolute path restriction from WorkspaceNameSchema so agents can pass
full paths directly to the API
- API route wraps resolveWorkspace() in try/catch and throws BadRequestError
(HTTP 400 with INVALID_WORKSPACE code) instead of leaking 500 errors
- CLI extractApiError() helper properly extracts .message from structured error
objects, preventing "[object Object]" display
File attachment handling:
- Add AVIF, HEIC, HEIF to SUPPORTED_IMAGE_MIMES (Claude API supports them)
- Remove filename regex restriction from AttachmentInputSchema (was blocking
filenames with spaces and unicode)
- Extract attachment logic to attachment-blocks.ts for testability
Security / allowedPaths:
- Propagate config.workspace.security.allowedPaths through AgentManager.spawn()
and AgentManager.resume() to PathGuard in AgentInstance
Bug fix — agent relay wiring:
- Convert Session.agentInstance to getter/setter so wireAgentRelay() and
wireCommandsBuffer() are called automatically on any assignment, not just
via switchAgent(). Fixes 4 pre-existing test failures in session-bridge-switch.
- Fix closure capture bug: wireAgentRelay/wireCommandsBuffer now capture the
agent instance by value (const instance = this._agentInstance) instead of
via getter, preventing cleanup from running on the wrong instance when the
setter assigns a new agent before calling the cleanup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge sourceAdapterId into routing before enqueue so middleware hooks
(e.g. history recorder) receive it via the agent:beforePrompt payload.
Store sourceAdapterId on user turns in history for downstream use.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>