AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.
Rust agent-memoryai-agentsbm25claude-codeclicode-searchcursordatabaseelasticsearchfull-text-searchhybrid-searchjsonllocal-firstmcpmcp-servermodel-context-protocolragrustsearch-enginevector-search
Rename the embedded Console UX dir: playground/ -> xerj-ux/
xerj-orgf5fbf536dcc5
diff --git a/engine/crates/xerj-console-api/Cargo.toml b/engine/crates/xerj-console-api/Cargo.tomlindex 339241fae..4a83a5dd1 100644--- a/engine/crates/xerj-console-api/Cargo.toml+++ b/engine/crates/xerj-console-api/Cargo.toml@@ -6,8 +6,8 @@ license.workspace = trueauthors.workspace = truedescription = "Xerj Console backend API: dashboards, auth, prefs, cluster awareness, and pluggable data sources. Ships compiled into the xerj v1.0 binary; extracts post-v1.0 as a standalone product that can target any data source."-# Bundles the playground SPA (HTML/CSS/JS) into the binary. Walks the-# playground/ source tree at compile time and emits a `(url, bytes,+# Bundles the Xerj Console UX (xerj-ux/) (HTML/CSS/JS) into the binary. Walks the+# xerj-ux/ source tree at compile time and emits a `(url, bytes,# content_type)` slice consumed by `src/spa.rs`.build = "build.rs"diff --git a/engine/crates/xerj-console-api/build.rs b/engine/crates/xerj-console-api/build.rsindex a68d4cc78..8ca1b1c37 100644--- a/engine/crates/xerj-console-api/build.rs+++ b/engine/crates/xerj-console-api/build.rs@@ -1,19 +1,18 @@-// Bundle the Xerj Console playground (typography-first observability UI)+// Bundle the Xerj Console UX (typography-first observability SPA)// into the xerj binary at compile time.//-// We walk a single source directory (the playground repo lives next-// to the engine in this monorepo: ../../../xerj.ai/playground) and+// We walk a single source directory (`xerj-ux/` at the repo root) and// emit `$OUT_DIR/xerj_console_assets.rs` with a const slice of// (path, bytes) entries. The asset paths are relative to the-// playground root and used as the URL path under `/_xerj-console/`.+// xerj-ux root and used as the URL path under `/_xerj-console/`.//// We deliberately ship only HTML / CSS / JS / SVG / WOFF — anything// the runtime would never serve to a browser stays out. Files larger// than 4 MiB are skipped with a build-script warning so an accidental-// PDF in the playground tree doesn't bloat the binary.+// PDF in the UX tree doesn't bloat the binary.//// Re-run logic: cargo invokes this script when build.rs itself-// changes OR when any file under the playground source tree is+// changes OR when any file under the xerj-ux source tree is// modified (we emit `cargo:rerun-if-changed` for each one).use std::env;@@ -22,14 +21,12 @@ use std::io::Write;use std::path::{Path, PathBuf};// Path-resolution strategy: try multiple relative paths so the build-// works in both the monorepo root layout (xerj.ai/) and the engine--// worktree layout (xerj-es-compat-work/engine/, with xerj.ai-// alongside as a sibling worktree).-const PLAYGROUND_RELS: &[&str] = &[- "../../../xerj.ai/playground", // engine/crates/api → root → xerj.ai- "../../../../xerj.ai/playground", // worktree → parent → xerj.ai (sibling)- "../../playground", // direct sibling layout- "../../../playground", // alternate+// works from the repo-root layout and from an engine-worktree layout+// (engine/ checked out separately, with the repo root alongside).+const UX_RELS: &[&str] = &[+ "../../../xerj-ux", // engine/crates/api → repo root → xerj-ux+ "../../../../xerj-ux", // worktree → parent → xerj-ux (sibling)+ "../../xerj-ux", // direct sibling layout];const ALLOWED_EXTS: &[&str] = &["html", "css", "js", "svg", "ico", "woff", "woff2", "png"];const MAX_FILE_BYTES: u64 = 4 * 1024 * 1024;@@ -39,35 +36,34 @@ fn main() {let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());// Walk the candidate list and pick the first one that resolves to- // an existing playground directory.- let playground_root_canonical = PLAYGROUND_RELS+ // an existing xerj-ux directory.+ let ux_root = UX_RELS.iter().map(|rel| manifest_dir.join(rel)).find_map(|p| fs::canonicalize(&p).ok()).or_else(|| {// Last-ditch: env var override for CI / monorepo packaging.- env::var("XERJ_CONSOLE_PLAYGROUND_DIR").ok().and_then(|p| fs::canonicalize(p).ok())+ env::var("XERJ_CONSOLE_UX_DIR").ok().and_then(|p| fs::canonicalize(p).ok())});- let playground_root_canonical = match playground_root_canonical {+ let ux_root = match ux_root {Some(p) => p,None => {- // Playground checkout missing — emit an empty asset table- // so the engine still builds (e.g. release tarballs that- // omit the playground source).+ // xerj-ux checkout missing — emit an empty asset table so the+ // engine still builds (e.g. release tarballs that omit the UX).write_assets(&[], &manifest_dir);println!(- "cargo:warning=xerj-console playground not found in any of: {:?} — asset table will be empty (set XERJ_CONSOLE_PLAYGROUND_DIR to override)",- PLAYGROUND_RELS,+ "cargo:warning=xerj-ux not found in any of: {:?} — Console asset table will be empty (set XERJ_CONSOLE_UX_DIR to override)",+ UX_RELS,);return;}};let mut entries: Vec<(String, PathBuf)> = Vec::new();- walk(&playground_root_canonical, &playground_root_canonical, &mut entries);+ walk(&ux_root, &ux_root, &mut entries);entries.sort();- write_assets(&entries, &playground_root_canonical);+ write_assets(&entries, &ux_root);}fn walk(root: &Path, dir: &Path, out: &mut Vec<(String, PathBuf)>) {@@ -77,9 +73,9 @@ fn walk(root: &Path, dir: &Path, out: &mut Vec<(String, PathBuf)>) {};for entry in read.flatten() {let path = entry.path();- // Skip hidden files / dirs and node_modules (the playground- // is currently a static SPA but a future build step might- // pull deps).+ // Skip hidden files / dirs and node_modules (xerj-ux is+ // currently a buildless static SPA but a future build step+ // might pull deps).let name = path.file_name().and_then(|n| n.to_str()).unwrap_or("");if name.starts_with('.') || name == "node_modules" {continue;@@ -119,14 +115,14 @@ fn walk(root: &Path, dir: &Path, out: &mut Vec<(String, PathBuf)>) {}}-fn write_assets(entries: &[(String, PathBuf)], _playground_root: &Path) {+fn write_assets(entries: &[(String, PathBuf)], _ux_root: &Path) {let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());let out_path = out_dir.join("xerj_console_assets.rs");let mut f = fs::File::create(&out_path).expect("create xerj_console_assets.rs");writeln!(f,- "// auto-generated by build.rs — Xerj Console playground asset bundle\n\+ "// auto-generated by build.rs — Xerj Console UX asset bundle\n\//\n\// (url_path, bytes, content_type) tuples. Order is sorted-by-path\n\// so the runtime can binary-search by path.\n\diff --git a/engine/crates/xerj-console-api/src/prefs.rs b/engine/crates/xerj-console-api/src/prefs.rsindex 28eef61d3..b88654be7 100644--- a/engine/crates/xerj-console-api/src/prefs.rs+++ b/engine/crates/xerj-console-api/src/prefs.rs@@ -1,6 +1,6 @@//! Per-user UI preferences — `GET /prefs` and `PUT /prefs`.//!-//! Replaces every `localStorage["xerj.*"]` write the playground does+//! Replaces every `localStorage["xerj.*"]` write the Console UX does//! today: theme, default cluster, time range, mobile flag, search-box//! contents. We don't constrain the schema — the doc is whatever//! key/value pairs the SPA asks us to round-trip — but `_id` is alwaysdiff --git a/engine/crates/xerj-console-api/src/spa.rs b/engine/crates/xerj-console-api/src/spa.rsindex 16657b9dc..966b68eb1 100644--- a/engine/crates/xerj-console-api/src/spa.rs+++ b/engine/crates/xerj-console-api/src/spa.rs@@ -1,6 +1,6 @@-//! Xerj Console playground — embedded UI bundle served at `/_xerj-console`.+//! Xerj Console UX — embedded UI bundle served at `/_xerj-console`.//!-//! `build.rs` walks the playground source tree at compile time and+//! `build.rs` walks the xerj-ux source tree at compile time and//! generates `OUT_DIR/xerj_console_assets.rs` with a sorted slice of//! `(url_path, bytes, content_type)` tuples. This module includes//! that slice and exposes one Axum handler that does an O(log n)@@ -9,8 +9,8 @@//! ## URL shape//!//! ```text-//! GET /_xerj-console → playground index.html (302 to /_xerj-console/)-//! GET /_xerj-console/ → playground index.html (200, text/html)+//! GET /_xerj-console → Console index.html (302 to /_xerj-console/)+//! GET /_xerj-console/ → Console index.html (200, text/html)//! GET /_xerj-console/{path*} → static asset by path, 404 if missing//! ```//!@@ -38,7 +38,7 @@ fn find_asset(path: &str) -> Option<&'static (&'static str, &'static [u8], &'staXERJ_CONSOLE_ASSETS.iter().find(|(p, _, _)| *p == path)}-/// Serve the playground's index.html for `/_xerj-console/`.+/// Serve the Console's index.html for `/_xerj-console/`.pub async fn xerj_console_index() -> impl IntoResponse {serve("index.html", true)}@@ -107,7 +107,7 @@ fn serve_asset(}/// Number of bundled assets — exposed for the startup banner so-/// operators see at-a-glance whether the playground was bundled.+/// operators see at-a-glance whether the Console UX was bundled.pub fn asset_count() -> usize {XERJ_CONSOLE_ASSETS.len()}diff --git a/engine/crates/xerj-console-api/tests/spa_assets.rs b/engine/crates/xerj-console-api/tests/spa_assets.rsindex 65c5833dd..7ec38cd1f 100644--- a/engine/crates/xerj-console-api/tests/spa_assets.rs+++ b/engine/crates/xerj-console-api/tests/spa_assets.rs@@ -1,6 +1,6 @@//! Smoke tests for the bundled Xerj Console SPA assets.//!-//! `build.rs` walks the playground/ source tree at compile time and+//! `build.rs` walks the xerj-ux/ source tree at compile time and//! emits a static `(url_path, bytes, content_type)` slice. These tests//! confirm the runtime serves the files the demo flow depends on://! setup.html, login.html, the auth + sync JS modules, and thediff --git a/landing/aise-demo.html b/landing/aise-demo.htmlindex b3905d95f..b784bad0f 100644--- a/landing/aise-demo.html+++ b/landing/aise-demo.html@@ -80,7 +80,7 @@<h2>Three points the v2 demo answers explicitly</h2><ol><li><strong>Why does the boot banner say "XERJ CONSOLE"?</strong> Because Xerj Console (the bundled UI) prints its own first-launch claim banner. The server (Xerj) prints its own version line one paragraph above; v2 highlights it.</li>- <li><strong>Where do the dashboards come from?</strong> Eight templates ship as code under <code>playground/src/dashboards/*.js</code>, bundled into the binary at compile time. The <strong>data</strong> they render comes from whatever you POST to <code>/_bulk</code>; users can rename / hide / clone via the SETTINGS section but the templates are versioned with the code.</li>+ <li><strong>Where do the dashboards come from?</strong> Eight templates ship as code under <code>xerj-ux/src/dashboards/*.js</code>, bundled into the binary at compile time. The <strong>data</strong> they render comes from whatever you POST to <code>/_bulk</code>; users can rename / hide / clone via the SETTINGS section but the templates are versioned with the code.</li><li><strong>How is the data added to a dashboard?</strong> It isn't — pull-based. Drop docs into the <code>chat-events</code> / <code>vector-ops</code> / <code>agent-memory</code> / <code>anomalies</code> / <code>ingest-events</code> / <code>ai-kb</code> indices and the matching dashboards' adapters auto-pick them up via <code>_search</code> aggregations. No "connect data source to dashboard" step required.</li></ol></div>diff --git a/landing/demo/index.html b/landing/demo/index.htmlindex 3e9224a89..f1b21c5ae 100644--- a/landing/demo/index.html+++ b/landing/demo/index.html@@ -759,7 +759,7 @@ node demo/scripts/full-demo-flow.jsthe corpus, the dashboard changes. Delete the index, the SPA'slive adapter returns <code>null</code> and the panel collapses toits mock skeleton (visible difference, no silent fallback). Code- path: <code><a href="https://github.com/xerj-ai/xerj/blob/main/playground/src/data/backends/xerj.js">playground/src/data/backends/xerj.js</a></code>+ path: <code><a href="https://github.com/xerj-ai/xerj/blob/main/xerj-ux/src/data/backends/xerj.js">xerj-ux/src/data/backends/xerj.js</a></code>function <code>liveAiOverview()</code> at line ~378.</p>diff --git a/playground/assets/base.css b/xerj-ux/assets/base.csssimilarity index 100%rename from playground/assets/base.cssrename to xerj-ux/assets/base.cssdiff --git a/playground/assets/tokens.css b/xerj-ux/assets/tokens.csssimilarity index 100%rename from playground/assets/tokens.cssrename to xerj-ux/assets/tokens.cssdiff --git a/playground/docs/api-wiring.md b/xerj-ux/docs/api-wiring.mdsimilarity index 100%rename from playground/docs/api-wiring.mdrename to xerj-ux/docs/api-wiring.mddiff --git a/playground/index.html b/xerj-ux/index.htmlsimilarity index 100%rename from playground/index.htmlrename to xerj-ux/index.htmldiff --git a/playground/login.html b/xerj-ux/login.htmlsimilarity index 100%rename from playground/login.htmlrename to xerj-ux/login.htmldiff --git a/playground/setup.html b/xerj-ux/setup.htmlsimilarity index 100%rename from playground/setup.htmlrename to xerj-ux/setup.htmldiff --git a/playground/src/app.js b/xerj-ux/src/app.jssimilarity index 100%rename from playground/src/app.jsrename to xerj-ux/src/app.jsdiff --git a/playground/src/dashboards/agent-memory.js b/xerj-ux/src/dashboards/agent-memory.jssimilarity index 100%rename from playground/src/dashboards/agent-memory.jsrename to xerj-ux/src/dashboards/agent-memory.jsdiff --git a/playground/src/dashboards/ai-overview.js b/xerj-ux/src/dashboards/ai-overview.jssimilarity index 100%rename from playground/src/dashboards/ai-overview.jsrename to xerj-ux/src/dashboards/ai-overview.jsdiff --git a/playground/src/dashboards/alerts.js b/xerj-ux/src/dashboards/alerts.jssimilarity index 100%rename from playground/src/dashboards/alerts.jsrename to xerj-ux/src/dashboards/alerts.jsdiff --git a/playground/src/dashboards/anomaly-detect.js b/xerj-ux/src/dashboards/anomaly-detect.jssimilarity index 100%rename from playground/src/dashboards/anomaly-detect.jsrename to xerj-ux/src/dashboards/anomaly-detect.jsdiff --git a/playground/src/dashboards/data.js b/xerj-ux/src/dashboards/data.jssimilarity index 100%rename from playground/src/dashboards/data.jsrename to xerj-ux/src/dashboards/data.jsdiff --git a/playground/src/dashboards/ingest-pipeline.js b/xerj-ux/src/dashboards/ingest-pipeline.jssimilarity index 100%rename from playground/src/dashboards/ingest-pipeline.jsrename to xerj-ux/src/dashboards/ingest-pipeline.jsdiff --git a/playground/src/dashboards/logs-overview.js b/xerj-ux/src/dashboards/logs-overview.jssimilarity index 100%rename from playground/src/dashboards/logs-overview.jsrename to xerj-ux/src/dashboards/logs-overview.jsdiff --git a/playground/src/dashboards/rag-quality.js b/xerj-ux/src/dashboards/rag-quality.jssimilarity index 100%rename from playground/src/dashboards/rag-quality.jsrename to xerj-ux/src/dashboards/rag-quality.jsdiff --git a/playground/src/dashboards/registry.js b/xerj-ux/src/dashboards/registry.jssimilarity index 100%rename from playground/src/dashboards/registry.jsrename to xerj-ux/src/dashboards/registry.jsdiff --git a/playground/src/dashboards/search-discover.js b/xerj-ux/src/dashboards/search-discover.jssimilarity index 100%rename from playground/src/dashboards/search-discover.jsrename to xerj-ux/src/dashboards/search-discover.jsdiff --git a/playground/src/dashboards/settings.js b/xerj-ux/src/dashboards/settings.jssimilarity index 100%rename from playground/src/dashboards/settings.jsrename to xerj-ux/src/dashboards/settings.jsdiff --git a/playground/src/dashboards/system.js b/xerj-ux/src/dashboards/system.jssimilarity index 100%rename from playground/src/dashboards/system.jsrename to xerj-ux/src/dashboards/system.jsdiff --git a/playground/src/dashboards/users.js b/xerj-ux/src/dashboards/users.jssimilarity index 100%rename from playground/src/dashboards/users.jsrename to xerj-ux/src/dashboards/users.jsdiff --git a/playground/src/dashboards/vector-index.js b/xerj-ux/src/dashboards/vector-index.jssimilarity index 100%rename from playground/src/dashboards/vector-index.jsrename to xerj-ux/src/dashboards/vector-index.jsdiff --git a/playground/src/data/backends/index.js b/xerj-ux/src/data/backends/index.jssimilarity index 100%rename from playground/src/data/backends/index.jsrename to xerj-ux/src/data/backends/index.jsdiff --git a/playground/src/data/backends/mock.js b/xerj-ux/src/data/backends/mock.jssimilarity index 100%rename from playground/src/data/backends/mock.jsrename to xerj-ux/src/data/backends/mock.jsdiff --git a/playground/src/data/backends/xerj.js b/xerj-ux/src/data/backends/xerj.jssimilarity index 100%rename from playground/src/data/backends/xerj.jsrename to xerj-ux/src/data/backends/xerj.jsdiff --git a/playground/src/data/dashboard-store.js b/xerj-ux/src/data/dashboard-store.jssimilarity index 100%rename from playground/src/data/dashboard-store.jsrename to xerj-ux/src/data/dashboard-store.jsdiff --git a/playground/src/data/data-sources.js b/xerj-ux/src/data/data-sources.jssimilarity index 100%rename from playground/src/data/data-sources.jsrename to xerj-ux/src/data/data-sources.jsdiff --git a/playground/src/data/export.js b/xerj-ux/src/data/export.jssimilarity index 100%rename from playground/src/data/export.jsrename to xerj-ux/src/data/export.jsdiff --git a/playground/src/data/feedback-citations.js b/xerj-ux/src/data/feedback-citations.jssimilarity index 100%rename from playground/src/data/feedback-citations.jsrename to xerj-ux/src/data/feedback-citations.jsdiff --git a/playground/src/data/mock.js b/xerj-ux/src/data/mock.jssimilarity index 100%rename from playground/src/data/mock.jsrename to xerj-ux/src/data/mock.jsdiff --git a/playground/src/data/query.js b/xerj-ux/src/data/query.jssimilarity index 100%rename from playground/src/data/query.jsrename to xerj-ux/src/data/query.jsdiff --git a/playground/src/ux/chart-types.js b/xerj-ux/src/ux/chart-types.jssimilarity index 100%rename from playground/src/ux/chart-types.jsrename to xerj-ux/src/ux/chart-types.jsdiff --git a/playground/src/ux/charts-ai.js b/xerj-ux/src/ux/charts-ai.jssimilarity index 100%rename from playground/src/ux/charts-ai.jsrename to xerj-ux/src/ux/charts-ai.jsdiff --git a/playground/src/ux/charts-ext.js b/xerj-ux/src/ux/charts-ext.jssimilarity index 100%rename from playground/src/ux/charts-ext.jsrename to xerj-ux/src/ux/charts-ext.jsdiff --git a/playground/src/ux/charts-ops.js b/xerj-ux/src/ux/charts-ops.jssimilarity index 100%rename from playground/src/ux/charts-ops.jsrename to xerj-ux/src/ux/charts-ops.jsdiff --git a/playground/src/ux/charts.js b/xerj-ux/src/ux/charts.jssimilarity index 100%rename from playground/src/ux/charts.jsrename to xerj-ux/src/ux/charts.jsdiff --git a/playground/src/ux/chrome.js b/xerj-ux/src/ux/chrome.jssimilarity index 100%rename from playground/src/ux/chrome.jsrename to xerj-ux/src/ux/chrome.jsdiff --git a/playground/src/ux/layout.js b/xerj-ux/src/ux/layout.jssimilarity index 100%rename from playground/src/ux/layout.jsrename to xerj-ux/src/ux/layout.jsdiff --git a/playground/src/ux/tables.js b/xerj-ux/src/ux/tables.jssimilarity index 100%rename from playground/src/ux/tables.jsrename to xerj-ux/src/ux/tables.jsdiff --git a/playground/src/ux/text.js b/xerj-ux/src/ux/text.jssimilarity index 100%rename from playground/src/ux/text.jsrename to xerj-ux/src/ux/text.jsdiff --git a/playground/src/xerj-console-auth.js b/xerj-ux/src/xerj-console-auth.jssimilarity index 100%rename from playground/src/xerj-console-auth.jsrename to xerj-ux/src/xerj-console-auth.jsdiff --git a/playground/src/xerj-console-sync.js b/xerj-ux/src/xerj-console-sync.jssimilarity index 100%rename from playground/src/xerj-console-sync.jsrename to xerj-ux/src/xerj-console-sync.js