diff --git a/apps/hosted/README.md b/apps/hosted/README.md index 4eee9763c9..53c9ba4884 100644 --- a/apps/hosted/README.md +++ b/apps/hosted/README.md @@ -4,14 +4,14 @@ that drives Studio's agent from a browser. It exposes the same capabilities the desktop app reaches over IPC, but over HTTP, so the portable `apps/ui` renderer can talk to it through the **web connector** -(`apps/ui/src/data/core/connectors/web`). +(`apps/ui/src/data/core/connectors/hosted`). Unlike the desktop app and CLI, this targets a hosted deployment — WordPress.com / Telex APIs and a server-side agent sandbox — not a local WordPress install. It deliberately depends on nothing in `apps/cli`. ``` -npm run build:web --workspace=apps/ui # once, or after UI changes +npm run build:hosted --workspace=apps/ui # once, or after UI changes npm run build --workspace=apps/hosted # build the server bundle npm run start --workspace=apps/hosted # listens on 127.0.0.1:8088 (STUDIO_WEB_SERVER_PORT) ``` diff --git a/apps/hosted/src/index.ts b/apps/hosted/src/index.ts index aa5429a631..97a700b7db 100644 --- a/apps/hosted/src/index.ts +++ b/apps/hosted/src/index.ts @@ -328,14 +328,14 @@ app.use( '/api', api ); // --- Web UI ------------------------------------------------------------------ -// Serve the built browser UI (apps/ui `npm run build:web`) so the server is the +// Serve the built browser UI (apps/ui `npm run build:hosted`) so the server is the // only process needed: API and SPA share one origin. When the build output // isn't there (API-only usage, or UI served by the Vite dev server on :5300), // the server still works and the startup message says how to get the UI. const uiDist = process.env.STUDIO_WEB_UI_DIST ?? - path.resolve( path.dirname( fileURLToPath( import.meta.url ) ), '../../ui/dist-web' ); -const uiIndex = path.join( uiDist, 'index.web.html' ); + path.resolve( path.dirname( fileURLToPath( import.meta.url ) ), '../../ui/dist-hosted' ); +const uiIndex = path.join( uiDist, 'index.hosted.html' ); const hasUi = existsSync( uiIndex ); if ( hasUi ) { app.use( express.static( uiDist ) ); @@ -374,7 +374,7 @@ const server = app.listen( port, '127.0.0.1', () => { if ( ! hasUi ) { console.log( `No web UI build found at ${ uiDist }.` ); console.log( - `Build it with \`npm run build:web --workspace=apps/ui\`, or run the dev server with \`npm run dev:web --workspace=apps/ui\` and open http://localhost:5300.` + `Build it with \`npm run build:hosted --workspace=apps/ui\`, or run the dev server with \`npm run dev:hosted --workspace=apps/ui\` and open http://localhost:5300.` ); console.log( '' ); } diff --git a/apps/ui/index.web.html b/apps/ui/index.hosted.html similarity index 68% rename from apps/ui/index.web.html rename to apps/ui/index.hosted.html index a5e1268de4..22b240c16f 100644 --- a/apps/ui/index.web.html +++ b/apps/ui/index.hosted.html @@ -3,10 +3,10 @@
-