From 4cda453c8a80168ead2625aba1cb639f1891ee05 Mon Sep 17 00:00:00 2001 From: Grant Date: Tue, 12 May 2026 11:07:51 -0500 Subject: [PATCH] 0.1.0:4 - expose /api/endpoints as separate StartOS service interface Adds a second sdk.createInterface with type='api' and path='/api/endpoints' on the same uiPort (9999). StartOS dashboard now shows two service interfaces: Web UI and OpenAI-compatible API. The API URL is discoverable to other services without users needing to remember the /api/endpoints suffix. --- package/startos/i18n/dictionaries/default.ts | 4 ++++ package/startos/interfaces.ts | 17 +++++++++++++++-- package/startos/versions/v0_1_0.ts | 4 ++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/package/startos/i18n/dictionaries/default.ts b/package/startos/i18n/dictionaries/default.ts index ea12930..b86804b 100644 --- a/package/startos/i18n/dictionaries/default.ts +++ b/package/startos/i18n/dictionaries/default.ts @@ -14,6 +14,10 @@ const dict = { // actions 'Show Public Key': 6, 'Configure Sparks': 7, + + // interfaces.ts (api) + 'OpenAI-compatible API': 8, + 'Service-discovery JSON at /api/endpoints. Other apps on the LAN can GET this to learn the current vLLM, Parakeet, and Magpie URLs.': 9, } as const /** diff --git a/package/startos/interfaces.ts b/package/startos/interfaces.ts index 8879678..d493792 100644 --- a/package/startos/interfaces.ts +++ b/package/startos/interfaces.ts @@ -18,8 +18,21 @@ export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => { path: '', query: {}, }) + const api = sdk.createInterface(effects, { + name: i18n('OpenAI-compatible API'), + id: 'api', + description: i18n( + 'Service-discovery JSON at /api/endpoints. Other apps on the LAN can GET this to learn the current vLLM, Parakeet, and Magpie URLs.', + ), + type: 'api', + masked: false, + schemeOverride: null, + username: null, + path: '/api/endpoints', + query: {}, + }) - const uiReceipt = await uiMultiOrigin.export([ui]) + const receipt = await uiMultiOrigin.export([ui, api]) - return [uiReceipt] + return [receipt] }) diff --git a/package/startos/versions/v0_1_0.ts b/package/startos/versions/v0_1_0.ts index f5a6188..8d18757 100644 --- a/package/startos/versions/v0_1_0.ts +++ b/package/startos/versions/v0_1_0.ts @@ -1,10 +1,10 @@ import { VersionInfo, IMPOSSIBLE } from '@start9labs/start-sdk' export const v0_1_0 = VersionInfo.of({ - version: '0.1.0:3', + version: '0.1.0:4', releaseNotes: { en_US: - 'Show Public Key: install command moved to its own copy box (cleaner than mixing it into the description). New /api/endpoints route for service discovery — other services on your LAN can GET it to learn vLLM/Parakeet/Magpie base URLs and current model without hardcoding Spark IPs.', + 'Expose /api/endpoints as a separate StartOS service interface (type: api) so it appears alongside Web UI in the dashboard and gets its own discoverable URL.', }, migrations: { up: async ({ effects }) => {},