petalTongue — Live on hud.primals.eco

Universal User Interface primal deployed as headless web server. WebSocket JSON-RPC bridge, grammar-of-graphics scene compiler, Anderson selective permeability rendered live.

Validated live — petalTongue v1.7.0 serving at hud.primals.eco on golgiBody. WebSocket JSON-RPC bridge verified. Scene compiler producing SVG + WebGL output.

What petalTongue Is

petalTongue is the Universal User Interface primal — an 18-crate Rust system that renders data across four modalities from the same codebase:

ModalityTechnologyStatus
Desktop GUIegui/eframeBuilt, not deployed on golgiBody
Terminal TUIratatui/crosstermBuilt, not deployed on golgiBody
Web serveraxum + towerLIVE — v1.7.0 headless on golgiBody
Browser WASMwasm-bindgenCrate exists (593KB), not yet wired to HUD

The headless build (--no-default-features) strips all GUI/TUI dependencies, producing an 8.4MB static musl binary that serves the axum web stack only.

Live Endpoints

All endpoints at hud.primals.eco (also biomeos.primals.eco, os.primals.eco):

EndpointMethodResponse
/healthGET{"mode":"web","primal":"petalTongue","status":"ok","version":"1.7.0"}
/health/livenessGETKubernetes-style liveness probe
/health/readinessGETKubernetes-style readiness probe
/api/statusGETMode, version, neural API availability
/api/primalsGETConnected primals (empty in tutorial mode)
/api/ecosystemGETEcosystem metrics (gates, GPU nodes)
/api/snapshotGETCurrent scene graph state
/api/gate-meshGETGate enrollment and links
/api/physical-topologyGETHardware topology (CRS310, Flints, Omada)
/api/mesh-peersGETWireGuard mesh peer state
/api/primal-healthGETPer-primal health metrics
/api/eventsGET (SSE)Server-sent event stream
/wsWebSocketJSON-RPC bridge to embedded platform runtime
/ws/sceneWebSocketScene streaming for WebGL rendering
/viz/{slug}GETVisualization pages

27 API endpoints, all returning 200.

WebSocket JSON-RPC Bridge

The most powerful capability: any computational actor can connect to wss://hud.primals.eco/ws and invoke petalTongue’s embedded platform runtime directly.

Available Methods

MethodWhat It Does
health.checkRuntime health → {"status":"ok","state":"Running"}
capabilities.listSelf-discovery of available methods
pt.stateRuntime lifecycle state
pt.metricsReal-time CPU %, memory, core count from golgiBody
pt.scenariosBuilt-in visualization scenario catalog (8 scenarios)
pt.render_svgScenario → SVG via grammar-of-graphics compiler
pt.render_bindingCustom DataBinding → SVG
pt.render_webglCustom DataBinding → GPU draw calls + view-projection matrix

DataBinding Channel Types

The pt.render_binding and pt.render_webgl methods accept arbitrary data in these channel types:

Channel TypeRequired Fields
timeseriesid, label, x_label, y_label, unit, x_values, y_values
barid, label, categories, values, unit
gaugeid, label, value, min, max, unit, normal_range, warning_range
heatmapid, label, x_labels, y_labels, values (row-major), unit
scatterid, label, x, y, unit
scatter3did, label, x, y, z, unit
distributionid, label, unit, values, mean, std, comparison_value
faceted_barid, label, group_by, groups (key + categories + values), unit, columns, normalization
faceted_gaugeid, label, group_by, gauges (key + value + min/max + ranges), unit, columns
donutid, label, categories, values, unit
game_sceneid, label, scene (tilemap, sprites, entities)
soundscapeid, label, definition (layers, waveforms)

Normalization

Bar, heatmap, faceted_bar, and faceted_gauge channels accept an optional normalization field:

StrategyRangeDescription
nonerawDefault — backward compatible, no transformation
min_max[0, 1]Per-column linear scaling — used for mixed-metric panels
symmetric[-1, 1]Centered scaling — shows direction + magnitude
z_scoreσ unitsStandard deviations from mean
log1pcompressedln(1 + |x|) · sign(x) — compresses large ranges
rank[0, 1]Ordinal percentile — robust to outliers
leaky_relumixedmax(α·x, x) — preserves negative values with reduced magnitude

Per-column independence: each category column is normalized independently across all groups. Original values are preserved for labels; only the rendering geometry uses normalized scale.

Built-in Scenarios

petalTongue ships 8 visualization scenarios across two domains:

Agriculture (airSpring)

