diff --git a/.github/workflows/studio-build.yml b/.github/workflows/studio-build.yml index 150ed957d..2b241150f 100644 --- a/.github/workflows/studio-build.yml +++ b/.github/workflows/studio-build.yml @@ -110,7 +110,7 @@ jobs: with: deno-version: v2.x - - name: Setup Node.js (playground vite build) + - name: Setup Node.js (studio-ui vite build) uses: actions/setup-node@v6 with: node-version: '24' @@ -139,15 +139,15 @@ jobs: # `npm install` runs `prepare: svelte-kit sync` for each SvelteKit # package and generates `.svelte-kit/tsconfig.json`, which is what # `packages/ui/tsconfig.json` extends. `deno install` skips lifecycle - # scripts, so without an explicit sync step the playground vite build + # scripts, so without an explicit sync step the studio-ui vite build # fails with `failed to resolve "extends":"./.svelte-kit/tsconfig.json"`. shell: bash run: | cd packages/ui && npx svelte-kit sync - cd ../../tools/agent-playground && npx svelte-kit sync + cd ../../apps/studio-ui && npx svelte-kit sync - - name: Build playground static UI - working-directory: tools/agent-playground + - name: Build studio-ui static UI + working-directory: apps/studio-ui run: npm run build - name: Import Apple Developer ID certificate (macOS) @@ -181,7 +181,7 @@ jobs: set -euo pipefail STAGING="dist/${{ matrix.target }}/staging" # Sign every Mach-O binary in staging with Hardened Runtime so - # notarization passes. atlas/link/playground/webhook-tunnel run JIT + # notarization passes. atlas/link/studio-ui/webhook-tunnel run JIT # (V8) so they need entitlements for unsigned-executable-memory. ENTITLEMENTS="$(mktemp -t entitlements.plist).plist" cat > "$ENTITLEMENTS" <<'PLIST' @@ -211,7 +211,7 @@ jobs: for f in \ "bin/friday" \ "bin/link" \ - "bin/playground" \ + "bin/studio-ui" \ "bin/webhook-tunnel" \ "friday-launcher" \ "bin/gh" \ diff --git a/.vscode/settings.json b/.vscode/settings.json index b3d14b645..2458c2d67 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,8 +5,6 @@ "[json]": { "editor.defaultFormatter": "biomejs.biome" }, "[markdown]": { "editor.defaultFormatter": "denoland.vscode-deno" }, "editor.codeActionsOnSave": { "source.organizeImports.biome": "explicit" }, - "eslint.workingDirectories": [ - { "directory": "tools/agent-playground", "changeProcessCWD": true } - ], + "eslint.workingDirectories": [{ "directory": "apps/studio-ui", "changeProcessCWD": true }], "eslint.validate": ["javascript", "typescript", "svelte"] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 65aa5c314..96b310189 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ version: ```bash # Deno + TypeScript (core platform) -deno task dev:playground # Daemon (auto-restart) + web playground + link + tunnel +deno task dev:studio-ui # Daemon (auto-restart) + Studio UI + link + tunnel deno task start # Daemon only, no auto-restart deno task typecheck # Type check (deno check + svelte-check) deno task lint # Lint diff --git a/Dockerfile b/Dockerfile index 90e64e58b..565563154 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Friday Platform image: atlasd + link + agent-playground + webhook-tunnel +# Friday Platform image: atlasd + link + studio-ui + webhook-tunnel # # Build: # docker build -t friday-platform . @@ -9,17 +9,17 @@ # Ports: # 18080 atlasd (daemon API) - mapped to container port 8080 # 13100 link (credential/auth service) - mapped to container port 3100 -# 15200 agent-playground (web UI) - mapped to container port 5200 +# 15200 studio-ui (web UI) - mapped to container port 5200 # 19090 webhook-tunnel - mapped to container port 9090 # ============================================================================ -# Stage 1: Deno builder — compile atlas/link binaries & prepare playground +# Stage 1: Deno builder — compile atlas/link binaries & prepare studio-ui # ============================================================================ FROM denoland/deno:debian-2.7.4 AS deno-builder WORKDIR /app -# Need Node.js/npm for building @atlas/ui (svelte-package) and the playground. +# Need Node.js/npm for building @atlas/ui (svelte-package) and studio-ui. RUN apt-get update && apt-get install -y --no-install-recommends \ nodejs npm && \ rm -rf /var/lib/apt/lists/* @@ -30,7 +30,7 @@ COPY deno.json deno.lock package.json ./ COPY apps/atlasd/deno.json apps/atlasd/package.json* ./apps/atlasd/ COPY apps/atlas-cli/deno.json apps/atlas-cli/package.json* ./apps/atlas-cli/ COPY apps/link/deno.json apps/link/package.json* ./apps/link/ -COPY tools/agent-playground/deno.json tools/agent-playground/package.json ./tools/agent-playground/ +COPY apps/studio-ui/deno.json apps/studio-ui/package.json ./apps/studio-ui/ COPY tools/evals/deno.json tools/evals/package.json ./tools/evals/ COPY packages/ ./packages/ @@ -40,12 +40,12 @@ RUN deno install # Copy full source (changes frequently but doesn't bust the install cache) COPY . . -# Build @atlas/ui — the playground imports from dist/ which needs svelte-package +# Build @atlas/ui — studio-ui imports from dist/ which needs svelte-package WORKDIR /app/packages/ui RUN npx svelte-kit sync && npx svelte-package -o dist -# Generate .svelte-kit/tsconfig.json for the playground so vite doesn't warn -WORKDIR /app/tools/agent-playground +# Generate .svelte-kit/tsconfig.json for studio-ui so vite doesn't warn +WORKDIR /app/apps/studio-ui RUN npx svelte-kit sync WORKDIR /app @@ -178,9 +178,9 @@ COPY --from=go-builder /out/webhook-tunnel /usr/local/bin/webhook-tunnel WORKDIR /app # ── Copy runtime source for services that can't be compiled ────────────────── -# agent-playground: Vite dev server needs source + node_modules +# studio-ui: Vite dev server needs source + node_modules -# Workspace config (Deno needs these to resolve imports for the playground) +# Workspace config (Deno needs these to resolve imports for studio-ui) COPY --chown=atlas:atlas --from=deno-builder /app/deno.json /app/deno.lock /app/package.json /app/tsconfig.json /app/reset.d.ts /app/ COPY --chown=atlas:atlas --from=deno-builder /app/types /app/types @@ -190,7 +190,7 @@ COPY --chown=atlas:atlas --from=deno-builder /app/types /app/types RUN node -e " \ const ws = [ \ './packages/*', \ - './tools/agent-playground' \ + './apps/studio-ui' \ ]; \ for (const f of ['/app/deno.json', '/app/package.json']) { \ const c = JSON.parse(require('fs').readFileSync(f, 'utf8')); \ @@ -199,19 +199,19 @@ RUN node -e " \ require('fs').writeFileSync(f, JSON.stringify(c, null, 2) + '\n'); \ }" && chown atlas:atlas /app/deno.json /app/package.json /app/deno.lock -# Runtime tools (playground needs source + svelte-kit) -COPY --chown=atlas:atlas --from=deno-builder /app/tools/agent-playground /app/tools/agent-playground +# Runtime app source (studio-ui needs source + svelte-kit) +COPY --chown=atlas:atlas --from=deno-builder /app/apps/studio-ui /app/apps/studio-ui -# Shared packages (playground imports @atlas/ui etc.) +# Shared packages (studio-ui imports @atlas/ui etc.) COPY --chown=atlas:atlas --from=deno-builder /app/packages /app/packages # Agent definitions COPY --chown=atlas:atlas --from=deno-builder /app/.agents /app/.agents -# node_modules — only needed for the playground (vite, svelte) +# node_modules — only needed for studio-ui (vite, svelte) COPY --chown=atlas:atlas --from=deno-builder /app/node_modules /app/node_modules -# Deno cache — only what the playground needs at runtime. +# Deno cache — only what studio-ui needs at runtime. # The compiled binaries (atlas, link, webhook-tunnel) are self-contained. COPY --chown=atlas:atlas --from=deno-builder /deno-dir /deno-dir # Fix /deno-dir top-level dir ownership (base image creates it as deno:deno, diff --git a/NOTICE b/NOTICE index 1436ce7b1..1e9a3b551 100644 --- a/NOTICE +++ b/NOTICE @@ -6,7 +6,7 @@ This product includes software developed by third parties. Friday Studio ships several artifacts, each of which bundles a different set of upstream dependencies: - - Atlas daemon, CLI, and web playground (Deno + npm + JSR packages) + - Atlas daemon, CLI, and Studio UI (Deno + npm + JSR packages) - Friday Launcher, pty-server, webhook-tunnel (Go modules) - Studio Installer (Rust crates via Cargo / Tauri) diff --git a/README.md b/README.md index 08b328c20..40463cbd6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ their machine. Two surfaces, one runtime: -- **Chat in the playground.** Friday picks up your installed skills, MCP +- **Chat in Studio UI.** Friday picks up your installed skills, MCP servers, memory, and OAuth credentials, and actually drives your tools instead of describing what it would do. - **Run autonomously.** Capture the pattern in a `workspace.yml`, bind it @@ -32,7 +32,7 @@ without wiring queues, secret stores, schedulers, MCP plumbing, and provider clients from scratch every time. > **Prefer the packaged version?** **[hellofriday.ai](https://hellofriday.ai)** -> ships the same daemon and playground as a one-click installer for macOS +> ships the same daemon and Studio UI as a one-click installer for macOS > with the launcher, dependencies, and tray UI bundled. The > rest of this README is for working in-tree. @@ -41,10 +41,10 @@ provider clients from scratch every time. | | What it is | When you use it | | --- | --- | --- | | **`atlasd` (daemon)** | Headless runtime — HTTP API on `:8080`, workspace lifecycle, signal router, session state, JetStream message bus. | Production. CI. Anything you'd `systemd`-ify. | -| **Agent Playground** | SvelteKit web UI on `:5200` — chat with Friday, author and run agents, inspect every session step-by-step, manage skills/MCP servers/schedules/memory/credentials, browse the workspace marketplace. | Day-to-day. The playground is what you actually look at. | +| **Studio UI** | SvelteKit web UI on `:5200` — chat with Friday, author and run agents, inspect every session step-by-step, manage skills/MCP servers/schedules/memory/credentials, browse the workspace marketplace. | Day-to-day. Studio UI is what you actually look at. | The desktop installer ships both behind a tray icon. In-tree, `deno task -dev:playground` runs both side by side with hot reload. +dev:studio-ui` runs both side by side with hot reload. ## Quickstart @@ -59,7 +59,7 @@ handles the rest. | Tool | Min | Why | | --- | --- | --- | -| [Node.js](https://nodejs.org/) | `24+` | Playground runs under Vite via `npx`; `@atlas/ui` builds with `svelte-package`. Manage via fnm/volta/nvm — auto-installing system Node clobbers project pins. | +| [Node.js](https://nodejs.org/) | `24+` | Studio UI runs under Vite via `npx`; `@atlas/ui` builds with `svelte-package`. Manage via fnm/volta/nvm — auto-installing system Node clobbers project pins. | | [git](https://git-scm.com/) | any recent | — | **`setup-dev-env.sh` handles these — installs if missing or below min, otherwise keeps yours:** @@ -111,13 +111,13 @@ The example file documents every variable the daemon reads — provider keys, proxies, OAuth/GitHub App credentials, integration tokens. The minimum to run a real agent is one LLM provider key. -### 3. Run the playground (recommended) +### 3. Run Studio UI (recommended) -One command, four processes — daemon, link, playground, and webhook tunnel — +One command, four processes — daemon, link, Studio UI, and webhook tunnel — all with hot reload: ```bash -deno task dev:playground +deno task dev:studio-ui ``` Open and the sidebar gives you everything: bundled @@ -138,7 +138,7 @@ deno task atlas daemon stop ### Just chat with it -Open the playground at . Type: +Open Studio UI at . Type: > *Find every unread email from my team that's waiting on a reply, summarize what each is asking, and draft responses.* @@ -218,9 +218,9 @@ Browse [`friday-studio-examples`](https://github.com/friday-platform/friday-stud for `github-digest`, `competitive-monitor`, `daily-operating-memo`, `jira-bugfix-bitbucket`, and others. -## Agent Playground +## Studio UI -`deno task dev:playground` opens the playground at . +`deno task dev:studio-ui` opens Studio UI at . It's the same Svelte app the desktop installer ships — production UI, not a debug widget. @@ -253,8 +253,8 @@ deno task sim "..." --stop-at=fsm # blueprint + FSM compile deno task sim "..." --real # execute with real MCP agents ``` -Artifacts land in `runs/workspaces/-/` — replay them in the -playground's **Workspaces / History** tab. +Artifacts land in `runs/workspaces/-/` — replay them in +Studio UI's **Workspaces / History** tab. ## Common commands @@ -285,7 +285,7 @@ Want it all in containers? docker compose up ``` -Brings up the daemon, playground, link credential service, PTY server, and +Brings up the daemon, Studio UI, link credential service, PTY server, and webhook tunnel. Ports default to `1xxxx` to avoid host collisions — see [`docker-compose.yml`](docker-compose.yml). @@ -299,11 +299,11 @@ apps/ ledger/ # Resource & activity storage service studio-installer/ # Tauri desktop app — tray, daemon supervisor, # autostart. The hellofriday.ai download. + studio-ui/ # SvelteKit web UI — Studio UI (production frontend) packages/ # @atlas/* libraries — core, agent-sdk, config, # fsm-engine, llm, logger, mcp, memory, skills, # storage, workspace, signals, jetstream, … tools/ - agent-playground/ # Web client (SvelteKit) — production UI evals/ # Agent eval harness friday-launcher/ # System tray launcher + daemon supervisor (Go) pty-server/ # WebSocket → PTY shell bridge (Go) diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.md index bd6654156..95c702e11 100644 --- a/THIRD_PARTY_LICENSES.md +++ b/THIRD_PARTY_LICENSES.md @@ -1,7 +1,7 @@ # Third-Party Licenses This file lists every third-party dependency bundled into a shipped Friday -Studio artifact (the daemon, CLI, web playground, Friday Launcher, +Studio artifact (the daemon, CLI, Studio UI, Friday Launcher, webhook tunnel, and Studio Installer). It is generated automatically by [`scripts/generate-third-party-licenses.sh`](scripts/generate-third-party-licenses.sh). @@ -834,7 +834,7 @@ Bundled into: `apps/studio-installer` (Tauri installer binary). ## npm / JSR packages -Bundled into: the Atlas daemon, CLI, web playground, and any compiled +Bundled into: the Atlas daemon, CLI, Studio UI, and any compiled Deno binaries. Inventory is taken from `deno.lock`. | Package | Version | Source | diff --git a/apps/atlas-cli/src/cli/commands/agent/exec.ts b/apps/atlas-cli/src/cli/commands/agent/exec.ts index f644e0694..58eb0ac68 100644 --- a/apps/atlas-cli/src/cli/commands/agent/exec.ts +++ b/apps/atlas-cli/src/cli/commands/agent/exec.ts @@ -3,7 +3,7 @@ import { parseSSEStream } from "@atlas/utils/sse"; import { define } from "gunshi"; import { errorOutput } from "../../../utils/output.ts"; -const DEFAULT_PLAYGROUND_URL = "http://localhost:5200"; +const DEFAULT_STUDIO_UI_URL = "http://localhost:5200"; /** * Renders a single SSE event to stdout in human-readable format. @@ -94,7 +94,7 @@ function parseEnvArgs(envArgs: string | undefined): Record | und export const execCommand = define({ name: "exec", - description: "Execute an agent via the playground and stream results", + description: "Execute an agent via Studio UI and stream results", args: { agent: { type: "positional", description: "Agent ID to execute", required: true }, input: { @@ -104,7 +104,7 @@ export const execCommand = define({ required: true, }, json: { type: "boolean", description: "Output raw SSE events as NDJSON", default: false }, - url: { type: "string", description: `Playground URL (default: ${DEFAULT_PLAYGROUND_URL})` }, + url: { type: "string", description: `Studio UI URL (default: ${DEFAULT_STUDIO_UI_URL})` }, env: { type: "string", short: "e", @@ -125,7 +125,7 @@ export const execCommand = define({ process.exit(1); } - const playgroundUrl = ctx.values.url ?? DEFAULT_PLAYGROUND_URL; + const studioUIUrl = ctx.values.url ?? DEFAULT_STUDIO_UI_URL; const env = parseEnvArgs(ctx.values.env); const jsonMode = ctx.values.json; @@ -133,26 +133,26 @@ export const execCommand = define({ let response: Response; try { - response = await fetch(`${playgroundUrl}/api/execute`, { + response = await fetch(`${studioUIUrl}/api/execute`, { method: "POST", headers: { "Content-Type": "application/json" }, body, }); } catch { errorOutput( - `Could not connect to playground at ${playgroundUrl}. Is it running? (deno task playground)`, + `Could not connect to Studio UI at ${studioUIUrl}. Is it running? (deno task studio-ui)`, ); process.exit(1); } if (!response.ok) { const text = await response.text(); - errorOutput(`Playground returned ${response.status}: ${text}`); + errorOutput(`Studio UI returned ${response.status}: ${text}`); process.exit(1); } if (!response.body) { - errorOutput("No response body from playground"); + errorOutput("No response body from Studio UI"); process.exit(1); } diff --git a/apps/atlas-cli/src/cli/commands/agent/index.ts b/apps/atlas-cli/src/cli/commands/agent/index.ts index 6bce21be6..7dba39a56 100644 --- a/apps/atlas-cli/src/cli/commands/agent/index.ts +++ b/apps/atlas-cli/src/cli/commands/agent/index.ts @@ -27,6 +27,6 @@ export const agentCommand = define({ console.log(" list, ls List agents"); console.log(" describe, show, get View agent details"); console.log(" register, r Register an SDK agent"); - console.log(" exec, x Execute an agent via playground"); + console.log(" exec, x Execute an agent via Studio UI"); }, }); diff --git a/apps/atlasd/src/migrations/index.ts b/apps/atlasd/src/migrations/index.ts index 9589b1650..6c1798683 100644 --- a/apps/atlasd/src/migrations/index.ts +++ b/apps/atlasd/src/migrations/index.ts @@ -55,6 +55,7 @@ import { migration as m_20260505_120000_elicitations_bootstrap } from "./m_20260 import { migration as m_20260507_120000_drop_scratchpad_kv } from "./m_20260507_120000_drop_scratchpad_kv.ts"; import { migration as m_20260511_110800_provision_workspace_members } from "./m_20260511_110800_provision_workspace_members.ts"; import { migration as m_20260511_120000_cleanup_userid_as_name } from "./m_20260511_120000_cleanup_userid_as_name.ts"; +import { migration as m_20260513_013700_rename_playground_env_vars } from "./m_20260513_013700_rename_playground_env_vars.ts"; /** * Static manifest. Ordered by id ascending — keep new entries in @@ -88,6 +89,7 @@ const MIGRATIONS: readonly Migration[] = [ m_20260507_120000_drop_scratchpad_kv, m_20260511_110800_provision_workspace_members, m_20260511_120000_cleanup_userid_as_name, + m_20260513_013700_rename_playground_env_vars, ]; /** diff --git a/apps/atlasd/src/migrations/m_20260513_013700_rename_playground_env_vars.test.ts b/apps/atlasd/src/migrations/m_20260513_013700_rename_playground_env_vars.test.ts new file mode 100644 index 000000000..ef11a5c6c --- /dev/null +++ b/apps/atlasd/src/migrations/m_20260513_013700_rename_playground_env_vars.test.ts @@ -0,0 +1,152 @@ +import { describe, expect, test } from "vitest"; +import { rewriteEnv } from "./m_20260513_013700_rename_playground_env_vars.ts"; + +describe("rewriteEnv (playground → studio-ui env var migration)", () => { + describe("FRIDAY_PORT_PLAYGROUND → FRIDAY_PORT_STUDIO_UI", () => { + test("rewrites the legacy key, preserves the value", () => { + const input = "FRIDAY_PORT_PLAYGROUND=15200\n"; + expect(rewriteEnv(input)).toBe("FRIDAY_PORT_STUDIO_UI=15200\n"); + }); + + test("preserves custom user value (not just the installer default)", () => { + const input = "FRIDAY_PORT_PLAYGROUND=25200\n"; + expect(rewriteEnv(input)).toBe("FRIDAY_PORT_STUDIO_UI=25200\n"); + }); + + test("no-op when only the new key is present", () => { + const input = "FRIDAY_PORT_STUDIO_UI=15200\n"; + expect(rewriteEnv(input)).toBe(input); + }); + + test("legacy value wins when both keys are present", () => { + // This is the post-installer state: ensure_platform_env_vars + // seeded FRIDAY_PORT_STUDIO_UI=15200 (default) before migration, + // but the user's customised legacy value should survive. + const input = "FRIDAY_PORT_STUDIO_UI=15200\nFRIDAY_PORT_PLAYGROUND=25200\n"; + expect(rewriteEnv(input)).toBe("FRIDAY_PORT_STUDIO_UI=25200\n"); + }); + + test("legacy line position is preserved when new-key line is dropped", () => { + // Legacy appears AFTER the new key in the file — the rewritten + // line stays at the legacy's original position; the new-key line + // is removed from where it was. + const input = [ + "FRIDAY_ENV=dev", + "FRIDAY_PORT_STUDIO_UI=15200", + "FRIDAY_PORT_FRIDAY=18080", + "FRIDAY_PORT_PLAYGROUND=25200", + "", + ].join("\n"); + expect(rewriteEnv(input)).toBe( + ["FRIDAY_ENV=dev", "FRIDAY_PORT_FRIDAY=18080", "FRIDAY_PORT_STUDIO_UI=25200", ""].join( + "\n", + ), + ); + }); + }); + + describe("PLAYGROUND_PORT → STUDIO_UI_PORT", () => { + test("rewrites the legacy key, preserves the value", () => { + const input = "PLAYGROUND_PORT=5200\n"; + expect(rewriteEnv(input)).toBe("STUDIO_UI_PORT=5200\n"); + }); + + test("legacy value wins when both are present", () => { + const input = "STUDIO_UI_PORT=5200\nPLAYGROUND_PORT=6300\n"; + expect(rewriteEnv(input)).toBe("STUDIO_UI_PORT=6300\n"); + }); + }); + + describe("PLAYGROUND_HOST → STUDIO_UI_HOST", () => { + test("rewrites the legacy key, preserves the value", () => { + const input = "PLAYGROUND_HOST=0.0.0.0\n"; + expect(rewriteEnv(input)).toBe("STUDIO_UI_HOST=0.0.0.0\n"); + }); + + test("legacy value wins when both are present", () => { + const input = "STUDIO_UI_HOST=127.0.0.1\nPLAYGROUND_HOST=0.0.0.0\n"; + expect(rewriteEnv(input)).toBe("STUDIO_UI_HOST=0.0.0.0\n"); + }); + }); + + describe("multiple legacy keys in one file", () => { + test("rewrites all three pairs independently", () => { + const input = [ + "FRIDAY_PORT_PLAYGROUND=15200", + "PLAYGROUND_PORT=5200", + "PLAYGROUND_HOST=0.0.0.0", + "", + ].join("\n"); + expect(rewriteEnv(input)).toBe( + ["FRIDAY_PORT_STUDIO_UI=15200", "STUDIO_UI_PORT=5200", "STUDIO_UI_HOST=0.0.0.0", ""].join( + "\n", + ), + ); + }); + + test("rewrites only the pairs whose legacy key is set", () => { + // FRIDAY_PORT_PLAYGROUND set, PLAYGROUND_PORT not set, PLAYGROUND_HOST set + const input = ["FRIDAY_PORT_PLAYGROUND=15200", "PLAYGROUND_HOST=0.0.0.0", ""].join("\n"); + expect(rewriteEnv(input)).toBe( + ["FRIDAY_PORT_STUDIO_UI=15200", "STUDIO_UI_HOST=0.0.0.0", ""].join("\n"), + ); + }); + }); + + describe("formatting + edge cases", () => { + test("preserves surrounding lines, comments, and blank lines", () => { + const input = [ + "# Friday Studio installer-written defaults", + "", + "FRIDAY_ENV=dev", + "FRIDAY_PORT_FRIDAY=18080", + "FRIDAY_PORT_PLAYGROUND=15200", + "FRIDAY_PORT_WEBHOOK_TUNNEL=19090", + "", + "# user override below", + 'ANTHROPIC_API_KEY="sk-ant-xxxxx"', + "", + ].join("\n"); + expect(rewriteEnv(input)).toBe( + [ + "# Friday Studio installer-written defaults", + "", + "FRIDAY_ENV=dev", + "FRIDAY_PORT_FRIDAY=18080", + "FRIDAY_PORT_STUDIO_UI=15200", + "FRIDAY_PORT_WEBHOOK_TUNNEL=19090", + "", + "# user override below", + 'ANTHROPIC_API_KEY="sk-ant-xxxxx"', + "", + ].join("\n"), + ); + }); + + test("no-op when no legacy keys are present", () => { + const input = "FRIDAY_ENV=dev\nFRIDAY_PORT_FRIDAY=18080\n"; + expect(rewriteEnv(input)).toBe(input); + }); + + test("no-op on empty file", () => { + expect(rewriteEnv("")).toBe(""); + }); + + test("ignores commented-out legacy keys", () => { + const input = "# FRIDAY_PORT_PLAYGROUND=15200\nFRIDAY_PORT_STUDIO_UI=25200\n"; + expect(rewriteEnv(input)).toBe(input); + }); + + test("idempotent: second pass leaves output unchanged", () => { + const once = rewriteEnv( + "FRIDAY_PORT_PLAYGROUND=15200\nPLAYGROUND_PORT=5200\nPLAYGROUND_HOST=0.0.0.0\n", + ); + expect(rewriteEnv(once)).toBe(once); + }); + + test("preserves quoted values", () => { + const input = 'FRIDAY_PORT_PLAYGROUND="15200"\n'; + expect(rewriteEnv(input)).toBe('FRIDAY_PORT_STUDIO_UI="15200"\n'); + }); + }); +}); diff --git a/apps/atlasd/src/migrations/m_20260513_013700_rename_playground_env_vars.ts b/apps/atlasd/src/migrations/m_20260513_013700_rename_playground_env_vars.ts new file mode 100644 index 000000000..b49d25afe --- /dev/null +++ b/apps/atlasd/src/migrations/m_20260513_013700_rename_playground_env_vars.ts @@ -0,0 +1,137 @@ +/** + * Migration: rename legacy `*PLAYGROUND*` env var keys in + * `/.env` to their `*STUDIO_UI*` equivalents. + * + * The studio-ui binary used to be named `playground`. Three env var + * names changed in the rename: + * + * FRIDAY_PORT_PLAYGROUND → FRIDAY_PORT_STUDIO_UI (launcher port override) + * PLAYGROUND_PORT → STUDIO_UI_PORT (binary bind port) + * PLAYGROUND_HOST → STUDIO_UI_HOST (binary bind host) + * + * `FRIDAY_PORT_PLAYGROUND` is the only one the installer wrote by default; + * the other two are normally injected by the launcher at boot and never + * persisted. We still migrate them defensively in case a user added them + * to `.env` by hand for debugging or custom setups. + * + * Behaviour for each pair: + * - .env missing → no-op (whole migration). + * - Only legacy present → rewrite the key, keep the value. + * - Only new present → no-op for that pair (already migrated). + * - Both present → **legacy value wins**: drop the new-key line and + * rewrite the legacy line. This is critical for FRIDAY_PORT_STUDIO_UI + * because the installer's `ensure_platform_env_vars` runs BEFORE + * `friday migrate` and seeds the new key at the installer default — + * so on every upgrade, both keys are temporarily present, and a + * user who customised the legacy key would otherwise silently lose + * their value to the default. + * + * Idempotent: re-running after success is a no-op. Line-by-line rewrite + * preserves formatting, comments, and unrelated variables. + */ + +import { join } from "node:path"; +import { getFridayHome } from "@atlas/utils/paths.server"; +import type { Migration } from "jetstream"; + +const RENAMES: ReadonlyArray = [ + ["FRIDAY_PORT_PLAYGROUND", "FRIDAY_PORT_STUDIO_UI"], + ["PLAYGROUND_PORT", "STUDIO_UI_PORT"], + ["PLAYGROUND_HOST", "STUDIO_UI_HOST"], +]; + +export const migration: Migration = { + id: "20260513_013700_rename_playground_env_vars", + name: "rename legacy PLAYGROUND env var keys → STUDIO_UI", + description: + "Rewrites legacy *PLAYGROUND* keys (FRIDAY_PORT_PLAYGROUND, PLAYGROUND_PORT, " + + "PLAYGROUND_HOST) in ~/.friday/local/.env to their *STUDIO_UI* equivalents " + + "after the agent-playground → studio-ui rename. No-op if the file or any " + + "particular legacy key is absent.", + async run({ logger }) { + const path = join(getFridayHome(), ".env"); + + let raw: string; + try { + raw = await Deno.readTextFile(path); + } catch (err) { + if (err instanceof Deno.errors.NotFound) { + logger.debug(".env not present — nothing to migrate", { path }); + return; + } + throw err; + } + + const rewritten = rewriteEnv(raw); + if (rewritten === raw) { + logger.debug("no legacy playground env vars found — nothing to migrate", { path }); + return; + } + + await Deno.writeTextFile(path, rewritten); + logger.info("rewrote legacy playground env vars", { path, renames: RENAMES.length }); + }, +}; + +/** + * Exported for testing. Pure function — given .env text, returns the + * rewritten text (or the input unchanged if no migration is needed). + * + * Each rename pair is applied independently: if `FRIDAY_PORT_PLAYGROUND` + * is present but `PLAYGROUND_PORT` isn't, only the first is rewritten. + */ +export function rewriteEnv(raw: string): string { + let result = raw; + for (const [legacy, replacement] of RENAMES) { + result = rewriteKey(result, legacy, replacement); + } + return result; +} + +/** + * Apply one (legacy → new) rename to env text. + * + * - If only the legacy key is present, rewrite its key prefix in place. + * - If only the new key is present, leave the file unchanged. + * - If both are present, the legacy line wins: drop the new-key line + * and rewrite the legacy line. This preserves user customisations + * against the installer's add-if-missing default which runs before + * this migration on upgrade. + * + * The value is always preserved verbatim — quoting, whitespace after + * the `=`, comments on the line are all left intact. + */ +function rewriteKey(raw: string, legacy: string, replacement: string): string { + const lines = raw.split("\n"); + const legacyPresent = lines.some((line) => keyOf(line) === legacy); + if (!legacyPresent) return raw; + + // Legacy is present, so we're definitely rewriting. If the new key + // is also present, drop its line (legacy value wins per docstring). + const out: string[] = []; + for (const line of lines) { + const key = keyOf(line); + if (key === replacement) continue; + if (key !== legacy) { + out.push(line); + continue; + } + // Rewrite the legacy key prefix, preserve everything after the `=`. + const eq = line.indexOf("="); + out.push(replacement + line.slice(eq)); + } + return out.join("\n"); +} + +/** + * Return the key of a `KEY=VALUE` line, or null for comments / blank + * lines / malformed lines. Tolerates surrounding whitespace before the + * key (rare but valid in some dotenv implementations). + */ +function keyOf(line: string): string | null { + const trimmed = line.trimStart(); + if (trimmed === "" || trimmed.startsWith("#")) return null; + const eq = trimmed.indexOf("="); + if (eq <= 0) return null; + return trimmed.slice(0, eq).trim(); +} diff --git a/apps/studio-installer/src-tauri/src/commands/ensure_agent_browser_chrome.rs b/apps/studio-installer/src-tauri/src/commands/ensure_agent_browser_chrome.rs index 4066f9c22..01b6d9d5d 100644 --- a/apps/studio-installer/src-tauri/src/commands/ensure_agent_browser_chrome.rs +++ b/apps/studio-installer/src-tauri/src/commands/ensure_agent_browser_chrome.rs @@ -39,7 +39,7 @@ pub async fn ensure_agent_browser_chrome() -> Result<(), String> { }; // Stack 3 split-destination layout: supervised binaries live under // /bin/, alongside the rest of the launcher-spawned - // tools (friday, link, webhook-tunnel, playground, …). install_dir + // tools (friday, link, webhook-tunnel, studio-ui, …). install_dir // itself holds user-data + the .app's friday-launcher entry point // only. Pre-Stack-3 builds put everything flat under install_dir, // which collided with user-data dir names — the link binary at diff --git a/apps/studio-installer/src-tauri/src/commands/env_file.rs b/apps/studio-installer/src-tauri/src/commands/env_file.rs index e0e86f8f1..09f0ec207 100644 --- a/apps/studio-installer/src-tauri/src/commands/env_file.rs +++ b/apps/studio-installer/src-tauri/src/commands/env_file.rs @@ -195,12 +195,12 @@ fn apply_platform_vars( // FRIDAY_PORT_FRIDAY 18080 ← daemon (was 8080) // FRIDAY_PORT_LINK 13100 ← link (was 3100) // FRIDAY_PORT_WEBHOOK_TUNNEL 19090 ← tunnel (was 9090) - // FRIDAY_PORT_PLAYGROUND 15200 ← studio UI (was 5200) + // FRIDAY_PORT_STUDIO_UI 15200 ← studio UI (was 5200) // // The launcher imports ~/.friday/local/.env into its own process // env (tools/friday-launcher/main.go's importDotEnvIntoProcessEnv). // The matching EXTERNAL_*_URL / FRIDAYD_URL values ensure the - // playground UI's window.__FRIDAY_CONFIG__ points at the moved + // studio-ui's window.__FRIDAY_CONFIG__ points at the moved // daemon + tunnel — auto-derive isn't possible because the URLs // may also include user-controlled hostnames or schemes. let platform_vars: Vec<(&str, String)> = vec![ @@ -209,7 +209,7 @@ fn apply_platform_vars( ("FRIDAY_PORT_FRIDAY", "18080".to_string()), ("FRIDAY_PORT_LINK", "13100".to_string()), ("FRIDAY_PORT_WEBHOOK_TUNNEL", "19090".to_string()), - ("FRIDAY_PORT_PLAYGROUND", "15200".to_string()), + ("FRIDAY_PORT_STUDIO_UI", "15200".to_string()), ("FRIDAYD_URL", "http://localhost:18080".to_string()), ("EXTERNAL_DAEMON_URL", "http://localhost:18080".to_string()), ("EXTERNAL_TUNNEL_URL", "http://localhost:19090".to_string()), @@ -263,20 +263,20 @@ pub fn ensure_platform_env_vars() -> Result { } /// Returns the URL the wizard should open in the user's browser to -/// land on the local playground. Reads FRIDAY_PORT_PLAYGROUND from +/// land on the local studio-ui. Reads FRIDAY_PORT_STUDIO_UI from /// ~/.friday/local/.env (which the wizard itself writes during the /// API Keys step) and falls back to 15200 if the file is missing or /// the key is unset. Centralised so every "open studio" entry point -/// (Welcome, launchByOpening, openPlaygroundAndExit) lands on the +/// (Welcome, launchByOpening, openStudioUIAndExit) lands on the /// same URL — pre-fix, all three hardcoded :5200 and broke any /// install with a port override. #[tauri::command] -pub fn playground_url() -> Result { +pub fn studio_ui_url() -> Result { let port = match fs::read_to_string(env_file_path()?) { Ok(content) => parse_env_lines(&content) .into_iter() .find_map(|(k, v)| match k { - Some(key) if key == "FRIDAY_PORT_PLAYGROUND" => Some(v.trim().to_string()), + Some(key) if key == "FRIDAY_PORT_STUDIO_UI" => Some(v.trim().to_string()), _ => None, }) .filter(|s| !s.is_empty()) diff --git a/apps/studio-installer/src-tauri/src/commands/wait_health.rs b/apps/studio-installer/src-tauri/src/commands/wait_health.rs index 8769ee828..62b6fe0c4 100644 --- a/apps/studio-installer/src-tauri/src/commands/wait_health.rs +++ b/apps/studio-installer/src-tauri/src/commands/wait_health.rs @@ -57,7 +57,7 @@ const SSE_BACKOFF_MAX_MS: u64 = 2000; /// /// Sized for the 95th percentile of cold first boots: friday /// daemon needs ~30-60s on a fresh machine (workspace scan + skill -/// bundle hashing + cron registration), then playground tacks on +/// bundle hashing + cron registration), then studio-ui tacks on /// 10-30s for the first SvelteKit render. 90s soft → user sees /// "Still starting up…" past most slow boots without crying wolf /// on the median ~25s case. @@ -71,7 +71,7 @@ const SOFT_DEADLINE_SECS: u64 = 90; /// /// Bumped from 90s → 180s after observing cold first boots on /// fresh macOS systems push past the 90s mark with friday and -/// playground still in pending. Total budget with 3 extensions +/// studio-ui still in pending. Total budget with 3 extensions /// of 60s = 180 + 180 = 360s (6 min) which is enough for the /// slowest boots we've seen. const HARD_DEADLINE_SECS: u64 = 180; @@ -125,11 +125,11 @@ pub enum HealthEvent { /// Soft deadline (60s) elapsed. UI swaps to long-wait copy. SoftDeadline, /// Hard deadline elapsed. Carries the names of services NOT - /// healthy + a flag indicating whether playground is among the + /// healthy + a flag indicating whether studio-ui is among the /// healthy ones (used by the partial-success "Open anyway" rule). Timeout { stuck: Vec, - playground_healthy: bool, + studio_ui_healthy: bool, }, /// SSE-connect retry budget exhausted, stream closed /// unexpectedly, or stream errored mid-flight. Frontend shows @@ -149,7 +149,7 @@ pub enum HealthEvent { /// Service name we treat as the user-facing surface for the /// partial-success "Open anyway" rule. Centralised here so the /// timeout-event builder and the frontend gate agree. -const PLAYGROUND_SERVICE_NAME: &str = "playground"; +const STUDIO_UI_SERVICE_NAME: &str = "studio-ui"; /// Mutable state shared between `wait_for_services` and /// `extend_wait_deadline`. The deadline is stored as nanos-from- @@ -332,16 +332,16 @@ fn parse_sse_chunks(buf: &str) -> (usize, Vec) { /// Build a `Timeout` event from the most-recent observed snapshot. /// `stuck` is every service whose status isn't "healthy"; -/// `playground_healthy` drives the partial-success rule. If we +/// `studio_ui_healthy` drives the partial-success rule. If we /// never observed a snapshot (no SSE events arrived in the wait /// window — extreme), the timeout event is empty + non-healthy -/// playground, which makes the frontend hide "Open anyway" and +/// studio-ui, which makes the frontend hide "Open anyway" and /// just show View logs / Wait again. fn timeout_event_from_snapshot(latest: Option<&HealthSnapshot>) -> HealthEvent { let Some(snap) = latest else { return HealthEvent::Timeout { stuck: Vec::new(), - playground_healthy: false, + studio_ui_healthy: false, }; }; let stuck: Vec = snap @@ -350,13 +350,13 @@ fn timeout_event_from_snapshot(latest: Option<&HealthSnapshot>) -> HealthEvent { .filter(|s| s.status != "healthy") .map(|s| s.name.clone()) .collect(); - let playground_healthy = snap + let studio_ui_healthy = snap .services .iter() - .any(|s| s.name == PLAYGROUND_SERVICE_NAME && s.status == "healthy"); + .any(|s| s.name == STUDIO_UI_SERVICE_NAME && s.status == "healthy"); HealthEvent::Timeout { stuck, - playground_healthy, + studio_ui_healthy, } } @@ -405,7 +405,7 @@ pub async fn wait_for_services( let mut soft_fired = false; let mut timeout_fired = false; // Track the most-recent snapshot so the timeout event can - // populate `stuck` + `playground_healthy` honestly. + // populate `stuck` + `studio_ui_healthy` honestly. let mut latest_snapshot: Option = None; let mut stream = resp.bytes_stream(); @@ -429,7 +429,7 @@ pub async fn wait_for_services( if remaining_nanos <= 0 { // Hard deadline elapsed. // - First time: emit Timeout (with the real stuck - // list and playground status) and park on the + // list and studio-ui status) and park on the // extend_notify; resuming on extension or supersede. // - If the cap is reached and no further extension // can come: the frontend stops calling extend, the @@ -722,47 +722,47 @@ mod tests { let s = snap(vec![ svc("nats-server", "healthy"), svc("friday", "starting"), - svc("playground", "starting"), + svc("studio-ui", "starting"), ]); let HealthEvent::Timeout { stuck, - playground_healthy, + studio_ui_healthy, } = timeout_event_from_snapshot(Some(&s)) else { panic!("expected Timeout variant"); }; - assert_eq!(stuck, vec!["friday".to_string(), "playground".to_string()]); - assert!(!playground_healthy); + assert_eq!(stuck, vec!["friday".to_string(), "studio-ui".to_string()]); + assert!(!studio_ui_healthy); } #[test] - fn timeout_event_sets_playground_healthy_when_playground_green() { + fn timeout_event_sets_studio_ui_healthy_when_studio_ui_green() { let s = snap(vec![ - svc("playground", "healthy"), + svc("studio-ui", "healthy"), svc("webhook-tunnel", "starting"), ]); let HealthEvent::Timeout { stuck, - playground_healthy, + studio_ui_healthy, } = timeout_event_from_snapshot(Some(&s)) else { panic!("expected Timeout variant"); }; assert_eq!(stuck, vec!["webhook-tunnel".to_string()]); - assert!(playground_healthy); + assert!(studio_ui_healthy); } #[test] fn timeout_event_no_snapshot_yields_empty_payload() { let HealthEvent::Timeout { stuck, - playground_healthy, + studio_ui_healthy, } = timeout_event_from_snapshot(None) else { panic!("expected Timeout variant"); }; assert!(stuck.is_empty()); - assert!(!playground_healthy); + assert!(!studio_ui_healthy); } // ── WaitDeadlineState extension cap ──────────────────────── diff --git a/apps/studio-installer/src-tauri/src/lib.rs b/apps/studio-installer/src-tauri/src/lib.rs index 8a630939a..a7272df2d 100644 --- a/apps/studio-installer/src-tauri/src/lib.rs +++ b/apps/studio-installer/src-tauri/src/lib.rs @@ -13,7 +13,7 @@ use commands::{ ensure_claude_code::ensure_claude_code, download_checkpoint::{check_download_complete, mark_download_complete}, env_file::{ - ensure_platform_env_vars, env_file_has_provider_key, env_file_location, playground_url, + ensure_platform_env_vars, env_file_has_provider_key, env_file_location, studio_ui_url, write_env_file, }, exit_installer::exit_installer, @@ -58,7 +58,7 @@ pub fn run() { ensure_platform_env_vars, env_file_has_provider_key, env_file_location, - playground_url, + studio_ui_url, exit_installer, stop_running_launcher, launch_studio, diff --git a/apps/studio-installer/src-tauri/tests/launcher_handoff.rs b/apps/studio-installer/src-tauri/tests/launcher_handoff.rs index 63d18a911..be62ce1b6 100644 --- a/apps/studio-installer/src-tauri/tests/launcher_handoff.rs +++ b/apps/studio-installer/src-tauri/tests/launcher_handoff.rs @@ -152,7 +152,7 @@ fn override_home(test_home: &PathBuf) { env::set_var("FRIDAY_PORT_friday", "28080"); env::set_var("FRIDAY_PORT_link", "23100"); env::set_var("FRIDAY_PORT_webhook_tunnel", "29090"); - env::set_var("FRIDAY_PORT_playground", "25200"); + env::set_var("FRIDAY_PORT_studio_ui", "25200"); } fn pidfile_path() -> PathBuf { @@ -214,7 +214,7 @@ fn installer_launcher_handoff_and_clean_shutdown() { write_wrapper(&install_dir, &stub, "friday", "28080", "/health"); write_wrapper(&install_dir, &stub, "link", "23100", "/health"); write_wrapper(&install_dir, &stub, "webhook-tunnel", "29090", "/health"); - write_wrapper(&install_dir, &stub, "playground", "25200", "/"); + write_wrapper(&install_dir, &stub, "studio-ui", "25200", "/"); // 2. Override HOME + FRIDAY_LAUNCHER_HOME + FRIDAY_PORT_* so our // test doesn't touch real ~/.friday. diff --git a/apps/studio-installer/src/App.svelte b/apps/studio-installer/src/App.svelte index 50e4ce11d..0d7b2498c 100644 --- a/apps/studio-installer/src/App.svelte +++ b/apps/studio-installer/src/App.svelte @@ -80,7 +80,7 @@ onMount(async () => { /* Color tokens — mirror @atlas/ui/tokens.css so the installer - shares the same palette as the agent-playground (and any other + shares the same palette as studio-ui (and any other surface in the monorepo that consumes those tokens). Same light-dark() pattern, same semantic naming. Inlined here rather than imported because the installer is a leaf Tauri diff --git a/apps/studio-installer/src/lib/installer.ts b/apps/studio-installer/src/lib/installer.ts index b3924c8f9..d586f7828 100644 --- a/apps/studio-installer/src/lib/installer.ts +++ b/apps/studio-installer/src/lib/installer.ts @@ -191,7 +191,7 @@ async function launchByOpening(): Promise { try { // Tauri 2 plugin-opener exports openUrl, not a default `open()`. const { openUrl } = await import("@tauri-apps/plugin-opener"); - await openUrl(await resolvePlaygroundUrl()); + await openUrl(await resolveStudioUIUrl()); } catch { // ignore — browser might already be open } @@ -199,14 +199,14 @@ async function launchByOpening(): Promise { /** * Returns the URL the wizard should open to land on the local - * playground, honoring FRIDAY_PORT_PLAYGROUND from ~/.friday/local/.env. + * studio-ui, honoring FRIDAY_PORT_STUDIO_UI from ~/.friday/local/.env. * Centralises the lookup so every "open studio" entry point lands on * the same URL — pre-fix, three call sites hardcoded :5200 and broke * any install with a port override. */ -async function resolvePlaygroundUrl(): Promise { +async function resolveStudioUIUrl(): Promise { try { - return await invoke("playground_url"); + return await invoke("studio_ui_url"); } catch { // Tauri command unavailable (test env etc.) — fall back to the // installer's default port. @@ -430,15 +430,15 @@ export type HealthEvent = shutting_down: boolean; } | { kind: "soft-deadline" } - | { kind: "timeout"; stuck: string[]; playground_healthy: boolean } + | { kind: "timeout"; stuck: string[]; studio_ui_healthy: boolean } | { kind: "unreachable"; reason: string } | { kind: "shutting-down" }; -// `playground` is the user-facing surface that the browser actually +// `studio-ui` is the user-facing surface that the browser actually // loads; if it's healthy at hard-deadline we still let the user // proceed via "Open anyway". Centralizing the name here avoids // stringly-typed checks scattered across the UI. -const PLAYGROUND_SERVICE_NAME = "playground"; +const STUDIO_UI_SERVICE_NAME = "studio-ui"; /** * Subscribe to the launcher's health stream and update the store as @@ -459,7 +459,7 @@ export async function waitForServices(): Promise { store.waitElapsedSecs = 0; store.waitDeadlineExtensions = 0; store.stuckServices = []; - store.playgroundHealthyAtTimeout = false; + store.studioUIHealthyAtTimeout = false; store.launchUnreachableReason = null; const channel = new Channel(); @@ -489,7 +489,7 @@ export async function waitForServices(): Promise { break; case "timeout": store.stuckServices = event.stuck; - store.playgroundHealthyAtTimeout = event.playground_healthy; + store.studioUIHealthyAtTimeout = event.studio_ui_healthy; store.launchStage = "timeout"; break; case "unreachable": @@ -525,12 +525,12 @@ export async function extendWaitDeadline(): Promise { } /** - * Returns the playground row from the current snapshot, or undefined + * Returns the studio-ui row from the current snapshot, or undefined * if it hasn't been observed yet. Used by Launch.svelte to decide * whether to expose "Open anyway" alongside the timeout treatment. */ -export function getPlaygroundService(): ServiceStatus | undefined { - return store.services.find((s) => s.name === PLAYGROUND_SERVICE_NAME); +export function getStudioUIService(): ServiceStatus | undefined { + return store.services.find((s) => s.name === STUDIO_UI_SERVICE_NAME); } /** @@ -575,7 +575,7 @@ export async function createAppBundleIfDarwin(installDir: string, version: strin } /** - * Open the playground in the user's browser and exit the wizard. + * Open studio-ui in the user's browser and exit the wizard. * The launcher is detached from the wizard at spawn time, so exiting * the wizard does NOT kill the platform — the launcher keeps * supervising its services. Same exit logic for "Open anyway". @@ -587,10 +587,10 @@ export async function createAppBundleIfDarwin(installDir: string, version: strin * window up after openUrl resolves). `app.exit(0)` from Rust * bypasses every JS-level prevention path. */ -export async function openPlaygroundAndExit(): Promise { +export async function openStudioUIAndExit(): Promise { try { const { openUrl } = await import("@tauri-apps/plugin-opener"); - await openUrl(await resolvePlaygroundUrl()); + await openUrl(await resolveStudioUIUrl()); } catch { // ignore — browser might already be open or plugin unavailable } diff --git a/apps/studio-installer/src/lib/store.svelte.ts b/apps/studio-installer/src/lib/store.svelte.ts index fc97ca6c2..7e45087c9 100644 --- a/apps/studio-installer/src/lib/store.svelte.ts +++ b/apps/studio-installer/src/lib/store.svelte.ts @@ -115,9 +115,9 @@ function createStore() { // The names of services that were NOT healthy when the hard // deadline fired. Drives the timeout-state messaging. let stuckServices = $state([]); - // Whether playground was healthy at the timeout — the + // Whether studio-ui was healthy at the timeout — the // partial-success rule allows "Open anyway" iff this is true. - let playgroundHealthyAtTimeout = $state(false); + let studioUIHealthyAtTimeout = $state(false); // Free-form reason from a HealthEvent::Unreachable. Surfaced in // the unreachable-stage UI alongside View logs. let launchUnreachableReason = $state(null); @@ -350,11 +350,11 @@ function createStore() { set stuckServices(v: string[]) { stuckServices = v; }, - get playgroundHealthyAtTimeout(): boolean { - return playgroundHealthyAtTimeout; + get studioUIHealthyAtTimeout(): boolean { + return studioUIHealthyAtTimeout; }, - set playgroundHealthyAtTimeout(v: boolean) { - playgroundHealthyAtTimeout = v; + set studioUIHealthyAtTimeout(v: boolean) { + studioUIHealthyAtTimeout = v; }, get launchUnreachableReason(): string | null { return launchUnreachableReason; diff --git a/apps/studio-installer/src/steps/Launch.svelte b/apps/studio-installer/src/steps/Launch.svelte index a0fb44f38..94c4f68ef 100644 --- a/apps/studio-installer/src/steps/Launch.svelte +++ b/apps/studio-installer/src/steps/Launch.svelte @@ -3,9 +3,9 @@ import { invoke } from "@tauri-apps/api/core"; import { onMount } from "svelte"; import { extendWaitDeadline, - getPlaygroundService, + getStudioUIService, installDir, - openPlaygroundAndExit, + openStudioUIAndExit, runLaunch, waitForServices, } from "../lib/installer.ts"; @@ -82,8 +82,8 @@ async function onOpenLogs(): Promise { } } -// "Open anyway" gate: only show when playground is healthy at the -// timeout AND nothing's outright failed. If the user's playground +// "Open anyway" gate: only show when studio-ui is healthy at the +// timeout AND nothing's outright failed. If the user's studio-ui // is stuck or another service is in failed state the browser would // hit a daemon that isn't going to recover, so we'd be sending the // user into a broken UI. Bail-out belongs to Exit instead. @@ -91,8 +91,8 @@ let hasFailedService = $derived.by(() => store.services.some((s) => s.status === let canOpenAnyway = $derived.by(() => { if (store.launchStage !== "timeout") return false; if (hasFailedService) return false; - const playground = getPlaygroundService(); - return playground?.status === "healthy"; + const studioUI = getStudioUIService(); + return studioUI?.status === "healthy"; }); // "Wait again" gate: hide once the cap of 2 extensions is reached. @@ -145,7 +145,7 @@ function prettyName(name: string): string { return "Authentication"; case "webhook-tunnel": return "Webhook tunnel"; - case "playground": + case "studio-ui": return "Studio UI"; default: return name; @@ -196,7 +196,7 @@ function prettyName(name: string): string { {prettyName(svc.name)} {/each} - @@ -247,7 +247,7 @@ function prettyName(name: string): string { {:else if canOpenAnyway} - {/if} diff --git a/apps/studio-installer/src/steps/Welcome.svelte b/apps/studio-installer/src/steps/Welcome.svelte index ed1566a6f..9a4f0ac2f 100644 --- a/apps/studio-installer/src/steps/Welcome.svelte +++ b/apps/studio-installer/src/steps/Welcome.svelte @@ -110,11 +110,11 @@ function cancelDevPanel(): void { async function openStudio(): Promise { // Tauri 2 plugin-opener exports openUrl, not a default `open()`. const { openUrl } = await import("@tauri-apps/plugin-opener"); - // playground_url() resolves FRIDAY_PORT_PLAYGROUND from ~/.friday/local/.env + // studio_ui_url() resolves FRIDAY_PORT_STUDIO_UI from ~/.friday/local/.env // — installs with a port override land on the right URL. let url = "http://localhost:15200"; try { - url = await invoke("playground_url"); + url = await invoke("studio_ui_url"); } catch { // Fall back to the installer's default port. } diff --git a/tools/agent-playground/.gitignore b/apps/studio-ui/.gitignore similarity index 100% rename from tools/agent-playground/.gitignore rename to apps/studio-ui/.gitignore diff --git a/tools/agent-playground/.prettierignore b/apps/studio-ui/.prettierignore similarity index 100% rename from tools/agent-playground/.prettierignore rename to apps/studio-ui/.prettierignore diff --git a/tools/agent-playground/CLAUDE.md b/apps/studio-ui/CLAUDE.md similarity index 91% rename from tools/agent-playground/CLAUDE.md rename to apps/studio-ui/CLAUDE.md index c2239de44..dc00379b0 100644 --- a/tools/agent-playground/CLAUDE.md +++ b/apps/studio-ui/CLAUDE.md @@ -1,4 +1,4 @@ -# @atlas/agent-playground +# @atlas/studio-ui Unified dev tool for agents and workspaces. SvelteKit + Hono with sidebar navigation, route-based pages, and full RPC type safety. @@ -6,12 +6,12 @@ navigation, route-based pages, and full RPC type safety. ## Running ```bash -deno task playground # from monorepo root (http://localhost:5200) +deno task studio-ui # from monorepo root (http://localhost:5200) ``` -The playground also ships as a compiled binary in Friday Studio — the static +studio-ui also ships as a compiled binary in Friday Studio — the static SvelteKit build is served alongside the Hono `/api/*` router from a single -Deno entry point that gets `deno compile`'d into a `playground` binary. +Deno entry point that gets `deno compile`'d into a `studio-ui` binary. ## Architecture diff --git a/tools/agent-playground/README.md b/apps/studio-ui/README.md similarity index 96% rename from tools/agent-playground/README.md rename to apps/studio-ui/README.md index 37623bd20..2837e62ff 100644 --- a/tools/agent-playground/README.md +++ b/apps/studio-ui/README.md @@ -1,4 +1,4 @@ -# Agent Playground +# Studio UI Local dev tool for executing and debugging Friday agents and workspaces. Runs as a SvelteKit app with a Hono API backend. No daemon, no database, no external @@ -7,7 +7,7 @@ services — agents execute in hermetic isolation. ## Getting Started ```bash -deno task playground # from monorepo root — starts on http://localhost:5200 +deno task studio-ui # from monorepo root — starts on http://localhost:5200 ``` Open `http://localhost:5200` in a browser. The sidebar has four sections: @@ -125,7 +125,7 @@ Workspace execute also emits: ## File Structure ``` -tools/agent-playground/ +apps/studio-ui/ ├── cli.ts # Headless pipeline CLI ├── runs/workspaces/ # Pipeline run artifacts ├── src/ @@ -234,8 +234,8 @@ const { agents } = await res.json(); // fully typed ## Tests ```bash -deno task test tools/agent-playground/src/lib/server/ # all server tests -deno task test tools/agent-playground/src/lib/server/lib/workspace/ # workspace harness +deno task test apps/studio-ui/src/lib/server/ # all server tests +deno task test apps/studio-ui/src/lib/server/lib/workspace/ # workspace harness ``` ## Conventions diff --git a/tools/agent-playground/deno.json b/apps/studio-ui/deno.json similarity index 91% rename from tools/agent-playground/deno.json rename to apps/studio-ui/deno.json index 2ab5603d2..8b81b9827 100644 --- a/tools/agent-playground/deno.json +++ b/apps/studio-ui/deno.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", - "name": "@atlas/agent-playground", + "name": "@atlas/studio-ui", "exports": "./mod.ts", "version": "0.1.0", "imports": { "hono/client": "npm:hono@4.12.18/client" }, diff --git a/tools/agent-playground/docs/tool-call-redesign-proposal.md b/apps/studio-ui/docs/tool-call-redesign-proposal.md similarity index 100% rename from tools/agent-playground/docs/tool-call-redesign-proposal.md rename to apps/studio-ui/docs/tool-call-redesign-proposal.md diff --git a/tools/agent-playground/eslint.config.js b/apps/studio-ui/eslint.config.js similarity index 100% rename from tools/agent-playground/eslint.config.js rename to apps/studio-ui/eslint.config.js diff --git a/apps/studio-ui/mod.ts b/apps/studio-ui/mod.ts new file mode 100644 index 000000000..9213ccb96 --- /dev/null +++ b/apps/studio-ui/mod.ts @@ -0,0 +1,2 @@ +// @atlas/studio-ui — dev tool, no public exports +export {}; diff --git a/tools/agent-playground/package.json b/apps/studio-ui/package.json similarity index 98% rename from tools/agent-playground/package.json rename to apps/studio-ui/package.json index a1e6a894e..7ee32bedf 100644 --- a/tools/agent-playground/package.json +++ b/apps/studio-ui/package.json @@ -1,5 +1,5 @@ { - "name": "@atlas/agent-playground", + "name": "@atlas/studio-ui", "version": "0.1.0", "private": true, "type": "module", diff --git a/tools/agent-playground/prettier.config.js b/apps/studio-ui/prettier.config.js similarity index 100% rename from tools/agent-playground/prettier.config.js rename to apps/studio-ui/prettier.config.js diff --git a/tools/agent-playground/src/app.css b/apps/studio-ui/src/app.css similarity index 100% rename from tools/agent-playground/src/app.css rename to apps/studio-ui/src/app.css diff --git a/tools/agent-playground/src/app.d.ts b/apps/studio-ui/src/app.d.ts similarity index 100% rename from tools/agent-playground/src/app.d.ts rename to apps/studio-ui/src/app.d.ts diff --git a/tools/agent-playground/src/app.html b/apps/studio-ui/src/app.html similarity index 100% rename from tools/agent-playground/src/app.html rename to apps/studio-ui/src/app.html diff --git a/tools/agent-playground/src/hooks.server.ts b/apps/studio-ui/src/hooks.server.ts similarity index 100% rename from tools/agent-playground/src/hooks.server.ts rename to apps/studio-ui/src/hooks.server.ts diff --git a/tools/agent-playground/src/lib/__test-stubs__/app-environment.ts b/apps/studio-ui/src/lib/__test-stubs__/app-environment.ts similarity index 100% rename from tools/agent-playground/src/lib/__test-stubs__/app-environment.ts rename to apps/studio-ui/src/lib/__test-stubs__/app-environment.ts diff --git a/tools/agent-playground/src/lib/api/me.ts b/apps/studio-ui/src/lib/api/me.ts similarity index 100% rename from tools/agent-playground/src/lib/api/me.ts rename to apps/studio-ui/src/lib/api/me.ts diff --git a/tools/agent-playground/src/lib/api/memory.ts b/apps/studio-ui/src/lib/api/memory.ts similarity index 100% rename from tools/agent-playground/src/lib/api/memory.ts rename to apps/studio-ui/src/lib/api/memory.ts diff --git a/tools/agent-playground/src/lib/artifact-hints.ts b/apps/studio-ui/src/lib/artifact-hints.ts similarity index 100% rename from tools/agent-playground/src/lib/artifact-hints.ts rename to apps/studio-ui/src/lib/artifact-hints.ts diff --git a/tools/agent-playground/src/lib/assets/favicon.png b/apps/studio-ui/src/lib/assets/favicon.png similarity index 100% rename from tools/agent-playground/src/lib/assets/favicon.png rename to apps/studio-ui/src/lib/assets/favicon.png diff --git a/tools/agent-playground/src/lib/client.ts b/apps/studio-ui/src/lib/client.ts similarity index 100% rename from tools/agent-playground/src/lib/client.ts rename to apps/studio-ui/src/lib/client.ts diff --git a/tools/agent-playground/src/lib/collapsible-state.test.ts b/apps/studio-ui/src/lib/collapsible-state.test.ts similarity index 100% rename from tools/agent-playground/src/lib/collapsible-state.test.ts rename to apps/studio-ui/src/lib/collapsible-state.test.ts diff --git a/tools/agent-playground/src/lib/collapsible-state.ts b/apps/studio-ui/src/lib/collapsible-state.ts similarity index 100% rename from tools/agent-playground/src/lib/collapsible-state.ts rename to apps/studio-ui/src/lib/collapsible-state.ts diff --git a/tools/agent-playground/src/lib/components/MemoryEntryTable.svelte b/apps/studio-ui/src/lib/components/MemoryEntryTable.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/MemoryEntryTable.svelte rename to apps/studio-ui/src/lib/components/MemoryEntryTable.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agent-catalog.svelte b/apps/studio-ui/src/lib/components/agents/agent-catalog.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agent-catalog.svelte rename to apps/studio-ui/src/lib/components/agents/agent-catalog.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agent-editor-sidebar.svelte b/apps/studio-ui/src/lib/components/agents/agent-editor-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agent-editor-sidebar.svelte rename to apps/studio-ui/src/lib/components/agents/agent-editor-sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agent-index-sidebar.svelte b/apps/studio-ui/src/lib/components/agents/agent-index-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agent-index-sidebar.svelte rename to apps/studio-ui/src/lib/components/agents/agent-index-sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agent-io-schemas.svelte b/apps/studio-ui/src/lib/components/agents/agent-io-schemas.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agent-io-schemas.svelte rename to apps/studio-ui/src/lib/components/agents/agent-io-schemas.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agent-reference-panel.svelte b/apps/studio-ui/src/lib/components/agents/agent-reference-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agent-reference-panel.svelte rename to apps/studio-ui/src/lib/components/agents/agent-reference-panel.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agent-workbench.svelte b/apps/studio-ui/src/lib/components/agents/agent-workbench.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agent-workbench.svelte rename to apps/studio-ui/src/lib/components/agents/agent-workbench.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agents-card.svelte b/apps/studio-ui/src/lib/components/agents/agents-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agents-card.svelte rename to apps/studio-ui/src/lib/components/agents/agents-card.svelte diff --git a/tools/agent-playground/src/lib/components/agents/agents-strip.svelte b/apps/studio-ui/src/lib/components/agents/agents-strip.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/agents-strip.svelte rename to apps/studio-ui/src/lib/components/agents/agents-strip.svelte diff --git a/tools/agent-playground/src/lib/components/agents/catalog-row.svelte b/apps/studio-ui/src/lib/components/agents/catalog-row.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/catalog-row.svelte rename to apps/studio-ui/src/lib/components/agents/catalog-row.svelte diff --git a/tools/agent-playground/src/lib/components/agents/credential-panel.svelte b/apps/studio-ui/src/lib/components/agents/credential-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/credential-panel.svelte rename to apps/studio-ui/src/lib/components/agents/credential-panel.svelte diff --git a/tools/agent-playground/src/lib/components/agents/data-contracts-panel.svelte b/apps/studio-ui/src/lib/components/agents/data-contracts-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/data-contracts-panel.svelte rename to apps/studio-ui/src/lib/components/agents/data-contracts-panel.svelte diff --git a/tools/agent-playground/src/lib/components/agents/workspace-agent-sidebar.svelte b/apps/studio-ui/src/lib/components/agents/workspace-agent-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/agents/workspace-agent-sidebar.svelte rename to apps/studio-ui/src/lib/components/agents/workspace-agent-sidebar.svelte diff --git a/apps/studio-ui/src/lib/components/chat/__snapshots__/validation-pill-row.test.ts.snap b/apps/studio-ui/src/lib/components/chat/__snapshots__/validation-pill-row.test.ts.snap new file mode 100644 index 000000000..1dc45e574 --- /dev/null +++ b/apps/studio-ui/src/lib/components/chat/__snapshots__/validation-pill-row.test.ts.snap @@ -0,0 +1,11 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`ValidationPillRow > failed-retrying: snapshot 1`] = `"
  • sourcing error
    Claim

    Pricing for the Acme Pro plan is $29/mo

    Reasoning

    No tool result contains pricing for Acme Pro.

    Citation

    Plans: Free, Team. Contact sales for enterprise.

  • no-tools-called warn
    Claim

    User has 12 unread emails

    Reasoning

    Agent did not call any inbox tool before claiming this.

    Citation

    (no supporting tool call)

