Skip to content

feat(cockpit): Lanes 2+3 — embed client-vue + agent-machine loopback sidecar#70

Merged
mdheller merged 4 commits into
mainfrom
feat/cockpit-embed-lane2
Jul 20, 2026
Merged

feat(cockpit): Lanes 2+3 — embed client-vue + agent-machine loopback sidecar#70
mdheller merged 4 commits into
mainfrom
feat/cockpit-embed-lane2

Conversation

@mdheller

@mdheller mdheller commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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 — compiles client-vueContents/Resources/cockpit/ (reproducible; injects the config loader).
  • runtime/cockpit-config.jswindow.__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/§8 app-vueclient-vue.
  • Verified: served the staged embed headless — config loads sovereign, app boots clean, 0 errors.

Lane 3 — agent-machine as a single-binary loopback sidecar

  • scripts/build-agent-machine-sidecar.shbun build --compile server.ts → one 68M self-contained binary (no host Node, no node_modules), then smoke-boots it and asserts /api/status 200. Compiles the Noetica engine, never edits it.
  • scripts/bearbrowser-agent-machine — launcher mirroring bearbrowser-sidecar-server: loopback-only, sovereign default (NOETICA_OFFLINE=1), rewrites its live port into cockpit-config.js → closes the Lane 1↔2↔3 loop.
  • Verified for real: the compiled binary boots, binds 127.0.0.1 only by default, serves /api/status 200 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); profile newtab → cockpit origin; Lane 4 governance via agent-control-bridge.

mdheller added 3 commits July 19, 2026 20:03
…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.
@mdheller mdheller changed the title feat(cockpit): Lane 2 — embed client-vue + sovereign runtime config injection feat(cockpit): Lanes 2+3 — embed client-vue + agent-machine loopback sidecar Jul 20, 2026
)

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.
@mdheller
mdheller merged commit e0d8da6 into main Jul 20, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant