From 91abd4b9402556c3b83deea136faa64b1e21303d Mon Sep 17 00:00:00 2001 From: Matt Hill <9935159+MattDHill@users.noreply.github.com> Date: Fri, 23 Oct 2026 21:04:37 -0600 Subject: [PATCH 1/2] feat: move maple proxy to maplePrivacyLabs/maple and update to 0.4.2 Co-Authored-By: Claude Opus 5.5 --- README.md | 16 ++++++------- UPDATING.md | 9 +++---- instructions.md | 2 +- startos/manifest/index.ts | 4 ++-- startos/versions/current.ts | 47 +++++++++++++++++-------------------- 5 files changed, 37 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 3e4f8bd..2a3625e 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ > upstream documentation is accurate and fully applicable — see the > Documentation section of `instructions.md` for links. -[Maple Proxy](https://github.com/OpenSecretCloud/maple-proxy) puts an OpenAI-compatible API in front of [Maple/OpenSecret's](https://trymaple.ai/) enclave-hosted inference, so any OpenAI client can talk to it. This package runs that proxy and adds a small chat page of its own, so the service is usable without configuring a separate client. +[Maple Proxy](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy) puts an OpenAI-compatible API in front of [Maple/OpenSecret's](https://trymaple.ai/) enclave-hosted inference, so any OpenAI client can talk to it. This package runs that proxy and adds a small chat page of its own, so the service is usable without configuring a separate client. -- **Upstream repo:** +- **Upstream repo:** - **Wrapper repo:** --- @@ -37,11 +37,11 @@ Two images: the upstream proxy, and a web page built here. -| Property | Value | -| ------------- | ---------------------------------------------------------- | -| Images | `ghcr.io/opensecretcloud/maple-proxy`, plus an nginx build | -| Architectures | x86_64, aarch64 | -| Command | The proxy's entrypoint; nginx in the foreground | +| Property | Value | +| ------------- | ----------------------------------------------------------- | +| Images | `ghcr.io/mapleprivacylabs/maple-proxy`, plus an nginx build | +| Architectures | x86_64, aarch64 | +| Command | The proxy's entrypoint; nginx in the foreground | | Subcontainer | Purpose | | ----------------- | ------------------------------------------------- | @@ -168,7 +168,7 @@ A restored instance comes back configured and working immediately, since nothing ```yaml package_id: maple-proxy -image: ghcr.io/opensecretcloud/maple-proxy # plus a locally built nginx image for the UI +image: ghcr.io/mapleprivacylabs/maple-proxy # plus a locally built nginx image for the UI architectures: - x86_64 - aarch64 diff --git a/UPDATING.md b/UPDATING.md index f1c5d9e..a9332fd 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -4,12 +4,13 @@ Maple Proxy ships two images: the upstream `maple-proxy` (pulled from GHCR) and ## Determining the upstream version -- **maple-proxy** — canonical home . Latest release: +- **maple-proxy** — canonical home is the `proxy/` directory of . The repo's release tags version the Maple app, not the proxy; the proxy's version is `version` in `proxy/Cargo.toml`, and CI publishes it to GHCR after each app release. Take the newest version tag GHCR serves: ``` - gh release view -R OpenSecretCloud/maple-proxy --json tagName -q .tagName + TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:mapleprivacylabs/maple-proxy:pull" | jq -r .token) + curl -s -H "Authorization: Bearer $TOKEN" https://ghcr.io/v2/mapleprivacylabs/maple-proxy/tags/list | jq -r '.tags[]' | sort -V ``` - The pin lives in `startos/manifest/index.ts` under `images['maple-proxy'].source.dockerTag` (currently `ghcr.io/opensecretcloud/maple-proxy:0.3.2`). The GHCR tag matches the GitHub release tag with the leading `v` stripped. + The pin lives in `startos/manifest/index.ts` under `images['maple-proxy'].source.dockerTag` (currently `ghcr.io/mapleprivacylabs/maple-proxy:0.4.2`). To review a jump, find the app release whose `proxy/Cargo.toml` carries the new version and diff `proxy/` between the two releases. ## Applying the bump -- **maple-proxy** — in `startos/manifest/index.ts`, set `images['maple-proxy'].source.dockerTag` to `ghcr.io/opensecretcloud/maple-proxy:` (no leading `v`). +- **maple-proxy** — in `startos/manifest/index.ts`, set `images['maple-proxy'].source.dockerTag` to `ghcr.io/mapleprivacylabs/maple-proxy:`. diff --git a/instructions.md b/instructions.md index 6148627..4892e44 100644 --- a/instructions.md +++ b/instructions.md @@ -2,7 +2,7 @@ ## Documentation -- [Maple Proxy README](https://github.com/OpenSecretCloud/maple-proxy/blob/master/README.md) — the upstream project overview and configuration reference. +- [Maple Proxy README](https://github.com/MaplePrivacyLabs/Maple/blob/master/proxy/README.md) — the upstream project overview and configuration reference. ## What you get on StartOS diff --git a/startos/manifest/index.ts b/startos/manifest/index.ts index db18559..2900dc1 100644 --- a/startos/manifest/index.ts +++ b/startos/manifest/index.ts @@ -6,14 +6,14 @@ export const manifest = setupManifest({ title: 'Maple Proxy', license: 'MIT', packageRepo: 'https://github.com/Start9-Community/maple-proxy-startos', - upstreamRepo: 'https://github.com/OpenSecretCloud/maple-proxy', + upstreamRepo: 'https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy', marketingUrl: 'https://trymaple.ai/', donationUrl: null, description: { short, long }, volumes: ['main'], images: { 'maple-proxy': { - source: { dockerTag: 'ghcr.io/opensecretcloud/maple-proxy:0.3.2' }, + source: { dockerTag: 'ghcr.io/mapleprivacylabs/maple-proxy:0.4.2' }, arch: ['x86_64', 'aarch64'], }, 'maple-ui': { diff --git a/startos/versions/current.ts b/startos/versions/current.ts index 9000329..0a85c5c 100644 --- a/startos/versions/current.ts +++ b/startos/versions/current.ts @@ -1,43 +1,38 @@ import { VersionInfo } from '@start9labs/start-sdk' export const current = VersionInfo.of({ - version: '0.3.2:0', + version: '0.4.2:0', releaseNotes: { - en_US: `Updated Maple Proxy to 0.3.2. + en_US: `Updated Maple Proxy to 0.4.2. -- Verifies the backend enclave against production trust roots, matching the default backend. -- Includes upstream security updates to its dependencies. -- Updates the web interface's nginx to 1.30.6 with security fixes. +- Adds the \`/v1/systemone\` endpoint. +- Browser clients can now send their own API key in the \`Authorization\` header. -[Full upstream changes](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`, - es_ES: `Actualiza Maple Proxy a 0.3.2. +[Upstream source](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, + es_ES: `Actualiza Maple Proxy a 0.4.2. -- Verifica el enclave del backend con las raíces de confianza de producción, que corresponden al backend predeterminado. -- Incluye actualizaciones de seguridad de sus dependencias del proyecto original. -- Actualiza el nginx de la interfaz web a 1.30.6 con correcciones de seguridad. +- Añade el endpoint \`/v1/systemone\`. +- Los clientes de navegador ahora pueden enviar su propia clave de API en el encabezado \`Authorization\`. -[Cambios completos del proyecto original](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`, - de_DE: `Aktualisiert Maple Proxy auf 0.3.2. +[Código del proyecto original](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, + de_DE: `Aktualisiert Maple Proxy auf 0.4.2. -- Prüft die Backend-Enklave gegen die Produktions-Vertrauensanker, passend zum Standard-Backend. -- Enthält Sicherheitsaktualisierungen der Upstream-Abhängigkeiten. -- Aktualisiert das nginx der Weboberfläche auf 1.30.6 mit Sicherheitskorrekturen. +- Fügt den Endpunkt \`/v1/systemone\` hinzu. +- Browser-Clients können jetzt ihren eigenen API-Schlüssel im \`Authorization\`-Header senden. -[Vollständige Upstream-Änderungen](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`, - pl_PL: `Aktualizuje Maple Proxy do wersji 0.3.2. +[Upstream-Quellcode](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, + pl_PL: `Aktualizuje Maple Proxy do wersji 0.4.2. -- Weryfikuje enklawę backendu względem produkcyjnych kotwic zaufania, zgodnych z domyślnym backendem. -- Zawiera aktualizacje bezpieczeństwa zależności upstream. -- Aktualizuje nginx interfejsu webowego do wersji 1.30.6 z poprawkami bezpieczeństwa. +- Dodaje punkt końcowy \`/v1/systemone\`. +- Klienci przeglądarkowi mogą teraz wysyłać własny klucz API w nagłówku \`Authorization\`. -[Pełne zmiany upstream](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`, - fr_FR: `Met à jour Maple Proxy vers 0.3.2. +[Kod źródłowy upstream](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, + fr_FR: `Met à jour Maple Proxy vers 0.4.2. -- Vérifie l'enclave du backend avec les ancres de confiance de production, qui correspondent au backend par défaut. -- Inclut les mises à jour de sécurité des dépendances du projet amont. -- Met à jour le nginx de l'interface web vers 1.30.6 avec des correctifs de sécurité. +- Ajoute le point de terminaison \`/v1/systemone\`. +- Les clients navigateur peuvent désormais envoyer leur propre clé d'API dans l'en-tête \`Authorization\`. -[Modifications complètes du projet amont](https://github.com/OpenSecretCloud/maple-proxy/compare/v0.1.11...v0.3.2)`, +[Code source du projet amont](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, }, migrations: { up: async ({ effects }) => {}, From b0982324b54e5c7239e4282781c3695c3e2f037d Mon Sep 17 00:00:00 2001 From: helix-a <267227783+helix-a@users.noreply.github.com> Date: Sat, 24 Oct 2026 03:13:32 +0000 Subject: [PATCH 2/2] Proposed changes for #10 Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol --- README.md | 4 ++-- instructions.md | 2 ++ startos/main.ts | 2 +- startos/versions/current.ts | 15 ++++++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2a3625e..695064b 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ Each is bound on its own MultiHost and not masked. **The two are not separate surfaces.** nginx forwards `/v1/` to the API server, so the Web UI address answers API calls as well — exporting only the UI does not keep the API private. -**Cross-origin requests are enabled unconditionally**, so a page loaded from any origin can call the API from a browser that can reach the address. +**Cross-origin requests are enabled only when no server-side key is configured.** In that mode, browser clients must supply their own key in the `Authorization` header. Setting a server-side key disables CORS: the bundled same-origin chat page and non-browser clients still work, but browser clients on other origins cannot call the API. Upstream ignores the server-side key whenever CORS is enabled. Consequences worth being explicit about: with a server-side key configured, **reaching the address is enough to spend against that key** — there is no second credential. Treat both addresses as secrets, or leave the key unset and let each client bring its own. @@ -158,7 +158,7 @@ A restored instance comes back configured and working immediately, since nothing 1. **Inference is not local.** Prompts are forwarded to the configured backend, which by default is operated by Maple. 2. **Neither interface is authenticated by StartOS**, and with a server-side key, address knowledge is spending power. 3. **The Web UI address also serves the API**, so the two cannot be exported independently. -4. **CORS is on unconditionally** and is not configurable from the package. +4. **CORS is enabled only without a server-side key.** Browser clients on other origins require that mode and must supply their own key. 5. **The chat page is this package's own** — minimal, and not upstream's client. It keeps no history and stores nothing. 6. **The only configuration is the backend URL and the key.** Every other upstream setting is left at its default and is not exposed. diff --git a/instructions.md b/instructions.md index 4892e44..6a17bb7 100644 --- a/instructions.md +++ b/instructions.md @@ -32,6 +32,8 @@ Use the **API** interface address with any OpenAI-compatible client. Point the c If you saved an API key with the **Configure** action, anyone who can reach the API address can use that key without supplying one of their own — and because the Web UI serves the same API paths, its address works the same way. Treat both addresses as private, or leave the key empty and have each client bring its own. +Browser clients hosted on another origin require the saved API key to be empty and must send their own key in the `Authorization` header. Saving a key disables cross-origin browser access; the bundled Web UI and non-browser clients still work. + ### Configure action Run **Configure** any time to change your API key or backend URL. The service restarts to pick up the new values. diff --git a/startos/main.ts b/startos/main.ts index 1d830e1..c8d11d1 100644 --- a/startos/main.ts +++ b/startos/main.ts @@ -18,7 +18,7 @@ export const main = sdk.setupMain(async ({ effects }) => { MAPLE_HOST: '0.0.0.0', MAPLE_PORT: String(apiPort), MAPLE_BACKEND_URL, - MAPLE_ENABLE_CORS: 'true', + MAPLE_ENABLE_CORS: MAPLE_API_KEY ? 'false' : 'true', RUST_LOG: 'info', } if (MAPLE_API_KEY) { diff --git a/startos/versions/current.ts b/startos/versions/current.ts index 0a85c5c..86c15cd 100644 --- a/startos/versions/current.ts +++ b/startos/versions/current.ts @@ -6,31 +6,36 @@ export const current = VersionInfo.of({ en_US: `Updated Maple Proxy to 0.4.2. - Adds the \`/v1/systemone\` endpoint. -- Browser clients can now send their own API key in the \`Authorization\` header. +- Browser clients can now send their own API key in the \`Authorization\` header when no server-side key is saved. +- Saving a server-side key disables cross-origin browser access. The bundled Web UI and non-browser clients still work. [Upstream source](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, es_ES: `Actualiza Maple Proxy a 0.4.2. - Añade el endpoint \`/v1/systemone\`. -- Los clientes de navegador ahora pueden enviar su propia clave de API en el encabezado \`Authorization\`. +- Los clientes de navegador ahora pueden enviar su propia clave de API en el encabezado \`Authorization\` cuando no hay una clave guardada en el servidor. +- Guardar una clave en el servidor desactiva el acceso del navegador desde otros orígenes. La interfaz web incluida y los clientes que no son navegadores siguen funcionando. [Código del proyecto original](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, de_DE: `Aktualisiert Maple Proxy auf 0.4.2. - Fügt den Endpunkt \`/v1/systemone\` hinzu. -- Browser-Clients können jetzt ihren eigenen API-Schlüssel im \`Authorization\`-Header senden. +- Browser-Clients können jetzt ihren eigenen API-Schlüssel im \`Authorization\`-Header senden, wenn kein serverseitiger Schlüssel gespeichert ist. +- Ein gespeicherter serverseitiger Schlüssel deaktiviert den ursprungsübergreifenden Browserzugriff. Die integrierte Weboberfläche und Nicht-Browser-Clients funktionieren weiterhin. [Upstream-Quellcode](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, pl_PL: `Aktualizuje Maple Proxy do wersji 0.4.2. - Dodaje punkt końcowy \`/v1/systemone\`. -- Klienci przeglądarkowi mogą teraz wysyłać własny klucz API w nagłówku \`Authorization\`. +- Klienci przeglądarkowi mogą teraz wysyłać własny klucz API w nagłówku \`Authorization\`, gdy na serwerze nie zapisano klucza. +- Zapisanie klucza na serwerze wyłącza dostęp z przeglądarek z innych źródeł. Wbudowany interfejs WWW i klienci inni niż przeglądarki nadal działają. [Kod źródłowy upstream](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, fr_FR: `Met à jour Maple Proxy vers 0.4.2. - Ajoute le point de terminaison \`/v1/systemone\`. -- Les clients navigateur peuvent désormais envoyer leur propre clé d'API dans l'en-tête \`Authorization\`. +- Les clients navigateur peuvent désormais envoyer leur propre clé d'API dans l'en-tête \`Authorization\` lorsqu'aucune clé n'est enregistrée côté serveur. +- Enregistrer une clé côté serveur désactive l'accès des navigateurs depuis d'autres origines. L'interface web intégrée et les clients hors navigateur continuent de fonctionner. [Code source du projet amont](https://github.com/MaplePrivacyLabs/Maple/tree/master/proxy)`, },