Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,13 @@ stop)`) and a `server: stop at 23:00 (in 1h 12m)` status line in the

### Changed

- **Workspace Pi agent updated to 1.0.0 (#3542).** Workspaces now
bundle Pi coding agent 1.0.0 (previously 0.99.2). Pi 1.0 runs its
TUI fullscreen by default; workspace provisioning pins
`tuiMode: "regular"` so the web terminal keeps its normal
scrollback. Users who prefer fullscreen can set `tuiMode` to
`"fullscreen"` in their own `~/.pi/agent/settings.json`.

- **Pi startup phone-home to pi.dev is off in workspaces (#3530).**
Workspace containers now set `PI_OFFLINE=1` (alongside the existing
`PI_SKIP_VERSION_CHECK=1`), so a Pi session inside a workspace no
Expand Down
4 changes: 4 additions & 0 deletions docs/features/ai-coding-harnesses.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Extensions are installed at image build time into
`~/.pi/agent/` at first login. Users can install additional extensions
with `pi install`.

The per-user settings provisioned at login also pin
`tuiMode: "regular"`: Pi 1.0 runs its TUI fullscreen by default,
which would replace the web terminal's normal scrollback.

## System prompt

Agents share a system prompt installed at `~/AGENTS.md` on first
Expand Down
4 changes: 2 additions & 2 deletions src/containers/workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ FROM $WORKSPACE_BASE_IMAGE
# registry's own integrity record:
# npm view @earendil-works/pi-coding-agent@<version> dist.integrity
# (base64 sha512 -> hex), or sha512sum of the fetched tarball.
ARG PI_AGENT_VERSION=0.99.2
ARG PI_AGENT_SHA512=e91d4167637bec2ad57067f7782d8aa2f4f3d50e1162201ec9dbd55904f9e3a3767e2d6705cf356944656ce64282bb96a16f5563f52b2f30f29c5e184e8969a0
ARG PI_AGENT_VERSION=1.0.0
ARG PI_AGENT_SHA512=fc5b5bc6849053f984bf542789c8498d18eab5ea9a21a316c66841e06dfaefe33065f5fbfc323907d60083996a6cdee7ced16c90112d51267e16598c0440ad33
# Network downloads in this Dockerfile use `--retry 5 --retry-delay 2
# --retry-all-errors`: GitHub-hosted runners occasionally reset connections
# mid-transfer (curl exit 35, #2797), and without retries a single blip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* re-prints the startup header's sections — loaded context files,
* skills, prompt templates, and extensions — as a persistent session
* entry that never enters the LLM context. The sections are rebuilt
* from live session data (pi 0.99.2 exposes no API to re-run its own
* from live session data (pi 1.0.0 exposes no API to re-run its own
* renderer), so edge cases can diverge from the startup header: the
* Skills section is empty when `enableSkillCommands` is off, and the
* Extensions section lists files found on disk rather than ones that
Expand Down
5 changes: 5 additions & 0 deletions src/containers/workspace/klangk-setup-pi.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ def write_settings():
# repeats on every fresh shell; /header (a builtin extension)
# re-prints it on demand (#3537).
image_settings["quietStartup"] = True
# Pi 1.0 runs its TUI fullscreen by default, which replaces the
# normal terminal scrollback with pi's own viewport. The web
# terminal depends on that scrollback, so keep the regular mode.
image_settings["tuiMode"] = "regular"
# Point at image dirs directly — Pi also auto-discovers
# ~/.pi/agent/{extensions,skills,prompts}/ for user-installed ones.
image_settings["extensions"] = [str(IMAGE_DIR / "extensions")]
Expand All @@ -94,6 +98,7 @@ def ensure_settings_keys():
defaults = {
"theme": "dark",
"quietStartup": True,
"tuiMode": "regular",
"extensions": [str(IMAGE_DIR / "extensions")],
"skills": [str(IMAGE_DIR / "skills")],
"prompts": [str(IMAGE_DIR / "prompts")],
Expand Down
6 changes: 6 additions & 0 deletions src/klangk/klangkd-tests/tests/test_setup_pi.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def test_creates_settings_with_all_keys(self, fake_home, monkeypatch):
assert settings["hideThinkingBlock"] is True
assert settings["theme"] == "dark"
assert settings["quietStartup"] is True
assert settings["tuiMode"] == "regular"
assert settings["extensions"] == [str(sc.IMAGE_DIR / "extensions")]
assert settings["skills"] == [str(sc.IMAGE_DIR / "skills")]
assert settings["prompts"] == [str(sc.IMAGE_DIR / "prompts")]
Expand Down Expand Up @@ -102,6 +103,7 @@ def test_provisions_when_image_has_no_settings(
assert settings["hideThinkingBlock"] is True
assert settings["theme"] == "dark"
assert settings["quietStartup"] is True
assert settings["tuiMode"] == "regular"
assert settings["extensions"] == [str(image_dir / "extensions")]
assert settings["skills"] == [str(image_dir / "skills")]
assert settings["prompts"] == [str(image_dir / "prompts")]
Expand All @@ -123,6 +125,7 @@ def test_backfills_missing_keys(self, fake_home):
assert settings["prompts"] == [str(sc.IMAGE_DIR / "prompts")]
assert settings["theme"] == "dark"
assert settings["quietStartup"] is True
assert settings["tuiMode"] == "regular"
assert settings["other"] == "keep"

def test_preserves_explicit_user_overrides(self, fake_home):
Expand All @@ -133,6 +136,7 @@ def test_preserves_explicit_user_overrides(self, fake_home):
old = {
"theme": "light",
"quietStartup": False,
"tuiMode": "fullscreen",
"extensions": ["/e"],
"skills": ["/s"],
"prompts": ["/p"],
Expand All @@ -144,13 +148,15 @@ def test_preserves_explicit_user_overrides(self, fake_home):
settings = json.loads((agent / "settings.json").read_text())
assert settings["theme"] == "light"
assert settings["quietStartup"] is False
assert settings["tuiMode"] == "fullscreen"

def test_no_write_when_all_present(self, fake_home):
agent = fake_home / ".pi" / "agent"
agent.mkdir(parents=True)
full = {
"theme": "dark",
"quietStartup": True,
"tuiMode": "regular",
"extensions": ["/e"],
"skills": ["/s"],
"prompts": ["/p"],
Expand Down
Loading