v1.7.0: bundle pi-atelier at a pinned tag; pin pi to an audited 0.84.1
Publish Docker Image / resolve-versions (push) Successful in 9s
Lint / actionlint (push) Successful in 15s
Lint / hadolint (push) Successful in 13s
Publish Docker Image / base-decide (push) Successful in 8s
Publish Docker Image / build-base (push) Successful in 41m22s
Publish Docker Image / smoke-studio (push) Successful in 5m16s
Publish Docker Image / smoke (push) Successful in 7m31s
Publish Docker Image / build-variant-studio (push) Successful in 18m31s
Publish Docker Image / build-variant (push) Successful in 27m18s
Publish Docker Image / promote-base-latest (push) Successful in 11s
Publish Docker Image / update-description (push) Successful in 12s
Publish Docker Image / resolve-versions (push) Successful in 9s
Lint / actionlint (push) Successful in 15s
Lint / hadolint (push) Successful in 13s
Publish Docker Image / base-decide (push) Successful in 8s
Publish Docker Image / build-base (push) Successful in 41m22s
Publish Docker Image / smoke-studio (push) Successful in 5m16s
Publish Docker Image / smoke (push) Successful in 7m31s
Publish Docker Image / build-variant-studio (push) Successful in 18m31s
Publish Docker Image / build-variant (push) Successful in 27m18s
Publish Docker Image / promote-base-latest (push) Successful in 11s
Publish Docker Image / update-description (push) Successful in 12s
Two changes that belong together, because the first is what makes the second dangerous to get wrong. pi-atelier (TUI sidebar + status rail) is now vendored to /opt/pi-atelier at PI_ATELIER_REF=v0.8.0 and registered by entrypoint-user.sh — the pi-fork / pi-observational-memory / pi-studio pattern, deliberately NOT `pi install npm:pi-atelier`, which writes into ~/.pi/npm-global on the config volume where it shadows the image and pins nothing. Unlike its siblings it gets no `npm install`: atelier declares zero runtime deps (peerDeps only, satisfied by the baked pi) and has no build step, so pi loads its TypeScript straight from the checkout via package.json `pi.extensions`. pi is no longer resolved to npm `latest` at build time. The pin lives in Dockerfile.variant and CI reads it from there, so a local `docker build` and a CI release ship the same versions by construction. The pin is a CHECKPOINT, NOT A FREEZE: bumping stays a one-line change; what stops is *unreviewed* adoption of whatever shipped that morning, in the same build that then gets tagged and published. CI fails when a pin is not concrete or not actually published on npm, and warns — never adopts — when npm latest moves ahead, naming what to re-check. Why this pairing needed care: pi-atelier 0.6.0/0.7.0 wrap pi's PRIVATE TUI renderer, and under pi 0.84 that wrapper recurses — pi hangs at startup burning CPU with no error. Upstream fixed the recursion in 0.7.1 and restored the non-overlapping split in 0.7.2; 0.8.0 is additive on top. atelier's own peerDependencies still say >=0.80.7, which does not express that floor, so nothing in npm metadata could have warned us. The floor is therefore encoded as an executable rule — pi >= 0.84 => pi-atelier >= 0.7.1 — asserted in both smoke-test.sh (build time) and recreate-sanity-check.sh (after a real recreate), verified against a 4x4 version matrix. Existing volumes needed migration, not just vendoring: a hand-installed `npm:pi-atelier` entry is counted as already-registered by the entrypoint guard, so every existing volume would have kept its unpinned npm copy — and a 0.6.x copy next to pi 0.84 is exactly the startup hang. The entrypoint now drops that one exact string (settings.json.bak.atelier.<ts> backup, distinct prefix so it cannot clobber the template merge's backup in the same second) and lets the pinned /opt copy register. Tested against a real settings.json: only that entry removed, other packages and all keys intact, idempotent, and unparseable JSON leaves the file untouched. DEVBOX_ATELIER=0 opts out entirely — in the entrypoint rather than via `pi uninstall`, because this component's failure mode is "pi will not start", which cannot be repaired from inside pi. 0.84.1 was audited for this release, not merely adopted: theme/TUI changes are additive, the session format is unchanged (CURRENT_SESSION_VERSION = 3 in both 0.83.0 and 0.84.1 with an identical migrateV1ToV2/migrateV2ToV3 ladder, so existing transcripts are neither migrated nor at risk and pi-session-repair stays valid), and the Node engine floor is unmoved at >=22.19.0. CI resolves the atelier tag to its PEELED commit SHA — atelier uses annotated tags, so the unpeeled ref is a tag object, not a commit; pi-studio's lightweight tags never exposed that distinction. Also: docs for overriding the read-only ~/.ssh/config from the container — container-only keys in ~/.ssh-local, hardened authorized_keys, the fact that `from=` must allow the HOST's addresses because container egress is NAT'd through it, and the macOS-only-keyword trap (`UseKeychain` is fatal to Linux OpenSSH and takes out dssh/pi --ssh while the host keeps working). Corrects two claims in "Naming LAN peers": ssh-lan.conf is not ProxyJump-only, and first-time creation does need one restart because the Include is emitted only when the file already exists at start.
This commit is contained in:
@@ -21,6 +21,8 @@ on the host.
|
||||
mempalace integration, etc.)
|
||||
- `pi-fork` — the `fork` tool for spawning sub-agents
|
||||
- `pi-observational-memory` — the `recall` tool for session compaction
|
||||
- `pi-atelier` — TUI sidebar: ordered panels, split-pane, themes. Pinned to an
|
||||
audited tag; see [Version pins](#version-pins-pi-pi-atelier-mempalace)
|
||||
|
||||
### MemPalace (AI memory)
|
||||
|
||||
@@ -338,6 +340,59 @@ DOT syntax errors instead of crashing. Then in Studio: open the PNG (or a
|
||||
`.md` that embeds it) and hit **refresh-from-disk** after each edit.
|
||||
Note: SVG is **not** in Studio's local-image-link allowlist — use PNG.
|
||||
|
||||
## Using pi-atelier (TUI sidebar)
|
||||
|
||||
`pi-atelier` is bundled in **both** variants (vendored at `/opt/pi-atelier`,
|
||||
pinned — see [Version pins](#version-pins-pi-pi-atelier-mempalace)). It adds two
|
||||
things to pi's terminal UI:
|
||||
|
||||
- a **status rail** — activity, token/cost metrics, context usage, model, git
|
||||
state, extension statuses, and a menu;
|
||||
- a **sidebar** — ordered panels (agent, activity, alerts, TODOs, context,
|
||||
workspace, usage, tools) in a split pane beside the transcript.
|
||||
|
||||
Nothing needs installing; the entrypoint registers it on container start, and it
|
||||
binds on the next pi start (or `/reload`).
|
||||
|
||||
| Action | How |
|
||||
|---|---|
|
||||
| Open the atelier menu | `alt+a`, or `/atelier` |
|
||||
| Toggle the sidebar for this session | `/atelier sidebar on` / `off` |
|
||||
| Change settings persistently | atelier menu → **Settings**, then **Save** |
|
||||
| Turn the whole thing off | `DEVBOX_ATELIER=0` in `.env` |
|
||||
|
||||
If your terminal or keymap swallows `alt+a`, use `/atelier` and pick a different
|
||||
`shortcut` in the config file below.
|
||||
|
||||
### Config
|
||||
|
||||
Config lives at `~/.pi/agent/pi-atelier.json` on the `devbox-pi-config` volume,
|
||||
seeded from pi-toolkit with container-appropriate defaults: compact density,
|
||||
context warnings at 60/85 % (earlier than upstream's 70/90), sidebar tool names
|
||||
on, and desktop completion notifications **off** (a container has nowhere useful
|
||||
to pop a toast).
|
||||
|
||||
It is **copied, not symlinked** — atelier rewrites this exact path when you hit
|
||||
**Save**, using write-temp-then-`rename(2)`, and `rename` replaces a symlink with
|
||||
a regular file instead of following it. A symlink would silently detach on your
|
||||
first save. Consequently pi-toolkit's `install.sh` only seeds the file when it is
|
||||
absent: once you have saved your own preferences, image upgrades leave them
|
||||
alone, and `install.sh` prints a diff hint instead of clobbering.
|
||||
|
||||
The seeded file uses atelier's **current** schema — `segmentLayout` with explicit
|
||||
per-segment visibility, plus `showSidebarAgent` / `showSidebarTodos` /
|
||||
`showSidebarOnStartup`. Older configs written against the pre-0.7 vocabulary
|
||||
(`segments`, `ornament`, `showExtensionStatuses`) still load, but only through
|
||||
upstream's legacy-compatibility shims — so if you are carrying one on an old
|
||||
volume, expect it to keep working while missing every sidebar control added
|
||||
since. `sidebarPanelLayout` is deliberately left unset so the panel set follows
|
||||
upstream's product default as atelier adds panels; set it only if you want to
|
||||
pin the order yourself.
|
||||
|
||||
The sidebar auto-hides below 92 terminal columns and keeps the main pane at
|
||||
least 64 columns wide, so a narrow terminal degrades to the plain TUI rather
|
||||
than a squeezed one.
|
||||
|
||||
## docker-compose.yml — basic shape
|
||||
|
||||
```yaml
|
||||
@@ -554,6 +609,35 @@ User-level overrides in `~/.ssh/config` win because Debian's
|
||||
`/etc/ssh/ssh_config` includes `/etc/ssh/ssh_config.d/*.conf` before
|
||||
the `Host *` block.
|
||||
|
||||
### macOS-only keywords in a shared `~/.ssh/config`
|
||||
|
||||
The same `~/.ssh/config` is read by macOS ssh *and* by the Linux OpenSSH inside
|
||||
the container (the sidecar `Include`s it). macOS-only keywords are **fatal**
|
||||
there, not ignored — a single `UseKeychain yes` in a `Host *` block takes down
|
||||
every ssh call in the container:
|
||||
|
||||
```
|
||||
/home/developer/.ssh/config: line 2: Bad configuration option: usekeychain
|
||||
/home/developer/.ssh/config: terminating, 1 bad configuration options
|
||||
```
|
||||
|
||||
That breaks `dssh`/`dscp`, `pi --ssh`, `scp`, and anything that shells out to
|
||||
ssh (including CI/deploy helpers), while the host keeps working perfectly — so
|
||||
it presents as a container regression rather than a host config error. Guard the
|
||||
keyword on the host, *before* it is used:
|
||||
|
||||
```diff
|
||||
Host *
|
||||
+ IgnoreUnknown UseKeychain
|
||||
UseKeychain yes
|
||||
AddKeysToAgent yes
|
||||
```
|
||||
|
||||
`IgnoreUnknown` is understood by both implementations: macOS still honours
|
||||
`UseKeychain`, Linux skips it. Also keep such a `Host *` block **below** any
|
||||
`Include` that must come first — OrbStack's own `Include ~/.orbstack/ssh/config`
|
||||
says so in a comment, and a `Host *` block above it silently violates that.
|
||||
|
||||
### Per-host `ControlPath` on a read-only `~/.ssh`
|
||||
|
||||
`~/.ssh` is usually bind-mounted read-only, so a user `~/.ssh/config` that
|
||||
@@ -573,7 +657,10 @@ this without editing the read-only config:
|
||||
jump via the host, add `ProxyJump host` overrides in the host-owned
|
||||
`~/.config/devbox-shell/ssh-lan.conf` (see
|
||||
[Naming LAN peers](#naming-lan-peers)) rather than the read-only
|
||||
`~/.ssh/config`.
|
||||
`~/.ssh/config`. If the peer also rejects the host's key — the usual case,
|
||||
since host keys are normally passphrase-protected and the container has no
|
||||
Keychain or agent — see
|
||||
[Giving the container its own key for a peer](#giving-the-container-its-own-key-for-a-peer).
|
||||
|
||||
## tmux and 0-indexed sessions
|
||||
|
||||
@@ -646,6 +733,7 @@ repoint each one at a mirror, another host, or a local `file://` path
|
||||
| `MEMPALACE_TOOLKIT_REPO` | `https://gitea.jordbo.se/joakimp/mempalace-toolkit.git` | base |
|
||||
| `PI_FORK_REPO` | `https://github.com/elpapi42/pi-fork.git` | variant |
|
||||
| `PI_OBSMEM_REPO` | `https://github.com/elpapi42/pi-observational-memory.git` | variant |
|
||||
| `PI_ATELIER_REPO` | `https://github.com/michaelmjhhhh/pi-atelier.git` | variant |
|
||||
| `PI_STUDIO_REPO` | `https://github.com/omaclaren/pi-studio.git` | variant |
|
||||
|
||||
Each has a matching `*_REF` arg (branch name or commit SHA). Example — build
|
||||
@@ -750,14 +838,90 @@ Host pve pve-2 alpserv-2 lagret
|
||||
ProxyJump host
|
||||
```
|
||||
|
||||
`HostName` / `User` / `IdentityFile` are inherited from the matching block in
|
||||
your real `~/.ssh/config` (first-value-wins, so only `ProxyJump` is taken from
|
||||
here). This file is `Include`d *before* `~/.ssh/config` and read fresh on every
|
||||
connection — newly added peers work immediately, no container or session
|
||||
restart needed — and the peer names stay out of the published image (they're a
|
||||
fact about your specific LAN, not the image). Alternatively, set
|
||||
`DEVBOX_LAN_AUTOJUMP_PRIVATE=1` to ProxyJump *any* RFC1918 address through the
|
||||
host without naming peers (see `.env.example`).
|
||||
Any option can be set here, not just `ProxyJump`: the file is `Include`d
|
||||
*before* `~/.ssh/config` and ssh takes the **first** value it sees for each
|
||||
option, so whatever you put here wins while everything you omit is inherited
|
||||
from the matching block in your real `~/.ssh/config`. Peer names stay out of the
|
||||
published image (they are a fact about your LAN, not the image). Alternatively,
|
||||
set `DEVBOX_LAN_AUTOJUMP_PRIVATE=1` to ProxyJump *any* RFC1918 address through
|
||||
the host without naming peers (see `.env.example`).
|
||||
|
||||
Once the file exists it is re-read on every connection, so *edits* take effect
|
||||
immediately — no container or session restart. **Creating it for the first time
|
||||
does need one restart**, because `setup-lan-access.sh` only emits the
|
||||
`Include ~/.config/devbox-shell/ssh-lan.conf` line when the file is already
|
||||
readable at container start (`if [ -r "$SSH_LAN_CONF" ]`). Until then ssh never
|
||||
looks at it — which reads exactly like "my override is being ignored".
|
||||
|
||||
#### Giving the container its own key for a peer
|
||||
|
||||
`ProxyJump` fixes *routing*; it does not fix *authentication*, and inheriting
|
||||
the host's `IdentityFile` usually fails inside the container:
|
||||
|
||||
- Host keys are commonly passphrase-protected, and that passphrase is unlocked
|
||||
by the macOS Keychain or a running `ssh-agent`. The container has neither, so
|
||||
the key can never be decrypted — `Permission denied (publickey)` even though
|
||||
the identical `ssh peer` works in a host terminal.
|
||||
- `~/.ssh` is mounted read-only, so you can neither drop a container-usable key
|
||||
in there nor edit `~/.ssh/config` from inside.
|
||||
|
||||
The answer is a **container-only keypair** in `~/.ssh-local/` — the named volume
|
||||
`devbox-ssh-local`, so it survives `docker compose up -d --force-recreate` —
|
||||
plus an `IdentityFile` override in the host-owned `ssh-lan.conf`. Note that
|
||||
nothing is baked into the *published image*: that volume is created on your
|
||||
machine at runtime, so no private key ever ships to Docker Hub, and a fresh pull
|
||||
elsewhere generates its own. (Every key below is a throwaway example.)
|
||||
|
||||
**1. In the container** — generate a passphraseless key (there is no agent to
|
||||
unlock a protected one):
|
||||
|
||||
```bash
|
||||
ssh-keygen -t ed25519 -N '' -C "devbox-$(hostname)" \
|
||||
-f ~/.ssh-local/mypeer_devbox_ed25519
|
||||
cat ~/.ssh-local/mypeer_devbox_ed25519.pub
|
||||
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXAMPLE0000EXAMPLE0000EXAMPLE0000ex devbox-0d11ec7731c7
|
||||
```
|
||||
|
||||
**2. On the peer** — authorize it narrowly rather than bare:
|
||||
|
||||
```
|
||||
from="192.168.1.0/24,192.168.4.0/24,10.8.0.7",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXAMPLE0000EXAMPLE0000EXAMPLE0000ex devbox-mymachine
|
||||
```
|
||||
|
||||
`restrict` disables pty, agent/X11 and port forwarding; append
|
||||
`port-forwarding` and `permitopen="127.0.0.1:<port>"` after it if you need one
|
||||
specific tunnel. `from=` must list the **host's** addresses, not the
|
||||
container's: container egress is NAT'd through the host, so the peer sees the
|
||||
host's LAN address (confirm with `echo $SSH_CLIENT` on first login). List every
|
||||
network the host roams — e.g. both home WLAN subnets plus its VPN address —
|
||||
because a `from=` mismatch is indistinguishable from a wrong key in the error
|
||||
message.
|
||||
|
||||
**3. On the host** — point the peer at that key in
|
||||
`~/.config/devbox-shell/ssh-lan.conf`:
|
||||
|
||||
```
|
||||
Host mypeer mypeer.home.arpa
|
||||
HostName 192.168.1.142
|
||||
User myuser
|
||||
IdentityFile ~/.ssh-local/mypeer_devbox_ed25519
|
||||
IdentitiesOnly yes
|
||||
# ProxyJump host # only if the container cannot reach the peer directly
|
||||
```
|
||||
|
||||
That path exists only inside containers, which is why it belongs here rather
|
||||
than in the shared `~/.ssh/config`.
|
||||
|
||||
**4. First time only** — restart the container so the `Include` is emitted (see
|
||||
above), then verify with the master socket bypassed, so a warm connection cannot
|
||||
fake a pass:
|
||||
|
||||
```bash
|
||||
ssh -F ~/.ssh-local/config -o ControlPath=none mypeer 'echo $SSH_CLIENT'
|
||||
```
|
||||
|
||||
Use one key per machine (`devbox-mbp`, `devbox-studio`, …) so a single
|
||||
`authorized_keys` line can be revoked without locking out the others.
|
||||
|
||||
### Smoke-testing a local build
|
||||
|
||||
@@ -794,9 +958,72 @@ pi-devbox follows semver-ish:
|
||||
- **Minor** — new variants, significant base additions.
|
||||
- **Patch** — pi version bumps, smaller fixes.
|
||||
|
||||
The `pi --version` inside the image is asserted by smoke tests to
|
||||
match the release tag's pi component, so version drift between the
|
||||
image and the tag is caught at CI time.
|
||||
The `pi --version` inside the image is asserted by smoke tests to match the
|
||||
version CI resolved (since v1.7.0, the pin below), so drift between what was
|
||||
intended and what actually got baked is caught at CI time rather than on a
|
||||
user's pull.
|
||||
|
||||
### Version pins: pi, pi-atelier, mempalace
|
||||
|
||||
Three components are pinned to an exact version **in the repo** instead of being
|
||||
resolved to `latest` at build time:
|
||||
|
||||
| Component | Pin | Where |
|
||||
|---|---|---|
|
||||
| pi | `0.84.1` | `ARG PI_VERSION` — `Dockerfile.variant` |
|
||||
| pi-atelier | `v0.8.0` | `ARG PI_ATELIER_REF` — `Dockerfile.variant` |
|
||||
| mempalace | `3.6.0` | `ARG MEMPALACE_VERSION` — `Dockerfile.base` |
|
||||
|
||||
The objective is **not** to freeze versions. Bumping is routine — usually one
|
||||
line plus a changelog note. The objective is that adopting a new upstream
|
||||
version is a deliberate, reviewable act, not a side effect of whatever happened
|
||||
to be published the morning CI ran. Each of these has already drawn blood:
|
||||
|
||||
- **pi** — a minor release can move the private TUI/renderer internals that
|
||||
pi-atelier wraps, or the session `.jsonl` format `pi-session-repair` parses.
|
||||
- **pi-atelier** — 0.6.0/0.7.0 hang pi 0.84 **at startup**, burning CPU with no
|
||||
error (fixed in 0.7.1/0.7.2). Its `peerDependencies` still say `>=0.80.7`, so
|
||||
nothing in the npm metadata expresses the real floor.
|
||||
- **mempalace** — an unpinned install once swept in the broken `diary_write` MCP
|
||||
tool schema of 3.3.x/3.4.0, which is why that pin's comment requires a
|
||||
tool-schema review before every bump.
|
||||
|
||||
CI enforces this rather than trusting it:
|
||||
|
||||
- `resolve-versions` reads the pins **out of the Dockerfiles** — single source of
|
||||
truth, so a local `docker build` and a CI release ship the same versions — and
|
||||
fails the build if a pin is not concrete, not a semver tag, or not actually
|
||||
published on npm.
|
||||
- When npm has a newer pi than the pin, CI emits a `::warning::` naming it. That
|
||||
warning is the prompt to audit and bump; it never adopts the version.
|
||||
- `smoke-test.sh` asserts the image's `pi --version` equals the pin, and
|
||||
separately asserts the pairing rule **pi ≥ 0.84 ⇒ pi-atelier ≥ 0.7.1**, so a
|
||||
bad combination fails the build instead of publishing a TUI that never starts.
|
||||
|
||||
To bump pi: read the upstream CHANGELOG for every intervening version (TUI/theme
|
||||
API, session format, extension loader, Node engine floor), re-check pi-atelier's
|
||||
CHANGELOG for the pi version it claims to track, then edit the one `ARG` line and
|
||||
record what you checked in `CHANGELOG.md`.
|
||||
|
||||
#### If you previously hand-installed pi-atelier
|
||||
|
||||
A hand-installed `pi install npm:pi-atelier` lands in `~/.pi/npm-global`, which
|
||||
is on the `devbox-pi-config` **volume** — so it outlives image upgrades and stays
|
||||
at whatever version you installed, unpinned and unaudited. Since the image now
|
||||
vendors an audited pi-atelier at `/opt/pi-atelier`, the entrypoint removes a
|
||||
lingering `npm:pi-atelier` entry from `packages[]` (after backing
|
||||
`settings.json` up to `settings.json.bak.atelier.<timestamp>`) and registers the
|
||||
pinned `/opt` copy instead. Nothing else in your settings is touched, and the
|
||||
npm-global copy itself is left on disk — only the registration changes.
|
||||
|
||||
This matters more than it sounds: leaving a 0.6.x npm copy registered alongside
|
||||
pi 0.84 is precisely the combination that hangs at startup.
|
||||
|
||||
To opt out of pi-atelier entirely, set `DEVBOX_ATELIER=0` in `.env`. The
|
||||
entrypoint then removes any pi-atelier entry from `packages[]` on start. That
|
||||
switch lives in the entrypoint — not in a pi command — deliberately: this
|
||||
component's failure mode is "pi will not start", which you cannot repair with
|
||||
`pi uninstall`.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
|
||||
Reference in New Issue
Block a user