@team-agent/installer 0.5.124 → 0.5.126

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 (151) hide show
  1. package/Cargo.lock +1 -8
  2. package/Cargo.toml +1 -1
  3. package/README.md +2 -2
  4. package/README.zh.md +2 -2
  5. package/crates/team-agent/Cargo.toml +0 -1
  6. package/crates/team-agent/src/cli/diagnose.rs +39 -69
  7. package/crates/team-agent/src/cli/emit.rs +45 -15
  8. package/crates/team-agent/src/cli/intent/runtime.rs +5 -53
  9. package/crates/team-agent/src/cli/intent/runtime_tests.rs +10 -130
  10. package/crates/team-agent/src/cli/leader.rs +2 -3
  11. package/crates/team-agent/src/cli/leader_prompt.rs +1 -1
  12. package/crates/team-agent/src/cli/mod.rs +28 -33
  13. package/crates/team-agent/src/cli/models.rs +44 -880
  14. package/crates/team-agent/src/cli/route.rs +1 -1
  15. package/crates/team-agent/src/cli/send/persist.rs +36 -0
  16. package/crates/team-agent/src/cli/send/presentation.rs +7 -1
  17. package/crates/team-agent/src/cli/send.rs +3 -1
  18. package/crates/team-agent/src/cli/spec.rs +1 -2
  19. package/crates/team-agent/src/cli/status_port/brief.rs +66 -0
  20. package/crates/team-agent/src/cli/tests/base.rs +4 -11
  21. package/crates/team-agent/src/cli/tests/mod.rs +1 -1
  22. package/crates/team-agent/src/cli/tests/run_delegation.rs +5 -4
  23. package/crates/team-agent/src/cli/tests/status_send.rs +17 -0
  24. package/crates/team-agent/src/compiler/tests.rs +39 -8
  25. package/crates/team-agent/src/compiler.rs +28 -204
  26. package/crates/team-agent/src/contract_runtime/backend.rs +79 -40
  27. package/crates/team-agent/src/contract_runtime/config.rs +37 -24
  28. package/crates/team-agent/src/contract_runtime/discovery.rs +33 -0
  29. package/crates/team-agent/src/contract_runtime/fork.rs +368 -0
  30. package/crates/team-agent/src/contract_runtime/framework.rs +87 -34
  31. package/crates/team-agent/src/contract_runtime/mod.rs +1 -0
  32. package/crates/team-agent/src/contract_runtime/registry.rs +299 -21
  33. package/crates/team-agent/src/coordinator/runtime_detectors.rs +0 -1
  34. package/crates/team-agent/src/coordinator/tests/api_error_recovery.rs +29 -8
  35. package/crates/team-agent/src/coordinator/tests/health_sync.rs +0 -42
  36. package/crates/team-agent/src/coordinator/tick.rs +89 -1
  37. package/crates/team-agent/src/db/message_store.rs +78 -3
  38. package/crates/team-agent/src/layout/worker_window_helpers.rs +0 -1
  39. package/crates/team-agent/src/leader/prompt.rs +1 -2
  40. package/crates/team-agent/src/leader/provider_attribution.rs +0 -52
  41. package/crates/team-agent/src/leader/start.rs +1 -2
  42. package/crates/team-agent/src/leader/tests/prompt_contract.rs +2 -3
  43. package/crates/team-agent/src/lifecycle/launch/add_agent.rs +91 -0
  44. package/crates/team-agent/src/lifecycle/launch/add_agent_state.rs +15 -195
  45. package/crates/team-agent/src/lifecycle/launch/agent_state.rs +0 -9
  46. package/crates/team-agent/src/lifecycle/launch/clone_agent.rs +11 -27
  47. package/crates/team-agent/src/lifecycle/launch/fork_agent.rs +18 -29
  48. package/crates/team-agent/src/lifecycle/launch/fork_entry.rs +6 -87
  49. package/crates/team-agent/src/lifecycle/launch/mcp_config.rs +3 -11
  50. package/crates/team-agent/src/lifecycle/launch/pi_mcp.rs +74 -244
  51. package/crates/team-agent/src/lifecycle/launch/quick_start.rs +0 -24
  52. package/crates/team-agent/src/lifecycle/launch/role_source.rs +5 -0
  53. package/crates/team-agent/src/lifecycle/launch/spawn.rs +21 -61
  54. package/crates/team-agent/src/lifecycle/launch/spec_state.rs +0 -1
  55. package/crates/team-agent/src/lifecycle/launch/worker_env.rs +0 -108
  56. package/crates/team-agent/src/lifecycle/launch.rs +2 -43
  57. package/crates/team-agent/src/lifecycle/profile_launch.rs +21 -348
  58. package/crates/team-agent/src/lifecycle/profile_smoke.rs +1 -2
  59. package/crates/team-agent/src/lifecycle/restart/common.rs +43 -378
  60. package/crates/team-agent/src/lifecycle/restart/selection.rs +5 -5
  61. package/crates/team-agent/src/lifecycle/restart.rs +0 -2
  62. package/crates/team-agent/src/lifecycle/role_config.rs +42 -3
  63. package/crates/team-agent/src/lifecycle/tests/behavioral_diff_264_red.rs +11 -6
  64. package/crates/team-agent/src/lifecycle/tests/claude_profile_launch_red.rs +8 -320
  65. package/crates/team-agent/src/lifecycle/tests/cli_argv_routing_red.rs +60 -145
  66. package/crates/team-agent/src/lifecycle/tests/clone_fork_copilot_perms_red.rs +8 -334
  67. package/crates/team-agent/src/lifecycle/tests/communication_mode_runtime_contract_red.rs +30 -11
  68. package/crates/team-agent/src/lifecycle/tests/copilot_provider_red.rs +2 -2
  69. package/crates/team-agent/src/lifecycle/tests/core.rs +17 -16
  70. package/crates/team-agent/src/lifecycle/tests/grok_require_explicit_model_red.rs +12 -12
  71. package/crates/team-agent/src/lifecycle/tests/harvest2_a_batch_red.rs +3 -51
  72. package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +26 -28
  73. package/crates/team-agent/src/lifecycle/tests/pi_catalog_red.rs +6 -18
  74. package/crates/team-agent/src/lifecycle/tests/pi_command_red.rs +52 -70
  75. package/crates/team-agent/src/lifecycle/tests/pi_dual_entry_red.rs +4 -157
  76. package/crates/team-agent/src/lifecycle/tests/pi_executable_mcp_red.rs +10 -302
  77. package/crates/team-agent/src/lifecycle/tests/pi_lifecycle_doctor_red.rs +1 -68
  78. package/crates/team-agent/src/lifecycle/tests/pi_native_mcp_capability_red.rs +1 -19
  79. package/crates/team-agent/src/lifecycle/tests/pi_session_delivery_red.rs +2 -100
  80. package/crates/team-agent/src/lifecycle/tests/quick_start_worker_readiness_red.rs +11 -10
  81. package/crates/team-agent/src/lifecycle/tests/restart_rebind_hotfix_252_red.rs +0 -1
  82. package/crates/team-agent/src/lifecycle/tests/restart_session_capture_red.rs +2 -106
  83. package/crates/team-agent/src/lifecycle/tests/status_credential_redaction_contract.rs +2 -2
  84. package/crates/team-agent/src/lifecycle/tests/swallow_batch4_semantics_red.rs +2 -254
  85. package/crates/team-agent/src/lifecycle/tests/upgrade_compat_0211_red.rs +4 -4
  86. package/crates/team-agent/src/lifecycle/tests/verify_rs031_window_consistency_red.rs +6 -5
  87. package/crates/team-agent/src/lifecycle/tests/worker_spawn_env_red.rs +7 -153
  88. package/crates/team-agent/src/lifecycle/tests.rs +0 -6
  89. package/crates/team-agent/src/lifecycle/types.rs +2 -18
  90. package/crates/team-agent/src/lifecycle/worker_command_context.rs +2 -4
  91. package/crates/team-agent/src/mcp_server/readiness.rs +148 -97
  92. package/crates/team-agent/src/mcp_server/readiness_tests.rs +115 -16
  93. package/crates/team-agent/src/messaging/delivery.rs +185 -168
  94. package/crates/team-agent/src/messaging/delivery_consumption_tests.rs +5 -5
  95. package/crates/team-agent/src/messaging/enter_rescue_tests.rs +1 -1
  96. package/crates/team-agent/src/messaging/helpers.rs +19 -0
  97. package/crates/team-agent/src/messaging/tests/dup_inject.rs +67 -5
  98. package/crates/team-agent/src/messaging/tests/runtime.rs +110 -4
  99. package/crates/team-agent/src/messaging/tests/spine.rs +46 -36
  100. package/crates/team-agent/src/model/enums.rs +1 -8
  101. package/crates/team-agent/src/provider/adapter.rs +33 -302
  102. package/crates/team-agent/src/provider/adapters/mod.rs +4 -5
  103. package/crates/team-agent/src/provider/argv_route.rs +1 -5
  104. package/crates/team-agent/src/provider/bypass_flags.rs +3 -11
  105. package/crates/team-agent/src/provider/classify.rs +68 -3
  106. package/crates/team-agent/src/provider/faults.rs +1 -1
  107. package/crates/team-agent/src/provider/model_catalog.rs +14 -273
  108. package/crates/team-agent/src/provider/session/capture.rs +7 -107
  109. package/crates/team-agent/src/provider/session/context_fork/outcome.rs +0 -4
  110. package/crates/team-agent/src/provider/session/context_fork.rs +17 -109
  111. package/crates/team-agent/src/provider/session_scan/common.rs +11 -36
  112. package/crates/team-agent/src/provider/session_scan/pi.rs +1 -34
  113. package/crates/team-agent/src/provider/session_scan.rs +4 -14
  114. package/crates/team-agent/src/provider/submit_now.rs +5 -28
  115. package/crates/team-agent/src/provider/tests/adapter.rs +39 -275
  116. package/crates/team-agent/src/provider/tests/classify.rs +53 -0
  117. package/crates/team-agent/src/provider/tests/command_helpers.rs +3 -15
  118. package/crates/team-agent/src/provider/tests/idle.rs +0 -25
  119. package/crates/team-agent/src/provider/types.rs +1 -1
  120. package/crates/team-agent/src/provider/wire.rs +79 -11
  121. package/crates/team-agent/src/state/abnormal_watch/tests/mod.rs +1 -1
  122. package/crates/team-agent/src/state/persist.rs +6 -6
  123. package/crates/team-agent/src/state/repository/tests.rs +2 -2
  124. package/crates/team-agent/src/tmux_backend/native_input_tests.rs +2 -178
  125. package/crates/team-agent/src/tmux_backend/tests.rs +151 -0
  126. package/crates/team-agent/src/tmux_backend.rs +43 -8
  127. package/crates/team-agent/src/transport/native_input.rs +2 -231
  128. package/package.json +4 -4
  129. package/skills/team-agent/SKILL.md +7 -5
  130. package/skills/team-agent/command-coverage.json +15 -1
  131. package/skills/team-agent/docs/reference/team-agent-operator.md +5 -3
  132. package/skills/team-agent/references/team-agent-operator.md +5 -3
  133. package/crates/team-agent/src/lifecycle/launch/cursor_create_chat.rs +0 -229
  134. package/crates/team-agent/src/lifecycle/launch/cursor_mcp.rs +0 -522
  135. package/crates/team-agent/src/lifecycle/launch/cursor_mcp_iso.rs +0 -282
  136. package/crates/team-agent/src/lifecycle/restart/avatar.rs +0 -1805
  137. package/crates/team-agent/src/lifecycle/tests/claude_compatible_config_red.rs +0 -325
  138. package/crates/team-agent/src/lifecycle/tests/cursor_mcp_overlay.rs +0 -576
  139. package/crates/team-agent/src/lifecycle/tests/cursor_require_explicit_model_red.rs +0 -222
  140. package/crates/team-agent/src/lifecycle/tests/cursor_restart_resume_red.rs +0 -511
  141. package/crates/team-agent/src/lifecycle/tests/pi_compiler_red.rs +0 -210
  142. package/crates/team-agent/src/lifecycle/tests/pi_fork_session_inheritance_red.rs +0 -1409
  143. package/crates/team-agent/src/provider/adapters/claude.rs +0 -78
  144. package/crates/team-agent/src/provider/adapters/claude_fork.rs +0 -131
  145. package/crates/team-agent/src/provider/adapters/cursor_agent.rs +0 -44
  146. package/crates/team-agent/src/provider/adapters/pi.rs +0 -100
  147. package/crates/team-agent/src/provider/session/context_fork/claude.rs +0 -123
  148. package/crates/team-agent/src/provider/session_scan/claude.rs +0 -523
  149. package/crates/team-agent/src/provider/session_scan/cursor.rs +0 -538
  150. package/crates/team-agent/src/provider/testdata/cursor-list-models-native.stdout +0 -250
  151. package/crates/team-agent/src/test_support/models_timeout_fixture.rs +0 -144
