You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit da9c12e
Browse filesBrowse the repository at this point in the historyBrowse files
feat(macos): checkpoint v0.25 independent Core and Cloudflare ingress
Includes v0.24.3 writable Cloudflare candidate, independent Core/Connector staging, guarded legacy lifecycle, Mac deployment validation and isolated legacy installer tests. Development checkpoint, not a release.
Copy file name to clipboardExpand all lines: deployment/macos/README.md
+120-3Lines changed: 120 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ normal ServerFS data are preserved.
68
68
69
69
## Optional Cloudflare Tunnel (v0.24.1 release)
70
70
71
-
v0.24.1 adds a separate native Cloudflare Connector and private loopback Streamable HTTP origin. It does not change the existing OpenAI Tunnel or Agent Bridge. Use it only with a v0.24.1 build on the supported native Apple Silicon/macOS 27 platform. It does not create or edit Cloudflare Tunnels, DNS routes, or public hostname configuration; configure the named remotely managed Tunnel and route through Cloudflare's operator controls first.
71
+
v0.24.1 added a separate native Cloudflare Connector and private loopback Streamable HTTP origin. It does not change the existing OpenAI Tunnel or Agent Bridge. Use a version-matched native build on supported Apple Silicon/macOS 27. The **unreleased v0.24.3 candidate** extends installer admission to explicitly writable workdirs; v0.24.1/v0.24.2 remain limited to read-only Cloudflare workdirs. It does not create or edit Cloudflare Tunnels, DNS routes, or public hostname configuration; configure the named remotely managed Tunnel and route through Cloudflare's operator controls first.
72
72
73
73
The bootstrap command installs the pinned official Cloudflare `cloudflared` macOS arm64 release, verifying its archive and binary digests, code signature and version. With no flag it downloads the pinned artifact; `--artifact` accepts a local archive for offline installation:
74
74
@@ -82,7 +82,7 @@ Prepare two current-user regular files with mode `0600`, stored outside the chec
82
82
- a connector Token file, containing only the remotely managed Tunnel token;
83
83
- an HTTP-origin environment file containing only supported settings. Use either a non-empty `SERVERFS_HTTP_API_KEY` with OAuth disabled, or OAuth enabled with its required public resource/issuer/introspection settings and secret. Do not combine API Key and OAuth. Set `SERVERFS_HTTP_ALLOWED_HOSTS` to exactly the public hostname passed to install. The Token authenticates only the Connector; it does not authenticate MCP callers.
84
84
85
-
Use absolute paths for all install paths. `--http-port` has no default and must be available for the loopback origin. Configure `serverfs.toml` with at least one staging workdir and ensure every workdir is read-only before installing. Replace the path and hostname placeholders below with the operator's own values; never put secret values in command arguments:
85
+
Use absolute paths for all install paths. `--http-port` has no default and must be available for the loopback origin. Configure `serverfs.toml` with at least one workdir. **Published v0.24.1/v0.24.2 installers require all Cloudflare workdirs to be read-only. The v0.24.3 candidate permits explicit `read_only = false` while retaining the native default of read-only and the existing per-workdir Agent/Repo Ops permissions.** Replace the path and hostname placeholders below with the operator's own values; never put secret values in command arguments:
86
86
87
87
```bash
88
88
serverfs service cloudflare install \
@@ -95,7 +95,7 @@ serverfs service cloudflare install \
95
95
serverfs service cloudflare status
96
96
```
97
97
98
-
The installer registers an HTTP-origin/Connector pair through the same current-user, app-associated `SMAppService` LaunchAgent mechanism as the existing native services. The origin binds to `127.0.0.1`; public TLS terminates at Cloudflare. The hostname must match exactly in ServerFS Host admission. Verify both service statuses, then verify public HTTPS rejects missing/wrong caller credentials with 401 and accepts the intended API Key/OAuth identity with 200. Continue with MCP tools and a persistent SSE connection longer than 60 seconds. After a controlled Connector-only restart, establish a **fresh MCP session** and verify tools; the previously established session may return 404 (the observed staging result was 8/8 successful fresh-session checks). Do not claim old-session continuity or SSE event replay. Keep this acceptance on an isolated read-only staging workdir and a separate test hostname; do not claim production workdir/Agent acceptance from it.
98
+
The installer registers an HTTP-origin/Connector pair through the same current-user, app-associated `SMAppService` LaunchAgent mechanism as the existing native services. The origin binds to `127.0.0.1`; public TLS terminates at Cloudflare. The hostname must match exactly in ServerFS Host admission. Verify both service statuses, then verify public HTTPS rejects missing/wrong caller credentials with 401 and accepts the intended API Key/OAuth identity with 200. Continue with MCP tools and a persistent SSE connection longer than 60 seconds. After a controlled Connector-only restart, establish a **fresh MCP session** and verify tools; the previously established session may return 404 (the observed staging result was 8/8 successful fresh-session checks). Do not claim old-session continuity or SSE event replay. This paragraph records the original v0.24.1 isolated read-only staging acceptance; it does **not** establish production writable-workdir or Agent acceptance. Follow the additional v0.24.3 candidate gate below before using writable production workdirs.
99
99
100
100
If registration fails, the installer attempts to unregister the services it registered and restore its manifest state. If rollback is reported incomplete, stop and preserve the recovery state; do not layer another install over it. The explicit lifecycle commands are:
101
101
@@ -108,8 +108,125 @@ serverfs service cloudflare uninstall
108
108
109
109
`uninstall` unregisters this Cloudflare service pair and removes its private origin-environment snapshot; it preserves the operator's source Token/env files, `serverfs.toml`, workdirs, existing OpenAI Tunnel and Agent Bridge. Cloudflare service registration can require user approval in System Settings > General > Login Items; respect that decision and do not bypass it.
110
110
111
+
### v0.24.3 candidate: production workdir parity (not yet released)
112
+
113
+
Only a **version-matched v0.24.3 candidate** can install a Cloudflare HTTP origin with an explicitly writable workdir. For intentional OpenAI/Cloudflare parity, point Cloudflare's `--config` to the **same canonical native `serverfs.toml` actually used by the OpenAI Tunnel**; do not maintain a second, drifting production workdir policy. This shares the configured filesystem permissions, optional binary transfer, Agent runtimes and independently gated Repo Ops. The separate HTTP caller API Key/OAuth still authorizes incoming clients; a Connector Token alone never grants MCP access. An authenticated Cloudflare client inherits all capabilities enabled by the shared policy, so protect the caller credential accordingly.
114
+
115
+
The macOS HTTP origin and OpenAI Tunnel may address the **same** Agent Bridge and writer-lease identity. Before re-registering the Cloudflare pair, verify the live Bridge policy is in sync with the canonical TOML and preserve the existing OpenAI Tunnel/Bridge processes. The native Cloudflare service pair is singleton: do **not** register a second unmanaged pair or run a general `serverfs service restart`. Prepare a separately verified read-only Cloudflare config for rollback; keep existing private token and origin-auth env outside every workdir. Use `serverfs service cloudflare uninstall` followed by the supported `serverfs service cloudflare install --config <canonical-toml> --cloudflared <verified-binary> --token-file <private-token-file> --env-file <private-origin-env> --http-port <available-loopback-port> --hostname <exact-public-host>`; those angle-bracket values are placeholders, not literal argv. This re-registration affects only the Cloudflare Connector/HTTP Origin pair.
116
+
117
+
**Release acceptance gate:** on a disposable test file only, verify public HTTPS authentication failures (401), authenticated MCP initialize and workdir/tool discovery (200), read/write/edit/delete with revision guards, read-only/deny-path rejection, optional binary transfer as configured, available Agent runtimes through the existing Bridge, cross-ingress writer-lease behavior, a >60-second SSE connection and fresh-session behavior. Recheck that the OpenAI Tunnel and Bridge remain running. On failure, re-register only the previous read-only Cloudflare pair using its preserved private inputs. Until these runtime checks pass, do not claim production write/Agent parity or instruct operators to retire OpenAI Tunnel.
118
+
111
119
For v0.24.1 lifecycle acceptance, architectural equivalence to the previously verified app-associated `SMAppService`/LaunchAgent mechanism is accepted. An additional real logout/login or whole-Mac reboot is not required for this release and must not be claimed as performed. This exception applies only while the lifecycle architecture remains the same.
112
120
121
+
### v0.25.0 development: independently staged HTTP Core and Cloudflare Connector
122
+
123
+
This section documents **unreleased source-only interfaces**. It is not a production
124
+
migration procedure and does not supersede the v0.24.1/v0.24.3 rollback path.
125
+
On a host with an already registered Cloudflare HTTP-origin/Connector pair,
126
+
**both stage operations refuse to replace it**. Do not stop or uninstall that pair
127
+
just to test these commands; prepare a separately accepted isolated instance.
128
+
129
+
The independent Core and Connector reuse the existing current-user
130
+
`SMAppService` identities `http-origin` and `cloudflare`, with distinct service
131
+
owners. Explicit `stage` only writes the private mode-0600 manifest; it does
132
+
**not** register or launch any service. Core stage first checks that the TOML is
133
+
the same canonical file as an existing OpenAI Tunnel manifest. Its HTTP
134
+
environment must include exactly
135
+
`SERVERFS_HTTP_ALLOWED_HOSTS=<public-host>,127.0.0.1:<core-port>` with valid
136
+
API-Key-or-OAuth authentication. The Cloudflare Connector's private token stays
137
+
outside the repository and all exposed workdirs; only its path is written to the
138
+
manifest. The public hostname and Core port must match that exact Core snapshot.
139
+
140
+
On an **isolated, independently accepted macOS test installation only**, after
141
+
providing real existing private inputs at the placeholder paths:
142
+
143
+
```bash
144
+
serverfs service core stage \
145
+
--config /absolute/path/to/serverfs.toml \
146
+
--env-file /private/path/core-http.env \
147
+
--http-port 18766 \
148
+
--hostname mcp.example.invalid
149
+
serverfs service cloudflare stage \
150
+
--config /absolute/path/to/serverfs.toml \
151
+
--cloudflared /absolute/path/to/cloudflared \
152
+
--token-file /private/path/cloudflare-token \
153
+
--hostname mcp.example.invalid
154
+
serverfs service core status
155
+
# Registration is a separate explicit operator-controlled test step:
156
+
serverfs service start --component core
157
+
serverfs service start --component cloudflare
158
+
# A Connector-only restart must not stop the Core or Agent Bridge:
159
+
serverfs service restart --component cloudflare
160
+
```
161
+
162
+
For a safe cleanup of **only those isolated staged services**, explicitly stop
163
+
the connector, verify it is no longer registered or running, and use
164
+
`serverfs service cloudflare unstage`. Stop the Core and verify its unregistered
165
+
state before `serverfs service core unstage`. Never unstage the Core while the
166
+
Connector manifest remains. The source credentials are not deleted by these
167
+
commands.
168
+
169
+
**Compatibility warning:** on unmarked legacy manifests, bare
170
+
`serverfs service start/stop/restart/uninstall/install` retains historical
171
+
group behavior. When **any independently owned** v0.25.0 Core/Connector
172
+
manifest entry is present, the same legacy group operations now fail closed
173
+
*before* registering, unregistering or replacing the bundle. Use only explicit
0 commit comments