@team-agent/installer 0.5.125 → 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 (96) hide show
  1. package/Cargo.lock +1 -1
  2. package/Cargo.toml +1 -1
  3. package/crates/team-agent/src/cli/diagnose.rs +0 -68
  4. package/crates/team-agent/src/cli/emit.rs +6 -2
  5. package/crates/team-agent/src/cli/intent/runtime_tests.rs +10 -10
  6. package/crates/team-agent/src/cli/mod.rs +22 -28
  7. package/crates/team-agent/src/cli/models.rs +7 -764
  8. package/crates/team-agent/src/cli/tests/mod.rs +1 -1
  9. package/crates/team-agent/src/cli/tests/run_delegation.rs +5 -4
  10. package/crates/team-agent/src/compiler/tests.rs +18 -3
  11. package/crates/team-agent/src/compiler.rs +4 -203
  12. package/crates/team-agent/src/contract_runtime/backend.rs +61 -38
  13. package/crates/team-agent/src/contract_runtime/config.rs +7 -4
  14. package/crates/team-agent/src/contract_runtime/fork.rs +368 -0
  15. package/crates/team-agent/src/contract_runtime/framework.rs +8 -10
  16. package/crates/team-agent/src/contract_runtime/mod.rs +1 -0
  17. package/crates/team-agent/src/contract_runtime/registry.rs +60 -19
  18. package/crates/team-agent/src/coordinator/tests/api_error_recovery.rs +29 -8
  19. package/crates/team-agent/src/coordinator/tests/health_sync.rs +0 -42
  20. package/crates/team-agent/src/leader/start.rs +1 -1
  21. package/crates/team-agent/src/lifecycle/launch/add_agent_state.rs +2 -195
  22. package/crates/team-agent/src/lifecycle/launch/clone_agent.rs +11 -27
  23. package/crates/team-agent/src/lifecycle/launch/fork_agent.rs +18 -28
  24. package/crates/team-agent/src/lifecycle/launch/fork_entry.rs +6 -87
  25. package/crates/team-agent/src/lifecycle/launch/mcp_config.rs +1 -9
  26. package/crates/team-agent/src/lifecycle/launch/pi_mcp.rs +74 -244
  27. package/crates/team-agent/src/lifecycle/launch/quick_start.rs +0 -24
  28. package/crates/team-agent/src/lifecycle/launch/role_source.rs +5 -0
  29. package/crates/team-agent/src/lifecycle/launch/spawn.rs +21 -33
  30. package/crates/team-agent/src/lifecycle/launch.rs +0 -23
  31. package/crates/team-agent/src/lifecycle/profile_launch.rs +18 -317
  32. package/crates/team-agent/src/lifecycle/restart/common.rs +42 -315
  33. package/crates/team-agent/src/lifecycle/restart/selection.rs +5 -5
  34. package/crates/team-agent/src/lifecycle/restart.rs +0 -2
  35. package/crates/team-agent/src/lifecycle/tests/behavioral_diff_264_red.rs +11 -6
  36. package/crates/team-agent/src/lifecycle/tests/claude_profile_launch_red.rs +8 -320
  37. package/crates/team-agent/src/lifecycle/tests/cli_argv_routing_red.rs +22 -138
  38. package/crates/team-agent/src/lifecycle/tests/clone_fork_copilot_perms_red.rs +4 -334
  39. package/crates/team-agent/src/lifecycle/tests/communication_mode_runtime_contract_red.rs +30 -11
  40. package/crates/team-agent/src/lifecycle/tests/copilot_provider_red.rs +2 -2
  41. package/crates/team-agent/src/lifecycle/tests/core.rs +17 -16
  42. package/crates/team-agent/src/lifecycle/tests/grok_require_explicit_model_red.rs +12 -12
  43. package/crates/team-agent/src/lifecycle/tests/harvest2_a_batch_red.rs +3 -51
  44. package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +26 -28
  45. package/crates/team-agent/src/lifecycle/tests/pi_catalog_red.rs +6 -18
  46. package/crates/team-agent/src/lifecycle/tests/pi_command_red.rs +52 -70
  47. package/crates/team-agent/src/lifecycle/tests/pi_dual_entry_red.rs +4 -157
  48. package/crates/team-agent/src/lifecycle/tests/pi_executable_mcp_red.rs +10 -302
  49. package/crates/team-agent/src/lifecycle/tests/pi_lifecycle_doctor_red.rs +1 -68
  50. package/crates/team-agent/src/lifecycle/tests/pi_native_mcp_capability_red.rs +1 -19
  51. package/crates/team-agent/src/lifecycle/tests/pi_session_delivery_red.rs +2 -100
  52. package/crates/team-agent/src/lifecycle/tests/quick_start_worker_readiness_red.rs +11 -10
  53. package/crates/team-agent/src/lifecycle/tests/restart_session_capture_red.rs +2 -106
  54. package/crates/team-agent/src/lifecycle/tests/status_credential_redaction_contract.rs +2 -2
  55. package/crates/team-agent/src/lifecycle/tests/swallow_batch4_semantics_red.rs +2 -254
  56. package/crates/team-agent/src/lifecycle/tests/upgrade_compat_0211_red.rs +4 -4
  57. package/crates/team-agent/src/lifecycle/tests/verify_rs031_window_consistency_red.rs +6 -5
  58. package/crates/team-agent/src/lifecycle/tests/worker_spawn_env_red.rs +7 -16
  59. package/crates/team-agent/src/lifecycle/tests.rs +0 -3
  60. package/crates/team-agent/src/lifecycle/types.rs +2 -18
  61. package/crates/team-agent/src/mcp_server/readiness_tests.rs +1 -1
  62. package/crates/team-agent/src/messaging/delivery.rs +12 -141
  63. package/crates/team-agent/src/messaging/delivery_consumption_tests.rs +5 -5
  64. package/crates/team-agent/src/messaging/tests/dup_inject.rs +3 -3
  65. package/crates/team-agent/src/messaging/tests/spine.rs +26 -32
  66. package/crates/team-agent/src/provider/adapter.rs +35 -238
  67. package/crates/team-agent/src/provider/adapters/mod.rs +4 -4
  68. package/crates/team-agent/src/provider/model_catalog.rs +13 -201
  69. package/crates/team-agent/src/provider/session/capture.rs +6 -106
  70. package/crates/team-agent/src/provider/session/context_fork/outcome.rs +0 -4
  71. package/crates/team-agent/src/provider/session/context_fork.rs +15 -107
  72. package/crates/team-agent/src/provider/session_scan/common.rs +10 -34
  73. package/crates/team-agent/src/provider/session_scan/pi.rs +1 -34
  74. package/crates/team-agent/src/provider/session_scan.rs +4 -10
  75. package/crates/team-agent/src/provider/tests/adapter.rs +34 -91
  76. package/crates/team-agent/src/provider/tests/command_helpers.rs +3 -12
  77. package/crates/team-agent/src/provider/tests/idle.rs +0 -25
  78. package/crates/team-agent/src/provider/wire.rs +51 -23
  79. package/crates/team-agent/src/state/abnormal_watch/tests/mod.rs +1 -1
  80. package/crates/team-agent/src/state/persist.rs +6 -6
  81. package/crates/team-agent/src/state/repository/tests.rs +2 -2
  82. package/package.json +4 -4
  83. package/skills/team-agent/SKILL.md +6 -4
  84. package/skills/team-agent/command-coverage.json +15 -1
  85. package/skills/team-agent/docs/reference/team-agent-operator.md +5 -3
  86. package/skills/team-agent/references/team-agent-operator.md +5 -3
  87. package/crates/team-agent/src/lifecycle/restart/avatar.rs +0 -1805
  88. package/crates/team-agent/src/lifecycle/tests/claude_compatible_config_red.rs +0 -325
  89. package/crates/team-agent/src/lifecycle/tests/pi_compiler_red.rs +0 -210
  90. package/crates/team-agent/src/lifecycle/tests/pi_fork_session_inheritance_red.rs +0 -1409
  91. package/crates/team-agent/src/provider/adapters/claude.rs +0 -78
  92. package/crates/team-agent/src/provider/adapters/claude_fork.rs +0 -131
  93. package/crates/team-agent/src/provider/adapters/pi.rs +0 -100
  94. package/crates/team-agent/src/provider/session/context_fork/claude.rs +0 -123
  95. package/crates/team-agent/src/provider/session_scan/claude.rs +0 -523
  96. package/crates/team-agent/src/test_support/models_timeout_fixture.rs +0 -144
