@team-agent/installer 0.5.125 → 0.5.127
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.
- package/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/crates/team-agent/src/cli/diagnose.rs +0 -137
- package/crates/team-agent/src/cli/emit.rs +13 -8
- package/crates/team-agent/src/cli/grok_slot.rs +88 -3
- package/crates/team-agent/src/cli/intent/runtime.rs +6 -4
- package/crates/team-agent/src/cli/intent/runtime_tests.rs +55 -10
- package/crates/team-agent/src/cli/mod.rs +35 -29
- package/crates/team-agent/src/cli/models.rs +33 -944
- package/crates/team-agent/src/cli/tests/leader_watch.rs +1 -1
- package/crates/team-agent/src/cli/tests/mod.rs +3 -3
- package/crates/team-agent/src/cli/tests/run_delegation.rs +8 -7
- package/crates/team-agent/src/cli/tests/status_send.rs +2 -2
- package/crates/team-agent/src/compiler/tests.rs +54 -12
- package/crates/team-agent/src/compiler.rs +7 -205
- package/crates/team-agent/src/contract_runtime/backend.rs +97 -38
- package/crates/team-agent/src/contract_runtime/commands.rs +335 -4
- package/crates/team-agent/src/contract_runtime/config.rs +12 -8
- package/crates/team-agent/src/contract_runtime/fork.rs +368 -0
- package/crates/team-agent/src/contract_runtime/framework.rs +8 -13
- package/crates/team-agent/src/contract_runtime/mod.rs +1 -0
- package/crates/team-agent/src/contract_runtime/registry.rs +100 -60
- package/crates/team-agent/src/coordinator/steps/abnormal.rs +45 -5
- package/crates/team-agent/src/coordinator/tests/api_error_recovery.rs +54 -16
- package/crates/team-agent/src/coordinator/tests/energy.rs +4 -4
- package/crates/team-agent/src/coordinator/tests/health_sync.rs +2 -44
- package/crates/team-agent/src/coordinator/tests/main_preserved.rs +2 -2
- package/crates/team-agent/src/coordinator/tests/spine.rs +1 -1
- package/crates/team-agent/src/coordinator/tests/takeover.rs +3 -3
- package/crates/team-agent/src/leader/start.rs +1 -1
- package/crates/team-agent/src/lifecycle/launch/add_agent_state.rs +2 -195
- package/crates/team-agent/src/lifecycle/launch/clone_agent.rs +11 -27
- package/crates/team-agent/src/lifecycle/launch/fork_agent.rs +22 -200
- package/crates/team-agent/src/lifecycle/launch/fork_entry.rs +6 -87
- package/crates/team-agent/src/lifecycle/launch/mcp_config.rs +5 -496
- package/crates/team-agent/src/lifecycle/launch/pi_mcp.rs +74 -244
- package/crates/team-agent/src/lifecycle/launch/quick_start.rs +2 -26
- package/crates/team-agent/src/lifecycle/launch/role_source.rs +5 -0
- package/crates/team-agent/src/lifecycle/launch/spawn.rs +26 -51
- package/crates/team-agent/src/lifecycle/launch.rs +3 -34
- package/crates/team-agent/src/lifecycle/profile_launch.rs +18 -373
- package/crates/team-agent/src/lifecycle/restart/common.rs +45 -463
- package/crates/team-agent/src/lifecycle/restart/remove.rs +129 -0
- package/crates/team-agent/src/lifecycle/restart/selection.rs +5 -5
- package/crates/team-agent/src/lifecycle/restart.rs +0 -2
- package/crates/team-agent/src/lifecycle/role_config.rs +40 -13
- package/crates/team-agent/src/lifecycle/tests/acceptance_b_batch_red.rs +1 -1
- package/crates/team-agent/src/lifecycle/tests/agent_ops.rs +8 -12
- package/crates/team-agent/src/lifecycle/tests/behavioral_diff_264_red.rs +38 -236
- package/crates/team-agent/src/lifecycle/tests/claude_profile_launch_red.rs +8 -320
- package/crates/team-agent/src/lifecycle/tests/cli_argv_routing_red.rs +106 -186
- package/crates/team-agent/src/lifecycle/tests/clone_fork_copilot_perms_red.rs +4 -334
- package/crates/team-agent/src/lifecycle/tests/communication_mode_runtime_contract_red.rs +19 -15
- package/crates/team-agent/src/lifecycle/tests/copilot_provider_red.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests/core.rs +33 -58
- package/crates/team-agent/src/lifecycle/tests/f032_startup_prompt_best_effort_red.rs +22 -8
- package/crates/team-agent/src/lifecycle/tests/grok_require_explicit_model_red.rs +15 -133
- package/crates/team-agent/src/lifecycle/tests/harvest2_a_batch_red.rs +3 -51
- package/crates/team-agent/src/lifecycle/tests/host_cotenant_death_p0_contract.rs +30 -67
- package/crates/team-agent/src/lifecycle/tests/issue238_codex_effort_contract.rs +3 -31
- package/crates/team-agent/src/lifecycle/tests/lane_ops.rs +194 -169
- package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +162 -284
- package/crates/team-agent/src/lifecycle/tests/lifecycle_rollback_red.rs +15 -78
- package/crates/team-agent/src/lifecycle/tests/main_preserved.rs +7 -7
- package/crates/team-agent/src/lifecycle/tests/phase_b_contracts.rs +75 -69
- package/crates/team-agent/src/lifecycle/tests/phase_golden.rs +2 -10
- package/crates/team-agent/src/lifecycle/tests/pi_catalog_red.rs +6 -18
- package/crates/team-agent/src/lifecycle/tests/pi_command_red.rs +52 -70
- package/crates/team-agent/src/lifecycle/tests/pi_dual_entry_red.rs +4 -157
- package/crates/team-agent/src/lifecycle/tests/pi_executable_mcp_red.rs +10 -302
- package/crates/team-agent/src/lifecycle/tests/pi_lifecycle_doctor_red.rs +1 -68
- package/crates/team-agent/src/lifecycle/tests/pi_native_mcp_capability_red.rs +1 -19
- package/crates/team-agent/src/lifecycle/tests/pi_session_delivery_red.rs +2 -100
- package/crates/team-agent/src/lifecycle/tests/quick_start_worker_readiness_red.rs +15 -14
- package/crates/team-agent/src/lifecycle/tests/restart.rs +12 -153
- package/crates/team-agent/src/lifecycle/tests/restart_build_before_destroy_0540_contract.rs +27 -5
- package/crates/team-agent/src/lifecycle/tests/restart_liveness_red.rs +59 -10
- package/crates/team-agent/src/lifecycle/tests/restart_rebind_hotfix_252_red.rs +47 -6
- package/crates/team-agent/src/lifecycle/tests/restart_session_capture_red.rs +3 -1478
- package/crates/team-agent/src/lifecycle/tests/resume_recover_red.rs +27 -10
- package/crates/team-agent/src/lifecycle/tests/status_credential_redaction_contract.rs +7 -7
- package/crates/team-agent/src/lifecycle/tests/subprep_codex_trust_roundtrip_red.rs +67 -313
- package/crates/team-agent/src/lifecycle/tests/swallow_batch4_semantics_red.rs +2 -254
- package/crates/team-agent/src/lifecycle/tests/team_in_team_identity_scope_red.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests/team_in_team_sibling_quick_start_red.rs +1 -1
- package/crates/team-agent/src/lifecycle/tests/team_in_team_state_scope_red.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests/team_key_retirement_txn_red.rs +4 -4
- package/crates/team-agent/src/lifecycle/tests/upgrade_compat_0211_red.rs +74 -19
- package/crates/team-agent/src/lifecycle/tests/verify_rs031_window_consistency_red.rs +39 -38
- package/crates/team-agent/src/lifecycle/tests/worker_spawn_env_red.rs +42 -97
- package/crates/team-agent/src/lifecycle/tests.rs +0 -7
- package/crates/team-agent/src/lifecycle/types.rs +2 -21
- package/crates/team-agent/src/mcp_server/readiness_tests.rs +15 -17
- package/crates/team-agent/src/messaging/delivery.rs +14 -195
- package/crates/team-agent/src/messaging/delivery_consumption_tests.rs +5 -5
- package/crates/team-agent/src/messaging/tests/dup_inject.rs +68 -69
- package/crates/team-agent/src/messaging/tests/main_preserved.rs +2 -2
- package/crates/team-agent/src/messaging/tests/runtime.rs +5 -5
- package/crates/team-agent/src/messaging/tests/spine.rs +30 -32
- package/crates/team-agent/src/messaging/tests/wave2.rs +13 -20
- package/crates/team-agent/src/provider/adapter.rs +71 -572
- package/crates/team-agent/src/provider/adapters/mod.rs +6 -8
- package/crates/team-agent/src/provider/model_catalog.rs +13 -201
- package/crates/team-agent/src/provider/session/capture.rs +11 -211
- package/crates/team-agent/src/provider/session/context_fork/outcome.rs +8 -24
- package/crates/team-agent/src/provider/session/context_fork.rs +29 -240
- package/crates/team-agent/src/provider/session/mod.rs +2 -3
- package/crates/team-agent/src/provider/session_scan/common.rs +27 -87
- package/crates/team-agent/src/provider/session_scan/pi.rs +1 -34
- package/crates/team-agent/src/provider/session_scan.rs +7 -23
- package/crates/team-agent/src/provider/tests/adapter.rs +66 -204
- package/crates/team-agent/src/provider/tests/command_helpers.rs +3 -29
- package/crates/team-agent/src/provider/tests/idle.rs +0 -68
- package/crates/team-agent/src/provider/types.rs +0 -4
- package/crates/team-agent/src/provider/wire.rs +77 -23
- package/crates/team-agent/src/state/abnormal_watch/tests/mod.rs +1 -1
- package/crates/team-agent/src/state/persist.rs +6 -6
- package/crates/team-agent/src/state/repository/tests.rs +2 -2
- package/crates/team-agent/src/tmux_backend.rs +4 -3
- package/package.json +4 -4
- package/skills/team-agent/SKILL.md +8 -5
- package/skills/team-agent/command-coverage.json +29 -1
- package/skills/team-agent/docs/reference/team-agent-operator.md +7 -3
- package/skills/team-agent/references/team-agent-operator.md +7 -3
- package/crates/team-agent/src/lifecycle/launch/grok_per_seat.rs +0 -260
- package/crates/team-agent/src/lifecycle/restart/avatar.rs +0 -1805
- package/crates/team-agent/src/lifecycle/tests/claude_compatible_config_red.rs +0 -325
- package/crates/team-agent/src/lifecycle/tests/codex_weak_window_attribution_red.rs +0 -683
- package/crates/team-agent/src/lifecycle/tests/grok_effort_argv_red.rs +0 -247
- package/crates/team-agent/src/lifecycle/tests/grok_mcp_overlay_red.rs +0 -507
- package/crates/team-agent/src/lifecycle/tests/grok_restart_resume_red.rs +0 -300
- package/crates/team-agent/src/lifecycle/tests/pi_compiler_red.rs +0 -210
- package/crates/team-agent/src/lifecycle/tests/pi_fork_session_inheritance_red.rs +0 -1409
- package/crates/team-agent/src/provider/adapters/claude.rs +0 -78
- package/crates/team-agent/src/provider/adapters/claude_fork.rs +0 -131
- package/crates/team-agent/src/provider/adapters/codex.rs +0 -101
- package/crates/team-agent/src/provider/adapters/grok.rs +0 -67
- package/crates/team-agent/src/provider/adapters/pi.rs +0 -100
- package/crates/team-agent/src/provider/session/context_fork/claude.rs +0 -123
- package/crates/team-agent/src/provider/session/context_fork/codex.rs +0 -514
- package/crates/team-agent/src/provider/session_scan/claude.rs +0 -523
- package/crates/team-agent/src/provider/session_scan/codex.rs +0 -326
- package/crates/team-agent/src/provider/session_scan/grok.rs +0 -288
- package/crates/team-agent/src/test_support/models_timeout_fixture.rs +0 -144
|
@@ -39,14 +39,14 @@ fn restart_repairs_missing_resume_session_from_events_before_resume_decision() {
|
|
|
39
39
|
"session.captured",
|
|
40
40
|
json!({
|
|
41
41
|
"agent_id": "worker_a",
|
|
42
|
-
"provider": "
|
|
42
|
+
"provider": "copilot",
|
|
43
43
|
"session_id": "sess-from-events",
|
|
44
44
|
"rollout_path": rollout.to_string_lossy().to_string(),
|
|
45
45
|
"attribution_confidence": "high"
|
|
46
46
|
}),
|
|
47
47
|
)
|
|
48
48
|
.unwrap();
|
|
49
|
-
let _env = fixture.
|
|
49
|
+
let _env = fixture.bounded_provider_home_env(&["sess-from-events"]);
|
|
50
50
|
let transport = ResumeTransport::new();
|
|
51
51
|
|
|
52
52
|
let report = restart_with_transport(&fixture.team, false, None, &transport)
|
|
@@ -101,7 +101,7 @@ fn restart_does_not_resurrect_tombstoned_event_session_and_refuses_without_allow
|
|
|
101
101
|
"session.captured",
|
|
102
102
|
json!({
|
|
103
103
|
"agent_id": "worker_a",
|
|
104
|
-
"provider": "
|
|
104
|
+
"provider": "copilot",
|
|
105
105
|
"session_id": "sess-tombstoned",
|
|
106
106
|
"rollout_path": rollout.to_string_lossy().to_string(),
|
|
107
107
|
"attribution_confidence": "high"
|
|
@@ -114,7 +114,8 @@ fn restart_does_not_resurrect_tombstoned_event_session_and_refuses_without_allow
|
|
|
114
114
|
json!({ "agent_id": "worker_a", "session_id": "sess-tombstoned" }),
|
|
115
115
|
)
|
|
116
116
|
.unwrap();
|
|
117
|
-
|
|
117
|
+
// The tombstoned session still has copilot backing: only the tombstone may block it.
|
|
118
|
+
let _env = fixture.bounded_provider_home_env(&["sess-tombstoned"]);
|
|
118
119
|
let transport = ResumeTransport::new();
|
|
119
120
|
|
|
120
121
|
let report = restart_with_transport(&fixture.team, false, None, &transport)
|
|
@@ -151,7 +152,7 @@ impl ResumeFixture {
|
|
|
151
152
|
.unwrap();
|
|
152
153
|
std::fs::write(
|
|
153
154
|
team.join("agents").join("worker_a.md"),
|
|
154
|
-
"---\nname: worker_a\nrole: Worker A\nprovider:
|
|
155
|
+
"---\nname: worker_a\nrole: Worker A\nprovider: copilot\nmodel: gpt-5\nauth_mode: subscription\ndangerously_skip_permissions: false\ntools:\n - mcp_team\n---\n\nWorker.\n",
|
|
155
156
|
)
|
|
156
157
|
.unwrap();
|
|
157
158
|
let spec = team_agent::compiler::compile_team(&team).unwrap();
|
|
@@ -174,7 +175,7 @@ impl ResumeFixture {
|
|
|
174
175
|
"agents": {
|
|
175
176
|
"worker_a": {
|
|
176
177
|
"status": "running",
|
|
177
|
-
"provider": "
|
|
178
|
+
"provider": "copilot",
|
|
178
179
|
"auth_mode": "subscription",
|
|
179
180
|
"role": "Worker A",
|
|
180
181
|
"tools": ["mcp_team"],
|
|
@@ -202,9 +203,25 @@ impl ResumeFixture {
|
|
|
202
203
|
std::fs::write(coordinator_pid_path(&workspace), pid.to_string()).unwrap();
|
|
203
204
|
}
|
|
204
205
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
/// Bounded capture deadlines plus a fixture HOME whose only provider
|
|
207
|
+
/// state is the copilot resume backing (`sessions` rows in
|
|
208
|
+
/// `~/.copilot/session-store.db`) for `copilot_sessions`.
|
|
209
|
+
fn bounded_provider_home_env(&self, copilot_sessions: &[&str]) -> EnvGuard {
|
|
210
|
+
let home = self.root.join("provider-home");
|
|
211
|
+
let db = home.join(".copilot").join("session-store.db");
|
|
212
|
+
std::fs::create_dir_all(db.parent().unwrap()).unwrap();
|
|
213
|
+
let conn = rusqlite::Connection::open(db).unwrap();
|
|
214
|
+
conn.execute_batch(
|
|
215
|
+
"create table if not exists sessions (id text primary key, cwd text, created_at text);",
|
|
216
|
+
)
|
|
217
|
+
.unwrap();
|
|
218
|
+
for session_id in copilot_sessions {
|
|
219
|
+
conn.execute(
|
|
220
|
+
"insert or replace into sessions(id, cwd, created_at) values (?1, ?2, '2026-06-09T00:00:00Z')",
|
|
221
|
+
rusqlite::params![session_id, self.team.to_string_lossy()],
|
|
222
|
+
)
|
|
223
|
+
.unwrap();
|
|
224
|
+
}
|
|
208
225
|
EnvGuard::set_many(vec![
|
|
209
226
|
("HOME", home.to_string_lossy().to_string()),
|
|
210
227
|
(
|
|
@@ -352,7 +369,7 @@ impl Transport for ResumeTransport {
|
|
|
352
369
|
window_name: Some(WindowName::new("worker_a")),
|
|
353
370
|
pane_index: Some(0),
|
|
354
371
|
tty: None,
|
|
355
|
-
current_command: Some("
|
|
372
|
+
current_command: Some("copilot".to_string()),
|
|
356
373
|
current_path: None,
|
|
357
374
|
active: true,
|
|
358
375
|
pane_pid: Some(10_010),
|
|
@@ -82,7 +82,7 @@ fn red2_false_positive_guard_preserves_team_provider_and_model_truth() {
|
|
|
82
82
|
let structural_fields_preserved = [
|
|
83
83
|
("/team_key", json!("current")),
|
|
84
84
|
("/auth_mode", json!("subscription")),
|
|
85
|
-
("/provider", json!("
|
|
85
|
+
("/provider", json!("copilot")),
|
|
86
86
|
("/model", json!("gpt-contract")),
|
|
87
87
|
("/provider_source", json!("role")),
|
|
88
88
|
("/model_source", json!("role")),
|
|
@@ -450,7 +450,7 @@ fn seed_redaction_state(workspace: &Path, marker: &str, team_key: &str) {
|
|
|
450
450
|
let mixed = mixed_sensitive_value(marker);
|
|
451
451
|
let agent = json!({
|
|
452
452
|
"agent_id": "worker",
|
|
453
|
-
"provider": "
|
|
453
|
+
"provider": "copilot",
|
|
454
454
|
"model": "gpt-contract",
|
|
455
455
|
"provider_source": "role",
|
|
456
456
|
"model_source": "role",
|
|
@@ -500,7 +500,7 @@ fn mixed_sensitive_value(marker: &str) -> Value {
|
|
|
500
500
|
"nested": [{"values": [diagnostic.clone(), credential_url(marker)]}],
|
|
501
501
|
"team_key": "current",
|
|
502
502
|
"auth_mode": "subscription",
|
|
503
|
-
"provider": "
|
|
503
|
+
"provider": "copilot",
|
|
504
504
|
"model": "gpt-contract",
|
|
505
505
|
"provider_source": "role",
|
|
506
506
|
"model_source": "role",
|
|
@@ -686,7 +686,7 @@ fn write_profile_fixture(root: &Path, base_url: &str, token: &str) -> PathBuf {
|
|
|
686
686
|
fs::write(
|
|
687
687
|
team.join("profiles/local.env"),
|
|
688
688
|
format!(
|
|
689
|
-
"
|
|
689
|
+
"OPENAI_BASE_URL={base_url}\nOPENAI_API_KEY={token}\nOPENAI_MODEL=mock-model\n"
|
|
690
690
|
),
|
|
691
691
|
)
|
|
692
692
|
.unwrap();
|
|
@@ -697,7 +697,7 @@ fn write_profile_fixture(root: &Path, base_url: &str, token: &str) -> PathBuf {
|
|
|
697
697
|
.unwrap();
|
|
698
698
|
fs::write(
|
|
699
699
|
team.join("agents/worker.md"),
|
|
700
|
-
"---\nname: worker\nrole: Worker\nprovider:
|
|
700
|
+
"---\nname: worker\nrole: Worker\nprovider: codex\nauth_mode: compatible_api\ndangerously_skip_permissions: false\nprofile: local\nmodel: null\ntools:\n - mcp_team\n---\n\nWorker.\n",
|
|
701
701
|
)
|
|
702
702
|
.unwrap();
|
|
703
703
|
team
|
|
@@ -773,8 +773,8 @@ fn red8_bearer_token_inside_free_text_is_masked_without_over_redaction() {
|
|
|
773
773
|
let log = EventLog::new(&workspace);
|
|
774
774
|
// Attack-input shape (case.md section 2.4 / arch delta-smell6 probe): a
|
|
775
775
|
// user-controlled prompt travels as free text INSIDE an argv value
|
|
776
|
-
// (
|
|
777
|
-
// ->
|
|
776
|
+
// (a codex seat's `-c developer_instructions=<prompt>` argv value
|
|
777
|
+
// -> spawn_argv event). The bearer token hides in prose - not
|
|
778
778
|
// under a sensitive key, assignment key, or flag-value pair - so the
|
|
779
779
|
// shape matrix must map the attack input, not the scrubber branches.
|
|
780
780
|
let written = log
|