diff --git a/.github/workflows/nightly-dmg.yml b/.github/workflows/nightly-dmg.yml index 9d85808..48c4c40 100644 --- a/.github/workflows/nightly-dmg.yml +++ b/.github/workflows/nightly-dmg.yml @@ -111,19 +111,18 @@ jobs: # and 21 (Xcode) both hit the same webrender COUNT error, so keep the # simpler Xcode clang. # - lld: Firefox's macOS linker (Xcode doesn't ship it). - # - cbindgen: Mozilla's fork @ b826cb8 (0.29.4). This BUILDS and lets the - # compile run fully, but it emits a webrender_ffi macOS-only block - # (`#if defined(XP_MACOSX)` — hence Linux is unaffected) that references - # an undeclared COUNT, failing at ~27min. 🔴 KNOWN REMAINING BLOCKER — - # see docs note below. (0.28.0 is rejected as too old; crates.io 0.29.1 - # won't even compile against current serde; both clang 19 and 21 hit the - # identical COUNT, so it is NOT the compiler.) The real fix is to build - # with Mozilla's ACTUAL pinned toolchain bundle (what `mach bootstrap` - # fetches, which fails on this fork) rather than piecing it from brew. + # - cbindgen: PINNED to v0.29.1 (git tag eef1776) — FF 150.0.1's stated + # minimum, i.e. its build version. v0.29.4 (b826cb8, the LATEST 0.29.x, + # from a newer Firefox) emits a webrender_ffi macOS-only block + # (`#if defined(XP_MACOSX)` — hence Linux is fine) referencing an + # undeclared COUNT — a codegen regression after 0.29.1, failing ~27min + # in. Install from the git TAG with --locked (crates.io 0.29.1 won't + # compile against current serde; the tag's own Cargo.lock pins a + # compatible one). Clang is NOT the cause (19 and 21 fail identically). brew install nasm lld echo "$(brew --prefix lld)/bin" >> "$GITHUB_PATH" cargo install --git https://github.com/mozilla/cbindgen \ - --rev b826cb8911488fe8a209d2b693492c0c673e8cca cbindgen + --tag v0.29.1 --locked cbindgen echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" { echo "" diff --git a/docs/cockpit-spec.md b/docs/cockpit-spec.md index 7005e26..ea158e6 100644 --- a/docs/cockpit-spec.md +++ b/docs/cockpit-spec.md @@ -45,9 +45,17 @@ what policy did about it. ## 3. Cockpit shell — Vue, shipped inside the .app, offline-first -**Base.** Fork `socioprophet-web/app-vue` (the real SPA — carries the Studio -design language + Carbon tokens). *Not* `client-vue` (mocked) and *not* the React -marketing shell. Product UI is Vue. +**Base.** Embed `socioprophet-web/client-vue` — the canonical, real cockpit (54 +surfaces, live `/svc` backends, shipped to GKE via prophet-platform #882). *Not* the +React marketing shell. Product UI is Vue. + +> **Decision update (2026-07-19, see `docs/cockpit-composition-plan.md`):** this was +> `app-vue`, with `client-vue` dismissed as "mocked." That's stale — `client-vue` +> became the canonical, real cockpit (the app-vue Studio surfaces were migrated into +> it). Embedding `client-vue` gives ONE codebase across embedded + GKE-hosted + +> Firebase. The build step is `scripts/build-cockpit.sh`; the sovereign runtime config +> is `runtime/cockpit-config.js`, consumed by client-vue's runtime resolver +> (`src/config/cockpitRuntime.ts`, socioprophet #468). **Embedding — no network for the shell.** Built assets ship inside the app bundle and load from a local origin, never HTTP: @@ -149,7 +157,7 @@ Physical actions are governed by the **same engine** as browser actions. ``` ┌──────────────────────────── BearBrowser.app (Gecko) ────────────────────────────┐ - │ Cockpit (Vue app-vue) origin: resource://bearbrowser-cockpit CSP: self+loopback │ + │ Cockpit (Vue client-vue) origin: resource://bearbrowser-cockpit CSP: self+loopback │ │ │ fetch / WS (127.0.0.1 only) │ │ ├───────────────► SearXNG sidecar / hosted → federated search + receipts │ │ ├───────────────► iot-sidecar (Rust, loopback) │ @@ -170,9 +178,11 @@ Physical actions are governed by the **same engine** as browser actions. 1. **Gecko binary.** Linux via `scripts/gcp-build-linux.sh` → GCS → `packaging/linux/binary-source.env`; macOS via `.github/workflows/nightly-dmg.yml` (macos-15). human-secure builds on `latest`/150. -2. **Cockpit assets.** Add a build step that compiles `app-vue` → static bundle → - `Contents/Resources/cockpit/`, and a branding/omni hook that maps the internal - origin. Register the service worker. +2. **Cockpit assets.** `scripts/build-cockpit.sh` compiles `client-vue` → static bundle + → `Contents/Resources/cockpit/` and injects `runtime/cockpit-config.js` (sets + `window.__COCKPIT_CONFIG__` → sovereign loopback bases, read by client-vue's runtime + resolver). A branding/omni hook maps the internal origin; register the service worker. + BearBrowser rewrites the sidecar ports into `cockpit-config.js` at launch. 3. **Profile wiring.** Point `browser.newtab.url` + `browser.startup.homepage` at the cockpit origin in each profile's `user.js`; keep hardening intact. 4. **Search default.** Add the SearXNG OpenSearch descriptor + set `Default` in diff --git a/runtime/cockpit-config.js b/runtime/cockpit-config.js new file mode 100644 index 0000000..c880cf9 --- /dev/null +++ b/runtime/cockpit-config.js @@ -0,0 +1,34 @@ +// cockpit-config.js — sovereign runtime config for the embedded SocioProphet cockpit. +// +// build-cockpit.sh copies this into Contents/Resources/cockpit/ and injects a +// }' "$OUT/index.html" + log "injected cockpit-config.js loader into index.html" +fi + +log "done: embedded cockpit at $OUT ($(find "$OUT" -type f | wc -l | tr -d ' ') files)"