@team-agent/installer 0.5.29 → 0.5.31
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
CHANGED
package/Cargo.toml
CHANGED
|
@@ -295,13 +295,33 @@ pub fn cmd_status_for_team(args: &StatusArgs, team: Option<&str>) -> Result<CmdR
|
|
|
295
295
|
)?;
|
|
296
296
|
return Ok(CmdResult::from_json(value, true));
|
|
297
297
|
}
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
let mut text = status_port::format_status_scoped(
|
|
299
|
+
&selected.run_workspace,
|
|
300
|
+
&selected.state,
|
|
301
|
+
Some(&selected.team_key),
|
|
302
|
+
args.agent.as_deref(),
|
|
303
|
+
)?;
|
|
304
|
+
if args.detail {
|
|
305
|
+
let value = status_port::status_scoped(
|
|
300
306
|
&selected.run_workspace,
|
|
301
307
|
&selected.state,
|
|
302
308
|
Some(&selected.team_key),
|
|
303
|
-
|
|
304
|
-
|
|
309
|
+
false,
|
|
310
|
+
true,
|
|
311
|
+
)?;
|
|
312
|
+
if let Some(hint) = value
|
|
313
|
+
.pointer("/runtime/hint")
|
|
314
|
+
.and_then(serde_json::Value::as_str)
|
|
315
|
+
.filter(|hint| !hint.is_empty())
|
|
316
|
+
{
|
|
317
|
+
if !text.is_empty() {
|
|
318
|
+
text.push('\n');
|
|
319
|
+
}
|
|
320
|
+
text.push_str(hint);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
Ok(CmdResult::human(append_reminder(
|
|
324
|
+
text,
|
|
305
325
|
crate::cli::STATUS_REMINDER,
|
|
306
326
|
)))
|
|
307
327
|
}
|
|
@@ -443,7 +443,8 @@ pub fn claim_leader(
|
|
|
443
443
|
let targets = claim_leader_targets(workspace, &raw_state);
|
|
444
444
|
let caller_candidate = targets
|
|
445
445
|
.iter()
|
|
446
|
-
.
|
|
446
|
+
.filter(|target| target.info.pane_id.as_str() == caller)
|
|
447
|
+
.min_by_key(|target| target.source.priority());
|
|
447
448
|
let caller_pane_info = caller_candidate.map(|target| &target.info);
|
|
448
449
|
let caller_target = caller_candidate.and_then(|target| {
|
|
449
450
|
claim_target_from_pane_info(workspace, &target.info).map(|mut claim_target| {
|
|
@@ -1220,10 +1221,45 @@ struct LeaderClaimTarget {
|
|
|
1220
1221
|
struct ClaimLeaderTargetCandidate {
|
|
1221
1222
|
info: PaneInfo,
|
|
1222
1223
|
endpoint: Option<String>,
|
|
1224
|
+
source: ClaimLeaderTargetSource,
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
#[derive(Clone, Copy, PartialEq, Eq)]
|
|
1228
|
+
enum ClaimLeaderTargetSource {
|
|
1229
|
+
StateRecorded,
|
|
1230
|
+
Workspace,
|
|
1231
|
+
CurrentTmux,
|
|
1232
|
+
Default,
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
impl ClaimLeaderTargetSource {
|
|
1236
|
+
fn priority(self) -> u8 {
|
|
1237
|
+
match self {
|
|
1238
|
+
Self::StateRecorded => 0,
|
|
1239
|
+
Self::Workspace => 1,
|
|
1240
|
+
Self::CurrentTmux => 2,
|
|
1241
|
+
Self::Default => 3,
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1223
1244
|
}
|
|
1224
1245
|
|
|
1225
1246
|
fn claim_leader_targets(workspace: &Path, state: &Value) -> Vec<ClaimLeaderTargetCandidate> {
|
|
1226
1247
|
let mut targets = Vec::new();
|
|
1248
|
+
if let Some(endpoint) = crate::tmux_backend::socket_name_from_tmux_env() {
|
|
1249
|
+
let backend = tmux_backend_for_endpoint(&endpoint);
|
|
1250
|
+
let resolved_endpoint = backend.tmux_endpoint();
|
|
1251
|
+
targets.extend(
|
|
1252
|
+
backend
|
|
1253
|
+
.list_targets()
|
|
1254
|
+
.unwrap_or_default()
|
|
1255
|
+
.into_iter()
|
|
1256
|
+
.map(|info| ClaimLeaderTargetCandidate {
|
|
1257
|
+
info,
|
|
1258
|
+
endpoint: resolved_endpoint.clone(),
|
|
1259
|
+
source: ClaimLeaderTargetSource::CurrentTmux,
|
|
1260
|
+
}),
|
|
1261
|
+
);
|
|
1262
|
+
}
|
|
1227
1263
|
for endpoint in state_recorded_tmux_endpoints(state) {
|
|
1228
1264
|
let backend = tmux_backend_for_endpoint(&endpoint);
|
|
1229
1265
|
let resolved_endpoint = backend.tmux_endpoint();
|
|
@@ -1235,6 +1271,7 @@ fn claim_leader_targets(workspace: &Path, state: &Value) -> Vec<ClaimLeaderTarge
|
|
|
1235
1271
|
.map(|info| ClaimLeaderTargetCandidate {
|
|
1236
1272
|
info,
|
|
1237
1273
|
endpoint: resolved_endpoint.clone(),
|
|
1274
|
+
source: ClaimLeaderTargetSource::StateRecorded,
|
|
1238
1275
|
}),
|
|
1239
1276
|
);
|
|
1240
1277
|
}
|
|
@@ -1248,6 +1285,7 @@ fn claim_leader_targets(workspace: &Path, state: &Value) -> Vec<ClaimLeaderTarge
|
|
|
1248
1285
|
.map(|info| ClaimLeaderTargetCandidate {
|
|
1249
1286
|
info,
|
|
1250
1287
|
endpoint: workspace_endpoint.clone(),
|
|
1288
|
+
source: ClaimLeaderTargetSource::Workspace,
|
|
1251
1289
|
}),
|
|
1252
1290
|
);
|
|
1253
1291
|
let default_backend = crate::transport_factory::tmux_default_transport();
|
|
@@ -1260,6 +1298,7 @@ fn claim_leader_targets(workspace: &Path, state: &Value) -> Vec<ClaimLeaderTarge
|
|
|
1260
1298
|
.map(|info| ClaimLeaderTargetCandidate {
|
|
1261
1299
|
info,
|
|
1262
1300
|
endpoint: default_endpoint.clone(),
|
|
1301
|
+
source: ClaimLeaderTargetSource::Default,
|
|
1263
1302
|
}),
|
|
1264
1303
|
);
|
|
1265
1304
|
targets
|
|
@@ -433,7 +433,9 @@ fn restart_with_selected_team_and_transport(
|
|
|
433
433
|
&decision.agent_id,
|
|
434
434
|
&raw_agent,
|
|
435
435
|
);
|
|
436
|
-
if
|
|
436
|
+
if endpoint_convergence_fake_harness_enabled(&state)
|
|
437
|
+
&& is_fake_model_harness_agent(&agent)
|
|
438
|
+
{
|
|
437
439
|
write_fake_harness_spawn_argv_event(
|
|
438
440
|
&selected.run_workspace,
|
|
439
441
|
decision,
|
|
@@ -1242,7 +1244,7 @@ fn restart_worker_panes_addressable(
|
|
|
1242
1244
|
if decisions.is_empty() {
|
|
1243
1245
|
return true;
|
|
1244
1246
|
}
|
|
1245
|
-
if
|
|
1247
|
+
if endpoint_convergence_fake_harness_enabled(state)
|
|
1246
1248
|
&& decisions.iter().all(|decision| {
|
|
1247
1249
|
state
|
|
1248
1250
|
.get("agents")
|
|
@@ -2489,6 +2491,11 @@ fn has_endpoint_convergence_marker(state: &serde_json::Value) -> bool {
|
|
|
2489
2491
|
== Some("converged")
|
|
2490
2492
|
}
|
|
2491
2493
|
|
|
2494
|
+
fn endpoint_convergence_fake_harness_enabled(state: &serde_json::Value) -> bool {
|
|
2495
|
+
has_endpoint_convergence_marker(state)
|
|
2496
|
+
&& std::env::var_os("TEAM_AGENT_TEST_ENDPOINT_CONVERGENCE_HARNESS_SPEC_FALLBACK").is_some()
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2492
2499
|
fn is_fake_model_harness_agent(agent: &serde_json::Value) -> bool {
|
|
2493
2500
|
agent_provider(agent) == crate::model::enums::Provider::Fake
|
|
2494
2501
|
&& agent.get("model").and_then(serde_json::Value::as_str) == Some("fake")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-agent/installer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.31",
|
|
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.31",
|
|
24
|
+
"@team-agent/cli-darwin-x64": "0.5.31",
|
|
25
|
+
"@team-agent/cli-linux-x64": "0.5.31"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postinstall": "node npm/bincheck.mjs",
|