1430 Commits

Author SHA1 Message Date
0xmrpeter
c112cafa13 chore: bump version to 2026.408.4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2026.408.4
2026-04-08 23:39:19 +07:00
0xmrpeter
99ec609e88 fix(agents): complete global fallback chain for all catalog methods
PR #219 added global→instance fallback for read methods but missed
resolve(), getAvailable(), and uninstall(). Also removed `as any`
cast on filePath (already readonly).

- resolve(): fall through to globalStore so agents can actually spawn
- getAvailable(): use merged installed entries for consistent listing
- uninstall(): distinguish local, global-only, and missing agents
- Constructor: use this.store.filePath directly instead of as any cast

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 23:38:09 +07:00
Mr.Peter
c7b5647803
Merge pull request #219 from lngdao/fix/ensure-default-agent-on-boot
fix(agents): implement global-to-instance agent fallback chain
2026-04-08 23:23:24 +07:00
0xmrpeter
6d39fea411 feat: detect parent .openacp instance in CLI prompt
Walk up directory tree to find nearest parent .openacp/ when no
instance found in exact CWD. Shows as priority option with
"detected" label. Non-TTY and first-run also prefer parent over
global fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 23:04:09 +07:00
lngdao
e13e46adda fix: AgentCatalog fallback chain — instance agents inherit from global
AgentCatalog now loads both instance-local and global (~/.openacp/)
agent stores. Lookups check instance first, then fall back to global.
This ensures all globally installed agents are available in every
workspace instance without copying files.

Changes:
- AgentStore.filePath made readonly (was private) for path comparison
- AgentCatalog constructor detects if instance != global, loads both
- getInstalled/getInstalledEntries merge global into instance (instance wins)
- getInstalledAgent falls through: instance → global
- Removed hardcoded fallback from core.ts (no longer needed)
2026-04-08 22:58:50 +07:00
0xmrpeter
fc9f4c92c9 feat: resolve nearest running instance for handoff adopt
Walk up directory tree from agent CWD to find the closest running
.openacp/ instance instead of always targeting global ~/.openacp.
Skips dead instances, falls back to global if no local found.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 22:34:15 +07:00
0xmrpeter
e05745075f docs: fix spec after code review
- resolveInstanceRoot() already exists in instance-context.ts (sync)
- Add new async resolveRunningInstance() instead of replacing
- Reuse checkHealth() from instance-discovery.ts
- Reuse findPackageRoot() walk-up pattern from agent-instance.ts
- Note that adopt.ts is the only CLI command missing instanceRoot

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 22:18:58 +07:00
0xmrpeter
5f39e6403e docs: add handoff instance resolution design spec
When multiple instances run on the same machine, handoff should
route to the nearest running instance by walking up the directory
tree from the agent's CWD, instead of always targeting global.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 22:14:29 +07:00
hightman
efc9214e4d
fix: restore apply_patch diff stats/viewer and align tool card rendering (#214)
* fix: improve apply_patch compatibility and tool-card rendering

Unify apply_patch detection, harden diff/viewer extraction for tool_update payloads, prioritize highest-churn files for multi-file viewer links, and map apply_patch cards to edit-style rendering for consistent UI behavior.

Co-authored-by: Codex <noreply@openai.com>

* fix: remove duplicate TodoWrite title branch

Keep a single TodoWrite title formatter in buildTitle to reduce ambiguity while preserving existing compatibility behavior.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 17:11:59 +07:00
0xmrpeter
6b2bb29864 chore: bump version to 2026.408.3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2026.408.3
2026-04-08 17:10:16 +07:00
0xmrpeter
4037bb221d fix(agents): robust npx/uvx resolution with fallback search
- Step 3: return resolved full path for non-node commands found via `which`
  (previously fell through silently)
- Step 4: search multiple locations for npx/uvx — process.execPath dir,
  its realpath, /opt/homebrew/bin, /usr/local/bin
- Add logging for fallback resolution to aid debugging

Fixes spawn ENOENT when daemon's PATH doesn't include npx directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 17:10:09 +07:00
0xmrpeter
7835713c77 chore: bump version to 2026.408.2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2026.408.2
2026-04-08 16:31:51 +07:00
Mr.Peter
c9c6f3951a
Merge pull request #217 from Open-ACP/feat/tunnel-reconnect-on-restart
feat(tunnel): reconnect to existing tunnels on restart + fix npx resolution
2026-04-08 16:31:05 +07:00
0xmrpeter
b6d6b356a7 fix(agents): resolve npx/uvx from Node bin directory when not on PATH
When openacp is installed globally (e.g. via Homebrew or nvm), npx lives
next to the same node binary executing the process. The user's shell PATH
may not include that directory in non-interactive shells, so resolve it
explicitly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:28:02 +07:00
0xmrpeter
204fe661e4 docs: add tunnel reconnect on restart plan
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:27:55 +07:00
0xmrpeter
6130025fae perf(tunnel): restore user tunnels in parallel instead of sequentially
Use Promise.allSettled() instead of sequential for...of loop in restore(),
so all user tunnels start concurrently rather than waiting for each one
to fully connect before starting the next.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:01:16 +07:00
0xmrpeter
85b3d5eaa1 perf(tunnel): resolve startup immediately on cloudflared connection registration instead of waiting 15s timeout
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:57:45 +07:00
0xmrpeter
bf1fab5224 feat(tunnel): preserve state on shutdown, drop sessionId on restore, guard double shutdown
- shutdown() now passes preserveState=true to providers, saves tunnels.json
  before clearing entries, and guards against double-shutdown
- flush() becomes a no-op after shutdown to prevent overwriting preserved state
- restore() omits sessionId since sessions don't survive restart

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:48:01 +07:00
0xmrpeter
a9cb2b67d3 feat(tunnel): skip worker deletion when preserveState=true in OpenACP provider
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:45:08 +07:00
0xmrpeter
c577814e35 feat(tunnel): add preserveState param to TunnelProvider.stop() interface
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:45:02 +07:00
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