@octocodeai/freellama 0.6.2 → 0.9.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 +226 -89
- package/bin/freellama.js +6 -10
- package/package.json +11 -13
package/README.md
CHANGED
|
@@ -1,130 +1,267 @@
|
|
|
1
|
-
#
|
|
1
|
+
# FreeLlama
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
management layer that lets agents offload work to local models, configure resource controls, and
|
|
7
|
-
submit managed tasks. Ollama supplies model loading and inference.
|
|
5
|
+
**Run your agent's bulk work on local models without overloading your machine.**
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
FreeLlama lets coding agents offload bounded work (embeddings, OCR and vision, bulk rewrites,
|
|
8
|
+
classification, summaries) to local [Ollama](https://ollama.com) models instead of spending paid
|
|
9
|
+
tokens and context. For each task it picks an installed model that fits, loads and switches models
|
|
10
|
+
only when they fit in memory, and returns the result with a receipt of where and how it ran. Your
|
|
11
|
+
agent still decides what to offload and verifies the answer.
|
|
13
12
|
|
|
14
13
|
```mermaid
|
|
15
14
|
flowchart LR
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
agent["Coding agent<br/>Claude Code, Cursor, any MCP host"]
|
|
16
|
+
cli["freellama CLI"]
|
|
17
|
+
raw["Ollama-compatible client"]
|
|
18
|
+
subgraph fl["FreeLlama, on your machine"]
|
|
19
|
+
mcp["MCP server<br/>Node.js + Rust addon"]
|
|
20
|
+
serve["freellama serve<br/>127.0.0.1:11435"]
|
|
21
|
+
research["Research adapter<br/>read-only, allowlisted files"]
|
|
22
|
+
end
|
|
23
|
+
gpu[("Ollama<br/>GPU: Metal, CUDA, ROCm")]
|
|
24
|
+
cpu[("Optional CPU-only Ollama")]
|
|
25
|
+
|
|
26
|
+
agent -->|"MCP over stdio"| mcp
|
|
27
|
+
mcp -->|"control API"| serve
|
|
28
|
+
cli -->|"control API"| serve
|
|
29
|
+
raw -.->|"/api and /v1 stream through"| serve
|
|
30
|
+
mcp -.->|"delegate_research"| research
|
|
31
|
+
research -->|"each model turn is a managed task"| serve
|
|
32
|
+
serve -->|"route, admit, load, run"| gpu
|
|
33
|
+
serve -.->|"operator-assigned models"| cpu
|
|
22
34
|
```
|
|
23
35
|
|
|
24
|
-
##
|
|
36
|
+
## Why FreeLlama
|
|
37
|
+
|
|
38
|
+
Coding agents spend paid tokens and context on work a model on your own machine can do: embedding a
|
|
39
|
+
repository, reading screenshots and scans, summarizing or classifying hundreds of files. Pointing
|
|
40
|
+
the agent straight at Ollama does not fix that, because the agent cannot see:
|
|
41
|
+
|
|
42
|
+
- **Which model fits the job.** A tag name does not show capabilities, context window or memory
|
|
43
|
+
footprint.
|
|
44
|
+
- **Whether there is room.** One more load can push the machine into swap, several agents can pile
|
|
45
|
+
onto one GPU, and a hot or busy machine slows everything.
|
|
46
|
+
- **Whether it worked.** A model can repeat itself until its token cap, and nothing says whether the
|
|
47
|
+
task ran on the GPU or fell back to the CPU.
|
|
48
|
+
|
|
49
|
+
FreeLlama answers all three on every call, which makes offloading safe to do by default: the paid
|
|
50
|
+
model keeps the judgment, the local model does the volume, and each answer comes back with a receipt
|
|
51
|
+
you can check. The name means less metered inference, not only Meta's Llama models. More in
|
|
52
|
+
[Features](docs/FEATURES.md#why-freellama).
|
|
53
|
+
|
|
54
|
+
## Requirements
|
|
55
|
+
|
|
56
|
+
| You need | Why |
|
|
57
|
+
|---|---|
|
|
58
|
+
| [Ollama](https://ollama.com/download) running (`ollama list` works) with at least one model | FreeLlama manages Ollama; it does not install, start or replace it, and never downloads a model without your approval |
|
|
59
|
+
| Node.js 22 or newer | Runs the MCP server and the `freellama` npm launcher |
|
|
60
|
+
| One of the platforms below | npm installs the matching prebuilt binary as an optional dependency; do not install with `--omit=optional` |
|
|
61
|
+
|
|
62
|
+
| Platform | Prebuilt package |
|
|
63
|
+
|---|---|
|
|
64
|
+
| macOS, Apple silicon (arm64) | `@octocodeai/freellama-native-darwin-arm64` |
|
|
65
|
+
| Linux x64, glibc | `@octocodeai/freellama-native-linux-x64-gnu` |
|
|
66
|
+
| Linux arm64, glibc | `@octocodeai/freellama-native-linux-arm64-gnu` |
|
|
67
|
+
| Windows x64 | `@octocodeai/freellama-native-win32-x64-msvc` |
|
|
68
|
+
| Windows arm64 | `@octocodeai/freellama-native-win32-arm64-msvc` |
|
|
69
|
+
|
|
70
|
+
Intel Macs and musl Linux (such as Alpine) have no prebuilt binary: build from source with Rust 1.89
|
|
71
|
+
or newer ([Build from source](docs/BUILD_AND_NOTES.md#build-from-source)). Optional: a second,
|
|
72
|
+
CPU-only Ollama process for small helper models ([CPU/GPU routing](docs/CPU_GPU_ROUTING.md)).
|
|
25
73
|
|
|
26
|
-
Install
|
|
27
|
-
|
|
74
|
+
## Install
|
|
75
|
+
|
|
76
|
+
### MCP server (for your agent)
|
|
77
|
+
|
|
78
|
+
Claude Code:
|
|
28
79
|
|
|
29
80
|
```bash
|
|
30
|
-
npx @octocodeai/freellama
|
|
31
|
-
npx @octocodeai/freellama auth-token --out ~/.local/share/freellama/auth.token
|
|
32
|
-
npx @octocodeai/freellama serve \
|
|
33
|
-
--auth-token-file ~/.local/share/freellama/auth.token \
|
|
34
|
-
--feedback-file ~/.local/share/freellama/feedback.json
|
|
81
|
+
claude mcp add freellama -- npx -y @octocodeai/freellama-mcp-server
|
|
35
82
|
```
|
|
36
83
|
|
|
37
|
-
|
|
38
|
-
portable host hardware and disk discovery, effective settings, a non-mutating
|
|
39
|
-
`local_conservative_config_posture`, and source/permission-aware runtime signals. `memory_bytes`
|
|
40
|
-
is total host RAM; `unified_memory_bytes` is present only when the memory is known to be shared with
|
|
41
|
-
the accelerator. In another terminal, inspect or execute:
|
|
84
|
+
Claude Desktop, Cursor and other hosts:
|
|
42
85
|
|
|
43
|
-
```
|
|
44
|
-
npx @octocodeai/freellama
|
|
45
|
-
npx @octocodeai/freellama route --task coding --objective fastest
|
|
46
|
-
npx @octocodeai/freellama task --task completion --objective fastest "Reply with exactly OK."
|
|
86
|
+
```json
|
|
87
|
+
{ "mcpServers": { "freellama": { "command": "npx", "args": ["-y", "@octocodeai/freellama-mcp-server"] } } }
|
|
47
88
|
```
|
|
48
89
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
[Scope history and model warming reference](https://github.com/bgauryy/FreeLlama/blob/main/docs/SCOPES_AND_WARMING.md) for `scope`, `warm`,
|
|
52
|
-
and the scoped task flags.
|
|
90
|
+
At launch the server starts its own FreeLlama service on `127.0.0.1:11435` if none is running, so
|
|
91
|
+
the CLI is optional. It does not install or start Ollama.
|
|
53
92
|
|
|
54
|
-
|
|
93
|
+
Required for `delegate_research` in a published install: `FREELLAMA_MCP_ALLOWED_ROOTS` lists the
|
|
94
|
+
directories that tool may read (`:`-separated on macOS and Linux, `;` on Windows). Unset, every local
|
|
95
|
+
`delegate_research` call is refused (its `adapter:"github"` runs without a workspace); the other tools
|
|
96
|
+
do not need it, and `run_task` `files` uses `FREELLAMA_FILE_ROOTS` instead. Add it with
|
|
97
|
+
`claude mcp add freellama -e FREELLAMA_MCP_ALLOWED_ROOTS=/absolute/path/to/your-project -- npx -y @octocodeai/freellama-mcp-server`
|
|
98
|
+
or an `"env": { ... }` entry in JSON. All settings: [MCP configuration](packages/mcp/CONFIGURATION.md).
|
|
55
99
|
|
|
56
|
-
|
|
100
|
+
### CLI (for the terminal)
|
|
57
101
|
|
|
58
102
|
```bash
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
--cpu-upstream http://127.0.0.1:11436 \
|
|
62
|
-
--cpu-model nomic-embed-text:latest
|
|
103
|
+
npm install -g @octocodeai/freellama
|
|
104
|
+
freellama --version
|
|
63
105
|
```
|
|
64
106
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
107
|
+
Without installing, prefix commands with `npx @octocodeai/freellama`. Without Node.js, use
|
|
108
|
+
`cargo install freellama-cli` (Rust 1.89+; the command is still `freellama`).
|
|
109
|
+
|
|
110
|
+
## Quick start
|
|
68
111
|
|
|
69
|
-
|
|
70
|
-
the independent CPU pool defaults to one unit. Inspect the effective values with `config`. Override
|
|
71
|
-
them with `--max-concurrent-tasks` and `--cpu-max-concurrent-tasks`. `route` and
|
|
72
|
-
`task` also accept `--execution-preference auto|prefer-cpu|prefer-gpu`; this only chooses among
|
|
73
|
-
models already eligible on the requested backend and reports any fallback in the execution receipt.
|
|
74
|
-
`--min-placement-evidence observed` fails closed unless resident `/api/ps` evidence matches; use
|
|
75
|
-
the default `configured` for the first bounded warm-up.
|
|
112
|
+
### From your agent
|
|
76
113
|
|
|
77
|
-
|
|
78
|
-
persistence contracts, plus per-backend admission capacity. Comparable speed samples require matching
|
|
79
|
-
model digest, observed context, controls, process settings, and serial admission identity. A successful
|
|
80
|
-
parallel request can report verified placement without qualifying a speed sample. See
|
|
81
|
-
[feedback and adaptive profiles](https://github.com/bgauryy/FreeLlama/blob/main/docs/MONITORING.md#adaptive-concurrency) for sample eligibility.
|
|
82
|
-
Treat a missing contract as a stale running binary, then rebuild and restart before testing placement.
|
|
114
|
+
Ask in plain words; the agent picks the tool ([MCP reference](packages/mcp/README.md)):
|
|
83
115
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
runs. See the [production runbook](https://github.com/bgauryy/FreeLlama/blob/main/docs/PRODUCTION.md).
|
|
116
|
+
- "List my local models and tell me which one fits coding tasks."
|
|
117
|
+
- "Use FreeLlama to summarize these 40 files with a local model, then check three summaries."
|
|
118
|
+
- "Read this screenshot with a local OCR model."
|
|
88
119
|
|
|
89
|
-
|
|
120
|
+
Or call the tools directly: take the tested pick for the job from the catalog, then run it with
|
|
121
|
+
that `model` (without one, routing picks by capability alone and may choose a model that does
|
|
122
|
+
not fit now).
|
|
90
123
|
|
|
91
|
-
|
|
92
|
-
|
|
124
|
+
```jsonc
|
|
125
|
+
{ "tool": "models", "arguments": { "view": "catalog", "job": "coding" } }
|
|
126
|
+
{ "tool": "run_task", "arguments": { "task": "coding", "model": "<catalog pick>", "prompt": "Rename foo to bar in: ...", "options": { "num_predict": 512 } } }
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`run_task {preview:true}` shows the route without running or reserving anything.
|
|
93
130
|
|
|
94
|
-
From the
|
|
131
|
+
### From the terminal
|
|
95
132
|
|
|
96
133
|
```bash
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
134
|
+
freellama init # check prerequisites, print a first-run plan; changes nothing
|
|
135
|
+
freellama doctor # Ollama reachability, versions, hardware, effective settings
|
|
136
|
+
freellama catalog # tested model picks per job, what is installed, what fits now
|
|
137
|
+
freellama serve # keep running: the service on http://127.0.0.1:11435
|
|
138
|
+
# in another terminal
|
|
139
|
+
freellama ready # can work be served now, or what is it waiting for
|
|
140
|
+
freellama models
|
|
141
|
+
freellama task --task completion --model MODEL_TAG "Reply with exactly OK."
|
|
142
|
+
freellama status # queues, memory holds, loaded models
|
|
100
143
|
```
|
|
101
144
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
145
|
+
Replace `MODEL_TAG` with a tag from `models`. `init`, `doctor` and `catalog` work without `serve`.
|
|
146
|
+
Every command has `--help`; the [CLI guide](docs/CLI.md) covers the rest. While `serve` runs, a
|
|
147
|
+
status page is at `http://127.0.0.1:11435/_freellama/ui`.
|
|
105
148
|
|
|
106
|
-
|
|
107
|
-
arm64/x64. On an unsupported platform or an install made with `--omit=optional`, the launcher
|
|
108
|
-
reports the attempted packages and tells the operator to run `cargo build --release`. Node.js 20
|
|
109
|
-
or newer is required.
|
|
149
|
+
## Under the hood
|
|
110
150
|
|
|
111
|
-
|
|
151
|
+
Every managed call, from the MCP server, the CLI or the HTTP API, runs through the same Rust core
|
|
152
|
+
and the same gates: route, admit, load, run, observe. Nothing is decided from a model's name.
|
|
112
153
|
|
|
113
|
-
|
|
114
|
-
|
|
154
|
+
| Owner | Does |
|
|
155
|
+
|---|---|
|
|
156
|
+
| Your agent | Decides what to offload, writes the prompt, verifies the answer |
|
|
157
|
+
| FreeLlama | Picks the model, queues fairly, checks memory and host signals, coordinates loads, writes the receipt |
|
|
158
|
+
| Ollama | Stores models, loads runners, generates tokens |
|
|
159
|
+
|
|
160
|
+
### Life of one task
|
|
161
|
+
|
|
162
|
+
```mermaid
|
|
163
|
+
sequenceDiagram
|
|
164
|
+
autonumber
|
|
165
|
+
participant A as Agent
|
|
166
|
+
participant M as MCP server
|
|
167
|
+
participant S as freellama serve
|
|
168
|
+
participant O as Ollama
|
|
169
|
+
A->>M: run_task (task kind, model, prompt)
|
|
170
|
+
M->>S: POST /_freellama/v1/tasks
|
|
171
|
+
Note over S: Route: filter installed models by capability<br/>and context window, rank by policy,<br/>local benchmarks and loop history
|
|
172
|
+
Note over S: Admit: fair queue per backend, weighted 3/2/1<br/>for interactive, normal and background work,<br/>then memory, swap, CPU-load and heat checks
|
|
173
|
+
alt queue full, no room, or wait budget spent
|
|
174
|
+
S-->>M: 429 or 503 with the reason
|
|
175
|
+
else admitted
|
|
176
|
+
opt model not resident
|
|
177
|
+
S->>O: load it under the backend's load lock
|
|
178
|
+
end
|
|
179
|
+
S->>O: chat, generate or embed
|
|
180
|
+
O-->>S: streamed tokens, checked for loops every 16 tokens<br/>when the repetition stop is on
|
|
181
|
+
S->>O: GET /api/ps
|
|
182
|
+
O-->>S: where the runner actually ran, GPU or CPU
|
|
183
|
+
S-->>M: result + receipt
|
|
184
|
+
end
|
|
185
|
+
M-->>A: answer + receipt: route, admission, timing, placement
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
An explicit `model` always wins over routing; FreeLlama never swaps in another model. With
|
|
189
|
+
`defer:true` the same path runs in the background and `task_jobs` returns the receipt.
|
|
190
|
+
|
|
191
|
+
### The memory gate
|
|
192
|
+
|
|
193
|
+
A model load has to fit before it starts, so a new load cannot push the machine into swap:
|
|
194
|
+
|
|
195
|
+
```mermaid
|
|
196
|
+
flowchart TD
|
|
197
|
+
T(["Task admitted"]) --> R{"Model already<br/>resident?"}
|
|
198
|
+
R -->|"yes"| Run(["Run on the resident runner<br/>no new memory"])
|
|
199
|
+
R -->|"no"| P{"OS memory pressure,<br/>or swapping on a large load?"}
|
|
200
|
+
P -->|"yes"| Hold["Hold the load"]
|
|
201
|
+
P -->|"no"| F{"Fits in available memory<br/>and leaves the reserve free?"}
|
|
202
|
+
F -->|"yes"| Load(["Load, then run"])
|
|
203
|
+
F -->|"no"| U["Unload idle runners"]
|
|
204
|
+
U --> F2{"Fits now?"}
|
|
205
|
+
F2 -->|"yes"| Load
|
|
206
|
+
F2 -->|"no"| Hold
|
|
207
|
+
Hold --> W{"Room freed before<br/>the deadline?"}
|
|
208
|
+
W -->|"yes"| P
|
|
209
|
+
W -->|"no"| X(["503 naming the hold<br/>and the largest memory users"])
|
|
115
210
|
```
|
|
116
211
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
`
|
|
212
|
+
Resident models keep serving through a hold, except at critical OS memory pressure. Load estimates
|
|
213
|
+
come from model metadata (including the K/V cache at the requested context), and Ollama stays the
|
|
214
|
+
final authority on memory. `--low-memory advisory` admits a tight load with a warning instead of
|
|
215
|
+
waiting. Details: [Architecture](docs/ARCHITECTURE.md#managed-task-execution).
|
|
216
|
+
|
|
217
|
+
## What to offload
|
|
218
|
+
|
|
219
|
+
Offload bounded work whose result your agent can check; keep judgment in the agent.
|
|
220
|
+
|
|
221
|
+
| Offload | Keep in your agent |
|
|
222
|
+
|---|---|
|
|
223
|
+
| Embeddings, search and deduplication | Small lookups (describing the task costs more than doing it) |
|
|
224
|
+
| OCR and image reading | High-stakes judgment: security review, design, merge decisions |
|
|
225
|
+
| Bulk rewrites, summaries, classification of many files | Edits across files |
|
|
226
|
+
| Questions about workspace files (`delegate_research`) | Final verification of any local answer |
|
|
227
|
+
|
|
228
|
+
Many independent items: `run_task {tasks}`. Long work: `run_task {defer:true}` then `task_jobs`.
|
|
229
|
+
Treat local answers as candidates and spot-check some before relying on the rest.
|
|
230
|
+
|
|
231
|
+
## Safety
|
|
232
|
+
|
|
233
|
+
- Never pulls a model without approval for one exact tag and size; never deletes one unless you name
|
|
234
|
+
the exact installed tag.
|
|
235
|
+
- Checks each load against live available memory; a load that does not fit waits, then is refused
|
|
236
|
+
with a reason, and resident models keep serving.
|
|
237
|
+
- Unloads only models it warmed or that you name; idle models are unloaded under memory pressure.
|
|
238
|
+
- Holds CPU-bound work on a busy or hot machine and names the signal in the receipt.
|
|
239
|
+
- Binds to loopback; for remote access see [Production](docs/PRODUCTION.md).
|
|
240
|
+
|
|
241
|
+
## Documentation
|
|
120
242
|
|
|
121
|
-
|
|
243
|
+
| Topic | Page |
|
|
244
|
+
|---|---|
|
|
245
|
+
| All guides | [Documentation index](docs/README.md) |
|
|
246
|
+
| CLI commands and flags | [CLI](docs/CLI.md) |
|
|
247
|
+
| MCP tools, schemas, agent workflow | [MCP reference](packages/mcp/README.md), [MCP configuration](packages/mcp/CONFIGURATION.md) |
|
|
248
|
+
| Operating procedure for agents | [FreeLlama skill](skills/freellama/SKILL.md) |
|
|
249
|
+
| Features, routing and admission in depth, why FreeLlama | [Features](docs/FEATURES.md) |
|
|
250
|
+
| How it compares with Ollama, llama.cpp, llama-swap, LocalAI | [Comparison](docs/COMPARISON.md) |
|
|
251
|
+
| Choosing a model | [Model selection](docs/MODEL_SELECTION.md), [local model catalog](docs/LOCAL_MODELS.md) |
|
|
252
|
+
| Model forms, measured results | [Model forms and results](docs/MODEL_FORMS_AND_RESULTS.md) |
|
|
253
|
+
| Recipes per job | [Cookbooks](docs/cookbooks/README.md) |
|
|
254
|
+
| CPU/GPU setup and placement | [CPU/GPU routing](docs/CPU_GPU_ROUTING.md) |
|
|
255
|
+
| Queues, memory, live tuning | [Monitoring](docs/MONITORING.md) |
|
|
256
|
+
| Faster, lighter local models; Ollama settings | [Tuning](docs/TUNING.md) |
|
|
257
|
+
| Background jobs and recovery | [Deferred jobs](docs/DEFERRED_JOBS.md) |
|
|
258
|
+
| History, affinity, warming | [Scopes and warming](docs/SCOPES_AND_WARMING.md) |
|
|
259
|
+
| Deployment and releases | [Production](docs/PRODUCTION.md) |
|
|
260
|
+
| Build from source, operating notes | [Build and notes](docs/BUILD_AND_NOTES.md), [Testing](docs/TESTING.md) |
|
|
261
|
+
| Architecture and ownership | [Architecture](docs/ARCHITECTURE.md) |
|
|
262
|
+
| Embedding the Rust core | [Rust core](packages/rust-core/README.md) |
|
|
122
263
|
|
|
123
|
-
|
|
124
|
-
startup, auth-token creation, and benchmarks are CLI-only. Generate a routing policy with
|
|
125
|
-
`freellama policy from-eval` (see [CLI reference](https://github.com/bgauryy/FreeLlama/blob/main/docs/CLI.md#earn-medium-routing-confidence)).
|
|
264
|
+
## License
|
|
126
265
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
fetch one packaged guide on demand. The CLI package links the checkout documentation; the MCP
|
|
130
|
-
package bundles the root `docs/` set for installed agent clients.
|
|
266
|
+
Copyright (c) 2026 Guy Bary. Licensed under [Apache-2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT),
|
|
267
|
+
at your option.
|
package/bin/freellama.js
CHANGED
|
@@ -15,20 +15,16 @@ import { fileURLToPath } from "node:url";
|
|
|
15
15
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
16
16
|
const exe = process.platform === "win32" ? "freellama.exe" : "freellama";
|
|
17
17
|
const requireFromHere = createRequire(import.meta.url);
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
: process.platform === "win32" ? ["-msvc"] : [""];
|
|
21
|
-
const platformIds = [...new Set(PLATFORM_SUFFIXES.map((suffix) => `${process.platform}-${process.arch}${suffix}`))];
|
|
18
|
+
const ABI_SUFFIX = { linux: "-gnu", win32: "-msvc" }[process.platform] ?? "";
|
|
19
|
+
const platformId = `${process.platform}-${process.arch}${ABI_SUFFIX}`;
|
|
22
20
|
const candidates = [
|
|
23
21
|
path.join(root, "..", "..", "target", "release", exe), // in-repo dev, no packing needed
|
|
24
22
|
];
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// Optional packages for other platforms are intentionally absent after install.
|
|
31
|
-
}
|
|
24
|
+
try {
|
|
25
|
+
candidates.push(path.join(path.dirname(requireFromHere.resolve(`@octocodeai/freellama-native-${platformId}/package.json`)), exe));
|
|
26
|
+
} catch {
|
|
27
|
+
// Optional packages for other platforms are intentionally absent after install.
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
const binary = candidates.find((p) => existsSync(p));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octocodeai/freellama",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Local Ollama model gateway, router, and benchmarker — CLI. Wraps the compiled Rust binary from packages/rust-core.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"assets/logo.jpg"
|
|
26
26
|
],
|
|
27
27
|
"engines": {
|
|
28
|
-
"node": ">=
|
|
28
|
+
"node": ">=22"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "node -e \"process.stdout.write('freellama CLI launcher ready\\n')\"",
|
|
@@ -36,22 +36,20 @@
|
|
|
36
36
|
"author": "Guy Bary",
|
|
37
37
|
"license": "Apache-2.0 OR MIT",
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@octocodeai/freellama-native-darwin-arm64": "0.
|
|
40
|
-
"@octocodeai/freellama-native-
|
|
41
|
-
"@octocodeai/freellama-native-linux-
|
|
42
|
-
"@octocodeai/freellama-native-
|
|
43
|
-
"@octocodeai/freellama-native-
|
|
44
|
-
"@octocodeai/freellama-native-linux-x64-musl": "0.6.2",
|
|
45
|
-
"@octocodeai/freellama-native-win32-arm64-msvc": "0.6.2",
|
|
46
|
-
"@octocodeai/freellama-native-win32-x64-msvc": "0.6.2"
|
|
39
|
+
"@octocodeai/freellama-native-darwin-arm64": "0.9.0",
|
|
40
|
+
"@octocodeai/freellama-native-linux-arm64-gnu": "0.9.0",
|
|
41
|
+
"@octocodeai/freellama-native-linux-x64-gnu": "0.9.0",
|
|
42
|
+
"@octocodeai/freellama-native-win32-arm64-msvc": "0.9.0",
|
|
43
|
+
"@octocodeai/freellama-native-win32-x64-msvc": "0.9.0"
|
|
47
44
|
},
|
|
48
45
|
"publishConfig": {
|
|
49
46
|
"access": "public",
|
|
50
47
|
"registry": "https://registry.npmjs.org/"
|
|
51
48
|
},
|
|
52
49
|
"devDependencies": {
|
|
53
|
-
"@types/node": "^22.
|
|
54
|
-
"typescript": "^
|
|
55
|
-
"
|
|
50
|
+
"@types/node": "^22.20.5",
|
|
51
|
+
"typescript": "^7.0.2",
|
|
52
|
+
"vite": "^8.3.5",
|
|
53
|
+
"vitest": "^5.0.5"
|
|
56
54
|
}
|
|
57
55
|
}
|