@@ -2730,7 +2730,7 @@ mod tests {
2730
2730
  &json!({
2731
2731
  "session_name": "team-a",
2732
2732
  "active_team_key": "team-a",
2733
- "agents": {"f1": {"provider": "claude", "status": "starting"}}
2733
+ "agents": {"f1": {"provider": "copilot", "status": "starting"}}
2734
2734
  }),
2735
2735
  );
2736
2736
  // f2 loaded before f1's reservation. Persist carries the still-unspawned
@@ -2738,7 +2738,7 @@ mod tests {
2738
2738
  let incoming = json!({
2739
2739
  "session_name": "team-a",
2740
2740
  "active_team_key": "team-a",
2741
- "agents": {"f2": {"provider": "claude", "status": "starting"}}
2741
+ "agents": {"f2": {"provider": "copilot", "status": "starting"}}
2742
2742
  });
2743
2743
  save_runtime_state_with_lifecycle_topology_authority(&ws, &incoming, "team-a", &["f2"])
2744
2744
  .unwrap();
@@ -2749,7 +2749,7 @@ mod tests {
2749
2749
  // f1 starts after f2 takes its snapshot; capture is not complete yet.
2750
2750
  let mut started = stale.clone();
2751
2751
  started["agents"]["f1"] = json!({
2752
- "provider": "claude",
2752
+ "provider": "copilot",
2753
2753
  "status": "running",
2754
2754
  "pane_id": "%1",
2755
2755
  "pane_pid": 101,
@@ -2763,7 +2763,7 @@ mod tests {
2763
2763
  .unwrap();
2764
2764
  let latest = read_state(&ws);
2765
2765
  stale["agents"]["f2"] = json!({
2766
- "provider": "claude",
2766
+ "provider": "copilot",
2767
2767
  "status": "running",
2768
2768
  "pane_id": "%2",
2769
2769
  "pane_pid": 102,
@@ -3410,7 +3410,7 @@ mod tests {
3410
3410
  "agents": {
3411
3411
  "alpha": {
3412
3412
  "status": "stopped",
3413
- "provider": "claude",
3413
+ "provider": "copilot",
3414
3414
  "session_id": "stale-poisoned-uuid",
3415
3415
  "rollout_path": Value::Null,
3416
3416
  "captured_at": Value::Null,
@@ -3427,7 +3427,7 @@ mod tests {
3427
3427
  "agents": {
3428
3428
  "alpha": {
3429
3429
  "status": "running",
3430
- "provider": "claude",
3430
+ "provider": "copilot",
3431
3431
  "session_id": Value::Null,
3432
3432
  "rollout_path": Value::Null,
3433
3433
  "captured_at": Value::Null,
@@ -123,9 +123,9 @@ fn stopped_start_commit_updates_exact_target_and_both_mirrors()
123
123
  let held = json!({"agent_id":"worker","provider":"grok_build","runtime_family":"contract",
124
124
  "status":"stopped","explicit_stop":true,"generation":1,"contract_instance":"instance-one",
125
125
  "session_id":"same-session","native_endpoint":"old-endpoint"});
126
- let peer = json!({"agent_id":"peer","provider":"pi","status":"stopped","explicit_stop":true,
126
+ let peer = json!({"agent_id":"peer","provider":"copilot","status":"stopped","explicit_stop":true,
127
127
  "session_id":"peer-session","generation":1});
128
- let control = json!({"agent_id":"control","provider":"pi","status":"running","session_id":"control-session"});
128
+ let control = json!({"agent_id":"control","provider":"copilot","status":"running","session_id":"control-session"});
129
129
  let agents = json!({"worker":held,"peer":peer,"control":control});
130
130
  let initial = json!({"session_name":"team-a","active_team_key":"team-a","agents":agents,
131
131
  "teams":{"team-a":{"session_name":"team-a","status":"alive","agents":agents},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-agent/installer",
3
- "version": "0.5.125",
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.125",
24
- "@team-agent/cli-darwin-x64": "0.5.125",
25
- "@team-agent/cli-linux-x64": "0.5.125"
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
  ```
@@ -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.