@@ -1702,7 +1702,7 @@ thread_local! {
1702
1702
  static CURSOR_SINGLE_ENTER: Cell<bool> = const { Cell::new(false) };
1703
1703
  }
1704
1704
 
1705
- /// Run `f` with a paste→Enter floor. Delivery sets 1s for CursorAgent and Grok.
1705
+ /// Run `f` with a paste→Enter floor. Delivery sets 1s for Grok.
1706
1706
  /// Tests pass a small non-zero Duration to cover the sleep branch.
1707
1707
  /// Default is ZERO — claude/codex and unset callers pay nothing.
1708
1708
  /// This is not TEAM_AGENT_TEST_TMP (that var is a path, always set in seats).
@@ -1712,7 +1712,7 @@ thread_local! {
1712
1712
  /// floor: 本次生效的最小间隔;ZERO 表示不等
1713
1713
  /// f: 在该地板下执行的闭包
1714
1714
  /// returns: 原样返回 f 的返回值
1715
- /// boundary: thread_local 作用域,不跨线程;只设阈值,真正的等待发生在 sleep_remaining_paste_to_submit_floor;默认 ZERO,只有 delivery 对 cursor 才设 1s
1715
+ /// boundary: thread_local 作用域,不跨线程;只设阈值,真正的等待发生在 sleep_remaining_paste_to_submit_floor;默认 ZERO,只有 delivery 对 Grok 才设 1s
1716
1716
  /// ---
1717
1717
  pub fn with_paste_to_submit_floor<R>(floor: Duration, f: impl FnOnce() -> R) -> R {
1718
1718
  PASTE_TO_SUBMIT_FLOOR.with(|cell| {
@@ -1733,7 +1733,7 @@ pub(crate) fn current_paste_to_submit_floor() -> Duration {
1733
1733
  }
1734
1734
 
1735
1735
  /// ---
1736
- /// purpose: cursor 注入单回车闸(delivery 仅对 CursorAgent 打开)
1736
+ /// purpose: 单回车闸(delivery 仅对 Pi 打开;最初为 Cursor 实测)
1737
1737
  /// contract: 默认关;打开后重试 Enter 仅当 token 仍在输入区且无 busy
1738
1738
  /// boundary: 不改 claude/grok/codex 默认重试;测试隔离下默认关
1739
1739
  /// ---
@@ -1891,6 +1891,16 @@ fn token_in_bottom_n(text: &str, marker: &str, n: usize) -> bool {
1891
1891
  .any(|line| line.contains(marker))
1892
1892
  }
1893
1893
 
1894
+ /// #379: Claude Code echoes the submitted turn right above its composer box,
1895
+ /// well inside the bottom-15 window. When that box is recognized only the text
1896
+ /// between its rules is composer; otherwise the whole tail stays in charge.
1897
+ fn composer_view(text: &str) -> std::borrow::Cow<'_, str> {
1898
+ match team_agent_contract::providers::claude::interaction::inspect_legacy_composer(text) {
1899
+ Some((_, current)) => std::borrow::Cow::Owned(current),
1900
+ None => std::borrow::Cow::Borrowed(text),
1901
+ }
1902
+ }
1903
+
1894
1904
  /// purpose: token 在本轮注入中的三态观测
1895
1905
  /// contract:
1896
1906
  /// - Visible: 当前 capture 可见
@@ -2010,7 +2020,7 @@ fn latch_paste(text: &str, current: Option<PasteLatch>) -> Option<PasteLatch> {
2010
2020
  if current.is_some() {
2011
2021
  return current;
2012
2022
  }
2013
- let prompt = pasted_prompt_in_composer(text, 15)?;
2023
+ let prompt = pasted_prompt_in_composer(&composer_view(text), 15)?;
2014
2024
  if let Some(id) = prompt.id {
2015
2025
  return Some(PasteLatch::HashId(id));
2016
2026
  }
@@ -2053,6 +2063,7 @@ fn consumption_from_placeholder(text: &str, tracked: Option<PasteLatch>) -> Opti
2053
2063
  /// boundary: 不重粘文本;不把不同 grok 行数当成可重按的同一次;tracked 为 None 时占位符路径一律不重按(token 仍在底 15 非空行的重按与 tracked 无关)
2054
2064
  /// ---
2055
2065
  pub(crate) fn should_resubmit_enter(text: &str, marker: &str, tracked: Option<PasteLatch>) -> bool {
2066
+ let text = &*composer_view(text);
2056
2067
  if token_in_bottom_n(text, marker, 15) {
2057
2068
  return true;
2058
2069
  }
@@ -2087,7 +2098,8 @@ pub(crate) fn this_paste_identity_in_composer(
2087
2098
  marker: &str,
2088
2099
  tracked: Option<PasteLatch>,
2089
2100
  ) -> bool {
2090
- should_resubmit_enter(text, marker, tracked) || composer_joined(text, 15).contains(marker)
2101
+ should_resubmit_enter(text, marker, tracked)
2102
+ || composer_joined(&composer_view(text), 15).contains(marker)
2091
2103
  }
2092
2104
 
2093
2105
  /// ---
@@ -2149,6 +2161,7 @@ pub(crate) fn should_resubmit_enter_cursor(text: &str, marker: &str) -> bool {
2149
2161
  /// boundary: token 出现在未折叠的高块里不算完成(按早了);只判「能不能按」,不判「按了有没有成」
2150
2162
  /// ---
2151
2163
  pub(crate) fn paste_ready_for_enter(text: &str, marker: &str) -> bool {
2164
+ let text = &*composer_view(text);
2152
2165
  if pasted_prompt_in_composer(text, 15).is_some() {
2153
2166
  return true;
2154
2167
  }
@@ -2185,6 +2198,7 @@ pub(crate) fn consumption_from_capture(
2185
2198
  token_ever_visible: bool,
2186
2199
  tracked: Option<PasteLatch>,
2187
2200
  ) -> Option<bool> {
2201
+ let text = &*composer_view(text);
2188
2202
  let token_now = token_in_bottom_n(text, marker, 15);
2189
2203
  match token_sighting(token_now, token_ever_visible) {
2190
2204
  TokenSighting::Visible => Some(false),
@@ -2231,10 +2245,13 @@ struct ConsumptionDiagnostics {
2231
2245
  current_marker_in_bottom_15: Option<bool>,
2232
2246
  paste_identity_in_composer: Option<bool>,
2233
2247
  consumption_from_capture_result: Option<bool>,
2248
+ /// Busy in any post-Enter sample: one final frame lands on a random spinner phase.
2249
+ busy_seen: bool,
2234
2250
  }
2235
2251
 
2236
2252
  impl ConsumptionDiagnostics {
2237
2253
  fn record(&mut self, observation: ConsumptionCaptureObservation) {
2254
+ self.busy_seen |= observation.busy.is_some();
2238
2255
  self.busy_signal_kind = observation.busy.map(|match_| match_.kind);
2239
2256
  self.busy_line_from_bottom = observation.busy.map(|match_| match_.line_from_bottom);
2240
2257
  self.current_marker_in_bottom_15 = observation.marker_in_bottom_15;
@@ -2316,6 +2333,22 @@ fn busy_signal_kind_in_line(line: &str) -> Option<BusySignalKind> {
2316
2333
  }
2317
2334
 
2318
2335
  fn provider_busy_signal_match(text: &str) -> Option<BusySignalMatch> {
2336
+ use team_agent_contract::{contract::delivery::InputSurface, providers::claude::interaction};
2337
+ // #379: Claude Code's box decides alone. Its spinner glyph animates through
2338
+ // `·` and a finished turn leaves `✻ Worked for 3s` in the window, so a
2339
+ // per-line glyph scan is neither stable nor live.
2340
+ if let Some((surface, _)) = interaction::inspect_legacy_composer(text) {
2341
+ let row = text
2342
+ .lines()
2343
+ .rev()
2344
+ .filter(|line| !line.trim().is_empty())
2345
+ .position(interaction::spinner_row)
2346
+ .unwrap_or(0);
2347
+ return (surface == InputSurface::Busy).then_some(BusySignalMatch {
2348
+ kind: BusySignalKind::SpinnerGlyph,
2349
+ line_from_bottom: u8::try_from(row).unwrap_or(u8::MAX),
2350
+ });
2351
+ }
2319
2352
  text.lines()
2320
2353
  .rev()
2321
2354
  .filter(|line| !line.trim().is_empty())
@@ -2351,6 +2384,7 @@ pub(crate) fn observe_turn_from_capture(text: &str, marker: Option<&str>) -> Tur
2351
2384
  if provider_busy_signal_in_tail(text) {
2352
2385
  return TurnVerification::LeaderNewTurnBoundaryVerified;
2353
2386
  }
2387
+ let text = &*composer_view(text);
2354
2388
  let paste_still = pasted_prompt_in_composer(text, 15).is_some();
2355
2389
  let token_still = marker
2356
2390
  .map(|m| token_in_bottom_n(text, m, 15))
@@ -2382,8 +2416,9 @@ fn submit_attempt_observation(
2382
2416
  let marker_position = marker.and_then(|m| marker_position_from_bottom(&captured.text, m));
2383
2417
  // marker 在时也走 pasted_prompt_match:折叠占位符是编排长粘贴的正信号,
2384
2418
  // 不能只在无 token 载荷上才认。matched 仍表示「composer 里还有待提交信号」。
2419
+ let composer = composer_view(&captured.text);
2385
2420
  let (matched, matched_literal, where_in_tail) = if let Some(marker) = marker {
2386
- if token_in_bottom_n(&captured.text, marker, 15) {
2421
+ if token_in_bottom_n(&composer, marker, 15) {
2387
2422
  (
2388
2423
  true,
2389
2424
  marker_position.map(|_| marker.to_string()),
@@ -2391,7 +2426,7 @@ fn submit_attempt_observation(
2391
2426
  )
2392
2427
  } else if let Some((literal, where_in_tail)) = pasted_prompt_match(&captured.text) {
2393
2428
  (
2394
- pasted_prompt_in_composer(&captured.text, 15).is_some(),
2429
+ pasted_prompt_in_composer(&composer, 15).is_some(),
2395
2430
  Some(literal.to_string()),
2396
2431
  Some(where_in_tail),
2397
2432
  )
@@ -3673,7 +3708,7 @@ impl Transport for TmuxBackend {
3673
3708
  marker,
3674
3709
  inject_start.elapsed().as_millis() as u64,
3675
3710
  ));
3676
- if observation.busy.is_some() {
3711
+ if consumption_diagnostics.busy_seen {
3677
3712
  consumption_reason = SubmitConsumptionReason::FallbackBusy;
3678
3713
  SubmitVerification::EnterSentWithoutPlaceholderCheck
3679
3714
  } else {
@@ -24,7 +24,7 @@ impl NativeInputRequest {
24
24
  }
25
25
 
26
26
  pub fn supported(&self) -> bool {
27
- matches!(self.provider, Provider::Pi | Provider::CursorAgent)
27
+ self.provider == Provider::Pi
28
28
  && self.message_id.starts_with("msg_")
29
29
  && self
30
30
  .message_id
@@ -196,7 +196,7 @@ fn input_digest(text: &str) -> String {
196
196
  }
197
197
 
198
198
  pub(crate) fn supports_input_observation(provider: Provider) -> bool {
199
- matches!(provider, Provider::Pi | Provider::CursorAgent)
199
+ provider == Provider::Pi
200
200
  }
201
201
 
202
202
  pub(crate) fn inspect_input(
@@ -206,79 +206,10 @@ pub(crate) fn inspect_input(
206
206
  ) -> Option<InputFrame> {
207
207
  match provider {
208
208
  Provider::Pi => pi_input(text, pane_height),
209
- Provider::CursorAgent => cursor_input(text, pane_height),
210
209
  _ => None,
211
210
  }
212
211
  }
213
212
 
214
- fn cursor_input(text: &str, pane_height: u32) -> Option<InputFrame> {
215
- use team_agent_contract::contract::delivery::InputSurface;
216
- if pane_height == 0 {
217
- return None;
218
- }
219
- let text_rows: Vec<_> = text.lines().collect();
220
- // Only the current viewport authorizes input; retain full history below
221
- // solely for same-message transcript correlation.
222
- let viewport_start = text_rows.len().saturating_sub(pane_height as usize);
223
- let viewport = text_rows[viewport_start..].join("\n");
224
- let (surface, rows, capsule, busy) =
225
- team_agent_contract::providers::cursor::interaction::inspect_legacy_composer(&viewport)?;
226
- let first = match *rows.first()? {
227
- "→" => "",
228
- row => row.strip_prefix("→ ")?,
229
- };
230
- let footer = rows.iter().rposition(|row| {
231
- row.strip_suffix("Run Everything").is_some_and(|prefix| {
232
- !prefix.trim().is_empty() && !prefix.trim_start().starts_with("→ ")
233
- })
234
- })?;
235
- if footer == 0 {
236
- return None;
237
- }
238
- let tail: Vec<_> = rows[footer + 1..]
239
- .iter()
240
- .filter(|row| !row.is_empty())
241
- .copied()
242
- .collect();
243
- if tail.is_empty() {
244
- return None;
245
- }
246
- // Startup history can leave Tail(200) between Ready/Pasted/Accepted. The
247
- // immutable carrier birth/nonce remains in NativeInputBinding; this UI
248
- // context is the current native cwd/footer tail, not a version attestation.
249
- let identity = format!(
250
- "cursor-current-composer-v1:{}",
251
- input_digest(&tail.join("\n"))
252
- );
253
- let footer_row = rows[footer]
254
- .split_whitespace()
255
- .collect::<Vec<_>>()
256
- .join(" ");
257
- let ready = matches!(surface, InputSurface::ComposerReady | InputSurface::Busy);
258
- if (ready || capsule.is_some()) && rows[1..footer].iter().any(|row| !row.trim().is_empty()) {
259
- return None;
260
- }
261
- let composer = if ready {
262
- String::new()
263
- } else {
264
- std::iter::once(first)
265
- .chain(rows[1..footer].iter().copied())
266
- .collect::<Vec<_>>()
267
- .join("\n")
268
- };
269
- let arrow = text_rows
270
- .iter()
271
- .rposition(|line| line.trim() == "→" || line.trim().starts_with("→ "))?;
272
- Some(InputFrame {
273
- composer,
274
- transcript: text.lines().take(arrow).collect::<Vec<_>>().join("\n"),
275
- identity,
276
- footer: footer_row,
277
- busy,
278
- capsule: capsule.map(str::to_owned),
279
- })
280
- }
281
-
282
213
  fn border(line: &str) -> bool {
283
214
  line.chars().filter(|character| *character == '─').count() >= 8
284
215
  && line.trim_start().starts_with('─')
@@ -400,10 +331,6 @@ mod tests {
400
331
  #![allow(clippy::unwrap_used, clippy::panic)]
401
332
  use super::*;
402
333
 
403
- fn cursor(composer: &str, transcript: &str) -> String {
404
- format!("Cursor Agent\nv2026.10.01-e373342\n{transcript}\n→ {composer}\nGrok 4.7 High Run Everything\n/owned/project\n")
405
- }
406
-
407
334
  fn pi(composer: &str, transcript: &str) -> String {
408
335
  format!("{transcript}\n──────────────── ↑ 20 more ─ runner-luna ─\n{composer}\n────────────────────────\ngpt-6-luna · max · 0%/272k · 0% · $0.00\n")
409
336
  }
@@ -561,160 +488,4 @@ mod tests {
561
488
  assert_eq!(pi_paste_capsule(label), None, "{label}");
562
489
  }
563
490
  }
564
-
565
- // Native Issue #328 current-composer rows; transcript removed and private
566
- // cwd replaced with /owned/project. Startup banner is genuinely absent
567
- // from the owned pane's Tail(200), not a fabricated invalid version.
568
- const CURSOR_FOLLOWUP: &str =
569
- include_str!("../../tests/fixtures/cursor-followup-headerless.txt");
570
-
571
- #[test]
572
- fn native_input_cursor_clean_followup_does_not_require_scrolled_startup_banner() {
573
- let ready = inspect_input(Provider::CursorAgent, CURSOR_FOLLOWUP).unwrap();
574
- assert!(ready.empty());
575
- assert!(!ready.busy);
576
- assert!(ready.capsule.is_none());
577
- let header = format!("Cursor Agent\nv2026.10.14-0f9edde\n{CURSOR_FOLLOWUP}");
578
- let with_header = inspect_input(Provider::CursorAgent, &header).unwrap();
579
- assert!(with_header.empty() && !with_header.busy);
580
- assert_eq!(ready.footer, with_header.footer);
581
- assert_eq!(
582
- ready.identity, with_header.identity,
583
- "startup history is not a new UI identity"
584
- );
585
- }
586
-
587
- #[test]
588
- fn native_input_cursor_headerless_followup_retains_draft_busy_and_footer_fences() {
589
- let label = "[Pasted text #2 +25 lines]";
590
- let folded = CURSOR_FOLLOWUP.replace("Add a follow-up", label);
591
- let draft = inspect_input(Provider::CursorAgent, &folded).unwrap();
592
- assert!(!draft.empty());
593
- assert_eq!(draft.capsule.as_deref(), Some(label));
594
- let dirty = CURSOR_FOLLOWUP.replace("Add a follow-up", "Add a follow-up draft");
595
- assert!(!inspect_input(Provider::CursorAgent, &dirty)
596
- .unwrap()
597
- .empty());
598
- for dirty in [
599
- CURSOR_FOLLOWUP.replace("Add a follow-up", "Add a follow-up\nforeign draft"),
600
- CURSOR_FOLLOWUP.replace("Add a follow-up", &format!("{label}\nforeign draft")),
601
- ] {
602
- assert!(inspect_input(Provider::CursorAgent, &dirty).is_none());
603
- }
604
- let busy = CURSOR_FOLLOWUP.replace("Add a follow-up", "Add a follow-up ctrl+c to stop");
605
- assert!(inspect_input(Provider::CursorAgent, &busy).unwrap().busy);
606
- let working = format!("⠘⠆ Working\n{CURSOR_FOLLOWUP}");
607
- assert!(inspect_input(Provider::CursorAgent, &working).unwrap().busy);
608
- for unknown in [
609
- "→ Add a follow-up\n".to_string(),
610
- CURSOR_FOLLOWUP.replace("Run Everything", "unknown footer"),
611
- CURSOR_FOLLOWUP.replace(" /owned/project\n", ""),
612
- ] {
613
- assert!(inspect_input(Provider::CursorAgent, &unknown).is_none());
614
- }
615
- }
616
-
617
- #[test]
618
- fn native_input_cursor_real_expanded_followup_is_nonempty_current_marker_not_capsule() {
619
- let expanded = include_str!("../../tests/fixtures/cursor-followup-expanded.txt");
620
- let marker = "[team-agent-token:msg_one]";
621
- for prefix in [
622
- "".to_string(),
623
- format!("Cursor Agent\nv2026.10.14-0f9edde\n{CURSOR_FOLLOWUP}"),
624
- ] {
625
- let text = format!("{prefix}{expanded}");
626
- let frame = inspect_input(Provider::CursorAgent, &text).unwrap();
627
- assert!(!frame.empty() && !frame.busy);
628
- assert!(frame.has_marker(marker));
629
- assert!(frame.capsule.is_none());
630
- assert!(!frame.transcript.contains(marker));
631
- let changed = text.replace("/owned/project", "/different/project");
632
- assert_ne!(
633
- frame.identity,
634
- inspect_input(Provider::CursorAgent, &changed)
635
- .unwrap()
636
- .identity
637
- );
638
- }
639
- let duplicate = expanded.replace(marker, &format!("{marker}\n{marker}"));
640
- assert!(!inspect_input(Provider::CursorAgent, &duplicate)
641
- .unwrap()
642
- .has_marker(marker));
643
- let busy = expanded.replace(" →", "⠘⠆ Working\n →");
644
- assert!(inspect_input(Provider::CursorAgent, &busy).unwrap().busy);
645
- for unknown in [
646
- "→\nGrok 4.7 High Run Everything\n/owned/project\n".to_string(),
647
- "→\nforeign draft\n→ Add a follow-up\nGrok 4.7 High Run Everything\n/owned/project\n"
648
- .to_string(),
649
- expanded.replace("Run Everything", "unknown footer"),
650
- expanded.replace(" /owned/project\n", ""),
651
- format!("{expanded}{}", "unknown current row\n".repeat(24)),
652
- ] {
653
- assert!(super::inspect_input(Provider::CursorAgent, &unknown, 24).is_none());
654
- }
655
- }
656
-
657
- #[test]
658
- fn native_input_cursor_requires_composer_in_current_viewport_not_old_history() {
659
- for header in ["", "Cursor Agent\nv2026.10.14-0f9edde\n"] {
660
- let hidden = format!(
661
- "{header}{CURSOR_FOLLOWUP}{}",
662
- "unknown current row\n".repeat(24)
663
- );
664
- assert!(super::inspect_input(Provider::CursorAgent, &hidden, 24).is_none());
665
- }
666
- assert!(super::inspect_input(Provider::CursorAgent, CURSOR_FOLLOWUP, 0).is_none());
667
- let current = super::inspect_input(Provider::CursorAgent, CURSOR_FOLLOWUP, 24).unwrap();
668
- let changed = CURSOR_FOLLOWUP.replace("/owned/project", "/different/project");
669
- let changed = super::inspect_input(Provider::CursorAgent, &changed, 24).unwrap();
670
- assert_ne!(current.identity, changed.identity);
671
- }
672
-
673
- #[test]
674
- fn native_input_cursor_separates_folded_draft_from_history_and_busy() {
675
- let capsule = "[Pasted text #1 +25 lines]";
676
- let draft = inspect_input(Provider::CursorAgent, &cursor(capsule, "")).unwrap();
677
- assert!(!draft.empty());
678
- assert_eq!(draft.capsule.as_deref(), Some(capsule));
679
- let ready = inspect_input(
680
- Provider::CursorAgent,
681
- &cursor("Plan, search, build anything", capsule),
682
- )
683
- .unwrap();
684
- assert!(ready.empty());
685
- assert!(ready.capsule.is_none());
686
- let busy = inspect_input(
687
- Provider::CursorAgent,
688
- &cursor("Add a follow-up ctrl+c to stop", capsule),
689
- )
690
- .unwrap();
691
- assert!(busy.busy);
692
- assert!(
693
- inspect_input(Provider::CursorAgent, &cursor(capsule, "⠘⠆ Working"))
694
- .unwrap()
695
- .busy
696
- );
697
- assert!(inspect_input(Provider::CursorAgent, "→ [Pasted text #1 +25 lines]").is_none());
698
- assert!(inspect_input(
699
- Provider::CursorAgent,
700
- &cursor("Plan, search, build anything\nextra editable text", "")
701
- )
702
- .is_none());
703
- assert!(inspect_input(
704
- Provider::CursorAgent,
705
- &cursor("[Pasted text #1 +25 lines]\nsecond block", "")
706
- )
707
- .is_none());
708
- assert!(inspect_input(
709
- Provider::CursorAgent,
710
- "Cursor Agent\nv2026.10.01-e373342\n→ Run Everything\n"
711
- )
712
- .is_none());
713
- let malformed = inspect_input(
714
- Provider::CursorAgent,
715
- &cursor("[Pasted text #0 +25 lines]", ""),
716
- )
717
- .unwrap();
718
- assert!(malformed.capsule.is_none());
719
- }
720
491
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-agent/installer",
3
- "version": "0.5.124",
3
+ "version": "0.5.126",
4
4
  "description": "npx installer for Team Agent",
5
5
  "keywords": [
6
6
  "codex",
@@ -20,9 +20,9 @@
20
20
  "team-agent-installer": "npm/install.mjs"
21
21
  },
22
22
  "optionalDependencies": {
23
- "@team-agent/cli-darwin-arm64": "0.5.124",
24
- "@team-agent/cli-darwin-x64": "0.5.124",
25
- "@team-agent/cli-linux-x64": "0.5.124"
23
+ "@team-agent/cli-darwin-arm64": "0.5.126",
24
+ "@team-agent/cli-darwin-x64": "0.5.126",
25
+ "@team-agent/cli-linux-x64": "0.5.126"
26
26
  },
27
27
  "scripts": {
28
28
  "postinstall": "node npm/bincheck.mjs",
@@ -19,8 +19,9 @@ Use existing resources rather than establishing accounts. `team-agent doctor --w
19
19
 
20
20
  | Choice | Explain |
21
21
  |---|---|
22
- | Pi | Several model catalogs; an explicit model needs a qualified ID such as `openai-codex/gpt-6-luna` |
23
- | Codex / Claude / other native CLIs | The user's existing workflow, native permissions, model catalog and supported session capabilities |
22
+ | Pi | Several model catalogs; every Pi worker needs an exact qualified model ID such as `openai-codex/gpt-6-luna` from `team-agent models --provider pi`; Pi has no permission prompt to bypass, so keep bypass `false` |
23
+ | Claude | Every Claude worker needs an exact model ID from `team-agent models --provider claude`; existing subscription login only |
24
+ | Codex / other native CLIs | The user's existing workflow, native permissions, model catalog and supported session capabilities |
24
25
  | Bypass `true` | Fewer interruptions, broader automatic authority |
25
26
  | Bypass `false` | Native permissions remain; human confirmation may interrupt unattended work |
26
27
 
@@ -36,11 +37,12 @@ Keep the goal in `TEAM.md` and each worker's instructions in `agents/*.md`. The
36
37
  agents/reviewer.md
37
38
  ```
38
39
 
39
- Record provider and boolean bypass in every new role. This example assumes the user explicitly chose Pi and bypass false; it is not a default:
40
+ Record provider, model and boolean bypass in every new role. This example assumes the user explicitly chose Pi, a model copied from `team-agent models --provider pi`, and bypass false; it is not a default:
40
41
 
41
42
  ```markdown
42
43
  ---
43
44
  provider: pi
45
+ model: openai-codex/gpt-6-luna
44
46
  dangerously_skip_permissions: false
45
47
  ---
46
48
  Review the change and report concrete regression risks.
@@ -88,7 +90,7 @@ With the user's provider/bypass choices, `start` unifies adding an absent seat a
88
90
 
89
91
  ```sh
90
92
  team-agent start auditor --role-file /absolute/path/to/auditor.md
91
- team-agent start analyst --provider pi --bypass false --prompt "Analyze the proposed change"
93
+ team-agent start analyst --provider pi --model openai-codex/gpt-6-luna --bypass false --prompt "Analyze the proposed change"
92
94
  team-agent stop reviewer
93
95
  team-agent start reviewer --effort high --bypass false
94
96
  ```
@@ -113,7 +115,7 @@ team-agent route disable
113
115
 
114
116
  `set` replaces one mapping, `add` appends without deduplication, `clear` removes it; none changes the switch. `enable`/`disable` preserve mappings in `~/.team-agent/argv-routing.json`. `TEAM_AGENT_CLI_ARGV_ROUTING` overrides the switch: `1/true/on`, `0/false/off` (case-insensitive, trimmed); invalid values disable routing. Check `persisted_enabled`, `effective_enabled` and `override_status`.
115
117
 
116
- Keys: `claude`, `codex`, `copilot`, `gemini_cli`, `grok`, `cursor_agent`, `pi`. Claude/Claude Code share `claude`; aliases `claude_code/claude-code`, `agent/cursor` are accepted. Everything after the first `--`, including `--help`, `--json`, empty strings and `{workspace}`, is literal argv. No shell expansion. Do not route secrets or override framework-managed session/MCP/permission flags.
118
+ Keys: `claude`, `codex`, `copilot`, `gemini_cli`, `grok`, `pi`. Claude/Claude Code share `claude`; aliases `claude_code/claude-code` are accepted. Everything after the first `--`, including `--help`, `--json`, empty strings and `{workspace}`, is literal argv. No shell expansion. Do not route secrets or override framework-managed session/MCP/permission flags.
117
119
 
118
120
  Mappings affect the next actual native spawn, not running/attached processes, dry-run or helper probes. Invalid enabled configuration refuses spawn; an emergency environment OFF avoids reading it, while `route disable` will not overwrite a broken file. Pi `--mode rpc` does not provide an RPC host or replace Team Agent's transport.
119
121
 
@@ -490,6 +490,20 @@
490
490
  "owner": "runtime-owner:public-cli",
491
491
  "plan": "Bind this exact documented argv to an isolated HermeticTestEnv result and an assertion/negative-twin pair before promotion. For lifecycle use an authorized owned team and verify scope, identity, outcome and cleanup; help or readonly plans alone do not establish lifecycle coverage."
492
492
  },
493
+ {
494
+ "command": "team-agent models --provider claude",
495
+ "bucket": "declared_gap",
496
+ "covered": false,
497
+ "owner": "runtime-owner:public-cli",
498
+ "plan": "Bind this exact documented argv to an isolated HermeticTestEnv result and an assertion/negative-twin pair before promotion. For lifecycle use an authorized owned team and verify scope, identity, outcome and cleanup; help or readonly plans alone do not establish lifecycle coverage."
499
+ },
500
+ {
501
+ "command": "team-agent models --provider pi",
502
+ "bucket": "declared_gap",
503
+ "covered": false,
504
+ "owner": "runtime-owner:public-cli",
505
+ "plan": "Bind this exact documented argv to an isolated HermeticTestEnv result and an assertion/negative-twin pair before promotion. For lifecycle use an authorized owned team and verify scope, identity, outcome and cleanup; help or readonly plans alone do not establish lifecycle coverage."
506
+ },
493
507
  {
494
508
  "command": "team-agent profile init my-api --auth-mode compatible_api --workspace .",
495
509
  "bucket": "declared_gap",
@@ -596,7 +610,7 @@
596
610
  "plan": "Bind this exact documented argv to an isolated HermeticTestEnv result and an assertion/negative-twin pair before promotion. For lifecycle use an authorized owned team and verify scope, identity, outcome and cleanup; help or readonly plans alone do not establish lifecycle coverage."
597
611
  },
598
612
  {
599
- "command": "team-agent start analyst --provider pi --bypass false --prompt \"Analyze the proposed change\"",
613
+ "command": "team-agent start analyst --provider pi --model openai-codex/gpt-6-luna --bypass false --prompt \"Analyze the proposed change\"",
600
614
  "bucket": "declared_gap",
601
615
  "covered": false,
602
616
  "owner": "runtime-owner:public-cli",
@@ -18,6 +18,8 @@ team-agent agent restart reviewer --session preserve --workspace . --team projec
18
18
  team-agent doctor --workspace . --json
19
19
  team-agent inbox leader --workspace . --team project-team -n 3
20
20
  team-agent models --provider NAME
21
+ team-agent models --provider claude
22
+ team-agent models --provider pi
21
23
  team-agent profile init my-api --auth-mode compatible_api --workspace .
22
24
  team-agent restart reviewer --workspace . --team project-team
23
25
  team-agent route add pi -- --verbose
@@ -33,7 +35,7 @@ team-agent start --from ./my-team --workspace . --team project-team
33
35
  team-agent start --from .team/current --workspace . --team project-team
34
36
  team-agent start --help
35
37
  team-agent start --workspace . --team project-team
36
- team-agent start analyst --provider pi --bypass false --prompt "Analyze the proposed change"
38
+ team-agent start analyst --provider pi --model openai-codex/gpt-6-luna --bypass false --prompt "Analyze the proposed change"
37
39
  team-agent start auditor --role-file /absolute/path/to/auditor.md
38
40
  team-agent start reviewer --effort high --bypass false
39
41
  team-agent start reviewer --effort high --bypass false --workspace . --team project-team
@@ -140,7 +142,7 @@ Creation needs complete configuration; start is not automatic template generatio
140
142
 
141
143
  Do not silently pick provider, model, effort or bypass. False preserves native permissions; it is not a read-only or sandbox guarantee. Use supported `models --provider NAME` discovery and retain exact model IDs.
142
144
 
143
- Traditional minimal Markdown remains accepted by the original compiler. Its compatibility interpretation is **not a default for a new user plan**: provider defaults to Pi, bypass to false, and unset model/effort are left to the provider. Team Agent does not infer a role model from TEAM defaults. Legacy explicit TEAM provider_effort remains supported for non-Pi roles; do not invent an effort for unspecified roles.
145
+ Traditional minimal Markdown remains accepted by the original compiler. Its compatibility interpretation is **not a default for a new user plan**: provider defaults to Pi, bypass to false, and unset effort is left to the provider. Claude and Pi workers run only through their contract leaves, which require an exact model ID from `team-agent models --provider claude|pi`; an unset model is refused, never guessed. Team Agent does not infer a role model from TEAM defaults. Legacy explicit TEAM provider_effort remains supported for non-Pi roles; do not invent an effort for unspecified roles.
144
146
 
145
147
  Supported role metadata:
146
148
  - `agent_id` (legacy `name`) and `role` identify the seat.
@@ -155,7 +157,7 @@ A RoleOnly seat can be registered from its complete role file. A genuinely absen
155
157
 
156
158
  ```sh
157
159
  team-agent start auditor --role-file /absolute/path/to/auditor.md
158
- team-agent start analyst --provider pi --bypass false --prompt "Analyze the proposed change"
160
+ team-agent start analyst --provider pi --model openai-codex/gpt-6-luna --bypass false --prompt "Analyze the proposed change"
159
161
  ```
160
162
 
161
163
  An imported external role goes into this team's `agents/ID.md`; the original stays untouched. A file already at that destination is used in place. Equal file/CLI definitions are accepted; conflicting provider/model/effort/bypass/prompt/profile values refuse before writes/startup. Omitted model, effort, profile and role body remain unchanged.
@@ -18,6 +18,8 @@ team-agent agent restart reviewer --session preserve --workspace . --team projec
18
18
  team-agent doctor --workspace . --json
19
19
  team-agent inbox leader --workspace . --team project-team -n 3
20
20
  team-agent models --provider NAME
21
+ team-agent models --provider claude
22
+ team-agent models --provider pi
21
23
  team-agent profile init my-api --auth-mode compatible_api --workspace .
22
24
  team-agent restart reviewer --workspace . --team project-team
23
25
  team-agent route add pi -- --verbose
@@ -33,7 +35,7 @@ team-agent start --from ./my-team --workspace . --team project-team
33
35
  team-agent start --from .team/current --workspace . --team project-team
34
36
  team-agent start --help
35
37
  team-agent start --workspace . --team project-team
36
- team-agent start analyst --provider pi --bypass false --prompt "Analyze the proposed change"
38
+ team-agent start analyst --provider pi --model openai-codex/gpt-6-luna --bypass false --prompt "Analyze the proposed change"
37
39
  team-agent start auditor --role-file /absolute/path/to/auditor.md
38
40
  team-agent start reviewer --effort high --bypass false
39
41
  team-agent start reviewer --effort high --bypass false --workspace . --team project-team
@@ -140,7 +142,7 @@ Creation needs complete configuration; start is not automatic template generatio
140
142
 
141
143
  Do not silently pick provider, model, effort or bypass. False preserves native permissions; it is not a read-only or sandbox guarantee. Use supported `models --provider NAME` discovery and retain exact model IDs.
142
144
 
143
- Traditional minimal Markdown remains accepted by the original compiler. Its compatibility interpretation is **not a default for a new user plan**: provider defaults to Pi, bypass to false, and unset model/effort are left to the provider. Team Agent does not infer a role model from TEAM defaults. Legacy explicit TEAM provider_effort remains supported for non-Pi roles; do not invent an effort for unspecified roles.
145
+ Traditional minimal Markdown remains accepted by the original compiler. Its compatibility interpretation is **not a default for a new user plan**: provider defaults to Pi, bypass to false, and unset effort is left to the provider. Claude and Pi workers run only through their contract leaves, which require an exact model ID from `team-agent models --provider claude|pi`; an unset model is refused, never guessed. Team Agent does not infer a role model from TEAM defaults. Legacy explicit TEAM provider_effort remains supported for non-Pi roles; do not invent an effort for unspecified roles.
144
146
 
145
147
  Supported role metadata:
146
148
  - `agent_id` (legacy `name`) and `role` identify the seat.
@@ -155,7 +157,7 @@ A RoleOnly seat can be registered from its complete role file. A genuinely absen
155
157
 
156
158
  ```sh
157
159
  team-agent start auditor --role-file /absolute/path/to/auditor.md
158
- team-agent start analyst --provider pi --bypass false --prompt "Analyze the proposed change"
160
+ team-agent start analyst --provider pi --model openai-codex/gpt-6-luna --bypass false --prompt "Analyze the proposed change"
159
161
  ```
160
162
 
161
163
  An imported external role goes into this team's `agents/ID.md`; the original stays untouched. A file already at that destination is used in place. Equal file/CLI definitions are accepted; conflicting provider/model/effort/bypass/prompt/profile values refuse before writes/startup. Omitted model, effort, profile and role body remain unchanged.