@agent-proxy/gateway 0.16.1 → 0.17.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 CHANGED
@@ -262,6 +262,8 @@ agent-proxy config --log off
262
262
 
263
263
  | 命令 | 用途 |
264
264
  | --- | --- |
265
+ | `agent-proxy -v` | 查看当前 CLI 版本(等价 `--version`)。 |
266
+ | `agent-proxy -h` | 查看命令帮助(等价 `--help`)。 |
265
267
  | `agent-proxy status` | 查看网关状态、当前模式及安装信息。 |
266
268
  | `agent-proxy start` | 启动网关。 |
267
269
  | `agent-proxy stop` | 停止网关及后台 Web 界面。 |
package/dist/index.js CHANGED
@@ -11172,6 +11172,8 @@ function usage() {
11172
11172
  console.log(`agent-proxy - Bun gateway for Codex Desktop and CLI
11173
11173
 
11174
11174
  Usage:
11175
+ agent-proxy -v | --version
11176
+ agent-proxy -h | --help
11175
11177
  agent-proxy install [options] [--upstream-only] [--restart-codex]
11176
11178
  agent-proxy uninstall [--restart-codex]
11177
11179
  agent-proxy start|stop
@@ -11308,12 +11310,16 @@ function parseArgs(args) {
11308
11310
  const options = {};
11309
11311
  for (let i = 0;i < args.length; i += 1) {
11310
11312
  const value = args[i];
11313
+ if (value === "-v" || value === "-h") {
11314
+ options[value === "-v" ? "version" : "help"] = true;
11315
+ continue;
11316
+ }
11311
11317
  if (!value.startsWith("--")) {
11312
11318
  positional.push(value);
11313
11319
  continue;
11314
11320
  }
11315
11321
  const key = value.slice(2);
11316
- if (["help", "sync", "restart-codex", "yes", "manual-codex-config", "start", "daemon", "status", "stop", "restart", "switch"].includes(key) || ["upstream-only", "cpa-only"].includes(key) && args[0] !== "config") {
11322
+ if (["help", "version", "sync", "restart-codex", "yes", "manual-codex-config", "start", "daemon", "status", "stop", "restart", "switch"].includes(key) || ["upstream-only", "cpa-only"].includes(key) && args[0] !== "config") {
11317
11323
  options[key] = true;
11318
11324
  continue;
11319
11325
  }
@@ -12979,7 +12985,11 @@ var COMMAND_OPTIONS = {
12979
12985
  async function runCli(args) {
12980
12986
  const { positional, options } = parseArgs(args);
12981
12987
  const command = positional[0];
12982
- if (!command || command === "help" || options.help) {
12988
+ if (options.version === true && !command) {
12989
+ console.log(GATEWAY_CONFIG_VERSION);
12990
+ return;
12991
+ }
12992
+ if (!command || command === "help") {
12983
12993
  usage();
12984
12994
  return;
12985
12995
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-proxy/gateway",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "description": "Agent Proxy 的 Bun 网关与 CLI 业务应用。",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,12 +21,12 @@
21
21
  "prepack": "bun ../../scripts/verify-package.ts ."
22
22
  },
23
23
  "dependencies": {
24
- "@agent-proxy/agy": "0.16.1",
25
- "@agent-proxy/codebuddy": "0.16.0",
26
- "@agent-proxy/opencode-zen": "0.16.0",
27
- "@agent-proxy/plugin-api": "0.16.0",
28
- "@agent-proxy/qoder": "0.16.0",
29
- "@agent-proxy/zcode": "0.16.0",
24
+ "@agent-proxy/agy": "0.17.0",
25
+ "@agent-proxy/codebuddy": "0.17.0",
26
+ "@agent-proxy/opencode-zen": "0.17.0",
27
+ "@agent-proxy/plugin-api": "0.17.0",
28
+ "@agent-proxy/qoder": "0.17.0",
29
+ "@agent-proxy/zcode": "0.17.0",
30
30
  "bytes": "^3.1.2",
31
31
  "i18next": "^26.4.2",
32
32
  "react": "^19.2.0",
@@ -35,7 +35,7 @@
35
35
  "yaml": "^2.9.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@agent-proxy/models": "0.16.0"
38
+ "@agent-proxy/models": "0.17.0"
39
39
  },
40
40
  "engines": {
41
41
  "bun": ">=1.2.0"
@@ -49,5 +49,5 @@
49
49
  "type": "git",
50
50
  "url": "git+https://github.com/aceHubert/codex-cliproxy-gateway.git"
51
51
  },
52
- "gitHead": "559eed932ecf1112d90c17f50a7908411574031a"
52
+ "gitHead": "7dc26953606d78cc982692de2f830f9f92061adc"
53
53
  }