draft(workspaces): separate PTY lifecycle from Agent activity - #1038
draft(workspaces): separate PTY lifecycle from Agent activity#1038luokerenx4 wants to merge 14 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Native runtime acceptance update (2026-08-09): added |
|
Additional Draft-gate findings:
Two focused repair options are recorded in the plan and intentionally left for design review:
No lifecycle implementation change or merge was made in response; the PR remains Draft and unmerged. |
|
Pi surface trace is now recorded in commit Recommended ownership:
The recommendation is to split For failures, the activity extension should retain the final assistant This remains an unapproved Draft recommendation; the PR is still not for merge. |
|
Baseline update (2026-08-09):
|
|
Acceptance audit improvement: The previous UI evidence only tested the activity-to-label helper. Added component-level regressions for all three visible Session listings:
Focused UI verification: 4 files / 18 tests passed; UI TypeScript project build passed. This strengthens the current proposal without selecting or implementing the pending Pi ownership design. |
|
Quick Chat delivery audit improvement: The delivery contract is now pinned across all three ownership boundaries instead of inferred from the terminal layer alone:
Focused verification: 3 files / 61 tests passed; root TypeScript check passed. No pending lifecycle design choice was implemented. |
|
Added the ordinary Workspace-list activity projection in The main Verification:
The PR remains Draft and unmerged. The Pi provider/activity split and final lifecycle semantics are still intentionally awaiting maintainer design approval. |
Status
Design/implementation proposal — do not merge yet.
This PR exists so the Session lifecycle model can be reviewed against concrete code, tests, and transport evidence. It does not claim that the proposed state model, persistence boundary, or Workspace-local runtime hooks have been accepted.
The immediate OpenCode startup defect is isolated in #1037. Real configured-effort OpenCode acceptance for this branch depends on that fix, but this PR does not include its commit.
Problem
OpenAlice currently exposes a live PTY as
running. OpenCode and Pi intentionally keep their interactive process alive after a turn completes, so process liveness makes a finished Agent look permanently busy.transcript.session.capturedonly identifies the native conversation and is not a completion signal.Alternatives considered
running/pausedfor the process and adds transientstarting/working/waiting/unavailable/failed/stoppedactivity sourced from adapter hooks.The prototype implements option 3 because it avoids timing heuristics while preserving resumable TUI processes. That choice remains open for review.
Prototype
Workingfrom a live TUI that isReadyfor user input; unsupported adapters showLiverather than fabricated progress.Open design questions
Verification completed
npx tsc --noEmitcd ui && npx tsc -bnpx tsc -p apps/desktop/tsconfig.json --noEmitpnpm electron:build(unsigned development build)CSC_IDENTITY_AUTO_DISCOVERY=false pnpm electron:smoke:pty --skip-build— real Electron IPC/PTY attach and CLI socket round trip passed.pnpm docker:smoke— isolated image, HTTP readiness, runtime detection, real Workspace PTY WebSocket,aliceCLI round trip, and offboarding passed without AI credentials or a broker.pnpm test: 495 files passed, 1 skipped; 4074 tests passed, 9 skipped.Still required before any acceptance decision