Skip to content

JaredMAllison/cockpit

Repository files navigation

Cognitive Prosthetic Cockpit

License: MIT JavaScript

Unified HUD for the Marlin/LMF stack. OoT Zelda aesthetic. Three sub-screens. No build step.

Served by cockpit.py (Python http.server static file server) at port 9100. All UI is React via Babel CDN — edit and reload, no compilation.


Sub-screens

Sub-screen Key Contents
Quest Status 1 Active projects (left) + Marlin task/mode/ADLs (right)
Map 2 TTF calendar week (left) + Quickhacks panel (right)
Items 3 Vault file browser (left) + Ariel conversation (right)

Keyboard shortcuts

Key Action
1 / 2 / 3 Jump to sub-screen
[ / ArrowLeft Previous sub-screen
] / ArrowRight Next sub-screen
e Toggle label edit mode
Escape Exit edit mode

Architecture

React 18 via unpkg CDN + Babel standalone — no build step, no node_modules. All components are .jsx files loaded in dependency order by index.html. React and ReactDOM are globals.

File Role
cockpit.py Static file server — path traversal protected, .jsx served as text/javascript
index.html Shell — loads CDN scripts, hooks (plain JS), then all JSX components, then mounts <App />
app.jsx Root — sub-screen state, keyboard nav, edit mode, ariel cross-panel cite
zelda-frame.jsx OoT chrome — top nav bar, shoulder hints, bottom status strip
subscreen-transition.jsx 220ms cross-fade + 12px slide between sub-screens
editable.jsx Label editing system — LabelsProvider, E component, template store in localStorage
hooks/usePoll.js Generic polling hook — fetches on mount + interval, preserves last-good data on error
hooks/api.js Fetch wrappers for all backend endpoints — only file that differs between instances
panels/projects.jsx Projects sub-screen panel
panels/marlin.jsx Marlin state/tasks/ADL panel
panels/ttf.jsx TTF calendar week panel
panels/quickhacks.jsx Mode switcher + inbox capture panel
panels/vault.jsx Vault file browser + on-demand preview
panels/ariel.jsx Ariel/Navi conversation panel — POST /chat, local turn history, file citations, live elapsed timer

Running

# Direct
python3 cockpit.py

# Via systemd user service (auto-starts on login)
systemctl --user enable --now cockpit.service

Cockpit serves at http://0.0.0.0:9100. Port configurable via COCKPIT_PORT env var.


Deploying a new instance (e.g. Jason)

Use the Windows USB package in deploy/windows/. Run build-usb.sh <output-dir> to produce a self-contained bundle with cockpit, LMF orchestrator, Ollama, blank starter vault, and launch/stop/setup scripts. See deploy/windows/README-setup.txt for Jason's setup instructions.

hooks/api.js is the only file that changes between instances — HOSTS maps each service to its local port.


Customizing labels

Press e to enter edit mode. Click any label text to rename it. Changes persist in localStorage under the key cockpit_labels. Press Escape to cancel an edit, Enter to confirm.

Templates (preset label sets) are stored alongside user saves. Three built-in templates ship: OoT Faithful, Cockpit Default, Plain English.


Changelog

See CHANGELOG.md for version history.


Backend APIs consumed

Endpoint Panel
http://localhost:7832/api/state Marlin, ZeldaFrame (mode tint)
http://localhost:7832/api/adls Marlin
http://localhost:7832/tasks/today Marlin
http://localhost:7833/api/projects Projects
http://localhost:7833/api/vault/tree Vault
http://localhost:7833/api/vault/file?path=... Vault
http://localhost:3000/api/events?from=...&to=... TTF
http://localhost:8742/chat Ariel — POST chat, GET health, GET status
http://localhost:8742/health Ariel online indicator
http://localhost:8742/status Ariel model/inference state

All ports configurable in hooks/api.js — change HOSTS to match your deployment.

About

Unified HUD for the cognitive prosthetic stack — OoT Zelda-themed panel switcher

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors