@fugood/buttress-server 2.26.0-beta.12 → 2.26.0-beta.14
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 +43 -11
- package/config/sample.toml +6 -0
- package/lib/agent/device-auth.d.ts +3 -0
- package/lib/agent/device-tools.d.ts +2 -1
- package/lib/index.mjs +59 -59
- package/lib/utils/workspaceState.d.ts +8 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -69,14 +69,14 @@ The `bricks` CLI is the tool that performs the binding and writes the local stat
|
|
|
69
69
|
### Bind a server to a workspace
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
# Pair the local
|
|
72
|
+
# Pair the local server and provision a workspace DevTools token using the current CLI profile
|
|
73
73
|
bricks buttress bind
|
|
74
74
|
|
|
75
75
|
# Override the auto-detected server id, give it a friendly name, or write to a custom state dir
|
|
76
76
|
bricks buttress bind --server-id buttress-mac-studio --name "Studio LLM" --state-dir /etc/buttress
|
|
77
77
|
|
|
78
78
|
# For headless/remote setups: emit state.json to stdout instead of writing to disk
|
|
79
|
-
bricks buttress bind --print > /etc/buttress/state.json
|
|
79
|
+
(umask 077; bricks buttress bind --print > /etc/buttress/state.json)
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
The state file (`~/.bricks-cli/buttress/state.json` by default, or `$BRICKS_BUTTRESS_STATE_DIR`) stores:
|
|
@@ -84,6 +84,15 @@ The state file (`~/.bricks-cli/buttress/state.json` by default, or `$BRICKS_BUTT
|
|
|
84
84
|
- `workspace.id` / `workspace.name` — which workspace this server belongs to
|
|
85
85
|
- `workspace.serverId` — the server's stable id (defaults to `buttress-<machineId>`)
|
|
86
86
|
- `workspace.issuerPublicKey` + `workspace.kid` — Ed25519 SPKI used to verify access tokens
|
|
87
|
+
- `devtools` — workspace-scoped DevTools JWT (`k: "da"`), workspace id and expiry,
|
|
88
|
+
provisioned automatically by `bind` for agent device tools
|
|
89
|
+
|
|
90
|
+
Normal bind/status output reports only token expiry, never the token. The CLI writes
|
|
91
|
+
state with mode `0600`; `--print` includes credentials and must be treated as a secret.
|
|
92
|
+
Rebinding provisions a fresh token (default lifetime: 30 days) and rotates the announce
|
|
93
|
+
key. Issuance failure stops binding before changing the remote announce key. Rebinding
|
|
94
|
+
or unbinding does not revoke previously issued DevTools JWTs; they remain valid until
|
|
95
|
+
expiry or issuer-key rotation.
|
|
87
96
|
|
|
88
97
|
**Restart `bricks-buttress` after binding** for the change to take effect — the state file is read once at startup.
|
|
89
98
|
|
|
@@ -207,6 +216,8 @@ Most ggml-llm `[generators.model]` keys can also live in `[runtime]` as defaults
|
|
|
207
216
|
| `no_extra_bufts` | boolean | Disable extra compute buffer types |
|
|
208
217
|
| `cpu_mask`, `cpu_strict` | string / boolean | CPU affinity (advanced) |
|
|
209
218
|
| `devices` | string[] | Restrict to specific GGML devices |
|
|
219
|
+
| `split_mode` | `"none"` / `"layer"` / `"row"` / `"tensor"` | ggml-llm GPU splitting: single GPU, layers + KV (default), weight rows, or weights + KV (experimental tensor parallelism) |
|
|
220
|
+
| `tensor_split` | number[]\|string | ggml-llm per-GPU proportions, e.g. `[3, 1]` or `"3,1"`; unset uses the native automatic split |
|
|
210
221
|
| Speculative keys | various | `speculative`, `spec_type`, `spec_draft_n_max/n_min/p_min/p_split`, plus draft-model GPU/cache settings |
|
|
211
222
|
|
|
212
223
|
### `[autodiscover]`
|
|
@@ -268,6 +279,10 @@ Additional keys honored by **ggml-llm**, **ggml-stt** and **ggml-tts** (mlx-llm
|
|
|
268
279
|
|
|
269
280
|
Loads a GGUF LLM. Runtime keys above can be overridden per-generator under `[generators.model]`; `[generators.backend]` only controls backend selection and resource planning.
|
|
270
281
|
|
|
282
|
+
GPU splitting (`split_mode`, `tensor_split`) is currently configurable only in Buttress.
|
|
283
|
+
TODO: Expose these options in the LLM (GGML) generator. The experimental `tensor` mode
|
|
284
|
+
requires a compatible GPU backend and model architecture.
|
|
285
|
+
|
|
271
286
|
**`[generators.backend]`**
|
|
272
287
|
|
|
273
288
|
| Key | Type | Default | Notes |
|
|
@@ -283,6 +298,7 @@ Loads a GGUF LLM. Runtime keys above can be overridden per-generator under `[gen
|
|
|
283
298
|
| ----------------------------------------------------------------------------- | ---------------- | -------------------------------------------------------------------- |
|
|
284
299
|
| `n_ctx` | number | Context window. Auto-capped at the model's training context. |
|
|
285
300
|
| `n_gpu_layers` | number\|`"auto"` | Layers offloaded to GPU (default `"auto"`) |
|
|
301
|
+
| `split_mode`, `tensor_split` | string / number[]\|string | Per-model overrides for the GPU split defaults in `[runtime]` |
|
|
286
302
|
| `n_batch` | number | Prompt batch size (default `512`) |
|
|
287
303
|
| `embedding` | boolean | Enable llama.cpp embedding mode for a dedicated embedding model (default `false`) |
|
|
288
304
|
| `pooling_type` | string | Optional embedding pooling override such as `mean` |
|
|
@@ -355,12 +371,21 @@ spec_draft_cache_type_v = "f16"
|
|
|
355
371
|
|
|
356
372
|
Loads a Whisper GGML model for speech-to-text.
|
|
357
373
|
|
|
374
|
+
With `@fugood/whisper.node` 1.2.0-rc.0, `snapdragon` enables experimental
|
|
375
|
+
Whisper Hexagon NPU acceleration on Linux arm64 with a working Qualcomm
|
|
376
|
+
HTP/FastRPC runtime. This variant does not include OpenCL. Install it with
|
|
377
|
+
`--ggml-variant=snapdragon` (the default CPU package remains available for fallback).
|
|
378
|
+
The platform package includes the HTP libraries; the loader defaults
|
|
379
|
+
`ADSP_LIBRARY_PATH` to that package directory and `GGML_HEXAGON_NDEV` to `16`,
|
|
380
|
+
without overriding explicit environment values. Hexagon always enables flash
|
|
381
|
+
attention, even when `use_flash_attn` is off.
|
|
382
|
+
|
|
358
383
|
**`[generators.backend]`**
|
|
359
384
|
|
|
360
385
|
| Key | Type | Default | Notes |
|
|
361
386
|
| --------------------- | -------- | ----------------------------- | ---------------------------------- |
|
|
362
|
-
| `variant` | string | auto | `cuda` / `vulkan` / `default`
|
|
363
|
-
| `variant_preference` | string[] | `["cuda","vulkan","default"]` | Probe order
|
|
387
|
+
| `variant` | string | auto | `cuda` / `vulkan` / `snapdragon` / `default` |
|
|
388
|
+
| `variant_preference` | string[] | `["cuda","vulkan","snapdragon","default"]` | Probe order |
|
|
364
389
|
| `gpu_memory_fraction` | number | `0.85` | |
|
|
365
390
|
| `cpu_memory_fraction` | number | `0.5` | |
|
|
366
391
|
|
|
@@ -385,7 +410,7 @@ Loads a Whisper GGML model for speech-to-text.
|
|
|
385
410
|
[[generators]]
|
|
386
411
|
type = "ggml-stt"
|
|
387
412
|
[generators.backend]
|
|
388
|
-
variant_preference = ["cuda", "vulkan", "default"]
|
|
413
|
+
variant_preference = ["cuda", "vulkan", "snapdragon", "default"]
|
|
389
414
|
[generators.model]
|
|
390
415
|
repo_id = "BricksDisplay/whisper-ggml"
|
|
391
416
|
filename = "ggml-large-v3-turbo-q8_0.bin"
|
|
@@ -914,16 +939,23 @@ fail closed unless marked `optional = true`.
|
|
|
914
939
|
|
|
915
940
|
For example, scan with `{}` then call `devtools` with
|
|
916
941
|
`{ "action": "tree", "address": "192.168.1.42", "port": 19851 }`.
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
942
|
+
After `bricks buttress bind` and a restart, the workspace credential is injected
|
|
943
|
+
server-side automatically when the device advertises the same workspace and issuer.
|
|
944
|
+
The token is validated for signature, kind and expiry before use; inbound Buttress
|
|
945
|
+
JWTs (`k: "ba"`) are never forwarded. Older bindings without the credential, or expired
|
|
946
|
+
credentials, require rebinding and a restart. The server does not read the CLI login
|
|
947
|
+
or renew tokens itself. Local previews can still use advertised inspect credentials;
|
|
948
|
+
explicit `passcode` / `accessToken` arguments remain optional overrides. Calls open/close their own connection;
|
|
920
949
|
avoid parallel calls or other inspectors on the same device (one CDP client at a time).
|
|
921
950
|
|
|
922
951
|
**Security:** enabling this option grants network discovery and device control,
|
|
923
952
|
including arbitrary JavaScript evaluation on reachable authenticated devices. It is
|
|
924
|
-
not read-only or a network sandbox.
|
|
925
|
-
|
|
926
|
-
|
|
953
|
+
not read-only or a network sandbox. Automatic authentication requires a **trusted LAN**:
|
|
954
|
+
workspace/issuer hints from device info are not cryptographic peer authentication.
|
|
955
|
+
The stored token is never inserted into model arguments and is redacted from text
|
|
956
|
+
results/errors before truncation. Explicit credentials supplied in arguments still
|
|
957
|
+
enter session transcripts, as do console output and device data; prefer automatic
|
|
958
|
+
authentication and only grant this to trusted agents/callers. Disable with `local_devices = false` and
|
|
927
959
|
restart Buttress. Aborting closes active CDP connections; discovery completes its
|
|
928
960
|
bounded scan before returning the abort result.
|
|
929
961
|
|
package/config/sample.toml
CHANGED
|
@@ -78,6 +78,12 @@ cache_type_k = "q8_0"
|
|
|
78
78
|
cache_type_v = "q8_0"
|
|
79
79
|
n_threads = 6
|
|
80
80
|
|
|
81
|
+
# Optional ggml-llm multi-GPU defaults (also supported under [generators.model]).
|
|
82
|
+
# split_mode = "layer" # none / layer (default) / row / tensor (experimental)
|
|
83
|
+
# tensor_split = [3, 1] # per-GPU proportions; also accepts "3,1"
|
|
84
|
+
# Tensor mode requires a compatible GPU backend and model architecture.
|
|
85
|
+
# TODO: Expose these Buttress-only options in the LLM (GGML) generator.
|
|
86
|
+
|
|
81
87
|
# Delay before releasing context when refCount reaches 0 (default: 10000ms)
|
|
82
88
|
# Set to 0 for immediate release
|
|
83
89
|
context_release_delay_ms = 30000
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { WorkspaceState } from '../utils/workspaceState';
|
|
2
|
+
/** Select only the bound workspace's credential; never reuse an inbound Buttress (k=ba) JWT. */
|
|
3
|
+
export declare const resolveDeviceAccessToken: (address: string, port: number, state?: WorkspaceState, signal?: AbortSignal) => Promise<string | undefined>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentFunctionTool } from './tools';
|
|
2
2
|
import type { AgentDefinition } from './types';
|
|
3
|
+
import type { WorkspaceState } from '../utils/workspaceState';
|
|
3
4
|
/** Two tools regardless of device count; no remote tool-list expansion or persistent sockets. */
|
|
4
|
-
export declare const buildLocalDeviceTools: (agent: Pick<AgentDefinition, 'localDevices'>, configDir: string) => AgentFunctionTool[];
|
|
5
|
+
export declare const buildLocalDeviceTools: (agent: Pick<AgentDefinition, 'localDevices'>, configDir: string, workspaceState?: WorkspaceState) => AgentFunctionTool[];
|