@team-agent/installer 0.5.60 → 0.5.62

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 (265) hide show
  1. package/Cargo.lock +1 -1
  2. package/Cargo.toml +1 -1
  3. package/crates/team-agent/src/cli/adapters.rs +49 -3
  4. package/crates/team-agent/src/cli/attach_app_server_leader.rs +1 -0
  5. package/crates/team-agent/src/cli/diagnose.rs +184 -0
  6. package/crates/team-agent/src/cli/emit.rs +104 -21
  7. package/crates/team-agent/src/cli/helpers.rs +1 -0
  8. package/crates/team-agent/src/cli/leader.rs +14 -2
  9. package/crates/team-agent/src/cli/leaders.rs +2 -0
  10. package/crates/team-agent/src/cli/mod.rs +296 -8
  11. package/crates/team-agent/src/cli/named_address.rs +26 -2
  12. package/crates/team-agent/src/cli/profile.rs +2 -1
  13. package/crates/team-agent/src/cli/send/coordinator.rs +1 -0
  14. package/crates/team-agent/src/cli/send/mailbox.rs +3 -0
  15. package/crates/team-agent/src/cli/send/persist.rs +1 -0
  16. package/crates/team-agent/src/cli/send/presentation.rs +3 -0
  17. package/crates/team-agent/src/cli/send/resolve.rs +206 -1
  18. package/crates/team-agent/src/cli/send.rs +2 -1
  19. package/crates/team-agent/src/cli/spec.rs +5 -1
  20. package/crates/team-agent/src/cli/status.rs +2 -1
  21. package/crates/team-agent/src/cli/status_port/compact.rs +1 -0
  22. package/crates/team-agent/src/cli/status_port/format.rs +1 -0
  23. package/crates/team-agent/src/cli/status_port/inbox.rs +1 -0
  24. package/crates/team-agent/src/cli/status_port/store.rs +7 -3
  25. package/crates/team-agent/src/cli/tests/named_address.rs +65 -0
  26. package/crates/team-agent/src/cli/tests/verb_profile.rs +38 -0
  27. package/crates/team-agent/src/cli/types.rs +36 -2
  28. package/crates/team-agent/src/communication_mode/mod.rs +54 -0
  29. package/crates/team-agent/src/compiler/tests.rs +5 -5
  30. package/crates/team-agent/src/compiler.rs +54 -1
  31. package/crates/team-agent/src/conpty/backend.rs +1 -0
  32. package/crates/team-agent/src/conpty/mod.rs +1 -0
  33. package/crates/team-agent/src/coordinator/backoff.rs +5 -8
  34. package/crates/team-agent/src/coordinator/conpty_shim.rs +3 -2
  35. package/crates/team-agent/src/coordinator/health.rs +1 -0
  36. package/crates/team-agent/src/coordinator/mod.rs +2 -2
  37. package/crates/team-agent/src/coordinator/orphan.rs +4 -116
  38. package/crates/team-agent/src/coordinator/runtime_detectors.rs +1 -0
  39. package/crates/team-agent/src/coordinator/runtime_observation.rs +1 -0
  40. package/crates/team-agent/src/coordinator/steps/abnormal.rs +6 -5
  41. package/crates/team-agent/src/coordinator/steps/delivery.rs +1 -0
  42. package/crates/team-agent/src/coordinator/steps/health_sync.rs +1 -0
  43. package/crates/team-agent/src/coordinator/steps/mod.rs +2 -0
  44. package/crates/team-agent/src/coordinator/steps/persist.rs +1 -0
  45. package/crates/team-agent/src/coordinator/steps/runtime_prompts.rs +1 -0
  46. package/crates/team-agent/src/coordinator/steps/session_gate.rs +1 -0
  47. package/crates/team-agent/src/coordinator/tests/abnormal.rs +0 -174
  48. package/crates/team-agent/src/coordinator/tests/api_error_recovery.rs +0 -9
  49. package/crates/team-agent/src/coordinator/tests/basics.rs +0 -184
  50. package/crates/team-agent/src/coordinator/tests/mod.rs +2 -17
  51. package/crates/team-agent/src/coordinator/tests/tick_core.rs +0 -42
  52. package/crates/team-agent/src/coordinator/tick.rs +24 -28
  53. package/crates/team-agent/src/coordinator/types.rs +3 -176
  54. package/crates/team-agent/src/db/agent_health_capture.rs +1 -0
  55. package/crates/team-agent/src/db/message_store.rs +47 -2
  56. package/crates/team-agent/src/db/migration.rs +5 -4
  57. package/crates/team-agent/src/db/mod.rs +1 -0
  58. package/crates/team-agent/src/db/schema.rs +1 -0
  59. package/crates/team-agent/src/diagnose/comms.rs +2 -1
  60. package/crates/team-agent/src/diagnose/mod.rs +1 -0
  61. package/crates/team-agent/src/diagnose/orphans.rs +1 -0
  62. package/crates/team-agent/src/fake_worker.rs +21 -1
  63. package/crates/team-agent/src/layout/manager.rs +3 -7
  64. package/crates/team-agent/src/layout/mod.rs +2 -2
  65. package/crates/team-agent/src/layout/overlay.rs +6 -1
  66. package/crates/team-agent/src/layout/placement.rs +1 -0
  67. package/crates/team-agent/src/layout/recovery.rs +3 -0
  68. package/crates/team-agent/src/layout/runtime_sessions.rs +8 -3
  69. package/crates/team-agent/src/layout/sessions.rs +8 -1
  70. package/crates/team-agent/src/layout/tmux_endpoint.rs +3 -0
  71. package/crates/team-agent/src/layout/worker_env.rs +3 -0
  72. package/crates/team-agent/src/layout/worker_window_helpers.rs +2 -0
  73. package/crates/team-agent/src/leader/helpers.rs +1 -0
  74. package/crates/team-agent/src/leader/incident.rs +1 -0
  75. package/crates/team-agent/src/leader/lease.rs +27 -22
  76. package/crates/team-agent/src/leader/mod.rs +2 -3
  77. package/crates/team-agent/src/leader/owner_bind.rs +13 -3
  78. package/crates/team-agent/src/leader/provider_attribution.rs +1 -0
  79. package/crates/team-agent/src/leader/rediscover.rs +4 -17
  80. package/crates/team-agent/src/leader/registry.rs +3 -15
  81. package/crates/team-agent/src/leader/start.rs +1072 -186
  82. package/crates/team-agent/src/leader/takeover.rs +10 -232
  83. package/crates/team-agent/src/leader/tests/claim_leader_mailbox_flush_contract.rs +544 -0
  84. package/crates/team-agent/src/leader/tests/historical_inventory_upgrade_gate_red.rs +624 -0
  85. package/crates/team-agent/src/leader/tests/identity.rs +71 -59
  86. package/crates/team-agent/src/leader/tests/identity_session_names.rs +42 -0
  87. package/crates/team-agent/src/leader/tests/idle.rs +0 -193
  88. package/crates/team-agent/src/leader/tests/lease_api.rs +0 -45
  89. package/crates/team-agent/src/leader/tests/mod.rs +4 -41
  90. package/crates/team-agent/src/leader/tests/rehomed_env.rs +83 -0
  91. package/crates/team-agent/src/leader/tests/team_in_team_state_scope_red.rs +1273 -0
  92. package/crates/team-agent/src/leader/tests/terminal_and_replay_vs_rerender_invariants_red.rs +417 -0
  93. package/crates/team-agent/src/leader/tests/wake_start_owner.rs +22 -103
  94. package/crates/team-agent/src/leader/types.rs +1 -28
  95. package/crates/team-agent/src/lib.rs +7 -0
  96. package/crates/team-agent/src/lifecycle/display.rs +7 -1
  97. package/crates/team-agent/src/lifecycle/helpers.rs +3 -1
  98. package/crates/team-agent/src/lifecycle/launch/add_agent.rs +2 -2
  99. package/crates/team-agent/src/lifecycle/launch/fork_agent/completion.rs +1 -0
  100. package/crates/team-agent/src/lifecycle/launch/fork_agent.rs +1 -1
  101. package/crates/team-agent/src/lifecycle/launch/fork_entry.rs +1 -0
  102. package/crates/team-agent/src/lifecycle/launch/fork_finalize.rs +1 -0
  103. package/crates/team-agent/src/lifecycle/launch/plan.rs +2 -2
  104. package/crates/team-agent/src/lifecycle/launch/quick_start.rs +4 -26
  105. package/crates/team-agent/src/lifecycle/launch/readiness.rs +0 -27
  106. package/crates/team-agent/src/lifecycle/launch/spawn.rs +2 -28
  107. package/crates/team-agent/src/lifecycle/launch/spec_state.rs +4 -32
  108. package/crates/team-agent/src/lifecycle/launch/state_projection.rs +1 -0
  109. package/crates/team-agent/src/lifecycle/launch.rs +11 -12
  110. package/crates/team-agent/src/lifecycle/mod.rs +2 -1
  111. package/crates/team-agent/src/lifecycle/restart/agent.rs +4 -4
  112. package/crates/team-agent/src/lifecycle/restart/common.rs +1 -1
  113. package/crates/team-agent/src/lifecycle/restart/orchestrator.rs +2 -2
  114. package/crates/team-agent/src/lifecycle/restart/rebuild.rs +13 -5
  115. package/crates/team-agent/src/lifecycle/restart/remove.rs +1 -1
  116. package/crates/team-agent/src/lifecycle/restart/selection.rs +3 -3
  117. package/crates/team-agent/src/lifecycle/restart.rs +13 -11
  118. package/crates/team-agent/src/lifecycle/tests/acceptance_b_batch_red.rs +1007 -0
  119. package/crates/team-agent/src/lifecycle/tests/b0_legacy_snapshot_nonauthority_contract.rs +265 -0
  120. package/crates/team-agent/src/lifecycle/tests/b0_reader_hideone_audit_contract.rs +459 -0
  121. package/crates/team-agent/src/lifecycle/tests/behavioral_diff_264_red.rs +849 -0
  122. package/crates/team-agent/src/lifecycle/tests/claude_compatible_config_red.rs +323 -0
  123. package/crates/team-agent/src/lifecycle/tests/claude_profile_launch_red.rs +423 -0
  124. package/crates/team-agent/src/lifecycle/tests/clone_fork_copilot_perms_red.rs +737 -0
  125. package/crates/team-agent/src/lifecycle/tests/codex_mcp_approval_inheritance_red.rs +1187 -0
  126. package/crates/team-agent/src/lifecycle/tests/codex_weak_window_attribution_red.rs +683 -0
  127. package/crates/team-agent/src/lifecycle/tests/communication_mode_runtime_contract_red.rs +394 -0
  128. package/crates/team-agent/src/lifecycle/tests/copilot_provider_red.rs +1856 -0
  129. package/crates/team-agent/src/lifecycle/tests/core_034_real_red.rs +917 -0
  130. package/crates/team-agent/src/lifecycle/tests/display_adaptive_red.rs +481 -0
  131. package/crates/team-agent/src/lifecycle/tests/f032_startup_prompt_best_effort_red.rs +301 -0
  132. package/crates/team-agent/src/lifecycle/tests/harvest2_a_batch_red.rs +516 -0
  133. package/crates/team-agent/src/lifecycle/tests/host_cotenant_death_p0_contract.rs +986 -0
  134. package/crates/team-agent/src/lifecycle/tests/lifecycle_rollback_red.rs +651 -0
  135. package/crates/team-agent/src/lifecycle/tests/main_preserved.rs +2 -0
  136. package/crates/team-agent/src/lifecycle/tests/quick_start_worker_readiness_red.rs +332 -0
  137. package/crates/team-agent/src/lifecycle/tests/realmachine_clusters_1_6_red.rs +846 -0
  138. package/crates/team-agent/src/lifecycle/tests/realmachine_residual_g1_g4_red.rs +648 -0
  139. package/crates/team-agent/src/lifecycle/tests/restart_build_before_destroy_0540_contract.rs +910 -0
  140. package/crates/team-agent/src/lifecycle/tests/restart_liveness_red.rs +630 -0
  141. package/crates/team-agent/src/lifecycle/tests/restart_rebind_hotfix_252_red.rs +1083 -0
  142. package/crates/team-agent/src/lifecycle/tests/restart_session_capture_red.rs +1677 -0
  143. package/crates/team-agent/src/lifecycle/tests/resume_recover_red.rs +410 -0
  144. package/crates/team-agent/src/lifecycle/tests/stale_team_saveconflict_contract.rs +428 -0
  145. package/crates/team-agent/src/lifecycle/tests/startup_latency_contract.rs +1032 -0
  146. package/crates/team-agent/src/lifecycle/tests/status_credential_redaction_contract.rs +869 -0
  147. package/crates/team-agent/src/lifecycle/tests/subprep_codex_trust_roundtrip_red.rs +1249 -0
  148. package/crates/team-agent/src/lifecycle/tests/swallow_batch4_semantics_red.rs +342 -0
  149. package/crates/team-agent/src/lifecycle/tests/team_in_team_identity_scope_red.rs +542 -0
  150. package/crates/team-agent/src/lifecycle/tests/team_in_team_sibling_quick_start_red.rs +1103 -0
  151. package/crates/team-agent/src/lifecycle/tests/team_in_team_state_scope_red.rs +1276 -0
  152. package/crates/team-agent/src/lifecycle/tests/team_key_retirement_roster_red.rs +145 -0
  153. package/crates/team-agent/src/lifecycle/tests/team_key_retirement_txn_red.rs +603 -0
  154. package/crates/team-agent/src/lifecycle/tests/test_isolation_escape_contract.rs +837 -0
  155. package/crates/team-agent/src/lifecycle/tests/upgrade_compat_0211_red.rs +928 -0
  156. package/crates/team-agent/src/lifecycle/tests/verify_rs031_window_consistency_red.rs +951 -0
  157. package/crates/team-agent/src/lifecycle/tests/worker_dangerous_bypass_argv_red.rs +327 -0
  158. package/crates/team-agent/src/lifecycle/tests/worker_spawn_env_red.rs +760 -0
  159. package/crates/team-agent/src/lifecycle/tests.rs +59 -0
  160. package/crates/team-agent/src/lifecycle/types.rs +0 -9
  161. package/crates/team-agent/src/lifecycle/worker_command_context.rs +29 -11
  162. package/crates/team-agent/src/mcp_server/helpers.rs +1 -0
  163. package/crates/team-agent/src/mcp_server/lifecycle_tools/mod.rs +1 -0
  164. package/crates/team-agent/src/mcp_server/lifecycle_tools/state_status.rs +1 -0
  165. package/crates/team-agent/src/mcp_server/mod.rs +1 -0
  166. package/crates/team-agent/src/mcp_server/normalize.rs +5 -3
  167. package/crates/team-agent/src/mcp_server/tests/send.rs +26 -0
  168. package/crates/team-agent/src/mcp_server/tests/wire.rs +1 -1
  169. package/crates/team-agent/src/mcp_server/tools.rs +101 -66
  170. package/crates/team-agent/src/mcp_server/types.rs +6 -18
  171. package/crates/team-agent/src/mcp_server/wire.rs +32 -26
  172. package/crates/team-agent/src/messaging/activity.rs +1 -0
  173. package/crates/team-agent/src/messaging/address.rs +1 -0
  174. package/crates/team-agent/src/messaging/delivery.rs +109 -41
  175. package/crates/team-agent/src/messaging/helpers.rs +2 -1
  176. package/crates/team-agent/src/messaging/leader_channel.rs +34 -10
  177. package/crates/team-agent/src/messaging/leader_receiver.rs +42 -24
  178. package/crates/team-agent/src/messaging/mod.rs +10 -14
  179. package/crates/team-agent/src/messaging/peers.rs +2 -0
  180. package/crates/team-agent/src/messaging/persist.rs +3 -1
  181. package/crates/team-agent/src/messaging/presentation.rs +111 -1
  182. package/crates/team-agent/src/messaging/results.rs +166 -17
  183. package/crates/team-agent/src/messaging/scheduler.rs +1 -0
  184. package/crates/team-agent/src/messaging/selftest.rs +1 -1
  185. package/crates/team-agent/src/messaging/send.rs +135 -89
  186. package/crates/team-agent/src/messaging/tests/leader_channel.rs +6 -6
  187. package/crates/team-agent/src/messaging/tests/leader_inject_acceptance.rs +187 -0
  188. package/crates/team-agent/src/messaging/tests/mod.rs +5 -0
  189. package/crates/team-agent/src/messaging/tests/runtime.rs +13 -6
  190. package/crates/team-agent/src/messaging/types.rs +7 -2
  191. package/crates/team-agent/src/messaging/watchers.rs +24 -13
  192. package/crates/team-agent/src/model/enums.rs +1 -0
  193. package/crates/team-agent/src/model/errors.rs +1 -0
  194. package/crates/team-agent/src/model/ids.rs +1 -0
  195. package/crates/team-agent/src/model/mod.rs +2 -0
  196. package/crates/team-agent/src/model/name_similarity.rs +1 -0
  197. package/crates/team-agent/src/model/pane_authority_refusal.rs +359 -0
  198. package/crates/team-agent/src/model/paths.rs +1 -0
  199. package/crates/team-agent/src/model/permissions.rs +3 -2
  200. package/crates/team-agent/src/model/routing.rs +1 -0
  201. package/crates/team-agent/src/model/spec.rs +17 -0
  202. package/crates/team-agent/src/model/task_graph.rs +1 -0
  203. package/crates/team-agent/src/model/yaml/tests.rs +1 -0
  204. package/crates/team-agent/src/model/yaml.rs +1 -0
  205. package/crates/team-agent/src/packaging/install.rs +9 -147
  206. package/crates/team-agent/src/packaging/migrate.rs +2 -0
  207. package/crates/team-agent/src/packaging/mod.rs +1 -0
  208. package/crates/team-agent/src/packaging/repair.rs +2 -0
  209. package/crates/team-agent/src/packaging/tests.rs +29 -218
  210. package/crates/team-agent/src/packaging/types.rs +8 -15
  211. package/crates/team-agent/src/platform/argv.rs +4 -0
  212. package/crates/team-agent/src/platform/errors.rs +10 -1
  213. package/crates/team-agent/src/platform/file_lock.rs +4 -157
  214. package/crates/team-agent/src/platform/mod.rs +0 -61
  215. package/crates/team-agent/src/platform/process.rs +1 -0
  216. package/crates/team-agent/src/provider/adapter.rs +1 -0
  217. package/crates/team-agent/src/provider/adapters/claude.rs +1 -0
  218. package/crates/team-agent/src/provider/adapters/claude_fork.rs +1 -0
  219. package/crates/team-agent/src/provider/adapters/codex.rs +1 -0
  220. package/crates/team-agent/src/provider/adapters/copilot.rs +1 -0
  221. package/crates/team-agent/src/provider/adapters/copilot_fork.rs +1 -0
  222. package/crates/team-agent/src/provider/adapters/fake.rs +1 -0
  223. package/crates/team-agent/src/provider/adapters/mod.rs +1 -0
  224. package/crates/team-agent/src/provider/approvals/mod.rs +1 -0
  225. package/crates/team-agent/src/provider/approvals/parsing.rs +2 -5
  226. package/crates/team-agent/src/provider/approvals/runtime_prompts.rs +6 -5
  227. package/crates/team-agent/src/provider/classify.rs +1 -0
  228. package/crates/team-agent/src/provider/faults.rs +1 -26
  229. package/crates/team-agent/src/provider/helpers.rs +1 -0
  230. package/crates/team-agent/src/provider/mod.rs +1 -1
  231. package/crates/team-agent/src/provider/session/capture.rs +41 -22
  232. package/crates/team-agent/src/provider/session/context_fork/claude.rs +1 -0
  233. package/crates/team-agent/src/provider/session/context_fork/codex.rs +1 -0
  234. package/crates/team-agent/src/provider/session/context_fork/outcome.rs +1 -0
  235. package/crates/team-agent/src/provider/session/context_fork.rs +1 -0
  236. package/crates/team-agent/src/provider/session/mod.rs +2 -4
  237. package/crates/team-agent/src/provider/session/resume.rs +2 -209
  238. package/crates/team-agent/src/provider/session_scan/claude.rs +93 -3
  239. package/crates/team-agent/src/provider/session_scan/codex.rs +1 -0
  240. package/crates/team-agent/src/provider/session_scan/common.rs +24 -7
  241. package/crates/team-agent/src/provider/session_scan/copilot.rs +1 -0
  242. package/crates/team-agent/src/provider/session_scan.rs +6 -42
  243. package/crates/team-agent/src/provider/startup_prompt.rs +1 -0
  244. package/crates/team-agent/src/provider/types.rs +1 -0
  245. package/crates/team-agent/src/provider/wire.rs +1 -0
  246. package/crates/team-agent/src/state/identity.rs +16 -5
  247. package/crates/team-agent/src/state/identity_keys.rs +1 -0
  248. package/crates/team-agent/src/state/mod.rs +2 -0
  249. package/crates/team-agent/src/state/owner_gate.rs +5 -0
  250. package/crates/team-agent/src/state/ownership.rs +10 -4
  251. package/crates/team-agent/src/state/paths.rs +12 -0
  252. package/crates/team-agent/src/state/persist.rs +9 -3
  253. package/crates/team-agent/src/state/projection.rs +15 -2
  254. package/crates/team-agent/src/state/repository/intent.rs +1 -0
  255. package/crates/team-agent/src/state/repository/tests.rs +1 -0
  256. package/crates/team-agent/src/state/repository.rs +7 -0
  257. package/crates/team-agent/src/state/selector.rs +1 -0
  258. package/crates/team-agent/src/tmux_backend/tests.rs +39 -0
  259. package/crates/team-agent/src/tmux_backend.rs +63 -0
  260. package/crates/team-agent/src/topology.rs +3 -0
  261. package/crates/team-agent/src/transport.rs +15 -0
  262. package/package.json +4 -4
  263. package/skills/team-agent/command-coverage.json +379 -0
  264. package/crates/team-agent/src/leader/inject.rs +0 -33
  265. package/crates/team-agent/src/provider/command.rs +0 -80
