Repository navigation
Commit 455527c
authored
refactor(tui): remove the Rust agent runtime and keep /model via ACP config options (#7)
The TUI (tui/, binary zypi) is now a pure ACP client: the Python pi_agent_cli is the
only agent, and a future pi-rust agent only has to be a stdio ACP executable
(PI_AGENT_COMMAND).
- Remove the in-process Rust agent runtime (pi-sampler, MvpAgent, the sampler/provider
stack, the headless runner, the whole leader mode) and the UI entries that have no
Python producer: dashboard, MCP, prompt queue, subagents/workflows/goals, hooks/plugins,
rewind/fork, feedback/consent, changelog, session rename. Then the crates, dependencies
and `pub` items that were left unused.
- Keep /model through ACP Session Config Options: the Python agent advertises a
`category: "model"` select option and routes session/set_config_option; the pager
builds its picker from it (session/set_model stays as a fallback).
- Gate the TUI on Linux: tui-ci.yml + scripts/tui_baseline.py enforce the toolchain pin,
a deny-list, a dependency-graph ceiling, zero warnings, `cargo check --workspace
--tests` and 8 test suites with floors. Report: docs/baselines/tui.md.
- Python agent: session/list returns real titles and mtimes; a stdio ACP contract suite
(it found that initialize advertised session/close and session/resume while the SDK
answered "Method not found"; run_agent now uses use_unstable_protocol=True); SIGTERM
and SIGHUP stop the agent like stdin EOF, so its tools are no longer orphaned; `-p`
refuses --sandbox instead of running unsandboxed.
- Merge main (the Phase 6/7 audit work) into the branch. Six files in pi-agent-cli
conflicted and both sides are kept: an api_key_env is the key of its own provider only,
for every /model choice too; model_for_choice carries Model.reasoning; _bind_session
decides project trust before it restores the saved model.
Size: 1,485 files, +11,177 / -625,252. Linux CI green: TUI CI (gates; 8 suites, 7,439
passed / 0 failed / 20 ignored) and CI (Ruff, pytest on Python 3.11 to 3.13).
Plan and execution record: docs/PLAN/PLAN-RUST-AGENT-RUNTIME-REMOVAL.md.1 parent 7e7d4d4 commit 455527c
1,485 files changed
Lines changed: 11177 additions & 625252 deletions
File tree
- .github/workflows
- docs
- PLAN
- baselines
- specs
- packages/pi-agent-cli
- pi_agent_cli
- tests
- scripts
- tests
- tui
- crates/codegen
- pi-acp-lib/src
- pi-agent-lifecycle
- src
- local
- contributors
- send
- contributors
- pi-agent/src
- plugins
- pi-config-types/src
- pi-env
- src
- pi-fast-worktree/src
- pi-file-utils
- src
- pi-foreign-sessions
- src
- capability
- claude
- codex
- tests
- pi-fsnotify
- benches
- examples
- src
- tests
- pi-hooks-plugins-types
- src
- pi-http
- src
- pi-memory
- src
- pi-pager-bin
- src
- pi-pager-minimal/src
- pi-pager-render/src/appearance
- pi-pager
- docs
- tutorial
- user-guide
- src
- acp
- actions
- app
- acp_handler
- tests
- agent_view
- dispatch
- session
- settings
- tests
- session
- effects
- leader_cluster
- startup_failure
- turn_completion
- diagnostics
- probes
- doctor_cmd
- headless
- reducer
- messages
- tests
- input
- mouse
- minimal
- notifications
- scrollback
- blocks
- tool
- state
- wrappers
- search
- settings
- slash
- commands
- tips
- views
- dashboard
- elicitation_view
- extensions_modal
- file_search
- list_pane
- state
- persona_detail
- prompt_widget
- settings_modal
- welcome
- voice
- worktree_cmd
- tests
- scenarios
- pi-plugin-marketplace
- src
- pi-sampler
- src
- actor
- stream
- tests
- support
- pi-sampling-types/src
- pi-sandbox/src
- pi-session-search
- src
- pi-shell-base
- src
- util
- pi-shell-session-support
- src
- pi-shell
- benches
- changelogs
- src
- agent
- handlers
- models
- mvp_agent
- tests
- subagent
- attempt_store
- tests
- auth
- manager
- oidc
- refresh
- bin
- config_docs
- config
- extensions
- suggest
- heap_profile
- inspect
- leader
- managed_config
- relay
- remote
- sampling
- session
- acp_session_impl
- extensions
- acp_session_tests
- goal
- laziness
- turn
- acp_session
- goal_classifier
- helpers
- memory
- repo_changes
- storage
- jsonl
- telemetry
- testkit
- synth
- unified_list
- workflow
- test_support
- tools
- upload
- util
- config
- resolve
- tests
- acp_harness
- common
- fixtures
- memory_integration
- perf_harness
- subagent_sweep_support
- pi-status-line/src
- pi-telemetry
- src
- events
- external
- pi-test-support
- src
- pi-tools
- pi-workspace-client/src
- pi-workspace-types/src/types
- pi-workspace
- src
- file_system
- permission
- session
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
0 commit comments