@drakonkat/ai-helper 1.1.1 → 1.2.3
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/ARCHITECTURE.md +14 -3
- package/CHANGELOG.md +9 -0
- package/README.md +483 -26
- package/docs/benchmark.md +373 -0
- package/package.json +17 -5
- package/scripts/bench-proxy.js +111 -0
- package/scripts/build.js +16 -0
- package/src/benchmark/fixtures.js +162 -0
- package/src/benchmark/live.js +207 -0
- package/src/benchmark/measurement.js +180 -0
- package/src/benchmark/quality-fixtures.js +95 -0
- package/src/benchmark/quality.js +206 -0
- package/src/benchmark/report.js +162 -0
- package/src/benchmark/runner.js +287 -0
- package/src/codex-config.js +247 -0
- package/src/codex-routing.js +132 -0
- package/src/config.js +19 -1
- package/src/index.js +158 -26
- package/src/manager.js +233 -15
- package/src/proxy-interceptor.example.mjs +33 -0
- package/src/proxy-presets.js +235 -0
- package/src/proxy-stats.js +64 -0
- package/src/proxy-worker.js +17 -0
- package/src/proxy.js +313 -0
- package/src/request-images.js +69 -0
- package/src/service-updates.js +68 -0
- package/src/tui.js +370 -162
- package/src/update.js +41 -0
- package/src/utils/metrics.js +39 -12
- package/src/utils/process.js +92 -146
- package/src/utils/versions.js +165 -0
package/ARCHITECTURE.md
CHANGED
|
@@ -91,10 +91,21 @@ Uses `ps -eo pid,command` to match command line strings and extract active PIDs.
|
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
94
|
-
## 5.
|
|
94
|
+
## 5. Runtime Design
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
The service manager uses standard built-in modules:
|
|
97
97
|
- `node:child_process` & `node:fs`
|
|
98
|
-
-
|
|
98
|
+
- The CLI runs on **Node.js (>= 20.19.0)** and **Bun**.
|
|
99
99
|
- Standalone binaries can be generated with `bun build --compile`.
|
|
100
100
|
|
|
101
|
+
The interceptor proxy uses Node's HTTP/HTTPS streams and the `ws` package.
|
|
102
|
+
Its worker always runs on Node, including when launched by Bun: Bun's compatibility
|
|
103
|
+
layers do not preserve all required WebSocket handshake and HTTP cancellation
|
|
104
|
+
behavior. `scripts/build.js` embeds a bundled Node worker in the compiled CLI;
|
|
105
|
+
on startup it is written to `AIH_HOME/proxy-worker.mjs`. Build with `bun run build`
|
|
106
|
+
to include this worker. Node must remain available on PATH.
|
|
107
|
+
|
|
108
|
+
The manager spawns the worker directly, without a shell, and waits for an IPC
|
|
109
|
+
ready/error message before saving its PID and configuration. Proxy stop targets
|
|
110
|
+
that PID only; it does not kill other processes by listening port. Interceptors
|
|
111
|
+
are loaded in the worker and use the same code path in source and compiled builds.
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ All notable changes to **`ai-helper` (`aih`)** are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Explicit managed-service updates with `aih <service> update`, `aih update [services...]`, and the live dashboard's `u` shortcut. Includes clean JSON results, target validation, running-service restart/recovery, and version-cache invalidation; automatic checks remain read-only.
|
|
11
|
+
- GitHub `REPO` column in plain status and the live dashboard, `repositoryUrl` in JSON, and repository opening with `g` or `aih open <service> --repo`.
|
|
12
|
+
- Automatic Codex proxy URL configuration on managed proxy start/restart and ocx start/restart with an active proxy, including actual bound ports, ocx readiness checks, TOML-preserving edits, first-write backups, and `AIH_CODEX_AUTOCONFIG=0` opt-out.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
7
16
|
## [1.1.1] - 2026-08-27
|
|
8
17
|
|
|
9
18
|
### Updates
|