sublera-cli 0.0.0-stage → 1.3.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/CHANGELOG.md +172 -0
- package/LICENSE +21 -0
- package/README.md +585 -2
- package/SECURITY.md +78 -0
- package/THIRD_PARTY_NOTICES.md +37 -0
- package/dist/agent.d.ts +270 -0
- package/dist/agent.js +1867 -0
- package/dist/commands.d.ts +76 -0
- package/dist/commands.js +841 -0
- package/dist/config.d.ts +27 -0
- package/dist/config.js +95 -0
- package/dist/engine/binaryManager.d.ts +67 -0
- package/dist/engine/binaryManager.js +590 -0
- package/dist/engine/gguf.d.ts +88 -0
- package/dist/engine/gguf.js +458 -0
- package/dist/engine/llamaRunner.d.ts +78 -0
- package/dist/engine/llamaRunner.js +282 -0
- package/dist/engine/modelManager.d.ts +63 -0
- package/dist/engine/modelManager.js +510 -0
- package/dist/engine/selfCheck.d.ts +34 -0
- package/dist/engine/selfCheck.js +108 -0
- package/dist/exitCodes.d.ts +20 -0
- package/dist/exitCodes.js +20 -0
- package/dist/hardware/gpuMonitor.d.ts +32 -0
- package/dist/hardware/gpuMonitor.js +378 -0
- package/dist/hardware/sleepGuard.d.ts +42 -0
- package/dist/hardware/sleepGuard.js +149 -0
- package/dist/hardware/types.d.ts +40 -0
- package/dist/hardware/types.js +2 -0
- package/dist/health.d.ts +17 -0
- package/dist/health.js +38 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +268 -0
- package/dist/logger.d.ts +53 -0
- package/dist/logger.js +201 -0
- package/dist/network/proxy.d.ts +58 -0
- package/dist/network/proxy.js +328 -0
- package/dist/network/streamProxy.d.ts +51 -0
- package/dist/network/streamProxy.js +286 -0
- package/dist/network/tunnelClient.d.ts +54 -0
- package/dist/network/tunnelClient.js +257 -0
- package/dist/settings.d.ts +53 -0
- package/dist/settings.js +171 -0
- package/dist/state.d.ts +52 -0
- package/dist/state.js +71 -0
- package/dist/storageCommand.d.ts +22 -0
- package/dist/storageCommand.js +81 -0
- package/dist/types.d.ts +222 -0
- package/dist/types.js +43 -0
- package/dist/ui/progress.d.ts +29 -0
- package/dist/ui/progress.js +82 -0
- package/dist/ui/terminalDashboard.d.ts +88 -0
- package/dist/ui/terminalDashboard.js +295 -0
- package/dist/util/env.d.ts +3 -0
- package/dist/util/env.js +6 -0
- package/dist/util/exec.d.ts +23 -0
- package/dist/util/exec.js +116 -0
- package/dist/util/format.d.ts +47 -0
- package/dist/util/format.js +125 -0
- package/dist/util/fs.d.ts +18 -0
- package/dist/util/fs.js +140 -0
- package/dist/util/http.d.ts +28 -0
- package/dist/util/http.js +128 -0
- package/dist/util/instanceLock.d.ts +3 -0
- package/dist/util/instanceLock.js +108 -0
- package/dist/util/open.d.ts +16 -0
- package/dist/util/open.js +65 -0
- package/dist/util/storage.d.ts +10 -0
- package/dist/util/storage.js +69 -0
- package/dist/version.d.ts +15 -0
- package/dist/version.js +29 -0
- package/package.json +68 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `sublera-cli` (formerly `sublet-cli`) are listed here. The project follows
|
|
4
|
+
[Semantic Versioning](https://semver.org/). The stable surface is: command
|
|
5
|
+
names, flags, `SUBLET_*` variables, `agent.json` keys, exit codes, the
|
|
6
|
+
`--json` output of `doctor` and `config` (versioned by `schemaVersion`), and
|
|
7
|
+
the files under `~/.sublet`. A change to any of these needs a major version.
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
## [1.3.0] - 2026-11-14
|
|
12
|
+
|
|
13
|
+
First release as `sublera-cli` (formerly `sublet-cli`).
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- The default server is now `https://sublera.com` (was `https://sublet.duckdns.org`).
|
|
17
|
+
`--server`, `SUBLERA_SERVER` and saved configs still choose another one.
|
|
18
|
+
|
|
19
|
+
### Security
|
|
20
|
+
- The device-login link from the server is opened only when it is on the
|
|
21
|
+
server's own origin. On Windows it is opened through `rundll32.exe` by full
|
|
22
|
+
path instead of `cmd /c start`, so a link can no longer run commands.
|
|
23
|
+
- Plain-http servers are refused unless they are on this machine, because the
|
|
24
|
+
host key travels in every request. `SUBLERA_ALLOW_HTTP=1` allows a test server
|
|
25
|
+
on a trusted network.
|
|
26
|
+
- Server text in the login prompt is printed without control characters.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- `start <code>` and `jobs` no longer exit when a different booking appears. They
|
|
30
|
+
exit when their own booking has ended and no other booking uses the GPU.
|
|
31
|
+
- A booking that ended is no longer added back (and its earnings counted twice)
|
|
32
|
+
by a status answer from before the end. The server's clock decides whether a
|
|
33
|
+
listed booking is over.
|
|
34
|
+
- A load for another request is refused with "Host is busy" while a loaded request
|
|
35
|
+
is still in its model check or a benchmark runs, instead of restarting
|
|
36
|
+
llama-server or replacing that request.
|
|
37
|
+
- `start <code>` and `jobs` also keep running while another request on this host
|
|
38
|
+
is claimed, loading or in its model check.
|
|
39
|
+
- A booking the agent learns about from the status poll now keeps the machine awake.
|
|
40
|
+
- A booking frame no longer clears the busy flag of a model load in progress.
|
|
41
|
+
- llama-server is restarted when the slot count changes, but only when no job or
|
|
42
|
+
other booking uses it; otherwise the agent keeps it and logs a warning.
|
|
43
|
+
- A load for the file that is already running with the same settings reuses
|
|
44
|
+
llama-server and skips the VRAM check, which counted the loaded model twice.
|
|
45
|
+
A load that would replace the model under other bookings or public buyers is refused.
|
|
46
|
+
- The saved booking keeps the slot count of its load instead of 1.
|
|
47
|
+
- Per-token earnings are no longer overwritten on the dashboard when a booking starts.
|
|
48
|
+
- `--help` named `~/.sublera` for logs and `agent.json`; the files are in `~/.sublet`.
|
|
49
|
+
- Update the CI packed-package smoke test to install `sublera-cli` and exercise
|
|
50
|
+
both the new `sublera` executable and the legacy `sublet` alias.
|
|
51
|
+
- Refuse linked model roots before pruning; concurrent instance-lock release
|
|
52
|
+
shares one operation and cannot unlink a later owner's lock.
|
|
53
|
+
- Correct download budgets when an obsolete partial must be restarted.
|
|
54
|
+
- Serialize engine installation per home, protect `doctor --fix` with instance
|
|
55
|
+
ownership, use unique staging directories and atomic manifest writes, and
|
|
56
|
+
attempt rollback when replacement installation fails.
|
|
57
|
+
- Keep instance ownership until pending message handlers settle; clean up jobs
|
|
58
|
+
after wake-lock acquisition failures and suppress work/output after stop or
|
|
59
|
+
cancellation. Reject contradictory or malformed readiness snapshots.
|
|
60
|
+
- Attempt all shutdown cleanup steps even if one fails, retaining ownership
|
|
61
|
+
through pending handlers and final state/health writes before reporting errors.
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
- Sublera branding, local package name `sublera-cli`, and `sublera` executable
|
|
65
|
+
aliases. Legacy executables and `SUBLET_*` environment names remain supported;
|
|
66
|
+
`SUBLERA_*` names take precedence. The default `.sublet` data directory and
|
|
67
|
+
repository identity are unchanged.
|
|
68
|
+
- Several bookings at once on one loaded model: speed seats (a reserved tok/s)
|
|
69
|
+
side by side, a full-GPU rental, and per-token buyers in public mode. Each
|
|
70
|
+
booking has its own end timer, and a `reject` ends only its own request.
|
|
71
|
+
Bookings on the loaded model are accepted without a `load` frame.
|
|
72
|
+
- `--price-hour <usd>` (`SUBLERA_PRICE_HOUR`, legacy `SUBLET_PRICE_HOUR`,
|
|
73
|
+
`agent.json` key `priceHour`, 0 to 50): the price per hour for the full GPU in
|
|
74
|
+
`sublera host`. It is sent as `priceHourUsd` in `hello` (default 0.50; `start`
|
|
75
|
+
and `jobs` send 0). The server sets seat prices from it.
|
|
76
|
+
- The dashboard shows every rental and its reserved speed, the one that ends
|
|
77
|
+
first, and the hourly price in public mode. Earnings are per-token earnings
|
|
78
|
+
plus the time share of every booking. `sublera status` lists every booking.
|
|
79
|
+
- `state.json` saves every booking in a `bookings` list, and a restart restores
|
|
80
|
+
all of them with their slot count. Files with the old single `booking` field
|
|
81
|
+
are still read.
|
|
82
|
+
- The agent reads `activeRequests` from `/api/agent/me` and falls back to
|
|
83
|
+
`activeRequest` on older servers. Bookings the server no longer lists are dropped.
|
|
84
|
+
- Exclusive `SUBLET_HOME` ownership for serving agents and storage maintenance.
|
|
85
|
+
A lock left by a process that is no longer running is taken over, so an agent
|
|
86
|
+
restarted after a crash restores its booking; a live or unreadable owner's lock
|
|
87
|
+
is refused with recovery instructions.
|
|
88
|
+
- Local `health [live|ready]` snapshots, bounded SIGTERM inference drain, and
|
|
89
|
+
`storage status|prune` with dry-run-by-default pruning of old partial files.
|
|
90
|
+
- Operational regression tests for cross-process ownership, cancellation,
|
|
91
|
+
reconnect readiness and safe maintenance. Async server message errors are
|
|
92
|
+
caught; busy hosts refuse conflicting model loads/new inference.
|
|
93
|
+
- Storage guards: model-cache downloads default to a 20 GiB budget and preserve
|
|
94
|
+
5 GiB disk headroom, configurable through `SUBLET_MODEL_CACHE_GB` and
|
|
95
|
+
`SUBLET_MIN_FREE_DISK_GB`. Partial files count; existing data is not evicted.
|
|
96
|
+
- Engine archive/cache limits, bounded tar extraction/link materialization,
|
|
97
|
+
and staging-space preflight checks. Model downloads serialize within one
|
|
98
|
+
process to avoid spending the same budget concurrently.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Added
|
|
102
|
+
- **Corporate proxy support.** `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY`
|
|
103
|
+
(upper or lower case) now apply to every outbound connection: API calls,
|
|
104
|
+
model and engine downloads, and the WebSocket tunnel (HTTP CONNECT, with
|
|
105
|
+
`user:password@` proxy login). `127.0.0.1`/`localhost` (llama-server) is
|
|
106
|
+
never proxied. `NODE_EXTRA_CA_CERTS` adds a corporate root CA. Proxy
|
|
107
|
+
passwords are never printed.
|
|
108
|
+
- **Configuration without flags.** Supported settings can come from a `SUBLET_*`
|
|
109
|
+
environment variable or `~/.sublet/agent.json` (override the path with
|
|
110
|
+
`SUBLET_CONFIG`). Precedence: flag > environment > file > default. Unknown
|
|
111
|
+
keys and bad values are errors, not silently ignored.
|
|
112
|
+
- **`sublet config`** shows the settings in use and where each one came from;
|
|
113
|
+
`sublet config path` prints the settings file path. `--json` supported.
|
|
114
|
+
- **Agent log file.** `start`, `host`, and `jobs` write JSON lines to
|
|
115
|
+
`~/.sublet/logs/agent.log`, rotated at 10 MB with 5 old files kept.
|
|
116
|
+
`--log-file <path|off>`, `--log-level <level>`.
|
|
117
|
+
- **Documented exit codes:** 0 ok, 1 runtime error, 2 usage or settings error,
|
|
118
|
+
130 Ctrl+C, 143 SIGTERM.
|
|
119
|
+
- `doctor` reports the network path (direct or proxy) and the extra CA file;
|
|
120
|
+
`doctor --json` now includes `schemaVersion` and `agentVersion`.
|
|
121
|
+
- Release gate (`npm run check`, `scripts/check-package.mjs`), a tag-driven
|
|
122
|
+
release workflow with npm provenance, and Dependabot.
|
|
123
|
+
- **Engine self-check.** After every model load the agent asks the engine one
|
|
124
|
+
fixed question twice at temperature 0 and compares the token probabilities;
|
|
125
|
+
after a crash restart it compares against the load-time answer. A difference
|
|
126
|
+
is logged as a diagnostic warning, not a hardware diagnosis or attestation.
|
|
127
|
+
Incomplete or invalid evidence is inconclusive. It never stops a booking,
|
|
128
|
+
and a buyer's job cancels it.
|
|
129
|
+
|
|
130
|
+
### Changed
|
|
131
|
+
- A model already on disk is hashed again before it is served (once per agent
|
|
132
|
+
run). Before, a booking trusted the sidecar file and reported "hash-checked"
|
|
133
|
+
without hashing. A measured expected-hash mismatch triggers a replacement
|
|
134
|
+
download without first deleting the old model; IO errors preserve the file.
|
|
135
|
+
- Model `verified` means a valid reference hash matched, not just that hashing
|
|
136
|
+
completed. Local checks do not authenticate a hostile host.
|
|
137
|
+
- Streaming requires an explicit `[DONE]` marker, rejects malformed JSON and
|
|
138
|
+
token counts, bounds buffers/output, and releases the response reader.
|
|
139
|
+
- Added unattended `--non-interactive` operation, server-scoped saved keys,
|
|
140
|
+
nested secret redaction, and serialized atomic state/config writes.
|
|
141
|
+
- llama.cpp's environment settings (`LLAMA_ARG_*`, `LLAMA_LOG_*`,
|
|
142
|
+
`LLAMA_API_KEY`) no longer reach `llama-server`.
|
|
143
|
+
- `start` and `doctor` say so when the engine is the host's own build
|
|
144
|
+
(`LLAMA_SERVER` or `PATH`) instead of the one Sublet installs.
|
|
145
|
+
- Host keys, API keys, bearer tokens, and `token=` parameters are redacted from
|
|
146
|
+
every log line, on screen and on disk.
|
|
147
|
+
- `status` shows HELD only when the server marks the host as held (with the
|
|
148
|
+
server's reason), never from the reliability number alone.
|
|
149
|
+
- The tunnel refuses server frames over 16 MB.
|
|
150
|
+
- Minimum Node.js is now 20.18.1 (needed by `undici`, used for proxies).
|
|
151
|
+
- The npm package no longer ships source maps.
|
|
152
|
+
|
|
153
|
+
## [1.2.2] - 2026-11-09
|
|
154
|
+
|
|
155
|
+
### Added
|
|
156
|
+
- Shared bookings: llama-server starts with the slot count the server sends.
|
|
157
|
+
|
|
158
|
+
### Fixed
|
|
159
|
+
- A benchmark load is shown as a benchmark, not as a buyer request.
|
|
160
|
+
- `--gpu`/`--vram` apply to `jobs` and `doctor`; an unknown VRAM size is shown as unknown.
|
|
161
|
+
|
|
162
|
+
## [1.2.1] - 2026-11-09
|
|
163
|
+
|
|
164
|
+
### Changed
|
|
165
|
+
- HELD is shown only when the server holds the host.
|
|
166
|
+
|
|
167
|
+
## [1.2.0] - 2026-11-09
|
|
168
|
+
|
|
169
|
+
- First public beta on npm.
|
|
170
|
+
|
|
171
|
+
[Unreleased]: https://github.com/somemusic69-sudo/Sublet-cli/compare/v1.3.0...HEAD
|
|
172
|
+
[1.3.0]: https://github.com/somemusic69-sudo/Sublet-cli/releases/tag/v1.3.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sublet
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|