ScenarioScenesPhysics
airspring.et0daily_et0, monthly_et0Reference evapotranspiration
airspring.richards_pdemoisture_fieldRichards PDE soil moisture (16.7KB SVG)
airspring.crop_coefficientkc_gauge, kc_stagesCrop coefficient (Kc)
airspring.drought_indexspi_timeseriesDrought Index (SPI/SPEI)

Measurement (groundSpring)

ScenarioScenesPhysics
groundspring.seismicwave_field, arrival_timesSeismic wave propagation (21.5KB SVG)
groundspring.anderson_localizationlocalization_heatmapAnderson localization (14KB SVG)
groundspring.sensor_driftdrift_timeseriesSensor calibration drift
groundspring.spectral_reconstructionpower_spectrumSpectral reconstruction

All 11 scenes render to SVG in under 100ms total.

Anderson Selective Permeability — Rendered Live

Paper 43 defines the permeability tensor P(ω, W_ω, d_ω) for mode-dependent transport through biological membranes. BarraCuda implements the formulas. The agent computed 6 biological systems and rendered each through petalTongue:

SystemModesSelectivity SRendered as
Commensal Relay51.000Heatmap + Gauge
Gut Epithelium41.000Heatmap + Gauge
Healthy Skin (d=2)41.000Heatmap + Gauge
AD Skin (d→3, breach)40.000Heatmap + Gauge
Fleet (S=0)40.000Heatmap + Gauge
No-Till Soil40.743Heatmap + Gauge

Plus: permeability tensor heatmap (22KB), selectivity comparison bars (5.8KB), AD dimensional promotion curve (5.7KB), disorder sweeps at d=1,2,3 (19KB), Anderson phase space scatter (7.3KB + 52 WebGL draw calls).

Total: 15 SVGs + 1 WebGL scene, ~103KB, rendered in 1.1 seconds over the live WebSocket bridge.

Architecture

Caddy TLS (:443)
  ├── /api/* /health /ws /viz  →  reverse_proxy 127.0.0.1:8092
  ├── /ops/*                   →  basicauth + file_server
  └── /*                       →  Zola static site (HUD dashboard)

petaltongue-hud.service (:8092)
  └── petaltongue web --bind 127.0.0.1:8092
      --docroot /opt/ecoPrimals/hud/site/public
      --spa --allowed-origins "*" --cache-ttl 30

The split routing pattern serves static Zola pages for the dashboard and reverse-proxies API/WS traffic to petalTongue. Both share the same domain aliases: hud.primals.eco, biomeos.primals.eco, os.primals.eco.

Privacy Invariant

  • No cookies, no tracking pixels, no JS analytics
  • No IP addresses stored in any API response
  • CORS enabled for cross-origin rendering, no session state
  • petalTongue web mode is stateless — no auth cookies, no user tracking

Cross-Site Bridge Architecture

All 4 primals.eco sites with petalTongue panels share a common bridge module:

pt-bridge-core.js (251 lines — single source of truth)
  ├── PetalBridge(config)        — WS connect, JSON-RPC 2.0, SVG inject
  ├── classifyOrganism(cluster)  — unified behavioral heuristic
  └── build*() helpers           — shared faceted panel builders
         ↓
signal-pt.js (335 lines) — 22 panels, cross-origin data
hud-pt.js    (309 lines) — 22 panels, same-origin WS
thesis-pt.js (237 lines) — 14 panels + 5 shared faceted
detroit-pt.js(376 lines) — 19 panels, graph data (no organism heuristic)

Panel Consolidation

The faceting subsystem replaced 9 separate bars with 3 faceted small-multiples + donuts per site:

BeforeAfterEffect
4 organism bars (IPs, UA, blame, lang)1 faceted_bar + 1 donutSmall multiples per organism
4 entity bars (CV, chrome, blame, RPS)1 faceted_gauge + 1 faceted_barPer-entity gauge + profile
3 detroit bars (nodes, flows, communities)3 donut chartsProportional arcs
1 detroit bar (per-court capture)1 faceted_gaugePer-court capture ratio

Total: 87 panels → 77 panels across all sites. Fewer panels, more information per panel.

What’s Next

PhaseGoalStatus
Motor wiringskunky-ingest → petalTongue motor → SSE pushPlanned
WASM renderingReplace hud-core.js with petal-tongue-wasm (593KB)Crate exists
UI AtomicSquirrel + petalTongue composition from ui_atomic.tomlDesigned
Scene streaming/ws/scene for live WebGL in browserEndpoint exists
Shared core symlinksReplace per-site copies with build-time copy from shared/js/Identified debt
🔥 The mirror asks back — what did you see?

Anonymous. No names, no IPs, no sessions. Just words and the shape they make.