@team-agent/installer 0.5.75 → 0.5.77
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/README.md +9 -0
- package/README.zh.md +8 -0
- package/crates/team-agent/src/cli/adapters.rs +23 -96
- package/crates/team-agent/src/cli/emit.rs +35 -7
- package/crates/team-agent/src/cli/mod.rs +63 -42
- package/crates/team-agent/src/cli/models.rs +138 -27
- package/crates/team-agent/src/cli/status_port/brief.rs +1137 -0
- package/crates/team-agent/src/cli/status_port.rs +8 -0
- package/crates/team-agent/src/cli/tests/mod.rs +1 -0
- package/crates/team-agent/src/cli/tests/run_delegation.rs +29 -24
- package/crates/team-agent/src/cli/tests/status_brief.rs +691 -0
- package/crates/team-agent/src/cli/tests/status_send.rs +8 -2
- package/crates/team-agent/src/leader/lease.rs +46 -8
- package/crates/team-agent/src/leader/types.rs +4 -0
- package/crates/team-agent/src/lifecycle/launch/pi_mcp.rs +81 -4
- package/crates/team-agent/src/lifecycle/restart/rebuild.rs +11 -4
- package/crates/team-agent/src/lifecycle/tests/b0_reader_hideone_audit_contract.rs +45 -14
- package/crates/team-agent/src/lifecycle/tests/clone_agent_preserves_source_tools.rs +1 -0
- package/crates/team-agent/src/lifecycle/tests/harvest2_a_batch_red.rs +1 -1
- package/crates/team-agent/src/lifecycle/tests/phase_golden.rs +24 -28
- package/crates/team-agent/src/lifecycle/tests/upgrade_compat_0211_red.rs +22 -10
- package/crates/team-agent/src/lifecycle/types.rs +4 -0
- package/crates/team-agent/src/messaging/watchers.rs +48 -4
- package/crates/team-agent/src/state/paths.rs +17 -2
- package/crates/team-agent/src/state/projection.rs +18 -2
- package/crates/team-agent/src/state/selector.rs +23 -3
- package/crates/team-agent/src/test_support/models_timeout_fixture.rs +122 -0
- package/package.json +4 -4
|
@@ -34,6 +34,14 @@ use store::{
|
|
|
34
34
|
mod compact;
|
|
35
35
|
pub(super) use compact::*;
|
|
36
36
|
|
|
37
|
+
mod brief;
|
|
38
|
+
pub(crate) use brief::{format_status_brief, registered_agent_exists, status_brief_scoped};
|
|
39
|
+
#[cfg(test)]
|
|
40
|
+
pub(crate) use brief::{
|
|
41
|
+
with_test_nodeprobe, with_test_nodeprobe_candidates, with_test_nodeprobe_resolver_delay,
|
|
42
|
+
with_test_nodeprobe_unbound, ResolverDelaySignal,
|
|
43
|
+
};
|
|
44
|
+
|
|
37
45
|
mod runtime;
|
|
38
46
|
pub(super) use runtime::*;
|
|
39
47
|
|
|
@@ -335,13 +335,12 @@ fn cli_add_agent_duplicate_id_surfaces_real_error() {
|
|
|
335
335
|
);
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
// 5 [P1] — cmd_status --json
|
|
339
|
-
//
|
|
340
|
-
//
|
|
341
|
-
//
|
|
342
|
-
// counts. OS-safe (all reads/seeds, no spawn).
|
|
338
|
+
// 5 [P1] — cmd_status --json emits the concise seven-field node projection.
|
|
339
|
+
// Status must not leak coordinator/db/history diagnostics; missing exact nodeprobe evidence remains
|
|
340
|
+
// an explicit unknown projection. The fixture still seeds a real store to ensure the status path
|
|
341
|
+
// does not accidentally depend on coordinator or mailbox reads.
|
|
343
342
|
#[test]
|
|
344
|
-
fn
|
|
343
|
+
fn cli_status_emits_seven_field_brief_without_diagnostics() {
|
|
345
344
|
let ws = seed_status_workspace(); // writes .team/runtime/state.json
|
|
346
345
|
let store = crate::message_store::MessageStore::open(&ws).unwrap();
|
|
347
346
|
let _ = store
|
|
@@ -386,25 +385,31 @@ fn cli_status_reflects_real_coordinator_health_and_db_counts() {
|
|
|
386
385
|
CmdOutput::Json(v) => v,
|
|
387
386
|
other => panic!("status --json must yield a Json CmdOutput; got {other:?}"),
|
|
388
387
|
};
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
"status
|
|
393
|
-
|
|
394
|
-
|
|
388
|
+
let nodes = value
|
|
389
|
+
.get("nodes")
|
|
390
|
+
.and_then(serde_json::Value::as_array)
|
|
391
|
+
.expect("status brief must expose a nodes array");
|
|
392
|
+
assert_eq!(nodes.len(), 1);
|
|
393
|
+
let fields: std::collections::BTreeSet<&str> = nodes[0]
|
|
394
|
+
.as_object()
|
|
395
|
+
.expect("status brief node must be an object")
|
|
396
|
+
.keys()
|
|
397
|
+
.map(String::as_str)
|
|
398
|
+
.collect();
|
|
399
|
+
assert_eq!(
|
|
400
|
+
fields,
|
|
401
|
+
[
|
|
402
|
+
"name",
|
|
403
|
+
"provider",
|
|
404
|
+
"runtime_status",
|
|
405
|
+
"activity",
|
|
406
|
+
"health",
|
|
407
|
+
"session_name",
|
|
408
|
+
"tmux_command",
|
|
409
|
+
]
|
|
410
|
+
.into_iter()
|
|
411
|
+
.collect()
|
|
395
412
|
);
|
|
396
|
-
assert_ne!(
|
|
397
|
-
value["messages"],
|
|
398
|
-
json!({"count": 0}),
|
|
399
|
-
"status `messages` must reflect the REAL DB rows (2 seeded), not the placeholder's {{count:0}}; got {}",
|
|
400
|
-
value["messages"]
|
|
401
|
-
);
|
|
402
|
-
assert_ne!(
|
|
403
|
-
value["results"],
|
|
404
|
-
json!({"count": 0}),
|
|
405
|
-
"status `results` must reflect the REAL DB result row, not the placeholder's {{count:0}}; got {}",
|
|
406
|
-
value["results"]
|
|
407
|
-
);
|
|
408
413
|
}
|
|
409
414
|
|
|
410
415
|
// 6 [P1] — cmd_shutdown delegates to the REAL crate::coordinator::stop_coordinator (+ tmux
|