# Source audit: live-terminal

Decision: redesign-later, report-only locally. Real live terminal behavior means process stdout/stderr/log tail for commands launched by the agent. OMP bash/job/PTY streaming is the source truth; lifecycle hook tracing is not the product contract.

Current local state:

- `extensions/live-terminal/index.ts` registers only `/live`.
- The extension no longer registers lifecycle hooks and cannot present extension hook logs as process logs.
- `/live` reports that OMP bash/job/PTY streaming must be ported before this surface can be enabled.
- The extension is disabled by default through `package.json#pi.extensions`.

OMP source evidence:

- `/tmp/oh-my-pi-review/packages/coding-agent/src/tools/bash.ts` owns `BashTool`, async bash mode, auto-backgrounding, `terminalId` details, and live progress updates through `onUpdate`.
- `/tmp/oh-my-pi-review/packages/coding-agent/src/exec/bash-executor.ts` owns `executeBash`, shell execution, `onChunk`, cancellation, timeouts, and output sink integration.
- `/tmp/oh-my-pi-review/packages/coding-agent/src/session/streaming-output.ts` owns `TailBuffer`, `OutputSink`, and `streamTailUpdates` for chunked live output.
- `/tmp/oh-my-pi-review/packages/coding-agent/src/tools/job.ts` owns the user-facing `job` tool for list, poll, cancel, progress snapshots, and scoped job visibility.
- `/tmp/oh-my-pi-review/packages/coding-agent/src/async/job-manager.ts` owns background job registration, progress callbacks, cancellation, delivery, retention, and running job limits.
- `/tmp/oh-my-pi-review/packages/coding-agent/src/tools/bash-interactive.ts` and `/tmp/oh-my-pi-review/packages/coding-agent/src/tools/bash-pty-selection.ts` own PTY execution and selection.

Implementation boundary:

- Do not use Pi lifecycle hooks as a substitute for live process logs.
- Do not enable this extension until it can observe or wrap OMP command output chunks, background jobs, PTY terminal ids, cancellation, and completion state.
- A future Miloc-facing plugin may expose a compact `/live` view, but the data plane must come from OMP bash/job/PTY behavior.

License note: OMP files are source evidence for the future port. No OMP implementation code was copied in the report-only slice.
