This commit is contained in:
Ian Gulliver
2026-10-20 22:53:11 -07:00
parent c2ae4f98b5
commit ba675f9a5a
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ claude --output-format stream-json --input-format stream-json --verbose \
--include-partial-messages \
--permission-mode bypassPermissions --allow-dangerously-skip-permissions \
--settings '{"attribution":{"commit":"","pr":""}}' \
--mcp-config '{"mcpServers":{"byre":{"type":"sdk","name":"byre"}}}' \
--mcp-config '{"mcpServers":{"byre":{"type":"sdk","name":"byre","alwaysLoad":true}}}' \
[--model M] [--session-id=ID] [--resume=SESSION_ID] [--resume-session-at=UUID] [--fork-session]
```
+1 -1
View File
@@ -4,7 +4,7 @@ How `internal/codex` drives `codex app-server`. The server's own schema is the r
## Binary and version
byre runs `codex` from `PATH`. On the owner's machine that is the CLI inside the ChatGPT desktop app (`ls -la ~/.local/bin/codex` shows the link), so the version moves when the app updates itself; `codex --version` prints it. byre passes `-c check_for_update_on_startup=false` so the CLI never checks for or offers updates of its own. `SchemaVersion` in `internal/codex/protocol.gen.go` names the version the types were generated from; when it differs from `codex --version`, regenerate and re-record (below).
byre runs `codex` from `PATH`. On the owner's machine that is the CLI inside the ChatGPT desktop app (`ls -la ~/.local/bin/codex` shows the link), so the version moves when the app updates itself; `codex --version` prints it. byre passes `-c check_for_update_on_startup=false` so the CLI never checks for or offers updates of its own. `SchemaVersion` in `internal/codex/protocol.gen.go` names the version the types were generated from; when it differs from `codex --version`, regenerate the types (below).
## Generated types
+2 -3
View File
@@ -4,7 +4,7 @@ The macOS app under `mac/` is byre's client, a native SwiftUI client of byre's A
## Decision
**No web view, under any circumstances**: no `WKWebView`, no `WebView`, no HTML rendering of any kind, in the window, in a dialog, for Markdown, for diagrams, for the terminal or for previews. A link to a web page opens in the default browser. Mermaid needs a browser DOM, so the app draws flowcharts itself (`Diagram.swift`), and other diagram types show as source. byre's Markdown dialect (choice markers, `<details>` sections, `#/task/` links, worktree image paths, `NO_REPLY`) matches no library, so the app parses it itself.
**No web view, under any circumstances**: no `WKWebView`, no `WebView`, no HTML rendering of any kind, in the window, in a dialog, for Markdown, for diagrams, for the terminal or for previews. A link to a web page opens in the default browser. Mermaid needs a browser DOM, so the app renders diagrams natively. byre's Markdown dialect (choice markers, `<details>` sections, `#/task/` links, worktree image paths, `NO_REPLY`) matches no library, so the app parses it itself.
The app joins the tailnet as its own node with libtailscale and reaches byre's HTTPS origin on byre's node, so byre knows who is calling from the node itself. It never sends identity headers, and certificate validation is never relaxed.
@@ -12,7 +12,6 @@ The app joins the tailnet as its own node with libtailscale and reaches byre's H
- Swift 6, SwiftUI, Observation. Minimum macOS is the major version byre's host runs (`sw_vers --productVersion` prints it); there is no back-deployment.
- AppKit where SwiftUI falls short (see "Gaps in SwiftUI"), and for `NSAlert`, the update progress panel, key and window monitoring, and Core Animation layers for the transcript's scanner and spinner, which animate in the render server so SwiftUI never redraws around them.
- Third-party code: Apple's `swift-openapi-generator` for the API client, SwiftTerm, Sparkle, and TailscaleKit.
The project is a Swift package built with `swift build`, not an Xcode project. It builds with Xcode's toolchain: `xcode-select --print-path` must print `/Applications/Xcode.app/Contents/Developer`. With the Command Line Tools selected while Xcode is installed, Swift Build finds two toolchains for the Command Line Tools path and picks one at random on each run; the pick is part of the build request, so every change of pick rebuilds every target.
@@ -45,7 +44,7 @@ The app runs Sparkle with its own user driver instead of Sparkle's standard wind
## Persistence
The app keeps its saved servers, drafts, task visit times and preferences in SwiftData, synced through CloudKit (`docs/operations.md`, "CloudKit schema"). CloudKit has no unique constraints, so two Macs can each create a record for the same thing; readers take the oldest server record per origin, the newest preferences and drafts records and the latest visit per task, and the next write deletes the rest. The store is named `byre.store` because the app isn't sandboxed, so SwiftData's default `default.store` would be shared with every other unsandboxed app. Deleting the local files while the app isn't running makes the next launch download the records again.
CloudKit has no unique constraints, so two Macs can each create a record for the same thing; duplicate records are expected. See `docs/operations.md`, "CloudKit schema", before changing the SwiftData models. The store is named `byre.store` because the app isn't sandboxed, so SwiftData's default `default.store` would be shared with every other unsandboxed app. Deleting the local files while the app isn't running makes the next launch download the records again.
## Gaps in SwiftUI