@team-agent/installer 0.5.126 → 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 -69
- package/crates/team-agent/src/cli/emit.rs +10 -9
- 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 +45 -0
- package/crates/team-agent/src/cli/mod.rs +13 -1
- package/crates/team-agent/src/cli/models.rs +27 -181
- package/crates/team-agent/src/cli/tests/leader_watch.rs +1 -1
- package/crates/team-agent/src/cli/tests/mod.rs +2 -2
- package/crates/team-agent/src/cli/tests/run_delegation.rs +3 -3
- package/crates/team-agent/src/cli/tests/status_send.rs +2 -2
- package/crates/team-agent/src/compiler/tests.rs +36 -9
- package/crates/team-agent/src/compiler.rs +3 -2
- package/crates/team-agent/src/contract_runtime/backend.rs +36 -0
- package/crates/team-agent/src/contract_runtime/commands.rs +335 -4
- package/crates/team-agent/src/contract_runtime/config.rs +6 -5
- package/crates/team-agent/src/contract_runtime/framework.rs +2 -5
- package/crates/team-agent/src/contract_runtime/registry.rs +66 -67
- package/crates/team-agent/src/coordinator/steps/abnormal.rs +45 -5
- package/crates/team-agent/src/coordinator/tests/api_error_recovery.rs +27 -10
- package/crates/team-agent/src/coordinator/tests/energy.rs +4 -4
- package/crates/team-agent/src/coordinator/tests/health_sync.rs +2 -2
- 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/lifecycle/launch/fork_agent.rs +17 -185
- package/crates/team-agent/src/lifecycle/launch/mcp_config.rs +4 -487
- package/crates/team-agent/src/lifecycle/launch/quick_start.rs +2 -2
- package/crates/team-agent/src/lifecycle/launch/spawn.rs +8 -21
- package/crates/team-agent/src/lifecycle/launch.rs +3 -11
- package/crates/team-agent/src/lifecycle/profile_launch.rs +8 -64
- package/crates/team-agent/src/lifecycle/restart/common.rs +6 -151
- package/crates/team-agent/src/lifecycle/restart/remove.rs +129 -0
- 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 +37 -240
- package/crates/team-agent/src/lifecycle/tests/cli_argv_routing_red.rs +95 -59
- package/crates/team-agent/src/lifecycle/tests/communication_mode_runtime_contract_red.rs +20 -35
- package/crates/team-agent/src/lifecycle/tests/copilot_provider_red.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests/core.rs +22 -48
- 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 +6 -124
- 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 +136 -256
- 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/quick_start_worker_readiness_red.rs +7 -7
- 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 -1374
- 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 +5 -5
- package/crates/team-agent/src/lifecycle/tests/subprep_codex_trust_roundtrip_red.rs +67 -313
- 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 +70 -15
- package/crates/team-agent/src/lifecycle/tests/verify_rs031_window_consistency_red.rs +35 -35
- package/crates/team-agent/src/lifecycle/tests/worker_spawn_env_red.rs +36 -82
- package/crates/team-agent/src/lifecycle/tests.rs +0 -4
- package/crates/team-agent/src/lifecycle/types.rs +2 -5
- package/crates/team-agent/src/mcp_server/readiness_tests.rs +15 -17
- package/crates/team-agent/src/messaging/delivery.rs +9 -61
- package/crates/team-agent/src/messaging/tests/dup_inject.rs +67 -68
- 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 +5 -1
- package/crates/team-agent/src/messaging/tests/wave2.rs +13 -20
- package/crates/team-agent/src/provider/adapter.rs +58 -356
- package/crates/team-agent/src/provider/adapters/mod.rs +5 -7
- package/crates/team-agent/src/provider/session/capture.rs +5 -105
- package/crates/team-agent/src/provider/session/context_fork/outcome.rs +8 -20
- package/crates/team-agent/src/provider/session/context_fork.rs +23 -142
- package/crates/team-agent/src/provider/session/mod.rs +2 -3
- package/crates/team-agent/src/provider/session_scan/common.rs +21 -57
- package/crates/team-agent/src/provider/session_scan.rs +6 -16
- package/crates/team-agent/src/provider/tests/adapter.rs +37 -118
- package/crates/team-agent/src/provider/tests/command_helpers.rs +1 -18
- package/crates/team-agent/src/provider/tests/idle.rs +0 -43
- package/crates/team-agent/src/provider/types.rs +0 -4
- package/crates/team-agent/src/provider/wire.rs +34 -8
- package/crates/team-agent/src/tmux_backend.rs +4 -3
- package/package.json +4 -4
- package/skills/team-agent/SKILL.md +3 -2
- package/skills/team-agent/command-coverage.json +14 -0
- package/skills/team-agent/docs/reference/team-agent-operator.md +3 -1
- package/skills/team-agent/references/team-agent-operator.md +3 -1
- package/crates/team-agent/src/lifecycle/launch/grok_per_seat.rs +0 -260
- 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/provider/adapters/codex.rs +0 -101
- package/crates/team-agent/src/provider/adapters/grok.rs +0 -67
- package/crates/team-agent/src/provider/session/context_fork/codex.rs +0 -514
- package/crates/team-agent/src/provider/session_scan/codex.rs +0 -326
- package/crates/team-agent/src/provider/session_scan/grok.rs +0 -288
|
@@ -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",
|
|
@@ -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
|