feat(cockpit): Lanes 2+3 — embed client-vue + agent-machine loopback sidecar#70
Merged
Conversation
…njection
Composition plan Lane 2 (docs/cockpit-composition-plan.md). Makes the SocioProphet
cockpit shippable inside the .app, offline-first, in sovereign mode.
- scripts/build-cockpit.sh — compiles client-vue → Contents/Resources/cockpit/
(reproducible: clones SocioProphet/socioprophet@ref, or COCKPIT_SRC local checkout;
asserts the runtime resolver is present), then injects the config loader into index.html.
- runtime/cockpit-config.js — sets window.__COCKPIT_CONFIG__ = { mode: 'sovereign',
bases: {...loopback...} }, loaded BEFORE the app bundle. Consumed by client-vue's
runtime resolver (socioprophet #468). BearBrowser rewrites the ephemeral sidecar
ports into it at launch; committed values are the sovereign default.
- docs/cockpit-spec.md — §3/§7/§8 app-vue → client-vue (the stale 'client-vue mocked'
decision, now that client-vue is canonical).
Verified: staged the built client-vue dist + injected the config + served it headless —
window.__COCKPIT_CONFIG__ loads as sovereign with loopback bases, app boots clean, 0
errors. The resolver (Lane 1) consumes it.
Follow-ups: per-service sovereign loopback map (mode semantics, plan gap #3); profile
newtab wiring to the cockpit origin; Lane 3 agent-machine sidecar (bun --compile).
…0.29.4 regressed COUNT I'd used cbindgen 0.29.4 (latest 0.29.x, from a newer Firefox) — it emits the broken webrender_ffi macOS COUNT. FF 150.0.1's stated minimum (= its build version) is v0.29.1, before that codegen regression. Install from the git tag with --locked (crates.io 0.29.1 fails to build against current serde; the tag's Cargo.lock pins a compatible one).
Composition plan Lane 3. Packages @noetica/agent-machine (the local sovereign brain, 823 /api/* routes) into a single self-contained binary — no host Node, no node_modules. - scripts/build-agent-machine-sidecar.sh — bun build --compile server.ts → one 68M executable, then smoke-boots it and asserts /api/status 200 on loopback. Reproducible source (clone noetica@ref or AGENT_MACHINE_SRC local); COMPILES the engine, never edits it (Noetica lane: package-only). Installs deps only when node_modules is missing, so it doesn't touch an existing checkout's lockfile. - scripts/bearbrowser-agent-machine — launcher mirroring bearbrowser-sidecar-server: loopback-only, sovereign default (NOETICA_OFFLINE=1, no off-device egress), and it rewrites the live port into the embedded cockpit's cockpit-config.js so client-vue's resolver targets this sidecar — closing the Lane 1↔2↔3 loop. Verified for real: bun --compile → 68M arm64 binary that BOOTS, binds 127.0.0.1 ONLY by default, and serves /api/status 200 with NOETICA_OFFLINE=1 (no network). The build script's own smoke gate passes. bundleability de-risk → done. Follow-up: Homebrew/nix formula wiring (install the launcher + build step alongside bearbrowser-sidecar-server); Lane 4 governance via agent-control-bridge.
) Verified against agent-machine's route table: the local brain serves graph (76 /api/graph/* routes) + the agent surfaces + partial studio, but ZERO routes for reasoner / entity-resolution / IE / algo / sherlock — those are separate GKE services with no local equivalent. So they're intentionally UNSET in the sovereign config: the resolver falls back to /svc/* (no offline proxy) and the surfaces degrade gracefully, by design. Registering (connected mode) enables them. This resolves gap #3: it's a real capability subset, not a mapping to be filled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lanes 2 + 3 of the composition plan (#69) — the cockpit and its brain, runnable, sovereign, offline-first.
Lane 2 — embed the cockpit
scripts/build-cockpit.sh— compilesclient-vue→Contents/Resources/cockpit/(reproducible; injects the config loader).runtime/cockpit-config.js—window.__COCKPIT_CONFIG__ = { mode: 'sovereign', bases: {…loopback…} }, loaded before the app bundle, consumed by client-vue's runtime resolver (soc #468).docs/cockpit-spec.md— §3/§7/§8app-vue→client-vue.Lane 3 — agent-machine as a single-binary loopback sidecar
scripts/build-agent-machine-sidecar.sh—bun build --compile server.ts→ one 68M self-contained binary (no host Node, no node_modules), then smoke-boots it and asserts/api/status200. Compiles the Noetica engine, never edits it.scripts/bearbrowser-agent-machine— launcher mirroringbearbrowser-sidecar-server: loopback-only, sovereign default (NOETICA_OFFLINE=1), rewrites its live port intocockpit-config.js→ closes the Lane 1↔2↔3 loop.127.0.0.1only by default, serves/api/status200 offline. Bundleability de-risk → done.Follow-ups
Homebrew/nix formula wiring (install launcher + build steps alongside
bearbrowser-sidecar-server); per-service sovereign loopback map (mode semantics); profilenewtab→ cockpit origin; Lane 4 governance viaagent-control-bridge.