umans-gate 0.1.4 → 0.1.5
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/CHANGELOG.md +45 -0
- package/LICENSE +1 -1
- package/README.md +101 -11
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.5] - 2026-07-14
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Service persistence** (`umans-gate service`): install, uninstall,
|
|
15
|
+
start, stop, restart, status, and logs subcommands for running
|
|
16
|
+
umans-gate as a managed service that starts on boot and survives
|
|
17
|
+
restarts. Platform support:
|
|
18
|
+
- **Linux**: systemd user unit with `enable-linger` for boot-start
|
|
19
|
+
without login. `Restart=always` for crash recovery. `EnvironmentFile`
|
|
20
|
+
with `chmod 600` for API key (never inline).
|
|
21
|
+
- **macOS**: launchd LaunchAgent with `RunAtLoad=true` and
|
|
22
|
+
`KeepAlive=true` for unconditional restart (including dashboard
|
|
23
|
+
Restart button).
|
|
24
|
+
- **Windows**: Windows Service via NSSM (bundled in win32 platform
|
|
25
|
+
packages) with `SERVICE_AUTO_START` and 10 MB log rotation.
|
|
26
|
+
- Service PATH includes common runtime directories (`~/.bun/bin`,
|
|
27
|
+
`/opt/homebrew/bin`, `/usr/local/bin`, etc.) so the shebang resolves
|
|
28
|
+
in minimal-PATH service environments.
|
|
29
|
+
- Pre-install validation: config validation + port availability check
|
|
30
|
+
before writing service files.
|
|
31
|
+
- `npx` detection: `service install` from npx throws a clear error
|
|
32
|
+
with install instructions.
|
|
33
|
+
- `umans-gate update` now stops the service before updating and
|
|
34
|
+
restarts it after.
|
|
35
|
+
- `umans-gate uninstall` removes the service before cleaning up the
|
|
36
|
+
binary.
|
|
37
|
+
- Standalone binary self-update: `umans-gate update` auto-downloads
|
|
38
|
+
and replaces the binary from the latest GitHub Release (previously
|
|
39
|
+
only printed the URL).
|
|
40
|
+
- Dashboard Restart button works automatically when running as a
|
|
41
|
+
managed service.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- **launchd KeepAlive**: changed from conditional dict
|
|
46
|
+
(`SuccessfulExit=false, Crashed=true`) to unconditional `true` so
|
|
47
|
+
the dashboard Restart button works on macOS (previously only worked
|
|
48
|
+
on Linux via `Restart=always`).
|
|
49
|
+
- **NSSM bundling**: `scripts/pack-npm.sh` now downloads and includes
|
|
50
|
+
`nssm.exe` in `@codegiveness/umans-gate-win32-*` packages so
|
|
51
|
+
`service install` works on Windows out of the box.
|
|
52
|
+
- **ESM compliance**: replaced `require("node:fs")` / `require("node:net")`
|
|
53
|
+
calls in `installer.ts` and `updater.ts` with static imports.
|
|
54
|
+
|
|
10
55
|
## [0.1.4] - 2026-07-14
|
|
11
56
|
|
|
12
57
|
### Changed
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
> A capture proxy for LLM APIs. Point your harness at it, and every
|
|
10
10
|
> request/response is stored in SQLite with a live inspection dashboard.
|
|
11
|
-
>
|
|
12
|
-
>
|
|
11
|
+
>
|
|
12
|
+
> **Personal-use project.** This software is intended for personal use
|
|
13
|
+
> only. It is a community contribution and is not affiliated with,
|
|
14
|
+
> endorsed by, or an official product of Umans.
|
|
13
15
|
|
|
14
|
-
**Setup in 30 seconds
|
|
16
|
+
**Setup in 30 seconds.**
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
19
|
npx umans-gate
|
|
@@ -27,6 +29,7 @@ request and response is captured automatically.
|
|
|
27
29
|
- [Install](#install)
|
|
28
30
|
- [Quick Start](#quick-start)
|
|
29
31
|
- [Updating](#updating)
|
|
32
|
+
- [Service Persistence](#service-persistence)
|
|
30
33
|
- [Configuration](#configuration)
|
|
31
34
|
- [Config Fields](#config-fields)
|
|
32
35
|
- [Hot Reload and Restart](#hot-reload-and-restart)
|
|
@@ -154,7 +157,9 @@ umans-gate update # self-update (npm global or standalone binary)
|
|
|
154
157
|
The updater detects your install method (npm global, standalone
|
|
155
158
|
executable, or dev) and performs the appropriate action. For npm global
|
|
156
159
|
installs, it runs `npm update -g umans-gate`. For standalone binaries,
|
|
157
|
-
it
|
|
160
|
+
it auto-downloads and replaces the binary from the latest GitHub Release.
|
|
161
|
+
If the proxy is running as a managed service, the updater stops the
|
|
162
|
+
service before updating and restarts it after.
|
|
158
163
|
|
|
159
164
|
To check for updates without installing:
|
|
160
165
|
|
|
@@ -165,9 +170,13 @@ umans-gate update --check
|
|
|
165
170
|
### Uninstall
|
|
166
171
|
|
|
167
172
|
```bash
|
|
168
|
-
umans-gate uninstall # removes config, database, and binary
|
|
173
|
+
umans-gate uninstall # removes service, config, database, and binary
|
|
169
174
|
```
|
|
170
175
|
|
|
176
|
+
The uninstaller first removes any installed service (systemd, launchd,
|
|
177
|
+
or Windows service) before cleaning up the binary and config. Pass
|
|
178
|
+
`--keep-config` to preserve `config.json` and the database.
|
|
179
|
+
|
|
171
180
|
Or manually:
|
|
172
181
|
|
|
173
182
|
```bash
|
|
@@ -175,6 +184,71 @@ npm uninstall -g umans-gate
|
|
|
175
184
|
rm -rf ~/.config/umans-gate
|
|
176
185
|
```
|
|
177
186
|
|
|
187
|
+
## Service Persistence
|
|
188
|
+
|
|
189
|
+
`umans-gate` can install itself as a managed service that starts on boot
|
|
190
|
+
and survives restarts — no external process manager required.
|
|
191
|
+
|
|
192
|
+
### Install as a service
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
umans-gate service install
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
This creates a platform-appropriate service definition, enables it for
|
|
199
|
+
auto-start on boot, and starts it immediately:
|
|
200
|
+
|
|
201
|
+
| Platform | Service manager | Unit location |
|
|
202
|
+
|----------|----------------|---------------|
|
|
203
|
+
| Linux | systemd (user unit + linger) | `~/.config/systemd/user/umans-gate.service` |
|
|
204
|
+
| macOS | launchd (LaunchAgent) | `~/Library/LaunchAgents/com.umans.gate.plist` |
|
|
205
|
+
| Windows | Windows Service (via NSSM) | Registered with `sc.exe` |
|
|
206
|
+
|
|
207
|
+
The service runs with `WorkingDirectory` set to your home directory and
|
|
208
|
+
uses the same `config.json` as a foreground run. If an API key is set
|
|
209
|
+
via environment variable (not in config.json), it is stored securely:
|
|
210
|
+
systemd uses a separate `EnvironmentFile` with `chmod 600`; launchd
|
|
211
|
+
stores it in the plist (also `chmod 600`); NSSM stores it in the
|
|
212
|
+
Windows service registry. The key is never inlined in the systemd unit
|
|
213
|
+
file.
|
|
214
|
+
|
|
215
|
+
Use `--force` to overwrite an existing service definition:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
umans-gate service install --force
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Service lifecycle commands
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
umans-gate service start # start the service
|
|
225
|
+
umans-gate service stop # stop the service
|
|
226
|
+
umans-gate service restart # restart the service
|
|
227
|
+
umans-gate service status # show service status (running, PID, uptime)
|
|
228
|
+
umans-gate service logs # tail service logs (follow mode)
|
|
229
|
+
umans-gate service logs -f # same as above (alias)
|
|
230
|
+
umans-gate service uninstall # stop, disable, and remove the service
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### How it works
|
|
234
|
+
|
|
235
|
+
- **Linux**: A systemd user unit with `Restart=always` and
|
|
236
|
+
`loginctl enable-linger` so the service starts at boot without needing
|
|
237
|
+
to log in. The PATH includes common runtime directories (`/usr/local/bin`,
|
|
238
|
+
`~/.bun/bin`, `/opt/homebrew/bin`, etc.) so the shebang resolves.
|
|
239
|
+
- **macOS**: A launchd LaunchAgent with `RunAtLoad=true` and
|
|
240
|
+
`KeepAlive=true` for unconditional restart. Loaded via `launchctl load`.
|
|
241
|
+
- **Windows**: A Windows Service registered via NSSM (bundled in the
|
|
242
|
+
win32 platform package) with `SERVICE_AUTO_START` for boot-start and
|
|
243
|
+
automatic log rotation at 10 MB.
|
|
244
|
+
|
|
245
|
+
### Dashboard restart button
|
|
246
|
+
|
|
247
|
+
When running as a managed service, the dashboard's **Restart** button
|
|
248
|
+
(`POST /dashboard/api/restart`) works automatically — the service
|
|
249
|
+
manager restarts the process after `process.exit(0)` thanks to
|
|
250
|
+
`Restart=always` / `KeepAlive`.
|
|
251
|
+
|
|
178
252
|
## Configuration
|
|
179
253
|
|
|
180
254
|
> **Dashboard-first:** The recommended way to change configuration is via
|
|
@@ -261,8 +335,10 @@ apply live; fields marked `restartRequired` (e.g. `port`, `db_path`,
|
|
|
261
335
|
`upstream_protocol`, `vision_*`) require a server restart.
|
|
262
336
|
|
|
263
337
|
The dashboard also has a **Restart** button (`POST /dashboard/api/restart`)
|
|
264
|
-
that calls `process.exit(0)`.
|
|
265
|
-
|
|
338
|
+
that calls `process.exit(0)`. When running as a managed service
|
|
339
|
+
(`umans-gate service install`), the service manager restarts the
|
|
340
|
+
process automatically. Without a service manager, you need an external
|
|
341
|
+
process watcher:
|
|
266
342
|
|
|
267
343
|
| Manager | Command |
|
|
268
344
|
|---------|---------|
|
|
@@ -444,6 +520,7 @@ umans-gate/
|
|
|
444
520
|
|
|
445
521
|
## Documentation
|
|
446
522
|
|
|
523
|
+
- [Documentation Index](docs/README.md) — curated reading guide
|
|
447
524
|
- [Architecture](docs/ARCHITECTURE.md) — system design and data flow
|
|
448
525
|
- [Proxy Modifications](docs/proxy-modifications.md) — complete inventory of proxy modifications
|
|
449
526
|
- [Troubleshooting](docs/TROUBLESHOOTING.md) — common issues and solutions
|
|
@@ -460,9 +537,7 @@ umans-gate/
|
|
|
460
537
|
- **[umans-open-stack](https://github.com/umans-ai/umans-open-stack)** — A
|
|
461
538
|
curated set of open source playbooks and tools tested with Umans. umans-gate
|
|
462
539
|
implements several patterns documented there: concurrency gating, vision
|
|
463
|
-
handoff, cache_control TTL stamping, and workflow orchestration.
|
|
464
|
-
using umans-gate, the open-stack playbooks explain the why behind each
|
|
465
|
-
feature.
|
|
540
|
+
handoff, cache_control TTL stamping, and workflow orchestration.
|
|
466
541
|
|
|
467
542
|
## Contributing
|
|
468
543
|
|
|
@@ -471,4 +546,19 @@ testing, and release instructions.
|
|
|
471
546
|
|
|
472
547
|
## License
|
|
473
548
|
|
|
474
|
-
MIT
|
|
549
|
+
MIT — see [LICENSE](LICENSE).
|
|
550
|
+
|
|
551
|
+
## Usage Rights
|
|
552
|
+
|
|
553
|
+
This is a **personal-use project**. The source code is published under the MIT
|
|
554
|
+
license for transparency and educational purposes. While the MIT license
|
|
555
|
+
technically permits commercial use and redistribution, this project is not
|
|
556
|
+
actively maintained as a product and is not intended for production deployment.
|
|
557
|
+
|
|
558
|
+
**This is a community contribution and is not an official Umans product.**
|
|
559
|
+
It is not affiliated with, endorsed by, or supported by Umans AI. All upstream
|
|
560
|
+
service names, model names, and API endpoints referenced in this codebase
|
|
561
|
+
belong to their respective owners.
|
|
562
|
+
|
|
563
|
+
Use it, learn from it, fork it — but don't expect official support or
|
|
564
|
+
warranties of any kind.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "umans-gate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "LLM capture proxy with Anthropic cache_control TTL stamping, vision handoff, concurrency gating, rate limiting, and a live inspection dashboard",
|
|
5
5
|
"repository": { "type": "git", "url": "git+https://github.com/codegiveness/umans-gate.git" },
|
|
6
6
|
"homepage": "https://github.com/codegiveness/umans-gate#readme",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"engines": { "node": ">=18.0.0" },
|
|
12
12
|
"keywords": ["llm", "proxy", "capture", "anthropic", "openai", "cache-control", "ttl", "inspector", "debugger", "websocket", "claude", "prompt-engineering", "observability", "sqlite", "bun", "developer-tools", "api-proxy", "prompt-caching"],
|
|
13
13
|
"optionalDependencies": {
|
|
14
|
-
"@codegiveness/umans-gate-darwin-arm64": "0.1.
|
|
15
|
-
"@codegiveness/umans-gate-darwin-x64": "0.1.
|
|
16
|
-
"@codegiveness/umans-gate-linux-x64": "0.1.
|
|
17
|
-
"@codegiveness/umans-gate-linux-arm64": "0.1.
|
|
18
|
-
"@codegiveness/umans-gate-win32-x64": "0.1.
|
|
19
|
-
"@codegiveness/umans-gate-win32-arm64": "0.1.
|
|
14
|
+
"@codegiveness/umans-gate-darwin-arm64": "0.1.5",
|
|
15
|
+
"@codegiveness/umans-gate-darwin-x64": "0.1.5",
|
|
16
|
+
"@codegiveness/umans-gate-linux-x64": "0.1.5",
|
|
17
|
+
"@codegiveness/umans-gate-linux-arm64": "0.1.5",
|
|
18
|
+
"@codegiveness/umans-gate-win32-x64": "0.1.5",
|
|
19
|
+
"@codegiveness/umans-gate-win32-arm64": "0.1.5"
|
|
20
20
|
}
|
|
21
21
|
}
|