@cuongtran001/kanna 0.52.0 → 0.54.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 +18 -2
- package/dist/client/assets/{index-dKC436cX.js → index-D-7AB5Mj.js} +209 -199
- package/dist/client/assets/index-DA7zX2cY.css +32 -0
- package/dist/client/assets/{index-Cip_2Q8A.js → index-D_O0RuN1.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/export-viewer/assets/index-DbY6qAVj.css +1 -0
- package/dist/export-viewer/index.html +2 -2
- package/package.json +1 -1
- package/src/server/agent.oauth-release.test.ts +192 -0
- package/src/server/agent.oauth-rotation.test.ts +313 -0
- package/src/server/agent.test.ts +135 -0
- package/src/server/agent.ts +252 -9
- package/src/server/app-settings.ts +2 -1
- package/src/server/auto-continue/auth-error-detector.test.ts +66 -0
- package/src/server/auto-continue/auth-error-detector.ts +66 -0
- package/src/server/cli-runtime.test.ts +122 -1
- package/src/server/cli-runtime.ts +89 -6
- package/src/server/codex-app-server-protocol.ts +17 -0
- package/src/server/codex-app-server.test.ts +226 -0
- package/src/server/codex-app-server.ts +96 -4
- package/src/server/oauth-pool/oauth-token-pool.test.ts +105 -0
- package/src/server/oauth-pool/oauth-token-pool.ts +32 -5
- package/src/server/quick-response.test.ts +35 -1
- package/src/server/quick-response.ts +20 -1
- package/src/shared/types.ts +1 -1
- package/dist/client/assets/index-BOSvFHg_.css +0 -32
- package/dist/export-viewer/assets/index-6LKhlyEh.css +0 -1
- /package/dist/export-viewer/assets/{index-Dv1ssiNn.js → index-DgP6lpZ3.js} +0 -0
package/README.md
CHANGED
|
@@ -370,10 +370,26 @@ The update mechanism is abstracted behind `UpdateChecker` + `UpdateReloader` int
|
|
|
370
370
|
|
|
371
371
|
| `KANNA_RELOADER` | Check | Reload | Notes |
|
|
372
372
|
|---|---|---|---|
|
|
373
|
-
| unset / `supervisor` | npm registry for `@cuongtran001/kanna` |
|
|
373
|
+
| unset / `supervisor` | npm registry for `@cuongtran001/kanna` | `<pm> install -g @cuongtran001/kanna@latest`, exit 76, supervisor respawns | Default. End-user path. `<pm>` auto-detected: `bun`/`npm`/`pnpm`/`yarn`. Override via `KANNA_UPDATE_COMMAND`. |
|
|
374
374
|
| `pm2` | `git fetch` + `HEAD` vs `origin/main` | `git pull --ff-only` → cond. `bun install` → `bun run build` → `pm2 reload` | Dev/self-host path. Requires `KANNA_REPO_DIR`. |
|
|
375
375
|
|
|
376
|
-
|
|
376
|
+
**Host-agnostic supervisor mode.** When `KANNA_RELOADER` is unset (default), the in-app Update button works under any process host (pm2, systemd, docker, screen, plain shell) — the internal supervisor catches the child's exit-76 and respawns. The package manager used to install the new version is auto-detected from the running binary path:
|
|
377
|
+
|
|
378
|
+
- `~/.bun/bin/kanna` → `bun install -g`
|
|
379
|
+
- `~/.local/share/pnpm/kanna` (or any `pnpm/` path) → `pnpm add -g`
|
|
380
|
+
- `~/.yarn/bin/kanna` (or any `.yarn/` path) → `yarn global add`
|
|
381
|
+
- anything else (e.g. `/usr/local/bin/kanna`, `~/.npm-global/bin/kanna`) → `npm install -g`
|
|
382
|
+
|
|
383
|
+
If the detected manager is not on `PATH`, kanna falls back through `bun → npm → pnpm → yarn`. To override the install command entirely — useful for custom installers, monorepo wrappers, docker pulls, ansible, etc. — set `KANNA_UPDATE_COMMAND`. Placeholders `{package}` and `{version}` are substituted; the result is executed via `sh -c`.
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
# Force npm regardless of detection
|
|
387
|
+
KANNA_UPDATE_COMMAND="npm install -g {package}@{version}" pm2 start kanna
|
|
388
|
+
# Custom: chain pre-install hook
|
|
389
|
+
KANNA_UPDATE_COMMAND="my-deploy-hook && npm install -g {package}@{version}" kanna
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
To add another reload mechanism (e.g., docker, systemd) at the strategy layer, implement `UpdateChecker` + `UpdateReloader` and branch inside `createUpdateStrategy`; no changes to `UpdateManager`, `server.ts`, or any client code are needed.
|
|
377
393
|
|
|
378
394
|
## Star History
|
|
379
395
|
|