Skip to content

Latest commit

 

History

History

web

README.md

Web console package

apps/web (@oac/web) is the React application of the OpenAgentCore administrator console. The console server serves its production build. DESIGN.md records the visual system and PRODUCT.md the product scope and behavior; the operator guide describes the console for administrators.

Rules for console code

  • Call Core only through AdminClient, SandboxAdminClient and CoreMetricsClient from packages/agents-client. The browser calls same-origin /console/* and /core/v1/* routes and never /v1 or /api/v1. Console API usage lists each page's routes and read bounds; update it with any change to them.
  • Keep API keys, the Core key and provider credentials out of VITE_* variables, browser storage, URLs, logs and source files.
  • Build pages from the shared components in src/components and the design tokens: the Beautiful UI base tokens in src/app/beautifui/foundation.css and the console's own in src/styles, as DESIGN.md describes.
  • Put copy in the i18n resources; see Web internationalization.

Run the console locally

Set up the checkout as described in Develop OpenAgentCore, then start the fixture console and the development server in separate terminals from the repository root:

node apps/web/e2e/fixture-console.mjs
OAC_WEB_DEV_PROXY_TARGET=http://127.0.0.1:18092 pnpm dev:web

Open http://127.0.0.1:4173 and sign in with the fixture-only key fixture-core-key-3f9a2c71.

pnpm dev:web runs Vite on 127.0.0.1:4173 and proxies /console, /node-install and /core/v1 to OAC_WEB_DEV_PROXY_TARGET (default http://127.0.0.1:8091). Vite reads the setting from the environment or the repository's .env file; it never reaches browser code. The target must serve the console routes. apps/web/e2e/fixture-console.mjs is a synthetic console service with deterministic data; AGENTS_FIXTURE_PORT changes its port (default 18092).

Checks

From the repository root:

pnpm --filter @oac/web typecheck
pnpm --filter @oac/web test
pnpm --filter @oac/web build
pnpm test:web:acceptance

pnpm test:web:acceptance runs the Playwright tests in apps/web/e2e in Chrome against the fixture console. After each test, every spec checks that the browser sent nothing to /v1 and no Authorization header. The tests do not exercise services/web or a real Core; the console server has its own Go tests. make check-web runs all of these; CONTRIBUTING.md lists the repository's required checks.

README screenshots

The fixture console has an opt-in demo scene that fills Overview and Agent metrics with five available nodes. From the repository root, start these in separate terminals, then sign in at http://127.0.0.1:4394 with the fixture key fixture-core-key-3f9a2c71:

OAC_WEB_SCREENSHOT_DEMO=1 AGENTS_FIXTURE_PORT=18394 node apps/web/e2e/fixture-console.mjs
OAC_WEB_DEV_PROXY_TARGET=http://127.0.0.1:18394 pnpm --filter @oac/web exec vite --host 127.0.0.1 --mode test --port 4394

The docs/assets/console-*.webp images are captured from this scene in light mode, once in English and once in Chinese. Acceptance runs and production builds never enable the scene.