bots-garden/razorbillpublic Fork
⑂ 4879667
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/razorbill.git
git clone ssh://git@rickub.com/bots-garden/razorbill.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

v0.2 release prep — scripts/release.sh (#50), version 0.2.0, v0.4 / v1.0.0 planned

- scripts/release.sh: Release build, dist/razorbill-<version>-macos-arm64.tar.gz with rzb and
  every resource bundle, SHA-256, check of the unpacked rzb --version; --products, --allow-dirty.
- Version 0.2.0, release notes EN + FR, how-to package-a-release / preparer-une-release.
- Tickets: #47 out of v0.2, milestone v0.2 closed; v0.4 — TUI (spike #51), v1.0.0 (signing #52).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-26T05:35:23+01:00 Browse files
4879667 parent: 17b9753
modified .gitignore +1 -0
@@ -4,3 +4,4 @@ DerivedData/
44 *.xcresult
55 __pycache__/
66 *.profraw
7+dist/
@@ -4,3 +4,4 @@ DerivedData/
4 *.xcresult4 *.xcresult
5 __pycache__/5 __pycache__/
6 *.profraw6 *.profraw
7+dist/
modified .memory/handoffs/2026-11-25-v0-2-server-foundation.md +8 -0
@@ -121,3 +121,11 @@ run_in_background so a notification arrives.
121121 Sampling extensions in (see summary). v0.2 milestone: only #47 left open (spike leftovers, tasks
122122 3–6; proposed to move them to a later milestone — user not asked yet). Still to suggest: Mac compat
123123 run, real `rzb serve` check of `cached=N`, release (version still 0.1.0).
124+
125+## Update 2026-11-26 — release 0.2.0 prepared (not tagged)
126+To finish the release, on the Mac (user): `scripts/release.sh` (first run rebuilds everything into
127+`.build/release`, ~10 min), `scripts/compat.sh` (not run on the Mac since #44), try the unpacked
128+archive with `rzb serve`; then `git tag -a v0.2.0` on main. Not checked: whether `rzb` still finds
129+its bundles when started through a symlink (docs say: put the folder on PATH). Next milestones:
130+v0.4 TUI — start with spike #51 (ask the user which TUI: chat client / dashboard / both); v1.0.0
131+signing #52. #47 leftovers have no milestone.
@@ -121,3 +121,11 @@ run_in_background so a notification arrives.
121 Sampling extensions in (see summary). v0.2 milestone: only #47 left open (spike leftovers, tasks121 Sampling extensions in (see summary). v0.2 milestone: only #47 left open (spike leftovers, tasks
122 3–6; proposed to move them to a later milestone — user not asked yet). Still to suggest: Mac compat122 3–6; proposed to move them to a later milestone — user not asked yet). Still to suggest: Mac compat
123 run, real `rzb serve` check of `cached=N`, release (version still 0.1.0).123 run, real `rzb serve` check of `cached=N`, release (version still 0.1.0).
124+
125+## Update 2026-11-26 — release 0.2.0 prepared (not tagged)
126+To finish the release, on the Mac (user): `scripts/release.sh` (first run rebuilds everything into
127+`.build/release`, ~10 min), `scripts/compat.sh` (not run on the Mac since #44), try the unpacked
128+archive with `rzb serve`; then `git tag -a v0.2.0` on main. Not checked: whether `rzb` still finds
129+its bundles when started through a symlink (docs say: put the folder on PATH). Next milestones:
130+v0.4 TUI — start with spike #51 (ask the user which TUI: chat client / dashboard / both); v1.0.0
131+signing #52. #47 leftovers have no milestone.
modified .memory/history.md +13 -0
@@ -307,3 +307,16 @@ prompt cache now leaves at least the window to compute. Not done (by the user's
307307 (still ignored), generation_config.json defaults, OpenAI-style whole-answer penalties. Tests Linux
308308 172, Mac 198 (cache smoke test parametrized with repetition_penalty 1.3), compat Linux 51/20. Gate
309309 PASS first time. Docs EN+FR: http-api, configuration, openai-compatibility, examples/server.yaml.
310+
311+## 2026-11-26 — release script, 0.2.0 prepared, v0.4 / v1.0.0 planned
312+
313+User: "ok" to moving #47 out of v0.2 and preparing the release; asked for a script that builds the
314+executable easily; plans Developer ID signing for 1.0.0 and a v0.4 about the TUI. Done:
315+`scripts/release.sh` (#50, closed; tar.gz + sha256 with rzb and all resource bundles, checks the
316+unpacked `rzb --version`; tested from Linux with `--products` on the last Mac build, not yet run on
317+the Mac), version 0.2.0 (code, test, docs), release notes EN+FR, #47 without milestone, milestone
318+v0.2 closed, milestones v0.4 — TUI (#51 spike, scope not decided) and v1.0.0 (#52 signing), epic
319+Distribution. Rejected: zip (tar.gz is what curl+tar users expect; zip comes back with
320+notarization in #52), copying rzb alone (bundles must sit next to it). Not tagged: waits for the
321+Mac build of the archive and a Mac compat run. Tests Linux 172; gate PASS; links 0 broken. Docs:
322+how-to package-a-release / preparer-une-release, build guide, README, indexes.
@@ -307,3 +307,16 @@ prompt cache now leaves at least the window to compute. Not done (by the user's
307 (still ignored), generation_config.json defaults, OpenAI-style whole-answer penalties. Tests Linux307 (still ignored), generation_config.json defaults, OpenAI-style whole-answer penalties. Tests Linux
308 172, Mac 198 (cache smoke test parametrized with repetition_penalty 1.3), compat Linux 51/20. Gate308 172, Mac 198 (cache smoke test parametrized with repetition_penalty 1.3), compat Linux 51/20. Gate
309 PASS first time. Docs EN+FR: http-api, configuration, openai-compatibility, examples/server.yaml.309 PASS first time. Docs EN+FR: http-api, configuration, openai-compatibility, examples/server.yaml.
310+
311+## 2026-11-26 — release script, 0.2.0 prepared, v0.4 / v1.0.0 planned
312+
313+User: "ok" to moving #47 out of v0.2 and preparing the release; asked for a script that builds the
314+executable easily; plans Developer ID signing for 1.0.0 and a v0.4 about the TUI. Done:
315+`scripts/release.sh` (#50, closed; tar.gz + sha256 with rzb and all resource bundles, checks the
316+unpacked `rzb --version`; tested from Linux with `--products` on the last Mac build, not yet run on
317+the Mac), version 0.2.0 (code, test, docs), release notes EN+FR, #47 without milestone, milestone
318+v0.2 closed, milestones v0.4 — TUI (#51 spike, scope not decided) and v1.0.0 (#52 signing), epic
319+Distribution. Rejected: zip (tar.gz is what curl+tar users expect; zip comes back with
320+notarization in #52), copying rzb alone (bundles must sit next to it). Not tagged: waits for the
321+Mac build of the archive and a Mac compat run. Tests Linux 172; gate PASS; links 0 broken. Docs:
322+how-to package-a-release / preparer-une-release, build guide, README, indexes.
modified .memory/summary.md +11 -3
@@ -89,8 +89,10 @@ server (tutorial, 10 how-to, 4 reference incl. `http-api.md` / `api-http.md`, 5
8989 `curl` blocks of `docs/*/reference/*.md` that hit `http://127.0.0.1:8080/v1` are run by
9090 `Tests/Compatibility/test_docs_curl.py` (doc models `mlx-community/Qwen3-4B-4bit` /
9191 `BAAI/bge-small-en-v1.5` are mapped to `chat` / `embed`): keep reference examples in that form, and
92-only successful calls in ```bash blocks. v0.2 tickets #31–#45 closed; #47 (KV-cache spike) still
93-open in the milestone; version string still `0.1.0` (bump at release).
92+only successful calls in ```bash blocks. v0.2 tickets #31–#45 closed; #47 (KV-cache spike)
93+moved out of the milestone (no milestone, tasks 3–6 open). Release 0.2.0 prepared 2026-11-26: version
94+string `0.2.0`, milestone v0.2 closed, notes in `release-notes/v0.2.0.md` / `.fr.md`; not tagged yet
95+(the user builds the archive on the Mac first).
9496
9597 KV cache (#47 spike, tasks 1–2 done, report = comment 1 on #47; implemented in #48): `MLXEngine`
9698 keeps one KV cache per loaded model (`PromptCache`, `Sources/RazorbillMLX/PromptCache.swift`) with
@@ -157,6 +159,9 @@ agent-only #16, #21, #22, #23, #27, #29 closed as wontfix on 2026-11-25 after th
157159 Server plan (2026-11-24): milestone `v0.2 — OpenAI-compatible MLX server` #31–#45, `v0.3 — Decision
158160 models` #46. mlx-swift-lm 3.32.3 already has MLXGuidedGeneration (XGrammar), MLXEmbedders,
159161 MLXRerankers and ToolCallFormat for most families.
162+Later milestones (2026-11-26): `v0.4 — TUI` (spike #51: chat client, server dashboard or both — scope
163+to agree with the user; v0.1 TUI layer at tag `v0.1-agent`), `v1.0.0` (#52: Developer ID signing +
164+notarization; notarytool takes zip/pkg/dmg, not tar.gz). Epic `Distribution` (#50, #52).
160165
161166 ## Quality tooling (decision in force)
162167
@@ -190,7 +195,10 @@ everything but MLX; Mac: `xcodebuild test -scheme razorbill`). Xcode scheme is `
190195 `rzb` / `razorbill-Package` scheme). Mac Release build: `xcodebuild build -scheme razorbill
191196 -destination 'platform=macOS' -configuration Release -derivedDataPath .build/xcode
192197 -skipPackagePluginValidation -skipMacroValidation`; binary `.build/xcode/Build/Products/Release/rzb`
193-(keep it next to `mlx-swift_Cmlx.bundle`). From the sandbox: `tools/host-runner/host.sh build|test .
198+(keep it next to `mlx-swift_Cmlx.bundle`).
199+**Release archive**: `scripts/release.sh` (Mac: Release build into `.build/release`, then
200+`dist/razorbill-<version>-macos-arm64.tar.gz` + `.sha256` with `rzb` and every `*.bundle`; refuses a
201+dirty tree unless `--allow-dirty`; `--products <dir>` packages an existing build, also from Linux). From the sandbox: `tools/host-runner/host.sh build|test .
194202 razorbill`, `host.sh run . rzb <args>` (no TTY: `rzb run` only); host-runner tests run in Debug
195203 (`@testable import`). Sandbox started on the Mac with `sbx env run --force` (`sbxenv.yaml`).
196204 Lint: `swiftlint lint --quiet Sources Tests` and `swift-format` (4 spaces); keep wrapped
@@ -89,8 +89,10 @@ server (tutorial, 10 how-to, 4 reference incl. `http-api.md` / `api-http.md`, 5
89 `curl` blocks of `docs/*/reference/*.md` that hit `http://127.0.0.1:8080/v1` are run by89 `curl` blocks of `docs/*/reference/*.md` that hit `http://127.0.0.1:8080/v1` are run by
90 `Tests/Compatibility/test_docs_curl.py` (doc models `mlx-community/Qwen3-4B-4bit` /90 `Tests/Compatibility/test_docs_curl.py` (doc models `mlx-community/Qwen3-4B-4bit` /
91 `BAAI/bge-small-en-v1.5` are mapped to `chat` / `embed`): keep reference examples in that form, and91 `BAAI/bge-small-en-v1.5` are mapped to `chat` / `embed`): keep reference examples in that form, and
92-only successful calls in ```bash blocks. v0.2 tickets #31–#45 closed; #47 (KV-cache spike) still92+only successful calls in ```bash blocks. v0.2 tickets #31–#45 closed; #47 (KV-cache spike)
93-open in the milestone; version string still `0.1.0` (bump at release).93+moved out of the milestone (no milestone, tasks 3–6 open). Release 0.2.0 prepared 2026-11-26: version
94+string `0.2.0`, milestone v0.2 closed, notes in `release-notes/v0.2.0.md` / `.fr.md`; not tagged yet
95+(the user builds the archive on the Mac first).
94 96
95 KV cache (#47 spike, tasks 1–2 done, report = comment 1 on #47; implemented in #48): `MLXEngine`97 KV cache (#47 spike, tasks 1–2 done, report = comment 1 on #47; implemented in #48): `MLXEngine`
96 keeps one KV cache per loaded model (`PromptCache`, `Sources/RazorbillMLX/PromptCache.swift`) with98 keeps one KV cache per loaded model (`PromptCache`, `Sources/RazorbillMLX/PromptCache.swift`) with
@@ -157,6 +159,9 @@ agent-only #16, #21, #22, #23, #27, #29 closed as wontfix on 2026-11-25 after th
157 Server plan (2026-11-24): milestone `v0.2 — OpenAI-compatible MLX server` #31–#45, `v0.3 — Decision159 Server plan (2026-11-24): milestone `v0.2 — OpenAI-compatible MLX server` #31–#45, `v0.3 — Decision
158 models` #46. mlx-swift-lm 3.32.3 already has MLXGuidedGeneration (XGrammar), MLXEmbedders,160 models` #46. mlx-swift-lm 3.32.3 already has MLXGuidedGeneration (XGrammar), MLXEmbedders,
159 MLXRerankers and ToolCallFormat for most families.161 MLXRerankers and ToolCallFormat for most families.
162+Later milestones (2026-11-26): `v0.4 — TUI` (spike #51: chat client, server dashboard or both — scope
163+to agree with the user; v0.1 TUI layer at tag `v0.1-agent`), `v1.0.0` (#52: Developer ID signing +
164+notarization; notarytool takes zip/pkg/dmg, not tar.gz). Epic `Distribution` (#50, #52).
160 165
161 ## Quality tooling (decision in force)166 ## Quality tooling (decision in force)
162 167
@@ -190,7 +195,10 @@ everything but MLX; Mac: `xcodebuild test -scheme razorbill`). Xcode scheme is `
190 `rzb` / `razorbill-Package` scheme). Mac Release build: `xcodebuild build -scheme razorbill195 `rzb` / `razorbill-Package` scheme). Mac Release build: `xcodebuild build -scheme razorbill
191 -destination 'platform=macOS' -configuration Release -derivedDataPath .build/xcode196 -destination 'platform=macOS' -configuration Release -derivedDataPath .build/xcode
192 -skipPackagePluginValidation -skipMacroValidation`; binary `.build/xcode/Build/Products/Release/rzb`197 -skipPackagePluginValidation -skipMacroValidation`; binary `.build/xcode/Build/Products/Release/rzb`
193-(keep it next to `mlx-swift_Cmlx.bundle`). From the sandbox: `tools/host-runner/host.sh build|test .198+(keep it next to `mlx-swift_Cmlx.bundle`).
199+**Release archive**: `scripts/release.sh` (Mac: Release build into `.build/release`, then
200+`dist/razorbill-<version>-macos-arm64.tar.gz` + `.sha256` with `rzb` and every `*.bundle`; refuses a
201+dirty tree unless `--allow-dirty`; `--products <dir>` packages an existing build, also from Linux). From the sandbox: `tools/host-runner/host.sh build|test .
194 razorbill`, `host.sh run . rzb <args>` (no TTY: `rzb run` only); host-runner tests run in Debug202 razorbill`, `host.sh run . rzb <args>` (no TTY: `rzb run` only); host-runner tests run in Debug
195 (`@testable import`). Sandbox started on the Mac with `sbx env run --force` (`sbxenv.yaml`).203 (`@testable import`). Sandbox started on the Mac with `sbx env run --force` (`sbxenv.yaml`).
196 Lint: `swiftlint lint --quiet Sources Tests` and `swift-format` (4 spaces); keep wrapped204 Lint: `swiftlint lint --quiet Sources Tests` and `swift-format` (4 spaces); keep wrapped
modified .quality/history.jsonl +1 -0
@@ -26,3 +26,4 @@
2626 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "b5ef2e8", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 232, "complex": 544, "cyclo": 602, "fields": 1189, "funcs": 573, "lcom": 115, "lines": 10494, "loc": 8343}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 26, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T21:38:24Z"}
2727 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "a485576", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10665, "loc": 8489}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 27, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T22:01:44Z"}
2828 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "a485576", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10669, "loc": 8492}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 28, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T22:03:59Z"}
29+{"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "17b9753", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10669, "loc": 8492}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 29, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T04:34:58Z"}
@@ -26,3 +26,4 @@
26 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "b5ef2e8", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 232, "complex": 544, "cyclo": 602, "fields": 1189, "funcs": 573, "lcom": 115, "lines": 10494, "loc": 8343}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 26, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T21:38:24Z"}26 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "b5ef2e8", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 232, "complex": 544, "cyclo": 602, "fields": 1189, "funcs": 573, "lcom": 115, "lines": 10494, "loc": 8343}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 26, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T21:38:24Z"}
27 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "a485576", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10665, "loc": 8489}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 27, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T22:01:44Z"}27 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "a485576", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10665, "loc": 8489}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 27, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T22:01:44Z"}
28 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "a485576", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10669, "loc": 8492}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 28, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T22:03:59Z"}28 {"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "a485576", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10669, "loc": 8492}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 28, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-25T22:03:59Z"}
29+{"branch": "feature/v0.2-openai-server", "breaches": [], "commit": "17b9753", "counts": {}, "gate": {"max_error": 0, "max_smells": 0, "max_warning": 0}, "gate_passed": true, "metrics": {"classes": 234, "complex": 546, "cyclo": 604, "fields": 1209, "funcs": 582, "lcom": 115, "lines": 10669, "loc": 8492}, "qlty_version": "qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)", "run": 29, "smells": 0, "swiftlint_version": "0.65.1", "timestamp": "2026-11-26T04:34:58Z"}
added .quality/report-20261126T043458Z.md +73 -0
new file mode 100644
@@ -0,0 +1,73 @@
1+# Quality report — 2026-11-26T04:34:58Z
2+
3+- **Gate**: ✅ **PASS**
4+- **Commit**: `17b9753` on `feature/v0.2-openai-server`
5+- **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)
6+- **swiftlint**: 0.65.1 (run directly, merged into lint issues)
7+- **Run**: #29 (previous: 2026-11-25T22:03:59Z)
8+
9+## Lint issues (`qlty check`)
10+
11+_none_
12+
13+### Top rules
14+
15+_none_
16+
17+### Most affected files
18+
19+_none_
20+
21+## Code smells (`qlty smells`)
22+
23+Total: **0** (vs previous: ±0)
24+
25+_none_
26+
27+## Metrics (`qlty metrics`)
28+
29+| metric | total | vs previous |
30+|---|---|---|
31+| funcs | 582 | ±0 |
32+| classes | 234 | ±0 |
33+| fields | 1209 | ±0 |
34+| cyclo | 604 | ±0 |
35+| complex | 546 | ±0 |
36+| lcom | 115 | ±0 |
37+| lines | 10669 | ±0 |
38+| loc | 8492 | ±0 |
39+
40+### Most complex files
41+
42+| file | complex | cyclo | loc |
43+|---|---|---|---|
44+| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 242 |
45+| Sources/RazorbillServer/Chat/CompletionStream.swift | 31 | 20 | 125 |
46+| samples/02-kv-cache-reuse/Sources/KVCacheReuse/KVCacheReuse.swift | 26 | 20 | 285 |
47+| Sources/RazorbillMLX/MLXEngine.swift | 23 | 35 | 246 |
48+| tools/host-runner/host_runner.py | 22 | 22 | 141 |
49+| Sources/RazorbillCore/Config/ConfigValue+JSON.swift | 20 | 25 | 71 |
50+| Sources/RazorbillCore/Config/ServerConfigLoader.swift | 20 | 17 | 227 |
51+| Sources/RazorbillServer/Chat/ToolsAndFormats.swift | 18 | 30 | 170 |
52+| Sources/RazorbillServer/Chat/ChatCompletionRequest.swift | 17 | 24 | 276 |
53+| Sources/RazorbillServer/Chat/ChatCompletionChunk.swift | 16 | 11 | 137 |
54+| Sources/RazorbillServer/ModelManager.swift | 16 | 22 | 220 |
55+| Sources/RazorbillCore/Config/OrderedJSONReader.swift | 15 | 24 | 140 |
56+| Sources/RazorbillCore/Config/GenerationOverrides.swift | 14 | 15 | 67 |
57+| Sources/RazorbillCLI/Commands/ModelsCommand.swift | 13 | 7 | 100 |
58+| Sources/RazorbillServer/EmbeddingsRoute.swift | 13 | 13 | 143 |
59+
60+## Trend
61+
62+| run | timestamp | error | warning | smells | complex | gate |
63+|---|---|---|---|---|---|---|
64+| 20 | 2026-11-25T18:44:58Z | 0 | 0 | 0 | 512 | PASS |
65+| 21 | 2026-11-25T19:12:45Z | 0 | 0 | 0 | 512 | PASS |
66+| 22 | 2026-11-25T21:27:49Z | 4 | 1 | 0 | 538 | FAIL |
67+| 23 | 2026-11-25T21:28:10Z | 0 | 0 | 0 | 538 | PASS |
68+| 24 | 2026-11-25T21:37:24Z | 0 | 1 | 1 | 559 | FAIL |
69+| 25 | 2026-11-25T21:37:51Z | 0 | 1 | 0 | 544 | FAIL |
70+| 26 | 2026-11-25T21:38:24Z | 0 | 0 | 0 | 544 | PASS |
71+| 27 | 2026-11-25T22:01:44Z | 0 | 0 | 0 | 546 | PASS |
72+| 28 | 2026-11-25T22:03:59Z | 0 | 0 | 0 | 546 | PASS |
73+| 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS |
new file mode 100644
@@ -0,0 +1,73 @@
1+# Quality report — 2026-11-26T04:34:58Z
2+
3+- **Gate**: ✅ **PASS**
4+- **Commit**: `17b9753` on `feature/v0.2-openai-server`
5+- **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)
6+- **swiftlint**: 0.65.1 (run directly, merged into lint issues)
7+- **Run**: #29 (previous: 2026-11-25T22:03:59Z)
8+
9+## Lint issues (`qlty check`)
10+
11+_none_
12+
13+### Top rules
14+
15+_none_
16+
17+### Most affected files
18+
19+_none_
20+
21+## Code smells (`qlty smells`)
22+
23+Total: **0** (vs previous: ±0)
24+
25+_none_
26+
27+## Metrics (`qlty metrics`)
28+
29+| metric | total | vs previous |
30+|---|---|---|
31+| funcs | 582 | ±0 |
32+| classes | 234 | ±0 |
33+| fields | 1209 | ±0 |
34+| cyclo | 604 | ±0 |
35+| complex | 546 | ±0 |
36+| lcom | 115 | ±0 |
37+| lines | 10669 | ±0 |
38+| loc | 8492 | ±0 |
39+
40+### Most complex files
41+
42+| file | complex | cyclo | loc |
43+|---|---|---|---|
44+| Sources/RazorbillServer/CompletionsRoute.swift | 47 | 20 | 242 |
45+| Sources/RazorbillServer/Chat/CompletionStream.swift | 31 | 20 | 125 |
46+| samples/02-kv-cache-reuse/Sources/KVCacheReuse/KVCacheReuse.swift | 26 | 20 | 285 |
47+| Sources/RazorbillMLX/MLXEngine.swift | 23 | 35 | 246 |
48+| tools/host-runner/host_runner.py | 22 | 22 | 141 |
49+| Sources/RazorbillCore/Config/ConfigValue+JSON.swift | 20 | 25 | 71 |
50+| Sources/RazorbillCore/Config/ServerConfigLoader.swift | 20 | 17 | 227 |
51+| Sources/RazorbillServer/Chat/ToolsAndFormats.swift | 18 | 30 | 170 |
52+| Sources/RazorbillServer/Chat/ChatCompletionRequest.swift | 17 | 24 | 276 |
53+| Sources/RazorbillServer/Chat/ChatCompletionChunk.swift | 16 | 11 | 137 |
54+| Sources/RazorbillServer/ModelManager.swift | 16 | 22 | 220 |
55+| Sources/RazorbillCore/Config/OrderedJSONReader.swift | 15 | 24 | 140 |
56+| Sources/RazorbillCore/Config/GenerationOverrides.swift | 14 | 15 | 67 |
57+| Sources/RazorbillCLI/Commands/ModelsCommand.swift | 13 | 7 | 100 |
58+| Sources/RazorbillServer/EmbeddingsRoute.swift | 13 | 13 | 143 |
59+
60+## Trend
61+
62+| run | timestamp | error | warning | smells | complex | gate |
63+|---|---|---|---|---|---|---|
64+| 20 | 2026-11-25T18:44:58Z | 0 | 0 | 0 | 512 | PASS |
65+| 21 | 2026-11-25T19:12:45Z | 0 | 0 | 0 | 512 | PASS |
66+| 22 | 2026-11-25T21:27:49Z | 4 | 1 | 0 | 538 | FAIL |
67+| 23 | 2026-11-25T21:28:10Z | 0 | 0 | 0 | 538 | PASS |
68+| 24 | 2026-11-25T21:37:24Z | 0 | 1 | 1 | 559 | FAIL |
69+| 25 | 2026-11-25T21:37:51Z | 0 | 1 | 0 | 544 | FAIL |
70+| 26 | 2026-11-25T21:38:24Z | 0 | 0 | 0 | 544 | PASS |
71+| 27 | 2026-11-25T22:01:44Z | 0 | 0 | 0 | 546 | PASS |
72+| 28 | 2026-11-25T22:03:59Z | 0 | 0 | 0 | 546 | PASS |
73+| 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS |
modified .quality/report-latest.md +6 -6
@@ -1,10 +1,10 @@
1-# Quality report — 2026-11-25T22:03:59Z
1+# Quality report — 2026-11-26T04:34:58Z
22
33 - **Gate**: ✅ **PASS**
4-- **Commit**: `a485576` on `feature/v0.2-openai-server`
4+- **Commit**: `17b9753` on `feature/v0.2-openai-server`
55 - **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)
66 - **swiftlint**: 0.65.1 (run directly, merged into lint issues)
7-- **Run**: #28 (previous: 2026-11-25T22:01:44Z)
7+- **Run**: #29 (previous: 2026-11-25T22:03:59Z)
88
99 ## Lint issues (`qlty check`)
1010
@@ -34,8 +34,8 @@ _none_
3434 | cyclo | 604 | ±0 |
3535 | complex | 546 | ±0 |
3636 | lcom | 115 | ±0 |
37-| lines | 10669 | +4 |
38-| loc | 8492 | +3 |
37+| lines | 10669 | ±0 |
38+| loc | 8492 | ±0 |
3939
4040 ### Most complex files
4141
@@ -61,7 +61,6 @@ _none_
6161
6262 | run | timestamp | error | warning | smells | complex | gate |
6363 |---|---|---|---|---|---|---|
64-| 19 | 2026-11-25T18:44:20Z | 0 | 0 | 2 | 513 | FAIL |
6564 | 20 | 2026-11-25T18:44:58Z | 0 | 0 | 0 | 512 | PASS |
6665 | 21 | 2026-11-25T19:12:45Z | 0 | 0 | 0 | 512 | PASS |
6766 | 22 | 2026-11-25T21:27:49Z | 4 | 1 | 0 | 538 | FAIL |
@@ -71,3 +70,4 @@ _none_
7170 | 26 | 2026-11-25T21:38:24Z | 0 | 0 | 0 | 544 | PASS |
7271 | 27 | 2026-11-25T22:01:44Z | 0 | 0 | 0 | 546 | PASS |
7372 | 28 | 2026-11-25T22:03:59Z | 0 | 0 | 0 | 546 | PASS |
73+| 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS |
@@ -1,10 +1,10 @@
1-# Quality report — 2026-11-25T22:03:59Z1+# Quality report — 2026-11-26T04:34:58Z
2 2
3 - **Gate**: ✅ **PASS**3 - **Gate**: ✅ **PASS**
4-- **Commit**: `a485576` on `feature/v0.2-openai-server`4+- **Commit**: `17b9753` on `feature/v0.2-openai-server`
5 - **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)5 - **qlty**: qlty 0.672.0 linux-arm64 (4362b62 2026-11-20)
6 - **swiftlint**: 0.65.1 (run directly, merged into lint issues)6 - **swiftlint**: 0.65.1 (run directly, merged into lint issues)
7-- **Run**: #28 (previous: 2026-11-25T22:01:44Z)7+- **Run**: #29 (previous: 2026-11-25T22:03:59Z)
8 8
9 ## Lint issues (`qlty check`)9 ## Lint issues (`qlty check`)
10 10
@@ -34,8 +34,8 @@ _none_
34 | cyclo | 604 | ±0 |34 | cyclo | 604 | ±0 |
35 | complex | 546 | ±0 |35 | complex | 546 | ±0 |
36 | lcom | 115 | ±0 |36 | lcom | 115 | ±0 |
37-| lines | 10669 | +4 |37+| lines | 10669 | ±0 |
38-| loc | 8492 | +3 |38+| loc | 8492 | ±0 |
39 39
40 ### Most complex files40 ### Most complex files
41 41
@@ -61,7 +61,6 @@ _none_
61 61
62 | run | timestamp | error | warning | smells | complex | gate |62 | run | timestamp | error | warning | smells | complex | gate |
63 |---|---|---|---|---|---|---|63 |---|---|---|---|---|---|---|
64-| 19 | 2026-11-25T18:44:20Z | 0 | 0 | 2 | 513 | FAIL |
65 | 20 | 2026-11-25T18:44:58Z | 0 | 0 | 0 | 512 | PASS |64 | 20 | 2026-11-25T18:44:58Z | 0 | 0 | 0 | 512 | PASS |
66 | 21 | 2026-11-25T19:12:45Z | 0 | 0 | 0 | 512 | PASS |65 | 21 | 2026-11-25T19:12:45Z | 0 | 0 | 0 | 512 | PASS |
67 | 22 | 2026-11-25T21:27:49Z | 4 | 1 | 0 | 538 | FAIL |66 | 22 | 2026-11-25T21:27:49Z | 4 | 1 | 0 | 538 | FAIL |
@@ -71,3 +70,4 @@ _none_
71 | 26 | 2026-11-25T21:38:24Z | 0 | 0 | 0 | 544 | PASS |70 | 26 | 2026-11-25T21:38:24Z | 0 | 0 | 0 | 544 | PASS |
72 | 27 | 2026-11-25T22:01:44Z | 0 | 0 | 0 | 546 | PASS |71 | 27 | 2026-11-25T22:01:44Z | 0 | 0 | 0 | 546 | PASS |
73 | 28 | 2026-11-25T22:03:59Z | 0 | 0 | 0 | 546 | PASS |72 | 28 | 2026-11-25T22:03:59Z | 0 | 0 | 0 | 546 | PASS |
73+| 29 | 2026-11-26T04:34:58Z | 0 | 0 | 0 | 546 | PASS |
modified .tickets/epics.yaml +5 -1
@@ -27,7 +27,7 @@ epics:
2727 - title: "TUI mode"
2828 state: open
2929 color: "#f9d0c4"
30- description: "Use the agent in a full-screen terminal UI."
30+ description: "A full-screen terminal UI: the v0.1 agent chat, then the v0.4 TUI (#51)."
3131 - title: "Extensibility"
3232 state: open
3333 color: "#a2eeef"
@@ -60,3 +60,7 @@ epics:
6060 state: open
6161 color: "#b60205"
6262 description: "Models that decide/classify/rank rather than generate free text — scope to be defined."
63+ - title: "Distribution"
64+ state: open
65+ color: "#5319e7"
66+ description: "Release archive, signing, notarization, installation."
@@ -27,7 +27,7 @@ epics:
27 - title: "TUI mode"27 - title: "TUI mode"
28 state: open28 state: open
29 color: "#f9d0c4"29 color: "#f9d0c4"
30- description: "Use the agent in a full-screen terminal UI."30+ description: "A full-screen terminal UI: the v0.1 agent chat, then the v0.4 TUI (#51)."
31 - title: "Extensibility"31 - title: "Extensibility"
32 state: open32 state: open
33 color: "#a2eeef"33 color: "#a2eeef"
@@ -60,3 +60,7 @@ epics:
60 state: open60 state: open
61 color: "#b60205"61 color: "#b60205"
62 description: "Models that decide/classify/rank rather than generate free text — scope to be defined."62 description: "Models that decide/classify/rank rather than generate free text — scope to be defined."
63+ - title: "Distribution"
64+ state: open
65+ color: "#5319e7"
66+ description: "Release archive, signing, notarization, installation."
modified .tickets/issues/0047-spike-kv-cache-how-it-works-and-what-a-server-ca.yaml +8 -3
@@ -6,13 +6,12 @@ author:
66 name: k33g
77 email: ph.charriere@gmail.com
88 createdAt: 2026-11-25T04:56:08.000Z
9-updatedAt: 2026-11-25T21:00:00.000Z
9+updatedAt: 2026-11-26T06:00:00.000Z
1010 labels:
1111 - "spike"
1212 - "area::engine"
1313 - "mac-only"
1414 - "priority::high"
15-milestone: "v0.2 — OpenAI-compatible MLX server"
1615 epic: "Inference engine"
1716 related:
1817 - 34
@@ -165,4 +164,10 @@ comments:
165164 - a `kv_bits` setting;
166165 - a hybrid-state snapshot;
167166 - a multi-entry LRU, for several conversations alternating on one model.
168-
167+ - id: 2
168+ author:
169+ name: k33g
170+ email: ph.charriere@gmail.com
171+ createdAt: 2026-11-26T06:00:00.000Z
172+ body: |
173+ Moved out of v0.2 (agreed with the user, 2026-11-26) so the milestone can be released: tasks 1-2 led to #48, which is shipped. Tasks 3-6 (trimming on rotating / quantized / hybrid caches, memory and quantized KV costs, persisted prompt caches, final report) stay open without a milestone, to plan later.
@@ -6,13 +6,12 @@ author:
6 name: k33g6 name: k33g
7 email: ph.charriere@gmail.com7 email: ph.charriere@gmail.com
8 createdAt: 2026-11-25T04:56:08.000Z8 createdAt: 2026-11-25T04:56:08.000Z
9-updatedAt: 2026-11-25T21:00:00.000Z9+updatedAt: 2026-11-26T06:00:00.000Z
10 labels:10 labels:
11 - "spike"11 - "spike"
12 - "area::engine"12 - "area::engine"
13 - "mac-only"13 - "mac-only"
14 - "priority::high"14 - "priority::high"
15-milestone: "v0.2 — OpenAI-compatible MLX server"
16 epic: "Inference engine"15 epic: "Inference engine"
17 related:16 related:
18 - 3417 - 34
@@ -165,4 +164,10 @@ comments:
165 - a `kv_bits` setting;164 - a `kv_bits` setting;
166 - a hybrid-state snapshot;165 - a hybrid-state snapshot;
167 - a multi-entry LRU, for several conversations alternating on one model.166 - a multi-entry LRU, for several conversations alternating on one model.
168-167+ - id: 2
168+ author:
169+ name: k33g
170+ email: ph.charriere@gmail.com
171+ createdAt: 2026-11-26T06:00:00.000Z
172+ body: |
173+ Moved out of v0.2 (agreed with the user, 2026-11-26) so the milestone can be released: tasks 1-2 led to #48, which is shipped. Tasks 3-6 (trimming on rotating / quantized / hybrid caches, memory and quantized KV costs, persisted prompt caches, final report) stay open without a milestone, to plan later.
added .tickets/issues/0050-release-script-build-and-package-rzb.yaml +59 -0
new file mode 100644
@@ -0,0 +1,59 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 50
3+title: "Release script: build and package rzb (scripts/release.sh)"
4+state: closed
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-26T06:00:00.000Z
9+updatedAt: 2026-11-26T06:00:00.000Z
10+labels:
11+ - "kind::chore"
12+ - "area::build"
13+ - "mac-only"
14+ - "priority::high"
15+milestone: "v0.2 — OpenAI-compatible MLX server"
16+epic: "Distribution"
17+related:
18+ - 45
19+ - 52
20+body: |
21+ Asked by the user (2026-11-26): "pour la release, j'ai besoin d'un script qui permette de facilement créer l'exécutable".
22+
23+ `rzb` cannot be copied alone: it loads `mlx-swift_Cmlx.bundle` (the MLX Metal library) and the other resource bundles from its own folder. The script builds in Release and ships the executable with every bundle in one archive, with a checksum.
24+tasks:
25+ - id: 1
26+ title: "Write scripts/release.sh (build, package, checksum, check the unpacked archive)"
27+ state: closed
28+ priority: high
29+ author:
30+ name: k33g
31+ email: ph.charriere@gmail.com
32+ createdAt: 2026-11-26T06:00:00.000Z
33+ updatedAt: 2026-11-26T06:00:00.000Z
34+ closedAt: 2026-11-26T06:00:00.000Z
35+ - id: 2
36+ title: "Document it (EN + FR how-to)"
37+ state: closed
38+ priority: medium
39+ author:
40+ name: k33g
41+ email: ph.charriere@gmail.com
42+ createdAt: 2026-11-26T06:00:00.000Z
43+ updatedAt: 2026-11-26T06:00:00.000Z
44+ closedAt: 2026-11-26T06:00:00.000Z
45+comments:
46+ - id: 1
47+ author:
48+ name: k33g
49+ email: ph.charriere@gmail.com
50+ createdAt: 2026-11-26T06:00:00.000Z
51+ body: |
52+ Done.
53+
54+ - `scripts/release.sh` reads the version from `Razorbill.swift`, refuses uncommitted changes (`--allow-dirty` for test archives), builds in Release into `.build/release`, and writes `dist/razorbill-<version>-macos-arm64.tar.gz` and its `.sha256`.
55+ - The archive holds `rzb`, every `*.bundle` of the build and an `INSTALL.txt` (folder on `PATH`, quarantine).
56+ - The archive is unpacked in a temporary folder and `rzb --version` is checked against the version (on the Mac).
57+ - `--products <dir>` packages an existing build; tested from Linux on the last Mac build.
58+ - No signing beyond the linker's ad-hoc signature: #52 (v1.0.0).
59+ - Docs: `how-to/package-a-release.md`, `how-to/preparer-une-release.md`.
new file mode 100644
@@ -0,0 +1,59 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 50
3+title: "Release script: build and package rzb (scripts/release.sh)"
4+state: closed
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-26T06:00:00.000Z
9+updatedAt: 2026-11-26T06:00:00.000Z
10+labels:
11+ - "kind::chore"
12+ - "area::build"
13+ - "mac-only"
14+ - "priority::high"
15+milestone: "v0.2 — OpenAI-compatible MLX server"
16+epic: "Distribution"
17+related:
18+ - 45
19+ - 52
20+body: |
21+ Asked by the user (2026-11-26): "pour la release, j'ai besoin d'un script qui permette de facilement créer l'exécutable".
22+
23+ `rzb` cannot be copied alone: it loads `mlx-swift_Cmlx.bundle` (the MLX Metal library) and the other resource bundles from its own folder. The script builds in Release and ships the executable with every bundle in one archive, with a checksum.
24+tasks:
25+ - id: 1
26+ title: "Write scripts/release.sh (build, package, checksum, check the unpacked archive)"
27+ state: closed
28+ priority: high
29+ author:
30+ name: k33g
31+ email: ph.charriere@gmail.com
32+ createdAt: 2026-11-26T06:00:00.000Z
33+ updatedAt: 2026-11-26T06:00:00.000Z
34+ closedAt: 2026-11-26T06:00:00.000Z
35+ - id: 2
36+ title: "Document it (EN + FR how-to)"
37+ state: closed
38+ priority: medium
39+ author:
40+ name: k33g
41+ email: ph.charriere@gmail.com
42+ createdAt: 2026-11-26T06:00:00.000Z
43+ updatedAt: 2026-11-26T06:00:00.000Z
44+ closedAt: 2026-11-26T06:00:00.000Z
45+comments:
46+ - id: 1
47+ author:
48+ name: k33g
49+ email: ph.charriere@gmail.com
50+ createdAt: 2026-11-26T06:00:00.000Z
51+ body: |
52+ Done.
53+
54+ - `scripts/release.sh` reads the version from `Razorbill.swift`, refuses uncommitted changes (`--allow-dirty` for test archives), builds in Release into `.build/release`, and writes `dist/razorbill-<version>-macos-arm64.tar.gz` and its `.sha256`.
55+ - The archive holds `rzb`, every `*.bundle` of the build and an `INSTALL.txt` (folder on `PATH`, quarantine).
56+ - The archive is unpacked in a temporary folder and `rzb --version` is checked against the version (on the Mac).
57+ - `--products <dir>` packages an existing build; tested from Linux on the last Mac build.
58+ - No signing beyond the linker's ad-hoc signature: #52 (v1.0.0).
59+ - Docs: `how-to/package-a-release.md`, `how-to/preparer-une-release.md`.
added .tickets/issues/0051-spike-what-the-tui-is-for-in-the-server.yaml +59 -0
new file mode 100644
@@ -0,0 +1,59 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 51
3+title: "Spike: what the v0.4 TUI is for, now that razorbill is a server"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-26T06:00:00.000Z
9+updatedAt: 2026-11-26T06:00:00.000Z
10+labels:
11+ - "spike"
12+ - "needs-decision"
13+ - "area::tui"
14+ - "priority::medium"
15+milestone: "v0.4 — TUI"
16+epic: "TUI mode"
17+related:
18+ - 16
19+ - 26
20+ - 28
21+ - 31
22+body: |
23+ Asked by the user (2026-11-26): "prépare aussi une v0.4 qui consistera à bosser sur la TUI".
24+
25+ The v0.1 TUI (`rzb tui`, own ANSI/termios layer: `ChatState`, `ScreenRenderer`, `PosixTerminal`, `TUIApp`, no dependency) was a chat with the local agent. It was removed with the agent (#31); the code is at tag `v0.1-agent`, `Sources/RazorbillTUI`. Since v0.2, razorbill is an OpenAI-compatible server, so what the TUI shows must be decided again. Candidates, to confirm with the user:
26+
27+ 1. **Chat client**: a full-screen chat talking to a running `rzb serve` (or any OpenAI-compatible URL) over HTTP: streaming, reasoning shown or folded, model picker from `/v1/models`, conversation kept client side.
28+ 2. **Server dashboard**: `rzb serve` in a TUI, or `rzb top` attached to a server: loaded models, queues, requests in flight, tokens/s, cached prompt tokens, memory pressure (#26), GPU load (#28). Needs a status endpoint the HTTP API does not have yet.
29+ 3. **Both**, as two screens of one `rzb tui`.
30+ 4. Something else.
31+
32+ ## Output
33+ The scope agreed with the user, what is reused from the v0.1 TUI layer, any new server endpoint, and the v0.4 tickets.
34+tasks:
35+ - id: 1
36+ title: "Clarify the scope with the user"
37+ state: open
38+ priority: high
39+ author:
40+ name: k33g
41+ email: ph.charriere@gmail.com
42+ createdAt: 2026-11-26T06:00:00.000Z
43+ - id: 2
44+ title: "Inventory the v0.1 TUI layer (tag v0.1-agent) and what can be reused"
45+ state: open
46+ priority: medium
47+ author:
48+ name: k33g
49+ email: ph.charriere@gmail.com
50+ createdAt: 2026-11-26T06:00:00.000Z
51+ - id: 3
52+ title: "Propose the screens, the commands and any server endpoint; write the v0.4 tickets"
53+ state: open
54+ priority: medium
55+ author:
56+ name: k33g
57+ email: ph.charriere@gmail.com
58+ createdAt: 2026-11-26T06:00:00.000Z
59+comments: []
new file mode 100644
@@ -0,0 +1,59 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 51
3+title: "Spike: what the v0.4 TUI is for, now that razorbill is a server"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-26T06:00:00.000Z
9+updatedAt: 2026-11-26T06:00:00.000Z
10+labels:
11+ - "spike"
12+ - "needs-decision"
13+ - "area::tui"
14+ - "priority::medium"
15+milestone: "v0.4 — TUI"
16+epic: "TUI mode"
17+related:
18+ - 16
19+ - 26
20+ - 28
21+ - 31
22+body: |
23+ Asked by the user (2026-11-26): "prépare aussi une v0.4 qui consistera à bosser sur la TUI".
24+
25+ The v0.1 TUI (`rzb tui`, own ANSI/termios layer: `ChatState`, `ScreenRenderer`, `PosixTerminal`, `TUIApp`, no dependency) was a chat with the local agent. It was removed with the agent (#31); the code is at tag `v0.1-agent`, `Sources/RazorbillTUI`. Since v0.2, razorbill is an OpenAI-compatible server, so what the TUI shows must be decided again. Candidates, to confirm with the user:
26+
27+ 1. **Chat client**: a full-screen chat talking to a running `rzb serve` (or any OpenAI-compatible URL) over HTTP: streaming, reasoning shown or folded, model picker from `/v1/models`, conversation kept client side.
28+ 2. **Server dashboard**: `rzb serve` in a TUI, or `rzb top` attached to a server: loaded models, queues, requests in flight, tokens/s, cached prompt tokens, memory pressure (#26), GPU load (#28). Needs a status endpoint the HTTP API does not have yet.
29+ 3. **Both**, as two screens of one `rzb tui`.
30+ 4. Something else.
31+
32+ ## Output
33+ The scope agreed with the user, what is reused from the v0.1 TUI layer, any new server endpoint, and the v0.4 tickets.
34+tasks:
35+ - id: 1
36+ title: "Clarify the scope with the user"
37+ state: open
38+ priority: high
39+ author:
40+ name: k33g
41+ email: ph.charriere@gmail.com
42+ createdAt: 2026-11-26T06:00:00.000Z
43+ - id: 2
44+ title: "Inventory the v0.1 TUI layer (tag v0.1-agent) and what can be reused"
45+ state: open
46+ priority: medium
47+ author:
48+ name: k33g
49+ email: ph.charriere@gmail.com
50+ createdAt: 2026-11-26T06:00:00.000Z
51+ - id: 3
52+ title: "Propose the screens, the commands and any server endpoint; write the v0.4 tickets"
53+ state: open
54+ priority: medium
55+ author:
56+ name: k33g
57+ email: ph.charriere@gmail.com
58+ createdAt: 2026-11-26T06:00:00.000Z
59+comments: []
added .tickets/issues/0052-sign-and-notarize-the-rzb-release.yaml +64 -0
new file mode 100644
@@ -0,0 +1,64 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 52
3+title: "Sign and notarize the rzb release (Developer ID)"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-26T06:00:00.000Z
9+updatedAt: 2026-11-26T06:00:00.000Z
10+labels:
11+ - "kind::feature"
12+ - "area::build"
13+ - "mac-only"
14+ - "priority::medium"
15+milestone: "v1.0.0"
16+epic: "Distribution"
17+related:
18+ - 50
19+body: |
20+ Planned by the user (2026-11-26) for 1.0.0: sign the binary.
21+
22+ Today (#50) `rzb` only carries the linker's ad-hoc signature: an archive downloaded with a browser is quarantined and Gatekeeper refuses to run it (`xattr -dr com.apple.quarantine` documented as the workaround).
23+
24+ ## To do
25+ - Developer ID Application certificate in the keychain, and notarytool credentials (`xcrun notarytool store-credentials`); the script reads the identity and the profile name from the environment, never secrets from the repository.
26+ - `codesign --force --options runtime --timestamp --sign "Developer ID Application: …" rzb`; the bundles hold resources only (metallib, plists, JSON) and are not code, to check.
27+ - Check MLX under the hardened runtime: Metal kernel compilation at run time, loading `default.metallib` from the bundle, Hugging Face downloads. Add entitlements only if something fails.
28+ - Notarize: `notarytool` accepts zip, pkg or dmg, not tar.gz. A bare executable cannot be stapled, so Gatekeeper checks online on first run; a signed `.pkg` (installs into e.g. `/usr/local/lib/razorbill` + a link in `/usr/local/bin`) can be stapled. Decide the format (zip, pkg, or Homebrew tap).
29+ - `scripts/release.sh --sign`: sign, notarize, staple when possible, verify (`codesign --verify --strict`, `spctl --assess`).
30+ - Docs: replace the quarantine workaround.
31+tasks:
32+ - id: 1
33+ title: "Decide the distribution format (zip, pkg, Homebrew)"
34+ state: open
35+ priority: high
36+ author:
37+ name: k33g
38+ email: ph.charriere@gmail.com
39+ createdAt: 2026-11-26T06:00:00.000Z
40+ - id: 2
41+ title: "Sign with the hardened runtime and check MLX still runs"
42+ state: open
43+ priority: high
44+ author:
45+ name: k33g
46+ email: ph.charriere@gmail.com
47+ createdAt: 2026-11-26T06:00:00.000Z
48+ - id: 3
49+ title: "Notarize (and staple if the format allows) from scripts/release.sh"
50+ state: open
51+ priority: medium
52+ author:
53+ name: k33g
54+ email: ph.charriere@gmail.com
55+ createdAt: 2026-11-26T06:00:00.000Z
56+ - id: 4
57+ title: "Update the install and release docs (EN + FR)"
58+ state: open
59+ priority: medium
60+ author:
61+ name: k33g
62+ email: ph.charriere@gmail.com
63+ createdAt: 2026-11-26T06:00:00.000Z
64+comments: []
new file mode 100644
@@ -0,0 +1,64 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 52
3+title: "Sign and notarize the rzb release (Developer ID)"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-26T06:00:00.000Z
9+updatedAt: 2026-11-26T06:00:00.000Z
10+labels:
11+ - "kind::feature"
12+ - "area::build"
13+ - "mac-only"
14+ - "priority::medium"
15+milestone: "v1.0.0"
16+epic: "Distribution"
17+related:
18+ - 50
19+body: |
20+ Planned by the user (2026-11-26) for 1.0.0: sign the binary.
21+
22+ Today (#50) `rzb` only carries the linker's ad-hoc signature: an archive downloaded with a browser is quarantined and Gatekeeper refuses to run it (`xattr -dr com.apple.quarantine` documented as the workaround).
23+
24+ ## To do
25+ - Developer ID Application certificate in the keychain, and notarytool credentials (`xcrun notarytool store-credentials`); the script reads the identity and the profile name from the environment, never secrets from the repository.
26+ - `codesign --force --options runtime --timestamp --sign "Developer ID Application: …" rzb`; the bundles hold resources only (metallib, plists, JSON) and are not code, to check.
27+ - Check MLX under the hardened runtime: Metal kernel compilation at run time, loading `default.metallib` from the bundle, Hugging Face downloads. Add entitlements only if something fails.
28+ - Notarize: `notarytool` accepts zip, pkg or dmg, not tar.gz. A bare executable cannot be stapled, so Gatekeeper checks online on first run; a signed `.pkg` (installs into e.g. `/usr/local/lib/razorbill` + a link in `/usr/local/bin`) can be stapled. Decide the format (zip, pkg, or Homebrew tap).
29+ - `scripts/release.sh --sign`: sign, notarize, staple when possible, verify (`codesign --verify --strict`, `spctl --assess`).
30+ - Docs: replace the quarantine workaround.
31+tasks:
32+ - id: 1
33+ title: "Decide the distribution format (zip, pkg, Homebrew)"
34+ state: open
35+ priority: high
36+ author:
37+ name: k33g
38+ email: ph.charriere@gmail.com
39+ createdAt: 2026-11-26T06:00:00.000Z
40+ - id: 2
41+ title: "Sign with the hardened runtime and check MLX still runs"
42+ state: open
43+ priority: high
44+ author:
45+ name: k33g
46+ email: ph.charriere@gmail.com
47+ createdAt: 2026-11-26T06:00:00.000Z
48+ - id: 3
49+ title: "Notarize (and staple if the format allows) from scripts/release.sh"
50+ state: open
51+ priority: medium
52+ author:
53+ name: k33g
54+ email: ph.charriere@gmail.com
55+ createdAt: 2026-11-26T06:00:00.000Z
56+ - id: 4
57+ title: "Update the install and release docs (EN + FR)"
58+ state: open
59+ priority: medium
60+ author:
61+ name: k33g
62+ email: ph.charriere@gmail.com
63+ createdAt: 2026-11-26T06:00:00.000Z
64+comments: []
modified .tickets/milestones.yaml +7 -1
@@ -6,8 +6,14 @@ milestones:
66 First usable razorbill: an agent configured by a YAML file, loading its own MLX
77 models, usable in CLI and TUI modes, easy to extend.
88 - title: "v0.2 — OpenAI-compatible MLX server"
9- state: open
9+ state: closed
1010 description: "razorbill becomes a model server dedicated to MLX (like Ollama / llama-server, Apple Silicon only) exposing an OpenAI-compatible API: chat completions (streaming, reasoning), structured output, function calling, embeddings."
1111 - title: "v0.3 — Decision models"
1212 state: open
1313 description: "Decision models served by the same server — scope to be defined by the spike #46."
14+ - title: "v0.4 — TUI"
15+ state: open
16+ description: "A terminal UI again, for the server era: chat client, server dashboard or both — scope to be defined by the spike #51."
17+ - title: "v1.0.0"
18+ state: open
19+ description: "First stable release: signed and notarized rzb (#52)."
@@ -6,8 +6,14 @@ milestones:
6 First usable razorbill: an agent configured by a YAML file, loading its own MLX6 First usable razorbill: an agent configured by a YAML file, loading its own MLX
7 models, usable in CLI and TUI modes, easy to extend.7 models, usable in CLI and TUI modes, easy to extend.
8 - title: "v0.2 — OpenAI-compatible MLX server"8 - title: "v0.2 — OpenAI-compatible MLX server"
9- state: open9+ state: closed
10 description: "razorbill becomes a model server dedicated to MLX (like Ollama / llama-server, Apple Silicon only) exposing an OpenAI-compatible API: chat completions (streaming, reasoning), structured output, function calling, embeddings."10 description: "razorbill becomes a model server dedicated to MLX (like Ollama / llama-server, Apple Silicon only) exposing an OpenAI-compatible API: chat completions (streaming, reasoning), structured output, function calling, embeddings."
11 - title: "v0.3 — Decision models"11 - title: "v0.3 — Decision models"
12 state: open12 state: open
13 description: "Decision models served by the same server — scope to be defined by the spike #46."13 description: "Decision models served by the same server — scope to be defined by the spike #46."
14+ - title: "v0.4 — TUI"
15+ state: open
16+ description: "A terminal UI again, for the server era: chat client, server dashboard or both — scope to be defined by the spike #51."
17+ - title: "v1.0.0"
18+ state: open
19+ description: "First stable release: signed and notarized rzb (#52)."
modified README.md +3 -1
@@ -84,11 +84,13 @@ xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration
8484 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation
8585
8686 .build/xcode/Build/Products/Release/rzb version
87-# rzb 0.1.0 (engines: fake, mlx)
87+# rzb 0.2.0 (engines: fake, mlx)
8888 ```
8989
9090 The first build downloads and compiles the dependencies and takes several minutes. Run `rzb` from `Build/Products/Release`: the MLX Metal library (`mlx-swift_Cmlx.bundle`) sits next to it.
9191
92+`scripts/release.sh` builds and packages a release archive (`dist/razorbill-<version>-macos-arm64.tar.gz`): see [Package a release](docs/en/how-to/package-a-release.md).
93+
9294 ## Run the tests
9395
9496 ```bash
@@ -84,11 +84,13 @@ xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration
84 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation84 -derivedDataPath .build/xcode -skipPackagePluginValidation -skipMacroValidation
85 85
86 .build/xcode/Build/Products/Release/rzb version86 .build/xcode/Build/Products/Release/rzb version
87-# rzb 0.1.0 (engines: fake, mlx)87+# rzb 0.2.0 (engines: fake, mlx)
88 ```88 ```
89 89
90 The first build downloads and compiles the dependencies and takes several minutes. Run `rzb` from `Build/Products/Release`: the MLX Metal library (`mlx-swift_Cmlx.bundle`) sits next to it.90 The first build downloads and compiles the dependencies and takes several minutes. Run `rzb` from `Build/Products/Release`: the MLX Metal library (`mlx-swift_Cmlx.bundle`) sits next to it.
91 91
92+`scripts/release.sh` builds and packages a release archive (`dist/razorbill-<version>-macos-arm64.tar.gz`): see [Package a release](docs/en/how-to/package-a-release.md).
93+
92 ## Run the tests94 ## Run the tests
93 95
94 ```bash96 ```bash
modified Sources/RazorbillCLI/Commands/VersionCommand.swift +1 -1
@@ -11,7 +11,7 @@ struct VersionCommand: AsyncParsableCommand {
1111 environment.console.write(Self.line(engines: environment.engines.names) + "\n")
1212 }
1313
14- /// `rzb 0.1.0 (engines: fake, mlx)`
14+ /// `rzb 0.2.0 (engines: fake, mlx)`
1515 static func line(engines: [String]) -> String {
1616 let list = engines.isEmpty ? "none" : engines.joined(separator: ", ")
1717 return "\(Razorbill.commandName) \(Razorbill.version) (engines: \(list))"
@@ -11,7 +11,7 @@ struct VersionCommand: AsyncParsableCommand {
11 environment.console.write(Self.line(engines: environment.engines.names) + "\n")11 environment.console.write(Self.line(engines: environment.engines.names) + "\n")
12 }12 }
13 13
14- /// `rzb 0.1.0 (engines: fake, mlx)`14+ /// `rzb 0.2.0 (engines: fake, mlx)`
15 static func line(engines: [String]) -> String {15 static func line(engines: [String]) -> String {
16 let list = engines.isEmpty ? "none" : engines.joined(separator: ", ")16 let list = engines.isEmpty ? "none" : engines.joined(separator: ", ")
17 return "\(Razorbill.commandName) \(Razorbill.version) (engines: \(list))"17 return "\(Razorbill.commandName) \(Razorbill.version) (engines: \(list))"
modified Sources/RazorbillCore/Razorbill.swift +2 -2
@@ -1,11 +1,11 @@
11 /// Identity of razorbill.
22 ///
33 /// ```swift
4-/// print("\(Razorbill.commandName) \(Razorbill.version)") // "rzb 0.1.0"
4+/// print("\(Razorbill.commandName) \(Razorbill.version)") // "rzb 0.2.0"
55 /// ```
66 public enum Razorbill {
77 /// Semantic version of razorbill.
8- public static let version = "0.1.0"
8+ public static let version = "0.2.0"
99
1010 /// Name of the command-line executable.
1111 public static let commandName = "rzb"
@@ -1,11 +1,11 @@
1 /// Identity of razorbill.1 /// Identity of razorbill.
2 ///2 ///
3 /// ```swift3 /// ```swift
4-/// print("\(Razorbill.commandName) \(Razorbill.version)") // "rzb 0.1.0"4+/// print("\(Razorbill.commandName) \(Razorbill.version)") // "rzb 0.2.0"
5 /// ```5 /// ```
6 public enum Razorbill {6 public enum Razorbill {
7 /// Semantic version of razorbill.7 /// Semantic version of razorbill.
8- public static let version = "0.1.0"8+ public static let version = "0.2.0"
9 9
10 /// Name of the command-line executable.10 /// Name of the command-line executable.
11 public static let commandName = "rzb"11 public static let commandName = "rzb"
modified Tests/RazorbillCLITests/OtherCommandsTests.swift +2 -2
@@ -63,8 +63,8 @@ import Testing
6363
6464 @Suite struct SmallPieces {
6565 @Test func versionListsTheEngines() async throws {
66- #expect(VersionCommand.line(engines: ["fake", "mlx"]) == "rzb 0.1.0 (engines: fake, mlx)")
67- #expect((await (try World()).rzb("version")).stdout == "rzb 0.1.0 (engines: fake)\n")
66+ #expect(VersionCommand.line(engines: ["fake", "mlx"]) == "rzb 0.2.0 (engines: fake, mlx)")
67+ #expect((await (try World()).rzb("version")).stdout == "rzb 0.2.0 (engines: fake)\n")
6868 }
6969
7070 @Test func downloadProgressPrintsEveryTenPercentWithoutColours() {
@@ -63,8 +63,8 @@ import Testing
63 63
64 @Suite struct SmallPieces {64 @Suite struct SmallPieces {
65 @Test func versionListsTheEngines() async throws {65 @Test func versionListsTheEngines() async throws {
66- #expect(VersionCommand.line(engines: ["fake", "mlx"]) == "rzb 0.1.0 (engines: fake, mlx)")66+ #expect(VersionCommand.line(engines: ["fake", "mlx"]) == "rzb 0.2.0 (engines: fake, mlx)")
67- #expect((await (try World()).rzb("version")).stdout == "rzb 0.1.0 (engines: fake)\n")67+ #expect((await (try World()).rzb("version")).stdout == "rzb 0.2.0 (engines: fake)\n")
68 }68 }
69 69
70 @Test func downloadProgressPrintsEveryTenPercentWithoutColours() {70 @Test func downloadProgressPrintsEveryTenPercentWithoutColours() {
modified docs/en/README.md +1 -0
@@ -11,6 +11,7 @@ This documentation follows [Diátaxis](https://diataxis.fr): pick the section th
1111 ## Do — how-to guides
1212
1313 - [Build rzb on the Mac](how-to/build-on-the-mac.md)
14+- [Package a release](how-to/package-a-release.md): the `.tar.gz` archive and its checksum.
1415 - [Manage models](how-to/manage-models.md)
1516 - [Configure the server](how-to/configure-the-server.md): model names, defaults, locks, limits, network access.
1617 - [Use razorbill from an OpenAI client](how-to/use-openai-clients.md): Python, JavaScript, LangChain, chat UIs.
@@ -11,6 +11,7 @@ This documentation follows [Diátaxis](https://diataxis.fr): pick the section th
11 ## Do — how-to guides11 ## Do — how-to guides
12 12
13 - [Build rzb on the Mac](how-to/build-on-the-mac.md)13 - [Build rzb on the Mac](how-to/build-on-the-mac.md)
14+- [Package a release](how-to/package-a-release.md): the `.tar.gz` archive and its checksum.
14 - [Manage models](how-to/manage-models.md)15 - [Manage models](how-to/manage-models.md)
15 - [Configure the server](how-to/configure-the-server.md): model names, defaults, locks, limits, network access.16 - [Configure the server](how-to/configure-the-server.md): model names, defaults, locks, limits, network access.
16 - [Use razorbill from an OpenAI client](how-to/use-openai-clients.md): Python, JavaScript, LangChain, chat UIs.17 - [Use razorbill from an OpenAI client](how-to/use-openai-clients.md): Python, JavaScript, LangChain, chat UIs.
modified docs/en/how-to/build-on-the-mac.md +2 -1
@@ -25,13 +25,14 @@ The executable is `.build/xcode/Build/Products/Release/rzb`. Keep it in that fol
2525
2626 ```bash
2727 .build/xcode/Build/Products/Release/rzb version
28-# rzb 0.1.0 (engines: fake, mlx)
28+# rzb 0.2.0 (engines: fake, mlx)
2929 ```
3030
3131 ## Variants
3232
3333 - **Debug build**: replace `-configuration Release` with `-configuration Debug`; the executable is then in `Build/Products/Debug`. Generation is much slower.
3434 - **List the schemes**: `xcodebuild -list`. The package has a single scheme, `razorbill`; `rzb` and `razorbill-Package` do not exist.
35+- **Archive to distribute**: see [Package a release](package-a-release.md).
3536 - **From a Linux sandbox**: see [Develop from a Linux sandbox](develop-from-a-sandbox.md).
3637
3738 ## Troubleshooting
@@ -25,13 +25,14 @@ The executable is `.build/xcode/Build/Products/Release/rzb`. Keep it in that fol
25 25
26 ```bash26 ```bash
27 .build/xcode/Build/Products/Release/rzb version27 .build/xcode/Build/Products/Release/rzb version
28-# rzb 0.1.0 (engines: fake, mlx)28+# rzb 0.2.0 (engines: fake, mlx)
29 ```29 ```
30 30
31 ## Variants31 ## Variants
32 32
33 - **Debug build**: replace `-configuration Release` with `-configuration Debug`; the executable is then in `Build/Products/Debug`. Generation is much slower.33 - **Debug build**: replace `-configuration Release` with `-configuration Debug`; the executable is then in `Build/Products/Debug`. Generation is much slower.
34 - **List the schemes**: `xcodebuild -list`. The package has a single scheme, `razorbill`; `rzb` and `razorbill-Package` do not exist.34 - **List the schemes**: `xcodebuild -list`. The package has a single scheme, `razorbill`; `rzb` and `razorbill-Package` do not exist.
35+- **Archive to distribute**: see [Package a release](package-a-release.md).
35 - **From a Linux sandbox**: see [Develop from a Linux sandbox](develop-from-a-sandbox.md).36 - **From a Linux sandbox**: see [Develop from a Linux sandbox](develop-from-a-sandbox.md).
36 37
37 ## Troubleshooting38 ## Troubleshooting
added docs/en/how-to/package-a-release.md +44 -0
new file mode 100644
@@ -0,0 +1,44 @@
1+# How to package a release
2+
3+This guide builds the release archive of razorbill: `rzb` and the resource bundles it needs, in one `.tar.gz` with its SHA-256. It assumes you can already [build rzb on the Mac](build-on-the-mac.md).
4+
5+## Steps
6+
7+1. Set the version in `Sources/RazorbillCore/Razorbill.swift` (`static let version = "…"`), update the version shown in the docs, and commit. The script refuses uncommitted changes.
8+2. From the repository root, on the Mac:
9+
10+ ```bash
11+ scripts/release.sh
12+ ```
13+
14+ It builds in Release into `.build/release` (a folder of its own, so the first run compiles everything again), packages the build, unpacks the archive in a temporary folder and checks that the unpacked `rzb --version` prints the version. It ends by printing the archive and its checksum:
15+
16+ ```
17+ dist/razorbill-0.2.0-macos-arm64.tar.gz
18+ <sha256> razorbill-0.2.0-macos-arm64.tar.gz
19+ ```
20+
21+3. Check the server from the archive before publishing it, for example by unpacking it elsewhere and running `rzb serve` with a model.
22+4. Tag the commit (`git tag -a v0.2.0 -m "razorbill 0.2.0"`) and publish `dist/razorbill-<version>-macos-arm64.tar.gz` with its `.sha256` file.
23+
24+## What the archive holds
25+
26+| Entry | Role |
27+| --- | --- |
28+| `rzb` | The executable (Apple Silicon, macOS 14 or later). |
29+| `mlx-swift_Cmlx.bundle` | The MLX Metal library (`default.metallib`); without it no model loads. |
30+| `swift-transformers_Hub.bundle`, `swift-nio_*.bundle`, `swift-crypto_Crypto.bundle` | The other resource bundles of the dependencies. The script copies every `*.bundle` of the build. |
31+| `INSTALL.txt` | Where to put the folder, how to add it to `PATH`, how to clear the quarantine. |
32+
33+The bundles must stay next to `rzb`: put the whole folder on `PATH` rather than copying `rzb` alone into `/usr/local/bin`.
34+
35+## Variants
36+
37+- **Package a build you already have**: `scripts/release.sh --products .build/xcode/Build/Products/Release` skips the build. This also works from Linux, where the final `rzb --version` check is skipped.
38+- **Test archive from uncommitted work**: add `--allow-dirty`. Do not publish such an archive.
39+- **Downloaded with a browser**: macOS quarantines the archive and refuses to run `rzb`, which is signed ad hoc only. Clear it with `xattr -dr com.apple.quarantine <folder>`. Developer ID signing and notarization are planned for 1.0.0.
40+
41+## See also
42+
43+- [Build rzb on the Mac](build-on-the-mac.md)
44+- [Run the tests](run-the-tests.md), to run before a release.
new file mode 100644
@@ -0,0 +1,44 @@
1+# How to package a release
2+
3+This guide builds the release archive of razorbill: `rzb` and the resource bundles it needs, in one `.tar.gz` with its SHA-256. It assumes you can already [build rzb on the Mac](build-on-the-mac.md).
4+
5+## Steps
6+
7+1. Set the version in `Sources/RazorbillCore/Razorbill.swift` (`static let version = "…"`), update the version shown in the docs, and commit. The script refuses uncommitted changes.
8+2. From the repository root, on the Mac:
9+
10+ ```bash
11+ scripts/release.sh
12+ ```
13+
14+ It builds in Release into `.build/release` (a folder of its own, so the first run compiles everything again), packages the build, unpacks the archive in a temporary folder and checks that the unpacked `rzb --version` prints the version. It ends by printing the archive and its checksum:
15+
16+ ```
17+ dist/razorbill-0.2.0-macos-arm64.tar.gz
18+ <sha256> razorbill-0.2.0-macos-arm64.tar.gz
19+ ```
20+
21+3. Check the server from the archive before publishing it, for example by unpacking it elsewhere and running `rzb serve` with a model.
22+4. Tag the commit (`git tag -a v0.2.0 -m "razorbill 0.2.0"`) and publish `dist/razorbill-<version>-macos-arm64.tar.gz` with its `.sha256` file.
23+
24+## What the archive holds
25+
26+| Entry | Role |
27+| --- | --- |
28+| `rzb` | The executable (Apple Silicon, macOS 14 or later). |
29+| `mlx-swift_Cmlx.bundle` | The MLX Metal library (`default.metallib`); without it no model loads. |
30+| `swift-transformers_Hub.bundle`, `swift-nio_*.bundle`, `swift-crypto_Crypto.bundle` | The other resource bundles of the dependencies. The script copies every `*.bundle` of the build. |
31+| `INSTALL.txt` | Where to put the folder, how to add it to `PATH`, how to clear the quarantine. |
32+
33+The bundles must stay next to `rzb`: put the whole folder on `PATH` rather than copying `rzb` alone into `/usr/local/bin`.
34+
35+## Variants
36+
37+- **Package a build you already have**: `scripts/release.sh --products .build/xcode/Build/Products/Release` skips the build. This also works from Linux, where the final `rzb --version` check is skipped.
38+- **Test archive from uncommitted work**: add `--allow-dirty`. Do not publish such an archive.
39+- **Downloaded with a browser**: macOS quarantines the archive and refuses to run `rzb`, which is signed ad hoc only. Clear it with `xattr -dr com.apple.quarantine <folder>`. Developer ID signing and notarization are planned for 1.0.0.
40+
41+## See also
42+
43+- [Build rzb on the Mac](build-on-the-mac.md)
44+- [Run the tests](run-the-tests.md), to run before a release.
modified docs/en/reference/cli.md +3 -3
@@ -1,6 +1,6 @@
11 # Reference: command line
22
3-> Every `rzb` command, option and exit code of razorbill 0.1.0.
3+> Every `rzb` command, option and exit code of razorbill 0.2.0.
44
55 ```
66 rzb <command> [options]
@@ -35,7 +35,7 @@ Options win over the `server:` section of the file. On start it prints, on stand
3535
3636 ```
3737 config: server.yaml (2 declared models)
38-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop
38+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop
3939 ```
4040
4141 The first line appears only with `--config`. Warnings (`warning: …`) are printed before the banner when the server listens on a network address without an API key, or allows every CORS origin without one. Then one log line per request: method, path, status, duration, and the model and token counts (`model=… tokens=<prompt>+<completion>`, plus `cached=<n>` when part of the prompt was reused from the previous request); prompts and answers are never logged.
@@ -62,7 +62,7 @@ The cache is `$HF_HUB_CACHE`, else `$HF_HOME/hub`, else `~/.cache/huggingface/hu
6262
6363 ## rzb version
6464
65-Prints `rzb 0.1.0 (engines: fake, mlx)` (the engines of this build, sorted). `rzb --version` prints `0.1.0`.
65+Prints `rzb 0.2.0 (engines: fake, mlx)` (the engines of this build, sorted). `rzb --version` prints `0.2.0`.
6666
6767 ## Exit codes
6868
@@ -1,6 +1,6 @@
1 # Reference: command line1 # Reference: command line
2 2
3-> Every `rzb` command, option and exit code of razorbill 0.1.0.3+> Every `rzb` command, option and exit code of razorbill 0.2.0.
4 4
5 ```5 ```
6 rzb <command> [options]6 rzb <command> [options]
@@ -35,7 +35,7 @@ Options win over the `server:` section of the file. On start it prints, on stand
35 35
36 ```36 ```
37 config: server.yaml (2 declared models)37 config: server.yaml (2 declared models)
38-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop38+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop
39 ```39 ```
40 40
41 The first line appears only with `--config`. Warnings (`warning: …`) are printed before the banner when the server listens on a network address without an API key, or allows every CORS origin without one. Then one log line per request: method, path, status, duration, and the model and token counts (`model=… tokens=<prompt>+<completion>`, plus `cached=<n>` when part of the prompt was reused from the previous request); prompts and answers are never logged.41 The first line appears only with `--config`. Warnings (`warning: …`) are printed before the banner when the server listens on a network address without an API key, or allows every CORS origin without one. Then one log line per request: method, path, status, duration, and the model and token counts (`model=… tokens=<prompt>+<completion>`, plus `cached=<n>` when part of the prompt was reused from the previous request); prompts and answers are never logged.
@@ -62,7 +62,7 @@ The cache is `$HF_HUB_CACHE`, else `$HF_HOME/hub`, else `~/.cache/huggingface/hu
62 62
63 ## rzb version63 ## rzb version
64 64
65-Prints `rzb 0.1.0 (engines: fake, mlx)` (the engines of this build, sorted). `rzb --version` prints `0.1.0`.65+Prints `rzb 0.2.0 (engines: fake, mlx)` (the engines of this build, sorted). `rzb --version` prints `0.2.0`.
66 66
67 ## Exit codes67 ## Exit codes
68 68
modified docs/en/tutorials/getting-started.md +1 -1
@@ -43,7 +43,7 @@ rzb serve
4343 You should see:
4444
4545 ```
46-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop
46+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop
4747 ```
4848
4949 The server is running and only accepts connections from this Mac. Leave this terminal open, and **open a second terminal** for the next steps.
@@ -43,7 +43,7 @@ rzb serve
43 You should see:43 You should see:
44 44
45 ```45 ```
46-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop46+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop
47 ```47 ```
48 48
49 The server is running and only accepts connections from this Mac. Leave this terminal open, and **open a second terminal** for the next steps.49 The server is running and only accepts connections from this Mac. Leave this terminal open, and **open a second terminal** for the next steps.
modified docs/fr/README.md +1 -0
@@ -11,6 +11,7 @@ Cette documentation suit [Diátaxis](https://diataxis.fr) : choisissez la sectio
1111 ## Faire — guides pratiques
1212
1313 - [Compiler rzb sur le Mac](how-to/compiler-sur-le-mac.md)
14+- [Préparer une archive de release](how-to/preparer-une-release.md) : l'archive `.tar.gz` et son empreinte.
1415 - [Gérer les modèles](how-to/gerer-les-modeles.md)
1516 - [Configurer le serveur](how-to/configurer-le-serveur.md) : noms de modèles, valeurs par défaut, verrous, limites, accès réseau.
1617 - [Utiliser razorbill depuis un client OpenAI](how-to/utiliser-des-clients-openai.md) : Python, JavaScript, LangChain, interfaces de chat.
@@ -11,6 +11,7 @@ Cette documentation suit [Diátaxis](https://diataxis.fr) : choisissez la sectio
11 ## Faire — guides pratiques11 ## Faire — guides pratiques
12 12
13 - [Compiler rzb sur le Mac](how-to/compiler-sur-le-mac.md)13 - [Compiler rzb sur le Mac](how-to/compiler-sur-le-mac.md)
14+- [Préparer une archive de release](how-to/preparer-une-release.md) : l'archive `.tar.gz` et son empreinte.
14 - [Gérer les modèles](how-to/gerer-les-modeles.md)15 - [Gérer les modèles](how-to/gerer-les-modeles.md)
15 - [Configurer le serveur](how-to/configurer-le-serveur.md) : noms de modèles, valeurs par défaut, verrous, limites, accès réseau.16 - [Configurer le serveur](how-to/configurer-le-serveur.md) : noms de modèles, valeurs par défaut, verrous, limites, accès réseau.
16 - [Utiliser razorbill depuis un client OpenAI](how-to/utiliser-des-clients-openai.md) : Python, JavaScript, LangChain, interfaces de chat.17 - [Utiliser razorbill depuis un client OpenAI](how-to/utiliser-des-clients-openai.md) : Python, JavaScript, LangChain, interfaces de chat.
modified docs/fr/how-to/compiler-sur-le-mac.md +2 -1
@@ -25,13 +25,14 @@ L'exécutable est `.build/xcode/Build/Products/Release/rzb`. Laissez-le dans ce
2525
2626 ```bash
2727 .build/xcode/Build/Products/Release/rzb version
28-# rzb 0.1.0 (engines: fake, mlx)
28+# rzb 0.2.0 (engines: fake, mlx)
2929 ```
3030
3131 ## Variantes
3232
3333 - **Compilation Debug** : remplacez `-configuration Release` par `-configuration Debug` ; l'exécutable est alors dans `Build/Products/Debug`. La génération est beaucoup plus lente.
3434 - **Lister les schemes** : `xcodebuild -list`. Le package n'a qu'un scheme, `razorbill` ; `rzb` et `razorbill-Package` n'existent pas.
35+- **Archive à distribuer** : voir [Préparer une archive de release](preparer-une-release.md).
3536 - **Depuis une sandbox Linux** : voir [Développer depuis une sandbox Linux](developper-depuis-une-sandbox.md).
3637
3738 ## En cas de problème
@@ -25,13 +25,14 @@ L'exécutable est `.build/xcode/Build/Products/Release/rzb`. Laissez-le dans ce
25 25
26 ```bash26 ```bash
27 .build/xcode/Build/Products/Release/rzb version27 .build/xcode/Build/Products/Release/rzb version
28-# rzb 0.1.0 (engines: fake, mlx)28+# rzb 0.2.0 (engines: fake, mlx)
29 ```29 ```
30 30
31 ## Variantes31 ## Variantes
32 32
33 - **Compilation Debug** : remplacez `-configuration Release` par `-configuration Debug` ; l'exécutable est alors dans `Build/Products/Debug`. La génération est beaucoup plus lente.33 - **Compilation Debug** : remplacez `-configuration Release` par `-configuration Debug` ; l'exécutable est alors dans `Build/Products/Debug`. La génération est beaucoup plus lente.
34 - **Lister les schemes** : `xcodebuild -list`. Le package n'a qu'un scheme, `razorbill` ; `rzb` et `razorbill-Package` n'existent pas.34 - **Lister les schemes** : `xcodebuild -list`. Le package n'a qu'un scheme, `razorbill` ; `rzb` et `razorbill-Package` n'existent pas.
35+- **Archive à distribuer** : voir [Préparer une archive de release](preparer-une-release.md).
35 - **Depuis une sandbox Linux** : voir [Développer depuis une sandbox Linux](developper-depuis-une-sandbox.md).36 - **Depuis une sandbox Linux** : voir [Développer depuis une sandbox Linux](developper-depuis-une-sandbox.md).
36 37
37 ## En cas de problème38 ## En cas de problème
added docs/fr/how-to/preparer-une-release.md +44 -0
new file mode 100644
@@ -0,0 +1,44 @@
1+# Préparer une archive de release
2+
3+Ce guide fabrique l'archive de release de razorbill : `rzb` et les bundles de ressources dont il a besoin, dans un seul `.tar.gz` accompagné de son SHA-256. Il suppose que vous savez déjà [compiler rzb sur le Mac](compiler-sur-le-mac.md).
4+
5+## Étapes
6+
7+1. Fixez la version dans `Sources/RazorbillCore/Razorbill.swift` (`static let version = "…"`), mettez à jour la version affichée dans la documentation, puis committez. Le script refuse les modifications non committées.
8+2. Depuis la racine du dépôt, sur le Mac :
9+
10+ ```bash
11+ scripts/release.sh
12+ ```
13+
14+ Il compile en Release dans `.build/release` (un dossier à part : la première fois, tout est recompilé), assemble l'archive, la décompresse dans un dossier temporaire et vérifie que le `rzb --version` décompressé affiche la version. Il termine en affichant l'archive et son empreinte :
15+
16+ ```
17+ dist/razorbill-0.2.0-macos-arm64.tar.gz
18+ <sha256> razorbill-0.2.0-macos-arm64.tar.gz
19+ ```
20+
21+3. Vérifiez le serveur depuis l'archive avant de la publier, par exemple en la décompressant ailleurs et en lançant `rzb serve` avec un modèle.
22+4. Étiquetez le commit (`git tag -a v0.2.0 -m "razorbill 0.2.0"`) et publiez `dist/razorbill-<version>-macos-arm64.tar.gz` avec son fichier `.sha256`.
23+
24+## Contenu de l'archive
25+
26+| Élément | Rôle |
27+| --- | --- |
28+| `rzb` | L'exécutable (Apple Silicon, macOS 14 ou plus récent). |
29+| `mlx-swift_Cmlx.bundle` | La bibliothèque Metal de MLX (`default.metallib`) ; sans elle, aucun modèle ne se charge. |
30+| `swift-transformers_Hub.bundle`, `swift-nio_*.bundle`, `swift-crypto_Crypto.bundle` | Les autres bundles de ressources des dépendances. Le script copie tous les `*.bundle` de la compilation. |
31+| `INSTALL.txt` | Où placer le dossier, comment l'ajouter au `PATH`, comment lever la quarantaine. |
32+
33+Les bundles doivent rester à côté de `rzb` : mettez le dossier entier dans le `PATH` plutôt que de copier `rzb` seul dans `/usr/local/bin`.
34+
35+## Variantes
36+
37+- **Assembler une compilation existante** : `scripts/release.sh --products .build/xcode/Build/Products/Release` saute la compilation. Cela fonctionne aussi depuis Linux, où la vérification finale `rzb --version` est sautée.
38+- **Archive de test avec des modifications non committées** : ajoutez `--allow-dirty`. Ne publiez pas une telle archive.
39+- **Archive téléchargée avec un navigateur** : macOS la met en quarantaine et refuse de lancer `rzb`, qui n'a qu'une signature ad hoc. Levez la quarantaine avec `xattr -dr com.apple.quarantine <dossier>`. La signature Developer ID et la notarisation sont prévues pour la 1.0.0.
40+
41+## Voir aussi
42+
43+- [Compiler rzb sur le Mac](compiler-sur-le-mac.md)
44+- [Lancer les tests](lancer-les-tests.md), à faire avant une release.
new file mode 100644
@@ -0,0 +1,44 @@
1+# Préparer une archive de release
2+
3+Ce guide fabrique l'archive de release de razorbill : `rzb` et les bundles de ressources dont il a besoin, dans un seul `.tar.gz` accompagné de son SHA-256. Il suppose que vous savez déjà [compiler rzb sur le Mac](compiler-sur-le-mac.md).
4+
5+## Étapes
6+
7+1. Fixez la version dans `Sources/RazorbillCore/Razorbill.swift` (`static let version = "…"`), mettez à jour la version affichée dans la documentation, puis committez. Le script refuse les modifications non committées.
8+2. Depuis la racine du dépôt, sur le Mac :
9+
10+ ```bash
11+ scripts/release.sh
12+ ```
13+
14+ Il compile en Release dans `.build/release` (un dossier à part : la première fois, tout est recompilé), assemble l'archive, la décompresse dans un dossier temporaire et vérifie que le `rzb --version` décompressé affiche la version. Il termine en affichant l'archive et son empreinte :
15+
16+ ```
17+ dist/razorbill-0.2.0-macos-arm64.tar.gz
18+ <sha256> razorbill-0.2.0-macos-arm64.tar.gz
19+ ```
20+
21+3. Vérifiez le serveur depuis l'archive avant de la publier, par exemple en la décompressant ailleurs et en lançant `rzb serve` avec un modèle.
22+4. Étiquetez le commit (`git tag -a v0.2.0 -m "razorbill 0.2.0"`) et publiez `dist/razorbill-<version>-macos-arm64.tar.gz` avec son fichier `.sha256`.
23+
24+## Contenu de l'archive
25+
26+| Élément | Rôle |
27+| --- | --- |
28+| `rzb` | L'exécutable (Apple Silicon, macOS 14 ou plus récent). |
29+| `mlx-swift_Cmlx.bundle` | La bibliothèque Metal de MLX (`default.metallib`) ; sans elle, aucun modèle ne se charge. |
30+| `swift-transformers_Hub.bundle`, `swift-nio_*.bundle`, `swift-crypto_Crypto.bundle` | Les autres bundles de ressources des dépendances. Le script copie tous les `*.bundle` de la compilation. |
31+| `INSTALL.txt` | Où placer le dossier, comment l'ajouter au `PATH`, comment lever la quarantaine. |
32+
33+Les bundles doivent rester à côté de `rzb` : mettez le dossier entier dans le `PATH` plutôt que de copier `rzb` seul dans `/usr/local/bin`.
34+
35+## Variantes
36+
37+- **Assembler une compilation existante** : `scripts/release.sh --products .build/xcode/Build/Products/Release` saute la compilation. Cela fonctionne aussi depuis Linux, où la vérification finale `rzb --version` est sautée.
38+- **Archive de test avec des modifications non committées** : ajoutez `--allow-dirty`. Ne publiez pas une telle archive.
39+- **Archive téléchargée avec un navigateur** : macOS la met en quarantaine et refuse de lancer `rzb`, qui n'a qu'une signature ad hoc. Levez la quarantaine avec `xattr -dr com.apple.quarantine <dossier>`. La signature Developer ID et la notarisation sont prévues pour la 1.0.0.
40+
41+## Voir aussi
42+
43+- [Compiler rzb sur le Mac](compiler-sur-le-mac.md)
44+- [Lancer les tests](lancer-les-tests.md), à faire avant une release.
modified docs/fr/reference/ligne-de-commande.md +3 -3
@@ -1,6 +1,6 @@
11 # Référence : ligne de commande
22
3-> Chaque commande, option et code de sortie de `rzb`, pour razorbill 0.1.0.
3+> Chaque commande, option et code de sortie de `rzb`, pour razorbill 0.2.0.
44
55 ```
66 rzb <commande> [options]
@@ -35,7 +35,7 @@ Les options l'emportent sur la section `server:` du fichier. Au démarrage, il a
3535
3636 ```
3737 config: server.yaml (2 declared models)
38-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop
38+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop
3939 ```
4040
4141 La première ligne n'apparaît qu'avec `--config`. Des avertissements (`warning: …`) précèdent la bannière quand le serveur écoute sur une adresse réseau sans clé d'API, ou autorise toutes les origines CORS sans clé. Ensuite, une ligne de journal par requête : méthode, chemin, statut, durée, et le modèle et les nombres de tokens (`model=… tokens=<prompt>+<complétion>`, plus `cached=<n>` quand une partie du prompt a été reprise de la requête précédente) ; les prompts et les réponses ne sont jamais journalisés.
@@ -62,7 +62,7 @@ Le cache est `$HF_HUB_CACHE`, sinon `$HF_HOME/hub`, sinon `~/.cache/huggingface/
6262
6363 ## rzb version
6464
65-Affiche `rzb 0.1.0 (engines: fake, mlx)` (les moteurs de cette compilation, triés). `rzb --version` affiche `0.1.0`.
65+Affiche `rzb 0.2.0 (engines: fake, mlx)` (les moteurs de cette compilation, triés). `rzb --version` affiche `0.2.0`.
6666
6767 ## Codes de sortie
6868
@@ -1,6 +1,6 @@
1 # Référence : ligne de commande1 # Référence : ligne de commande
2 2
3-> Chaque commande, option et code de sortie de `rzb`, pour razorbill 0.1.0.3+> Chaque commande, option et code de sortie de `rzb`, pour razorbill 0.2.0.
4 4
5 ```5 ```
6 rzb <commande> [options]6 rzb <commande> [options]
@@ -35,7 +35,7 @@ Les options l'emportent sur la section `server:` du fichier. Au démarrage, il a
35 35
36 ```36 ```
37 config: server.yaml (2 declared models)37 config: server.yaml (2 declared models)
38-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop38+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop
39 ```39 ```
40 40
41 La première ligne n'apparaît qu'avec `--config`. Des avertissements (`warning: …`) précèdent la bannière quand le serveur écoute sur une adresse réseau sans clé d'API, ou autorise toutes les origines CORS sans clé. Ensuite, une ligne de journal par requête : méthode, chemin, statut, durée, et le modèle et les nombres de tokens (`model=… tokens=<prompt>+<complétion>`, plus `cached=<n>` quand une partie du prompt a été reprise de la requête précédente) ; les prompts et les réponses ne sont jamais journalisés.41 La première ligne n'apparaît qu'avec `--config`. Des avertissements (`warning: …`) précèdent la bannière quand le serveur écoute sur une adresse réseau sans clé d'API, ou autorise toutes les origines CORS sans clé. Ensuite, une ligne de journal par requête : méthode, chemin, statut, durée, et le modèle et les nombres de tokens (`model=… tokens=<prompt>+<complétion>`, plus `cached=<n>` quand une partie du prompt a été reprise de la requête précédente) ; les prompts et les réponses ne sont jamais journalisés.
@@ -62,7 +62,7 @@ Le cache est `$HF_HUB_CACHE`, sinon `$HF_HOME/hub`, sinon `~/.cache/huggingface/
62 62
63 ## rzb version63 ## rzb version
64 64
65-Affiche `rzb 0.1.0 (engines: fake, mlx)` (les moteurs de cette compilation, triés). `rzb --version` affiche `0.1.0`.65+Affiche `rzb 0.2.0 (engines: fake, mlx)` (les moteurs de cette compilation, triés). `rzb --version` affiche `0.2.0`.
66 66
67 ## Codes de sortie67 ## Codes de sortie
68 68
modified docs/fr/tutorials/premiers-pas.md +1 -1
@@ -43,7 +43,7 @@ rzb serve
4343 Vous devez voir :
4444
4545 ```
46-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop
46+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop
4747 ```
4848
4949 Le serveur tourne et n'accepte que les connexions venant de ce Mac. Laissez ce terminal ouvert, et **ouvrez un second terminal** pour la suite.
@@ -43,7 +43,7 @@ rzb serve
43 Vous devez voir :43 Vous devez voir :
44 44
45 ```45 ```
46-rzb 0.1.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop46+rzb 0.2.0 serving http://127.0.0.1:8080/v1 (no API key) — Ctrl-C to stop
47 ```47 ```
48 48
49 Le serveur tourne et n'accepte que les connexions venant de ce Mac. Laissez ce terminal ouvert, et **ouvrez un second terminal** pour la suite.49 Le serveur tourne et n'accepte que les connexions venant de ce Mac. Laissez ce terminal ouvert, et **ouvrez un second terminal** pour la suite.
added release-notes/v0.2.0.fr.md +21 -0
new file mode 100644
@@ -0,0 +1,21 @@
1+# razorbill 0.2.0
2+
3+razorbill devient un serveur de modèles pour Apple Silicon : `rzb serve` fait tourner des modèles MLX sur le GPU et les expose par une API HTTP compatible OpenAI. L'agent de la 0.1 (`run`, `chat`, `tui`, outil bash) est retiré ; son code reste au tag `v0.1-agent`.
4+
5+## Nouveautés
6+
7+- `rzb serve` : serveur HTTP (127.0.0.1 par défaut), clé d'API facultative lue dans l'environnement, CORS, format d'erreur OpenAI, `GET /health`.
8+- Fichier de configuration du serveur : noms et alias de modèles, `defaults`, valeurs `locked`, limites ; `rzb config validate`.
9+- Modèles chargés à la demande, une file par modèle, `keep_alive`, déchargement sous pression mémoire ; `GET /v1/models`.
10+- `POST /v1/chat/completions`, en une fois ou en flux (SSE, `stream_options.include_usage`, annulation quand le client part).
11+- Modèles de raisonnement : `reasoning_content`, `enable_thinking`, `reasoning_effort`, budget de réflexion.
12+- Sortie structurée (`response_format` `json_object` / `json_schema`) et appel de fonctions (`tools`, `tool_choice` `required` / nommé), garantis par décodage contraint.
13+- `POST /v1/embeddings` et l'ancien `POST /v1/completions`.
14+- Le cache KV de la requête précédente est réutilisé quand le prompt suivant commence pareil (`usage.prompt_tokens_details.cached_tokens`) : une longue conversation ne relit plus tout son historique.
15+- Échantillonnage : `top_k`, `min_p`, `repetition_penalty`, `repetition_context_size` en plus des champs d'OpenAI.
16+- Suite de compatibilité OpenAI (`scripts/compat.sh` : bibliothèque `openai`, LangChain, `curl`).
17+- `scripts/release.sh` : archive de release avec empreinte.
18+
19+## Installation
20+
21+Décompressez `razorbill-0.2.0-macos-arm64.tar.gz`, gardez son dossier entier et ajoutez-le au `PATH` (voir `INSTALL.txt`). macOS 14 ou plus récent sur Apple Silicon. `rzb` n'est pas encore notarisé (prévu pour la 1.0.0) : levez la quarantaine d'un téléchargement par navigateur avec `xattr -dr com.apple.quarantine <dossier>`.
new file mode 100644
@@ -0,0 +1,21 @@
1+# razorbill 0.2.0
2+
3+razorbill devient un serveur de modèles pour Apple Silicon : `rzb serve` fait tourner des modèles MLX sur le GPU et les expose par une API HTTP compatible OpenAI. L'agent de la 0.1 (`run`, `chat`, `tui`, outil bash) est retiré ; son code reste au tag `v0.1-agent`.
4+
5+## Nouveautés
6+
7+- `rzb serve` : serveur HTTP (127.0.0.1 par défaut), clé d'API facultative lue dans l'environnement, CORS, format d'erreur OpenAI, `GET /health`.
8+- Fichier de configuration du serveur : noms et alias de modèles, `defaults`, valeurs `locked`, limites ; `rzb config validate`.
9+- Modèles chargés à la demande, une file par modèle, `keep_alive`, déchargement sous pression mémoire ; `GET /v1/models`.
10+- `POST /v1/chat/completions`, en une fois ou en flux (SSE, `stream_options.include_usage`, annulation quand le client part).
11+- Modèles de raisonnement : `reasoning_content`, `enable_thinking`, `reasoning_effort`, budget de réflexion.
12+- Sortie structurée (`response_format` `json_object` / `json_schema`) et appel de fonctions (`tools`, `tool_choice` `required` / nommé), garantis par décodage contraint.
13+- `POST /v1/embeddings` et l'ancien `POST /v1/completions`.
14+- Le cache KV de la requête précédente est réutilisé quand le prompt suivant commence pareil (`usage.prompt_tokens_details.cached_tokens`) : une longue conversation ne relit plus tout son historique.
15+- Échantillonnage : `top_k`, `min_p`, `repetition_penalty`, `repetition_context_size` en plus des champs d'OpenAI.
16+- Suite de compatibilité OpenAI (`scripts/compat.sh` : bibliothèque `openai`, LangChain, `curl`).
17+- `scripts/release.sh` : archive de release avec empreinte.
18+
19+## Installation
20+
21+Décompressez `razorbill-0.2.0-macos-arm64.tar.gz`, gardez son dossier entier et ajoutez-le au `PATH` (voir `INSTALL.txt`). macOS 14 ou plus récent sur Apple Silicon. `rzb` n'est pas encore notarisé (prévu pour la 1.0.0) : levez la quarantaine d'un téléchargement par navigateur avec `xattr -dr com.apple.quarantine <dossier>`.
added release-notes/v0.2.0.md +21 -0
new file mode 100644
@@ -0,0 +1,21 @@
1+# razorbill 0.2.0
2+
3+razorbill becomes a model server for Apple Silicon: `rzb serve` runs MLX models on the GPU and exposes them through an OpenAI-compatible HTTP API. The 0.1 agent (`run`, `chat`, `tui`, bash tool) is removed; its code stays at tag `v0.1-agent`.
4+
5+## New
6+
7+- `rzb serve`: HTTP server (127.0.0.1 by default), optional API key from the environment, CORS, OpenAI error format, `GET /health`.
8+- Server configuration file: model names and aliases, `defaults`, `locked` values, limits; `rzb config validate`.
9+- Models loaded on demand, one queue per model, `keep_alive`, eviction under memory pressure; `GET /v1/models`.
10+- `POST /v1/chat/completions`, plain and streamed (SSE, `stream_options.include_usage`, cancellation when the client leaves).
11+- Reasoning models: `reasoning_content`, `enable_thinking`, `reasoning_effort`, thinking budget.
12+- Structured output (`response_format` `json_object` / `json_schema`) and function calling (`tools`, `tool_choice` `required` / named), enforced by constrained decoding.
13+- `POST /v1/embeddings` and the legacy `POST /v1/completions`.
14+- The KV cache of the previous request is reused when the next prompt starts the same way (`usage.prompt_tokens_details.cached_tokens`): long conversations no longer re-read their whole history.
15+- Sampling: `top_k`, `min_p`, `repetition_penalty`, `repetition_context_size` besides OpenAI's fields.
16+- OpenAI compatibility suite (`scripts/compat.sh`: `openai` library, LangChain, `curl`).
17+- `scripts/release.sh`: release archive with checksum.
18+
19+## Install
20+
21+Unpack `razorbill-0.2.0-macos-arm64.tar.gz`, keep its folder whole and put it on `PATH` (see `INSTALL.txt`). macOS 14 or later on Apple Silicon. `rzb` is not notarized yet (planned for 1.0.0): clear the quarantine of a browser download with `xattr -dr com.apple.quarantine <folder>`.
new file mode 100644
@@ -0,0 +1,21 @@
1+# razorbill 0.2.0
2+
3+razorbill becomes a model server for Apple Silicon: `rzb serve` runs MLX models on the GPU and exposes them through an OpenAI-compatible HTTP API. The 0.1 agent (`run`, `chat`, `tui`, bash tool) is removed; its code stays at tag `v0.1-agent`.
4+
5+## New
6+
7+- `rzb serve`: HTTP server (127.0.0.1 by default), optional API key from the environment, CORS, OpenAI error format, `GET /health`.
8+- Server configuration file: model names and aliases, `defaults`, `locked` values, limits; `rzb config validate`.
9+- Models loaded on demand, one queue per model, `keep_alive`, eviction under memory pressure; `GET /v1/models`.
10+- `POST /v1/chat/completions`, plain and streamed (SSE, `stream_options.include_usage`, cancellation when the client leaves).
11+- Reasoning models: `reasoning_content`, `enable_thinking`, `reasoning_effort`, thinking budget.
12+- Structured output (`response_format` `json_object` / `json_schema`) and function calling (`tools`, `tool_choice` `required` / named), enforced by constrained decoding.
13+- `POST /v1/embeddings` and the legacy `POST /v1/completions`.
14+- The KV cache of the previous request is reused when the next prompt starts the same way (`usage.prompt_tokens_details.cached_tokens`): long conversations no longer re-read their whole history.
15+- Sampling: `top_k`, `min_p`, `repetition_penalty`, `repetition_context_size` besides OpenAI's fields.
16+- OpenAI compatibility suite (`scripts/compat.sh`: `openai` library, LangChain, `curl`).
17+- `scripts/release.sh`: release archive with checksum.
18+
19+## Install
20+
21+Unpack `razorbill-0.2.0-macos-arm64.tar.gz`, keep its folder whole and put it on `PATH` (see `INSTALL.txt`). macOS 14 or later on Apple Silicon. `rzb` is not notarized yet (planned for 1.0.0): clear the quarantine of a browser download with `xattr -dr com.apple.quarantine <folder>`.
added scripts/release.sh +90 -0
new file mode 100644
@@ -0,0 +1,90 @@
1+#!/usr/bin/env bash
2+# Build rzb in Release and package it as a release archive.
3+#
4+# scripts/release.sh # build, package, check (Mac, Apple Silicon)
5+# scripts/release.sh --products <dir> # package an existing build instead of building
6+# scripts/release.sh --allow-dirty # accept uncommitted changes (test archives only)
7+#
8+# Output, in dist/:
9+# razorbill-<version>-macos-arm64.tar.gz rzb + the resource bundles it loads at run time
10+# razorbill-<version>-macos-arm64.tar.gz.sha256 its SHA-256, in `shasum -a 256 -c` format
11+#
12+# The version is read from Sources/RazorbillCore/Razorbill.swift. The executable is not signed
13+# beyond the linker's ad-hoc signature (Developer ID signing and notarization: v1.0.0).
14+set -euo pipefail
15+cd "$(dirname "$0")/.."
16+
17+products=""
18+allow_dirty=false
19+while [[ $# -gt 0 ]]; do
20+ case "$1" in
21+ --products) products="${2:?--products needs a directory}"; shift 2 ;;
22+ --allow-dirty) allow_dirty=true; shift ;;
23+ -h|--help) sed -n '2,13p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
24+ *) echo "release.sh: unknown option $1 (see --help)" >&2; exit 2 ;;
25+ esac
26+done
27+
28+fail() { echo "release.sh: $*" >&2; exit 1; }
29+
30+version=$(sed -n 's/.*static let version = "\([^"]*\)".*/\1/p' Sources/RazorbillCore/Razorbill.swift)
31+[[ -n "$version" ]] || fail "no version found in Sources/RazorbillCore/Razorbill.swift"
32+name="razorbill-${version}-macos-arm64"
33+
34+if [[ "$allow_dirty" == false && -n "$(git status --porcelain)" ]]; then
35+ fail "uncommitted changes: commit them, or pass --allow-dirty for a test archive"
36+fi
37+
38+if [[ -z "$products" ]]; then
39+ [[ "$(uname -s)" == Darwin && "$(uname -m)" == arm64 ]] \
40+ || fail "building needs a Mac with Apple Silicon (or pass --products <dir>)"
41+ # Own derived-data folder: a release never reuses a Debug or half-updated development build.
42+ xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
43+ -derivedDataPath .build/release -skipPackagePluginValidation -skipMacroValidation
44+ products=.build/release/Build/Products/Release
45+fi
46+
47+[[ -x "$products/rzb" ]] || fail "$products/rzb not found"
48+[[ -d "$products/mlx-swift_Cmlx.bundle" ]] \
49+ || fail "$products/mlx-swift_Cmlx.bundle not found (the MLX Metal library)"
50+
51+staging=$(mktemp -d)
52+trap 'rm -rf "$staging"' EXIT
53+mkdir "$staging/$name"
54+cp "$products/rzb" "$staging/$name/"
55+# Every resource bundle of the build: Bundle.module looks for them next to the executable.
56+for bundle in "$products"/*.bundle; do
57+ cp -R "$bundle" "$staging/$name/"
58+done
59+cat > "$staging/$name/INSTALL.txt" <<EOF
60+razorbill ${version} — MLX model server for Apple Silicon (macOS 14 or later)
61+
62+Keep rzb and the .bundle folders together: rzb loads them from its own folder
63+(mlx-swift_Cmlx.bundle holds the MLX Metal library).
64+
65+ mkdir -p ~/.local/lib && mv ${name} ~/.local/lib/razorbill
66+ export PATH="\$HOME/.local/lib/razorbill:\$PATH" # add this line to ~/.zshrc
67+ rzb version
68+
69+If the archive was downloaded with a browser, macOS quarantines it (rzb is not
70+notarized yet). Clear it once: xattr -dr com.apple.quarantine ~/.local/lib/razorbill
71+EOF
72+
73+mkdir -p dist
74+archive="dist/${name}.tar.gz"
75+# No AppleDouble (._*) files from extended attributes in the archive (macOS tar).
76+COPYFILE_DISABLE=1 tar -C "$staging" -czf "$archive" "$name"
77+(cd dist && shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256")
78+
79+# Check the archive itself, unpacked somewhere else: the bundles must travel with rzb.
80+check=$(mktemp -d)
81+trap 'rm -rf "$staging" "$check"' EXIT
82+tar -C "$check" -xzf "$archive"
83+[[ -d "$check/$name/mlx-swift_Cmlx.bundle" ]] || fail "the archive lacks mlx-swift_Cmlx.bundle"
84+if [[ "$(uname -s)" == Darwin ]]; then
85+ reported=$("$check/$name/rzb" --version)
86+ [[ "$reported" == "$version" ]] || fail "the archived rzb reports $reported, expected $version"
87+fi
88+
89+echo "$archive"
90+cat "dist/${name}.tar.gz.sha256"
new file mode 100644
@@ -0,0 +1,90 @@
1+#!/usr/bin/env bash
2+# Build rzb in Release and package it as a release archive.
3+#
4+# scripts/release.sh # build, package, check (Mac, Apple Silicon)
5+# scripts/release.sh --products <dir> # package an existing build instead of building
6+# scripts/release.sh --allow-dirty # accept uncommitted changes (test archives only)
7+#
8+# Output, in dist/:
9+# razorbill-<version>-macos-arm64.tar.gz rzb + the resource bundles it loads at run time
10+# razorbill-<version>-macos-arm64.tar.gz.sha256 its SHA-256, in `shasum -a 256 -c` format
11+#
12+# The version is read from Sources/RazorbillCore/Razorbill.swift. The executable is not signed
13+# beyond the linker's ad-hoc signature (Developer ID signing and notarization: v1.0.0).
14+set -euo pipefail
15+cd "$(dirname "$0")/.."
16+
17+products=""
18+allow_dirty=false
19+while [[ $# -gt 0 ]]; do
20+ case "$1" in
21+ --products) products="${2:?--products needs a directory}"; shift 2 ;;
22+ --allow-dirty) allow_dirty=true; shift ;;
23+ -h|--help) sed -n '2,13p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
24+ *) echo "release.sh: unknown option $1 (see --help)" >&2; exit 2 ;;
25+ esac
26+done
27+
28+fail() { echo "release.sh: $*" >&2; exit 1; }
29+
30+version=$(sed -n 's/.*static let version = "\([^"]*\)".*/\1/p' Sources/RazorbillCore/Razorbill.swift)
31+[[ -n "$version" ]] || fail "no version found in Sources/RazorbillCore/Razorbill.swift"
32+name="razorbill-${version}-macos-arm64"
33+
34+if [[ "$allow_dirty" == false && -n "$(git status --porcelain)" ]]; then
35+ fail "uncommitted changes: commit them, or pass --allow-dirty for a test archive"
36+fi
37+
38+if [[ -z "$products" ]]; then
39+ [[ "$(uname -s)" == Darwin && "$(uname -m)" == arm64 ]] \
40+ || fail "building needs a Mac with Apple Silicon (or pass --products <dir>)"
41+ # Own derived-data folder: a release never reuses a Debug or half-updated development build.
42+ xcodebuild build -scheme razorbill -destination 'platform=macOS' -configuration Release \
43+ -derivedDataPath .build/release -skipPackagePluginValidation -skipMacroValidation
44+ products=.build/release/Build/Products/Release
45+fi
46+
47+[[ -x "$products/rzb" ]] || fail "$products/rzb not found"
48+[[ -d "$products/mlx-swift_Cmlx.bundle" ]] \
49+ || fail "$products/mlx-swift_Cmlx.bundle not found (the MLX Metal library)"
50+
51+staging=$(mktemp -d)
52+trap 'rm -rf "$staging"' EXIT
53+mkdir "$staging/$name"
54+cp "$products/rzb" "$staging/$name/"
55+# Every resource bundle of the build: Bundle.module looks for them next to the executable.
56+for bundle in "$products"/*.bundle; do
57+ cp -R "$bundle" "$staging/$name/"
58+done
59+cat > "$staging/$name/INSTALL.txt" <<EOF
60+razorbill ${version} — MLX model server for Apple Silicon (macOS 14 or later)
61+
62+Keep rzb and the .bundle folders together: rzb loads them from its own folder
63+(mlx-swift_Cmlx.bundle holds the MLX Metal library).
64+
65+ mkdir -p ~/.local/lib && mv ${name} ~/.local/lib/razorbill
66+ export PATH="\$HOME/.local/lib/razorbill:\$PATH" # add this line to ~/.zshrc
67+ rzb version
68+
69+If the archive was downloaded with a browser, macOS quarantines it (rzb is not
70+notarized yet). Clear it once: xattr -dr com.apple.quarantine ~/.local/lib/razorbill
71+EOF
72+
73+mkdir -p dist
74+archive="dist/${name}.tar.gz"
75+# No AppleDouble (._*) files from extended attributes in the archive (macOS tar).
76+COPYFILE_DISABLE=1 tar -C "$staging" -czf "$archive" "$name"
77+(cd dist && shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256")
78+
79+# Check the archive itself, unpacked somewhere else: the bundles must travel with rzb.
80+check=$(mktemp -d)
81+trap 'rm -rf "$staging" "$check"' EXIT
82+tar -C "$check" -xzf "$archive"
83+[[ -d "$check/$name/mlx-swift_Cmlx.bundle" ]] || fail "the archive lacks mlx-swift_Cmlx.bundle"
84+if [[ "$(uname -s)" == Darwin ]]; then
85+ reported=$("$check/$name/rzb" --version)
86+ [[ "$reported" == "$version" ]] || fail "the archived rzb reports $reported, expected $version"
87+fi
88+
89+echo "$archive"
90+cat "dist/${name}.tar.gz.sha256"