Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

opencode-acp-client

Latest version: v0.3.0

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: yue_sj
2 Stars
1 Forks
5 Versions
379 Downloads
TypeScript Repo language

Scan summary

opencode-acp-client was last scanned on 27 Nov 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions, all published within 7 days (21–27 Nov 2026).
  • Findings: No rules fired in version 0.3.0.
  • Downloads: 379 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.0 LATEST 27 Nov 2026 No rules fired
0.2.1 26 Nov 2026 No rules fired
0.2.0 26 Nov 2026 No rules fired
0.1.0 21 Nov 2026 Not shown
0.0.0-stage 21 Nov 2026 Not shown

No rules fired in 0.3.0

Findings

Findings for v0.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.3.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

opencode-acp-client

English: README.md

用 opencode v2 的 TUI 当界面,去驱动任意 ACP agent(一个终端 ACP 客户端)。

opencode v2 TUI ──HTTP + SSE──▶ opencode-acp-client ──ACP stdio──▶ 任意 ACP agent
   (界面)
                                  (ACP 客户端)
                                                                   dsh --profile acp /
                                                                   opencode acp / qwen --acp /
                                                                   claude-acp / codex-acp /
                                                                   gemini --acp / agy acp /
                                                                   pi-acp …

适合谁用:喜欢、习惯了 opencode v2 的 TUI 的人 —— 熟悉它的按键、命令面板、会话 tab —— 希望继续用这套界面,同时驱动一个不是 opencode 自己的 agent。

安装

第一步:先装 opencode v2

本工具不自带 TUI,它驱动的是你自己装的 opencode v2(>=2.0.0,建议最新版)。 已经装了就跳过这一步(用 opencode --version 确认是 v2.x);没装则任选一种:

curl -fsSL https://opencode.ai/v2/install | bash   # 官方安装脚本
npm install -g @opencode/cli                      # 或者用 npm(包名是 @opencode/cli)
第二步:装本工具

需要 Node ≥ 20。

# 方式一:从 npm 装(推荐,装的是构建好的包)
npm install -g opencode-acp-client

# 方式二:直接从源码装(指定 Git 仓库即可;npm 会拉代码并在本地构建好)
npm install -g git+https://github.com/pi-is314/opencode-acp-client.git

装出两个命令名,指向同一入口:opencode-acp-client(主名)和 oc-acp-client(短 alias)。

TUI 不在 PATH 上时,用 $OPENCODE_BIN 指过去;启动时会检查版本并报出来,而不是猜。

使用

oc-acp-client -- dsh --profile acp     # 用 dsh 的内置 ACP profile
oc-acp-client -- qwen --acp            # 用 qwen-code
oc-acp-client -- opencode acp          # 用我们的桥把 opencode acp 转成 opencode 自己的 http 协议 :)

-- 后面那条命令就是 agent,说 ACP、走 stdio 的东西都能用。一条命令起 TUI + 适配层; 退出 TUI(或 Ctrl-C)会把 agent 一起停掉,不留残余进程。

除上面几个,还能驱动很多实现了 ACP 的 agent,例如 gemini-cli(gemini --acp)、 Pi(经 pi-acp 适配)、 GitHub Copilot、 Kimi CLI、 Goose、Cursor、 Kiro CLI、Cline、 OpenHands 等。 更多 ACP agent 见这个列表:https://agentclientprotocol.com/get-started/agents。

恢复会话:

opencode-acp-client -c                  # 当前目录最近的一条
opencode-acp-client -s ses_xxxxx        # 指定会话

-s / -c 不接受 -- 加 agent 命令 —— 用哪个 agent 由会话映射表决定,CLI 替你启动它。 会话 id 从哪来?退出 TUI 时打印的 Continue 行已被改写成可直接复制的一条命令:

也可以:

python3 scripts/list-sessions.py            # 最新 20 条:id、多久之前、标题、目录
python3 scripts/list-sessions.py my-project # 按标题/目录/id 子串过滤

一个 client 只服务一个 agent。 这是设计而非缺失:模型/provider 属于 agent,把两个 agent 的 tab 混在一个 TUI 里,正是「新 tab 显示成另一个 agent 的模型」的来源。所以 TUI 的 tab 布局按 agent 隔离(~/.opencode-acp-client/opencode/<agent-slug>/),属于其它 agent 的会话会被拒绝 (404)。-- 只用于新建会话。

常用参数

参数 含义
<directory> 工作目录(opencode 的拼写;--directory / -C 也透传给 TUI)
-s <id> / --session <id> 恢复指定会话
-c / --continue 恢复当前目录最近的会话
--no-tui 只提供 HTTP/SSE 面,不起 TUI
--bridge-port <n> 只在这个端口提供服务(隐含 --no-tui)
--bridge-log <path> 桥日志位置
$OPENCODE_BIN opencode v2 二进制路径

能到 TUI 的参数就这么几个(语义是 opencode v2 的,不是我们的):

参数 怎么到 TUI
--auto 原样转发(自动批准未被显式拒绝的权限)
--prompt <text> 原样转发(起 TUI 前先填好这句)
--print-logs 原样转发
--log-level <level> 原样转发
-c / --continue 原样转发 —— 由 TUI 自己去读它记的会话列表
-s <id> / --session <id> 桥先解析:认你看到的 ses_…,再以 --session 交给 TUI

--server / --standalone 由本工具接管(桥就是那个 server),传了会被丢掉而不是转发。 其余参数不转给 TUI:auth、plugin、upgrade 这类子命令是原样直通给 opencode 可执行文件本身(见下)。

--help 先打印 opencode v2 自己的帮助,再追加本工具的参数段。

子命令:models / api / session 走桥(答案属于你接的 agent),其余(auth、plugin、 upgrade、debug…)原样直通给 opencode。ps 列出本工具启动过的桥进程。

已实测的平台与版本

完整门控(typecheck、单测、52 探针的 OpenAPI 校验、tmux 里的全部真 TUI 模式)在 macOS 与 Debian 12 上各跑过:两边都是 v2.0.0、v2.1.0、v2.2.0、v2.3.0, macOS 上另有 v2.2.7 等中间版本。Windows 上跑 typecheck 与单测,TUI 未实测(没有 tmux)。 16 个 release 逐个记录在 docs/COMPAT-OPENCODE.zh.md。

文档

  • docs/DETAILS.zh.md — 它写了哪些文件、恢复出来是什么样、设计准则、已知缺口
  • docs/ARCHITECTURE.zh.md —— 进程模型与一个回合的时序
  • docs/PROTOCOL.zh.md —— 我们实现的 opencode v2 接口面
  • docs/ACP-MATRIX.zh.md —— ACP 方法矩阵、事件变体、故意偏离
  • docs/ACP-COMPAT.zh.md —— 运行时能力降级规则
  • docs/COMPAT-OPENCODE.zh.md —— 版本策略与逐版本实测记录
  • docs/SESSION-LIFECYCLE.zh.md —— 会话、映射表、恢复链路
  • docs/DEVELOPMENT.zh.md —— 开发笔记与坑
  • AGENTS.zh.md —— 开发本仓的入口

许可证

Apache-2.0。本项目把 opencode v2 二进制作为独立进程启动、走它公开的 HTTP 接口面, 不链接任何第三方源码,所以许可独立成立。

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm opencode-acp-client

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229