1410 Commits

Author SHA1 Message Date
0xmrpeter
cb251ae462 fix(api): accept client-provided turnId in prompt endpoint to prevent SSE echo race condition 2026-04-08 09:22:51 +07:00
0xmrpeter
33503182b4 release: 2026.408.1 v2026.408.1 2026-04-08 00:58:50 +07:00
0xmrpeter
777735bde8 chore: merge develop into main 2026-04-08 00:57:39 +07:00
Mr.Peter
7ab215f801
Merge pull request #216 from Open-ACP/lucas/fix-agent-available-logic
fix: show Install button for agents with missing external CLI dependencies
2026-04-08 00:57:25 +07:00
0xmrpeter
9e83103574 fix: show Install button for agents with missing external CLI dependencies
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.
2026-04-08 00:56:11 +07:00
0xmrpeter
b59456115f Merge branch 'develop' 2026-04-07 23:44:03 +07:00
0xmrpeter
35522d386c Merge branch 'lucas/install-node-path-display' into develop 2026-04-07 23:44:03 +07:00
0xmrpeter
1ff14957ad fix: show node binary path in check_node output for easier debugging
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.
2026-04-07 23:43:57 +07:00
0xmrpeter
952ad698c9 Merge branch 'develop' 2026-04-07 23:43:01 +07:00
0xmrpeter
2166d2db6a Merge branch 'lucas/fix-npm-permissions-check' into develop 2026-04-07 23:43:01 +07:00
0xmrpeter
91c2a672d5 fix: prefer nvm over system node and check node_modules write access
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.
2026-04-07 23:42:53 +07:00
0xmrpeter
7b81fa40f7 merge develop into main 2026-04-07 23:06:46 +07:00
0xmrpeter
69f9d0f2c9 fix: call fix_npm_permissions before both npm and git install paths 2026-04-07 22:54:25 +07:00
0xmrpeter
e8702a15fb fix: call fix_npm_permissions before both npm and git install paths
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>
2026-04-07 22:54:19 +07:00
0xmrpeter
191cabe2f9 fix: apply npm permissions fix on macOS, not just Linux 2026-04-07 22:52:51 +07:00
0xmrpeter
bbc5b275bc fix: apply npm permissions fix on macOS, not just Linux
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>
2026-04-07 22:52:45 +07:00
0xmrpeter
44b658e3db chore: bump version to 2026.407.1
fix(tests): update force_reply assertions to match removed selective flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v2026.407.1
2026-04-07 16:49:42 +07:00
0xmrpeter
5fb0b60355 fix(telegram): remove selective flag from force_reply to auto-open input box
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>
2026-04-07 16:45:54 +07:00
0xmrpeter
e521b372ee fix: activate node via nvm/fnm before check_node in non-login shells 2026-04-07 16:43:53 +07:00
0xmrpeter
2084c587e2 fix: activate node via nvm/fnm before check_node in non-login shells
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.
2026-04-07 16:42:53 +07:00
0xmrpeter
83f349c47e fix(tests): update enqueuePrompt assertions and add eventBus mock for API prompt route 2026-04-07 16:12:59 +07:00
0xmrpeter
9f2abea16d Merge branch 'feat/telegram-custom-path-wizard' into develop 2026-04-07 15:56:37 +07:00
0xmrpeter
85fdbf9bf1 fix: resolve defaultAgent options from config.agents when agents.json missing 2026-04-07 15:55:20 +07:00
0xmrpeter
b893fb7062 fix: emit MESSAGE_QUEUED/PROCESSING for API prompts so all SSE clients see user messages
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
2026-04-07 15:53:18 +07:00
0xmrpeter
24ed74a699 fix: add chatId guard to force-reply interceptor 2026-04-07 15:45:15 +07:00
0xmrpeter
e2759b97ce refactor: remove getAssistantSession param from setupNewSessionCallbacks 2026-04-07 15:42:45 +07:00
0xmrpeter
a9fbdc8340 feat: register force-reply interceptor for custom path wizard 2026-04-07 15:41:13 +07:00
0xmrpeter
8dd6cfd8c3 feat: replace ns:custom AI delegation with force-reply path input 2026-04-07 15:39:33 +07:00
0xmrpeter
06150713ac feat: add force-reply state helpers for telegram custom path wizard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 15:35:46 +07:00
0xmrpeter
23aa5d0459 docs: add implementation plan for telegram custom path wizard 2026-04-07 15:25:56 +07:00
0xmrpeter
eb07e68aa4 docs: add spec for telegram custom path wizard (no-AI path input) 2026-04-07 15:19:12 +07:00
Mr.Peter
2e01b28330
Merge pull request #215 from lngdao/fix/workspace-basedir
fix: set workspace.baseDir to target directory on instances create/clone
2026-04-07 14:37:35 +07:00
0xmrpeter
0aef31ce74 Merge branch 'develop' of github.com:Open-ACP/OpenACP into develop 2026-04-07 14:12:38 +07:00
lngdao
8073235299 fix: set workspace.baseDir to target directory on instances create/clone 2026-04-07 10:41:40 +07:00
0xmrpeter
aa5f25b974 chore: bump version to 2026.406.5 2026-04-06 19:17:36 +07:00
0xmrpeter
3d57f94e8e fix(install): detect nvm without NVM_DIR set in non-login shells
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.
v2026.406.5
2026-04-06 19:12:26 +07:00
0xmrpeter
30b868995b chore: bump version to 2026.406.4 v2026.406.4 2026-04-06 18:39:09 +07:00
0xmrpeter
33af0a98c7 fix(install): detect Homebrew Node in non-login shells
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.
2026-04-06 18:31:58 +07:00
Mr.Peter
39037f560c
Merge pull request #212 from lngdao/fix/instances-create-flags
fix: instances create — flag forwarding, TTY check, complete config
2026-04-06 17:40:39 +07:00
0xmrpeter
a313b90462 chore: merge develop into main (v2026.406.3) 2026-04-06 17:16:40 +07:00
0xmrpeter
93d85742a1 chore: bump version to 2026.406.3 v2026.406.3 2026-04-06 17:16:33 +07:00
0xmrpeter
5b132d1b50 feat: add openacp remote to CLI help and assistant guide
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>
2026-04-06 17:16:23 +07:00
lngdao
15e0e1ef1f fix: instances create generates complete config with SSE channel and defaultAgent 2026-04-06 17:14:39 +07:00
lngdao
e718e2d5f2 fix: set defaultAgent to 'claude' when creating instance without --agent 2026-04-06 17:11:37 +07:00
lngdao
4386cd0b19 fix: skip update prompt when stdin is not a TTY
Prevents interactive update prompt from blocking when CLI is invoked
programmatically (e.g. from Tauri app via invoke_cli).
2026-04-06 17:10:50 +07:00
0xmrpeter
215c64c2cd chore: merge develop into main (v2026.406.2) 2026-04-06 16:47:57 +07:00
0xmrpeter
4495fdbf0b chore: bump version to 2026.406.2 v2026.406.2 2026-04-06 16:47:47 +07:00
lngdao
24fd15f7f9 fix: forward --dir/--from/--name flags to instances create subcommand
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.
2026-04-06 16:46:57 +07:00
0xmrpeter
9ec2dddb4a fix: improve path/file UX and fix agent relay wiring bug
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>
2026-04-06 16:44:26 +07:00
0xmrpeter
8084061c3e feat: propagate sourceAdapterId through middleware to history recorder
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>
2026-04-06 16:03:13 +07:00