From 0b18f1b948f7c0d7ba30f46b22399b705e6f6370 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 19 Dec 2025 19:20:57 +0100 Subject: [PATCH] docs: update bundled gateway flow --- docs/gateway.md | 3 +++ docs/mac/child-process.md | 2 ++ docs/onboarding.md | 2 ++ 3 files changed, 7 insertions(+) diff --git a/docs/gateway.md b/docs/gateway.md index a27ae6dc7..08b4fe3bf 100644 --- a/docs/gateway.md +++ b/docs/gateway.md @@ -102,6 +102,9 @@ See also: `docs/presence.md` for how presence is produced/deduped and why `insta - StandardOut/Err: file paths or `syslog` - On failure, launchd restarts; fatal misconfig should keep exiting so the operator notices. +Bundled mac app: +- Clawdis.app can bundle a bun-compiled gateway binary and install a per-user LaunchAgent labeled `com.steipete.clawdis.gateway`. + ## Supervision (systemd example) ``` [Unit] diff --git a/docs/mac/child-process.md b/docs/mac/child-process.md index c1af8a2a5..56502676c 100644 --- a/docs/mac/child-process.md +++ b/docs/mac/child-process.md @@ -7,6 +7,8 @@ read_when: Date: 2025-12-06 · Status: draft · Owner: steipete +Note (2025-12-19): the current implementation prefers a **launchd LaunchAgent** that runs the **bundled bun-compiled gateway**. This doc remains as an alternative mode for tighter coupling to the UI. + ## Goal Run the Node-based Clawdis/clawdis gateway as a direct child of the LSUIElement app (instead of a launchd agent) while keeping all TCC-sensitive work inside the Swift app/broker layer and wiring the existing “Clawdis Active” toggle to start/stop the child. diff --git a/docs/onboarding.md b/docs/onboarding.md index 19f2d9304..97d7bf811 100644 --- a/docs/onboarding.md +++ b/docs/onboarding.md @@ -23,6 +23,8 @@ First question: where does the **Gateway** run? - **Local (this Mac):** onboarding can run the Anthropic OAuth flow and write Pi’s token store locally. - **Remote (over SSH/tailnet):** onboarding must not run OAuth locally, because credentials must exist on the **gateway host**. +Implementation note (2025-12-19): in local mode, the macOS app bundles the Gateway and enables it via a per-user launchd LaunchAgent (no global npm install/Node requirement for the user). + ## 2) Local-only: Connect Claude (Anthropic OAuth) This is the “bind Pi to Clawdis” step. It is explicitly the **Anthropic (Claude Pro/Max) OAuth flow**, not a generic “login”.