From 147f51d7105808003f6379dd2b2e28344518fa12 Mon Sep 17 00:00:00 2001 From: spacesops Date: Tue, 26 May 2026 12:19:51 -0400 Subject: [PATCH] Rename SUBSD_* env vars to SUBS_* to match upstream refactor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upstream SpacesOps app refactored its SUBSD_* environment variables to SUBS_* (verified against server.js in spacesops/spacesops:v1.0.0). Update the package to match so the configured values reach the app: - main.ts: inject SUBS_URI_VALUE / SUBS_RPC_USER / SUBS_RPC_PASSWORD. - configurePlatform action + storeJson: rename store keys subsd*→subs* and the field labels/descriptions (SUBS URL / SUBS RPC User / SUBS RPC Password). - README, instructions, release notes: SUBSD→SUBS. Note: the image's /app/setup-spacesops-env.sh still exports SUBSD_* defaults (partial upstream refactor) — see report; vars the package does not set (e.g. SUBS_RPC_URL) currently have no in-image default. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 19 +++++++++-------- instructions.md | 2 +- startos/actions/configurePlatform.ts | 32 ++++++++++++++-------------- startos/fileModels/storeJson.ts | 6 +++--- startos/i18n/dictionaries/default.ts | 14 ++++++------ startos/main.ts | 6 +++--- startos/versions/v1.0.0.0.ts | 2 +- 7 files changed, 41 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 48e9042..e666c2d 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ declarations do not gate startup; SpacesOps handles readiness itself.) | `OPERATOR_SECRET_HEX` / `OPERATOR_PUBLIC_HEX` (generated or imported) | | | `PLATFORM_SESSION_SECRET` (generated) | | | `SPACED_RPC_*` (auto-wired from Spaces) | | -| Optional: `OPERATOR_RELAY`, `PLATFORM_MODE`, `COINGECKO_*`, `SUBSD_*` (via **Configure Platform**) | | +| Optional: `OPERATOR_RELAY`, `PLATFORM_MODE`, `COINGECKO_*`, `SUBS_*` (via **Configure Platform**) | | ## Network Access and Interfaces @@ -116,7 +116,7 @@ declarations do not gate startup; SpacesOps handles readiness itself.) | `show-operator-credentials` | Show Operator Credentials | Enabled | Any | — | Displays the Nostr operator keypair: npub (QR), hex public key, and the masked nsec / hex secret. | | `import-operator-key` | Import Operator Key | Enabled | Any | 64-char hex secret key | Replaces the operator keypair. Derives the public key automatically. **Warns** that it changes the operator identity; the service restarts to apply it. | | `show-admin-credentials` | Show Admin Credentials | Enabled | Any | — | Displays the **fixed** built-in admin login (`admin` / `Whatever!`) with a security warning. | -| `configure-platform` | Configure Platform | Enabled | Any | relay, mode, CoinGecko, SUBSD (all optional) | Sets the Nostr relay, theme mode, pricing, and SUBSD backend. Saving restarts the service. | +| `configure-platform` | Configure Platform | Enabled | Any | relay, mode, CoinGecko, SUBS (all optional) | Sets the Nostr relay, theme mode, pricing, and SUBS backend. Saving restarts the service. | ## Backups and Restore @@ -147,10 +147,11 @@ volume is **not** part of this package's backup. StartOS reverse proxy can reach the app (it otherwise binds `127.0.0.1:3000`). 4. **Subname-purchase and pricing are off by default.** They activate only when you fill in the relevant fields in **Configure Platform** (`COINGECKO_*` for - pricing, `SUBSD_*` for subname purchase + cert-callback flows). -5. **SUBSD is not auto-wired to the Spaces subs daemon in v1.** The Spaces subs - daemon listens on 7777 with a different API/auth than the SUBSD-on-7244 this - app expects, so SUBSD must be configured manually if used. + pricing, `SUBS_*` for subname purchase + cert-callback flows). +5. **The SUBS backend is not auto-wired to the Spaces subs daemon in v1.** The + Spaces service's subs daemon listens on 7777 with a different API/auth than + the SUBS endpoint (port 7244) SpacesOps expects, so SUBS must be configured + manually if used. ## What Is Unchanged from Upstream @@ -192,9 +193,9 @@ startos_managed_env_vars: optional_env_vars: # only set when configured via configure-platform - COINGECKO_API_KEY - COINGECKO_TOKEN_COINS - - SUBSD_URI_VALUE - - SUBSD_RPC_USER - - SUBSD_RPC_PASSWORD + - SUBS_URI_VALUE + - SUBS_RPC_USER + - SUBS_RPC_PASSWORD admin_credentials: username: admin password: Whatever! # FIXED, baked into image, cannot be changed diff --git a/instructions.md b/instructions.md index 3064001..b35bb1f 100644 --- a/instructions.md +++ b/instructions.md @@ -44,7 +44,7 @@ your LAN, and do **not** expose its admin routes to the public internet. - **Show Admin Credentials** — view the fixed admin login (with the warning above). - **Configure Platform** — optionally set the Nostr relay, theme mode, CoinGecko - pricing, and a SUBSD backend. Pricing and subname-purchase features stay off + pricing, and a SUBS backend. Pricing and subname-purchase features stay off until you configure them here. Saving restarts the service. ## Backups diff --git a/startos/actions/configurePlatform.ts b/startos/actions/configurePlatform.ts index 7e3a8eb..771404c 100644 --- a/startos/actions/configurePlatform.ts +++ b/startos/actions/configurePlatform.ts @@ -65,10 +65,10 @@ const inputSpec = InputSpec.of({ minLength: null, maxLength: null, }), - subsdUrl: Value.text({ - name: i18n('SUBSD URL'), + subsUrl: Value.text({ + name: i18n('SUBS URL'), description: i18n( - 'Optional SUBSD service URL (SUBSD_URI_VALUE) for the subname-purchase flow. Leave blank to disable.', + 'Optional SUBS service URL (SUBS_URI_VALUE) for the subname-purchase flow. Leave blank to disable.', ), warning: null, footnote: null, @@ -79,9 +79,9 @@ const inputSpec = InputSpec.of({ minLength: null, maxLength: null, }), - subsdUser: Value.text({ - name: i18n('SUBSD RPC User'), - description: i18n('Optional SUBSD RPC username (SUBSD_RPC_USER).'), + subsUser: Value.text({ + name: i18n('SUBS RPC User'), + description: i18n('Optional SUBS RPC username (SUBS_RPC_USER).'), warning: null, footnote: null, default: null, @@ -91,9 +91,9 @@ const inputSpec = InputSpec.of({ minLength: null, maxLength: null, }), - subsdPassword: Value.text({ - name: i18n('SUBSD RPC Password'), - description: i18n('Optional SUBSD RPC password (SUBSD_RPC_PASSWORD).'), + subsPassword: Value.text({ + name: i18n('SUBS RPC Password'), + description: i18n('Optional SUBS RPC password (SUBS_RPC_PASSWORD).'), warning: null, footnote: null, default: null, @@ -113,7 +113,7 @@ export const configurePlatform = sdk.Action.withInput( async ({ effects }) => ({ name: i18n('Configure Platform'), description: i18n( - 'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, and SUBSD backend. Saving restarts the service so the new settings take effect.', + 'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, and SUBS backend. Saving restarts the service so the new settings take effect.', ), warning: null, allowedStatuses: 'any', @@ -133,9 +133,9 @@ export const configurePlatform = sdk.Action.withInput( coingeckoApiKey: store?.coingeckoApiKey ?? null, coingeckoTokenCoins: store?.coingeckoTokenCoins ?? DEFAULT_COINGECKO_TOKEN_COINS, - subsdUrl: store?.subsdUrl ?? null, - subsdUser: store?.subsdUser ?? null, - subsdPassword: store?.subsdPassword ?? null, + subsUrl: store?.subsUrl ?? null, + subsUser: store?.subsUser ?? null, + subsPassword: store?.subsPassword ?? null, } }, @@ -146,9 +146,9 @@ export const configurePlatform = sdk.Action.withInput( platformMode: input.platformMode, coingeckoApiKey: input.coingeckoApiKey || null, coingeckoTokenCoins: input.coingeckoTokenCoins || null, - subsdUrl: input.subsdUrl || null, - subsdUser: input.subsdUser || null, - subsdPassword: input.subsdPassword || null, + subsUrl: input.subsUrl || null, + subsUser: input.subsUser || null, + subsPassword: input.subsPassword || null, }) return { diff --git a/startos/fileModels/storeJson.ts b/startos/fileModels/storeJson.ts index 5bf62d5..1cc93a4 100644 --- a/startos/fileModels/storeJson.ts +++ b/startos/fileModels/storeJson.ts @@ -13,9 +13,9 @@ const shape = z.object({ operatorRelay: z.string().nullable().catch(null), coingeckoApiKey: z.string().nullable().catch(null), coingeckoTokenCoins: z.string().nullable().catch(null), - subsdUrl: z.string().nullable().catch(null), - subsdUser: z.string().nullable().catch(null), - subsdPassword: z.string().nullable().catch(null), + subsUrl: z.string().nullable().catch(null), + subsUser: z.string().nullable().catch(null), + subsPassword: z.string().nullable().catch(null), }) export const storeJson = FileHelper.json( diff --git a/startos/i18n/dictionaries/default.ts b/startos/i18n/dictionaries/default.ts index 482e64b..c850ba7 100644 --- a/startos/i18n/dictionaries/default.ts +++ b/startos/i18n/dictionaries/default.ts @@ -9,14 +9,14 @@ const dict = { 'Optional CoinGecko API key (COINGECKO_API_KEY) used for pricing features. Leave blank to disable pricing.': 5, 'CoinGecko Token Coins': 6, 'The CoinGecko coin id(s) to price against (COINGECKO_TOKEN_COINS).': 7, - 'SUBSD URL': 8, - 'Optional SUBSD service URL (SUBSD_URI_VALUE) for the subname-purchase flow. Leave blank to disable.': 9, - 'SUBSD RPC User': 10, - 'Optional SUBSD RPC username (SUBSD_RPC_USER).': 11, - 'SUBSD RPC Password': 12, - 'Optional SUBSD RPC password (SUBSD_RPC_PASSWORD).': 13, + 'SUBS URL': 8, + 'Optional SUBS service URL (SUBS_URI_VALUE) for the subname-purchase flow. Leave blank to disable.': 9, + 'SUBS RPC User': 10, + 'Optional SUBS RPC username (SUBS_RPC_USER).': 11, + 'SUBS RPC Password': 12, + 'Optional SUBS RPC password (SUBS_RPC_PASSWORD).': 13, 'Configure Platform': 14, - 'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, and SUBSD backend. Saving restarts the service so the new settings take effect.': 15, + 'Set optional SpacesOps settings: Nostr relay, theme mode, CoinGecko pricing, and SUBS backend. Saving restarts the service so the new settings take effect.': 15, Success: 16, 'Platform configuration saved. The service is restarting to apply the new settings.': 17, 'Operator Secret Key (hex)': 18, diff --git a/startos/main.ts b/startos/main.ts index b2949ad..468edad 100644 --- a/startos/main.ts +++ b/startos/main.ts @@ -102,9 +102,9 @@ export const main = sdk.setupMain(async ({ effects }) => { if (store.coingeckoApiKey) env.COINGECKO_API_KEY = store.coingeckoApiKey if (store.coingeckoTokenCoins) env.COINGECKO_TOKEN_COINS = store.coingeckoTokenCoins - if (store.subsdUrl) env.SUBSD_URI_VALUE = store.subsdUrl - if (store.subsdUser) env.SUBSD_RPC_USER = store.subsdUser - if (store.subsdPassword) env.SUBSD_RPC_PASSWORD = store.subsdPassword + if (store.subsUrl) env.SUBS_URI_VALUE = store.subsUrl + if (store.subsUser) env.SUBS_RPC_USER = store.subsUser + if (store.subsPassword) env.SUBS_RPC_PASSWORD = store.subsPassword return sdk.Daemons.of(effects).addDaemon('spacesops', { subcontainer: sub, diff --git a/startos/versions/v1.0.0.0.ts b/startos/versions/v1.0.0.0.ts index 50bac33..f317ee6 100644 --- a/startos/versions/v1.0.0.0.ts +++ b/startos/versions/v1.0.0.0.ts @@ -8,7 +8,7 @@ export const v_1_0_0_0 = VersionInfo.of({ - Depends on the Spaces service and auto-connects to its spaced JSON-RPC at spaces.startos:7225 by reading the Spaces RPC credentials from the mounted Spaces volume. - Generates a Nostr operator keypair and a strong session secret on first install. "Show Operator Credentials" and "Import Operator Key" actions manage the keypair. - "Show Admin Credentials" surfaces the fixed, well-known admin login baked into the image, with a warning to keep the service private. -- "Configure Platform" optionally sets the Nostr relay, theme mode, CoinGecko pricing, and SUBSD backend.`, +- "Configure Platform" optionally sets the Nostr relay, theme mode, CoinGecko pricing, and SUBS backend.`, }, migrations: { up: async ({ effects }) => {},