Merge pull request #6 from Start9-Community/chore/sdk-3.0.3
chore: move to start-sdk 3.0.3; 0.4.1:0 → 0.4.1:1
This commit is contained in:
19 files changed
+1186
-945
No files matched your search
@@ -3,15 +3,20 @@ name: Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths-ignore: ['*.md']
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches: ['main']
|
||||
paths-ignore: ['*.md']
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
||||
group: package-build-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event.pull_request.draft == false
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
|
||||
permissions:
|
||||
contents: read
|
||||
uses: Start9Labs/start-technologies/.github/workflows/build.yml@master
|
||||
# No DEV_KEY — a PR build doesn't publish, so it doesn't need the signing key.
|
||||
@@ -0,0 +1,18 @@
|
||||
name: Retarget Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [edited]
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: package-build-${{ github.event.changes.base && github.event.pull_request.number || format('metadata-{0}', github.event.pull_request.number) }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event.changes.base && github.event.pull_request.draft == false
|
||||
permissions:
|
||||
contents: read
|
||||
uses: Start9Labs/start-technologies/.github/workflows/build.yml@master
|
||||
@@ -3,6 +3,14 @@ name: Sync next
|
||||
# Carries every change that lands on the base branch onto the paired `next`
|
||||
# iteration branch, so `next` never drifts behind what has already shipped.
|
||||
# `next` is created on the first run if the repo does not have one yet.
|
||||
#
|
||||
# List every base branch this package maintains. Most packages have one; the
|
||||
# multi-branch packages list each major line or flavor (e.g. 28.x, 29.x). A
|
||||
# package whose default branch is `main` must say `main` here — a workflow
|
||||
# pointed at a branch the repo does not use never runs.
|
||||
#
|
||||
# No paths-ignore: a docs-only commit on the base still has to reach `next`,
|
||||
# or the next merge back re-introduces the stale copy.
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
"@start9labs/start-sdk/prettier.config.json"
|
||||
@@ -18,17 +18,23 @@ Freshly scaffolded? Work the
|
||||
guide page, not a file in this repo — read it, don't copy it in.
|
||||
|
||||
Keep `README.md` (technical reference for an AI support or administering agent) and
|
||||
`instructions.md` (end-user docs) in sync with your changes.
|
||||
`instructions.md` (end-user docs) in sync with your changes. This file restates neither:
|
||||
whoever changes the package has both, so it carries only what they don't — repo mechanics,
|
||||
a change that looks right and is not, where the next thing gets added, a naming trap, a
|
||||
build or test invocation particular to this repo.
|
||||
|
||||
**Fix a defect you spot rather than reporting it** — you have the package open and the
|
||||
context to be sure. File **a GitHub issue on this repo** only when the call isn't yours to
|
||||
make: you can't pin the cause down, two defensible fixes exist, or it's too large to ride on
|
||||
the work in hand. An open issue is a report, not a queue — implement one when you're asked
|
||||
to or when it's labelled `Approved`, then close it with `Closes #<n>`.
|
||||
|
||||
**Bugs and feature requests are GitHub issues on this repo** — file them as you find them.
|
||||
Don't record work in the repo instead: no `TODO.md`, no `NOTES.md`, no `PLAN.md`. What you
|
||||
verified, tried, and decided belongs in the commit message and the PR body.
|
||||
|
||||
## This repo
|
||||
|
||||
- **`config.json`'s shape must stay exactly upstream's.** The proxy rewrites the whole file when a key is saved on the Status Page, so anything the package adds there is destroyed. Package-owned settings go in `store.json` at the volume root — **outside** the `proxy/` subpath that is mounted — where the container cannot see or clobber them.
|
||||
- **Don't set `PPQ_API_KEY`.** Leaving it unset makes the proxy's own key store the single owner, so the action and the Status Page write the same key rather than competing.
|
||||
- **The task is `important`, not `critical`, on purpose.** A `critical` task suspends the ordinary controls, which would stop the user starting the service — and the Status Page is the other place a key can be saved. Blocking startup would block half the ways to complete the task.
|
||||
- **The key pattern is validated in the action** because upstream only validates on the Status Page — a malformed key written straight to `config.json` surfaces later as a 401 on the first request.
|
||||
- **A blank key field preserves the existing key**, so the action doubles as the way to toggle logging. Don't "fix" it to clear on empty.
|
||||
- **Default branch is `main`, not `master`.** Its CI workflows reference `main`; leave them.
|
||||
- **Put package-owned settings in `store.json`, never in `config.json`** — the proxy rewrites `config.json` whole when a key is saved on the Status Page.
|
||||
- **Don't set `PPQ_API_KEY`** — the proxy's own key store must stay the key's only owner, so the action and the Status Page write the same key.
|
||||
- **A blank key field keeps the saved key; don't "fix" it to clear on empty** — it is how the action toggles logging without re-entering the key.
|
||||
- **Default branch is `main`, not `master`.** Keep `main` in every workflow when resyncing them from the template.
|
||||
@@ -122,6 +122,7 @@ Sets the API key and the verbose-logging switch.
|
||||
- **Cost:** the service restarts, since the proxy reads its config at start.
|
||||
- **Repeat safety:** idempotent. **Leaving the key blank keeps the existing one** rather than clearing it, so the action can be used to toggle logging without re-entering the key.
|
||||
- **The key is never echoed back into the form.** The logging toggle is pre-filled; the key is not.
|
||||
- **Verbose logging** adds model information for accepted chat requests and logs OpenAI stream errors. Error messages may include sensitive content, even when verbose logging is off.
|
||||
- **The key's shape is checked before it is written.** Upstream's status page rejects a malformed key outright, but a bad key written straight into the config file would only surface later as a failed request — so the same check is applied here.
|
||||
|
||||
**Requests are billed to whichever key is set.**
|
||||
|
||||
+3
-1
@@ -70,7 +70,9 @@ PPQ.AI key per request, pass it as an `Authorization: Bearer` header.
|
||||
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.
|
||||
you already saved. Verbose Logging adds model information for accepted chat
|
||||
requests and logs OpenAI stream errors. Error messages may include sensitive
|
||||
content, even when Verbose Logging is off; review logs before sharing them.
|
||||
|
||||
## Limitations
|
||||
|
||||
|
||||
Generated
+1111
-894
File diff suppressed because it is too large.
Load diff
+1
-18
@@ -1,26 +1,9 @@
|
||||
{
|
||||
"name": "ppq-private-mode-startos",
|
||||
"scripts": {
|
||||
"build": "rm -rf ./javascript && ncc build startos/index.ts -o ./javascript",
|
||||
"prettier": "prettier --write startos",
|
||||
"check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@start9labs/start-sdk": "2.0.9"
|
||||
"@start9labs/start-sdk": "3.0.3"
|
||||
},
|
||||
"overrides": {
|
||||
"@start9labs/start-sdk": "$@start9labs/start-sdk"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.19.0",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"prettier": "^3.6.2",
|
||||
"typescript": "^6.0.3"
|
||||
},
|
||||
"prettier": {
|
||||
"trailingComma": "all",
|
||||
"tabWidth": 2,
|
||||
"semi": false,
|
||||
"singleQuote": true
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ const inputSpec = InputSpec.of({
|
||||
debug: Value.toggle({
|
||||
name: i18n('Verbose Logging'),
|
||||
description: i18n(
|
||||
'Log every request the proxy handles. Useful for troubleshooting.',
|
||||
'Logs the model for accepted chat requests and OpenAI stream errors. Error messages may include sensitive content, even when Verbose Logging is off.',
|
||||
),
|
||||
default: false,
|
||||
}),
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { sdk } from './sdk'
|
||||
|
||||
export const setDependencies = sdk.setupDependencies(
|
||||
async ({ effects }) => ({}),
|
||||
)
|
||||
export const dependencies = sdk.Dependencies.of()
|
||||
@@ -5,7 +5,7 @@ import { sdk } from '../sdk'
|
||||
// loads the key from here at startup and rewrites the whole file when one is
|
||||
// saved from the status page, so this shape must stay exactly upstream's and
|
||||
// nothing else may live in it — see fileModels/store.json.ts.
|
||||
const shape = z.object({
|
||||
const shape = z.looseObject({
|
||||
apiKey: z.string().optional().catch(undefined),
|
||||
})
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { sdk } from '../sdk'
|
||||
|
||||
// Package-owned settings, kept outside the mounted PPQ_DATA_DIR subtree so the
|
||||
// proxy neither sees them nor overwrites them.
|
||||
const shape = z.object({
|
||||
const shape = z.looseObject({
|
||||
debug: z.boolean().catch(false),
|
||||
})
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ const dict = {
|
||||
'Your API key from ppq.ai (Settings → API Keys). Leave blank to keep the key already saved, or to set one later from the Status Page.': 9,
|
||||
'A PPQ.AI key starts with "sk-".': 10,
|
||||
'Verbose Logging': 11,
|
||||
'Log every request the proxy handles. Useful for troubleshooting.': 12,
|
||||
'Logs the model for accepted chat requests and OpenAI stream errors. Error messages may include sensitive content, even when Verbose Logging is off.': 12,
|
||||
'Configure PPQ API Key': 13,
|
||||
'Set the PPQ.AI API key the proxy uses to authenticate. Requests are billed to this key.': 14,
|
||||
// init/taskConfigureApiKey.ts
|
||||
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
9: 'Tu clave API de ppq.ai (Ajustes → Claves API). Déjalo en blanco para conservar la clave ya guardada, o para configurar una más tarde desde la Página de estado.',
|
||||
10: 'Una clave de PPQ.AI empieza por «sk-».',
|
||||
11: 'Registro detallado',
|
||||
12: 'Registra cada solicitud que maneja el proxy. Útil para diagnosticar problemas.',
|
||||
12: 'Registra el modelo de las solicitudes de chat aceptadas y los errores de streaming de OpenAI. Los mensajes de error pueden incluir contenido sensible, incluso cuando el Registro detallado está desactivado.',
|
||||
13: 'Configurar clave API de PPQ',
|
||||
14: 'Establece la clave API de PPQ.AI que el proxy usa para autenticarse. Las solicitudes se facturan a esta clave.',
|
||||
15: 'Añade aquí tu clave API de PPQ.AI, o inicia el servicio y guárdala en la Página de estado',
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
9: 'Dein API-Schlüssel von ppq.ai (Einstellungen → API-Schlüssel). Leer lassen, um den bereits gespeicherten Schlüssel zu behalten oder später auf der Statusseite einen festzulegen.',
|
||||
10: 'Ein PPQ.AI-Schlüssel beginnt mit „sk-“.',
|
||||
11: 'Ausführliche Protokollierung',
|
||||
12: 'Protokolliert jede Anfrage, die der Proxy verarbeitet. Nützlich zur Fehlersuche.',
|
||||
12: 'Protokolliert das Modell akzeptierter Chat-Anfragen und OpenAI-Streamingfehler. Fehlermeldungen können sensible Inhalte enthalten, auch wenn die Ausführliche Protokollierung deaktiviert ist.',
|
||||
13: 'PPQ-API-Schlüssel konfigurieren',
|
||||
14: 'Lege den PPQ.AI-API-Schlüssel fest, mit dem sich der Proxy authentifiziert. Anfragen werden diesem Schlüssel in Rechnung gestellt.',
|
||||
15: 'Füge deinen PPQ.AI-API-Schlüssel hier hinzu, oder starte den Dienst und speichere ihn auf der Statusseite',
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
9: 'Twój klucz API z ppq.ai (Ustawienia → Klucze API). Pozostaw puste, aby zachować już zapisany klucz lub ustawić go później na Stronie stanu.',
|
||||
10: 'Klucz PPQ.AI zaczyna się od „sk-”.',
|
||||
11: 'Szczegółowe logowanie',
|
||||
12: 'Rejestruje każde żądanie obsługiwane przez proxy. Przydatne przy rozwiązywaniu problemów.',
|
||||
12: 'Rejestruje model zaakceptowanych żądań czatu i błędy strumieniowania OpenAI. Komunikaty błędów mogą zawierać poufne treści, nawet gdy Szczegółowe logowanie jest wyłączone.',
|
||||
13: 'Skonfiguruj klucz API PPQ',
|
||||
14: 'Ustaw klucz API PPQ.AI, którym proxy się uwierzytelnia. Żądania są rozliczane na ten klucz.',
|
||||
15: 'Dodaj tutaj swój klucz API PPQ.AI albo uruchom usługę i zapisz go na Stronie stanu',
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
9: "Votre clé API de ppq.ai (Paramètres → Clés API). Laissez vide pour conserver la clé déjà enregistrée, ou pour en définir une plus tard depuis la Page d'état.",
|
||||
10: 'Une clé PPQ.AI commence par « sk- ».',
|
||||
11: 'Journalisation détaillée',
|
||||
12: 'Journalise chaque requête traitée par le proxy. Utile pour le dépannage.',
|
||||
12: "Journalise le modèle des requêtes de chat acceptées et les erreurs de streaming OpenAI. Les messages d'erreur peuvent inclure du contenu sensible, même lorsque la Journalisation détaillée est désactivée.",
|
||||
13: 'Configurer la clé API PPQ',
|
||||
14: "Définissez la clé API PPQ.AI avec laquelle le proxy s'authentifie. Les requêtes sont facturées sur cette clé.",
|
||||
15: "Ajoutez ici votre clé API PPQ.AI, ou démarrez le service et enregistrez-la sur la Page d'état",
|
||||
|
||||
+2
-1
@@ -8,4 +8,5 @@ export { actions } from './actions'
|
||||
import { buildManifest } from '@start9labs/start-sdk'
|
||||
import { manifest as sdkManifest } from './manifest'
|
||||
import { versionGraph } from './versions'
|
||||
export const manifest = buildManifest(versionGraph, sdkManifest)
|
||||
import { dependencies } from './dependencies'
|
||||
export const manifest = buildManifest(versionGraph, sdkManifest, dependencies)
|
||||
@@ -1,5 +1,5 @@
|
||||
import { sdk } from '../sdk'
|
||||
import { setDependencies } from '../dependencies'
|
||||
import { dependencies } from '../dependencies'
|
||||
import { setInterfaces } from '../interfaces'
|
||||
import { versionGraph } from '../versions'
|
||||
import { actions } from '../actions'
|
||||
@@ -10,8 +10,8 @@ export const init = sdk.setupInit(
|
||||
restoreInit,
|
||||
versionGraph,
|
||||
setInterfaces,
|
||||
setDependencies,
|
||||
actions,
|
||||
dependencies,
|
||||
taskConfigureApiKey,
|
||||
)
|
||||
|
||||
|
||||
@@ -22,5 +22,4 @@ export const manifest = setupManifest({
|
||||
arch: ['x86_64', 'aarch64'],
|
||||
},
|
||||
},
|
||||
dependencies: {},
|
||||
})
|
||||
@@ -2,13 +2,15 @@ import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'
|
||||
|
||||
export const current = VersionInfo.of({
|
||||
// Tracks upstream ppq-private-mode-proxy (package.json version).
|
||||
version: '0.4.1:0',
|
||||
version: '0.4.1:1',
|
||||
releaseNotes: {
|
||||
en_US: 'Initial release for StartOS',
|
||||
es_ES: 'Lanzamiento inicial para StartOS',
|
||||
de_DE: 'Erstveröffentlichung für StartOS',
|
||||
pl_PL: 'Pierwsze wydanie dla StartOS',
|
||||
fr_FR: 'Version initiale pour StartOS',
|
||||
en_US: '- The Verbose Logging setting explains what it logs.',
|
||||
es_ES: '- El ajuste Registro detallado explica qué registra.',
|
||||
de_DE:
|
||||
'- Die Einstellung Ausführliche Protokollierung erklärt, was sie protokolliert.',
|
||||
pl_PL: '- Ustawienie Szczegółowe logowanie wyjaśnia, co jest rejestrowane.',
|
||||
fr_FR:
|
||||
"- Le réglage Journalisation détaillée explique ce qu'il journalise.",
|
||||
},
|
||||
migrations: {
|
||||
up: async ({ effects }) => {},
|
||||
|
||||
Reference in new issue
Block a user