@team-agent/installer 0.5.97 → 0.5.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/Cargo.lock +1 -1
  2. package/Cargo.toml +1 -1
  3. package/crates/team-agent/src/cli/adapters.rs +0 -64
  4. package/crates/team-agent/src/cli/diagnose.rs +0 -16
  5. package/crates/team-agent/src/cli/emit.rs +15 -42
  6. package/crates/team-agent/src/cli/mod.rs +130 -31
  7. package/crates/team-agent/src/cli/spec.rs +7 -10
  8. package/crates/team-agent/src/cli/tests/main_preserved.rs +0 -1
  9. package/crates/team-agent/src/cli/tests/missing_subcommands.rs +0 -1
  10. package/crates/team-agent/src/cli/tests/mod.rs +0 -1
  11. package/crates/team-agent/src/cli/tests/run_delegation.rs +0 -3
  12. package/crates/team-agent/src/cli/tests/verb_validate.rs +0 -1
  13. package/crates/team-agent/src/cli/types.rs +0 -14
  14. package/crates/team-agent/src/compiler/tests.rs +5 -8
  15. package/crates/team-agent/src/compiler.rs +6 -14
  16. package/crates/team-agent/src/lifecycle/launch/add_agent.rs +1 -1
  17. package/crates/team-agent/src/lifecycle/launch/add_agent_state.rs +1 -1
  18. package/crates/team-agent/src/lifecycle/launch/agent_state.rs +5 -25
  19. package/crates/team-agent/src/lifecycle/launch/identity.rs +2 -18
  20. package/crates/team-agent/src/lifecycle/launch/layout.rs +7 -29
  21. package/crates/team-agent/src/lifecycle/launch/leader_context.rs +1 -1
  22. package/crates/team-agent/src/lifecycle/launch/mcp_config.rs +1 -1
  23. package/crates/team-agent/src/lifecycle/launch/ownership.rs +1 -1
  24. package/crates/team-agent/src/lifecycle/launch/pi_mcp.rs +7 -7
  25. package/crates/team-agent/src/lifecycle/launch/quick_start.rs +12 -49
  26. package/crates/team-agent/src/lifecycle/launch/quick_start_transport.rs +3 -9
  27. package/crates/team-agent/src/lifecycle/launch/readiness.rs +1 -1
  28. package/crates/team-agent/src/lifecycle/launch/spawn.rs +2 -61
  29. package/crates/team-agent/src/lifecycle/launch/spec_state.rs +2 -15
  30. package/crates/team-agent/src/lifecycle/launch/state_projection.rs +3 -7
  31. package/crates/team-agent/src/lifecycle/launch/worker_env.rs +1 -1
  32. package/crates/team-agent/src/lifecycle/launch.rs +3 -4
  33. package/crates/team-agent/src/lifecycle/mod.rs +0 -8
  34. package/crates/team-agent/src/lifecycle/restart/agent.rs +62 -8
  35. package/crates/team-agent/src/lifecycle/restart/common.rs +0 -32
  36. package/crates/team-agent/src/lifecycle/restart/rebuild.rs +0 -9
  37. package/crates/team-agent/src/lifecycle/tests/clone_agent_preserves_source_tools.rs +1 -2
  38. package/crates/team-agent/src/lifecycle/tests/clone_fork_copilot_perms_red.rs +0 -1
  39. package/crates/team-agent/src/lifecycle/tests/core.rs +0 -213
  40. package/crates/team-agent/src/lifecycle/tests/issue238_codex_effort_contract.rs +96 -0
  41. package/crates/team-agent/src/lifecycle/tests/lane_ops.rs +1 -0
  42. package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +31 -77
  43. package/crates/team-agent/src/lifecycle/tests/main_preserved.rs +2 -2
  44. package/crates/team-agent/src/lifecycle/tests/phase_b_contracts.rs +4 -8
  45. package/crates/team-agent/src/lifecycle/tests/phase_golden.rs +7 -7
  46. package/crates/team-agent/src/lifecycle/tests/pi_executable_mcp_red.rs +1 -1
  47. package/crates/team-agent/src/lifecycle/tests/startup_latency_contract.rs +3 -4
  48. package/crates/team-agent/src/lifecycle/tests.rs +1 -2
  49. package/crates/team-agent/src/lifecycle/types.rs +3 -133
  50. package/crates/team-agent/src/model/enums.rs +21 -71
  51. package/crates/team-agent/src/model/spec.rs +5 -20
  52. package/crates/team-agent/src/provider/adapters/codex.rs +2 -2
  53. package/crates/team-agent/src/provider/types.rs +6 -5
  54. package/examples/team.spec.yaml +0 -1
  55. package/package.json +4 -4
  56. package/schemas/team.schema.json +2 -2
  57. package/skills/team-agent/SKILL.md +1 -1
  58. package/skills/team-agent/references/team-agent-operator.md +23 -38
  59. package/crates/team-agent/src/cli/tests/compile.rs +0 -192
  60. package/crates/team-agent/src/lifecycle/display.rs +0 -550
  61. package/crates/team-agent/src/lifecycle/tests/core_034_real_red.rs +0 -884
  62. package/crates/team-agent/src/lifecycle/tests/display_adaptive_red.rs +0 -481
