@team-agent/installer 0.4.11 → 0.5.1
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 +1 -0
- package/crates/team-agent/src/cli/diagnose.rs +2 -15
- package/crates/team-agent/src/cli/emit.rs +98 -5
- package/crates/team-agent/src/cli/mod.rs +2 -0
- package/crates/team-agent/src/cli/named_address.rs +864 -0
- package/crates/team-agent/src/cli/send.rs +104 -0
- package/crates/team-agent/src/cli/tests/leader_watch.rs +1 -0
- package/crates/team-agent/src/cli/tests/mod.rs +1 -0
- package/crates/team-agent/src/cli/tests/named_address.rs +455 -0
- package/crates/team-agent/src/cli/tests/status_send.rs +1 -0
- package/crates/team-agent/src/cli/types.rs +4 -0
- package/crates/team-agent/src/compiler.rs +11 -20
- package/crates/team-agent/src/coordinator/orphan.rs +2 -2
- package/crates/team-agent/src/coordinator/runtime_detectors.rs +5 -4
- package/crates/team-agent/src/coordinator/steps/abnormal.rs +1776 -2
- package/crates/team-agent/src/coordinator/steps/mod.rs +19 -0
- package/crates/team-agent/src/coordinator/tests/a0_lostupdate.rs +78 -7
- package/crates/team-agent/src/coordinator/tests/abnormal.rs +195 -0
- package/crates/team-agent/src/coordinator/tick.rs +31 -932
- package/crates/team-agent/src/diagnose/orphans.rs +66 -8
- package/crates/team-agent/src/layout/worker_window_helpers.rs +5 -7
- package/crates/team-agent/src/leader/provider_attribution.rs +7 -5
- package/crates/team-agent/src/leader/rediscover.rs +1 -11
- package/crates/team-agent/src/lifecycle/launch/plan.rs +19 -8
- package/crates/team-agent/src/lifecycle/launch.rs +135 -58
- package/crates/team-agent/src/lifecycle/lock.rs +302 -0
- package/crates/team-agent/src/lifecycle/mod.rs +1 -0
- package/crates/team-agent/src/lifecycle/profile_smoke.rs +1 -11
- package/crates/team-agent/src/lifecycle/restart/agent.rs +169 -113
- package/crates/team-agent/src/lifecycle/restart/common.rs +108 -17
- package/crates/team-agent/src/lifecycle/restart/rebuild.rs +165 -32
- package/crates/team-agent/src/lifecycle/restart/remove.rs +16 -2
- package/crates/team-agent/src/lifecycle/restart/selection.rs +2 -1
- package/crates/team-agent/src/lifecycle/tests/agent_ops.rs +6 -0
- package/crates/team-agent/src/lifecycle/tests/lane_ops.rs +3 -3
- package/crates/team-agent/src/lifecycle/tests/lifecycle_lock.rs +321 -0
- package/crates/team-agent/src/lifecycle/tests/main_preserved.rs +35 -5
- package/crates/team-agent/src/lifecycle/tests/phase_b_contracts.rs +802 -0
- package/crates/team-agent/src/lifecycle/tests/phase_golden.rs +675 -0
- package/crates/team-agent/src/lifecycle/tests.rs +3 -0
- package/crates/team-agent/src/lifecycle/types.rs +8 -0
- package/crates/team-agent/src/mcp_server/lifecycle_tools/state_status.rs +24 -9
- package/crates/team-agent/src/mcp_server/tools.rs +157 -68
- package/crates/team-agent/src/messaging/activity.rs +43 -18
- package/crates/team-agent/src/messaging/delivery.rs +161 -97
- package/crates/team-agent/src/messaging/helpers.rs +1 -0
- package/crates/team-agent/src/messaging/leader_receiver.rs +22 -1
- package/crates/team-agent/src/messaging/results.rs +34 -9
- package/crates/team-agent/src/messaging/scheduler.rs +52 -9
- package/crates/team-agent/src/model/spec.rs +10 -6
- package/crates/team-agent/src/provider/adapter.rs +10 -1038
- package/crates/team-agent/src/provider/adapters/claude.rs +3 -8
- package/crates/team-agent/src/provider/adapters/copilot.rs +2 -5
- package/crates/team-agent/src/provider/classify.rs +23 -48
- package/crates/team-agent/src/provider/command.rs +16 -7
- package/crates/team-agent/src/provider/faults.rs +93 -53
- package/crates/team-agent/src/provider/session/capture.rs +4 -15
- package/crates/team-agent/src/provider/session_scan/claude.rs +309 -0
- package/crates/team-agent/src/provider/session_scan/codex.rs +40 -0
- package/crates/team-agent/src/provider/session_scan/common.rs +350 -0
- package/crates/team-agent/src/provider/session_scan/copilot.rs +202 -0
- package/crates/team-agent/src/provider/session_scan.rs +65 -27
- package/crates/team-agent/src/provider/tests/faults.rs +80 -0
- package/crates/team-agent/src/provider/types.rs +33 -1
- package/crates/team-agent/src/provider/wire.rs +171 -1
- package/crates/team-agent/src/state/identity.rs +242 -57
- package/crates/team-agent/src/state/identity_keys.rs +9 -12
- package/crates/team-agent/src/state/mod.rs +5 -1
- package/crates/team-agent/src/state/owner_gate.rs +59 -15
- package/crates/team-agent/src/state/ownership.rs +12 -11
- package/crates/team-agent/src/state/paths.rs +13 -6
- package/crates/team-agent/src/state/persist.rs +671 -128
- package/crates/team-agent/src/state/projection.rs +240 -49
- package/crates/team-agent/src/state/selector.rs +11 -5
- package/crates/team-agent/src/tmux_backend/tests.rs +51 -2
- package/crates/team-agent/src/tmux_backend.rs +42 -5
- package/crates/team-agent/src/transport/test_support.rs +55 -6
- package/package.json +4 -4
|
@@ -317,6 +317,31 @@ impl OfflineTransport {
|
|
|
317
317
|
state
|
|
318
318
|
.pane_presence
|
|
319
319
|
.insert(format!("%{pane_index}"), state.spawned_panes_addressable);
|
|
320
|
+
state.liveness.insert(
|
|
321
|
+
format!("%{pane_index}"),
|
|
322
|
+
if state.spawned_panes_addressable {
|
|
323
|
+
PaneLiveness::Live
|
|
324
|
+
} else {
|
|
325
|
+
PaneLiveness::Dead
|
|
326
|
+
},
|
|
327
|
+
);
|
|
328
|
+
if state.spawned_panes_addressable {
|
|
329
|
+
let pane_id = PaneId::new(format!("%{pane_index}"));
|
|
330
|
+
state.targets.retain(|target| target.pane_id != pane_id);
|
|
331
|
+
state.targets.push(PaneInfo {
|
|
332
|
+
pane_id,
|
|
333
|
+
session: session.clone(),
|
|
334
|
+
window_index: None,
|
|
335
|
+
window_name: Some(window.clone()),
|
|
336
|
+
pane_index: None,
|
|
337
|
+
tty: None,
|
|
338
|
+
current_command: None,
|
|
339
|
+
current_path: None,
|
|
340
|
+
active: false,
|
|
341
|
+
pane_pid: None,
|
|
342
|
+
leader_env: BTreeMap::new(),
|
|
343
|
+
});
|
|
344
|
+
}
|
|
320
345
|
Ok(pane_index)
|
|
321
346
|
})?;
|
|
322
347
|
Ok(SpawnResult {
|
|
@@ -527,18 +552,42 @@ impl Transport for OfflineTransport {
|
|
|
527
552
|
Ok(SetEnvOutcome::Applied)
|
|
528
553
|
}
|
|
529
554
|
|
|
530
|
-
fn kill_session(&self,
|
|
531
|
-
self.
|
|
555
|
+
fn kill_session(&self, session: &SessionName) -> Result<(), TransportError> {
|
|
556
|
+
self.with_state(|state| {
|
|
557
|
+
state.calls.push("kill_session");
|
|
558
|
+
state.targets.retain(|target| target.session != *session);
|
|
559
|
+
state.windows.clear();
|
|
560
|
+
state.session_present = false;
|
|
561
|
+
});
|
|
532
562
|
Ok(())
|
|
533
563
|
}
|
|
534
564
|
|
|
535
|
-
fn kill_window(&self,
|
|
536
|
-
self.
|
|
565
|
+
fn kill_window(&self, target: &Target) -> Result<(), TransportError> {
|
|
566
|
+
self.with_state(|state| {
|
|
567
|
+
state.calls.push("kill_window");
|
|
568
|
+
if let Target::SessionWindow { session, window } = target {
|
|
569
|
+
state.targets.retain(|pane| {
|
|
570
|
+
pane.session != *session
|
|
571
|
+
|| pane
|
|
572
|
+
.window_name
|
|
573
|
+
.as_ref()
|
|
574
|
+
.is_none_or(|name| name != window)
|
|
575
|
+
});
|
|
576
|
+
state.windows.retain(|name| name != window);
|
|
577
|
+
}
|
|
578
|
+
});
|
|
537
579
|
Ok(())
|
|
538
580
|
}
|
|
539
581
|
|
|
540
|
-
fn kill_pane(&self,
|
|
541
|
-
self.
|
|
582
|
+
fn kill_pane(&self, pane: &PaneId) -> Result<(), TransportError> {
|
|
583
|
+
self.with_state(|state| {
|
|
584
|
+
state.calls.push("kill_pane");
|
|
585
|
+
state.targets.retain(|target| target.pane_id != *pane);
|
|
586
|
+
state.pane_presence.insert(pane.as_str().to_string(), false);
|
|
587
|
+
state
|
|
588
|
+
.liveness
|
|
589
|
+
.insert(pane.as_str().to_string(), PaneLiveness::Dead);
|
|
590
|
+
});
|
|
542
591
|
Ok(())
|
|
543
592
|
}
|
|
544
593
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-agent/installer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
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.
|
|
24
|
-
"@team-agent/cli-darwin-x64": "0.
|
|
25
|
-
"@team-agent/cli-linux-x64": "0.
|
|
23
|
+
"@team-agent/cli-darwin-arm64": "0.5.1",
|
|
24
|
+
"@team-agent/cli-darwin-x64": "0.5.1",
|
|
25
|
+
"@team-agent/cli-linux-x64": "0.5.1"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postinstall": "node npm/bincheck.mjs",
|