"`; + +exports[`ValidationPillRow > failed-terminal: snapshot 1`] = `"
  • sourcing error
    Claim

    Pricing for the Acme Pro plan is $29/mo

    Reasoning

    No tool result contains pricing for Acme Pro.

    Citation

    Plans: Free, Team. Contact sales for enterprise.

  • no-tools-called warn
    Claim

    User has 12 unread emails

    Reasoning

    Agent did not call any inbox tool before claiming this.

    Citation

    (no supporting tool call)

"`; + +exports[`ValidationPillRow > passed-from-pass: snapshot 1`] = `"
"`; + +exports[`ValidationPillRow > passed-from-uncertain: snapshot 1`] = `"
"`; + +exports[`ValidationPillRow > running: snapshot 1`] = `"
Validating output attempt 1
"`; diff --git a/tools/agent-playground/src/lib/components/chat/__test-stubs__/artifact-card-export-parent.svelte b/apps/studio-ui/src/lib/components/chat/__test-stubs__/artifact-card-export-parent.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/__test-stubs__/artifact-card-export-parent.svelte rename to apps/studio-ui/src/lib/components/chat/__test-stubs__/artifact-card-export-parent.svelte diff --git a/tools/agent-playground/src/lib/components/chat/__test-stubs__/icon-stub.svelte b/apps/studio-ui/src/lib/components/chat/__test-stubs__/icon-stub.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/__test-stubs__/icon-stub.svelte rename to apps/studio-ui/src/lib/components/chat/__test-stubs__/icon-stub.svelte diff --git a/tools/agent-playground/src/lib/components/chat/__test-stubs__/tool-call-card-export-parent.svelte b/apps/studio-ui/src/lib/components/chat/__test-stubs__/tool-call-card-export-parent.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/__test-stubs__/tool-call-card-export-parent.svelte rename to apps/studio-ui/src/lib/components/chat/__test-stubs__/tool-call-card-export-parent.svelte diff --git a/tools/agent-playground/src/lib/components/chat/artifact-card.svelte b/apps/studio-ui/src/lib/components/chat/artifact-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/artifact-card.svelte rename to apps/studio-ui/src/lib/components/chat/artifact-card.svelte diff --git a/tools/agent-playground/src/lib/components/chat/artifact-card.test.ts b/apps/studio-ui/src/lib/components/chat/artifact-card.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/artifact-card.test.ts rename to apps/studio-ui/src/lib/components/chat/artifact-card.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/byte-stability.test.ts b/apps/studio-ui/src/lib/components/chat/byte-stability.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/byte-stability.test.ts rename to apps/studio-ui/src/lib/components/chat/byte-stability.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/byte-stability.ts b/apps/studio-ui/src/lib/components/chat/byte-stability.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/byte-stability.ts rename to apps/studio-ui/src/lib/components/chat/byte-stability.ts diff --git a/tools/agent-playground/src/lib/components/chat/chat-input.svelte b/apps/studio-ui/src/lib/components/chat/chat-input.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-input.svelte rename to apps/studio-ui/src/lib/components/chat/chat-input.svelte diff --git a/tools/agent-playground/src/lib/components/chat/chat-inspector.svelte b/apps/studio-ui/src/lib/components/chat/chat-inspector.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-inspector.svelte rename to apps/studio-ui/src/lib/components/chat/chat-inspector.svelte diff --git a/tools/agent-playground/src/lib/components/chat/chat-list-panel.svelte b/apps/studio-ui/src/lib/components/chat/chat-list-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-list-panel.svelte rename to apps/studio-ui/src/lib/components/chat/chat-list-panel.svelte diff --git a/tools/agent-playground/src/lib/components/chat/chat-message-list.svelte b/apps/studio-ui/src/lib/components/chat/chat-message-list.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-message-list.svelte rename to apps/studio-ui/src/lib/components/chat/chat-message-list.svelte diff --git a/tools/agent-playground/src/lib/components/chat/chat-queue.test.ts b/apps/studio-ui/src/lib/components/chat/chat-queue.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-queue.test.ts rename to apps/studio-ui/src/lib/components/chat/chat-queue.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/chat-queue.ts b/apps/studio-ui/src/lib/components/chat/chat-queue.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-queue.ts rename to apps/studio-ui/src/lib/components/chat/chat-queue.ts diff --git a/tools/agent-playground/src/lib/components/chat/chat-session-usage.svelte b/apps/studio-ui/src/lib/components/chat/chat-session-usage.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-session-usage.svelte rename to apps/studio-ui/src/lib/components/chat/chat-session-usage.svelte diff --git a/tools/agent-playground/src/lib/components/chat/chat-tts.test.ts b/apps/studio-ui/src/lib/components/chat/chat-tts.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-tts.test.ts rename to apps/studio-ui/src/lib/components/chat/chat-tts.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/chat-tts.ts b/apps/studio-ui/src/lib/components/chat/chat-tts.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/chat-tts.ts rename to apps/studio-ui/src/lib/components/chat/chat-tts.ts diff --git a/tools/agent-playground/src/lib/components/chat/connect-communicator.svelte b/apps/studio-ui/src/lib/components/chat/connect-communicator.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/connect-communicator.svelte rename to apps/studio-ui/src/lib/components/chat/connect-communicator.svelte diff --git a/tools/agent-playground/src/lib/components/chat/connect-service.svelte b/apps/studio-ui/src/lib/components/chat/connect-service.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/connect-service.svelte rename to apps/studio-ui/src/lib/components/chat/connect-service.svelte diff --git a/tools/agent-playground/src/lib/components/chat/copy-buttons-export.test.ts b/apps/studio-ui/src/lib/components/chat/copy-buttons-export.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/copy-buttons-export.test.ts rename to apps/studio-ui/src/lib/components/chat/copy-buttons-export.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/cursor-tracking-fetch.test.ts b/apps/studio-ui/src/lib/components/chat/cursor-tracking-fetch.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/cursor-tracking-fetch.test.ts rename to apps/studio-ui/src/lib/components/chat/cursor-tracking-fetch.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/cursor-tracking-fetch.ts b/apps/studio-ui/src/lib/components/chat/cursor-tracking-fetch.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/cursor-tracking-fetch.ts rename to apps/studio-ui/src/lib/components/chat/cursor-tracking-fetch.ts diff --git a/tools/agent-playground/src/lib/components/chat/delegate-tool-card.svelte b/apps/studio-ui/src/lib/components/chat/delegate-tool-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/delegate-tool-card.svelte rename to apps/studio-ui/src/lib/components/chat/delegate-tool-card.svelte diff --git a/tools/agent-playground/src/lib/components/chat/export-context.ts b/apps/studio-ui/src/lib/components/chat/export-context.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/export-context.ts rename to apps/studio-ui/src/lib/components/chat/export-context.ts diff --git a/tools/agent-playground/src/lib/components/chat/human-input-matcher.test.ts b/apps/studio-ui/src/lib/components/chat/human-input-matcher.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/human-input-matcher.test.ts rename to apps/studio-ui/src/lib/components/chat/human-input-matcher.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/human-input-matcher.ts b/apps/studio-ui/src/lib/components/chat/human-input-matcher.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/human-input-matcher.ts rename to apps/studio-ui/src/lib/components/chat/human-input-matcher.ts diff --git a/tools/agent-playground/src/lib/components/chat/human-input-tool-card.svelte b/apps/studio-ui/src/lib/components/chat/human-input-tool-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/human-input-tool-card.svelte rename to apps/studio-ui/src/lib/components/chat/human-input-tool-card.svelte diff --git a/tools/agent-playground/src/lib/components/chat/json-highlighter.ts b/apps/studio-ui/src/lib/components/chat/json-highlighter.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/json-highlighter.ts rename to apps/studio-ui/src/lib/components/chat/json-highlighter.ts diff --git a/tools/agent-playground/src/lib/components/chat/lifted-markers.test.ts b/apps/studio-ui/src/lib/components/chat/lifted-markers.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/lifted-markers.test.ts rename to apps/studio-ui/src/lib/components/chat/lifted-markers.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/lifted-markers.ts b/apps/studio-ui/src/lib/components/chat/lifted-markers.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/lifted-markers.ts rename to apps/studio-ui/src/lib/components/chat/lifted-markers.ts diff --git a/tools/agent-playground/src/lib/components/chat/markdown-body.svelte b/apps/studio-ui/src/lib/components/chat/markdown-body.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/markdown-body.svelte rename to apps/studio-ui/src/lib/components/chat/markdown-body.svelte diff --git a/tools/agent-playground/src/lib/components/chat/message-error.test.ts b/apps/studio-ui/src/lib/components/chat/message-error.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/message-error.test.ts rename to apps/studio-ui/src/lib/components/chat/message-error.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/message-error.ts b/apps/studio-ui/src/lib/components/chat/message-error.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/message-error.ts rename to apps/studio-ui/src/lib/components/chat/message-error.ts diff --git a/tools/agent-playground/src/lib/components/chat/resume-budget.test.ts b/apps/studio-ui/src/lib/components/chat/resume-budget.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/resume-budget.test.ts rename to apps/studio-ui/src/lib/components/chat/resume-budget.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/resume-budget.ts b/apps/studio-ui/src/lib/components/chat/resume-budget.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/resume-budget.ts rename to apps/studio-ui/src/lib/components/chat/resume-budget.ts diff --git a/tools/agent-playground/src/lib/components/chat/snapshot-table.test.ts b/apps/studio-ui/src/lib/components/chat/snapshot-table.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/snapshot-table.test.ts rename to apps/studio-ui/src/lib/components/chat/snapshot-table.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/snapshot-table.ts b/apps/studio-ui/src/lib/components/chat/snapshot-table.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/snapshot-table.ts rename to apps/studio-ui/src/lib/components/chat/snapshot-table.ts diff --git a/tools/agent-playground/src/lib/components/chat/speech-recognition.d.ts b/apps/studio-ui/src/lib/components/chat/speech-recognition.d.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/speech-recognition.d.ts rename to apps/studio-ui/src/lib/components/chat/speech-recognition.d.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-action-helpers.ts b/apps/studio-ui/src/lib/components/chat/table-action-helpers.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-action-helpers.ts rename to apps/studio-ui/src/lib/components/chat/table-action-helpers.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-actions-bar.svelte b/apps/studio-ui/src/lib/components/chat/table-actions-bar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-actions-bar.svelte rename to apps/studio-ui/src/lib/components/chat/table-actions-bar.svelte diff --git a/tools/agent-playground/src/lib/components/chat/table-parsers.test.ts b/apps/studio-ui/src/lib/components/chat/table-parsers.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-parsers.test.ts rename to apps/studio-ui/src/lib/components/chat/table-parsers.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-parsers.ts b/apps/studio-ui/src/lib/components/chat/table-parsers.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-parsers.ts rename to apps/studio-ui/src/lib/components/chat/table-parsers.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-to-csv.test.ts b/apps/studio-ui/src/lib/components/chat/table-to-csv.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-to-csv.test.ts rename to apps/studio-ui/src/lib/components/chat/table-to-csv.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-to-csv.ts b/apps/studio-ui/src/lib/components/chat/table-to-csv.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-to-csv.ts rename to apps/studio-ui/src/lib/components/chat/table-to-csv.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-to-html.test.ts b/apps/studio-ui/src/lib/components/chat/table-to-html.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-to-html.test.ts rename to apps/studio-ui/src/lib/components/chat/table-to-html.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-to-html.ts b/apps/studio-ui/src/lib/components/chat/table-to-html.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-to-html.ts rename to apps/studio-ui/src/lib/components/chat/table-to-html.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-to-markdown.test.ts b/apps/studio-ui/src/lib/components/chat/table-to-markdown.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-to-markdown.test.ts rename to apps/studio-ui/src/lib/components/chat/table-to-markdown.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-to-markdown.ts b/apps/studio-ui/src/lib/components/chat/table-to-markdown.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-to-markdown.ts rename to apps/studio-ui/src/lib/components/chat/table-to-markdown.ts diff --git a/tools/agent-playground/src/lib/components/chat/table-view.svelte b/apps/studio-ui/src/lib/components/chat/table-view.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/table-view.svelte rename to apps/studio-ui/src/lib/components/chat/table-view.svelte diff --git a/tools/agent-playground/src/lib/components/chat/tool-burst.svelte b/apps/studio-ui/src/lib/components/chat/tool-burst.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/tool-burst.svelte rename to apps/studio-ui/src/lib/components/chat/tool-burst.svelte diff --git a/tools/agent-playground/src/lib/components/chat/tool-call-card.svelte b/apps/studio-ui/src/lib/components/chat/tool-call-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/tool-call-card.svelte rename to apps/studio-ui/src/lib/components/chat/tool-call-card.svelte diff --git a/tools/agent-playground/src/lib/components/chat/tool-call-utils.test.ts b/apps/studio-ui/src/lib/components/chat/tool-call-utils.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/tool-call-utils.test.ts rename to apps/studio-ui/src/lib/components/chat/tool-call-utils.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/tool-call-utils.ts b/apps/studio-ui/src/lib/components/chat/tool-call-utils.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/tool-call-utils.ts rename to apps/studio-ui/src/lib/components/chat/tool-call-utils.ts diff --git a/tools/agent-playground/src/lib/components/chat/types.ts b/apps/studio-ui/src/lib/components/chat/types.ts similarity index 98% rename from tools/agent-playground/src/lib/components/chat/types.ts rename to apps/studio-ui/src/lib/components/chat/types.ts index ad319d51b..4a3c039d5 100644 --- a/tools/agent-playground/src/lib/components/chat/types.ts +++ b/apps/studio-ui/src/lib/components/chat/types.ts @@ -19,7 +19,7 @@ import { z } from "zod"; /** * Render-shape types live in `@atlas/core/chat/export/render` so the chat * export route in `apps/atlasd` can reuse them. Re-exported here so existing - * agent-playground imports continue to resolve. + * studio-ui imports continue to resolve. */ import type { ImageDisplay, diff --git a/tools/agent-playground/src/lib/components/chat/usage-badge.svelte b/apps/studio-ui/src/lib/components/chat/usage-badge.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/usage-badge.svelte rename to apps/studio-ui/src/lib/components/chat/usage-badge.svelte diff --git a/tools/agent-playground/src/lib/components/chat/user-chat.svelte b/apps/studio-ui/src/lib/components/chat/user-chat.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/user-chat.svelte rename to apps/studio-ui/src/lib/components/chat/user-chat.svelte diff --git a/tools/agent-playground/src/lib/components/chat/validation-accumulator.test.ts b/apps/studio-ui/src/lib/components/chat/validation-accumulator.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/validation-accumulator.test.ts rename to apps/studio-ui/src/lib/components/chat/validation-accumulator.test.ts diff --git a/tools/agent-playground/src/lib/components/chat/validation-accumulator.ts b/apps/studio-ui/src/lib/components/chat/validation-accumulator.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/validation-accumulator.ts rename to apps/studio-ui/src/lib/components/chat/validation-accumulator.ts diff --git a/tools/agent-playground/src/lib/components/chat/validation-pill-row.svelte b/apps/studio-ui/src/lib/components/chat/validation-pill-row.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/chat/validation-pill-row.svelte rename to apps/studio-ui/src/lib/components/chat/validation-pill-row.svelte diff --git a/tools/agent-playground/src/lib/components/chat/validation-pill-row.test.ts b/apps/studio-ui/src/lib/components/chat/validation-pill-row.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/chat/validation-pill-row.test.ts rename to apps/studio-ui/src/lib/components/chat/validation-pill-row.test.ts diff --git a/tools/agent-playground/src/lib/components/credential-secret-form.svelte b/apps/studio-ui/src/lib/components/credential-secret-form.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/credential-secret-form.svelte rename to apps/studio-ui/src/lib/components/credential-secret-form.svelte diff --git a/tools/agent-playground/src/lib/components/execution/execution-stream.svelte b/apps/studio-ui/src/lib/components/execution/execution-stream.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/execution/execution-stream.svelte rename to apps/studio-ui/src/lib/components/execution/execution-stream.svelte diff --git a/tools/agent-playground/src/lib/components/inspector/agent-inspection-panel.svelte b/apps/studio-ui/src/lib/components/inspector/agent-inspection-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/agent-inspection-panel.svelte rename to apps/studio-ui/src/lib/components/inspector/agent-inspection-panel.svelte diff --git a/tools/agent-playground/src/lib/components/inspector/inspector-recent-sessions.svelte b/apps/studio-ui/src/lib/components/inspector/inspector-recent-sessions.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/inspector-recent-sessions.svelte rename to apps/studio-ui/src/lib/components/inspector/inspector-recent-sessions.svelte diff --git a/tools/agent-playground/src/lib/components/inspector/inspector-run-card.svelte b/apps/studio-ui/src/lib/components/inspector/inspector-run-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/inspector-run-card.svelte rename to apps/studio-ui/src/lib/components/inspector/inspector-run-card.svelte diff --git a/tools/agent-playground/src/lib/components/inspector/inspector-session-sidebar.svelte b/apps/studio-ui/src/lib/components/inspector/inspector-session-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/inspector-session-sidebar.svelte rename to apps/studio-ui/src/lib/components/inspector/inspector-session-sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/inspector/inspector-workspace-picker.svelte b/apps/studio-ui/src/lib/components/inspector/inspector-workspace-picker.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/inspector-workspace-picker.svelte rename to apps/studio-ui/src/lib/components/inspector/inspector-workspace-picker.svelte diff --git a/tools/agent-playground/src/lib/components/inspector/waterfall-layout.test.ts b/apps/studio-ui/src/lib/components/inspector/waterfall-layout.test.ts similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/waterfall-layout.test.ts rename to apps/studio-ui/src/lib/components/inspector/waterfall-layout.test.ts diff --git a/tools/agent-playground/src/lib/components/inspector/waterfall-layout.ts b/apps/studio-ui/src/lib/components/inspector/waterfall-layout.ts similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/waterfall-layout.ts rename to apps/studio-ui/src/lib/components/inspector/waterfall-layout.ts diff --git a/tools/agent-playground/src/lib/components/inspector/waterfall-timeline.svelte b/apps/studio-ui/src/lib/components/inspector/waterfall-timeline.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/inspector/waterfall-timeline.svelte rename to apps/studio-ui/src/lib/components/inspector/waterfall-timeline.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-catalog-tree.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-catalog-tree.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-catalog-tree.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-catalog-tree.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-connection-test.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-connection-test.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-connection-test.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-connection-test.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-credentials-list.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-credentials-list.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-credentials-list.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-credentials-list.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-credentials-panel.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-credentials-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-credentials-panel.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-credentials-panel.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-registry-import.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-registry-import.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-registry-import.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-registry-import.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-server-detail.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-server-detail.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-server-detail.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-server-detail.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-server-utils.ts b/apps/studio-ui/src/lib/components/mcp/mcp-server-utils.ts similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-server-utils.ts rename to apps/studio-ui/src/lib/components/mcp/mcp-server-utils.ts diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-test-chat.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-test-chat.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-test-chat.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-test-chat.svelte diff --git a/tools/agent-playground/src/lib/components/mcp/mcp-workspace-usage.svelte b/apps/studio-ui/src/lib/components/mcp/mcp-workspace-usage.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/mcp/mcp-workspace-usage.svelte rename to apps/studio-ui/src/lib/components/mcp/mcp-workspace-usage.svelte diff --git a/tools/agent-playground/src/lib/components/session/agent-block-card.svelte b/apps/studio-ui/src/lib/components/session/agent-block-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/session/agent-block-card.svelte rename to apps/studio-ui/src/lib/components/session/agent-block-card.svelte diff --git a/tools/agent-playground/src/lib/components/session/index.ts b/apps/studio-ui/src/lib/components/session/index.ts similarity index 100% rename from tools/agent-playground/src/lib/components/session/index.ts rename to apps/studio-ui/src/lib/components/session/index.ts diff --git a/tools/agent-playground/src/lib/components/session/parse-error.ts b/apps/studio-ui/src/lib/components/session/parse-error.ts similarity index 100% rename from tools/agent-playground/src/lib/components/session/parse-error.ts rename to apps/studio-ui/src/lib/components/session/parse-error.ts diff --git a/tools/agent-playground/src/lib/components/session/recent-sessions.svelte b/apps/studio-ui/src/lib/components/session/recent-sessions.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/session/recent-sessions.svelte rename to apps/studio-ui/src/lib/components/session/recent-sessions.svelte diff --git a/tools/agent-playground/src/lib/components/session/session-progress-card.svelte b/apps/studio-ui/src/lib/components/session/session-progress-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/session/session-progress-card.svelte rename to apps/studio-ui/src/lib/components/session/session-progress-card.svelte diff --git a/tools/agent-playground/src/lib/components/session/step-block/header.svelte b/apps/studio-ui/src/lib/components/session/step-block/header.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/session/step-block/header.svelte rename to apps/studio-ui/src/lib/components/session/step-block/header.svelte diff --git a/tools/agent-playground/src/lib/components/session/step-block/index.ts b/apps/studio-ui/src/lib/components/session/step-block/index.ts similarity index 100% rename from tools/agent-playground/src/lib/components/session/step-block/index.ts rename to apps/studio-ui/src/lib/components/session/step-block/index.ts diff --git a/tools/agent-playground/src/lib/components/session/step-block/root.svelte b/apps/studio-ui/src/lib/components/session/step-block/root.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/session/step-block/root.svelte rename to apps/studio-ui/src/lib/components/session/step-block/root.svelte diff --git a/tools/agent-playground/src/lib/components/session/tool-call-data.svelte b/apps/studio-ui/src/lib/components/session/tool-call-data.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/session/tool-call-data.svelte rename to apps/studio-ui/src/lib/components/session/tool-call-data.svelte diff --git a/tools/agent-playground/src/lib/components/settings/model-chain.svelte b/apps/studio-ui/src/lib/components/settings/model-chain.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/settings/model-chain.svelte rename to apps/studio-ui/src/lib/components/settings/model-chain.svelte diff --git a/tools/agent-playground/src/lib/components/settings/model-picker.svelte b/apps/studio-ui/src/lib/components/settings/model-picker.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/settings/model-picker.svelte rename to apps/studio-ui/src/lib/components/settings/model-picker.svelte diff --git a/tools/agent-playground/src/lib/components/settings/provider-mark.svelte b/apps/studio-ui/src/lib/components/settings/provider-mark.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/settings/provider-mark.svelte rename to apps/studio-ui/src/lib/components/settings/provider-mark.svelte diff --git a/tools/agent-playground/src/lib/components/shared/artifact-upload.svelte b/apps/studio-ui/src/lib/components/shared/artifact-upload.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/artifact-upload.svelte rename to apps/studio-ui/src/lib/components/shared/artifact-upload.svelte diff --git a/tools/agent-playground/src/lib/components/shared/cascade-status-banner.svelte b/apps/studio-ui/src/lib/components/shared/cascade-status-banner.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/cascade-status-banner.svelte rename to apps/studio-ui/src/lib/components/shared/cascade-status-banner.svelte diff --git a/tools/agent-playground/src/lib/components/shared/collapsible-section.svelte b/apps/studio-ui/src/lib/components/shared/collapsible-section.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/collapsible-section.svelte rename to apps/studio-ui/src/lib/components/shared/collapsible-section.svelte diff --git a/tools/agent-playground/src/lib/components/shared/command-palette.svelte b/apps/studio-ui/src/lib/components/shared/command-palette.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/command-palette.svelte rename to apps/studio-ui/src/lib/components/shared/command-palette.svelte diff --git a/tools/agent-playground/src/lib/components/shared/communicator-apikey-form.svelte b/apps/studio-ui/src/lib/components/shared/communicator-apikey-form.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/communicator-apikey-form.svelte rename to apps/studio-ui/src/lib/components/shared/communicator-apikey-form.svelte diff --git a/tools/agent-playground/src/lib/components/shared/daemon-gate.svelte b/apps/studio-ui/src/lib/components/shared/daemon-gate.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/daemon-gate.svelte rename to apps/studio-ui/src/lib/components/shared/daemon-gate.svelte diff --git a/tools/agent-playground/src/lib/components/shared/elicitation-global-stream.svelte b/apps/studio-ui/src/lib/components/shared/elicitation-global-stream.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/elicitation-global-stream.svelte rename to apps/studio-ui/src/lib/components/shared/elicitation-global-stream.svelte diff --git a/tools/agent-playground/src/lib/components/shared/friday-mark.svelte b/apps/studio-ui/src/lib/components/shared/friday-mark.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/friday-mark.svelte rename to apps/studio-ui/src/lib/components/shared/friday-mark.svelte diff --git a/tools/agent-playground/src/lib/components/shared/inline-badge.svelte b/apps/studio-ui/src/lib/components/shared/inline-badge.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/inline-badge.svelte rename to apps/studio-ui/src/lib/components/shared/inline-badge.svelte diff --git a/tools/agent-playground/src/lib/components/shared/json-tree.svelte b/apps/studio-ui/src/lib/components/shared/json-tree.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/json-tree.svelte rename to apps/studio-ui/src/lib/components/shared/json-tree.svelte diff --git a/tools/agent-playground/src/lib/components/shared/operation-form.svelte b/apps/studio-ui/src/lib/components/shared/operation-form.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/operation-form.svelte rename to apps/studio-ui/src/lib/components/shared/operation-form.svelte diff --git a/tools/agent-playground/src/lib/components/shared/output-tabs.svelte b/apps/studio-ui/src/lib/components/shared/output-tabs.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/output-tabs.svelte rename to apps/studio-ui/src/lib/components/shared/output-tabs.svelte diff --git a/tools/agent-playground/src/lib/components/shared/schema-property-stack.svelte b/apps/studio-ui/src/lib/components/shared/schema-property-stack.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/schema-property-stack.svelte rename to apps/studio-ui/src/lib/components/shared/schema-property-stack.svelte diff --git a/tools/agent-playground/src/lib/components/shared/schema-property-table.svelte b/apps/studio-ui/src/lib/components/shared/schema-property-table.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/schema-property-table.svelte rename to apps/studio-ui/src/lib/components/shared/schema-property-table.svelte diff --git a/tools/agent-playground/src/lib/components/shared/sidebar-idle-view.svelte b/apps/studio-ui/src/lib/components/shared/sidebar-idle-view.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/sidebar-idle-view.svelte rename to apps/studio-ui/src/lib/components/shared/sidebar-idle-view.svelte diff --git a/tools/agent-playground/src/lib/components/shared/sidebar.svelte b/apps/studio-ui/src/lib/components/shared/sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/sidebar.svelte rename to apps/studio-ui/src/lib/components/shared/sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/shared/trace-panel.svelte b/apps/studio-ui/src/lib/components/shared/trace-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/trace-panel.svelte rename to apps/studio-ui/src/lib/components/shared/trace-panel.svelte diff --git a/tools/agent-playground/src/lib/components/shared/update-banner.svelte b/apps/studio-ui/src/lib/components/shared/update-banner.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/shared/update-banner.svelte rename to apps/studio-ui/src/lib/components/shared/update-banner.svelte diff --git a/tools/agent-playground/src/lib/components/skills/skill-file-editor.svelte b/apps/studio-ui/src/lib/components/skills/skill-file-editor.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/skills/skill-file-editor.svelte rename to apps/studio-ui/src/lib/components/skills/skill-file-editor.svelte diff --git a/tools/agent-playground/src/lib/components/skills/skill-index-sidebar.svelte b/apps/studio-ui/src/lib/components/skills/skill-index-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/skills/skill-index-sidebar.svelte rename to apps/studio-ui/src/lib/components/skills/skill-index-sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/skills/skill-loader.svelte b/apps/studio-ui/src/lib/components/skills/skill-loader.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/skills/skill-loader.svelte rename to apps/studio-ui/src/lib/components/skills/skill-loader.svelte diff --git a/tools/agent-playground/src/lib/components/skills/skills-sh-import.svelte b/apps/studio-ui/src/lib/components/skills/skills-sh-import.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/skills/skills-sh-import.svelte rename to apps/studio-ui/src/lib/components/skills/skills-sh-import.svelte diff --git a/tools/agent-playground/src/lib/components/skills/skills-tree.svelte b/apps/studio-ui/src/lib/components/skills/skills-tree.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/skills/skills-tree.svelte rename to apps/studio-ui/src/lib/components/skills/skills-tree.svelte diff --git a/tools/agent-playground/src/lib/components/skills/version-compare-dialog.svelte b/apps/studio-ui/src/lib/components/skills/version-compare-dialog.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/skills/version-compare-dialog.svelte rename to apps/studio-ui/src/lib/components/skills/version-compare-dialog.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/cockpit-view.svelte b/apps/studio-ui/src/lib/components/workspace/cockpit-view.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/cockpit-view.svelte rename to apps/studio-ui/src/lib/components/workspace/cockpit-view.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/communicators-card.svelte b/apps/studio-ui/src/lib/components/workspace/communicators-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/communicators-card.svelte rename to apps/studio-ui/src/lib/components/workspace/communicators-card.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/create-workspace-form.svelte b/apps/studio-ui/src/lib/components/workspace/create-workspace-form.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/create-workspace-form.svelte rename to apps/studio-ui/src/lib/components/workspace/create-workspace-form.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/integrations-sidebar.svelte b/apps/studio-ui/src/lib/components/workspace/integrations-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/integrations-sidebar.svelte rename to apps/studio-ui/src/lib/components/workspace/integrations-sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/job-index-sidebar.svelte b/apps/studio-ui/src/lib/components/workspace/job-index-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/job-index-sidebar.svelte rename to apps/studio-ui/src/lib/components/workspace/job-index-sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/job-selector.svelte b/apps/studio-ui/src/lib/components/workspace/job-selector.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/job-selector.svelte rename to apps/studio-ui/src/lib/components/workspace/job-selector.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/jobs-card-row.svelte b/apps/studio-ui/src/lib/components/workspace/jobs-card-row.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/jobs-card-row.svelte rename to apps/studio-ui/src/lib/components/workspace/jobs-card-row.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/jobs-integrations-card.svelte b/apps/studio-ui/src/lib/components/workspace/jobs-integrations-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/jobs-integrations-card.svelte rename to apps/studio-ui/src/lib/components/workspace/jobs-integrations-card.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/pipeline-diagram.svelte b/apps/studio-ui/src/lib/components/workspace/pipeline-diagram.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/pipeline-diagram.svelte rename to apps/studio-ui/src/lib/components/workspace/pipeline-diagram.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/run-card.svelte b/apps/studio-ui/src/lib/components/workspace/run-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/run-card.svelte rename to apps/studio-ui/src/lib/components/workspace/run-card.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/run-job-dialog.svelte b/apps/studio-ui/src/lib/components/workspace/run-job-dialog.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/run-job-dialog.svelte rename to apps/studio-ui/src/lib/components/workspace/run-job-dialog.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/signal-input-form.svelte b/apps/studio-ui/src/lib/components/workspace/signal-input-form.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/signal-input-form.svelte rename to apps/studio-ui/src/lib/components/workspace/signal-input-form.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/signal-row.svelte b/apps/studio-ui/src/lib/components/workspace/signal-row.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/signal-row.svelte rename to apps/studio-ui/src/lib/components/workspace/signal-row.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/signal-sidebar.svelte b/apps/studio-ui/src/lib/components/workspace/signal-sidebar.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/signal-sidebar.svelte rename to apps/studio-ui/src/lib/components/workspace/signal-sidebar.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/signals-card.svelte b/apps/studio-ui/src/lib/components/workspace/signals-card.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/signals-card.svelte rename to apps/studio-ui/src/lib/components/workspace/signals-card.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/signals-panel.svelte b/apps/studio-ui/src/lib/components/workspace/signals-panel.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/signals-panel.svelte rename to apps/studio-ui/src/lib/components/workspace/signals-panel.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/workspace-breadcrumb.svelte b/apps/studio-ui/src/lib/components/workspace/workspace-breadcrumb.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/workspace-breadcrumb.svelte rename to apps/studio-ui/src/lib/components/workspace/workspace-breadcrumb.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/workspace-dropdown.svelte b/apps/studio-ui/src/lib/components/workspace/workspace-dropdown.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/workspace-dropdown.svelte rename to apps/studio-ui/src/lib/components/workspace/workspace-dropdown.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/workspace-job-selector.svelte b/apps/studio-ui/src/lib/components/workspace/workspace-job-selector.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/workspace-job-selector.svelte rename to apps/studio-ui/src/lib/components/workspace/workspace-job-selector.svelte diff --git a/tools/agent-playground/src/lib/components/workspace/workspace-loader.svelte b/apps/studio-ui/src/lib/components/workspace/workspace-loader.svelte similarity index 100% rename from tools/agent-playground/src/lib/components/workspace/workspace-loader.svelte rename to apps/studio-ui/src/lib/components/workspace/workspace-loader.svelte diff --git a/tools/agent-playground/src/lib/contract-checker.test.ts b/apps/studio-ui/src/lib/contract-checker.test.ts similarity index 100% rename from tools/agent-playground/src/lib/contract-checker.test.ts rename to apps/studio-ui/src/lib/contract-checker.test.ts diff --git a/tools/agent-playground/src/lib/contract-checker.ts b/apps/studio-ui/src/lib/contract-checker.ts similarity index 100% rename from tools/agent-playground/src/lib/contract-checker.ts rename to apps/studio-ui/src/lib/contract-checker.ts diff --git a/tools/agent-playground/src/lib/cron-humanize.test.ts b/apps/studio-ui/src/lib/cron-humanize.test.ts similarity index 100% rename from tools/agent-playground/src/lib/cron-humanize.test.ts rename to apps/studio-ui/src/lib/cron-humanize.test.ts diff --git a/tools/agent-playground/src/lib/cron-humanize.ts b/apps/studio-ui/src/lib/cron-humanize.ts similarity index 100% rename from tools/agent-playground/src/lib/cron-humanize.ts rename to apps/studio-ui/src/lib/cron-humanize.ts diff --git a/tools/agent-playground/src/lib/daemon-client.ts b/apps/studio-ui/src/lib/daemon-client.ts similarity index 100% rename from tools/agent-playground/src/lib/daemon-client.ts rename to apps/studio-ui/src/lib/daemon-client.ts diff --git a/tools/agent-playground/src/lib/daemon-health.svelte.ts b/apps/studio-ui/src/lib/daemon-health.svelte.ts similarity index 100% rename from tools/agent-playground/src/lib/daemon-health.svelte.ts rename to apps/studio-ui/src/lib/daemon-health.svelte.ts diff --git a/tools/agent-playground/src/lib/daemon-url.ts b/apps/studio-ui/src/lib/daemon-url.ts similarity index 91% rename from tools/agent-playground/src/lib/daemon-url.ts rename to apps/studio-ui/src/lib/daemon-url.ts index ea8dcfb4d..d1271625a 100644 --- a/tools/agent-playground/src/lib/daemon-url.ts +++ b/apps/studio-ui/src/lib/daemon-url.ts @@ -4,7 +4,7 @@ import { z } from "zod"; * (`/api/daemon/*` route). The compiled binary uses static-server.ts * which reads `FRIDAYD_URL` from env for the same purpose; this dev * path always targets the default 8080 since it only runs under - * `deno task playground`. */ + * `deno task studio-ui`. */ export const DAEMON_BASE_URL = "http://localhost:8080"; interface RuntimeConfig { @@ -40,8 +40,8 @@ function resolve(configKey: keyof RuntimeConfig, envVarName: string, humanName: const value = globalThis.__FRIDAY_CONFIG__?.[configKey]; if (!value) { throw new Error( - `${humanName} is not configured. Set ${envVarName} on the playground process ` + - `(launcher .env in production; deno.json playground task in dev).`, + `${humanName} is not configured. Set ${envVarName} on the studio-ui process ` + + `(launcher .env in production; deno.json studio-ui task in dev).`, ); } return normalize(value); diff --git a/tools/agent-playground/src/lib/editor/atlas-theme.ts b/apps/studio-ui/src/lib/editor/atlas-theme.ts similarity index 100% rename from tools/agent-playground/src/lib/editor/atlas-theme.ts rename to apps/studio-ui/src/lib/editor/atlas-theme.ts diff --git a/tools/agent-playground/src/lib/elicitation-counts.test.ts b/apps/studio-ui/src/lib/elicitation-counts.test.ts similarity index 100% rename from tools/agent-playground/src/lib/elicitation-counts.test.ts rename to apps/studio-ui/src/lib/elicitation-counts.test.ts diff --git a/tools/agent-playground/src/lib/elicitation-counts.ts b/apps/studio-ui/src/lib/elicitation-counts.ts similarity index 100% rename from tools/agent-playground/src/lib/elicitation-counts.ts rename to apps/studio-ui/src/lib/elicitation-counts.ts diff --git a/tools/agent-playground/src/lib/export/artifact-zip-path.ts b/apps/studio-ui/src/lib/export/artifact-zip-path.ts similarity index 100% rename from tools/agent-playground/src/lib/export/artifact-zip-path.ts rename to apps/studio-ui/src/lib/export/artifact-zip-path.ts diff --git a/tools/agent-playground/src/lib/fsm-definition-builder.test.ts b/apps/studio-ui/src/lib/fsm-definition-builder.test.ts similarity index 100% rename from tools/agent-playground/src/lib/fsm-definition-builder.test.ts rename to apps/studio-ui/src/lib/fsm-definition-builder.test.ts diff --git a/tools/agent-playground/src/lib/fsm-definition-builder.ts b/apps/studio-ui/src/lib/fsm-definition-builder.ts similarity index 100% rename from tools/agent-playground/src/lib/fsm-definition-builder.ts rename to apps/studio-ui/src/lib/fsm-definition-builder.ts diff --git a/tools/agent-playground/src/lib/generate-example-payload.test.ts b/apps/studio-ui/src/lib/generate-example-payload.test.ts similarity index 100% rename from tools/agent-playground/src/lib/generate-example-payload.test.ts rename to apps/studio-ui/src/lib/generate-example-payload.test.ts diff --git a/tools/agent-playground/src/lib/generate-example-payload.ts b/apps/studio-ui/src/lib/generate-example-payload.ts similarity index 100% rename from tools/agent-playground/src/lib/generate-example-payload.ts rename to apps/studio-ui/src/lib/generate-example-payload.ts diff --git a/tools/agent-playground/src/lib/human-input/nested-choice.test.ts b/apps/studio-ui/src/lib/human-input/nested-choice.test.ts similarity index 100% rename from tools/agent-playground/src/lib/human-input/nested-choice.test.ts rename to apps/studio-ui/src/lib/human-input/nested-choice.test.ts diff --git a/tools/agent-playground/src/lib/human-input/nested-choice.ts b/apps/studio-ui/src/lib/human-input/nested-choice.ts similarity index 100% rename from tools/agent-playground/src/lib/human-input/nested-choice.ts rename to apps/studio-ui/src/lib/human-input/nested-choice.ts diff --git a/tools/agent-playground/src/lib/inspector-state.svelte.ts b/apps/studio-ui/src/lib/inspector-state.svelte.ts similarity index 100% rename from tools/agent-playground/src/lib/inspector-state.svelte.ts rename to apps/studio-ui/src/lib/inspector-state.svelte.ts diff --git a/tools/agent-playground/src/lib/inspector-state.test.ts b/apps/studio-ui/src/lib/inspector-state.test.ts similarity index 100% rename from tools/agent-playground/src/lib/inspector-state.test.ts rename to apps/studio-ui/src/lib/inspector-state.test.ts diff --git a/tools/agent-playground/src/lib/node-selection.svelte.ts b/apps/studio-ui/src/lib/node-selection.svelte.ts similarity index 100% rename from tools/agent-playground/src/lib/node-selection.svelte.ts rename to apps/studio-ui/src/lib/node-selection.svelte.ts diff --git a/tools/agent-playground/src/lib/node-state-mapper.test.ts b/apps/studio-ui/src/lib/node-state-mapper.test.ts similarity index 100% rename from tools/agent-playground/src/lib/node-state-mapper.test.ts rename to apps/studio-ui/src/lib/node-state-mapper.test.ts diff --git a/tools/agent-playground/src/lib/node-state-mapper.ts b/apps/studio-ui/src/lib/node-state-mapper.ts similarity index 100% rename from tools/agent-playground/src/lib/node-state-mapper.ts rename to apps/studio-ui/src/lib/node-state-mapper.ts diff --git a/tools/agent-playground/src/lib/oauth-popup.ts b/apps/studio-ui/src/lib/oauth-popup.ts similarity index 100% rename from tools/agent-playground/src/lib/oauth-popup.ts rename to apps/studio-ui/src/lib/oauth-popup.ts diff --git a/tools/agent-playground/src/lib/prompt-history.test.ts b/apps/studio-ui/src/lib/prompt-history.test.ts similarity index 100% rename from tools/agent-playground/src/lib/prompt-history.test.ts rename to apps/studio-ui/src/lib/prompt-history.test.ts diff --git a/tools/agent-playground/src/lib/prompt-history.ts b/apps/studio-ui/src/lib/prompt-history.ts similarity index 100% rename from tools/agent-playground/src/lib/prompt-history.ts rename to apps/studio-ui/src/lib/prompt-history.ts diff --git a/tools/agent-playground/src/lib/queries/agent-queries.ts b/apps/studio-ui/src/lib/queries/agent-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/agent-queries.ts rename to apps/studio-ui/src/lib/queries/agent-queries.ts diff --git a/tools/agent-playground/src/lib/queries/artifact-queries.ts b/apps/studio-ui/src/lib/queries/artifact-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/artifact-queries.ts rename to apps/studio-ui/src/lib/queries/artifact-queries.ts diff --git a/tools/agent-playground/src/lib/queries/discover-queries.ts b/apps/studio-ui/src/lib/queries/discover-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/discover-queries.ts rename to apps/studio-ui/src/lib/queries/discover-queries.ts diff --git a/tools/agent-playground/src/lib/queries/elicitation-queries.ts b/apps/studio-ui/src/lib/queries/elicitation-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/elicitation-queries.ts rename to apps/studio-ui/src/lib/queries/elicitation-queries.ts diff --git a/tools/agent-playground/src/lib/queries/index.ts b/apps/studio-ui/src/lib/queries/index.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/index.ts rename to apps/studio-ui/src/lib/queries/index.ts diff --git a/tools/agent-playground/src/lib/queries/integration-queries.ts b/apps/studio-ui/src/lib/queries/integration-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/integration-queries.ts rename to apps/studio-ui/src/lib/queries/integration-queries.ts diff --git a/tools/agent-playground/src/lib/queries/job-queries.ts b/apps/studio-ui/src/lib/queries/job-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/job-queries.ts rename to apps/studio-ui/src/lib/queries/job-queries.ts diff --git a/tools/agent-playground/src/lib/queries/link-credentials.test.ts b/apps/studio-ui/src/lib/queries/link-credentials.test.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/link-credentials.test.ts rename to apps/studio-ui/src/lib/queries/link-credentials.test.ts diff --git a/tools/agent-playground/src/lib/queries/link-credentials.ts b/apps/studio-ui/src/lib/queries/link-credentials.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/link-credentials.ts rename to apps/studio-ui/src/lib/queries/link-credentials.ts diff --git a/tools/agent-playground/src/lib/queries/link-provider-queries.test.ts b/apps/studio-ui/src/lib/queries/link-provider-queries.test.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/link-provider-queries.test.ts rename to apps/studio-ui/src/lib/queries/link-provider-queries.test.ts diff --git a/tools/agent-playground/src/lib/queries/link-provider-queries.ts b/apps/studio-ui/src/lib/queries/link-provider-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/link-provider-queries.ts rename to apps/studio-ui/src/lib/queries/link-provider-queries.ts diff --git a/tools/agent-playground/src/lib/queries/link-wiring-queries.ts b/apps/studio-ui/src/lib/queries/link-wiring-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/link-wiring-queries.ts rename to apps/studio-ui/src/lib/queries/link-wiring-queries.ts diff --git a/tools/agent-playground/src/lib/queries/mcp-queries.test.ts b/apps/studio-ui/src/lib/queries/mcp-queries.test.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/mcp-queries.test.ts rename to apps/studio-ui/src/lib/queries/mcp-queries.test.ts diff --git a/tools/agent-playground/src/lib/queries/mcp-queries.ts b/apps/studio-ui/src/lib/queries/mcp-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/mcp-queries.ts rename to apps/studio-ui/src/lib/queries/mcp-queries.ts diff --git a/tools/agent-playground/src/lib/queries/memory-queries.ts b/apps/studio-ui/src/lib/queries/memory-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/memory-queries.ts rename to apps/studio-ui/src/lib/queries/memory-queries.ts diff --git a/tools/agent-playground/src/lib/queries/session-queries.ts b/apps/studio-ui/src/lib/queries/session-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/session-queries.ts rename to apps/studio-ui/src/lib/queries/session-queries.ts diff --git a/tools/agent-playground/src/lib/queries/skill-queries.ts b/apps/studio-ui/src/lib/queries/skill-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/skill-queries.ts rename to apps/studio-ui/src/lib/queries/skill-queries.ts diff --git a/tools/agent-playground/src/lib/queries/skills.ts b/apps/studio-ui/src/lib/queries/skills.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/skills.ts rename to apps/studio-ui/src/lib/queries/skills.ts diff --git a/tools/agent-playground/src/lib/queries/workspace-mcp-queries.test.ts b/apps/studio-ui/src/lib/queries/workspace-mcp-queries.test.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/workspace-mcp-queries.test.ts rename to apps/studio-ui/src/lib/queries/workspace-mcp-queries.test.ts diff --git a/tools/agent-playground/src/lib/queries/workspace-mcp-queries.ts b/apps/studio-ui/src/lib/queries/workspace-mcp-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/workspace-mcp-queries.ts rename to apps/studio-ui/src/lib/queries/workspace-mcp-queries.ts diff --git a/tools/agent-playground/src/lib/queries/workspace-queries.ts b/apps/studio-ui/src/lib/queries/workspace-queries.ts similarity index 100% rename from tools/agent-playground/src/lib/queries/workspace-queries.ts rename to apps/studio-ui/src/lib/queries/workspace-queries.ts diff --git a/tools/agent-playground/src/lib/run-history.ts b/apps/studio-ui/src/lib/run-history.ts similarity index 100% rename from tools/agent-playground/src/lib/run-history.ts rename to apps/studio-ui/src/lib/run-history.ts diff --git a/tools/agent-playground/src/lib/schema-utils.test.ts b/apps/studio-ui/src/lib/schema-utils.test.ts similarity index 100% rename from tools/agent-playground/src/lib/schema-utils.test.ts rename to apps/studio-ui/src/lib/schema-utils.test.ts diff --git a/tools/agent-playground/src/lib/schema-utils.ts b/apps/studio-ui/src/lib/schema-utils.ts similarity index 100% rename from tools/agent-playground/src/lib/schema-utils.ts rename to apps/studio-ui/src/lib/schema-utils.ts diff --git a/tools/agent-playground/src/lib/server/lib/context.test.ts b/apps/studio-ui/src/lib/server/lib/context.test.ts similarity index 100% rename from tools/agent-playground/src/lib/server/lib/context.test.ts rename to apps/studio-ui/src/lib/server/lib/context.test.ts diff --git a/tools/agent-playground/src/lib/server/lib/context.ts b/apps/studio-ui/src/lib/server/lib/context.ts similarity index 100% rename from tools/agent-playground/src/lib/server/lib/context.ts rename to apps/studio-ui/src/lib/server/lib/context.ts diff --git a/tools/agent-playground/src/lib/server/lib/sse.test.ts b/apps/studio-ui/src/lib/server/lib/sse.test.ts similarity index 100% rename from tools/agent-playground/src/lib/server/lib/sse.test.ts rename to apps/studio-ui/src/lib/server/lib/sse.test.ts diff --git a/tools/agent-playground/src/lib/server/lib/sse.ts b/apps/studio-ui/src/lib/server/lib/sse.ts similarity index 100% rename from tools/agent-playground/src/lib/server/lib/sse.ts rename to apps/studio-ui/src/lib/server/lib/sse.ts diff --git a/tools/agent-playground/src/lib/server/lib/update-checker.ts b/apps/studio-ui/src/lib/server/lib/update-checker.ts similarity index 100% rename from tools/agent-playground/src/lib/server/lib/update-checker.ts rename to apps/studio-ui/src/lib/server/lib/update-checker.ts diff --git a/tools/agent-playground/src/lib/server/router.ts b/apps/studio-ui/src/lib/server/router.ts similarity index 100% rename from tools/agent-playground/src/lib/server/router.ts rename to apps/studio-ui/src/lib/server/router.ts diff --git a/tools/agent-playground/src/lib/server/routes/agents.ts b/apps/studio-ui/src/lib/server/routes/agents.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/agents.ts rename to apps/studio-ui/src/lib/server/routes/agents.ts diff --git a/tools/agent-playground/src/lib/server/routes/discover.ts b/apps/studio-ui/src/lib/server/routes/discover.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/discover.ts rename to apps/studio-ui/src/lib/server/routes/discover.ts diff --git a/tools/agent-playground/src/lib/server/routes/execute.ts b/apps/studio-ui/src/lib/server/routes/execute.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/execute.ts rename to apps/studio-ui/src/lib/server/routes/execute.ts diff --git a/tools/agent-playground/src/lib/server/routes/mcp.test.ts b/apps/studio-ui/src/lib/server/routes/mcp.test.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/mcp.test.ts rename to apps/studio-ui/src/lib/server/routes/mcp.test.ts diff --git a/tools/agent-playground/src/lib/server/routes/mcp.ts b/apps/studio-ui/src/lib/server/routes/mcp.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/mcp.ts rename to apps/studio-ui/src/lib/server/routes/mcp.ts diff --git a/tools/agent-playground/src/lib/server/routes/shell.ts b/apps/studio-ui/src/lib/server/routes/shell.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/shell.ts rename to apps/studio-ui/src/lib/server/routes/shell.ts diff --git a/tools/agent-playground/src/lib/server/routes/updates.test.ts b/apps/studio-ui/src/lib/server/routes/updates.test.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/updates.test.ts rename to apps/studio-ui/src/lib/server/routes/updates.test.ts diff --git a/tools/agent-playground/src/lib/server/routes/updates.ts b/apps/studio-ui/src/lib/server/routes/updates.ts similarity index 100% rename from tools/agent-playground/src/lib/server/routes/updates.ts rename to apps/studio-ui/src/lib/server/routes/updates.ts diff --git a/tools/agent-playground/src/lib/server/stubs/db-sqlite.ts b/apps/studio-ui/src/lib/server/stubs/db-sqlite.ts similarity index 100% rename from tools/agent-playground/src/lib/server/stubs/db-sqlite.ts rename to apps/studio-ui/src/lib/server/stubs/db-sqlite.ts diff --git a/tools/agent-playground/src/lib/shared-worker/client.ts b/apps/studio-ui/src/lib/shared-worker/client.ts similarity index 100% rename from tools/agent-playground/src/lib/shared-worker/client.ts rename to apps/studio-ui/src/lib/shared-worker/client.ts diff --git a/tools/agent-playground/src/lib/shared-worker/filters.test.ts b/apps/studio-ui/src/lib/shared-worker/filters.test.ts similarity index 100% rename from tools/agent-playground/src/lib/shared-worker/filters.test.ts rename to apps/studio-ui/src/lib/shared-worker/filters.test.ts diff --git a/tools/agent-playground/src/lib/shared-worker/filters.ts b/apps/studio-ui/src/lib/shared-worker/filters.ts similarity index 100% rename from tools/agent-playground/src/lib/shared-worker/filters.ts rename to apps/studio-ui/src/lib/shared-worker/filters.ts diff --git a/tools/agent-playground/src/lib/shared-worker/protocol.ts b/apps/studio-ui/src/lib/shared-worker/protocol.ts similarity index 100% rename from tools/agent-playground/src/lib/shared-worker/protocol.ts rename to apps/studio-ui/src/lib/shared-worker/protocol.ts diff --git a/tools/agent-playground/src/lib/shared-worker/worker.ts b/apps/studio-ui/src/lib/shared-worker/worker.ts similarity index 100% rename from tools/agent-playground/src/lib/shared-worker/worker.ts rename to apps/studio-ui/src/lib/shared-worker/worker.ts diff --git a/tools/agent-playground/src/lib/sse-types.ts b/apps/studio-ui/src/lib/sse-types.ts similarity index 100% rename from tools/agent-playground/src/lib/sse-types.ts rename to apps/studio-ui/src/lib/sse-types.ts diff --git a/tools/agent-playground/src/lib/stores/skill-editor-state.svelte.ts b/apps/studio-ui/src/lib/stores/skill-editor-state.svelte.ts similarity index 100% rename from tools/agent-playground/src/lib/stores/skill-editor-state.svelte.ts rename to apps/studio-ui/src/lib/stores/skill-editor-state.svelte.ts diff --git a/tools/agent-playground/src/lib/types/execution-report.ts b/apps/studio-ui/src/lib/types/execution-report.ts similarity index 100% rename from tools/agent-playground/src/lib/types/execution-report.ts rename to apps/studio-ui/src/lib/types/execution-report.ts diff --git a/tools/agent-playground/src/lib/types/execution-status.ts b/apps/studio-ui/src/lib/types/execution-status.ts similarity index 100% rename from tools/agent-playground/src/lib/types/execution-status.ts rename to apps/studio-ui/src/lib/types/execution-status.ts diff --git a/tools/agent-playground/src/lib/update-status.svelte.ts b/apps/studio-ui/src/lib/update-status.svelte.ts similarity index 100% rename from tools/agent-playground/src/lib/update-status.svelte.ts rename to apps/studio-ui/src/lib/update-status.svelte.ts diff --git a/tools/agent-playground/src/lib/update-status.test.ts b/apps/studio-ui/src/lib/update-status.test.ts similarity index 100% rename from tools/agent-playground/src/lib/update-status.test.ts rename to apps/studio-ui/src/lib/update-status.test.ts diff --git a/tools/agent-playground/src/lib/upload-controller.ts b/apps/studio-ui/src/lib/upload-controller.ts similarity index 100% rename from tools/agent-playground/src/lib/upload-controller.ts rename to apps/studio-ui/src/lib/upload-controller.ts diff --git a/tools/agent-playground/src/lib/upload.ts b/apps/studio-ui/src/lib/upload.ts similarity index 100% rename from tools/agent-playground/src/lib/upload.ts rename to apps/studio-ui/src/lib/upload.ts diff --git a/tools/agent-playground/src/lib/use-credential-connect.svelte.ts b/apps/studio-ui/src/lib/use-credential-connect.svelte.ts similarity index 100% rename from tools/agent-playground/src/lib/use-credential-connect.svelte.ts rename to apps/studio-ui/src/lib/use-credential-connect.svelte.ts diff --git a/tools/agent-playground/src/lib/use-credential-connect.test.ts b/apps/studio-ui/src/lib/use-credential-connect.test.ts similarity index 100% rename from tools/agent-playground/src/lib/use-credential-connect.test.ts rename to apps/studio-ui/src/lib/use-credential-connect.test.ts diff --git a/tools/agent-playground/src/lib/utils/date.ts b/apps/studio-ui/src/lib/utils/date.ts similarity index 100% rename from tools/agent-playground/src/lib/utils/date.ts rename to apps/studio-ui/src/lib/utils/date.ts diff --git a/tools/agent-playground/src/lib/utils/field-helpers.ts b/apps/studio-ui/src/lib/utils/field-helpers.ts similarity index 100% rename from tools/agent-playground/src/lib/utils/field-helpers.ts rename to apps/studio-ui/src/lib/utils/field-helpers.ts diff --git a/tools/agent-playground/src/lib/utils/session-event-stream.test.ts b/apps/studio-ui/src/lib/utils/session-event-stream.test.ts similarity index 100% rename from tools/agent-playground/src/lib/utils/session-event-stream.test.ts rename to apps/studio-ui/src/lib/utils/session-event-stream.test.ts diff --git a/tools/agent-playground/src/lib/utils/session-event-stream.ts b/apps/studio-ui/src/lib/utils/session-event-stream.ts similarity index 100% rename from tools/agent-playground/src/lib/utils/session-event-stream.ts rename to apps/studio-ui/src/lib/utils/session-event-stream.ts diff --git a/tools/agent-playground/src/routes/+layout.svelte b/apps/studio-ui/src/routes/+layout.svelte similarity index 100% rename from tools/agent-playground/src/routes/+layout.svelte rename to apps/studio-ui/src/routes/+layout.svelte diff --git a/tools/agent-playground/src/routes/+layout.ts b/apps/studio-ui/src/routes/+layout.ts similarity index 100% rename from tools/agent-playground/src/routes/+layout.ts rename to apps/studio-ui/src/routes/+layout.ts diff --git a/tools/agent-playground/src/routes/+page.svelte b/apps/studio-ui/src/routes/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/+page.svelte rename to apps/studio-ui/src/routes/+page.svelte diff --git a/tools/agent-playground/src/routes/activity/(components)/activity-view.svelte b/apps/studio-ui/src/routes/activity/(components)/activity-view.svelte similarity index 100% rename from tools/agent-playground/src/routes/activity/(components)/activity-view.svelte rename to apps/studio-ui/src/routes/activity/(components)/activity-view.svelte diff --git a/tools/agent-playground/src/routes/activity/(components)/elicitation-detail.svelte b/apps/studio-ui/src/routes/activity/(components)/elicitation-detail.svelte similarity index 100% rename from tools/agent-playground/src/routes/activity/(components)/elicitation-detail.svelte rename to apps/studio-ui/src/routes/activity/(components)/elicitation-detail.svelte diff --git a/tools/agent-playground/src/routes/activity/(components)/elicitation-row.svelte b/apps/studio-ui/src/routes/activity/(components)/elicitation-row.svelte similarity index 100% rename from tools/agent-playground/src/routes/activity/(components)/elicitation-row.svelte rename to apps/studio-ui/src/routes/activity/(components)/elicitation-row.svelte diff --git a/tools/agent-playground/src/routes/activity/+page.svelte b/apps/studio-ui/src/routes/activity/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/activity/+page.svelte rename to apps/studio-ui/src/routes/activity/+page.svelte diff --git a/tools/agent-playground/src/routes/activity/activity-time.ts b/apps/studio-ui/src/routes/activity/activity-time.ts similarity index 100% rename from tools/agent-playground/src/routes/activity/activity-time.ts rename to apps/studio-ui/src/routes/activity/activity-time.ts diff --git a/tools/agent-playground/src/routes/agents/+page.svelte b/apps/studio-ui/src/routes/agents/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/agents/+page.svelte rename to apps/studio-ui/src/routes/agents/+page.svelte diff --git a/tools/agent-playground/src/routes/agents/built-in/[[agentId]]/+page.svelte b/apps/studio-ui/src/routes/agents/built-in/[[agentId]]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/agents/built-in/[[agentId]]/+page.svelte rename to apps/studio-ui/src/routes/agents/built-in/[[agentId]]/+page.svelte diff --git a/tools/agent-playground/src/routes/api/[...paths]/+server.ts b/apps/studio-ui/src/routes/api/[...paths]/+server.ts similarity index 100% rename from tools/agent-playground/src/routes/api/[...paths]/+server.ts rename to apps/studio-ui/src/routes/api/[...paths]/+server.ts diff --git a/tools/agent-playground/src/routes/api/daemon/[...path]/+server.ts b/apps/studio-ui/src/routes/api/daemon/[...path]/+server.ts similarity index 100% rename from tools/agent-playground/src/routes/api/daemon/[...path]/+server.ts rename to apps/studio-ui/src/routes/api/daemon/[...path]/+server.ts diff --git a/tools/agent-playground/src/routes/api/daemon/[...path]/server.test.ts b/apps/studio-ui/src/routes/api/daemon/[...path]/server.test.ts similarity index 100% rename from tools/agent-playground/src/routes/api/daemon/[...path]/server.test.ts rename to apps/studio-ui/src/routes/api/daemon/[...path]/server.test.ts diff --git a/tools/agent-playground/src/routes/artifacts/[id]/+page.svelte b/apps/studio-ui/src/routes/artifacts/[id]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/+page.svelte rename to apps/studio-ui/src/routes/artifacts/[id]/+page.svelte diff --git a/tools/agent-playground/src/routes/artifacts/[id]/+page.ts b/apps/studio-ui/src/routes/artifacts/[id]/+page.ts similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/+page.ts rename to apps/studio-ui/src/routes/artifacts/[id]/+page.ts diff --git a/tools/agent-playground/src/routes/artifacts/[id]/_load-artifact.ts b/apps/studio-ui/src/routes/artifacts/[id]/_load-artifact.ts similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/_load-artifact.ts rename to apps/studio-ui/src/routes/artifacts/[id]/_load-artifact.ts diff --git a/tools/agent-playground/src/routes/artifacts/[id]/markdown/+page.svelte b/apps/studio-ui/src/routes/artifacts/[id]/markdown/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/markdown/+page.svelte rename to apps/studio-ui/src/routes/artifacts/[id]/markdown/+page.svelte diff --git a/tools/agent-playground/src/routes/artifacts/[id]/markdown/+page.ts b/apps/studio-ui/src/routes/artifacts/[id]/markdown/+page.ts similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/markdown/+page.ts rename to apps/studio-ui/src/routes/artifacts/[id]/markdown/+page.ts diff --git a/tools/agent-playground/src/routes/artifacts/[id]/page-load.test.ts b/apps/studio-ui/src/routes/artifacts/[id]/page-load.test.ts similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/page-load.test.ts rename to apps/studio-ui/src/routes/artifacts/[id]/page-load.test.ts diff --git a/tools/agent-playground/src/routes/artifacts/[id]/table/+page.svelte b/apps/studio-ui/src/routes/artifacts/[id]/table/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/table/+page.svelte rename to apps/studio-ui/src/routes/artifacts/[id]/table/+page.svelte diff --git a/tools/agent-playground/src/routes/artifacts/[id]/table/+page.ts b/apps/studio-ui/src/routes/artifacts/[id]/table/+page.ts similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/table/+page.ts rename to apps/studio-ui/src/routes/artifacts/[id]/table/+page.ts diff --git a/tools/agent-playground/src/routes/artifacts/[id]/table/page-load.test.ts b/apps/studio-ui/src/routes/artifacts/[id]/table/page-load.test.ts similarity index 100% rename from tools/agent-playground/src/routes/artifacts/[id]/table/page-load.test.ts rename to apps/studio-ui/src/routes/artifacts/[id]/table/page-load.test.ts diff --git a/tools/agent-playground/src/routes/discover/[[slug]]/+page.svelte b/apps/studio-ui/src/routes/discover/[[slug]]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/discover/[[slug]]/+page.svelte rename to apps/studio-ui/src/routes/discover/[[slug]]/+page.svelte diff --git a/tools/agent-playground/src/routes/inspector/+page.svelte b/apps/studio-ui/src/routes/inspector/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/inspector/+page.svelte rename to apps/studio-ui/src/routes/inspector/+page.svelte diff --git a/tools/agent-playground/src/routes/mcp/[[serverId]]/+page.svelte b/apps/studio-ui/src/routes/mcp/[[serverId]]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/mcp/[[serverId]]/+page.svelte rename to apps/studio-ui/src/routes/mcp/[[serverId]]/+page.svelte diff --git a/tools/agent-playground/src/routes/memory/+page.svelte b/apps/studio-ui/src/routes/memory/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/memory/+page.svelte rename to apps/studio-ui/src/routes/memory/+page.svelte diff --git a/tools/agent-playground/src/routes/memory/[workspaceId]/+page.svelte b/apps/studio-ui/src/routes/memory/[workspaceId]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/memory/[workspaceId]/+page.svelte rename to apps/studio-ui/src/routes/memory/[workspaceId]/+page.svelte diff --git a/tools/agent-playground/src/routes/memory/[workspaceId]/[memoryName]/+page.svelte b/apps/studio-ui/src/routes/memory/[workspaceId]/[memoryName]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/memory/[workspaceId]/[memoryName]/+page.svelte rename to apps/studio-ui/src/routes/memory/[workspaceId]/[memoryName]/+page.svelte diff --git a/tools/agent-playground/src/routes/oauth/callback/+page.svelte b/apps/studio-ui/src/routes/oauth/callback/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/oauth/callback/+page.svelte rename to apps/studio-ui/src/routes/oauth/callback/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/+layout.svelte b/apps/studio-ui/src/routes/platform/+layout.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/+layout.svelte rename to apps/studio-ui/src/routes/platform/+layout.svelte diff --git a/tools/agent-playground/src/routes/platform/+page.svelte b/apps/studio-ui/src/routes/platform/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/+page.svelte rename to apps/studio-ui/src/routes/platform/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/+layout.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/+layout.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/+layout.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/+layout.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/activity/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/activity/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/activity/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/activity/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/agent/[nodeId]/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/agent/[nodeId]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/agent/[nodeId]/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/agent/[nodeId]/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/agents/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/agents/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/agents/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/agents/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/+page.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[[chatId]]/debug/+page.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/+server.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/+server.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/+server.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/+server.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/limits.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/limits.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/limits.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/limits.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.server.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.server.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.server.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.server.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page@.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page@.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page@.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/+page@.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/preview.test.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/preview.test.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/preview.test.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/preview/preview.test.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/server.test.ts b/apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/server.test.ts similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/chat/[chatId]/export/server.test.ts rename to apps/studio-ui/src/routes/platform/[workspaceId]/chat/[chatId]/export/server.test.ts diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/edit/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/edit/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/edit/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/edit/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/jobs/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/jobs/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/jobs/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/jobs/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/jobs/[jobName]/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/jobs/[jobName]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/jobs/[jobName]/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/jobs/[jobName]/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/mcp/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/mcp/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/mcp/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/mcp/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/sessions/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/sessions/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/sessions/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/sessions/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/sessions/[sessionId]/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/sessions/[sessionId]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/sessions/[sessionId]/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/sessions/[sessionId]/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/signal/[signalId]/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/signal/[signalId]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/signal/[signalId]/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/signal/[signalId]/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/skills/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/skills/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/skills/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/skills/+page.svelte diff --git a/tools/agent-playground/src/routes/platform/[workspaceId]/workspace-agent/[agentId]/+page.svelte b/apps/studio-ui/src/routes/platform/[workspaceId]/workspace-agent/[agentId]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/platform/[workspaceId]/workspace-agent/[agentId]/+page.svelte rename to apps/studio-ui/src/routes/platform/[workspaceId]/workspace-agent/[agentId]/+page.svelte diff --git a/tools/agent-playground/src/routes/schedules/+page.svelte b/apps/studio-ui/src/routes/schedules/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/schedules/+page.svelte rename to apps/studio-ui/src/routes/schedules/+page.svelte diff --git a/tools/agent-playground/src/routes/settings/+page.svelte b/apps/studio-ui/src/routes/settings/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/settings/+page.svelte rename to apps/studio-ui/src/routes/settings/+page.svelte diff --git a/tools/agent-playground/src/routes/skills/+layout.svelte b/apps/studio-ui/src/routes/skills/+layout.svelte similarity index 100% rename from tools/agent-playground/src/routes/skills/+layout.svelte rename to apps/studio-ui/src/routes/skills/+layout.svelte diff --git a/tools/agent-playground/src/routes/skills/+page.svelte b/apps/studio-ui/src/routes/skills/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/skills/+page.svelte rename to apps/studio-ui/src/routes/skills/+page.svelte diff --git a/tools/agent-playground/src/routes/skills/[namespace]/[name]/+page.svelte b/apps/studio-ui/src/routes/skills/[namespace]/[name]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/skills/[namespace]/[name]/+page.svelte rename to apps/studio-ui/src/routes/skills/[namespace]/[name]/+page.svelte diff --git a/tools/agent-playground/src/routes/skills/[namespace]/[name]/[...path]/+page.svelte b/apps/studio-ui/src/routes/skills/[namespace]/[name]/[...path]/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/skills/[namespace]/[name]/[...path]/+page.svelte rename to apps/studio-ui/src/routes/skills/[namespace]/[name]/[...path]/+page.svelte diff --git a/tools/agent-playground/src/routes/skills/[namespace]/[name]/edit/+page@.svelte b/apps/studio-ui/src/routes/skills/[namespace]/[name]/edit/+page@.svelte similarity index 100% rename from tools/agent-playground/src/routes/skills/[namespace]/[name]/edit/+page@.svelte rename to apps/studio-ui/src/routes/skills/[namespace]/[name]/edit/+page@.svelte diff --git a/tools/agent-playground/src/routes/usage/+page.svelte b/apps/studio-ui/src/routes/usage/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/usage/+page.svelte rename to apps/studio-ui/src/routes/usage/+page.svelte diff --git a/tools/agent-playground/src/routes/welcome/+page.svelte b/apps/studio-ui/src/routes/welcome/+page.svelte similarity index 100% rename from tools/agent-playground/src/routes/welcome/+page.svelte rename to apps/studio-ui/src/routes/welcome/+page.svelte diff --git a/tools/agent-playground/src/routes/welcome/combobox.svelte b/apps/studio-ui/src/routes/welcome/combobox.svelte similarity index 100% rename from tools/agent-playground/src/routes/welcome/combobox.svelte rename to apps/studio-ui/src/routes/welcome/combobox.svelte diff --git a/tools/agent-playground/static-server.ts b/apps/studio-ui/static-server.ts similarity index 94% rename from tools/agent-playground/static-server.ts rename to apps/studio-ui/static-server.ts index 99028e26a..aa5e4ed25 100644 --- a/tools/agent-playground/static-server.ts +++ b/apps/studio-ui/static-server.ts @@ -1,5 +1,5 @@ /** - * Production entry point for the bundled `playground` binary. + * Production entry point for the bundled `studio-ui` binary. * * Serves the SvelteKit static build (`build/`) on a fixed port, proxies * `/api/daemon/*` to the local atlasd daemon, and forwards `/api/*` to @@ -15,8 +15,8 @@ import { serveStatic } from "hono/deno"; import { parse as parseHtml } from "node-html-parser"; import { api } from "./src/lib/server/router.ts"; -const PORT = Number(process.env.PLAYGROUND_PORT ?? "5200"); -const HOST = process.env.PLAYGROUND_HOST ?? "127.0.0.1"; +const PORT = Number(process.env.STUDIO_UI_PORT ?? "5200"); +const HOST = process.env.STUDIO_UI_HOST ?? "127.0.0.1"; const DAEMON_URL = process.env.FRIDAYD_URL ?? "http://localhost:8080"; // Browser-facing URLs. The launcher owns the port layout, so we can't @@ -206,8 +206,8 @@ function origin(u: string): string { return ""; } } -console.log(`[playground] listening on http://${HOST}:${PORT}`); -console.log(`[playground] daemon proxy → ${origin(DAEMON_URL)}`); -console.log(`[playground] external daemon → ${origin(EXTERNAL_DAEMON_URL)}`); -if (EXTERNAL_TUNNEL_URL) console.log(`[playground] external tunnel → ${origin(EXTERNAL_TUNNEL_URL)}`); +console.log(`[studio-ui] listening on http://${HOST}:${PORT}`); +console.log(`[studio-ui] daemon proxy → ${origin(DAEMON_URL)}`); +console.log(`[studio-ui] external daemon → ${origin(EXTERNAL_DAEMON_URL)}`); +if (EXTERNAL_TUNNEL_URL) console.log(`[studio-ui] external tunnel → ${origin(EXTERNAL_TUNNEL_URL)}`); Deno.serve({ port: PORT, hostname: HOST }, app.fetch); diff --git a/tools/agent-playground/static/brand/anthropic.svg b/apps/studio-ui/static/brand/anthropic.svg similarity index 100% rename from tools/agent-playground/static/brand/anthropic.svg rename to apps/studio-ui/static/brand/anthropic.svg diff --git a/tools/agent-playground/static/brand/google.svg b/apps/studio-ui/static/brand/google.svg similarity index 100% rename from tools/agent-playground/static/brand/google.svg rename to apps/studio-ui/static/brand/google.svg diff --git a/tools/agent-playground/static/brand/groq.svg b/apps/studio-ui/static/brand/groq.svg similarity index 100% rename from tools/agent-playground/static/brand/groq.svg rename to apps/studio-ui/static/brand/groq.svg diff --git a/tools/agent-playground/static/brand/openai.svg b/apps/studio-ui/static/brand/openai.svg similarity index 100% rename from tools/agent-playground/static/brand/openai.svg rename to apps/studio-ui/static/brand/openai.svg diff --git a/tools/agent-playground/svelte.config.js b/apps/studio-ui/svelte.config.js similarity index 85% rename from tools/agent-playground/svelte.config.js rename to apps/studio-ui/svelte.config.js index a52762fb1..7451893f0 100644 --- a/tools/agent-playground/svelte.config.js +++ b/apps/studio-ui/svelte.config.js @@ -11,9 +11,9 @@ const config = { adapter: adapter({ fallback: "index.html" }), // Inline ALL CSS into every SSR response: the chat-export route ships a // zip of static HTML that must render standalone in any browser with no - // fetches. Tradeoff: every playground page now + // fetches. Tradeoff: every studio-ui page now // duplicates its full CSS inline — no cross-navigation stylesheet cache. - // Fine because agent-playground is a local-only dev tool; if it ever + // Fine because studio-ui is a local-only dev tool; if it ever // serves over a network, move this into a per-route rewriter in +server.ts. inlineStyleThreshold: Infinity, }, diff --git a/tools/agent-playground/tsconfig.json b/apps/studio-ui/tsconfig.json similarity index 100% rename from tools/agent-playground/tsconfig.json rename to apps/studio-ui/tsconfig.json diff --git a/tools/agent-playground/vite.config.ts b/apps/studio-ui/vite.config.ts similarity index 100% rename from tools/agent-playground/vite.config.ts rename to apps/studio-ui/vite.config.ts diff --git a/biome.json b/biome.json index 8fb5c2e31..a023c80b0 100644 --- a/biome.json +++ b/biome.json @@ -16,7 +16,7 @@ "!**/vendor", "!packages/vendor", "!packages/ui", - "!tools/agent-playground", + "!apps/studio-ui", "!tools/chat-replay", "!opensrc", "!.claude" diff --git a/deno.compile.json b/deno.compile.json index c5aae88a6..952ec2fbc 100644 --- a/deno.compile.json +++ b/deno.compile.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "version": "1.0.0", - "workspace": ["./apps/*", "./packages/*", "./tools/evals", "./tools/agent-playground"], + "workspace": ["./apps/*", "./packages/*", "./tools/evals"], "compilerOptions": { "lib": ["deno.window", "deno.worker", "deno.unstable", "dom", "dom.iterable"], "types": ["./reset.d.ts"], @@ -15,14 +15,14 @@ }, "exclude": [ "!integration-tests/**/*.test.ts", - "tools/agent-playground/.svelte-kit", - "tools/agent-playground/src/routes/**", - "tools/agent-playground/src/**/*.svelte.ts", - "tools/agent-playground/src/lib/inspector-state.test.ts", - "tools/agent-playground/src/lib/editor/**", - "tools/agent-playground/src/lib/queries/**", - "tools/agent-playground/src/lib/stores/**", - "tools/agent-playground/src/lib/utils/markdown.ts", + "apps/studio-ui/.svelte-kit", + "apps/studio-ui/src/routes/**", + "apps/studio-ui/src/**/*.svelte.ts", + "apps/studio-ui/src/lib/inspector-state.test.ts", + "apps/studio-ui/src/lib/editor/**", + "apps/studio-ui/src/lib/queries/**", + "apps/studio-ui/src/lib/stores/**", + "apps/studio-ui/src/lib/utils/markdown.ts", "opensrc", "types" ], @@ -35,8 +35,8 @@ "atlas:dev": "deno run -q --allow-all --unstable-worker-options --unstable-kv --unstable-raw-imports --env-file scripts/dev-watcher.ts", "start": "deno run --allow-all --unstable-worker-options --unstable-kv --unstable-raw-imports apps/atlas-cli/src/otel-bootstrap.ts", "dev": "deno task sync:svelte && FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently -n daemon,link -c blue,green 'deno task atlas:dev daemon start' 'cd apps/link && deno task dev'", - "dev:playground": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently -n daemon,link,playground,tunnel -c blue,green,magenta,cyan 'deno task atlas:dev daemon start' 'cd apps/link && deno task dev' 'deno task playground' 'deno task webhook-tunnel'", - "dev:playground:stable": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently -n daemon,link,playground,tunnel -c blue,green,magenta,cyan 'deno task atlas daemon start' 'cd apps/link && deno task dev' 'deno task playground' 'deno task webhook-tunnel'", + "dev:studio-ui": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently -n daemon,link,studio-ui,tunnel -c blue,green,magenta,cyan 'deno task atlas:dev daemon start' 'cd apps/link && deno task dev' 'deno task studio-ui' 'deno task webhook-tunnel'", + "dev:studio-ui:stable": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently -n daemon,link,studio-ui,tunnel -c blue,green,magenta,cyan 'deno task atlas daemon start' 'cd apps/link && deno task dev' 'deno task studio-ui' 'deno task webhook-tunnel'", "webhook-tunnel": "deno run --allow-all apps/webhook-tunnel/src/index.ts", "test": "OTEL_DENO=true DENO_TESTING=true LINK_DEV_MODE=true vitest run", "fmt": "deno run -A npm:@biomejs/biome format --write", @@ -50,8 +50,8 @@ "clean:agents": "deno run -A scripts/clean.ts --agents", "compile": "./scripts/compile.sh", "evals": "deno run --allow-all tools/evals/run.ts", - "sync:svelte": "deno task -f @atlas/ui sync && deno task -f @atlas/agent-playground sync", - "playground": "deno task sync:svelte && cd tools/agent-playground && EXTERNAL_DAEMON_URL=http://localhost:8080 EXTERNAL_TUNNEL_URL=http://localhost:9090 npx vite dev" + "sync:svelte": "deno task -f @atlas/ui sync && deno task -f @atlas/studio-ui sync", + "studio-ui": "deno task sync:svelte && cd apps/studio-ui && EXTERNAL_DAEMON_URL=http://localhost:8080 EXTERNAL_TUNNEL_URL=http://localhost:9090 npx vite dev" }, "lint": { "rules": { "tags": ["recommended"] }, "exclude": ["opensrc/**"] }, "imports": { diff --git a/deno.json b/deno.json index 0f7da8d1d..af8599ba2 100644 --- a/deno.json +++ b/deno.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "version": "1.0.0", - "workspace": ["./apps/*", "./packages/*", "./tools/evals", "./tools/agent-playground"], + "workspace": ["./apps/*", "./packages/*", "./tools/evals"], "compilerOptions": { "lib": ["deno.window", "deno.worker", "deno.unstable", "dom", "dom.iterable"], "types": ["./reset.d.ts"], @@ -17,14 +17,14 @@ "!integration-tests/**/*.test.ts", ".claude/worktrees", ".claude/projects", - "tools/agent-playground/.svelte-kit", - "tools/agent-playground/src/routes/**", - "tools/agent-playground/src/**/*.svelte.ts", - "tools/agent-playground/src/lib/inspector-state.test.ts", - "tools/agent-playground/src/lib/editor/**", - "tools/agent-playground/src/lib/queries/**", - "tools/agent-playground/src/lib/stores/**", - "tools/agent-playground/src/lib/utils/markdown.ts", + "apps/studio-ui/.svelte-kit", + "apps/studio-ui/src/routes/**", + "apps/studio-ui/src/**/*.svelte.ts", + "apps/studio-ui/src/lib/inspector-state.test.ts", + "apps/studio-ui/src/lib/editor/**", + "apps/studio-ui/src/lib/queries/**", + "apps/studio-ui/src/lib/stores/**", + "apps/studio-ui/src/lib/utils/markdown.ts", "tools/chat-replay", "opensrc", "types" @@ -37,8 +37,8 @@ "atlas": "deno run -q --allow-all --unstable-worker-options --unstable-kv --unstable-raw-imports --env-file apps/atlas-cli/src/otel-bootstrap.ts", "atlas:dev": "deno run -q --allow-all --unstable-worker-options --unstable-kv --unstable-raw-imports --env-file scripts/dev-watcher.ts", "start": "deno run --allow-all --unstable-worker-options --unstable-kv --unstable-raw-imports apps/atlas-cli/src/otel-bootstrap.ts", - "dev:playground": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently@^9.2.1 -n daemon,link,playground,tunnel -c blue,green,magenta,cyan 'deno task atlas:dev daemon start' 'cd apps/link && deno task dev' 'deno task playground' 'deno task webhook-tunnel'", - "dev:playground:stable": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently@^9.2.1 -n daemon,link,playground,tunnel -c blue,green,magenta,cyan 'deno task atlas daemon start' 'cd apps/link && deno task dev' 'deno task playground' 'deno task webhook-tunnel'", + "dev:studio-ui": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently@^9.2.1 -n daemon,link,studio-ui,tunnel -c blue,green,magenta,cyan 'deno task atlas:dev daemon start' 'cd apps/link && deno task dev' 'deno task studio-ui' 'deno task webhook-tunnel'", + "dev:studio-ui:stable": "FAST_DEVELOPMENT=true LINK_DEV_MODE=true deno run -A npm:concurrently@^9.2.1 -n daemon,link,studio-ui,tunnel -c blue,green,magenta,cyan 'deno task atlas daemon start' 'cd apps/link && deno task dev' 'deno task studio-ui' 'deno task webhook-tunnel'", "webhook-tunnel": "go run ./tools/webhook-tunnel", "test": "OTEL_DENO=true DENO_TESTING=true LINK_DEV_MODE=true DEV_MODE=true vitest run", "fmt": "deno run -A npm:@biomejs/biome format --write", @@ -52,8 +52,8 @@ "clean:agents": "deno run -A scripts/clean.ts --agents", "compile": "./scripts/compile.sh", "evals": "deno run --allow-all tools/evals/run.ts", - "sync:svelte": "deno task -f @atlas/ui sync && deno task -f @atlas/agent-playground sync", - "playground": "deno task sync:svelte && cd tools/agent-playground && EXTERNAL_DAEMON_URL=http://localhost:8080 EXTERNAL_TUNNEL_URL=http://localhost:9090 npx vite dev" + "sync:svelte": "deno task -f @atlas/ui sync && deno task -f @atlas/studio-ui sync", + "studio-ui": "deno task sync:svelte && cd apps/studio-ui && EXTERNAL_DAEMON_URL=http://localhost:8080 EXTERNAL_TUNNEL_URL=http://localhost:9090 npx vite dev" }, "lint": { "rules": { "tags": ["recommended"] }, "exclude": ["opensrc/**"] }, "imports": { diff --git a/deno.lock b/deno.lock index aea61d190..71d23f534 100644 --- a/deno.lock +++ b/deno.lock @@ -6,14 +6,17 @@ "jsr:@std/assert@1": "1.0.19", "jsr:@std/assert@^1.0.16": "1.0.19", "jsr:@std/assert@^1.0.19": "1.0.19", + "jsr:@std/async@1.0.15": "1.0.15", "jsr:@std/async@^1.0.15": "1.3.0", "jsr:@std/async@^1.3.0": "1.3.0", + "jsr:@std/cli@^1.0.6": "1.0.29", "jsr:@std/data-structures@^1.0.11": "1.0.11", "jsr:@std/dotenv@~0.225.5": "0.225.6", "jsr:@std/encoding@1": "1.0.10", "jsr:@std/encoding@1.0.10": "1.0.10", "jsr:@std/fmt@1": "1.0.10", "jsr:@std/fs@1": "1.0.23", + "jsr:@std/fs@1.0.13": "1.0.13", "jsr:@std/fs@^1.0.23": "1.0.23", "jsr:@std/internal@^1.0.12": "1.0.13", "jsr:@std/internal@^1.0.13": "1.0.13", @@ -147,6 +150,7 @@ "npm:minimatch@^10.2.5": "10.2.5", "npm:nanoid@5.1.11": "5.1.11", "npm:nanoid@^5.1.6": "5.1.11", + "npm:nats@2": "2.29.3", "npm:nats@^2.29.3": "2.29.3", "npm:node-html-parser@^7.1.0": "7.1.0", "npm:oauth4webapi@3.8.6": "3.8.6", @@ -174,13 +178,16 @@ "npm:ulid@^3.0.2": "3.0.2", "npm:undici@^7.25.0": "7.25.0", "npm:vite@^7.3.2": "7.3.3_@types+node@25.6.2_yaml@2.8.4", + "npm:vitest@*": "4.1.5_@opentelemetry+api@1.9.1_@types+node@25.6.2_@vitest+coverage-v8@4.1.5_happy-dom@20.9.0_vite@7.3.3__@types+node@25.6.2__yaml@2.8.4_yaml@2.8.4", "npm:vitest@^4.1.0": "4.1.5_@opentelemetry+api@1.9.1_@types+node@25.6.2_@vitest+coverage-v8@4.1.5_happy-dom@20.9.0_vite@7.3.3__@types+node@25.6.2__yaml@2.8.4_yaml@2.8.4", "npm:vitest@^4.1.5": "4.1.5_@opentelemetry+api@1.9.1_@types+node@25.6.2_@vitest+coverage-v8@4.1.5_happy-dom@20.9.0_vite@7.3.3__@types+node@25.6.2__yaml@2.8.4_yaml@2.8.4", "npm:xstate@^5.31.0": "5.31.0", "npm:yaml@^2.8.4": "2.8.4", "npm:yargs@18": "18.0.0", + "npm:zod@4": "4.4.3", "npm:zod@4.4.3": "4.4.3", "npm:zod@^4.2.1": "4.4.3", + "npm:zod@^4.3.5": "4.4.3", "npm:zod@^4.4.3": "4.4.3" }, "jsr": { @@ -206,12 +213,18 @@ "jsr:@std/internal@^1.0.12" ] }, + "@std/async@1.0.15": { + "integrity": "55d1d9d04f99403fe5730ab16bdcc3c47f658a6bf054cafb38a50f046238116e" + }, "@std/async@1.3.0": { "integrity": "80485538a4f7baaa46bfe2246168069e02ed142b9f9079cd164f43bb060ad9e9", "dependencies": [ "jsr:@std/data-structures" ] }, + "@std/cli@1.0.29": { + "integrity": "fa4ef29130baa834d8a13b7d138240c3a2fcfba740bfb7afa646a360a15ec84f" + }, "@std/data-structures@1.0.11": { "integrity": "53b98ed7efa61f107dfc14244bd2ec5557f7f7ee0bbaef6d449d7937facacb89" }, @@ -224,6 +237,9 @@ "@std/fmt@1.0.10": { "integrity": "90dfba288802ac6de82fb31d0917eb9e4450b9925b954d5e51fc29ac07419db5" }, + "@std/fs@1.0.13": { + "integrity": "756d3ff0ade91c9e72b228e8012b6ff00c3d4a4ac9c642c4dac083536bf6c605" + }, "@std/fs@1.0.23": { "integrity": "3ecbae4ce4fee03b180fa710caff36bb5adb66631c46a6460aaad49515565a37", "dependencies": [ @@ -6329,6 +6345,52 @@ ] } }, + "apps/studio-ui": { + "dependencies": [ + "npm:hono@4.12.18" + ], + "packageJson": { + "dependencies": [ + "npm:@ai-sdk/svelte@^4.0.177", + "npm:@codemirror/lang-markdown@^6.5.0", + "npm:@codemirror/lang-yaml@^6.1.3", + "npm:@codemirror/language@^6.12.3", + "npm:@codemirror/state@^6.6.0", + "npm:@codemirror/view@^6.42.1", + "npm:@hono/zod-validator@~0.7.6", + "npm:@lezer/highlight@^1.2.3", + "npm:@melt-ui/pp@~0.3.2", + "npm:@melt-ui/svelte@~0.86.6", + "npm:@opentelemetry/api@^1.9.1", + "npm:@sveltejs/adapter-static@^3.0.10", + "npm:@sveltejs/kit@^2.59.0", + "npm:@sveltejs/vite-plugin-svelte@~6.2.4", + "npm:@tanstack/query-core@^5.100.8", + "npm:@tanstack/svelte-query@^6.1.28", + "npm:@tanstack/svelte-table@9.0.0-alpha.41", + "npm:@tanstack/svelte-virtual@~3.13.24", + "npm:@types/deno@2.5.0", + "npm:ai@^6.0.177", + "npm:codemirror@^6.0.2", + "npm:diff@9", + "npm:dompurify@^3.4.2", + "npm:eslint@^10.3.0", + "npm:happy-dom@^20.9.0", + "npm:hono@4.12.18", + "npm:jszip@^3.10.1", + "npm:node-html-parser@^7.1.0", + "npm:prettier@^3.8.3", + "npm:shiki@^4.0.2", + "npm:svelte-check@^4.4.7", + "npm:svelte@^5.55.5", + "npm:typescript@^5.9.3", + "npm:vite@^7.3.2", + "npm:vitest@^4.1.0", + "npm:yaml@^2.8.4", + "npm:zod@^4.4.3" + ] + } + }, "packages/adapters-md": { "packageJson": { "dependencies": [ @@ -6683,52 +6745,6 @@ ] } }, - "tools/agent-playground": { - "dependencies": [ - "npm:hono@4.12.18" - ], - "packageJson": { - "dependencies": [ - "npm:@ai-sdk/svelte@^4.0.177", - "npm:@codemirror/lang-markdown@^6.5.0", - "npm:@codemirror/lang-yaml@^6.1.3", - "npm:@codemirror/language@^6.12.3", - "npm:@codemirror/state@^6.6.0", - "npm:@codemirror/view@^6.42.1", - "npm:@hono/zod-validator@~0.7.6", - "npm:@lezer/highlight@^1.2.3", - "npm:@melt-ui/pp@~0.3.2", - "npm:@melt-ui/svelte@~0.86.6", - "npm:@opentelemetry/api@^1.9.1", - "npm:@sveltejs/adapter-static@^3.0.10", - "npm:@sveltejs/kit@^2.59.0", - "npm:@sveltejs/vite-plugin-svelte@~6.2.4", - "npm:@tanstack/query-core@^5.100.8", - "npm:@tanstack/svelte-query@^6.1.28", - "npm:@tanstack/svelte-table@9.0.0-alpha.41", - "npm:@tanstack/svelte-virtual@~3.13.24", - "npm:@types/deno@2.5.0", - "npm:ai@^6.0.177", - "npm:codemirror@^6.0.2", - "npm:diff@9", - "npm:dompurify@^3.4.2", - "npm:eslint@^10.3.0", - "npm:happy-dom@^20.9.0", - "npm:hono@4.12.18", - "npm:jszip@^3.10.1", - "npm:node-html-parser@^7.1.0", - "npm:prettier@^3.8.3", - "npm:shiki@^4.0.2", - "npm:svelte-check@^4.4.7", - "npm:svelte@^5.55.5", - "npm:typescript@^5.9.3", - "npm:vite@^7.3.2", - "npm:vitest@^4.1.0", - "npm:yaml@^2.8.4", - "npm:zod@^4.4.3" - ] - } - }, "tools/evals": { "packageJson": { "dependencies": [ diff --git a/docker/run-platform.sh b/docker/run-platform.sh index 155f8ef5d..944a334b1 100644 --- a/docker/run-platform.sh +++ b/docker/run-platform.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Platform entrypoint: starts atlasd, link, and agent-playground. +# Platform entrypoint: starts atlasd, link, and studio-ui. # Follows the grafana/docker-otel-lgtm shell-based supervisor pattern. # set -euo pipefail @@ -66,27 +66,27 @@ echo "[platform] Starting link on :3100..." link & LINK_PID=$! -# Wait for backends before starting the playground — the playground proxies -# to atlasd on load, so starting it early produces 500s in the browser. +# Wait for backends before starting studio-ui — it proxies to atlasd on load, +# so starting it early produces 500s in the browser. echo "[platform] Waiting for backend services..." wait_for_service "atlasd" "http://localhost:8080/health" wait_for_service "link" "http://localhost:3100/health" -# ── Start playground after backends are healthy ────────────────────────────── +# ── Start studio-ui after backends are healthy ─────────────────────────────── -echo "[platform] Starting agent-playground on :5200..." +echo "[platform] Starting studio-ui on :5200..." export VITE_EXTERNAL_DAEMON_URL="http://localhost:${FRIDAY_DAEMON_PORT:-18080}" export VITE_EXTERNAL_TUNNEL_URL="http://localhost:${FRIDAY_TUNNEL_PORT:-19090}" -cd /app/tools/agent-playground +cd /app/apps/studio-ui deno run -A --no-lock npm:vite dev --host 0.0.0.0 --port 5200 --logLevel warn & -PLAYGROUND_PID=$! +STUDIO_UI_PID=$! cd /app echo "[platform] Starting webhook-tunnel on :9090..." FRIDAYD_URL=http://localhost:8080 webhook-tunnel & TUNNEL_PID=$! -wait_for_service "agent-playground" "http://localhost:5200" +wait_for_service "studio-ui" "http://localhost:5200" wait_for_service "webhook-tunnel" "http://localhost:9090/health" echo "" @@ -102,7 +102,7 @@ echo "" # ── Keep alive ─────────────────────────────────────────────────────────────── # Wait for any service to exit — if one dies, stop everything -wait -n $ATLASD_PID $LINK_PID $PLAYGROUND_PID $TUNNEL_PID 2>/dev/null || true +wait -n $ATLASD_PID $LINK_PID $STUDIO_UI_PID $TUNNEL_PID 2>/dev/null || true echo "[platform] A service exited unexpectedly. Shutting down..." shutdown diff --git a/knip.json b/knip.json index c21121f39..e02425aef 100644 --- a/knip.json +++ b/knip.json @@ -86,7 +86,7 @@ "$app/*": ["../../node_modules/@sveltejs/kit/src/runtime/app/*"] } }, - "tools/agent-playground": { + "apps/studio-ui": { "entry": ["mod.ts!", "static-server.ts!", "src/routes/**/*.svelte!", "src/**/*.test.ts"], "project": ["src/**/*.{ts,tsx,js,jsx,svelte}!", "*.ts!", "*.js!"], "paths": { diff --git a/lint-staged.config.js b/lint-staged.config.js index de413e1b7..e47639613 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -65,7 +65,7 @@ export default { // passing only excluded files causes `deno lint` to fail with "No target files found". const DENO_LINT_EXCLUDED = [ "/packages/ui/src/", - "/tools/agent-playground/src/", + "/apps/studio-ui/src/", "/tools/chat-replay/", "/deprecated/", ]; diff --git a/package.json b/package.json index be20f0f1a..a20a2cd31 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "bugs": { "url": "https://github.com/friday-platform/friday-studio/issues" }, "author": "Tempest Labs, Inc.", "license": "BUSL-1.1", - "workspaces": ["./apps/*", "./packages/*", "./tools/evals", "./tools/agent-playground"], + "workspaces": ["./apps/*", "./packages/*", "./tools/evals"], "dependencies": { "@atlas/agent-sdk": "workspace:*", "@atlas/atlasd": "workspace:*", diff --git a/packages/core/src/architecture.test.ts b/packages/core/src/architecture.test.ts index 9e65eb075..28aa4be77 100644 --- a/packages/core/src/architecture.test.ts +++ b/packages/core/src/architecture.test.ts @@ -18,7 +18,7 @@ function* walk(dir: string): Generator { describe("architecture", () => { // `@atlas/core` exports session-event types and reducers consumed by the - // browser bundle (agent-playground). The bare `@atlas/hallucination` entry + // browser bundle (studio-ui). The bare `@atlas/hallucination` entry // re-exports `validate` and `createFSMOutputValidator` — which transitively // import `@atlas/logger` → `node:process`. Always use the // @atlas/hallucination/verdict` subpath here. diff --git a/packages/core/src/chat/export/render.ts b/packages/core/src/chat/export/render.ts index a635d70aa..e2d1cd1a9 100644 --- a/packages/core/src/chat/export/render.ts +++ b/packages/core/src/chat/export/render.ts @@ -1,6 +1,6 @@ /** * Pure render helpers shared between the live chat UI and the chat export - * route. Lifted out of `tools/agent-playground/.../user-chat.svelte` and + * route. Lifted out of `apps/studio-ui/.../user-chat.svelte` and * `chat-message-list.svelte` so the export route in `apps/atlasd` can call * them server-side and produce HTML that mirrors what the user saw. * diff --git a/packages/core/src/chat/export/types.ts b/packages/core/src/chat/export/types.ts index 7edb792b1..f1855eb01 100644 --- a/packages/core/src/chat/export/types.ts +++ b/packages/core/src/chat/export/types.ts @@ -1,6 +1,6 @@ /** * Shared render-shape types used by the live chat UI and the chat export - * route. Lifted from `tools/agent-playground/.../types.ts` so server-side + * route. Lifted from `apps/studio-ui/.../types.ts` so server-side * HTML generation in `apps/atlasd` can reuse the same render helpers * without dragging Svelte into the daemon. * diff --git a/packages/system/skills/friday-cli/references/cli.md b/packages/system/skills/friday-cli/references/cli.md index e689b6ffc..4733319f4 100644 --- a/packages/system/skills/friday-cli/references/cli.md +++ b/packages/system/skills/friday-cli/references/cli.md @@ -198,7 +198,7 @@ via NATS request/reply. See the `writing-friday-python-agents` skill for the ful ### `agent exec` `agent exec -i [--url http://localhost:5200] [--env K=V,K2=V2] [--json] [--stream]` -Executes an agent via the playground. Requires `deno task playground` running +Executes an agent via Studio UI. Requires `deno task studio-ui` running separately on :5200. Good for testing agents in isolation before wiring them into a workspace. diff --git a/packages/system/skills/writing-friday-python-agents/SKILL.md b/packages/system/skills/writing-friday-python-agents/SKILL.md index 483acd45d..c3f3fe920 100644 --- a/packages/system/skills/writing-friday-python-agents/SKILL.md +++ b/packages/system/skills/writing-friday-python-agents/SKILL.md @@ -395,7 +395,7 @@ curl -s -X POST "http://localhost:8080/api/agents/my-agent/run?workspaceId=user" -d '{"input": "test prompt"}' ``` -Or via the playground API on `localhost:5200`: +Or via Studio UI on `localhost:5200`: ```bash curl -s -X POST http://localhost:5200/api/agents/my-agent/run \ diff --git a/packages/system/skills/writing-workspace-signals/SKILL.md b/packages/system/skills/writing-workspace-signals/SKILL.md index a36a15778..cdc116049 100644 --- a/packages/system/skills/writing-workspace-signals/SKILL.md +++ b/packages/system/skills/writing-workspace-signals/SKILL.md @@ -136,7 +136,7 @@ signals: `missedWindow` (Duration: `s`/`m`/`h`, default `24h`) caps the catch-up window for every policy. A daemon down for a week with `catchup` on an hourly cron only fires the slots inside the window — never all 168. -Missed-schedule events surface on the playground `/schedules` page under "Missed schedules" and persist in the JetStream `WORKSPACE_EVENTS` stream for 30 days. `manual` events that haven't been fired/dismissed show a pending badge + action buttons. +Missed-schedule events surface on the Studio UI `/schedules` page under "Missed schedules" and persist in the JetStream `WORKSPACE_EVENTS` stream for 30 days. `manual` events that haven't been fired/dismissed show a pending badge + action buttons. ### Concurrency policy diff --git a/scripts/build-studio.ts b/scripts/build-studio.ts index 5af9b7e06..2c8db4a01 100644 --- a/scripts/build-studio.ts +++ b/scripts/build-studio.ts @@ -18,7 +18,7 @@ * x86_64-pc-windows-msvc (Windows x64, zip) * * For each target the script: - * 1. `deno compile`s atlas, link, webhook-tunnel, playground. + * 1. `deno compile`s atlas, link, webhook-tunnel, studio-ui. * 2. Downloads pinned external CLIs (gh, cloudflared) for the target. * 3. Stages everything under dist//staging/. * 4. Archives the staging dir + emits sha256 + size. @@ -309,10 +309,10 @@ const DENO_BINARIES = [ include: [] as string[], }, { - name: "playground", - entry: "tools/agent-playground/static-server.ts", + name: "studio-ui", + entry: "apps/studio-ui/static-server.ts", flags: ["--unstable-worker-options", "--unstable-kv", "--unstable-raw-imports"], - include: ["tools/agent-playground/build"], + include: ["apps/studio-ui/build"], }, ]; @@ -660,11 +660,11 @@ async function main(): Promise { await ensureDir(stagingDir); await ensureDir(scratchDir); - // Make sure the playground build artifact exists before deno-compile embeds it. - const playgroundBuild = join(repoRoot, "tools/agent-playground/build"); - if (!existsSync(playgroundBuild)) { - console.log("[build-studio] playground build missing — running vite build…"); - await run(["npm", "run", "build"], { cwd: join(repoRoot, "tools/agent-playground") }); + // Make sure the studio-ui build artifact exists before deno-compile embeds it. + const studioUiBuild = join(repoRoot, "apps/studio-ui/build"); + if (!existsSync(studioUiBuild)) { + console.log("[build-studio] studio-ui build missing — running vite build…"); + await run(["npm", "run", "build"], { cwd: join(repoRoot, "apps/studio-ui") }); } // Stack 3 split-destination layout: @@ -675,7 +675,7 @@ async function main(): Promise { // /bin/friday ← every supervised binary // /bin/link lives under bin/ so it // /bin/webhook-tunnel can't collide with a - // /bin/playground user-data dir name (e.g. + // /bin/studio-ui user-data dir name (e.g. // /bin/nats-server link-data/wiring.db) and // /bin/agent-browser the launcher's friday-home // /bin/cloudflared stays clean of binaries. @@ -709,8 +709,8 @@ async function main(): Promise { console.log("[build-studio] --skip-compile set, skipping deno + go compile"); } - // Sidecar read at playground startup via dirname(Deno.execPath()) to - // distinguish release builds from `deno task playground` (no sidecar → dev). + // Sidecar read at studio-ui startup via dirname(Deno.execPath()) to + // distinguish release builds from `deno task studio-ui` (no sidecar → dev). await Deno.writeTextFile(join(binStaging, ".studio-version"), `${opts.version}\n`); if (!opts.skipExternal) { diff --git a/scripts/dev-watcher.ts b/scripts/dev-watcher.ts index 738f38e86..e7db2fde0 100644 --- a/scripts/dev-watcher.ts +++ b/scripts/dev-watcher.ts @@ -63,7 +63,7 @@ const EXCLUDE_SUBSTRINGS: readonly string[] = [ "/dist/", "/build/", "/.atlas/", - "/tools/agent-playground/", + "/apps/studio-ui/", "/.deno/", "/coverage/", "/__fixtures__/", diff --git a/scripts/generate-third-party-licenses.sh b/scripts/generate-third-party-licenses.sh index 5ec13cce8..be6c4cab9 100755 --- a/scripts/generate-third-party-licenses.sh +++ b/scripts/generate-third-party-licenses.sh @@ -69,7 +69,7 @@ emit_header() { # Third-Party Licenses This file lists every third-party dependency bundled into a shipped Friday -Studio artifact (the daemon, CLI, web playground, Friday Launcher, +Studio artifact (the daemon, CLI, Studio UI, Friday Launcher, webhook tunnel, and Studio Installer). It is generated automatically by [`scripts/generate-third-party-licenses.sh`](scripts/generate-third-party-licenses.sh). @@ -126,7 +126,7 @@ emit_rust() { emit_node() { echo "## npm / JSR packages" >> "$OUT" echo >> "$OUT" - echo "Bundled into: the Atlas daemon, CLI, web playground, and any compiled" >> "$OUT" + echo "Bundled into: the Atlas daemon, CLI, Studio UI, and any compiled" >> "$OUT" echo "Deno binaries. Inventory is taken from \`deno.lock\`." >> "$OUT" echo >> "$OUT" echo "| Package | Version | Source |" >> "$OUT" diff --git a/tools/agent-playground/mod.ts b/tools/agent-playground/mod.ts deleted file mode 100644 index c66e4f1d7..000000000 --- a/tools/agent-playground/mod.ts +++ /dev/null @@ -1,2 +0,0 @@ -// @atlas/agent-playground — dev tool, no public exports -export {}; diff --git a/tools/agent-playground/src/lib/components/chat/__snapshots__/validation-pill-row.test.ts.snap b/tools/agent-playground/src/lib/components/chat/__snapshots__/validation-pill-row.test.ts.snap deleted file mode 100644 index edd9df4a8..000000000 --- a/tools/agent-playground/src/lib/components/chat/__snapshots__/validation-pill-row.test.ts.snap +++ /dev/null @@ -1,11 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`ValidationPillRow > failed-retrying: snapshot 1`] = `"
  • sourcing error
    Claim

    Pricing for the Acme Pro plan is $29/mo

    Reasoning

    No tool result contains pricing for Acme Pro.

    Citation

    Plans: Free, Team. Contact sales for enterprise.

  • no-tools-called warn
    Claim

    User has 12 unread emails

    Reasoning

    Agent did not call any inbox tool before claiming this.

    Citation

    (no supporting tool call)

