@team-agent/installer 0.5.41 → 0.5.43
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/adapters.rs +129 -54
- package/crates/team-agent/src/cli/diagnose.rs +1 -2
- package/crates/team-agent/src/cli/emit.rs +1 -7
- package/crates/team-agent/src/cli/helpers.rs +3 -1
- package/crates/team-agent/src/cli/leader.rs +2 -1
- package/crates/team-agent/src/cli/mod.rs +27 -7
- package/crates/team-agent/src/cli/named_address.rs +14 -5
- package/crates/team-agent/src/cli/profile.rs +19 -7
- package/crates/team-agent/src/cli/send.rs +9 -3
- package/crates/team-agent/src/cli/status.rs +8 -30
- package/crates/team-agent/src/cli/status_port.rs +1341 -1272
- package/crates/team-agent/src/cli/tests/base.rs +738 -660
- package/crates/team-agent/src/cli/tests/compile.rs +45 -18
- package/crates/team-agent/src/cli/tests/divergence.rs +462 -444
- package/crates/team-agent/src/cli/tests/lane_c.rs +365 -282
- package/crates/team-agent/src/cli/tests/leader_watch.rs +356 -329
- package/crates/team-agent/src/cli/tests/main_preserved.rs +672 -564
- package/crates/team-agent/src/cli/tests/missing_subcommands.rs +284 -224
- package/crates/team-agent/src/cli/tests/mod.rs +17 -7
- package/crates/team-agent/src/cli/tests/named_address.rs +8 -2
- package/crates/team-agent/src/cli/tests/peer_allow.rs +10 -2
- package/crates/team-agent/src/cli/tests/run_delegation.rs +314 -273
- package/crates/team-agent/src/cli/tests/shutdown_kill_plan.rs +26 -15
- package/crates/team-agent/src/cli/tests/status_send.rs +707 -629
- package/crates/team-agent/src/cli/tests/verb_install_skill.rs +20 -4
- package/crates/team-agent/src/cli/tests/verb_profile.rs +46 -17
- package/crates/team-agent/src/cli/tests/verb_validate.rs +15 -3
- package/crates/team-agent/src/codex_app_server.rs +2 -5
- package/crates/team-agent/src/compiler/tests.rs +139 -33
- package/crates/team-agent/src/compiler.rs +55 -22
- package/crates/team-agent/src/conpty/backend.rs +23 -33
- package/crates/team-agent/src/coordinator/backoff.rs +2 -7
- package/crates/team-agent/src/coordinator/conpty_shim.rs +55 -67
- package/crates/team-agent/src/coordinator/health.rs +46 -31
- package/crates/team-agent/src/coordinator/mod.rs +3 -3
- package/crates/team-agent/src/coordinator/orphan.rs +22 -10
- package/crates/team-agent/src/coordinator/steps/abnormal.rs +47 -52
- package/crates/team-agent/src/coordinator/tests/abnormal.rs +55 -19
- package/crates/team-agent/src/coordinator/tests/basics.rs +179 -41
- package/crates/team-agent/src/coordinator/tests/daemon.rs +53 -13
- package/crates/team-agent/src/coordinator/tests/health_sync.rs +78 -19
- package/crates/team-agent/src/coordinator/tests/main_preserved.rs +61 -11
- package/crates/team-agent/src/coordinator/tests/mod.rs +33 -39
- package/crates/team-agent/src/coordinator/tests/spine.rs +52 -12
- package/crates/team-agent/src/coordinator/tests/takeover.rs +73 -15
- package/crates/team-agent/src/coordinator/tests/tick_core.rs +50 -15
- package/crates/team-agent/src/coordinator/tests/watch.rs +74 -20
- package/crates/team-agent/src/coordinator/tick.rs +19 -1
- package/crates/team-agent/src/db/message_store.rs +138 -30
- package/crates/team-agent/src/db/migration.rs +249 -61
- package/crates/team-agent/src/db/schema.rs +303 -82
- package/crates/team-agent/src/diagnose/comms.rs +9 -2
- package/crates/team-agent/src/diagnose/mod.rs +1 -3
- package/crates/team-agent/src/diagnose/orphans.rs +79 -61
- package/crates/team-agent/src/event_log.rs +70 -16
- package/crates/team-agent/src/layout/manager.rs +15 -4
- package/crates/team-agent/src/layout/mod.rs +4 -4
- package/crates/team-agent/src/layout/overlay.rs +10 -3
- package/crates/team-agent/src/layout/placement.rs +5 -1
- package/crates/team-agent/src/layout/recovery.rs +4 -2
- package/crates/team-agent/src/layout/runtime_sessions.rs +7 -7
- package/crates/team-agent/src/layout/sessions.rs +17 -9
- package/crates/team-agent/src/layout/tmux_endpoint.rs +1 -1
- package/crates/team-agent/src/layout/worker_env.rs +52 -19
- package/crates/team-agent/src/leader/helpers.rs +7 -1
- package/crates/team-agent/src/leader/lease.rs +195 -82
- package/crates/team-agent/src/leader/owner_bind.rs +55 -22
- package/crates/team-agent/src/leader/rediscover/tests.rs +88 -24
- package/crates/team-agent/src/leader/rediscover.rs +74 -25
- package/crates/team-agent/src/leader/start.rs +75 -54
- package/crates/team-agent/src/leader/takeover.rs +46 -11
- package/crates/team-agent/src/leader/tests/basics.rs +320 -167
- package/crates/team-agent/src/leader/tests/byte_findings.rs +361 -219
- package/crates/team-agent/src/leader/tests/identity.rs +428 -356
- package/crates/team-agent/src/leader/tests/idle.rs +285 -254
- package/crates/team-agent/src/leader/tests/lease_api.rs +338 -274
- package/crates/team-agent/src/leader/tests/lease_claim.rs +643 -593
- package/crates/team-agent/src/leader/tests/mod.rs +115 -99
- package/crates/team-agent/src/leader/tests/rediscover.rs +74 -22
- package/crates/team-agent/src/leader/tests/wake_start_owner.rs +237 -211
- package/crates/team-agent/src/lib.rs +4 -4
- package/crates/team-agent/src/lifecycle/display.rs +7 -3
- package/crates/team-agent/src/lifecycle/launch.rs +6 -1
- package/crates/team-agent/src/lifecycle/mod.rs +9 -1
- package/crates/team-agent/src/lifecycle/profile_launch.rs +77 -34
- package/crates/team-agent/src/lifecycle/profile_smoke.rs +3 -1
- package/crates/team-agent/src/lifecycle/restart/agent.rs +1 -6
- package/crates/team-agent/src/lifecycle/restart/orchestrator.rs +1 -4
- package/crates/team-agent/src/lifecycle/restart/preflight.rs +6 -5
- package/crates/team-agent/src/lifecycle/restart/rebuild.rs +26 -22
- package/crates/team-agent/src/lifecycle/restart/remove.rs +45 -35
- package/crates/team-agent/src/lifecycle/restart/team_state.rs +63 -17
- package/crates/team-agent/src/lifecycle/tests/agent_ops.rs +251 -84
- package/crates/team-agent/src/lifecycle/tests/lane_ops.rs +198 -48
- package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +2 -1
- package/crates/team-agent/src/lifecycle/tests/main_preserved.rs +152 -32
- package/crates/team-agent/src/lifecycle/tests/phase_b_contracts.rs +1 -5
- package/crates/team-agent/src/lifecycle/tests.rs +2 -2
- package/crates/team-agent/src/main.rs +4 -4
- package/crates/team-agent/src/mcp_server/lifecycle_tools/agent_ops.rs +47 -20
- package/crates/team-agent/src/mcp_server/mod.rs +11 -2
- package/crates/team-agent/src/mcp_server/types.rs +14 -3
- package/crates/team-agent/src/mcp_server/wire.rs +230 -68
- package/crates/team-agent/src/messaging/delivery.rs +20 -18
- package/crates/team-agent/src/messaging/helpers.rs +25 -4
- package/crates/team-agent/src/messaging/leader_receiver.rs +4 -5
- package/crates/team-agent/src/messaging/mod.rs +2 -3
- package/crates/team-agent/src/messaging/selftest.rs +46 -26
- package/crates/team-agent/src/messaging/tests/main_preserved.rs +47 -12
- package/crates/team-agent/src/messaging/tests/runtime.rs +57 -22
- package/crates/team-agent/src/messaging/tests/spine.rs +154 -40
- package/crates/team-agent/src/messaging/tests/wave2.rs +31 -32
- package/crates/team-agent/src/messaging/trust.rs +25 -2
- package/crates/team-agent/src/messaging/watchers.rs +37 -9
- package/crates/team-agent/src/model/enums.rs +65 -16
- package/crates/team-agent/src/model/ids.rs +12 -3
- package/crates/team-agent/src/model/paths.rs +28 -7
- package/crates/team-agent/src/model/permissions.rs +176 -33
- package/crates/team-agent/src/model/routing.rs +66 -20
- package/crates/team-agent/src/model/spec.rs +365 -69
- package/crates/team-agent/src/model/task_graph.rs +36 -9
- package/crates/team-agent/src/model/yaml/tests.rs +24 -6
- package/crates/team-agent/src/model/yaml.rs +7 -6
- package/crates/team-agent/src/packaging/install.rs +23 -9
- package/crates/team-agent/src/packaging/migrate.rs +5 -7
- package/crates/team-agent/src/packaging/mod.rs +9 -1
- package/crates/team-agent/src/packaging/repair.rs +13 -6
- package/crates/team-agent/src/packaging/tests.rs +63 -16
- package/crates/team-agent/src/packaging/types.rs +22 -7
- package/crates/team-agent/src/platform/argv.rs +4 -1
- package/crates/team-agent/src/platform/file_lock.rs +22 -8
- package/crates/team-agent/src/platform/process.rs +21 -22
- package/crates/team-agent/src/provider/adapters/claude.rs +1 -3
- package/crates/team-agent/src/provider/approvals/parsing.rs +134 -26
- package/crates/team-agent/src/provider/approvals/runtime_prompts.rs +13 -3
- package/crates/team-agent/src/provider/classify.rs +127 -42
- package/crates/team-agent/src/provider/faults.rs +17 -5
- package/crates/team-agent/src/provider/helpers.rs +6 -5
- package/crates/team-agent/src/provider/startup_prompt.rs +75 -27
- package/crates/team-agent/src/state/repository.rs +27 -14
- package/crates/team-agent/src/tmux_backend/tests.rs +1637 -1398
- package/crates/team-agent/src/tmux_backend.rs +80 -44
- package/crates/team-agent/src/topology.rs +27 -20
- package/crates/team-agent/src/transport/test_support.rs +20 -23
- package/crates/team-agent/src/transport/tests/behavior.rs +292 -293
- package/crates/team-agent/src/transport/tests/mod.rs +178 -187
- package/crates/team-agent/src/transport/tests/wire.rs +561 -525
- package/crates/team-agent/src/transport.rs +12 -17
- package/crates/team-agent/src/transport_factory.rs +29 -14
- package/package.json +4 -4
|
@@ -381,10 +381,16 @@ fn scoped_clean_shutdown_persists_team_shutdown_status_after_disk_roundtrip() {
|
|
|
381
381
|
|
|
382
382
|
assert_eq!(out["ok"], json!(true), "shutdown report: {out}");
|
|
383
383
|
assert_eq!(out["session_killed"], json!(true), "shutdown report: {out}");
|
|
384
|
-
assert_eq!(
|
|
384
|
+
assert_eq!(
|
|
385
|
+
out["verification_degraded"],
|
|
386
|
+
json!(false),
|
|
387
|
+
"shutdown report: {out}"
|
|
388
|
+
);
|
|
385
389
|
let saved = crate::state::persist::load_runtime_state(&ws).unwrap();
|
|
386
390
|
assert_eq!(
|
|
387
|
-
saved
|
|
391
|
+
saved
|
|
392
|
+
.pointer("/teams/current/status")
|
|
393
|
+
.and_then(serde_json::Value::as_str),
|
|
388
394
|
Some("shutdown"),
|
|
389
395
|
"0.5.27 RED: clean scoped shutdown returned session_killed=true and not degraded, \
|
|
390
396
|
so disk state must persist teams.current.status=shutdown. The compact projected \
|
|
@@ -444,10 +450,16 @@ fn scoped_degraded_shutdown_does_not_persist_team_shutdown_status() {
|
|
|
444
450
|
.expect("shutdown should complete");
|
|
445
451
|
|
|
446
452
|
assert_eq!(out["session_killed"], json!(true), "shutdown report: {out}");
|
|
447
|
-
assert_eq!(
|
|
453
|
+
assert_eq!(
|
|
454
|
+
out["verification_degraded"],
|
|
455
|
+
json!(true),
|
|
456
|
+
"shutdown report: {out}"
|
|
457
|
+
);
|
|
448
458
|
let saved = crate::state::persist::load_runtime_state(&ws).unwrap();
|
|
449
459
|
assert_ne!(
|
|
450
|
-
saved
|
|
460
|
+
saved
|
|
461
|
+
.pointer("/teams/current/status")
|
|
462
|
+
.and_then(serde_json::Value::as_str),
|
|
451
463
|
Some("shutdown"),
|
|
452
464
|
"degraded shutdown must remain dirty/diagnostic and must not stamp \
|
|
453
465
|
teams.current.status=shutdown; saved={saved}"
|
|
@@ -808,7 +820,8 @@ fn shutdown_outcome_late_or_postcheck_gone_is_ok_with_lsof_diagnostic() {
|
|
|
808
820
|
cleanup_truth_degraded: false,
|
|
809
821
|
coordinator_timeout: true,
|
|
810
822
|
coordinator_stop_ok: None,
|
|
811
|
-
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
823
|
+
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
824
|
+
target_session_spared: false,
|
|
812
825
|
},
|
|
813
826
|
);
|
|
814
827
|
|
|
@@ -828,7 +841,8 @@ fn shutdown_outcome_coordinator_timeout_still_running_is_timeout() {
|
|
|
828
841
|
cleanup_truth_degraded: false,
|
|
829
842
|
coordinator_timeout: true,
|
|
830
843
|
coordinator_stop_ok: None,
|
|
831
|
-
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Running,
|
|
844
|
+
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Running,
|
|
845
|
+
target_session_spared: false,
|
|
832
846
|
},
|
|
833
847
|
);
|
|
834
848
|
|
|
@@ -848,7 +862,8 @@ fn shutdown_outcome_ps_table_degraded_still_partial_after_coordinator_gone() {
|
|
|
848
862
|
cleanup_truth_degraded: true,
|
|
849
863
|
coordinator_timeout: true,
|
|
850
864
|
coordinator_stop_ok: None,
|
|
851
|
-
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
865
|
+
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
866
|
+
target_session_spared: false,
|
|
852
867
|
},
|
|
853
868
|
);
|
|
854
869
|
|
|
@@ -1266,8 +1281,7 @@ fn unit0_classify_outcome_session_residual_returns_failed() {
|
|
|
1266
1281
|
cleanup_truth_degraded: false,
|
|
1267
1282
|
coordinator_timeout: false,
|
|
1268
1283
|
coordinator_stop_ok: Some(true),
|
|
1269
|
-
coordinator_post_stop:
|
|
1270
|
-
crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
1284
|
+
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
1271
1285
|
target_session_spared: false,
|
|
1272
1286
|
},
|
|
1273
1287
|
);
|
|
@@ -1286,8 +1300,7 @@ fn unit0_classify_outcome_coordinator_timeout_returns_timeout_phase() {
|
|
|
1286
1300
|
cleanup_truth_degraded: false,
|
|
1287
1301
|
coordinator_timeout: true,
|
|
1288
1302
|
coordinator_stop_ok: Some(false),
|
|
1289
|
-
coordinator_post_stop:
|
|
1290
|
-
crate::cli::lifecycle_port::CoordinatorStopObservation::Running,
|
|
1303
|
+
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Running,
|
|
1291
1304
|
target_session_spared: false,
|
|
1292
1305
|
},
|
|
1293
1306
|
);
|
|
@@ -1307,8 +1320,7 @@ fn unit0_classify_outcome_cleanup_truth_degraded_returns_partial_os_probe() {
|
|
|
1307
1320
|
cleanup_truth_degraded: true,
|
|
1308
1321
|
coordinator_timeout: false,
|
|
1309
1322
|
coordinator_stop_ok: Some(true),
|
|
1310
|
-
coordinator_post_stop:
|
|
1311
|
-
crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
1323
|
+
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
1312
1324
|
target_session_spared: false,
|
|
1313
1325
|
},
|
|
1314
1326
|
);
|
|
@@ -1331,8 +1343,7 @@ fn unit2_classify_outcome_target_session_spared_is_not_green() {
|
|
|
1331
1343
|
cleanup_truth_degraded: false,
|
|
1332
1344
|
coordinator_timeout: false,
|
|
1333
1345
|
coordinator_stop_ok: Some(true),
|
|
1334
|
-
coordinator_post_stop:
|
|
1335
|
-
crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
1346
|
+
coordinator_post_stop: crate::cli::lifecycle_port::CoordinatorStopObservation::Gone,
|
|
1336
1347
|
target_session_spared: true,
|
|
1337
1348
|
},
|
|
1338
1349
|
);
|