@skylandnpm/octopus-proxy 0.1.14 → 0.1.16
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 +3 -3
- package/dist/{chunk-JHJQMGCD.js → chunk-N4L5M6MC.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/main.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ Octopus Proxy 是运行在 macOS 或 Linux 主机上的 Octopus 代理,提供
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install -g @skylandnpm/octopus-proxy@latest --registry https://registry.npmjs.org
|
|
8
|
+
npm install -g @skylandnpm/octopus-proxy@latest --prefer-online --registry https://registry.npmjs.org
|
|
9
9
|
octopus-proxy help
|
|
10
10
|
octopus-proxy version
|
|
11
11
|
octopus-proxy onboard
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`--prefer-online` 会让 npm 在安装时重新校验 registry 中的包元数据,避免本地缓存使 `@latest` 仍指向旧版本,不再需要先运行 `npm view @skylandnpm/octopus-proxy versions`。如果升级后 `octopus-proxy version` 仍显示旧版本,运行 `command -v npm`、`npm prefix -g` 和 `command -v octopus-proxy`,确认 npm 的全局安装目录与实际执行的命令属于同一套 Node.js 环境;使用 NVM 与 Homebrew 时尤其要检查这一点。
|
|
15
15
|
|
|
16
16
|
向导默认使用 `https://octopus.wuyehao.com` 作为 Hub 地址;按需可输入其他地址,或用 `--hub-url` 指定。再次运行向导时会读取现有配置,直接回车即可保留各项设置;机器人 Secret 只提示已配置,不在终端显示原值。macOS 上选择编码工具时,向导优先显示已配置或探测到的命令路径,否则给出该工具的 macOS 路径示例;回车后会检查文件可执行性并运行版本命令,失败时要求重新输入。无交互环境可使用 `octopus-proxy onboard --non-interactive`,未提供 `--hub-url` 时也使用该默认地址;完整选项见 `octopus-proxy help`。安装服务后可运行 `octopus-proxy status` 和 `octopus-proxy doctor` 检查状态。
|
|
17
17
|
|
|
@@ -72,6 +72,6 @@ npm run publish
|
|
|
72
72
|
|
|
73
73
|
## 编码工具账号与 OpenCode 服务
|
|
74
74
|
|
|
75
|
-
OpenCode 使用 external HTTP
|
|
75
|
+
OpenCode 使用 external HTTP 模式。Proxy 默认在启动时使用 `tool.command` 拉起未运行的服务;也可自行运行 `opencode serve --hostname 127.0.0.1 --port 4096`,或在 Claw 工作区点击“启动服务”重试。配置的 `tool.baseUrl` 必须与端口一致。启动日志保存在 `stateDirectory/opencode-serve.log`;如需只连接自行管理的服务,可显式设置 `autoStart: false`。旧 managed 配置必须迁移;Proxy 不停止或重启已有 OpenCode 服务。
|
|
76
76
|
|
|
77
77
|
Claw 的“编码工具账号”窗口支持 Codex API Key/设备码、ZCode 原生 Z.AI OAuth、OpenCode 原生 API Key/OAuth。凭据由编码工具保存,模型列表从原生接口读取。详细行为与验证边界见 [编码工具账号](../../docs/tool-authentication.md)。
|
|
@@ -11607,7 +11607,7 @@ var ToolSchema = z.object({
|
|
|
11607
11607
|
password: z.string().optional()
|
|
11608
11608
|
}).superRefine((tool, context) => {
|
|
11609
11609
|
if (tool.kind === "opencode" && tool.mode === "managed") context.addIssue({ code: z.ZodIssueCode.custom, path: ["mode"], message: "OpenCode \u4EC5\u652F\u6301 external \u6A21\u5F0F\uFF1B\u8BF7\u5C06 tool.mode \u6539\u4E3A external\uFF0C\u7136\u540E\u53EF\u4ECE Claw \u8FDC\u7A0B\u542F\u52A8\u670D\u52A1" });
|
|
11610
|
-
}).transform((tool) => ({ ...tool, mode: tool.kind === "opencode" ? "external" : tool.mode ?? "managed", autoStart: tool.autoStart ??
|
|
11610
|
+
}).transform((tool) => ({ ...tool, mode: tool.kind === "opencode" ? "external" : tool.mode ?? "managed", autoStart: tool.autoStart ?? true }));
|
|
11611
11611
|
var ConfigSchema = z.object({
|
|
11612
11612
|
hubUrl: z.string().url(),
|
|
11613
11613
|
botId: z.string().uuid(),
|
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
runDaemon,
|
|
23
23
|
supportedPlatform,
|
|
24
24
|
systemdUnitPath
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-N4L5M6MC.js";
|
|
26
26
|
|
|
27
27
|
// src/cli.ts
|
|
28
28
|
import { spawn } from "node:child_process";
|
|
@@ -625,7 +625,7 @@ async function runOnboard(opts) {
|
|
|
625
625
|
stateDirectory,
|
|
626
626
|
...loopbackHttp ? { allowInsecureLocalhost: true } : {},
|
|
627
627
|
projects: projects.map((project) => ({ id: project.id, name: project.name, directory: project.directory, specDirectories: project.specDirectories ?? ["specs", "docs"] })),
|
|
628
|
-
tool: { kind: toolKind, command: toolCommand || describeTool(toolKind).defaultCommand, ...toolKind === "opencode" ? { baseUrl, mode: "external" } : {}, ...toolKind === existing?.tool.kind && existing.tool.password ? { password: existing.tool.password } : {}, autoStart: toolKind === existing?.tool.kind ? existing.tool.autoStart :
|
|
628
|
+
tool: { kind: toolKind, command: toolCommand || describeTool(toolKind).defaultCommand, ...toolKind === "opencode" ? { baseUrl, mode: "external" } : {}, ...toolKind === existing?.tool.kind && existing.tool.password ? { password: existing.tool.password } : {}, autoStart: toolKind === existing?.tool.kind ? existing.tool.autoStart : true }
|
|
629
629
|
});
|
|
630
630
|
await loadConfig(opts.configPath);
|
|
631
631
|
console.log(`\u5DF2\u5199\u5165\u914D\u7F6E\uFF1A${opts.configPath}\uFF080600\uFF09`);
|
package/dist/main.js
CHANGED