@team-agent/installer 0.5.62 → 0.5.63
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/coordinator/steps/abnormal.rs +11 -863
- package/crates/team-agent/src/coordinator/tests/api_error_recovery.rs +139 -366
- package/crates/team-agent/src/coordinator/tests/tick_core.rs +0 -7
- package/crates/team-agent/src/coordinator/tick.rs +0 -13
- package/crates/team-agent/src/lifecycle/restart/agent.rs +0 -63
- package/crates/team-agent/src/lifecycle/restart.rs +0 -4
- package/crates/team-agent/src/state/repository.rs +0 -13
- package/package.json +4 -4
|
@@ -825,69 +825,6 @@ pub(crate) fn stop_agent_with_transport(
|
|
|
825
825
|
)
|
|
826
826
|
}
|
|
827
827
|
|
|
828
|
-
/// 0.5.36 (`.team/artifacts/supermarket-api-error-recovery-locate.md` §7.3/§7.4):
|
|
829
|
-
/// api_error recovery entry point. Runs post-atomic_save from coordinator
|
|
830
|
-
/// tick to replace the stuck provider process on a retryable outage. It
|
|
831
|
-
/// resolves lifecycle paths, force-stops the live pane if the worker is
|
|
832
|
-
/// still alive (so `start_agent_at_paths(force=true)` cannot be a Noop —
|
|
833
|
-
/// see R3 contract), then starts the agent with `allow_fresh=false` to
|
|
834
|
-
/// preserve session context. Returns a small, typed outcome so the
|
|
835
|
-
/// caller only needs the delta for event emission; the underlying
|
|
836
|
-
/// lifecycle helpers own their state saves.
|
|
837
|
-
pub(crate) fn start_agent_at_paths_for_recovery(
|
|
838
|
-
workspace: &Path,
|
|
839
|
-
agent_id: &AgentId,
|
|
840
|
-
team: Option<&str>,
|
|
841
|
-
transport: &dyn crate::transport::Transport,
|
|
842
|
-
) -> Result<
|
|
843
|
-
crate::coordinator::steps::abnormal::RecoveryLifecycleOutcome,
|
|
844
|
-
crate::coordinator::steps::abnormal::RecoveryError,
|
|
845
|
-
> {
|
|
846
|
-
use crate::coordinator::steps::abnormal::{RecoveryError, RecoveryLifecycleOutcome};
|
|
847
|
-
let paths = match lifecycle_paths(workspace, team) {
|
|
848
|
-
Ok(paths) => paths,
|
|
849
|
-
Err(_) if team.is_none() => LifecyclePaths {
|
|
850
|
-
run_workspace: workspace.to_path_buf(),
|
|
851
|
-
spec_workspace: workspace.to_path_buf(),
|
|
852
|
-
selected: None,
|
|
853
|
-
},
|
|
854
|
-
Err(error) => return Err(RecoveryError::Lifecycle(error.to_string())),
|
|
855
|
-
};
|
|
856
|
-
let canonical_team = paths.canonical_team(team).map(str::to_string);
|
|
857
|
-
let team = canonical_team.as_deref();
|
|
858
|
-
// Best-effort stop: if the live pane still exists we tear it down so the
|
|
859
|
-
// subsequent start creates a fresh provider process instead of a Noop.
|
|
860
|
-
// Stop errors are absorbed into the start attempt result — the important
|
|
861
|
-
// invariant is that a successful start returns Running, never Noop.
|
|
862
|
-
let _ = stop_agent_with_transport(&paths.run_workspace, agent_id, team, transport);
|
|
863
|
-
let start_result = start_agent_with_transport(
|
|
864
|
-
&paths.run_workspace,
|
|
865
|
-
agent_id,
|
|
866
|
-
/* force */ true,
|
|
867
|
-
/* open_display */ false,
|
|
868
|
-
/* allow_fresh */ false,
|
|
869
|
-
team,
|
|
870
|
-
transport,
|
|
871
|
-
);
|
|
872
|
-
match start_result {
|
|
873
|
-
Ok(StartAgentOutcome::Running {
|
|
874
|
-
start_mode,
|
|
875
|
-
target,
|
|
876
|
-
env,
|
|
877
|
-
..
|
|
878
|
-
}) => Ok(RecoveryLifecycleOutcome {
|
|
879
|
-
start_mode: format!("{:?}", start_mode),
|
|
880
|
-
target,
|
|
881
|
-
coordinator_started: env.coordinator_started,
|
|
882
|
-
}),
|
|
883
|
-
Ok(StartAgentOutcome::Noop { .. }) => Err(RecoveryError::NoopBlocked),
|
|
884
|
-
Ok(StartAgentOutcome::Paused { .. }) => Err(RecoveryError::Lifecycle(
|
|
885
|
-
"agent is paused; recovery skipped".to_string(),
|
|
886
|
-
)),
|
|
887
|
-
Err(error) => Err(RecoveryError::Lifecycle(error.to_string())),
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
|
|
891
828
|
pub(super) fn stop_agent_at_paths(
|
|
892
829
|
workspace: &Path,
|
|
893
830
|
spec_workspace: &Path,
|
|
@@ -57,10 +57,6 @@ mod selection;
|
|
|
57
57
|
mod team_state;
|
|
58
58
|
|
|
59
59
|
pub(crate) use agent::start_agent_at_paths;
|
|
60
|
-
// 0.5.36 supermarket api_error recovery: coordinator post-save step calls
|
|
61
|
-
// this to replace a stuck provider process without going through the
|
|
62
|
-
// public start-agent CLI path.
|
|
63
|
-
pub(crate) use agent::start_agent_at_paths_for_recovery;
|
|
64
60
|
pub use agent::{reset_agent, start_agent, stop_agent};
|
|
65
61
|
pub(crate) use agent::{
|
|
66
62
|
reset_agent_with_transport, start_agent_with_transport, stop_agent_with_transport,
|
|
@@ -219,14 +219,6 @@ pub enum StateWriteIntent<'a> {
|
|
|
219
219
|
CoordinatorConptyShim {
|
|
220
220
|
team_key: Option<&'a str>,
|
|
221
221
|
},
|
|
222
|
-
/// 0.5.36 (`.team/artifacts/supermarket-api-error-recovery-locate.md` §7.3):
|
|
223
|
-
/// post-save recovery step writes back the recovery intent outcome
|
|
224
|
-
/// (attempts / status / last_error / blocked_reason). Distinct intent
|
|
225
|
-
/// so future S1b migration can route it deliberately.
|
|
226
|
-
CoordinatorApiErrorRecovery {
|
|
227
|
-
team_key: Option<&'a str>,
|
|
228
|
-
agent_id: Option<&'a str>,
|
|
229
|
-
},
|
|
230
222
|
McpAssignTask {
|
|
231
223
|
team_key: Option<&'a str>,
|
|
232
224
|
task_id: &'a str,
|
|
@@ -406,11 +398,6 @@ fn route_direct(
|
|
|
406
398
|
// CoordinatorConptyShim -> root save
|
|
407
399
|
// (coordinator/conpty_shim.rs:426/674).
|
|
408
400
|
StateWriteIntent::CoordinatorConptyShim { .. } => helper_write_root(workspace, state),
|
|
409
|
-
// 0.5.36 CoordinatorApiErrorRecovery -> root save. The recovery
|
|
410
|
-
// intent lives under `coordinator.abnormal_api_error_recovery`, a
|
|
411
|
-
// root-scoped bookkeeping namespace that must survive across team
|
|
412
|
-
// boundaries; use the same helper family as CoordinatorConptyShim.
|
|
413
|
-
StateWriteIntent::CoordinatorApiErrorRecovery { .. } => helper_write_root(workspace, state),
|
|
414
401
|
// McpAssignTask uses the reapply variant today; direct save routes
|
|
415
402
|
// to the root helper for parity.
|
|
416
403
|
StateWriteIntent::McpAssignTask { .. } => helper_write_root(workspace, state),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-agent/installer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.63",
|
|
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.
|
|
24
|
-
"@team-agent/cli-darwin-x64": "0.5.
|
|
25
|
-
"@team-agent/cli-linux-x64": "0.5.
|
|
23
|
+
"@team-agent/cli-darwin-arm64": "0.5.63",
|
|
24
|
+
"@team-agent/cli-darwin-x64": "0.5.63",
|
|
25
|
+
"@team-agent/cli-linux-x64": "0.5.63"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postinstall": "node npm/bincheck.mjs",
|