adopt 0.4's persistent key store and browser setup form

The earlier bump took 0.4.1 for its model catalog and status page but
left PPQ_DATA_DIR unset, which disabled the key form the release exists
to add. Enable it, and let the proxy own the key outright.

PPQ_API_KEY is no longer passed. The volume's `proxy/` subpath mounts at
/data as PPQ_DATA_DIR, so upstream's key store is the single source of
truth: the Status Page and the Configure PPQ API Key action write the
same config.json, and there is no StartOS-side copy to revert what the
browser saved. A chown oneshot hands /data to the image's `node` user so
the page can write there.

Verbose Logging moves to store.json outside the mount, because upstream
rewrites config.json wholesale when a key is saved and would drop it.

main.ts watches config.json — upstream loads it once at startup, so the
watch is what makes the action take effect: the write restarts the
daemon, which reloads the file. A key saved on the page applies
immediately and converges through the same restart.

The task drops from critical to important. A critical task suspends
every other control, so it would have left the user unable to start the
service and reach the page's own form — and with PPQ_DATA_DIR set the
proxy no longer exits keyless; it attests, serves the page, and answers
401 until a key exists. main.ts clears the task when a key appears,
since saving on the page never touches the action that would clear it.

The action's key field is now validated against upstream's own
^sk-[A-Za-z0-9]{16,64}$ shape and no longer refuses a blank submission,
a key having become optional.
This commit is contained in:
helix-nine committed 2026-08-12 09:58:35 -06:00
1 parent 42b2841945
commit 8397c7b1eb
10 files changed
+213 -140

No files matched your search

+23 -17
View File
@@ -16,6 +16,7 @@ Two interfaces share one address:
- **Status Page** — a web page showing whether enclave attestation succeeded,
which private models are available, and how to point a client at the proxy.
It is also where you can save your API key.
- **OpenAI-Compatible API** — the same address, ready to copy into a client.
The only thing the service stores is your PPQ.AI API key and the logging
@@ -23,14 +24,21 @@ setting.
## Getting set up
1. You will be prompted to run **Configure PPQ API Key**. Paste an API key from
[ppq.ai](https://ppq.ai) — create one under **Settings → API Keys** and fund
the account, since usage is billed per query to this key.
2. The service starts and performs a cryptographic attestation of the remote
enclave. The health check reports ready once attestation is verified —
usually within a few seconds.
3. Open the **Status Page** to confirm attestation succeeded, or copy the
**OpenAI-Compatible API** address to point a client at it.
You need a funded API key from [ppq.ai](https://ppq.ai) — create one under
**Settings → API Keys**, since usage is billed per query to that key. You can
save it before or after starting the service; the proxy runs either way and
simply refuses inference requests until it has one.
1. Start the service. It performs a cryptographic attestation of the remote
enclave, which the health check reports as ready — usually within a few
seconds.
2. Open the **Status Page**, confirm attestation says _verified_, and paste your
key into the API key form. The proxy picks it up immediately, then restarts
once to persist it.
3. Copy the **OpenAI-Compatible API** address to point a client at it.
If you would rather not start the service first, run the **Configure PPQ API
Key** action instead of step 2 — it does the same thing from the Actions tab.
## Using PPQ Private Mode
@@ -51,22 +59,20 @@ export ANTHROPIC_BASE_URL="<api-address>"
export ANTHROPIC_MODEL="private/glm-5-2"
```
`GET <api-address>/v1/models` lists the available private models, and the
Status Page shows the same list.
`GET <api-address>/v1/models` lists the available private models, and the Status
Page shows the same list.
Requests are billed to your saved API key by default. To bill a different
PPQ.AI key per request, pass it as an `Authorization: Bearer` header.
### Actions
### Replacing the key
Run **Configure PPQ API Key** again whenever you want to replace the key or
turn verbose logging on or off. Leaving the key field blank keeps the key you
already saved.
Either surface works, and both write the same place: **Replace key** on the
Status Page, or the **Configure PPQ API Key** action. The action is also where
you turn Verbose Logging on and off; leaving its key field blank keeps the key
you already saved.
## Limitations
The Status Page has its own "save API key" form upstream; it is inactive here,
because the key is managed by the **Configure PPQ API Key** action instead.
Backups of this service include your saved API key, and restoring a backup
restores it — keep that in mind when handling backup drives.