"`; - -exports[`ValidationPillRow > failed-terminal: snapshot 1`] = `"
  • sourcing error
    Claim

    Pricing for the Acme Pro plan is $29/mo

    Reasoning

    No tool result contains pricing for Acme Pro.

    Citation

    Plans: Free, Team. Contact sales for enterprise.

  • no-tools-called warn
    Claim

    User has 12 unread emails

    Reasoning

    Agent did not call any inbox tool before claiming this.

    Citation

    (no supporting tool call)

"`; - -exports[`ValidationPillRow > passed-from-pass: snapshot 1`] = `"
"`; - -exports[`ValidationPillRow > passed-from-uncertain: snapshot 1`] = `"
"`; - -exports[`ValidationPillRow > running: snapshot 1`] = `"
Validating output attempt 1
"`; diff --git a/tools/chat-replay/README.md b/tools/chat-replay/README.md index d43f091e5..f1ced7508 100644 --- a/tools/chat-replay/README.md +++ b/tools/chat-replay/README.md @@ -1,6 +1,6 @@ # Friday Chat Replay -Standalone SvelteKit replay app using the same JS toolchain and real chat UI components as `tools/agent-playground`. +Standalone SvelteKit replay app using the same JS toolchain and real chat UI components as `apps/studio-ui`. ## Run diff --git a/tools/chat-replay/tsconfig.json b/tools/chat-replay/tsconfig.json index 33f7cfe18..5821ee8da 100644 --- a/tools/chat-replay/tsconfig.json +++ b/tools/chat-replay/tsconfig.json @@ -18,7 +18,7 @@ "src/**/*.svelte", ".svelte-kit/ambient.d.ts", "vite.config.ts", - "../tools/agent-playground/src/app.d.ts", + "../../apps/studio-ui/src/app.d.ts", "../types/deno-compat.d.ts" ], "exclude": ["node_modules", "build", "dist", ".svelte-kit/types"] diff --git a/tools/friday-launcher/healthsvc_test.go b/tools/friday-launcher/healthsvc_test.go index 240080d7b..2a8399ce8 100644 --- a/tools/friday-launcher/healthsvc_test.go +++ b/tools/friday-launcher/healthsvc_test.go @@ -64,12 +64,12 @@ func TestDeriveStatus_Running(t *testing.T) { }{ { "running ready", - runningReady("playground"), + runningReady("studio-ui"), statusHealthy, }, { "running not ready", - runningNotReady("playground"), + runningNotReady("studio-ui"), statusStarting, }, { @@ -185,7 +185,7 @@ func TestHealthCache_TransitionUpdatesSinceSecs(t *testing.T) { c := NewHealthCache(&sd) // First observation — service is starting. - c.Update(makeStates(runningNotReady("playground"))) + c.Update(makeStates(runningNotReady("studio-ui"))) // Sleep enough for SinceSecs to roll past 0 if the service // stayed in starting. Then transition to healthy. @@ -193,14 +193,14 @@ func TestHealthCache_TransitionUpdatesSinceSecs(t *testing.T) { // If we re-Update with the SAME state, transitionAt must NOT // move — SinceSecs reflects how long it's been starting. - c.Update(makeStates(runningNotReady("playground"))) + c.Update(makeStates(runningNotReady("studio-ui"))) got, _, _ := c.Snapshot() if got[0].SinceSecs < 1 { t.Fatalf("expected SinceSecs >= 1 for unchanged status, got %d", got[0].SinceSecs) } // Now transition. SinceSecs must reset to 0. - c.Update(makeStates(runningReady("playground"))) + c.Update(makeStates(runningReady("studio-ui"))) got, _, _ = c.Snapshot() if got[0].Status != statusHealthy { t.Fatalf("status = %q, want healthy", got[0].Status) @@ -647,7 +647,7 @@ func TestStartHealthServer_EndToEnd_GET(t *testing.T) { func TestHealthStream_DeliversInitialAndTransition(t *testing.T) { var sd atomic.Bool c := NewHealthCache(&sd) - c.Update(makeStates(runningNotReady("playground"))) + c.Update(makeStates(runningNotReady("studio-ui"))) r := chi.NewRouter() r.Get("/api/launcher-health/stream", handleHealthStream(c)) @@ -685,12 +685,12 @@ func TestHealthStream_DeliversInitialAndTransition(t *testing.T) { t.Fatalf("first event decode: %v", err) } if firstBody.AllHealthy { - t.Errorf("initial snapshot AllHealthy = true, want false (playground starting)") + t.Errorf("initial snapshot AllHealthy = true, want false (studio-ui starting)") } // Transition. SSE consumer should receive a follow-up event // with all_healthy: true. - c.Update(makeStates(runningReady("playground"))) + c.Update(makeStates(runningReady("studio-ui"))) second, err := readSSEEvent(rd) if err != nil { @@ -805,7 +805,7 @@ func TestHealthRouter_PanicRecovery(t *testing.T) { func TestHealthStream_NoDuplicateInitialEmit(t *testing.T) { var sd atomic.Bool c := NewHealthCache(&sd) - c.Update(makeStates(runningNotReady("playground"))) + c.Update(makeStates(runningNotReady("studio-ui"))) r := chi.NewRouter() r.Get("/api/launcher-health/stream", handleHealthStream(c)) @@ -844,7 +844,7 @@ func TestHealthStream_NoDuplicateInitialEmit(t *testing.T) { // Drive the transition. Without the drain, the stream's NEXT // event would be a stale duplicate (still NotReady) and the // real transition would land as a third event. - c.Update(makeStates(runningReady("playground"))) + c.Update(makeStates(runningReady("studio-ui"))) second, err := readSSEEvent(rd) if err != nil { diff --git a/tools/friday-launcher/integration_test.go b/tools/friday-launcher/integration_test.go index 38fa7d25c..ddd30afba 100644 --- a/tools/friday-launcher/integration_test.go +++ b/tools/friday-launcher/integration_test.go @@ -109,12 +109,12 @@ func buildLauncherAndStubs(t *testing.T) (launcherPath, binDir string) { "friday": {"18080", "/health"}, "link": {"13100", "/health"}, "webhook-tunnel": {"19090", "/health"}, - // Decision #32: playground probes `/` (the public SvelteKit + // Decision #32: studio-ui probes `/` (the public SvelteKit // root), not a sidecar. The stub program reads HEALTH_PATH // and serves the same handler at any path, so the test // observes the real probe rule: launcher hits the path // project.go declares. - "playground": {"15200", "/"}, + "studio-ui": {"15200", "/"}, } for name, w := range wrappers { writeWrapper(t, binDir, name, stubBin, w.port, w.healthPath, "") @@ -140,7 +140,7 @@ func portEnv() []string { "FRIDAY_PORT_FRIDAY=18080", "FRIDAY_PORT_LINK=13100", "FRIDAY_PORT_WEBHOOK_TUNNEL=19090", - "FRIDAY_PORT_PLAYGROUND=15200", + "FRIDAY_PORT_STUDIO_UI=15200", } } @@ -345,9 +345,9 @@ func TestShutdownTimeoutSafety(t *testing.T) { t.Skip("integration test") } launcher, binDir := buildLauncherAndStubs(t) - // Replace the playground wrapper with one that ignores SIGTERM. + // Replace the studio-ui wrapper with one that ignores SIGTERM. stubBin := filepath.Join(binDir, "_stub") - writeWrapper(t, binDir, "playground", stubBin, + writeWrapper(t, binDir, "studio-ui", stubBin, "15200", "/", "IGNORE_SIGTERM=1") cmd, _ := startLauncher(t, launcher, binDir) waitHealthy(t) @@ -934,7 +934,7 @@ func TestUninstall_SweepsOrphansWhenLauncherDead(t *testing.T) { // binDir/_stub, so the kernel-level program path under that // pid lands under binDir — exactly what SweepByBinaryPath // matches against. - stub := exec.Command(filepath.Join(binDir, "playground")) + stub := exec.Command(filepath.Join(binDir, "studio-ui")) stub.Env = append(os.Environ(), portEnv()...) stub.Stderr = os.Stderr if err := stub.Start(); err != nil { diff --git a/tools/friday-launcher/project.go b/tools/friday-launcher/project.go index 143b31682..dbd6b2a52 100644 --- a/tools/friday-launcher/project.go +++ b/tools/friday-launcher/project.go @@ -55,7 +55,7 @@ func commonServiceEnv() []string { } // Pin every supervised service to the launcher-owned home. The friday // daemon's getFridayHome() reads FRIDAY_HOME first; sibling services - // (link, webhook-tunnel, playground) that resolve their own paths via + // (link, webhook-tunnel, studio-ui) that resolve their own paths via // the same helper need the same value, otherwise their data drifts to // the legacy ~/.atlas fallback while the daemon writes to // ~/.friday/local — homes diverge silently. @@ -167,7 +167,7 @@ func fridayEnv(binDir string) []string { // commonServiceEnv() carries FRIDAY_HOME (which redirects getFridayHome // for every consumer — workspaces, chats, sessions, skills.db, // storage.db, memory, logs, .env), the .env baseline, and shared - // LINK_DEV_MODE etc. Sibling services (link, webhook-tunnel, playground) + // LINK_DEV_MODE etc. Sibling services (link, webhook-tunnel, studio-ui) // receive the same baseline; pinning FRIDAY_HOME there ensures their // own getFridayHome() resolves to the same launcher-owned home rather // than drifting to the legacy ~/.atlas fallback. @@ -195,7 +195,7 @@ func fridayEnv(binDir string) []string { // any other launcher-side knob: portOverride() reads via os.Getenv, // which doesn't see KVs that flow only through commonServiceEnv() into // spawned services. Without this call, a user setting -// `FRIDAY_PORT_PLAYGROUND=15200` in .env would have no effect because +// `FRIDAY_PORT_STUDIO_UI=15200` in .env would have no effect because // the launcher itself never observes the variable. func importDotEnvIntoProcessEnv() { for _, kv := range loadDotEnv(filepath.Join(friendlyHome(), ".env")) { @@ -388,7 +388,7 @@ var startOrder = []string{ "friday", "link", "webhook-tunnel", - "playground", + "studio-ui", } // processSpec captures the minimal launcher-side knowledge of one @@ -414,7 +414,7 @@ func supervisedProcessNames() []string { "friday", "link", "webhook-tunnel", - "playground", + "studio-ui", } } @@ -425,7 +425,7 @@ func supervisedProcessNames() []string { // The actual binaries are expected to live alongside the launcher in // the platform tarball. For QA / stub-based local dev, individual // ports can be overridden via env vars FRIDAY_PORT_ -// (e.g. FRIDAY_PORT_PLAYGROUND=15200) so that tests don't collide +// (e.g. FRIDAY_PORT_STUDIO_UI=15200) so that tests don't collide // with a developer's real Friday instance running on the production // ports. func supervisedProcesses(binDir string) []processSpec { @@ -509,7 +509,7 @@ func supervisedProcesses(binDir string) []processSpec { // Decision #32: the readiness probe MUST exercise the // real handler stack at a public entry point — that's // what makes "all healthy" actually mean "all usable". - // Playground is a SvelteKit app whose root path is a + // studio-ui is a SvelteKit app whose root path is a // public landing; probing `/` catches the SvelteKit- // not-yet-bound race that a sidecar `/api/health` would // silently green-light. project_test.go pins this so a @@ -518,7 +518,7 @@ func supervisedProcesses(binDir string) []processSpec { // Carries .env so EXTERNAL_DAEMON_URL / EXTERNAL_TUNNEL_URL // reach static-server.ts, which injects them into the // served HTML for the browser's window.__FRIDAY_CONFIG__. - name: "playground", binary: filepath.Join(binDir, "playground"), + name: "studio-ui", binary: filepath.Join(binDir, "studio-ui"), env: commonServiceEnv(), healthPort: "5200", healthPath: "/", }, @@ -549,10 +549,9 @@ func supervisedProcesses(binDir string) []processSpec { // tools/webhook-tunnel/main.go:11 reads TUNNEL_PORT // (default 9090). specs[i].env = append(specs[i].env, "TUNNEL_PORT="+port) - case "playground": - // tools/agent-playground/static-server.ts:18 reads - // PLAYGROUND_PORT (default 5200). - specs[i].env = append(specs[i].env, "PLAYGROUND_PORT="+port) + case "studio-ui": + // apps/studio-ui/static-server.ts reads STUDIO_UI_PORT (default 5200). + specs[i].env = append(specs[i].env, "STUDIO_UI_PORT="+port) case "nats-server": // nats-server uses --port at index 1 of its args; the // monitoring --http_port stays on the default 8222 so the @@ -575,14 +574,14 @@ func portOverride(name string) string { return osGetenv(envName) } -// playgroundURL returns the loopback URL the tray opens in the user's +// studioUIURL returns the loopback URL the tray opens in the user's // browser when the platform reaches "all healthy". Honors the -// FRIDAY_PORT_playground override so installs that move playground off +// FRIDAY_PORT_studio-ui override so installs that move studio-ui off // 5200 (e.g. to avoid collision with another local Friday instance) get // the right URL — without this the tray click silently lands on the // wrong port and the user sees a "can't connect" page. -func playgroundURL() string { - port := portOverride("playground") +func studioUIURL() string { + port := portOverride("studio-ui") if port == "" { port = "5200" } @@ -625,7 +624,7 @@ func newProjectFromSpecs(specs []processSpec) *types.Project { // = 62s window before process-compose declares the // process unhealthy and restarts it. The friday daemon // alone takes ~24s on first boot (workspace scan + skill - // bundle hashing + cron registration), and playground's + // bundle hashing + cron registration), and studio-ui's // SvelteKit-first-render takes another ~6-8s. The old // 12s window (5 × 2s) was enough for warm restarts but // not for the very first launch after install — every diff --git a/tools/friday-launcher/project_env_test.go b/tools/friday-launcher/project_env_test.go index a0b7a74e5..d69257bd7 100644 --- a/tools/friday-launcher/project_env_test.go +++ b/tools/friday-launcher/project_env_test.go @@ -11,7 +11,7 @@ import ( // Verify the .env values the installer writes flow through to all // supervised services. Regression guard: previously only `friday` -// got .env, so EXTERNAL_DAEMON_URL never reached `playground` and the +// got .env, so EXTERNAL_DAEMON_URL never reached `studio-ui` and the // browser-side window.__FRIDAY_CONFIG__ stayed empty. func TestCommonServiceEnvFlowsToAllServices(t *testing.T) { tmpHome := t.TempDir() @@ -32,7 +32,7 @@ LINK_DEV_MODE=true t.Setenv("HOME", tmpHome) specs := supervisedProcesses("/tmp/bin") - required := []string{"friday", "link", "webhook-tunnel", "playground"} + required := []string{"friday", "link", "webhook-tunnel", "studio-ui"} for _, name := range required { var found *processSpec for i := range specs { @@ -128,7 +128,7 @@ func TestFridayEnv_PinsUvCachesUnderFridayHome(t *testing.T) { } // TestImportDotEnvIntoProcessEnv_PopulatesPortOverrides closes the -// gap that made FRIDAY_PORT_PLAYGROUND=15200 in ~/.friday/local/.env +// gap that made FRIDAY_PORT_STUDIO_UI=15200 in ~/.friday/local/.env // silently ignored: portOverride() reads via os.Getenv, but pre-fix // the .env values flowed only into spawned-service envs (via // commonServiceEnv) — never into the launcher's own process env. @@ -141,25 +141,25 @@ func TestImportDotEnvIntoProcessEnv_PopulatesPortOverrides(t *testing.T) { t.Fatal(err) } envFile := filepath.Join(envDir, ".env") - envContent := "FRIDAY_PORT_PLAYGROUND=15200\nLINK_DEV_MODE=true\n" + envContent := "FRIDAY_PORT_STUDIO_UI=15200\nLINK_DEV_MODE=true\n" if err := os.WriteFile(envFile, []byte(envContent), 0o644); err != nil { t.Fatal(err) } t.Setenv("HOME", tmpHome) // Make sure the test starts from a clean slate for the keys we // expect importDotEnvIntoProcessEnv to populate. - t.Setenv("FRIDAY_PORT_PLAYGROUND", "") - _ = os.Unsetenv("FRIDAY_PORT_PLAYGROUND") + t.Setenv("FRIDAY_PORT_STUDIO_UI", "") + _ = os.Unsetenv("FRIDAY_PORT_STUDIO_UI") importDotEnvIntoProcessEnv() - if got := os.Getenv("FRIDAY_PORT_PLAYGROUND"); got != "15200" { - t.Errorf("FRIDAY_PORT_PLAYGROUND after import = %q, want 15200", got) + if got := os.Getenv("FRIDAY_PORT_STUDIO_UI"); got != "15200" { + t.Errorf("FRIDAY_PORT_STUDIO_UI after import = %q, want 15200", got) } // portOverride consults os.Getenv with the same translation rule the // public contract documents (uppercase, hyphens → underscores). - if got := portOverride("playground"); got != "15200" { - t.Errorf("portOverride(playground) after import = %q, want 15200", got) + if got := portOverride("studio-ui"); got != "15200" { + t.Errorf("portOverride(studio-ui) after import = %q, want 15200", got) } } @@ -245,14 +245,14 @@ func TestImportDotEnvIntoProcessEnv_PreservesExistingEnv(t *testing.T) { // readiness probe (which the original portOverride code already did) // but also propagate the port into the supervised binary itself — // either as a CLI flag (friday's --port) or an env var (LINK_PORT, -// TUNNEL_PORT, PLAYGROUND_PORT). Without this propagation the launcher +// TUNNEL_PORT, STUDIO_UI_PORT). Without this propagation the launcher // would probe the override port while the binary stays on its hardcoded // default, and the supervisor stays "starting" forever. func TestSupervisedProcesses_PortOverridesPropagate(t *testing.T) { t.Setenv("FRIDAY_PORT_FRIDAY", "18080") t.Setenv("FRIDAY_PORT_LINK", "13100") t.Setenv("FRIDAY_PORT_WEBHOOK_TUNNEL", "19090") - t.Setenv("FRIDAY_PORT_PLAYGROUND", "15200") + t.Setenv("FRIDAY_PORT_STUDIO_UI", "15200") specs := supervisedProcesses("/tmp/bin") @@ -267,7 +267,7 @@ func TestSupervisedProcesses_PortOverridesPropagate(t *testing.T) { {name: "friday", check: "args", wantArg: "--port", wantPort: "18080"}, {name: "link", check: "env", wantEnv: "LINK_PORT=13100", wantPort: "13100"}, {name: "webhook-tunnel", check: "env", wantEnv: "TUNNEL_PORT=19090", wantPort: "19090"}, - {name: "playground", check: "env", wantEnv: "PLAYGROUND_PORT=15200", wantPort: "15200"}, + {name: "studio-ui", check: "env", wantEnv: "STUDIO_UI_PORT=15200", wantPort: "15200"}, } for _, tc := range cases { @@ -306,24 +306,24 @@ func TestSupervisedProcesses_PortOverridesPropagate(t *testing.T) { } } -// TestPlaygroundURL_HonorsPortOverride asserts the tray opens the -// correct URL when the playground port is overridden. Without this +// TestStudioUIURL_HonorsPortOverride asserts the tray opens the +// correct URL when the studio-ui port is overridden. Without this // the tray click after a port override silently lands on // http://localhost:5200 (default) and the user sees connection // refused. -func TestPlaygroundURL_HonorsPortOverride(t *testing.T) { - if got := playgroundURL(); got != "http://localhost:5200" { - t.Errorf("default playgroundURL = %q, want http://localhost:5200", got) +func TestStudioUIURL_HonorsPortOverride(t *testing.T) { + if got := studioUIURL(); got != "http://localhost:5200" { + t.Errorf("default studioUIURL = %q, want http://localhost:5200", got) } - t.Setenv("FRIDAY_PORT_PLAYGROUND", "15200") - if got := playgroundURL(); got != "http://localhost:15200" { - t.Errorf("overridden playgroundURL = %q, want http://localhost:15200", got) + t.Setenv("FRIDAY_PORT_STUDIO_UI", "15200") + if got := studioUIURL(); got != "http://localhost:15200" { + t.Errorf("overridden studioUIURL = %q, want http://localhost:15200", got) } } // TestCommonServiceEnv_EmitsFridayHome guards the contract that // drives the entire ~/.friday/local redirect: every supervised -// service (friday daemon, link, webhook-tunnel, playground) must +// service (friday daemon, link, webhook-tunnel, studio-ui) must // receive FRIDAY_HOME so getFridayHome() in @atlas/utils resolves // to the launcher-owned home. Without this, services fall back to // the legacy ~/.atlas location and homes silently drift apart — @@ -339,7 +339,7 @@ func TestCommonServiceEnv_EmitsFridayHome(t *testing.T) { want := "FRIDAY_HOME=" + filepath.Join(tmpHome, ".friday", "local") specs := supervisedProcesses("/tmp/bin") - required := []string{"friday", "link", "webhook-tunnel", "playground"} + required := []string{"friday", "link", "webhook-tunnel", "studio-ui"} for _, name := range required { var found *processSpec for i := range specs { @@ -375,7 +375,7 @@ func TestCommonServiceEnv_EmitsFridayConfigPath(t *testing.T) { want := "FRIDAY_CONFIG_PATH=" + filepath.Join(tmpHome, ".friday", "local") specs := supervisedProcesses("/tmp/bin") - required := []string{"friday", "link", "webhook-tunnel", "playground"} + required := []string{"friday", "link", "webhook-tunnel", "studio-ui"} for _, name := range required { var found *processSpec for i := range specs { diff --git a/tools/friday-launcher/project_test.go b/tools/friday-launcher/project_test.go index 80e087818..e25cbfc84 100644 --- a/tools/friday-launcher/project_test.go +++ b/tools/friday-launcher/project_test.go @@ -7,29 +7,29 @@ import ( "testing" ) -// TestPlaygroundProbePath_IsRoot pins the playground readiness probe +// TestStudioUIProbePath_IsRoot pins the studio-ui readiness probe // to "/" — the public SvelteKit landing page — per Decision #32. A // sidecar like "/api/health" returns 200 even before SvelteKit has // bound the root route, which silently green-lights "all healthy" // while a user-side request to / would still 404. Pinning this // catches a future refactor that quietly reverts to the sidecar. -func TestPlaygroundProbePath_IsRoot(t *testing.T) { +func TestStudioUIProbePath_IsRoot(t *testing.T) { specs := supervisedProcesses("/tmp/dummy-bin") for _, s := range specs { - if s.name != "playground" { + if s.name != "studio-ui" { continue } if s.healthPath != "/" { - t.Errorf("playground healthPath = %q, want %q (Decision #32)", + t.Errorf("studio-ui healthPath = %q, want %q (Decision #32)", s.healthPath, "/") } if s.healthPort != "5200" { - t.Errorf("playground healthPort = %q, want %q", + t.Errorf("studio-ui healthPort = %q, want %q", s.healthPort, "5200") } return } - t.Fatal("playground not found in supervisedProcesses") + t.Fatal("studio-ui not found in supervisedProcesses") } // TestSupervisedProcessesProbeShape covers the universal contract — @@ -67,7 +67,7 @@ func TestSupervisedProcessesPinSet(t *testing.T) { "friday", "link", "webhook-tunnel", - "playground", + "studio-ui", } specs := supervisedProcesses("/tmp/dummy-bin") got := make([]string, len(specs)) @@ -141,7 +141,7 @@ func TestCommonServiceEnv_RespectsExplicitOverride(t *testing.T) { // Supervisor.RestartAll iterates over when calling RestartProcess // on each supervised service. nats-server must come first so the // friday daemon's NatsManager tcpProbe finds an external NATS on -// :4222 and reuses it instead of spawning its own; playground +// :4222 and reuses it instead of spawning its own; studio-ui // comes last so it doesn't surface a spurious "backend down" UI // flash while its upstreams are still warming up. A reorder here // without a corresponding probe/dependency review can cause the @@ -149,7 +149,7 @@ func TestCommonServiceEnv_RespectsExplicitOverride(t *testing.T) { // (Decision #?: 12s → 62s) was supposed to eliminate. func TestStartOrderConfig(t *testing.T) { want := []string{ - "nats-server", "friday", "link", "webhook-tunnel", "playground", + "nats-server", "friday", "link", "webhook-tunnel", "studio-ui", } if !slices.Equal(startOrder, want) { t.Errorf("startOrder mismatch:\n want %q\n got %q", want, startOrder) diff --git a/tools/friday-launcher/tray.go b/tools/friday-launcher/tray.go index 07518e914..f42b5a6e4 100644 --- a/tools/friday-launcher/tray.go +++ b/tools/friday-launcher/tray.go @@ -302,7 +302,7 @@ func (t *trayController) openBrowser(reason string) { log.Info("browser-open suppressed by --no-browser", "reason", reason) return } - url := playgroundURL() + url := studioUIURL() log.Info("opening browser", "reason", reason, "url", url) if err := openURLInBrowser(url); err != nil { log.Error("openBrowser failed", "error", err) diff --git a/tools/pty-server/README.md b/tools/pty-server/README.md index 0bfd8252a..f7ba1e6ee 100644 --- a/tools/pty-server/README.md +++ b/tools/pty-server/README.md @@ -1,6 +1,6 @@ # pty-server -WebSocket↔PTY bridge for the cheatsheet terminal in `agent-playground`. +WebSocket↔PTY bridge for the cheatsheet terminal in `studio-ui`. Replaces the prior Node/`node-pty`/`tsx` server (`server.ts`) with a single static Go binary that runs on Linux, macOS (Intel + ARM), and Windows (amd64). @@ -64,7 +64,7 @@ Default shells: `GET /health` → `200 {"ok":true}` with CORS headers. `OPTIONS /health` → `204`. **The path is `/health`, not `/healthz`.** Other Go services in this repo use -`/healthz` but the cheatsheet client (`tools/agent-playground/src/lib/components/shared/cheatsheet.svelte:44`) +`/healthz` but the cheatsheet client (`apps/studio-ui/src/lib/components/shared/cheatsheet.svelte:44`) hardcodes `/pty-proxy/health`. Do not "harmonize" the path without updating the client. @@ -114,7 +114,7 @@ that's been removed. From a fresh clone you need a built `atlas` available: ``` deno task compile # produces ./bin/atlas export PATH="$PWD/bin:$PATH" -deno task playground # cheatsheet terminal will pick it up +deno task studio-ui # cheatsheet terminal will pick it up ``` Or simply rely on the shell's normal `which atlas` — if your dev box diff --git a/tools/pty-server/main.go b/tools/pty-server/main.go index 427356824..0ef03f618 100644 --- a/tools/pty-server/main.go +++ b/tools/pty-server/main.go @@ -79,7 +79,7 @@ func run(cfg Config) error { mux := http.NewServeMux() // /health — kept as /health (NOT /healthz) to match the cheatsheet - // client at tools/agent-playground/.../cheatsheet.svelte:44. + // client at apps/studio-ui/.../cheatsheet.svelte:44. // Other Go services in this repo use /healthz; do not "harmonize" // this path without updating the client. mux.HandleFunc("/health", handleHealth) diff --git a/tools/qa/live-daemon/scenarios/activity-sidebar-ui.ts b/tools/qa/live-daemon/scenarios/activity-sidebar-ui.ts index 5fa036953..3f7e8e89f 100644 --- a/tools/qa/live-daemon/scenarios/activity-sidebar-ui.ts +++ b/tools/qa/live-daemon/scenarios/activity-sidebar-ui.ts @@ -131,16 +131,16 @@ async function materializeFixture(): Promise { async function startPlayground( daemon: DaemonHandle, ): Promise<{ port: number; process: Deno.ChildProcess; baseUrl: string }> { - await runChecked("deno", ["task", "-f", "@atlas/agent-playground", "sync"], { + await runChecked("deno", ["task", "-f", "@atlas/studio-ui", "sync"], { cwd: WORKTREE_ROOT, timeoutMs: 120_000, }); const port = pickPort(); - const logDir = join(daemon.fridayHome, "playground"); + const logDir = join(daemon.fridayHome, "studio-ui"); const proc = new Deno.Command("npx", { args: ["vite", "dev", "--host", "127.0.0.1", "--port", String(port), "--strictPort"], - cwd: join(WORKTREE_ROOT, "tools/agent-playground"), + cwd: join(WORKTREE_ROOT, "apps/studio-ui"), env: { ...Deno.env.toObject(), EXTERNAL_DAEMON_URL: daemon.baseUrl, diff --git a/vitest.config.ts b/vitest.config.ts index 8c1be08e5..e45b0b4f1 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -12,12 +12,9 @@ export default defineConfig({ // the ones component tests reach for, and reproduce the `$lib` // alias so route-component tests (e.g. the export preview page) // resolve the same way the dev server does. - $lib: fileURLToPath(new URL("./tools/agent-playground/src/lib", import.meta.url)), + $lib: fileURLToPath(new URL("./apps/studio-ui/src/lib", import.meta.url)), "$app/environment": fileURLToPath( - new URL( - "./tools/agent-playground/src/lib/__test-stubs__/app-environment.ts", - import.meta.url, - ), + new URL("./apps/studio-ui/src/lib/__test-stubs__/app-environment.ts", import.meta.url), ), }, }, @@ -32,7 +29,7 @@ export default defineConfig({ // Component test pulls in a Svelte-table alpha whose dist files // import without extensions; vitest's ESM resolver rejects them. // The component itself ships fine — only the test loader is broken. - "tools/agent-playground/src/lib/components/mcp/mcp-credentials-panel.test.ts", + "apps/studio-ui/src/lib/components/mcp/mcp-credentials-panel.test.ts", ], update: process.env.CI ? "none" : "new", // `@tanstack/svelte-query` ships a `.svelte` file