SCHEMA — tools/console/web¶
The Harness Console's page: React + TypeScript on Mantine, built by Vite into
dist/and served by../app.py— and, built a second way (../build-pages.sh: base/bamr87/,VITE_STATIC=1), the public site on GitHub Pages (docs/CONSOLE-PAGES.md).
Structure¶
| entry | kind | purpose | rules |
|---|---|---|---|
README.md |
file | What the page is, how to build and develop it, how the source is laid out | required |
SCHEMA.md |
file | This contract | required |
package.json |
file | Manifest; always-latest (*) dependencies, no lockfile |
required |
.npmrc |
file | package-lock=false — npm never writes a lockfile here |
required |
.gitignore |
file | Ignores node_modules/, the two build outputs (dist/, dist-pages/) and *.tsbuildinfo |
required |
tsconfig.json |
file | Strict TypeScript, type-check only (Vite bundles) | required |
vite.config.ts |
file | Build to dist/ (or CONSOLE_OUT) under CONSOLE_BASE; the public build's CSP <meta>; a site build's front door, mark and frame origins (VITE_FRONT_DOOR, VITE_SITE_MARK, CONSOLE_FRAME_SRC, set by ../build-pages.sh); the dev server's proxy to a running console (HTTP + the /api/tui WebSocket) |
required |
index.html |
file | The entry document — links /theme.css (fleetcore's palette) and the bundle |
required |
public/ |
dir | Files copied verbatim into the build (favicon.svg; headshot-448.jpg, the avatar _data/profile.yml names, a 448 px copy of the full-size headshot.jpg kept beside it; social-preview.png, its 1280x640 site.image link card, also the repo's GitHub social preview; readme-hero.jpg, the profile README's hero screenshot; bash-365-mark.svg, the mark _data/profile.yml sites.bash-365 names, an unchanged copy of bash-365.com's assets/brand/favicon.svg) |
terminal |
src/ |
dir | The app: main.tsx, nav.ts, theme.ts, styles.css, and api/, lib/, components/, jobs/, github/, pages/, assist/ (see README) |
terminal |
dist/ |
generated | Vite's build output — what the console serves; gitignored, rebuilt by ../run.sh |
generated |
dist-pages/ |
generated | The public site built locally by ../build-pages.sh (page + snapshot); gitignored — CI builds into _site/ |
generated |
node_modules/ |
generated | Installed dependencies | generated |
tsconfig.tsbuildinfo |
generated | TypeScript's incremental-build cache (tsc -b) |
generated |
Placement¶
- A new page →
src/pages/<Name>.tsx, its route insrc/main.tsx, its nav entry insrc/nav.ts, and its URL builder insrc/lib/links.ts. - A new API document → its type in
src/api/types.tsand a Query hook insrc/api/hooks.ts. - A list →
components/DataTable.tsx, withhref(oronActivate) so every row drills down, andkeysso keys v1 navigates it. - Something that runs an operation →
jobs/RunButton.tsxoruseRunner().runOp(); neverPOST /api/jobsdirectly, which would skip the confirm gate. The docked assistant's messages go throughrunOptoo. - Something an assistant session may do to the page → an action in
src/assist/pageBridge.tsand its twin in../page_bridge.py(the allowlist and the argument check), never a selector or a script from the session.
Forbidden¶
- No confirming question outside a Mantine modal: the page bridge keeps every modal out of an assistant session's reach, and
../test_console.pyfails a file that sendsconfirm: truewithout one. No lockfile, no pinned versions. No hex colour for a role fleetcore already defines; use thevar(--…)roles from/theme.css. No inline<script>inindex.html(the console's CSP isscript-src 'self'). No credential value held in page state beyond the input that sends it.