@skylandnpm/octopus-proxy 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/chunk-TIHWE4WN.js +16201 -0
- package/dist/cli.js +738 -0
- package/dist/main.js +11 -0
- package/package.json +44 -0
- package/proxy.example.json +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Octopus Proxy
|
|
2
|
+
|
|
3
|
+
Octopus Proxy 是运行在 macOS 或 Linux 主机上的 Octopus 代理,提供 `octopus-proxy` 命令来初始化配置、安装系统服务和检查运行状态。需要 Node.js 22 或更高版本。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install -g @skylandnpm/octopus-proxy@latest --registry https://registry.npmjs.org
|
|
9
|
+
octopus-proxy help
|
|
10
|
+
octopus-proxy onboard
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
无交互环境可使用 `octopus-proxy onboard --non-interactive`;完整选项见 `octopus-proxy help`。安装服务后可运行 `octopus-proxy status` 和 `octopus-proxy doctor` 检查状态。
|
|
14
|
+
|
|
15
|
+
## Pi agent
|
|
16
|
+
|
|
17
|
+
支持 Pi coding agent 的 RPC 模式,验证基线为 `@earendil-works/pi-coding-agent` **0.87.1**(旧 npm 包名为 `@mariozechner/pi-coding-agent`)。先安装 Pi,在代理运行用户下启动 `pi`,用 `/login` 配置提供商;也可按 Pi 文档配置 API key 环境变量或 `~/.pi/agent/models.json`。系统服务需要能读取相同的凭据和环境。
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install -g @earendil-works/pi-coding-agent@0.87.1
|
|
21
|
+
octopus-proxy onboard --tool pi
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
已有配置可将 `tool` 改为:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"kind": "pi",
|
|
29
|
+
"command": "/absolute/path/to/pi",
|
|
30
|
+
"mode": "managed",
|
|
31
|
+
"autoStart": true
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`command` 使用 `command -v pi` 得到的绝对路径,保存配置后运行 `octopus-proxy restart`。Pi 0.87.1 需要 Node.js 22.19 或更高版本。Pi 仅支持 managed 模式,不使用 `baseUrl`。
|
|
36
|
+
|
|
37
|
+
支持会话创建、列表、历史、状态、发送、中止、删除、模型选择、图片及文件附件,以及扩展的 select/confirm/input/editor 问答。Pi 本身没有内置的逐工具审批队列,`permissions.list` 返回空列表;扩展交互通过 `questions.*` 应答。
|
|
38
|
+
|
|
39
|
+
每个打开的会话使用独立 Pi 进程,历史和代理元数据存放在 `stateDirectory/pi-sessions/<projectId>/`。列表仅包含代理创建的会话;不会导入终端中的其他 Pi 会话。代理重启会中断正在执行的任务,之后读取或发送时按保存的会话文件恢复,不自动重发消息。终端、会话分叉和 MCP/OAuth 配置等未实现操作不会在 capabilities 中上报。
|
|
40
|
+
|
|
41
|
+
协议和验证详情见 [Pi 接入说明](../../docs/pi-protocol-notes.md)。
|
|
42
|
+
|
|
43
|
+
## 发布
|
|
44
|
+
|
|
45
|
+
与 `apps/octopus-taskhub/cli` 相同,发布命令会先构建,再递增补丁版本,最后发布到公开 npm registry。先提交工作区改动并登录有权发布 `@skylandnpm` 包的 npm 账号:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npm adduser --registry https://registry.npmjs.org
|
|
49
|
+
pnpm --filter @skylandnpm/octopus-proxy run build:patch:publish
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
发布前可用 `pnpm --filter @skylandnpm/octopus-proxy build` 检查构建;进入 `apps/octopus-proxy` 后运行 `npm pack --dry-run` 检查包内容。
|