36 Commits

Author SHA1 Message Date
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
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
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
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
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
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.
2026-04-06 19:12:26 +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
89c6ab02b1
feat(install): enhance npm resolution in Windows install script
feat(install): enhance npm resolution in Windows install script
2026-04-04 10:46:53 +07:00
qm1719
e1f90feacd feat(install): enhance npm resolution in Windows install script
Problem:
1. line 238 contains mojibake (UTF-8 em dash mis-decoded) and a curly closing quote (U+201D) instead of ASCII ", so the string never terminates and { is parsed as code. Fixing the string to use ASCII quotes and a normal hyphen.
2. On Windows, npm is implemented as npm.ps1. For many invocations it does not use $args; it takes the original command text, parses it again with PowerShell, and runs something like Invoke-Expression to call node with rebuilt arguments. A scoped package like @openacp/cli@latest is parsed incorrectly (because of @), so the args handed to npm are wrong and I got "Unknown command: "pm"".
Changes proposed:
- Introduced a new function, Resolve-NpmExecutable, to determine the correct npm executable for Windows environments.
- Updated Install-OpenACPNpm and Main functions to utilize the resolved npm executable, ensuring compatibility and reliability during installation.
- Improved logging for dry-run scenarios and retry attempts during npm installation.
- Manually tested and succeed
2026-04-04 09:35:07 +07:00
0xmrpeter
43c16dff4b chore: bump installer version to 1.0.2
- Updated the installer version in install.sh from 1.0.1 to 1.0.2 for consistency.
- Ensured shell configuration files are patched idempotently during Node.js installation, improving robustness across environments.
2026-04-03 15:13:18 +07:00
0xmrpeter
b55aa151db chore: bump installer version to 1.0.1
- Updated the installer version in both install.ps1 and install.sh scripts from 1.0.0 to 1.0.1, ensuring consistency across platforms.
2026-04-03 15:10:02 +07:00
0xmrpeter
f9c58cb2a2 fix: ensure ~/.zshrc exists before patching on macOS
- Updated the install.sh script to create ~/.zshrc if it does not exist, ensuring that the nvm installer can properly append necessary configurations.
- Enhanced the logic to patch both zsh and bash configuration files, improving the robustness of the installation process on macOS.
2026-04-03 15:09:30 +07:00
0xmrpeter
11a9e18bb0 chore: remove versioning from installer script commands in README and scripts
- Updated installation commands in README.md and scripts to remove version query parameters, simplifying the usage instructions for macOS, Linux, and PowerShell scripts.
2026-04-03 15:04:31 +07:00
0xmrpeter
fdf4fba7a3 chore: update installer scripts to version 1.0.0
- Modified installation commands in README.md to include versioning for macOS, Linux, and PowerShell scripts.
- Updated install.ps1 and install.sh scripts to define and display the installer version as 1.0.0, enhancing clarity for users.
2026-04-03 15:02:18 +07:00
0xmrpeter
aee454f2f7 refactor: enhance nvm installation script for macOS and PATH handling
- Simplified the logic for patching shell configuration files on macOS, ensuring ~/.zshrc is patched automatically and providing a safety net for other configurations.
- Improved PATH handling by skipping directories already present in the original PATH or within the nvm prefix, reducing unnecessary modifications.
- Added a user prompt to open a new terminal after nvm installation to ensure proper loading of nvm in the current session.
2026-04-03 14:58:37 +07:00
0xmrpeter
71411ca905 refactor: improve nvm shell configuration patching logic
- Enhanced the patch_nvm_shell_configs function to ensure nvm initialization lines are added to the appropriate shell configuration files based on the operating system.
- On macOS, it now always patches ~/.zshrc and checks for existing bash configurations, while on Linux, it patches existing files or creates ~/.bashrc if none are present.
- This change improves the robustness of the installation script by ensuring proper nvm setup across different environments.
2026-04-03 14:55:31 +07:00
0xmrpeter
ee4518af2e feat: add nvm shell configuration patching to install script
- Implemented a function to ensure nvm initialization lines are added to relevant shell configuration files (.bashrc, .zshrc, .bash_profile).
- The function checks for existing entries to avoid duplication and creates a .zshrc if none of the config files exist.
- This enhancement improves the user experience by ensuring nvm is properly set up across different shell environments on macOS.
2026-04-03 14:49:21 +07:00
0xmrpeter
93c5aea626 fix(install): auto-detect and install Xcode CLT on macOS before nvm 2026-04-03 10:39:34 +07:00
0xmrpeter
e300e7d605 refactor(docs): update installation instructions and requirements in README; modify Node.js version check in install scripts 2026-04-03 10:26:57 +07:00
0xmrpeter
ff9c6028bb fix: dev-loop, config command, instance-context and startup improvements
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 15:48:43 +07:00
0xmrpeter
d9d3fab470 fix: correct date format in version validation comment in install script 2026-04-01 13:58:03 +07:00
0xmrpeter
3380faa4df docs: update plugin commands for consistency and clarity
- Changed 'plugins' to 'plugin' in installation, configuration, enabling, and disabling commands for uniformity.
- Updated Node.js version requirements in install script to reflect the minimum supported version.
2026-03-31 15:40:09 +07:00
Mr.Peter
9c9dd5a785
fix(install): address code review issues in install scripts (#172)
- Add accepted-risk comment for NodeSource curl|bash pattern (HTTPS enforced)
- Fix wrapper script to use printf %q to safely handle special chars in repo_dir
- Add validate_args() to reject unsafe chars and path traversal in --git-dir/--version
- Add npm retry logic (3x, 2s delay) to install.ps1 to match install.sh behavior
- Fix nvm detection: replace unreliable command -v nvm with NVM_DIR/nvm.sh checks
- Add git re-check after install_git() with clear error if installation failed
- Fix PowerShell Add-ToPath null-safety for PATH on fresh installs
- Replace echo -e with printf %b to avoid flag misinterpretation in prompt_choice

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 10:04:01 +07:00
lngdao
1a6a27269d
feat(install): add one-liner install scripts for macOS/Linux/Windows (#170)
* feat(install): add macOS/Linux one-liner install script

* docs: add one-liner install commands to Quick Start

* feat(install): add Windows PowerShell installer

* fix(install): update taglines
2026-03-31 09:58:57 +07:00
0xmrpeter
c3691909b8 refactor(speech): remove Edge TTS integration and related tests; update TTS provider handling
- Removed the Edge TTS provider implementation and its associated tests.
- Updated the SpeechService to support dynamic registration and unregistration of TTS providers.
- Enhanced the speech plugin to install the Edge TTS plugin dynamically if not already available.
- Adjusted configuration to exclude specific test directories and removed unnecessary dependencies from package.json.
2026-03-27 21:24:39 +07:00
0xmrpeter
fb18bdb9b2 fix(docs): update Twitter handle in README and build script
- Changed Twitter handle from Open_ACP to openacp_ai in README.md and build-publish.ts.
- Ensured consistency across documentation and scripts for social media links.
2026-03-27 00:55:18 +07:00
0xmrpeter
dd5ed7151d fix(ci): ensure CLI types built before SDK in publish pipeline
SDK needs dist/index.d.ts from CLI tsc build. In CI, build:publish
runs after fresh install with no dist/. Now build-publish.ts auto-runs
tsc if dist/index.d.ts missing, and CI runs pnpm build first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:26:37 +07:00
0xmrpeter
e6de94347e feat: setup dual-package publish for @openacp/cli + @openacp/plugin-sdk
- SDK peerDependencies: @openacp/cli (not workspace name)
- build-publish.ts builds and prepares both packages
- GitHub Actions publishes both on tag push
- SDK version synced with CLI version
- Template string deps excluded from build verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:03:57 +07:00
0xmrpeter
6588f91698 fix: improve build-publish with blacklist bundling and dependency verification
- Switch from external whitelist to noExternal blacklist in tsup config
- Add post-build verification to catch missing published dependencies
- Only bundle msedge-tts (pnpm-only), pass through all other deps
2026-03-25 16:04:13 +07:00
0xmrpeter
d4a0f9c3aa fix: only include external deps in published package to avoid pnpm-only install errors 2026-03-25 15:55:56 +07:00
0xmrpeter
aae01af109 feat(registry): improve agent UX with pagination, descriptions, and deduplication
- Add pagination to /agents in Telegram (6 per page, prev/next buttons)
- Show agent descriptions from ACP Registry in both CLI and Telegram
- Deduplicate agent picker logic (handleNew + startInteractiveNewSession)
- Improve CLI install progress with visual progress bar
- Add supported agents table and ACP Registry attribution to README
- Add social links and keywords to package.json and publish script
2026-03-22 21:53:18 +07:00
0xmrpeter
34a8ce36f9 feat(registry): integrate ACP Registry for agent discovery and installation
Add AgentCatalog service layer that fetches agents from the official ACP
Registry CDN, supports 3 distribution types (npx, uvx, binary), and
manages installed agents in ~/.openacp/agents.json.

- New core modules: agent-catalog, agent-store, agent-installer, agent-dependencies
- Bundle registry snapshot for offline fallback
- Auto-migrate existing config.agents to new agent store on startup
- CLI: openacp agents list/install/uninstall/refresh/info
- Telegram: /agents browser, /install command, per-session agent picker
- Setup flow rewritten to use registry with multi-select
- 28 agents available from registry (Claude, Gemini, Cursor, Copilot, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:52:05 +07:00
0xmrpeter
6a52194c13 feat: add restart and update commands to Telegram adapter
- Introduced `/restart` and `/update` commands for managing the OpenACP application directly from Telegram.
- Implemented logic to check for updates, notify users, and handle application restarts seamlessly.
- Enhanced menu options to include new commands, improving user interaction and accessibility.
- Updated session management to ensure proper handling of permission requests and session states during updates and restarts.
2026-03-22 17:04:18 +07:00
0xmrpeter
a9bfc03590 fix: update repository URL in build-publish script 2026-03-20 17:15:02 +07:00
0xmrpeter
40777e75e2 chore: update package.json and pnpm-lock.yaml for dependency management and build configuration
- Added new dependencies: @agentclientprotocol/sdk, @inquirer/prompts, grammy, nanoid, and zod.
- Updated build scripts to use TypeScript compiler directly and modified entry points for the CLI.
- Removed outdated pnpm workspace and TypeScript configuration files.
- Adjusted tsup configuration for improved output structure and TypeScript declaration generation.
2026-03-19 19:03:47 +07:00
0xmrpeter
d19032d779 Enhance OpenACP setup by adding support for plugin adapters and improving configuration management. Update .gitignore to exclude dist-publish, modify package.json to include versioning and new build scripts, and expand README with installation and plugin instructions. Refactor config schema to support dynamic channel configurations and improve main execution flow for better adapter registration. 2026-03-19 17:29:37 +07:00