PPQ Private Mode StartOS package

Wraps the ppq-private-mode-proxy (git submodule, built from its own
Dockerfile) as a StartOS 0.4.0 service:
- Critical first-run task + masked action to set the PPQ.AI API key
- OpenAI-/Anthropic-compatible API interface on port 8787
- Health check reflects enclave attestation (proxy binds only after
  attestation succeeds)
- x86_64 + aarch64, config backed up via the main volume

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
mattius459andClaude Fable 5 committed 2026-07-27 22:27:38 +02:00
commit b6b2589c55
40 files changed
+2532

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
import { i18n } from './i18n'
import { sdk } from './sdk'
import { apiPort } from './utils'
import { configJson } from './fileModels/config.json'
export const main = sdk.setupMain(async ({ effects }) => {
console.info(i18n('Starting PPQ Private Mode!'))
// Read reactively so the daemon restarts when the user changes settings.
const apiKey = await configJson.read((c) => c.apiKey).const(effects)
const debug = await configJson.read((c) => c.debug).const(effects)
return sdk.Daemons.of(effects).addDaemon('proxy', {
subcontainer: sdk.SubContainer.of(
effects,
{ imageId: 'proxy' },
sdk.Mounts.of().mountVolume({
volumeId: 'main',
subpath: null,
mountpoint: '/data',
readonly: false,
}),
'proxy-sub',
),
exec: {
command: ['node', '/app/dist/bin/server.js'],
env: {
PPQ_API_KEY: apiKey ?? '',
HOST: '0.0.0.0',
PORT: apiPort.toString(),
DEBUG: debug ? 'true' : 'false',
},
},
// The proxy only binds its port after remote attestation of the enclave
// succeeds, so a listening port means the encrypted channel is verified
// and ready.
ready: {
display: i18n('Encrypted Proxy'),
fn: () =>
sdk.healthCheck.checkPortListening(effects, apiPort, {
successMessage: i18n('The proxy is ready — enclave attestation verified'),
errorMessage: i18n('The proxy is not ready (enclave attestation pending)'),
}),
},
requires: [],
})
})