From 4908a801fc52cd27f5a9c845a37e796d9010e671 Mon Sep 17 00:00:00 2001 From: benjsmith Date: Tue, 29 Sep 2026 21:03:03 +0000 Subject: [PATCH 1/9] docs: v0.13.0 release notes + embed architecture cutover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump to 0.13.0 (pyproject, __init__, frontend). CHANGELOG + docs/releases/v0.13.0.md cover Phase 4a reverse-proxy, Embed v2 same-document mount, dual-mount Graph, core-skills auto-start, okstratr harness Settings client, and pack/ingest drain — feature-preserving vs v0.12.19. Refresh ADR-004/004b/005 and CE-EMBED-HOOK for shipped CEEmbed; cite CE v1.9.0 / okstratr v0.2.0 / CM v0.8.4. Docs + version bump only — no tag. Signed-off-by: benjsmith --- CHANGELOG.md | 64 ++++++++++ docs/ADR-004-same-origin-embed-proxy.md | 10 +- docs/ADR-004b-embed-v2-same-document-mount.md | 2 +- ...DR-005-okstratr-harness-registry-client.md | 2 +- docs/CE-EMBED-HOOK.md | 13 ++- docs/enterprise.md | 2 +- docs/releases/v0.13.0.md | 109 ++++++++++++++++++ frontend/package.json | 2 +- pyproject.toml | 2 +- src/switchbay/__init__.py | 2 +- 10 files changed, 196 insertions(+), 12 deletions(-) create mode 100644 docs/releases/v0.13.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbe696..fd4fe1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,70 @@ Human-curated release notes. Earlier 0.9.x notes also live on the [GitHub releases](https://github.com/benjsmith/switchbay/releases) page. +## 2026-09-29 — v0.13.0 + +**Migration:** none (feature-preserving vs v0.12.19 architecture cutover). +**Breaking:** none for wiki/vault format. After pull, run `make refresh BUILD=1` +and hard-reload the PWA. No new VSIX. Do **not** tag from the docs PR alone. + +Architecture cutover under the skill-shell import charter: Switchbay +**same-origin reverse-proxies** CE + okstratr (no iframes), mounts skill UIs +same-document (Embed v2), dual-mounts CE sidebar + Graph canvas, auto-starts +core skills, and becomes a thin client over okstratr’s harness registry. +Built-in Graph / Agents / filebrowser remain until the parity checklist is +green (**migrate-before-thinning**). + +Skill pins for this wave (tags pending docs merges): + +| Skill | Version | Notes | +|---|---|---| +| curiosity-engine | **v1.9.0** (pending) | tip `3018580`; CEEmbed dual-mount + IndexedDB cache + soft-park | +| okstratr | **v0.2.0** (pending) | hosted proxy + registry SSOT + observer desk UX | +| curiosity-merge | **v0.8.4** (pending) | Phase 3 installer / UI-boundary contract | + +See [release notes](docs/releases/v0.13.0.md), [ADR-004](docs/ADR-004-same-origin-embed-proxy.md), +[ADR-004b](docs/ADR-004b-embed-v2-same-document-mount.md), +[ADR-005](docs/ADR-005-okstratr-harness-registry-client.md), +[CE-EMBED-HOOK](docs/CE-EMBED-HOOK.md), [ADR-006](docs/ADR-006-ce-pack-run-drain.md), +[ADR-007](docs/ADR-007-ce-ingest-run-drain.md). + +### Added + +- **Phase 4a same-origin embed reverse-proxy** — `/embed/ce/*` → `:8766`, + `/embed/okstratr/*` → `:8767`; loopback-only upstreams; inject + `X-CE-Host` / `X-Okstratr-Host: switchbay`. Feature flag + `proxied_skill_embeds` (Settings) switches Graph → CE / Agents → okstratr; + daemon proxy is always on. Built-ins **not** deleted. +- **Embed v2 same-document mount** — fetch proxied HTML when core-skills + healthy; rewrite assets; execute scripts in-panel; wait chrome via + `GET /api/core-skills/status` (`starting` / `unhealthy` / `building_wiki` / + `live`). Soft-reload on `sy:files-changed`. +- **Dual-mount CE Graph** — shell-left `CeSidebarSlot` (Pages|Files persists + across Graph/Agents/Editor) + Graph-pane `CeAtlasEmbed` canvas; shared + `ceEmbedSession`; prefers `window.CEEmbed.create` when present; soft-park + atlas across tab switches; loads `atlas-cache.js` for cold Graph cache. +- **Core-skills auto-start** — always start CE + okstratr with the shell; + rail `host_notify`; `OKSTRATR_HOSTED=switchbay` on supervised serve. +- **Settings → okstratr harness registry** — thin client (`/api/okstratr/harness*`); + no second Switchbay allowlist (ADR-005). +- **Pack / ingest drain** — drain CE `.workbench/pack-runs/` into rail LLM + (ADR-006); drain ingest-runs via `local_ingest` / prefer CE drop-ingest + endpoint (ADR-007). +- **Sandbox roots** — allow `/workspace` (+ env roots) in home-gate (ADR-008). + +### Fixed / polish (embed wave) + +- Keep CE atlas warm across Graph tab switches; dual-mount sidebar bugs after + Graph mount; gzip large JSON + guard soft-remount during CE load; retarget + viewer on workspace switch; serve `data.json` fast / enrich off hot path; + vault missing-extract UX from `vault.db`. + +### Unchanged (feature-preserving) + +- v0.12.19 Curate / desks / Web / Comms / watch-folder / Zen behavior remains + the product baseline. This release is the embed/architecture cutover on top + of that gate — not a revert of Graph/Agents chrome. + ## 2026-09-20 — v0.12.19 No wiki/vault format migration. Review Web, Comms, and watch-folder behavior changes below. After updating, run `make refresh BUILD=1` and hard-reload the PWA. No new VSIX. diff --git a/docs/ADR-004-same-origin-embed-proxy.md b/docs/ADR-004-same-origin-embed-proxy.md index 84e5e29..9c1a4a5 100644 --- a/docs/ADR-004-same-origin-embed-proxy.md +++ b/docs/ADR-004-same-origin-embed-proxy.md @@ -45,11 +45,17 @@ frames**. ## Consequences - Dev Vite must proxy `/embed` to the daemon (`vite.config.ts`). -- CE and okstratr should honor public-base + `X-*-Host` (okstratr - Phase 1a `public_base.py`; CE equivalent TBD). +- CE and okstratr honor public-base + `X-*-Host` (okstratr ADR-004 / + `OKSTRATR_PUBLIC_BASE`; CE ADR-001 / `CE_PUBLIC_BASE` — both shipped). - Full atlas/observer chrome parity is gated by the parity checklist before any Switchbay duplicate deletion (Phase 4b+). + **Migrate-before-thinning:** built-in Graph/Agents/filebrowser stay + (v0.13.0 does not delete them). - WebSocket upgrade through the embed proxy is deferred; HTTP(S) first. +- Status as of **v0.13.0:** Phase 4a proxy + Embed v2 mount + dual-mount + Graph + core-skills auto-start + Settings harness client are on `main`. + `proxied_skill_embeds` remains a Settings opt-in (default false) so the + built-in surfaces stay the safe default until operators flip the flag. ## Alternatives considered diff --git a/docs/ADR-004b-embed-v2-same-document-mount.md b/docs/ADR-004b-embed-v2-same-document-mount.md index ec018ef..9bd6572 100644 --- a/docs/ADR-004b-embed-v2-same-document-mount.md +++ b/docs/ADR-004b-embed-v2-same-document-mount.md @@ -1,6 +1,6 @@ # ADR-004b: Embed v2 — same-document interactive mount -- **Status:** Accepted (Embed v2) +- **Status:** Accepted (Embed v2) — shipped in Switchbay **v0.13.0** - **Date:** 2026-09-19 - **Parent:** [ADR-004](./ADR-004-same-origin-embed-proxy.md) - **Contract:** umbrella `CONTRACT-EMBED-V2.md` diff --git a/docs/ADR-005-okstratr-harness-registry-client.md b/docs/ADR-005-okstratr-harness-registry-client.md index 2b2b095..7b0a319 100644 --- a/docs/ADR-005-okstratr-harness-registry-client.md +++ b/docs/ADR-005-okstratr-harness-registry-client.md @@ -2,7 +2,7 @@ - **Status:** Accepted - **Date:** 2026-09-19 -- **Parent:** [ADR-004](./ADR-004-same-origin-embed-proxy.md) (Settings TODO) +- **Parent:** [ADR-004](./ADR-004-same-origin-embed-proxy.md) (Settings thin client — **done** in v0.13.0) - **Deciders:** Ben / skill-shell rationalization charter ## Context diff --git a/docs/CE-EMBED-HOOK.md b/docs/CE-EMBED-HOOK.md index 146ada6..9472c05 100644 --- a/docs/CE-EMBED-HOOK.md +++ b/docs/CE-EMBED-HOOK.md @@ -1,6 +1,6 @@ # CE embed hook — dual mounts (shell sidebar + Graph canvas) -**Date:** 2026-09-27 (updated) +**Date:** 2026-09-27 (updated 2026-09-29 for v0.13.0 / CE v1.9.0) **Owners:** Switchbay (mount scaffolding) · CE Benchmarker (CE `embed` mode) ## Goal @@ -34,7 +34,11 @@ WikiPane + Files|Sources as before. Workspace remount calls `resetCeEmbedSession()`. -## CE hook to add (CE Benchmarker) +## CE hook (landed in curiosity-engine v1.9.0) + +Prefer `window.CEEmbed.create` from `/embed/ce/static/embed.js`. Switchbay +`ceEmbedBootstrap` / `ceEmbedSession` call it when present; the local stub +path below remains a fallback for older CE tips. ```js window.CEEmbed = { @@ -72,8 +76,9 @@ Requirements: - Honor `CE_PUBLIC_BASE` / `opts.dataUrl`. - Optional: `mount({ mounts: { sidebar, canvas } })` one-shot still OK. -Until `CEEmbed.create` exists, Switchbay’s stub loads CE static modules and -calls `Sidebar.init` + `AtlasViewer`/`Graph`/`GraphSearch` itself. +When `CEEmbed.create` is missing (older CE), Switchbay’s stub loads CE +static modules and calls `Sidebar.init` + `AtlasViewer`/`Graph`/`GraphSearch` +itself. With CE **v1.9.0**+, prefer the real hook (IndexedDB cache + soft-park). ## Verify diff --git a/docs/enterprise.md b/docs/enterprise.md index 22fd22f..2bf4296 100644 --- a/docs/enterprise.md +++ b/docs/enterprise.md @@ -205,7 +205,7 @@ normal-sensitivity thread stays pending until explicit Approve, and confirm Revoke stops a subsequent poll. Do not treat a green unit suite as tenant certification. -Release notes for this cut: [`releases/v0.12.19.md`](releases/v0.12.19.md). +Release notes: [`releases/v0.13.0.md`](releases/v0.13.0.md) (embed/architecture cutover); prior gate [`releases/v0.12.19.md`](releases/v0.12.19.md). ## SentinelOne / EDR diff --git a/docs/releases/v0.13.0.md b/docs/releases/v0.13.0.md new file mode 100644 index 0000000..4a6685f --- /dev/null +++ b/docs/releases/v0.13.0.md @@ -0,0 +1,109 @@ +# v0.13.0 — 2026-09-29 + +**Migration:** no wiki/vault format changes. **Architecture cutover** under the +skill-shell import charter — feature-preserving vs **v0.12.19**. After pull: + +```sh +git pull +make refresh BUILD=1 +``` + +Hard-reload the PWA. No new VSIX. Do **not** treat this docs PR as a tag. + +## What changed + +Switchbay now **hosts** curiosity-engine (Graph / filebrowser / atlas) and +okstratr (Agents / observer) through a **same-origin reverse proxy** and +**same-document** mount — **no iframes**. Core skills **auto-start** with the +daemon. Settings is a **thin client** over okstratr’s harness registry. +CE pack-runs and ingest-runs **drain** into Switchbay (rail LLM / +`local_ingest`). + +**Migrate-before-thinning:** built-in GraphTab, AgentDashboardTab, and +filebrowser stay until the umbrella parity checklist is green. Turning on +Settings → **Proxied skill embeds** switches Graph → CE canvas and Agents → +okstratr observer; turning it off restores built-ins. + +### Skill pins (tags pending) + +| Skill | Version | Role in this release | +|---|---|---| +| [curiosity-engine](https://github.com/benjsmith/curiosity-engine) | **v1.9.0** (pending; tip `3018580`) | `/embed/ce` viewer; `CEEmbed.create` dual-mount; IndexedDB atlas cache; soft-park | +| [okstratr](https://github.com/benjsmith/okstratr) | **v0.2.0** (pending) | `/embed/okstratr` observer; registry SSOT; host_notify; `OKSTRATR_PUBLIC_BASE` | +| [curiosity-merge](https://github.com/benjsmith/curiosity-merge) | **v0.8.4** (pending) | Headless federation; Phase 3 installer / UI-boundary contract | + +okbay remains deferred. + +### Phase 4a — reverse proxy + +- Daemon always proxies `/embed/ce/*` → `127.0.0.1:8766` and + `/embed/okstratr/*` → `127.0.0.1:8767` (loopback-only; + `SWITCHBAY_*_UPSTREAM` overrides). +- Injects `X-CE-Host: switchbay` / `X-Okstratr-Host: switchbay`. +- Vite dev proxies `/embed` to the daemon. +- ADR: [`ADR-004-same-origin-embed-proxy.md`](../ADR-004-same-origin-embed-proxy.md). + +### Embed v2 — same-document mount + +- Poll `GET /api/core-skills/status`; wait chrome while `starting` / + `building_wiki`; mount only when healthy. +- Fetch proxied HTML, rewrite asset URLs, inject markup, **execute** scripts + (not script-stripped Phase 4a proof). +- Soft-reload on wiki `files_changed`; tear down scripts on unmount. +- ADR: [`ADR-004b-embed-v2-same-document-mount.md`](../ADR-004b-embed-v2-same-document-mount.md). + +### Dual-mount Graph (CE sidebar + canvas) + +- Shell left column: CE Pages|Files (`CeSidebarSlot`) persists across + Graph / Agents / Editor for CE-backed workspaces when proxied embeds are on. +- Graph pane: CE atlas canvas only (`CeAtlasEmbed`); soft-park on leave for + instant return; `atlas-cache.js` + workspace key for cold Graph cache. +- Prefers `window.CEEmbed.create` (CE v1.9.0); session singleton survives + Graph unmount. +- Doc: [`CE-EMBED-HOOK.md`](../CE-EMBED-HOOK.md). + +### Core-skills auto-start + host_notify + +- CE + okstratr always auto-start with the shell (Ben lock). +- Supervised okstratr serve sets `OKSTRATR_HOSTED=switchbay`. +- Rail receives okstratr `host_notify` envelopes. + +### Settings → okstratr harness registry + +- `/api/okstratr/harness*` thin client; no second Switchbay allowlist. +- ADR: [`ADR-005-okstratr-harness-registry-client.md`](../ADR-005-okstratr-harness-registry-client.md). + +### Pack + ingest drain + +- CE queues pack-runs / ingest-runs under `.workbench/`; Switchbay drains + them (rail LLM / `local_ingest`, prefer CE drop-ingest endpoint). +- ADRs: [`ADR-006`](../ADR-006-ce-pack-run-drain.md), + [`ADR-007`](../ADR-007-ce-ingest-run-drain.md). + +## What did **not** change + +- v0.12.19 Curate settlement, desk live-worker caps, Web default-off, + Comms metadata-first, watch folders, Zen/rail geometry — still the + behavior baseline ([v0.12.19 notes](v0.12.19.md), + [import gate](../handoff/2026-09-20-skill-shell-parity.md)). +- Graph and Agents are **not** removed; proxied mode is opt-in via Settings. + +## After pull + +```sh +make refresh BUILD=1 +``` + +Enable **Proxied skill embeds** in Settings to exercise Graph→CE / +Agents→okstratr. Confirm core-skills status goes `live`, Graph paints from +cache on hard-reload, and Agents shows the okstratr observer (no nested +iframe). + +## Validation (expected) + +- Unit: embed mount / URL rewrite / status banner; version sync + (`test_version_sync` — 0.13.0 across pyproject / `__init__` / frontend). +- Manual: proxied on/off round-trip; dual-mount Pages persist on Agents; + Graph leave→return instant; pack/ingest drain smoke on a CE workspace. + +Live iCloud / enterprise-tenant limits from v0.12.19 still apply. diff --git a/frontend/package.json b/frontend/package.json index f9c86bc..03578dc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "switchbay-frontend", "private": true, - "version": "0.12.19", + "version": "0.13.0", "type": "module", "scripts": { "dev": "vite", diff --git a/pyproject.toml b/pyproject.toml index 3c000c3..64efa8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "switchbay" -version = "0.12.19" +version = "0.13.0" description = "Local single-user workbench over knowledge bases — a driven second brain." requires-python = ">=3.11" authors = [{ name = "Benjamin Smith" }] diff --git a/src/switchbay/__init__.py b/src/switchbay/__init__.py index 998a2e4..70a9c1b 100644 --- a/src/switchbay/__init__.py +++ b/src/switchbay/__init__.py @@ -4,7 +4,7 @@ # checker both read this, so drift here makes a current install look # stale and offers an "update" to a release it is already past. # tests/unit/test_version_sync.py fails the build if the two diverge. -__version__ = "0.12.19" +__version__ = "0.13.0" # Use the OS certificate store for HTTPS (corporate TLS proxies, custom # CAs). Must run before any aiohttp ClientSession creates an SSL context From f8a16aec29b6a68847becf271b5a209e0abe7de4 Mon Sep 17 00:00:00 2001 From: benjsmith Date: Tue, 29 Sep 2026 21:13:21 +0000 Subject: [PATCH 2/9] docs: drop okbay asides from v0.13.0 release notes Remove deferred/okbay callouts from the docs PR so release notes and related charter docs do not name okbay. No CHANGELOG 0.13 change (none present). Signed-off-by: benjsmith --- docs/ADR-005-okstratr-harness-registry-client.md | 5 ----- docs/handoff/2026-09-20-skill-shell-parity.md | 8 ++++---- docs/releases/v0.12.19.md | 4 ++-- docs/releases/v0.13.0.md | 2 -- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/ADR-005-okstratr-harness-registry-client.md b/docs/ADR-005-okstratr-harness-registry-client.md index 7b0a319..27c4d17 100644 --- a/docs/ADR-005-okstratr-harness-registry-client.md +++ b/docs/ADR-005-okstratr-harness-registry-client.md @@ -35,11 +35,6 @@ Switchbay Settings must become the write path. LLM panels remain as **rail** surfaces and are labeled as not the desk/agent SSOT. -4. **okbay** mirrors the same thin-client pattern (doc note; full UI - follow-up) — see okbay `docs/HERDR-AND-REGISTRY.md` and Switchbay - `/api/okstratr/host-notify` as the precedent for path-native okstratr - integration. - ## Consequences - okstratr must be healthy (core-skill supervisor) for Settings toggles diff --git a/docs/handoff/2026-09-20-skill-shell-parity.md b/docs/handoff/2026-09-20-skill-shell-parity.md index ab667a1..ca363d6 100644 --- a/docs/handoff/2026-09-20-skill-shell-parity.md +++ b/docs/handoff/2026-09-20-skill-shell-parity.md @@ -2,10 +2,10 @@ **Charter position:** Switchbay v0.12.19 is a **behavior/performance gate under the import charter**, not a source-parity, source-merge, or implementation -plan. Switchbay and okbay import and invoke the CE, curiosity-merge (CM), and -okstratr skills through their public skill contracts. They must **not vendor +plan. Switchbay imports and invokes the CE, curiosity-merge (CM), and +okstratr skills through their public skill contracts. It must **not vendor their servers, merge their source, copy their internals, or re-implement them -for either shell**. The shell owns its adapter/UI policy; the skills remain +for the shell**. The shell owns its adapter/UI policy; the skills remain the owners of their behavior and services. This document records the v0.12.19 release behavior matrix and the additional @@ -75,6 +75,6 @@ are **additional import-boundary acceptance gates**; the v0.12.19 release tests above do not certify the three-skill integration. Do not use this matrix as permission to merge CE/CM/okstratr source into -Switchbay or okbay, vendor their servers, or grow shell-specific rewrites. +Switchbay, vendor their servers, or grow shell-specific rewrites. Any retirement of pre-import duplicate shell behavior is a separate decision after the imported-skill behavior/performance gate passes. diff --git a/docs/releases/v0.12.19.md b/docs/releases/v0.12.19.md index a618a2b..65a52d7 100644 --- a/docs/releases/v0.12.19.md +++ b/docs/releases/v0.12.19.md @@ -68,8 +68,8 @@ Then hard-reload the installed PWA. If slideshow PDF or CLI tools still miss Nod Installed curiosity-engine integration checks run when that optional dependency is present. Cloud-state fixtures and the native macOS API check do not replace a live iCloud or enterprise-tenant deployment test. Skill-shell rationalization is an **import-charter behavior/performance gate**, -not source parity: Switchbay and okbay import the CE, curiosity-merge, and -okstratr skills through public contracts. They do not vendor, merge, copy, or +not source parity: Switchbay imports the CE, curiosity-merge, and +okstratr skills through public contracts. It does not vendor, merge, copy, or re-implement those servers for a shell. The gate pins CE skill `5d2b967558dd052c62b23fbc03217b1ac2a18d5a` and uses BioCure wiki fixture `biocure-confirm-v1-query-5b9711895` at freeze tip `5b9711895`; the latter is a diff --git a/docs/releases/v0.13.0.md b/docs/releases/v0.13.0.md index 4a6685f..e34b1e3 100644 --- a/docs/releases/v0.13.0.md +++ b/docs/releases/v0.13.0.md @@ -32,8 +32,6 @@ okstratr observer; turning it off restores built-ins. | [okstratr](https://github.com/benjsmith/okstratr) | **v0.2.0** (pending) | `/embed/okstratr` observer; registry SSOT; host_notify; `OKSTRATR_PUBLIC_BASE` | | [curiosity-merge](https://github.com/benjsmith/curiosity-merge) | **v0.8.4** (pending) | Headless federation; Phase 3 installer / UI-boundary contract | -okbay remains deferred. - ### Phase 4a — reverse proxy - Daemon always proxies `/embed/ce/*` → `127.0.0.1:8766` and From 9853fe91c753c6b48bf1be49b5ef7be145f0b5c2 Mon Sep 17 00:00:00 2001 From: benjsmith Date: Tue, 29 Sep 2026 21:16:15 +0000 Subject: [PATCH 3/9] docs: drop internal ADRs from public v0.13.0 tip Remove ADR-004/004b/005/006/007/008 and CE-EMBED-HOOK (dev decision records) from the public tree. Keep release notes + CHANGELOG; rewrite links to not require ADRs. Gitignore ADR/CE-EMBED docs and the local skill-shell-rationalization/ umbrella so they stay out of public tips. Signed-off-by: benjsmith --- .gitignore | 5 ++ CHANGELOG.md | 15 ++-- docs/ADR-004-same-origin-embed-proxy.md | 66 -------------- docs/ADR-004b-embed-v2-same-document-mount.md | 78 ---------------- ...DR-005-okstratr-harness-registry-client.md | 52 ----------- docs/ADR-006-ce-pack-run-drain.md | 54 ----------- docs/ADR-007-ce-ingest-run-drain.md | 60 ------------- docs/ADR-008-workspace-sandbox-roots.md | 25 ------ docs/CE-EMBED-HOOK.md | 89 ------------------- docs/releases/v0.13.0.md | 6 -- 10 files changed, 10 insertions(+), 440 deletions(-) delete mode 100644 docs/ADR-004-same-origin-embed-proxy.md delete mode 100644 docs/ADR-004b-embed-v2-same-document-mount.md delete mode 100644 docs/ADR-005-okstratr-harness-registry-client.md delete mode 100644 docs/ADR-006-ce-pack-run-drain.md delete mode 100644 docs/ADR-007-ce-ingest-run-drain.md delete mode 100644 docs/ADR-008-workspace-sandbox-roots.md delete mode 100644 docs/CE-EMBED-HOOK.md diff --git a/.gitignore b/.gitignore index 088f80a..58f9dc2 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,11 @@ docs/*-design.md docs/product-pilot-judge-results-*.md docs/product-pilot-*.md docs/vscode-plugin.md +docs/ADR-*.md +docs/CE-EMBED-HOOK.md + +# ── local skill-shell umbrella workspace (never ship) ── +skill-shell-rationalization/ # ── machine-level admin policy drop-in (never commit a live copy) ── /admin.json diff --git a/CHANGELOG.md b/CHANGELOG.md index fd4fe1c..6f4d695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,11 +24,7 @@ Skill pins for this wave (tags pending docs merges): | okstratr | **v0.2.0** (pending) | hosted proxy + registry SSOT + observer desk UX | | curiosity-merge | **v0.8.4** (pending) | Phase 3 installer / UI-boundary contract | -See [release notes](docs/releases/v0.13.0.md), [ADR-004](docs/ADR-004-same-origin-embed-proxy.md), -[ADR-004b](docs/ADR-004b-embed-v2-same-document-mount.md), -[ADR-005](docs/ADR-005-okstratr-harness-registry-client.md), -[CE-EMBED-HOOK](docs/CE-EMBED-HOOK.md), [ADR-006](docs/ADR-006-ce-pack-run-drain.md), -[ADR-007](docs/ADR-007-ce-ingest-run-drain.md). +See [release notes](docs/releases/v0.13.0.md). ### Added @@ -48,11 +44,10 @@ See [release notes](docs/releases/v0.13.0.md), [ADR-004](docs/ADR-004-same-origi - **Core-skills auto-start** — always start CE + okstratr with the shell; rail `host_notify`; `OKSTRATR_HOSTED=switchbay` on supervised serve. - **Settings → okstratr harness registry** — thin client (`/api/okstratr/harness*`); - no second Switchbay allowlist (ADR-005). -- **Pack / ingest drain** — drain CE `.workbench/pack-runs/` into rail LLM - (ADR-006); drain ingest-runs via `local_ingest` / prefer CE drop-ingest - endpoint (ADR-007). -- **Sandbox roots** — allow `/workspace` (+ env roots) in home-gate (ADR-008). + no second Switchbay allowlist. +- **Pack / ingest drain** — drain CE `.workbench/pack-runs/` into rail LLM; + drain ingest-runs via `local_ingest` / prefer CE drop-ingest endpoint. +- **Sandbox roots** — allow `/workspace` (+ env roots) in home-gate. ### Fixed / polish (embed wave) diff --git a/docs/ADR-004-same-origin-embed-proxy.md b/docs/ADR-004-same-origin-embed-proxy.md deleted file mode 100644 index 9c1a4a5..0000000 --- a/docs/ADR-004-same-origin-embed-proxy.md +++ /dev/null @@ -1,66 +0,0 @@ -# ADR-004: Same-origin embed reverse-proxy (no iframes) - -- **Status:** Accepted (Phase 4a); Embed v2 mount → [ADR-004b](./ADR-004b-embed-v2-same-document-mount.md) -- **Date:** 2026-09-18 -- **Deciders:** Ben / skill-shell rationalization charter - -## Context - -Switchbay hosts Graph (curiosity-engine atlas/wiki) and Agents (okstratr -observer/desk) surfaces. Cross-origin iframes pointed at -`127.0.0.1:8766` / `:8767` break hosted-mode control (okstratr HTML -settings must hide when `host=switchbay`) and create an opaque nested -browsing context. - -Charter locked decision #1: shells **same-origin reverse-proxy** skill -daemons; in-app panels load first-party proxied routes — **not nested -frames**. - -## Decision - -1. **Daemon reverse-proxy** (always on; independent of the UI flag): - - `/embed/ce/*` → `http://127.0.0.1:8766/*` (override: - `SWITCHBAY_CE_UPSTREAM`, must remain loopback) - - `/embed/okstratr/*` → `http://127.0.0.1:8767/*` (override: - `SWITCHBAY_OKSTRATR_UPSTREAM`, must remain loopback) - - Upstream allowlist is **loopback-only** (`127.0.0.1` / `::1` / - `localhost`). Non-loopback upstreams are rejected (502). - - Inject hosted-shell headers on every proxied request: - - `X-CE-Host: switchbay` - - `X-Okstratr-Host: switchbay` - -2. **No iframes** for Graph/Agents skill surfaces. Feature flag - `proxied_skill_embeds` (default **false**) switches Graph → CE panel - and Agents → okstratr panel that navigate `/embed/*` via same-origin - `fetch` + same-document rendering. Phase 4a was script-stripped HTML / JSON; Embed v2 (ADR-004b) executes skill scripts in-panel. - Built-in GraphTab / AgentDashboardTab / filebrowser remain the - default and are **not deleted**. - -3. **Settings → okstratr registry (done — ADR-005).** Switchbay settings - is a thin client over okstratr's harness/model registry - (`harnesses.toml` via `/api/okstratr/harness…` / embed proxy). No - second Switchbay allowlist. See - [ADR-005](./ADR-005-okstratr-harness-registry-client.md). - -## Consequences - -- Dev Vite must proxy `/embed` to the daemon (`vite.config.ts`). -- CE and okstratr honor public-base + `X-*-Host` (okstratr ADR-004 / - `OKSTRATR_PUBLIC_BASE`; CE ADR-001 / `CE_PUBLIC_BASE` — both shipped). -- Full atlas/observer chrome parity is gated by the parity checklist - before any Switchbay duplicate deletion (Phase 4b+). - **Migrate-before-thinning:** built-in Graph/Agents/filebrowser stay - (v0.13.0 does not delete them). -- WebSocket upgrade through the embed proxy is deferred; HTTP(S) first. -- Status as of **v0.13.0:** Phase 4a proxy + Embed v2 mount + dual-mount - Graph + core-skills auto-start + Settings harness client are on `main`. - `proxied_skill_embeds` remains a Settings opt-in (default false) so the - built-in surfaces stay the safe default until operators flip the flag. - -## Alternatives considered - -| Option | Why not | -|--------|---------| -| Cross-origin iframe to :8766/:8767 | Opaque origin; hosted settings leak; charter forbid | -| Same-origin iframe to `/embed/*` | Still a nested frame; charter: no iframes | -| Delete built-in Graph/Agents now | Violates parity checklist / dual-stack gate | diff --git a/docs/ADR-004b-embed-v2-same-document-mount.md b/docs/ADR-004b-embed-v2-same-document-mount.md deleted file mode 100644 index 9bd6572..0000000 --- a/docs/ADR-004b-embed-v2-same-document-mount.md +++ /dev/null @@ -1,78 +0,0 @@ -# ADR-004b: Embed v2 — same-document interactive mount - -- **Status:** Accepted (Embed v2) — shipped in Switchbay **v0.13.0** -- **Date:** 2026-09-19 -- **Parent:** [ADR-004](./ADR-004-same-origin-embed-proxy.md) -- **Contract:** umbrella `CONTRACT-EMBED-V2.md` - -## Context - -Phase 4a (`ProxiedSkillPanel`) fetched `/embed/*` HTML and injected a -**script-stripped** body. That proved the reverse-proxy path but left Graph -and Agents inert (no pan/zoom, no desk controls). Charter + ADR-004 forbid -`