@ggui-ai/dev-stack 0.2.0-alpha.3 → 0.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  * - The dev server binds to `127.0.0.1` by default, so the *primary*
7
7
  * trust boundary is the loopback interface. This module adds a
8
8
  * belt-and-suspenders token + origin check so the same server can
9
- * also be reached by a browser-side Studio preview opened in a
9
+ * also be reached by a browser-side preview UI opened in a
10
10
  * different localhost port (different origin → CORS-regulated)
11
11
  * without inventing a wide-open public-by-default posture.
12
12
  *
@@ -15,7 +15,7 @@
15
15
  * `crypto.randomBytes(24)` on boot. The CLI prints the token + a
16
16
  * ready-to-curl `Authorization` header so the developer can paste
17
17
  * it wherever they need. `/health` is intentionally unauthenticated
18
- * — any reachability check, Studio handshake probe, or liveness
18
+ * — any reachability check, client handshake probe, or liveness
19
19
  * monitor wants this path without needing the token first.
20
20
  *
21
21
  * - Origin allowlist: browser clients must send `Origin` matching an
@@ -23,7 +23,7 @@
23
23
  * port (`http(s)://localhost:NNNN` / `http(s)://127.0.0.1:NNNN`).
24
24
  * Extra origins can be declared via `GGUI_DEV_ORIGINS` as a
25
25
  * comma-separated exact-match list — no wildcards by design,
26
- * Studio's real hostname goes in explicitly or not at all.
26
+ * a remote client's real hostname goes in explicitly or not at all.
27
27
  *
28
28
  * - Non-browser clients (no `Origin` header) pass the origin check;
29
29
  * they are gated by the bearer token alone. That matches `curl`
@@ -19,8 +19,8 @@ export function openEventStream(req, res, registry, options = {}) {
19
19
  'x-accel-buffering': 'no',
20
20
  });
21
21
  // Initial hello — lets the client know the stream is live
22
- // before any UI event fires. Studio uses this to flip its
23
- // status indicator to "live."
22
+ // before any UI event fires. An authoring UI uses this to flip
23
+ // its status indicator to "live."
24
24
  res.write(`event: hello\ndata: {"ok":true}\n\n`);
25
25
  const unsubscribe = registry.subscribe((event) => {
26
26
  try {
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * No write verbs, no subscribe. The `UiRegistry.capabilities` probe
12
12
  * exposed on `LocalUiRegistry` already declares this publicly; the
13
- * endpoints are strictly GETs so hosts / Studio can't accidentally
13
+ * endpoints are strictly GETs so consuming hosts can't accidentally
14
14
  * attempt a publish against a read-only source.
15
15
  *
16
16
  * Security posture:
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * No write verbs, no subscribe. The `UiRegistry.capabilities` probe
12
12
  * exposed on `LocalUiRegistry` already declares this publicly; the
13
- * endpoints are strictly GETs so hosts / Studio can't accidentally
13
+ * endpoints are strictly GETs so consuming hosts can't accidentally
14
14
  * attempt a publish against a read-only source.
15
15
  *
16
16
  * Security posture:
@@ -201,8 +201,8 @@ async function handleRequest(req, res, options) {
201
201
  writeJson(res, 404, { error: 'not-found', id });
202
202
  return;
203
203
  case 'missing-entry':
204
- // 404 still — the contract is "no bundle," Studio collapses
205
- // this to the "no preview available" state. The body gives
204
+ // 404 still — the contract is "no bundle," consumers
205
+ // collapse this to a "no preview available" state. The body gives
206
206
  // the developer the exact list of paths we searched so they
207
207
  // know what to add (a `ggui.ui.tsx` beside the manifest, or
208
208
  // an `entryPoint` field in `ggui.ui.json`).
@@ -218,8 +218,8 @@ async function handleRequest(req, res, options) {
218
218
  // 422 Unprocessable Entity — the server understood the
219
219
  // request but couldn't produce output because the source
220
220
  // fails to compile. Body carries structured esbuild errors
221
- // so Studio can render the first error with its file /
222
- // line / column / highlighted line.
221
+ // so a consuming UI can render the first error with its
222
+ // file / line / column / highlighted line.
223
223
  writeJson(res, 422, {
224
224
  error: 'compile-failed',
225
225
  id,
@@ -8,7 +8,7 @@
8
8
  * compile/runtime errors, recent runtime events/logs,
9
9
  * code-first local observability
10
10
  *
11
- * IS NOT: Studio-lite, starter gallery, no-code authoring,
11
+ * IS NOT: a full authoring UI, starter gallery, no-code authoring,
12
12
  * billing/workspace UI, NL playground, deploy flow,
13
13
  * tunnel flow
14
14
  *
@@ -202,7 +202,7 @@ button.preview-clear:hover { color: #e7e7e7; border-color: #3a3a3a; }
202
202
  * send `Authorization`). On every `event: ui` frame, refreshes
203
203
  * the registry-panel fetches immediately — so the `Discovered
204
204
  * UIs` list + registry counts flip on save before the next
205
- * poll tick fires. Same HMR mechanism Studio uses.
205
+ * poll tick fires. Same HMR mechanism an authoring UI uses.
206
206
  * - Live indicator (`#live`) paints connecting / live /
207
207
  * reconnecting / offline; independent from the data-freshness
208
208
  * tick.
@@ -531,8 +531,8 @@ const HUB_JS = `
531
531
  }
532
532
 
533
533
  /**
534
- * Minimal SSE parser — same shape the dev server emits and the
535
- * Studio local source consumes. Normalises CRLF, splits on the
534
+ * Minimal SSE parser — same shape the dev server emits and an
535
+ * authoring-UI local source consumes. Normalises CRLF, splits on the
536
536
  * blank-line delimiter, ignores ':keep-alive' comment frames,
537
537
  * and only dispatches 'event: ui' with a valid JSON body.
538
538
  */