@@ -0,0 +1,379 @@
1
+ {
2
+ "schema_version": "team-agent-skill-command-coverage-v3",
3
+ "commands": [
4
+ {
5
+ "command": "team-agent add-agent <agent> --role-file <file>",
6
+ "bucket": "declared_gap",
7
+ "covered": false,
8
+ "owner": "runtime-owner:lifecycle",
9
+ "plan": "Execute the documented argv in an isolated add-agent fixture and bind assertions to the CLI result and created roster/window."
10
+ },
11
+ {
12
+ "command": "team-agent add-agent reviewer --role-file .team/current/agents/reviewer.md --workspace .",
13
+ "bucket": "declared_gap",
14
+ "covered": false,
15
+ "owner": "runtime-owner:lifecycle",
16
+ "plan": "Execute the exact reviewer argv in an isolated fixture and assert the reviewer state, role provenance, and worker window."
17
+ },
18
+ {
19
+ "command": "team-agent approvals",
20
+ "bucket": "declared_gap",
21
+ "covered": false,
22
+ "owner": "runtime-owner:approvals",
23
+ "plan": "Execute the default approvals view and bind assertions to its exit and approval-list output."
24
+ },
25
+ {
26
+ "command": "team-agent approvals <agent_id>",
27
+ "bucket": "declared_gap",
28
+ "covered": false,
29
+ "owner": "runtime-owner:approvals",
30
+ "plan": "Execute a representative agent_id filter and assert the bound CLI result contains only that agent's approvals."
31
+ },
32
+ {
33
+ "command": "team-agent approvals [coder]",
34
+ "bucket": "declared_gap",
35
+ "covered": false,
36
+ "owner": "runtime-owner:approvals",
37
+ "plan": "Execute the literal coder representative and assert the bound CLI result's target-filter behavior."
38
+ },
39
+ {
40
+ "command": "team-agent attach-leader",
41
+ "bucket": "declared_gap",
42
+ "covered": false,
43
+ "owner": "runtime-owner:leader-channel",
44
+ "plan": "Execute in a hermetic caller-pane fixture and bind assertions to either the persisted receiver binding or the precise zero-write refusal."
45
+ },
46
+ {
47
+ "command": "team-agent claim-leader",
48
+ "bucket": "declared_gap",
49
+ "covered": false,
50
+ "owner": "runtime-owner:leader-channel",
51
+ "plan": "Execute in a hermetic leader fixture and bind assertions to owner/receiver persistence or a precise zero-write refusal."
52
+ },
53
+ {
54
+ "command": "team-agent claude",
55
+ "bucket": "declared_gap",
56
+ "covered": false,
57
+ "owner": "runtime-owner:provider-launcher",
58
+ "plan": "Use a per-call hermetic PATH shim for claude, then assert the shim's exact provider argv log and the bound CLI exit/output."
59
+ },
60
+ {
61
+ "command": "team-agent clone-agent <source> --as <new>",
62
+ "bucket": "declared_gap",
63
+ "covered": false,
64
+ "owner": "runtime-owner:provider-lifecycle",
65
+ "plan": "Use an isolated provider/session fixture or authorized subscription gate and bind assertions to clone success or its exact rollback refusal."
66
+ },
67
+ {
68
+ "command": "team-agent codex",
69
+ "bucket": "declared_gap",
70
+ "covered": false,
71
+ "owner": "runtime-owner:provider-launcher",
72
+ "plan": "Use a per-call hermetic PATH shim for codex, then assert the shim's exact provider argv log and the bound CLI exit/output."
73
+ },
74
+ {
75
+ "command": "team-agent codex --dangerously-bypass-approvals-and-sandbox",
76
+ "bucket": "declared_gap",
77
+ "covered": false,
78
+ "owner": "runtime-owner:provider-launcher",
79
+ "plan": "Use a per-call hermetic codex PATH shim and assert the exact dangerous flag argv log plus the bound CLI exit/output without invoking a real provider."
80
+ },
81
+ {
82
+ "command": "team-agent collect",
83
+ "bucket": "declared_gap",
84
+ "covered": false,
85
+ "owner": "runtime-owner:results",
86
+ "plan": "Execute the exact human collect argv after a worker result and bind assertions to presentation and consumption of that same result."
87
+ },
88
+ {
89
+ "command": "team-agent doctor",
90
+ "bucket": "declared_gap",
91
+ "covered": false,
92
+ "owner": "runtime-owner:diagnostics",
93
+ "plan": "Execute the exact human doctor argv and bind assertions to its exit and key diagnostic checks."
94
+ },
95
+ {
96
+ "command": "team-agent fork-agent <source> --as <new>",
97
+ "bucket": "declared_gap",
98
+ "covered": false,
99
+ "owner": "runtime-owner:provider-lifecycle",
100
+ "plan": "Use an isolated provider/session fixture or authorized subscription gate and bind assertions to fork success or its exact rollback refusal."
101
+ },
102
+ {
103
+ "command": "team-agent inbox",
104
+ "bucket": "declared_gap",
105
+ "covered": false,
106
+ "owner": "runtime-owner:messaging",
107
+ "plan": "Execute the exact default inbox argv and bind assertions to its selected recipient and message or empty-state output."
108
+ },
109
+ {
110
+ "command": "team-agent inbox coder",
111
+ "bucket": "declared_gap",
112
+ "covered": false,
113
+ "owner": "runtime-owner:messaging",
114
+ "plan": "Execute the exact coder inbox argv and bind assertions to recipient filtering and delivery fields."
115
+ },
116
+ {
117
+ "command": "team-agent profile doctor <name> --workspace . --json",
118
+ "bucket": "declared_gap",
119
+ "covered": false,
120
+ "owner": "runtime-owner:profiles",
121
+ "plan": "Execute a representative local profile doctor argv and bind assertions to its JSON validation result and write isolation."
122
+ },
123
+ {
124
+ "command": "team-agent profile init <name> --auth-mode subscription --workspace .",
125
+ "bucket": "declared_gap",
126
+ "covered": false,
127
+ "owner": "runtime-owner:profiles",
128
+ "plan": "Execute a representative local profile init and assert the bound result plus persisted profile identity and subscription auth mode."
129
+ },
130
+ {
131
+ "command": "team-agent profile init claude-default --auth-mode subscription --workspace .",
132
+ "bucket": "declared_gap",
133
+ "covered": false,
134
+ "owner": "runtime-owner:profiles",
135
+ "plan": "Execute the exact local init argv and assert the bound result plus claude-default subscription profile fields without launching Claude."
136
+ },
137
+ {
138
+ "command": "team-agent profile init codex-default --auth-mode subscription --workspace .",
139
+ "bucket": "declared_gap",
140
+ "covered": false,
141
+ "owner": "runtime-owner:profiles",
142
+ "plan": "Execute the exact local init argv and assert the bound result plus codex-default subscription profile fields without launching Codex."
143
+ },
144
+ {
145
+ "command": "team-agent profile init deepseek --auth-mode compatible_api --workspace .",
146
+ "bucket": "declared_gap",
147
+ "covered": false,
148
+ "owner": "runtime-owner:profiles",
149
+ "plan": "Execute the exact local init argv and assert the bound result plus compatible_api profile schema without network access."
150
+ },
151
+ {
152
+ "command": "team-agent profile show <name> --workspace . --json",
153
+ "bucket": "declared_gap",
154
+ "covered": false,
155
+ "owner": "runtime-owner:profiles",
156
+ "plan": "Show a profile created in the same fixture and bind field-by-field round-trip assertions to the CLI result."
157
+ },
158
+ {
159
+ "command": "team-agent profile show deepseek --workspace . --json",
160
+ "bucket": "declared_gap",
161
+ "covered": false,
162
+ "owner": "runtime-owner:profiles",
163
+ "plan": "Show the isolated deepseek profile and bind exact identity/auth-mode assertions to the CLI result."
164
+ },
165
+ {
166
+ "command": "team-agent quick-start",
167
+ "bucket": "declared_gap",
168
+ "covered": false,
169
+ "owner": "runtime-owner:lifecycle",
170
+ "plan": "Execute the exact argv from a hermetic project root and bind assertions to canonical runtime, team, and session identity."
171
+ },
172
+ {
173
+ "command": "team-agent quick-start ./roles --team-id alpha",
174
+ "bucket": "declared_gap",
175
+ "covered": false,
176
+ "owner": "runtime-owner:lifecycle",
177
+ "plan": "Execute against an isolated legacy roles fixture and bind assertions to the alpha team identity and unique runtime."
178
+ },
179
+ {
180
+ "command": "team-agent quick-start .team/alpha",
181
+ "bucket": "declared_gap",
182
+ "covered": false,
183
+ "owner": "runtime-owner:lifecycle",
184
+ "plan": "Execute against an isolated team directory and bind assertions proving the directory literal cannot split canonical team identity."
185
+ },
186
+ {
187
+ "command": "team-agent quick-start .team/current",
188
+ "bucket": "covered",
189
+ "cases": ["lnch_001_quick_start_basic"],
190
+ "evidence": {
191
+ "case": "lnch_001_quick_start_basic",
192
+ "source_file": "crates/team-agent/tests/e2e/cases/lnch_001_quick_start_basic.rs",
193
+ "invocation": {
194
+ "runner": "run_ta",
195
+ "line": 30,
196
+ "documented_argv": ["team-agent", "quick-start", ".team/current"],
197
+ "literal_argv": ["quick-start", ".team/current"]
198
+ },
199
+ "binding": {
200
+ "name": "out",
201
+ "line": 30
202
+ },
203
+ "assertion": {
204
+ "macro_name": "assert",
205
+ "line": 41,
206
+ "operand": "condition",
207
+ "behavior_fact": "stdout",
208
+ "failure_marker": "quick-start did not launch the team"
209
+ },
210
+ "negative_twin": {
211
+ "env_key": "TEAM_AGENT_COVERAGE_NEGATIVE_TWIN",
212
+ "env_value": "quick-start-status",
213
+ "operation": "remove_text_literal",
214
+ "remove_literal": "status: leader_receiver_unbound",
215
+ "replacement": "negative_twin_removed"
216
+ }
217
+ }
218
+ },
219
+ {
220
+ "command": "team-agent quick-start <dir>",
221
+ "bucket": "covered",
222
+ "cases": ["lnch_001_quick_start_basic"],
223
+ "evidence": {
224
+ "case": "lnch_001_quick_start_basic",
225
+ "source_file": "crates/team-agent/tests/e2e/cases/lnch_001_quick_start_basic.rs",
226
+ "invocation": {
227
+ "runner": "run_ta",
228
+ "line": 30,
229
+ "documented_argv": ["team-agent", "quick-start", "<dir>"],
230
+ "literal_argv": ["quick-start", ".team/current"]
231
+ },
232
+ "binding": {
233
+ "name": "out",
234
+ "line": 30
235
+ },
236
+ "assertion": {
237
+ "macro_name": "assert",
238
+ "line": 69,
239
+ "operand": "condition",
240
+ "behavior_fact": "stdout",
241
+ "failure_marker": "public output must expose the canonical session name"
242
+ },
243
+ "negative_twin": {
244
+ "env_key": "TEAM_AGENT_COVERAGE_NEGATIVE_TWIN",
245
+ "env_value": "quick-start-session-name",
246
+ "operation": "remove_text_literal",
247
+ "remove_literal": "session_name: ",
248
+ "replacement": "negative_twin_removed"
249
+ }
250
+ }
251
+ },
252
+ {
253
+ "command": "team-agent remove-agent <agent> --workspace . --confirm",
254
+ "bucket": "declared_gap",
255
+ "covered": false,
256
+ "owner": "runtime-owner:lifecycle",
257
+ "plan": "Execute the exact argv in a dedicated hermetic lifecycle fixture and bind assertions to roster/window removal and sibling preservation."
258
+ },
259
+ {
260
+ "command": "team-agent reset-agent <agent> --discard-session",
261
+ "bucket": "declared_gap",
262
+ "covered": false,
263
+ "owner": "runtime-owner:lifecycle",
264
+ "plan": "Execute the exact argv in a dedicated hermetic fixture and bind assertions to session discard and worker state."
265
+ },
266
+ {
267
+ "command": "team-agent restart",
268
+ "bucket": "declared_gap",
269
+ "covered": false,
270
+ "owner": "runtime-owner:restart",
271
+ "plan": "Execute from an isolated single-team cwd and bind assertions to the restarted session and roster."
272
+ },
273
+ {
274
+ "command": "team-agent restart .",
275
+ "bucket": "declared_gap",
276
+ "covered": false,
277
+ "owner": "runtime-owner:restart",
278
+ "plan": "Execute the exact argv including final dot and bind assertions to canonical team selection and restart outcome."
279
+ },
280
+ {
281
+ "command": "team-agent restart . --allow-fresh",
282
+ "bucket": "declared_gap",
283
+ "covered": false,
284
+ "owner": "runtime-owner:restart",
285
+ "plan": "Execute in a dedicated hermetic rebuild fixture and bind assertions to the new session, agent state, and allow-fresh audit."
286
+ },
287
+ {
288
+ "command": "team-agent restart . --team <session_name_or_team_name>",
289
+ "bucket": "declared_gap",
290
+ "covered": false,
291
+ "owner": "runtime-owner:restart",
292
+ "plan": "Execute a representative team selector and bind assertions to selected-team restart and sibling preservation."
293
+ },
294
+ {
295
+ "command": "team-agent send --task task_initial \"Start\"",
296
+ "bucket": "declared_gap",
297
+ "covered": false,
298
+ "owner": "runtime-owner:messaging",
299
+ "plan": "Execute the exact task argv in an isolated task fixture and bind assertions to task/message attribution and durable row state."
300
+ },
301
+ {
302
+ "command": "team-agent send --watch-result",
303
+ "bucket": "declared_gap",
304
+ "covered": false,
305
+ "owner": "runtime-owner:messaging",
306
+ "plan": "Execute the exact incomplete argv and bind assertions to its nonzero usage error and zero message/result writes."
307
+ },
308
+ {
309
+ "command": "team-agent send --watch-result coder \"Do the bounded task\"",
310
+ "bucket": "declared_gap",
311
+ "covered": false,
312
+ "owner": "runtime-owner:messaging",
313
+ "plan": "Execute the exact argv in an isolated coder fixture and bind assertions to blocked-before-watch or the same-message result closure."
314
+ },
315
+ {
316
+ "command": "team-agent send reviewer \"Review this change\"",
317
+ "bucket": "declared_gap",
318
+ "covered": false,
319
+ "owner": "runtime-owner:messaging",
320
+ "plan": "Execute the exact argv against a fake reviewer and bind recipient, delivered, original result, and collect assertions."
321
+ },
322
+ {
323
+ "command": "team-agent shutdown --workspace . --keep-logs",
324
+ "bucket": "declared_gap",
325
+ "covered": false,
326
+ "owner": "runtime-owner:shutdown",
327
+ "plan": "Execute the exact argv only in a dedicated hermetic fixture and bind assertions to scoped session removal, kept logs, and sibling preservation."
328
+ },
329
+ {
330
+ "command": "team-agent start-agent <agent>",
331
+ "bucket": "declared_gap",
332
+ "covered": false,
333
+ "owner": "runtime-owner:lifecycle",
334
+ "plan": "Execute a representative exact argv for a stopped fake agent and bind assertions to status, pane, and window creation."
335
+ },
336
+ {
337
+ "command": "team-agent start-agent <agent_id> --workspace .",
338
+ "bucket": "declared_gap",
339
+ "covered": false,
340
+ "owner": "runtime-owner:lifecycle",
341
+ "plan": "Execute a representative exact workspace-dot argv and bind assertions to the same agent's lifecycle result."
342
+ },
343
+ {
344
+ "command": "team-agent start-agent coder --workspace .",
345
+ "bucket": "declared_gap",
346
+ "covered": false,
347
+ "owner": "runtime-owner:lifecycle",
348
+ "plan": "Execute in an isolated coder fixture and bind assertions that the selected coder, not a sibling namesake, starts."
349
+ },
350
+ {
351
+ "command": "team-agent status",
352
+ "bucket": "declared_gap",
353
+ "covered": false,
354
+ "owner": "runtime-owner:status",
355
+ "plan": "Execute the exact human status argv and bind assertions to selected team and agent output."
356
+ },
357
+ {
358
+ "command": "team-agent status --detail --json",
359
+ "bucket": "declared_gap",
360
+ "covered": false,
361
+ "owner": "runtime-owner:status",
362
+ "plan": "Execute the exact argv and bind assertions to detail-only coordinator, readiness, and tmux fields."
363
+ },
364
+ {
365
+ "command": "team-agent status --json",
366
+ "bucket": "declared_gap",
367
+ "covered": false,
368
+ "owner": "runtime-owner:status",
369
+ "plan": "Execute the exact argv and bind assertions to the compact status schema and absence of detail-only fields."
370
+ },
371
+ {
372
+ "command": "team-agent status coder",
373
+ "bucket": "declared_gap",
374
+ "covered": false,
375
+ "owner": "runtime-owner:status",
376
+ "plan": "Execute the exact coder status argv and bind assertions to coder-only presentation without sibling leakage."
377
+ }
378
+ ]
379
+ }
@@ -1,33 +0,0 @@
1
- //! leader::inject — `push_idle_reminder` no-op shim.
2
- //!
3
- //! #236 nag_removal (N35): the framework no longer auto-pings the leader pane based on
4
- //! idle-classification inferences. `push_idle_reminder` used to emit the
5
- //! `idle_takeover.reminder` event AND route a "leader takeover may be appropriate"
6
- //! message through the N31/N32 funnel; both were nag outputs synthesized from
7
- //! time/state, not from a real delivery obligation. They are deleted by design —
8
- //! ownership / handover changes only via explicit `claim-leader` / `takeover` commands.
9
- //!
10
- //! The function signature is preserved (callers in coordinator/tick.rs and lifecycle
11
- //! tests still resolve) but the body is a strict no-op: no event, no primitive call,
12
- //! no state mutation. The `_` discards keep clippy quiet and document that the
13
- //! arguments are intentionally ignored under N35.
14
-
15
- use std::path::Path;
16
-
17
- use serde_json::Value;
18
-
19
- use super::{LeaderError, TakeoverReminderResult};
20
-
21
- /// #236 nag_removal: was the take-over reminder injector; now a true no-op. Delivery
22
- /// primitives (`report_result` / `send_to_leader` / N31/N32 funnel / `request_human` /
23
- /// broadcast-leader) continue to flow through their own callsites — only the
24
- /// time/state-inferred nag output that lived in this helper is gone.
25
- pub fn push_idle_reminder(
26
- workspace: &Path,
27
- state: &Value,
28
- event_log: &crate::event_log::EventLog,
29
- result: &TakeoverReminderResult,
30
- ) -> Result<(), LeaderError> {
31
- let _ = (workspace, state, event_log, result);
32
- Ok(())
33
- }
@@ -1,80 +0,0 @@
1
- //! unit-7 (Stage 3) — provider command-assembly boundary.
2
- //!
3
- //! The provider/adapter.rs monolith mixes three concerns:
4
- //! 1. The `ProviderAdapter` TRAIT and facade dispatch (the public API).
5
- //! 2. Per-provider COMMAND ASSEMBLY (argv plan, base/resume flags,
6
- //! --session-id injection — adapter.rs:409-508 region).
7
- //! 3. SESSION SCANNING (capture polling + transcript scanning —
8
- //! adapter.rs:511-546, 969-1078).
9
- //!
10
- //! This module CREATES the dedicated home for #2 so future work can
11
- //! migrate command-assembly fns here in small, behavior-neutral commits.
12
- //! Today it only carries the documented intent and a small typed helper —
13
- //! the bulk of the assembly fns are still in adapter.rs and reachable
14
- //! through the existing pub(crate) surface.
15
- //!
16
- //! Why incremental: every command-assembly fn touches multiple internal
17
- //! constants (`--session-id`, `--resume`, MCP-config-path conventions) and
18
- //! per-provider quirks. Moving them blindly is high-risk. The boundary
19
- //! exists so the next commit (or any contributor) has a documented target
20
- //! for relocations.
21
-
22
- use crate::provider::Provider;
23
-
24
- /// Lightweight tag for command-plan branches in the existing adapter
25
- /// (`Base` vs `Resume`). Distinct type so command-assembly code reads
26
- /// clearly even when it lives next to adapter dispatch.
27
- #[derive(Debug, Clone, Copy, PartialEq, Eq)]
28
- pub enum CommandPlanKind {
29
- /// Initial spawn — `--session-id <uuid>` predetermined.
30
- Base,
31
- /// Resume an existing session — `--resume <sid>`, no fresh
32
- /// `--session-id` injected.
33
- Resume,
34
- }
35
-
36
- /// Returns true when the provider's command plan honors `--session-id`
37
- /// for fresh spawns. Mirrors the existing adapter logic but lives next to
38
- /// where future command-assembly fns will land.
39
- pub fn honors_session_id_for_base_spawn(provider: Provider) -> bool {
40
- matches!(
41
- provider,
42
- Provider::Claude | Provider::ClaudeCode | Provider::Copilot
43
- )
44
- }
45
-
46
- #[cfg(test)]
47
- mod tests {
48
- use super::*;
49
-
50
- #[test]
51
- fn fake_provider_does_not_honor_session_id() {
52
- assert!(!honors_session_id_for_base_spawn(Provider::Fake));
53
- }
54
-
55
- #[test]
56
- fn provider_matrix_for_base_spawn_session_id_support() {
57
- let cases = [
58
- (Provider::Claude, true),
59
- (Provider::ClaudeCode, true),
60
- (Provider::Copilot, true),
61
- (Provider::Codex, false),
62
- (Provider::GeminiCli, false),
63
- (Provider::Fake, false),
64
- ];
65
- for (provider, expected) in cases {
66
- assert_eq!(
67
- honors_session_id_for_base_spawn(provider),
68
- expected,
69
- "{provider:?}"
70
- );
71
- }
72
- }
73
-
74
- #[test]
75
- fn command_plan_kind_is_copy() {
76
- let a = CommandPlanKind::Base;
77
- let b = a;
78
- assert_eq!(a, b);
79
- }
80
- }