@@ -44,7 +44,6 @@ pub(crate) enum TokenUsage {
44
44
  pub(crate) enum DispatchKind {
45
45
  Init,
46
46
  QuickStart,
47
- Compile,
48
47
  Send,
49
48
  AllowPeerTalk,
50
49
  Status,
@@ -90,7 +89,6 @@ pub(crate) enum DispatchKind {
90
89
  pub(crate) const ALL_DISPATCH_KINDS: &[DispatchKind] = &[
91
90
  DispatchKind::Init,
92
91
  DispatchKind::QuickStart,
93
- DispatchKind::Compile,
94
92
  DispatchKind::Send,
95
93
  DispatchKind::AllowPeerTalk,
96
94
  DispatchKind::Status,
@@ -164,7 +162,7 @@ pub(crate) struct CommandSpec {
164
162
  /// numeric slack threshold.
165
163
  #[rustfmt::skip]
166
164
  pub(crate) const COMMAND_SPECS: &[CommandSpec] = &[
167
- CommandSpec { name: "quick-start", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::Dispatch(DispatchKind::QuickStart), summary: "start or attach a team from TEAM.md", usage: "usage: team-agent quick-start [TEAMDIR] [--workspace WORKSPACE] [--name NAME] [--team-id TEAM|--team TEAM] [--yes] [--no-display] [--backend tmux|conpty] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
165
+ CommandSpec { name: "quick-start", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::Dispatch(DispatchKind::QuickStart), summary: "start or attach a team from TEAM.md", usage: "usage: team-agent quick-start [TEAMDIR] [--workspace WORKSPACE] [--name NAME] [--team-id TEAM|--team TEAM] [--yes] [--backend tmux|conpty] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
168
166
  CommandSpec { name: "send", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Send), summary: "persist a message for an in-team short name or fully-qualified logical recipient", usage: "usage: team-agent send TO MESSAGE... [--workspace WORKSPACE] [--team TEAM] [--mailbox] [--json]\nTO forms are co-equal: an in-team short name (for example `team-agent send reviewer \"Review\"`) or `<workspace>::<team>/<agent>`.", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: Some("next compatibility release"), action: Some("use positional logical TO and the returned message id"), governance: None },
169
167
  CommandSpec { name: "status", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Status), summary: "show current team status", usage: "usage: team-agent status [AGENT] [--workspace WORKSPACE] [--team TEAM] [--summary|--json] [--detail]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
170
168
  CommandSpec { name: "models", tier: CommandTier::Core, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Models), summary: "list exact provider model ids", usage: "usage: team-agent models [--provider pi|cursor_agent] [QUERY|--search TEXT] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
@@ -172,10 +170,10 @@ pub(crate) const COMMAND_SPECS: &[CommandSpec] = &[
172
170
  CommandSpec { name: "wait", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Wait), summary: "block until a task result is stored", usage: "usage: team-agent wait --task TASK [--workspace WORKSPACE] [--json]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
173
171
  CommandSpec { name: "restart", tier: CommandTier::Core, category: CommandCategory::TeamLifecycle, kind: CommandKind::Dispatch(DispatchKind::Restart), summary: "restart the selected team", usage: "usage: team-agent restart [WORKSPACE] [--team TEAM] [--allow-fresh] [--session-converge-deadline SECONDS] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
174
172
  CommandSpec { name: "shutdown", tier: CommandTier::Core, category: CommandCategory::TeamLifecycle, kind: CommandKind::Dispatch(DispatchKind::Shutdown), summary: "stop the selected team", usage: "usage: team-agent shutdown [--workspace WORKSPACE] [--team TEAM] [--keep-logs] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
175
- CommandSpec { name: "add-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::AddAgent), summary: "add or force-recreate a worker", usage: "usage: team-agent add-agent AGENT --role-file FILE [--force] [--workspace WORKSPACE] [--team TEAM] [--no-display] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
176
- CommandSpec { name: "start-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::StartAgent), summary: "start an existing worker", usage: "usage: team-agent start-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--force] [--allow-fresh] [--no-display] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
173
+ CommandSpec { name: "add-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::AddAgent), summary: "add or force-recreate a worker", usage: "usage: team-agent add-agent AGENT --role-file FILE [--force] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
174
+ CommandSpec { name: "start-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::StartAgent), summary: "start an existing worker", usage: "usage: team-agent start-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--force] [--allow-fresh] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
177
175
  CommandSpec { name: "stop-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::StopAgent), summary: "stop a worker", usage: "usage: team-agent stop-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
178
- CommandSpec { name: "reset-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ResetAgent), summary: "reset a worker session", usage: "usage: team-agent reset-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--discard-session] [--no-display] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
176
+ CommandSpec { name: "reset-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ResetAgent), summary: "reset a worker session", usage: "usage: team-agent reset-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--discard-session] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
179
177
  CommandSpec { name: "diagnose", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::Diagnose), summary: "compatibility alias for doctor", usage: "usage: team-agent doctor [SPEC] [--workspace WORKSPACE] [--team TEAM] [--gate orphans|comms] [--comms] [--fix] [--fix-schema] [--cleanup-orphans] [--confirm] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: Some("doctor"), sunset: None, action: None, governance: None },
180
178
  CommandSpec { name: "claim-leader", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::ClaimLeader), summary: "bind this pane when diagnose reports rebind_required", usage: "usage: team-agent claim-leader [--workspace WORKSPACE] [--team TEAM] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
181
179
  CommandSpec { name: "takeover", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::Takeover), summary: "replace a live leader binding with explicit consent", usage: "usage: team-agent takeover [--workspace WORKSPACE] [--team TEAM] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
@@ -191,7 +189,7 @@ pub(crate) const COMMAND_SPECS: &[CommandSpec] = &[
191
189
  CommandSpec { name: "init", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::Init), summary: "legacy bootstrap command", usage: "usage: team-agent init [--workspace WORKSPACE] [--force] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: Some("quick-start"), sunset: Some("C2"), action: Some("use `team-agent quick-start`"), governance: None },
192
190
  CommandSpec { name: "start", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::SpecOnlyAlias { alias_of: "quick-start" }, summary: "legacy start alias", usage: "usage: team-agent start [TEAMDIR] [--yes] [--fresh] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: Some("quick-start"), sunset: Some("C2"), action: Some("use `team-agent quick-start` or `team-agent restart`"), governance: None },
193
191
  CommandSpec { name: "stop", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::Stop), summary: "legacy shutdown alias", usage: "usage: team-agent stop [--workspace WORKSPACE] [--team TEAM] [--keep-logs] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: Some("shutdown"), sunset: Some("C2"), action: Some("use `team-agent shutdown`"), governance: None },
194
- CommandSpec { name: "restart-agent", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::RestartAgent), summary: "legacy reset-agent alias", usage: "usage: team-agent restart-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--discard-session] [--no-display] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: Some("reset-agent"), sunset: Some("C2"), action: Some("use `team-agent reset-agent`"), governance: None },
192
+ CommandSpec { name: "restart-agent", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::RestartAgent), summary: "legacy reset-agent alias", usage: "usage: team-agent restart-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--discard-session] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: Some("reset-agent"), sunset: Some("C2"), action: Some("use `team-agent reset-agent`"), governance: None },
195
193
  CommandSpec { name: "stuck-list", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::StuckList), summary: "legacy stuck alert listing", usage: "usage: team-agent stuck-list [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: Some("C2"), action: Some("use `team-agent diagnose`"), governance: None },
196
194
  CommandSpec { name: "stuck-cancel", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::StuckCancel), summary: "legacy stuck alert suppression", usage: "usage: team-agent stuck-cancel AGENT [--workspace WORKSPACE] [--alert-type stuck|idle_fallback|cross_worker_deadlock|all] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: Some("C2"), action: Some("use the concrete notification action or `team-agent diagnose`"), governance: None },
197
195
  CommandSpec { name: "acknowledge-idle", tier: CommandTier::CompatHidden, category: CommandCategory::Compat, kind: CommandKind::Dispatch(DispatchKind::AcknowledgeIdle), summary: "legacy idle acknowledgement", usage: "usage: team-agent acknowledge-idle [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: Some("C2"), action: Some("use the concrete idle notification action or `team-agent diagnose`"), governance: None },
@@ -199,8 +197,8 @@ pub(crate) const COMMAND_SPECS: &[CommandSpec] = &[
199
197
  CommandSpec { name: "doctor", tier: CommandTier::Core, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Doctor), summary: "inspect environment and Team runtime health", usage: "usage: team-agent doctor [SPEC] [--workspace WORKSPACE] [--team TEAM] [--gate orphans|comms] [--comms] [--fix] [--fix-schema] [--cleanup-orphans] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
200
198
  CommandSpec { name: "attach-app-server-leader", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::AttachAppServerLeader), summary: "bind an app-server leader receiver", usage: "usage: team-agent attach-app-server-leader [--workspace WORKSPACE] [--team TEAM] --socket unix:///path.sock --thread-id THREAD_ID [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
201
199
  CommandSpec { name: "remove-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::RemoveAgent), summary: "remove a worker", usage: "usage: team-agent remove-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--from-spec] [--confirm] [--force] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
202
- CommandSpec { name: "fork-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ForkAgent), summary: "fork a worker", usage: "usage: team-agent fork-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--no-display] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
203
- CommandSpec { name: "clone-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::CloneAgent), summary: "clone a worker role into a fresh session", usage: "usage: team-agent clone-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--no-display] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
200
+ CommandSpec { name: "fork-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ForkAgent), summary: "fork a worker", usage: "usage: team-agent fork-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
201
+ CommandSpec { name: "clone-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::CloneAgent), summary: "clone a worker role into a fresh session", usage: "usage: team-agent clone-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
204
202
  CommandSpec { name: "allow-peer-talk", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::AllowPeerTalk), summary: "allow direct worker peer talk", usage: "usage: team-agent allow-peer-talk A B [--workspace WORKSPACE] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "capability/config surface" }) },
205
203
  CommandSpec { name: "approvals", tier: CommandTier::Secondary, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Approvals), summary: "inspect provider approval state", usage: "usage: team-agent approvals [AGENT] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "approval diagnostics" }) },
206
204
  CommandSpec { name: "profile", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::Profile), summary: "manage provider profiles", usage: "usage: team-agent profile COMMAND NAME [--workspace WORKSPACE] [--team TEAM] [--auth-mode MODE] [--proxy-mode direct|inherit] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "provider/profile setup" }) },
@@ -210,7 +208,6 @@ pub(crate) const COMMAND_SPECS: &[CommandSpec] = &[
210
208
  CommandSpec { name: "identity", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Identity), summary: "inspect identity metadata", usage: "usage: team-agent identity [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
211
209
  CommandSpec { name: "watch", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Watch), summary: "watch event logs", usage: "usage: team-agent watch [--workspace WORKSPACE] [--team TEAM]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
212
210
  CommandSpec { name: "sessions", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Sessions), summary: "inspect session inventory", usage: "usage: team-agent sessions [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
213
- CommandSpec { name: "compile", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Compile), summary: "compile a team spec", usage: "usage: team-agent compile --team TEAM [--out FILE] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
214
211
  CommandSpec { name: "validate", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Validate), summary: "validate a team spec", usage: "usage: team-agent validate [SPEC] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
215
212
  CommandSpec { name: "preflight", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Preflight), summary: "run preflight checks", usage: "usage: team-agent preflight [TEAMDIR] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
216
213
  CommandSpec { name: "wait-ready", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::WaitReady), summary: "wait for runtime readiness", usage: "usage: team-agent wait-ready [--workspace WORKSPACE] [--team TEAM] [--timeout SECONDS] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
@@ -71,7 +71,6 @@ communication:
71
71
  mirror_files: ".team/messages"
72
72
  runtime:
73
73
  backend: "tmux"
74
- display_backend: "none"
75
74
  session_name: "team-agent-fake-e2e"
76
75
  auto_launch: true
77
76
  require_user_approval_before_launch: false
@@ -239,7 +239,6 @@ communication:
239
239
  mirror_files: ".team/messages"
240
240
  runtime:
241
241
  backend: "tmux"
242
- display_backend: "none"
243
242
  session_name: "team-agent-fake-e2e"
244
243
  auto_launch: true
245
244
  require_user_approval_before_launch: false
@@ -123,7 +123,6 @@ fn outcome_text(r: Result<CmdResult, CliError>) -> String {
123
123
  }
124
124
 
125
125
  mod base;
126
- mod compile;
127
126
  mod divergence;
128
127
  mod lane_c;
129
128
  mod leader_watch;
@@ -222,7 +222,6 @@ fn cli_quick_start_invokes_real_lifecycle_compiles_spec() {
222
222
  name: None,
223
223
  team_id: None,
224
224
  yes: true,
225
- no_display: false,
226
225
  backend: None,
227
226
  json: true,
228
227
  detail: false,
@@ -258,7 +257,6 @@ fn cli_quick_start_invalid_spec_surfaces_real_compile_error() {
258
257
  name: None,
259
258
  team_id: None,
260
259
  yes: false,
261
- no_display: false,
262
260
  backend: None,
263
261
  json: true,
264
262
  detail: false,
@@ -324,7 +322,6 @@ fn cli_add_agent_duplicate_id_surfaces_real_error() {
324
322
  team: None,
325
323
  role_file: dup_role.to_string_lossy().to_string(),
326
324
  force: false,
327
- no_display: false,
328
325
  json: true,
329
326
  };
330
327
  let text = outcome_text(cmd_add_agent(&args));
@@ -67,7 +67,6 @@ communication:
67
67
  mirror_files: ".team/messages"
68
68
  runtime:
69
69
  backend: "tmux"
70
- display_backend: "none"
71
70
  session_name: "team-agent-fake-e2e"
72
71
  auto_launch: true
73
72
  require_user_approval_before_launch: false
@@ -295,7 +295,6 @@ pub struct QuickStartArgs {
295
295
  pub name: Option<String>,
296
296
  pub team_id: Option<String>,
297
297
  pub yes: bool,
298
- pub no_display: bool,
299
298
  pub json: bool,
300
299
  /// Include internal receiver/topology diagnostics in the response.
301
300
  pub detail: bool,
@@ -321,14 +320,6 @@ pub struct InitArgs {
321
320
  pub json: bool,
322
321
  }
323
322
 
324
- /// `compile`(`parser.py:125`)。
325
- #[derive(Debug, Clone, PartialEq, Eq)]
326
- pub struct CompileArgs {
327
- pub team: PathBuf,
328
- pub out: PathBuf,
329
- pub json: bool,
330
- }
331
-
332
323
  /// `send`(`parser.py:262`)。`target` xor `--to`(fanout);`message` 多 token join 空格。
333
324
  #[derive(Debug, Clone, PartialEq)]
334
325
  pub struct SendArgs {
@@ -497,7 +488,6 @@ pub struct StartAgentArgs {
497
488
  pub team: Option<String>,
498
489
  pub force: bool,
499
490
  pub allow_fresh: bool,
500
- pub no_display: bool,
501
491
  pub json: bool,
502
492
  }
503
493
 
@@ -517,7 +507,6 @@ pub struct ResetAgentArgs {
517
507
  pub workspace: PathBuf,
518
508
  pub team: Option<String>,
519
509
  pub discard_session: bool,
520
- pub no_display: bool,
521
510
  pub json: bool,
522
511
  }
523
512
 
@@ -529,7 +518,6 @@ pub struct AddAgentArgs {
529
518
  pub team: Option<String>,
530
519
  pub role_file: String,
531
520
  pub force: bool,
532
- pub no_display: bool,
533
521
  pub json: bool,
534
522
  }
535
523
 
@@ -541,7 +529,6 @@ pub struct ForkAgentArgs {
541
529
  pub team: Option<String>,
542
530
  pub as_agent: String,
543
531
  pub label: Option<String>,
544
- pub no_display: bool,
545
532
  pub json: bool,
546
533
  }
547
534
 
@@ -552,7 +539,6 @@ pub struct CloneAgentArgs {
552
539
  pub team: Option<String>,
553
540
  pub as_agent: String,
554
541
  pub label: Option<String>,
555
- pub no_display: bool,
556
542
  pub json: bool,
557
543
  }
558
544
 
@@ -190,7 +190,7 @@ fn front_matter_non_object_errors() {
190
190
  // separators=(",",":"))` with the workspace path templated to __WS__.
191
191
  // (team-agent-public v0.2.11, /tmp/probe_compiler.py.)
192
192
 
193
- const BASE_NOPROFILE_JSON: &str = r#"{"version":1,"team":{"name":"doc-team","mode":"supervisor_worker","objective":"Compile role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":"gpt-5.5","context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"implementer","role":"Implementation Engineer","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Implement bounded tasks and report result_envelope_v1.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["implementer","Implementation Engineer"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"implementer","rules":[{"id":"route-implementer","match":{"assignee":["implementer"]},"assign_to":"implementer","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","display_backend":"adaptive","session_name":"team-doc-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["implementer"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"implementer","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
193
+ const BASE_NOPROFILE_JSON: &str = r#"{"version":1,"team":{"name":"doc-team","mode":"supervisor_worker","objective":"Compile role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":"gpt-5.5","context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"implementer","role":"Implementation Engineer","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Implement bounded tasks and report result_envelope_v1.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["implementer","Implementation Engineer"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"implementer","rules":[{"id":"route-implementer","match":{"assignee":["implementer"]},"assign_to":"implementer","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","session_name":"team-doc-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["implementer"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"implementer","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
194
194
 
195
195
  #[test]
196
196
  fn compile_base_noprofile_matches_python_dict_order_and_values() {
@@ -237,7 +237,6 @@ default_model: gpt-5.4
237
237
  default_auth_mode: subscription
238
238
  dangerous_auto_approve: true
239
239
  fast: true
240
- display_backend: ghostty_window
241
240
  tick_interval_sec: 1
242
241
  push_min_interval_sec: 3
243
242
  stuck_timeout_sec: 5
@@ -261,7 +260,7 @@ dangerously_skip_permissions: false
261
260
  Implement bounded tasks.
262
261
  ";
263
262
 
264
- const RUNTIME_DEFAULTS_JSON: &str = r#"{"version":1,"team":{"name":"doc-team","mode":"supervisor_worker","objective":"Compile role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":null,"context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"implementer","role":"Implementation Engineer","provider":"codex","model":"gpt-5.4","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Implement bounded tasks.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["implementer","Implementation Engineer"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"implementer","rules":[{"id":"route-implementer","match":{"assignee":["implementer"]},"assign_to":"implementer","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","display_backend":"ghostty_window","session_name":"team-doc-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["implementer"],"fast":true,"tick_interval_sec":1,"push_min_interval_sec":3,"stuck_timeout_sec":5},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"implementer","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
263
+ const RUNTIME_DEFAULTS_JSON: &str = r#"{"version":1,"team":{"name":"doc-team","mode":"supervisor_worker","objective":"Compile role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":null,"context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"implementer","role":"Implementation Engineer","provider":"codex","model":"gpt-5.4","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Implement bounded tasks.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["implementer","Implementation Engineer"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"implementer","rules":[{"id":"route-implementer","match":{"assignee":["implementer"]},"assign_to":"implementer","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","session_name":"team-doc-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["implementer"],"fast":true,"tick_interval_sec":1,"push_min_interval_sec":3,"stuck_timeout_sec":5},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"implementer","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
265
264
 
266
265
  #[test]
267
266
  fn compile_runtime_front_matter_defaults_match_python() {
@@ -283,7 +282,6 @@ objective: Compile thin role docs.
283
282
  provider_models:
284
283
  claude: claude-sonnet-4-6
285
284
  default_auth_mode: subscription
286
- display_backend: none
287
285
  ---
288
286
 
289
287
  Team config.
@@ -302,7 +300,7 @@ dangerously_skip_permissions: false
302
300
  Edit and defend the argument.
303
301
  ";
304
302
 
305
- const ALIAS_JSON: &str = r#"{"version":1,"team":{"name":"debate-team","mode":"supervisor_worker","objective":"Compile thin role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":null,"context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"editor","role":"Editor and Defender","provider":"claude_code","model":"claude-sonnet-4-6","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Edit and defend the argument.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["editor","Editor and Defender"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"editor","rules":[{"id":"route-editor","match":{"assignee":["editor"]},"assign_to":"editor","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","display_backend":"none","session_name":"team-debate-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["editor"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"editor","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
303
+ const ALIAS_JSON: &str = r#"{"version":1,"team":{"name":"debate-team","mode":"supervisor_worker","objective":"Compile thin role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":null,"context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"editor","role":"Editor and Defender","provider":"claude_code","model":"claude-sonnet-4-6","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Edit and defend the argument.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["editor","Editor and Defender"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"editor","rules":[{"id":"route-editor","match":{"assignee":["editor"]},"assign_to":"editor","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","session_name":"team-debate-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["editor"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"editor","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
306
304
 
307
305
  #[test]
308
306
  fn compile_provider_models_claude_code_falls_back_to_claude_alias() {
@@ -316,7 +314,6 @@ const BUILTIN_TEAM: &str = "\
316
314
  ---
317
315
  name: default-model-team
318
316
  objective: Compile role docs without model fields.
319
- display_backend: none
320
317
  ---
321
318
 
322
319
  Team config.
@@ -336,7 +333,7 @@ tools:
336
333
  Implement bounded tasks.
337
334
  ";
338
335
 
339
- const BUILTIN_JSON: &str = r#"{"version":1,"team":{"name":"default-model-team","mode":"supervisor_worker","objective":"Compile role docs without model fields.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":null,"context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"implementer","role":"Implementation Engineer","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Implement bounded tasks.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["implementer","Implementation Engineer"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"implementer","rules":[{"id":"route-implementer","match":{"assignee":["implementer"]},"assign_to":"implementer","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","display_backend":"none","session_name":"team-default-model-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["implementer"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"implementer","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
336
+ const BUILTIN_JSON: &str = r#"{"version":1,"team":{"name":"default-model-team","mode":"supervisor_worker","objective":"Compile role docs without model fields.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":null,"context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"implementer","role":"Implementation Engineer","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Implement bounded tasks.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["implementer","Implementation Engineer"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"implementer","rules":[{"id":"route-implementer","match":{"assignee":["implementer"]},"assign_to":"implementer","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","session_name":"team-default-model-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":1,"startup_order":["implementer"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"implementer","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
340
337
 
341
338
  #[test]
342
339
  fn compile_subscription_without_model_uses_builtin_provider_default() {
@@ -378,7 +375,7 @@ tools:
378
375
  Bravo body.
379
376
  ";
380
377
 
381
- const TWO_AGENTS_JSON: &str = r#"{"version":1,"team":{"name":"doc-team","mode":"supervisor_worker","objective":"Compile role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":"gpt-5.5","context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"alpha","role":"Alpha Worker","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Alpha body.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["alpha","Alpha Worker"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}},{"id":"bravo","role":"Bravo Worker","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Bravo body.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["bravo","Bravo Worker"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"alpha","rules":[{"id":"route-alpha","match":{"assignee":["alpha"]},"assign_to":"alpha","priority":10},{"id":"route-bravo","match":{"assignee":["bravo"]},"assign_to":"bravo","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","display_backend":"adaptive","session_name":"team-doc-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":2,"startup_order":["alpha","bravo"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"alpha","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
378
+ const TWO_AGENTS_JSON: &str = r#"{"version":1,"team":{"name":"doc-team","mode":"supervisor_worker","objective":"Compile role docs.","workspace":"__WS__"},"leader":{"id":"leader","role":"leader","provider":"codex","model":"gpt-5.5","context_policy":{"keep_user_thread":true,"receive_worker_outputs":"business_messages_and_short_summaries","max_worker_result_tokens":2000}},"agents":[{"id":"alpha","role":"Alpha Worker","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Alpha body.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["alpha","Alpha Worker"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}},{"id":"bravo","role":"Bravo Worker","provider":"codex","model":"gpt-5.5","auth_mode":"subscription","working_directory":"__WS__","system_prompt":{"inline":"Bravo body.","file":null},"dangerously_skip_permissions":false,"communication_mode":"leader_centric","preferred_for":["bravo","Bravo Worker"],"avoid_for":[],"output_contract":{"format":"result_envelope_v1","required_fields":["task_id","status","summary","artifacts"]}}],"routing":{"default_assignee":"alpha","rules":[{"id":"route-alpha","match":{"assignee":["alpha"]},"assign_to":"alpha","priority":10},{"id":"route-bravo","match":{"assignee":["bravo"]},"assign_to":"bravo","priority":10}]},"communication":{"protocol":"mcp_inbox","topology":"leader_centered","worker_to_worker":true,"ack_timeout_sec":60,"result_format":"result_envelope_v1","message_store":{"sqlite":".team/runtime/team.db","mirror_files":".team/messages"}},"runtime":{"backend":"tmux","session_name":"team-doc-team","auto_launch":true,"require_user_approval_before_launch":true,"max_active_agents":2,"startup_order":["alpha","bravo"],"fast":false,"tick_interval_sec":2,"push_min_interval_sec":60,"stuck_timeout_sec":300},"context":{"state_file":"team_state.md","artifact_dir":".team/artifacts","log_dir":".team/logs","summarization":{"worker_full_logs":"retain_outside_leader_context","state_update":"after_each_result"}},"tasks":[{"id":"task_initial","title":"Initial document-driven team task","type":"implementation","assignee":"alpha","deps":[],"acceptance":["Worker reports valid result_envelope_v1"],"status":"pending","requires_tools":["mcp_team"],"files":[],"risk":"low"}]}"#;
382
379
 
383
380
  #[test]
384
381
  fn compile_two_agents_sorted_by_filename_with_routing_and_startup_order() {
@@ -203,7 +203,7 @@ pub fn compile_team(team_dir: &Path) -> Result<Value, ModelError> {
203
203
  let value = raw.trim();
204
204
  let parsed = ProviderEffort::parse(value).ok_or_else(|| {
205
205
  ModelError::Validation(format!(
206
- "{}: unknown provider_effort '{value}' (allowed: low|medium|high|xhigh|max)",
206
+ "{}: unknown provider_effort '{value}' (allowed: low|medium|high|xhigh|max|ultra)",
207
207
  team_md.display()
208
208
  ))
209
209
  })?;
@@ -280,13 +280,6 @@ pub fn compile_team(team_dir: &Path) -> Result<Value, ModelError> {
280
280
  "runtime",
281
281
  map(vec![
282
282
  ("backend", Value::Str("tmux".to_string())),
283
- (
284
- "display_backend",
285
- Value::Str(
286
- string_field(&team_meta, "display_backend")
287
- .unwrap_or_else(|| "adaptive".to_string()),
288
- ),
289
- ),
290
283
  (
291
284
  "session_name",
292
285
  Value::Str(session_name(&team_meta, &team_name)),
@@ -565,16 +558,15 @@ fn compile_role_agent_with_mode(
565
558
  if let Some(profile) = string_field(&meta, "profile") {
566
559
  agent_items.push(("profile", Value::Str(profile)));
567
560
  }
568
- // 0.4.x provider effort MVP step 3: resolve effort with role > team > none.
569
- // Validate (unknown literal) AND check provider/effort compatibility
570
- // (max is Claude-only; emit hard error for max + non-Claude here so
571
- // unsupported combinations fail at compile, not at runtime).
561
+ // 0.4.x provider effort MVP step 3: resolve effort with role > team > none
562
+ // (Pi uses only explicit role effort). Validate syntax and provider support
563
+ // here so unsupported combinations fail at compile, not at runtime.
572
564
  let role_effort = match string_field(&meta, "effort") {
573
565
  Some(raw) if !raw.trim().is_empty() => {
574
566
  let value = raw.trim();
575
567
  let parsed = ProviderEffort::parse(value).ok_or_else(|| {
576
568
  ModelError::Validation(format!(
577
- "{}: unknown effort '{value}' (allowed: low|medium|high|xhigh|max)",
569
+ "{}: unknown effort '{value}' (allowed: low|medium|high|xhigh|max|ultra)",
578
570
  role_path.display()
579
571
  ))
580
572
  })?;
@@ -592,7 +584,7 @@ fn compile_role_agent_with_mode(
592
584
  role_effort.or(team_effort)
593
585
  };
594
586
  if let Some(effort) = resolved_effort {
595
- // Reject max + non-Claude at compile time.
587
+ // Apply the shared provider admission policy at compile time.
596
588
  let provider_str = agent_items
597
589
  .iter()
598
590
  .find(|(k, _)| *k == "provider")
@@ -29,7 +29,7 @@ use std::process::Command;
29
29
  use std::time::{SystemTime, UNIX_EPOCH};
30
30
 
31
31
  use crate::lifecycle::*;
32
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
32
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
33
33
  use crate::model::ids::AgentId;
34
34
  use crate::model::yaml::{self, Value};
35
35
  use crate::state::persist::load_runtime_state;
@@ -26,7 +26,7 @@ use std::path::{Path, PathBuf};
26
26
  use std::process::Command;
27
27
 
28
28
  use crate::lifecycle::*;
29
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
29
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
30
30
  use crate::model::ids::AgentId;
31
31
  use crate::model::yaml::{self, Value};
32
32
  use crate::state::persist::load_runtime_state;
@@ -22,11 +22,11 @@ use std::path::{Path, PathBuf};
22
22
  use std::process::Command;
23
23
 
24
24
  use crate::lifecycle::*;
25
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
25
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
26
26
  use crate::model::ids::AgentId;
27
27
  use crate::model::yaml::{self, Value};
28
28
  use crate::state::persist::load_runtime_state;
29
- use crate::transport::{PaneId, SessionName, Target, Transport, WindowName};
29
+ use crate::transport::{PaneId, SessionName, Target, Transport};
30
30
 
31
31
  use crate::lifecycle::lock::{acquire_agent_lifecycle_lock, LifecycleLockRequest};
32
32
 
@@ -64,10 +64,9 @@ pub(super) fn running_agent_state(
64
64
  .get("profile")
65
65
  .map(yaml_value_to_json)
66
66
  .unwrap_or(serde_json::Value::Null);
67
- let window = started_agent
68
- .and_then(|started| started.layout_window.as_ref())
69
- .map(WindowName::as_str)
70
- .or_else(|| agent.get("window").and_then(Value::as_str))
67
+ let window = agent
68
+ .get("window")
69
+ .and_then(Value::as_str)
71
70
  .unwrap_or(id);
72
71
  let mcp_config = crate::provider::get_adapter(provider)
73
72
  .mcp_config(auth_mode)
@@ -129,25 +128,6 @@ pub(super) fn running_agent_state(
129
128
  );
130
129
  if let Some(started_agent) = started_agent {
131
130
  persist_started_agent_plan_state(&mut state, started_agent);
132
- if let Some(layout_window) = started_agent.layout_window.as_ref() {
133
- state.insert(
134
- "layout_window".to_string(),
135
- serde_json::json!(layout_window.as_str()),
136
- );
137
- }
138
- if let Some(layout_index) = started_agent.layout_index {
139
- state.insert("layout_index".to_string(), serde_json::json!(layout_index));
140
- }
141
- if let Some(pane_index) = started_agent.pane_index {
142
- state.insert("pane_index".to_string(), serde_json::json!(pane_index));
143
- }
144
- if !matches!(started_agent.display, WorkerDisplay::Blocked { .. }) {
145
- state.insert(
146
- "display".to_string(),
147
- serde_json::to_value(&started_agent.display)
148
- .map_err(|e| LifecycleError::StatePersist(e.to_string()))?,
149
- );
150
- }
151
131
  }
152
132
  state.insert(
153
133
  "spawn_cwd".to_string(),
@@ -1,5 +1,5 @@
1
1
  //! ---
2
- //! purpose: team 与席位的身份取值,团队键、display 后端、auth_mode、effort 与 quick-start 层级判定
2
+ //! purpose: team 与席位的身份取值,团队键、auth_mode、effort 与 quick-start 层级判定
3
3
  //! contract:
4
4
  //! provides:
5
5
  //! - name: spec_team_id
@@ -18,7 +18,6 @@
18
18
  //! - crate::state::projection
19
19
  //! - crate::state::persist
20
20
  //! - crate::state::repository
21
- //! - crate::lifecycle::display
22
21
  //! - crate::provider::wire
23
22
  //! boundary:
24
23
  //! - 只做身份判定与取值,不 spawn、不开显示
@@ -31,7 +30,7 @@ use std::path::{Path, PathBuf};
31
30
  use std::process::Command;
32
31
 
33
32
  use crate::lifecycle::*;
34
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
33
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
35
34
  use crate::model::ids::AgentId;
36
35
  use crate::model::yaml::{self, Value};
37
36
  use crate::state::persist::load_runtime_state;
@@ -99,21 +98,6 @@ pub(super) fn transport_has_session(transport: &dyn Transport, session_name: &Se
99
98
  }
100
99
  }
101
100
 
102
- /// ---
103
- /// purpose: 取 spec 请求的显示后端并交给 display 解析
104
- /// returns: 解析后的后端,spec 未写或写了未知值时为默认 adaptive
105
- /// ---
106
- pub(super) fn spec_display_backend(spec: &Value) -> DisplayBackend {
107
- let requested = spec
108
- .get("runtime")
109
- .and_then(|runtime| runtime.get("display_backend"))
110
- .and_then(Value::as_str)
111
- .and_then(|backend| {
112
- serde_json::from_value::<DisplayBackend>(serde_json::json!(backend)).ok()
113
- });
114
- crate::lifecycle::display::resolve_display_backend(requested, None).backend
115
- }
116
-
117
101
  use crate::provider::wire::parse_provider;
118
102
 
119
103
  /// ---
@@ -23,7 +23,7 @@ use std::path::{Path, PathBuf};
23
23
  use std::process::Command;
24
24
 
25
25
  use crate::lifecycle::*;
26
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
26
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
27
27
  use crate::model::ids::AgentId;
28
28
  use crate::model::yaml::{self, Value};
29
29
  use crate::state::persist::load_runtime_state;
@@ -72,31 +72,10 @@ pub(crate) fn adaptive_layout_plan(
72
72
 
73
73
  pub(crate) const ADAPTIVE_LAYOUT_MAX_PER_WINDOW: usize = 3;
74
74
 
75
- /// ---
76
- /// purpose: 判断该 state 是否在用 adaptive 布局
77
- /// returns: 顶层或 runtime 段的 display_backend 为 adaptive,或任一席位带非空 layout_window 时为 true
78
- /// ---
79
- pub(crate) fn state_uses_adaptive_layout(state: &serde_json::Value) -> bool {
80
- state
81
- .get("display_backend")
82
- .and_then(serde_json::Value::as_str)
83
- .is_some_and(|backend| backend == "adaptive")
84
- || state
85
- .get("runtime")
86
- .and_then(|runtime| runtime.get("display_backend"))
87
- .and_then(serde_json::Value::as_str)
88
- .is_some_and(|backend| backend == "adaptive")
89
- || state
90
- .get("agents")
91
- .and_then(serde_json::Value::as_object)
92
- .is_some_and(|agents| {
93
- agents.values().any(|agent| {
94
- agent
95
- .get("layout_window")
96
- .and_then(serde_json::Value::as_str)
97
- .is_some_and(|window| !window.is_empty())
98
- })
99
- })
75
+ /// Adaptive display layout was removed; existing state is always resumed in
76
+ /// the per-agent window topology.
77
+ pub(crate) fn state_uses_adaptive_layout(_state: &serde_json::Value) -> bool {
78
+ false
100
79
  }
101
80
 
102
81
  /// ---
@@ -204,9 +183,8 @@ pub(crate) fn adaptive_placement_for_agent(
204
183
  });
205
184
  }
206
185
  }
207
- // E45 (0.3.24 bug#4): when the live session has NO real adaptive layout
208
- // window (the topology is effectively per-agent, even though state says
209
- // display_backend=adaptive), DO NOT synthesise a fresh `team-w<N>`
186
+ // When the live session has no real layout window, do not synthesise
187
+ // a fresh `team-w<N>`
210
188
  // window — that would force the new agent into an adaptive-layout pane
211
189
  // shape the rest of the session does not actually use. Return None so
212
190
  // the caller (`start_agent_at_paths` → `spawn_agent_window`) falls back
@@ -29,7 +29,7 @@ use std::process::Command;
29
29
 
30
30
  use crate::lifecycle::profile_launch::parse_provider;
31
31
  use crate::lifecycle::*;
32
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
32
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
33
33
  use crate::model::ids::AgentId;
34
34
  use crate::model::yaml::{self, Value};
35
35
  use crate::state::persist::load_runtime_state;
@@ -31,7 +31,7 @@ use std::path::{Path, PathBuf};
31
31
  use std::process::Command;
32
32
 
33
33
  use crate::lifecycle::*;
34
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
34
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
35
35
  use crate::model::yaml::{self, Value};
36
36
  use crate::state::persist::load_runtime_state;
37
37
  use crate::transport::{PaneId, SessionName, Target, Transport, WindowName};
@@ -23,7 +23,7 @@ use std::path::{Path, PathBuf};
23
23
  use std::process::Command;
24
24
 
25
25
  use crate::lifecycle::*;
26
- use crate::model::enums::{AuthMode, DisplayBackend, PaneLiveness, Provider, ProviderEffort};
26
+ use crate::model::enums::{AuthMode, PaneLiveness, Provider, ProviderEffort};
27
27
  use crate::model::ids::AgentId;
28
28
  use crate::model::yaml::{self, Value};
29
29
  use crate::state::persist::load_runtime_state;