@team-agent/installer 0.5.99 → 0.5.101
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 -156
- package/crates/team-agent/src/cli/diagnose.rs +32 -10
- package/crates/team-agent/src/cli/emit.rs +6 -185
- package/crates/team-agent/src/cli/mod.rs +32 -182
- package/crates/team-agent/src/cli/send/coordinator.rs +2 -2
- package/crates/team-agent/src/cli/spec.rs +41 -67
- package/crates/team-agent/src/cli/tests/main_preserved.rs +2 -185
- package/crates/team-agent/src/cli/tests/missing_subcommands.rs +9 -9
- package/crates/team-agent/src/cli/triage.rs +1 -1
- package/crates/team-agent/src/cli/types.rs +0 -49
- package/crates/team-agent/src/compiler.rs +3 -0
- package/crates/team-agent/src/leader/lease.rs +1 -1
- package/crates/team-agent/src/lifecycle/launch/add_agent_state.rs +211 -16
- package/crates/team-agent/src/lifecycle/launch/clone_agent.rs +1 -0
- package/crates/team-agent/src/lifecycle/launch/fork_agent.rs +15 -5
- package/crates/team-agent/src/lifecycle/launch/fork_entry.rs +89 -6
- package/crates/team-agent/src/lifecycle/launch/role_source.rs +168 -32
- package/crates/team-agent/src/lifecycle/launch.rs +11 -3
- package/crates/team-agent/src/lifecycle/profile_launch.rs +23 -8
- package/crates/team-agent/src/lifecycle/restart/agent.rs +2 -2
- package/crates/team-agent/src/lifecycle/restart/avatar.rs +1806 -0
- package/crates/team-agent/src/lifecycle/restart/common.rs +114 -1
- package/crates/team-agent/src/lifecycle/restart/rebuild.rs +14 -8
- package/crates/team-agent/src/lifecycle/restart/selection.rs +14 -2
- package/crates/team-agent/src/lifecycle/restart.rs +11 -4
- package/crates/team-agent/src/lifecycle/tests/b0_reader_hideone_audit_contract.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests/claude_profile_launch_red.rs +1 -1
- package/crates/team-agent/src/lifecycle/tests/phase_golden.rs +9 -2
- package/crates/team-agent/src/lifecycle/tests/pi_fork_session_inheritance_red.rs +1398 -0
- package/crates/team-agent/src/lifecycle/tests/realmachine_clusters_1_6_red.rs +0 -60
- package/crates/team-agent/src/lifecycle/tests/team_in_team_identity_scope_red.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests.rs +1 -0
- package/crates/team-agent/src/lifecycle/types.rs +10 -2
- package/crates/team-agent/src/messaging/send.rs +2 -2
- package/crates/team-agent/src/model/spec.rs +1 -0
- package/crates/team-agent/src/provider/types.rs +3 -1
- package/crates/team-agent/src/state/persist.rs +58 -2
- package/crates/team-agent/src/state/projection.rs +5 -1
- package/crates/team-agent/src/state/repository.rs +125 -9
- package/crates/team-agent/src/transport/test_support.rs +23 -3
- package/package.json +4 -4
- package/skills/team-agent/SKILL.md +17 -46
- package/skills/team-agent/references/recovery-runbook.md +2 -2
- package/skills/team-agent/references/team-agent-operator.md +4 -2
- package/skills/team-agent/references/team-in-team.md +0 -6
|
@@ -45,7 +45,7 @@ use serde_json::{json, Map, Value};
|
|
|
45
45
|
use thiserror::Error;
|
|
46
46
|
|
|
47
47
|
// REUSE in-tree(只 import,不 redefine):
|
|
48
|
-
use crate::messaging::{self,
|
|
48
|
+
use crate::messaging::{self, MessageTarget, SendOptions, TrustedSender};
|
|
49
49
|
use crate::model::ids::{TaskId, TeamKey};
|
|
50
50
|
|
|
51
51
|
pub(crate) const COMMS_BOUNDARY_TEXT: &str = "validates live pane binding consistency and zero-token comms contracts. Does NOT perform live runtime message round-trip. (zero token, zero pollution)";
|
|
@@ -119,7 +119,7 @@ mod hermetic_test_support;
|
|
|
119
119
|
pub mod status_port;
|
|
120
120
|
|
|
121
121
|
/// PLACEHOLDER → step13 lifecycle(`runtime.{quick_start,start_agent,add_agent,fork_agent,
|
|
122
|
-
/// remove_agent,start_agent,stop_agent,reset_agent,restart,shutdown,start_leader
|
|
122
|
+
/// remove_agent,start_agent,stop_agent,reset_agent,restart,shutdown,start_leader}`)。
|
|
123
123
|
/// `quick_start.py` 物理在本子系统但实现属 step 13(card)。本层只声明委派面。
|
|
124
124
|
pub mod lifecycle_port {
|
|
125
125
|
use super::*;
|
|
@@ -2926,14 +2926,30 @@ pub mod lifecycle_port {
|
|
|
2926
2926
|
let source = crate::model::ids::AgentId::new(source_agent);
|
|
2927
2927
|
let dest = crate::model::ids::AgentId::new(as_agent_id);
|
|
2928
2928
|
match crate::lifecycle::fork_agent(workspace, &source, &dest, label, true, team) {
|
|
2929
|
-
Ok(report) =>
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2929
|
+
Ok(report) => {
|
|
2930
|
+
let mut value = json!({
|
|
2931
|
+
"ok": true,
|
|
2932
|
+
"source_agent_id": report.source_agent_id.as_str(),
|
|
2933
|
+
"new_agent_id": report.new_agent_id.as_str(),
|
|
2934
|
+
"session_id": report.session_id.as_ref().map(|session| session.as_str()),
|
|
2935
|
+
"new_session_id": report.session_id.as_ref().map(|session| session.as_str()),
|
|
2936
|
+
"backing_state": report.backing_state,
|
|
2937
|
+
});
|
|
2938
|
+
if let (Some(details), Some(object)) = (report.pi_fork, value.as_object_mut()) {
|
|
2939
|
+
object.insert("status".to_string(), json!("forked"));
|
|
2940
|
+
object.insert("target".to_string(), json!(report.new_agent_id.as_str()));
|
|
2941
|
+
object.insert(
|
|
2942
|
+
"source_session_id".to_string(),
|
|
2943
|
+
json!(details.source_session_id.as_str()),
|
|
2944
|
+
);
|
|
2945
|
+
object.insert("session_id".to_string(), json!(details.session_id.as_str()));
|
|
2946
|
+
object.insert(
|
|
2947
|
+
"backing_path".to_string(),
|
|
2948
|
+
json!(details.backing_path.0.to_string_lossy().to_string()),
|
|
2949
|
+
);
|
|
2950
|
+
}
|
|
2951
|
+
Ok(value)
|
|
2952
|
+
}
|
|
2937
2953
|
Err(e) => Ok(error_value(e)),
|
|
2938
2954
|
}
|
|
2939
2955
|
}
|
|
@@ -3132,60 +3148,6 @@ pub mod lifecycle_port {
|
|
|
3132
3148
|
format!("'{}'", raw.replace('\'', "'\\''"))
|
|
3133
3149
|
}
|
|
3134
3150
|
}
|
|
3135
|
-
///
|
|
3136
|
-
/// `runtime.acknowledge_idle`(`cmd_acknowledge_idle`)。
|
|
3137
|
-
pub fn acknowledge_idle(workspace: &Path, team: Option<&str>) -> Result<Value, CliError> {
|
|
3138
|
-
let mut state = crate::state::persist::load_runtime_state(workspace)
|
|
3139
|
-
.map_err(|e| CliError::Runtime(e.to_string()))?;
|
|
3140
|
-
let team = team
|
|
3141
|
-
.map(ToString::to_string)
|
|
3142
|
-
.or_else(|| {
|
|
3143
|
-
state
|
|
3144
|
-
.get("active_team_key")
|
|
3145
|
-
.and_then(Value::as_str)
|
|
3146
|
-
.map(ToString::to_string)
|
|
3147
|
-
})
|
|
3148
|
-
.filter(|s| !s.is_empty())
|
|
3149
|
-
.or_else(|| {
|
|
3150
|
-
workspace
|
|
3151
|
-
.file_name()
|
|
3152
|
-
.map(|name| name.to_string_lossy().to_string())
|
|
3153
|
-
})
|
|
3154
|
-
.unwrap_or_else(|| "current".to_string());
|
|
3155
|
-
let now = chrono::Utc::now().to_rfc3339();
|
|
3156
|
-
let ttl_seconds = 1800;
|
|
3157
|
-
let expires_at = (chrono::Utc::now() + chrono::Duration::seconds(ttl_seconds)).to_rfc3339();
|
|
3158
|
-
record_idle_acknowledged(&mut state, &team, &now, &expires_at, ttl_seconds);
|
|
3159
|
-
suppress_team_idle_fallbacks(&mut state, &team, &now, &expires_at, ttl_seconds);
|
|
3160
|
-
let agent_id = state
|
|
3161
|
-
.get("agents")
|
|
3162
|
-
.and_then(Value::as_object)
|
|
3163
|
-
.and_then(|agents| agents.keys().next().cloned())
|
|
3164
|
-
.map(Value::String)
|
|
3165
|
-
.unwrap_or(Value::Null);
|
|
3166
|
-
crate::state::repository::StateRepository::new(workspace)
|
|
3167
|
-
.save(
|
|
3168
|
-
crate::state::repository::StateWriteIntent::IdleAck {
|
|
3169
|
-
team_key: Some(&team),
|
|
3170
|
-
},
|
|
3171
|
-
&state,
|
|
3172
|
-
)
|
|
3173
|
-
.map_err(|e| CliError::Runtime(e.to_string()))?;
|
|
3174
|
-
crate::event_log::EventLog::new(workspace)
|
|
3175
|
-
.write(
|
|
3176
|
-
"coordinator.idle_acknowledged",
|
|
3177
|
-
json!({"team": team, "ttl_seconds": ttl_seconds}),
|
|
3178
|
-
)
|
|
3179
|
-
.map_err(|e| CliError::Runtime(e.to_string()))?;
|
|
3180
|
-
Ok(json!({
|
|
3181
|
-
"ok": true,
|
|
3182
|
-
"team": team,
|
|
3183
|
-
"agent_id": agent_id,
|
|
3184
|
-
"acknowledged_at": now,
|
|
3185
|
-
"expires_at": expires_at,
|
|
3186
|
-
"ttl_seconds": ttl_seconds,
|
|
3187
|
-
}))
|
|
3188
|
-
}
|
|
3189
3151
|
|
|
3190
3152
|
fn error_value(error: crate::lifecycle::LifecycleError) -> Value {
|
|
3191
3153
|
let message = error.to_string();
|
|
@@ -3240,118 +3202,6 @@ pub mod lifecycle_port {
|
|
|
3240
3202
|
None
|
|
3241
3203
|
}
|
|
3242
3204
|
|
|
3243
|
-
fn record_idle_acknowledged(
|
|
3244
|
-
state: &mut Value,
|
|
3245
|
-
team: &str,
|
|
3246
|
-
acknowledged_at: &str,
|
|
3247
|
-
expires_at: &str,
|
|
3248
|
-
ttl_seconds: i64,
|
|
3249
|
-
) {
|
|
3250
|
-
let Some(root) = state.as_object_mut() else {
|
|
3251
|
-
return;
|
|
3252
|
-
};
|
|
3253
|
-
let coordinator = root
|
|
3254
|
-
.entry("coordinator")
|
|
3255
|
-
.or_insert_with(|| json!({}))
|
|
3256
|
-
.as_object_mut();
|
|
3257
|
-
let Some(coordinator) = coordinator else {
|
|
3258
|
-
return;
|
|
3259
|
-
};
|
|
3260
|
-
let idle = coordinator
|
|
3261
|
-
.entry("idle_acknowledged")
|
|
3262
|
-
.or_insert_with(|| json!({}))
|
|
3263
|
-
.as_object_mut();
|
|
3264
|
-
let Some(idle) = idle else {
|
|
3265
|
-
return;
|
|
3266
|
-
};
|
|
3267
|
-
idle.insert(
|
|
3268
|
-
team.to_string(),
|
|
3269
|
-
json!({"acknowledged_at": acknowledged_at, "expires_at": expires_at, "ttl_seconds": ttl_seconds}),
|
|
3270
|
-
);
|
|
3271
|
-
}
|
|
3272
|
-
|
|
3273
|
-
fn suppress_team_idle_fallbacks(
|
|
3274
|
-
state: &mut Value,
|
|
3275
|
-
team: &str,
|
|
3276
|
-
suppressed_at: &str,
|
|
3277
|
-
expires_at: &str,
|
|
3278
|
-
ttl_seconds: i64,
|
|
3279
|
-
) {
|
|
3280
|
-
let agents = state
|
|
3281
|
-
.get("agents")
|
|
3282
|
-
.and_then(Value::as_object)
|
|
3283
|
-
.map(|obj| obj.keys().cloned().collect::<Vec<_>>())
|
|
3284
|
-
.unwrap_or_default();
|
|
3285
|
-
for agent in agents {
|
|
3286
|
-
upsert_suppression(
|
|
3287
|
-
state,
|
|
3288
|
-
SuppressionRecord {
|
|
3289
|
-
team,
|
|
3290
|
-
agent_id: &agent,
|
|
3291
|
-
alert_type: "idle_fallback",
|
|
3292
|
-
suppressed_by: "manual_acknowledge",
|
|
3293
|
-
suppressed_at,
|
|
3294
|
-
expires_at,
|
|
3295
|
-
ttl_seconds,
|
|
3296
|
-
},
|
|
3297
|
-
);
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
|
|
3301
|
-
struct SuppressionRecord<'a> {
|
|
3302
|
-
team: &'a str,
|
|
3303
|
-
agent_id: &'a str,
|
|
3304
|
-
alert_type: &'a str,
|
|
3305
|
-
suppressed_by: &'a str,
|
|
3306
|
-
suppressed_at: &'a str,
|
|
3307
|
-
expires_at: &'a str,
|
|
3308
|
-
ttl_seconds: i64,
|
|
3309
|
-
}
|
|
3310
|
-
|
|
3311
|
-
fn upsert_suppression(state: &mut Value, record: SuppressionRecord<'_>) {
|
|
3312
|
-
let Some(root) = state.as_object_mut() else {
|
|
3313
|
-
return;
|
|
3314
|
-
};
|
|
3315
|
-
let Some(coordinator) = root
|
|
3316
|
-
.entry("coordinator")
|
|
3317
|
-
.or_insert_with(|| json!({}))
|
|
3318
|
-
.as_object_mut()
|
|
3319
|
-
else {
|
|
3320
|
-
return;
|
|
3321
|
-
};
|
|
3322
|
-
let Some(all) = coordinator
|
|
3323
|
-
.entry("suppressed_idle_alerts")
|
|
3324
|
-
.or_insert_with(|| json!({}))
|
|
3325
|
-
.as_object_mut()
|
|
3326
|
-
else {
|
|
3327
|
-
return;
|
|
3328
|
-
};
|
|
3329
|
-
let Some(team_map) = all
|
|
3330
|
-
.entry(record.team.to_string())
|
|
3331
|
-
.or_insert_with(|| json!({}))
|
|
3332
|
-
.as_object_mut()
|
|
3333
|
-
else {
|
|
3334
|
-
return;
|
|
3335
|
-
};
|
|
3336
|
-
let Some(agent_map) = team_map
|
|
3337
|
-
.entry(record.agent_id.to_string())
|
|
3338
|
-
.or_insert_with(|| json!({}))
|
|
3339
|
-
.as_object_mut()
|
|
3340
|
-
else {
|
|
3341
|
-
return;
|
|
3342
|
-
};
|
|
3343
|
-
agent_map.insert(
|
|
3344
|
-
record.alert_type.to_string(),
|
|
3345
|
-
json!({
|
|
3346
|
-
"suppressed_at": record.suppressed_at,
|
|
3347
|
-
"suppressed_by": record.suppressed_by,
|
|
3348
|
-
"manual_acknowledge": true,
|
|
3349
|
-
"expires_at": record.expires_at,
|
|
3350
|
-
"ttl_seconds": record.ttl_seconds,
|
|
3351
|
-
}),
|
|
3352
|
-
);
|
|
3353
|
-
}
|
|
3354
|
-
|
|
3355
3205
|
const COMPACT_READINESS_KEYS: [&str; 6] = [
|
|
3356
3206
|
"all_workers_spawned",
|
|
3357
3207
|
"state",
|
|
@@ -3448,10 +3298,10 @@ pub mod lifecycle_port {
|
|
|
3448
3298
|
{
|
|
3449
3299
|
return vec![
|
|
3450
3300
|
"repair state.session_name to the worker session; it currently names the leader launcher session".to_string(),
|
|
3451
|
-
format!("team-agent
|
|
3301
|
+
format!("team-agent doctor --team {team} --json"),
|
|
3452
3302
|
];
|
|
3453
3303
|
}
|
|
3454
|
-
let mut actions = vec![format!("team-agent
|
|
3304
|
+
let mut actions = vec![format!("team-agent doctor --team {team} --json")];
|
|
3455
3305
|
if issue_ids
|
|
3456
3306
|
.iter()
|
|
3457
3307
|
.any(|id| id.contains("socket") || id.contains("endpoint"))
|
|
@@ -3872,7 +3722,7 @@ pub mod lifecycle_port {
|
|
|
3872
3722
|
"status": "partial",
|
|
3873
3723
|
"reason": "restart_agent_failed",
|
|
3874
3724
|
"failed_agents": [{"agent_id": "worker", "error": "spawn failed"}],
|
|
3875
|
-
"next_actions": ["
|
|
3725
|
+
"next_actions": ["reset-agent worker --discard-session"],
|
|
3876
3726
|
"attach_commands": [],
|
|
3877
3727
|
"coordinator": {"status": "running", "transport": "default"}
|
|
3878
3728
|
});
|
|
@@ -3880,7 +3730,7 @@ pub mod lifecycle_port {
|
|
|
3880
3730
|
compact_restart_value(&mut default);
|
|
3881
3731
|
assert_eq!(default["status"], json!("partial"));
|
|
3882
3732
|
assert_eq!(default["reason"], json!("restart_agent_failed"));
|
|
3883
|
-
assert_eq!(default["next_actions"], json!(["
|
|
3733
|
+
assert_eq!(default["next_actions"], json!(["reset-agent worker --discard-session"]));
|
|
3884
3734
|
assert!(default.get("coordinator").is_none());
|
|
3885
3735
|
assert!(detail.get("coordinator").is_some());
|
|
3886
3736
|
}
|
|
@@ -4162,7 +4012,7 @@ pub mod lifecycle_port {
|
|
|
4162
4012
|
"phase": failure.phase,
|
|
4163
4013
|
"error": failure.error,
|
|
4164
4014
|
"action": format!(
|
|
4165
|
-
"inspect worker {} output, then
|
|
4015
|
+
"inspect worker {} output, then reset that worker with `team-agent reset-agent {} --discard-session` or rerun `team-agent restart --allow-fresh`",
|
|
4166
4016
|
failure.agent_id,
|
|
4167
4017
|
failure.agent_id
|
|
4168
4018
|
),
|
|
@@ -4208,7 +4058,7 @@ pub mod lifecycle_port {
|
|
|
4208
4058
|
"phase": failure.phase,
|
|
4209
4059
|
"error": failure.error,
|
|
4210
4060
|
"action": format!(
|
|
4211
|
-
"inspect worker {} output, then
|
|
4061
|
+
"inspect worker {} output, then reset that worker with `team-agent reset-agent {} --discard-session` or rerun `team-agent restart --allow-fresh`",
|
|
4212
4062
|
failure.agent_id,
|
|
4213
4063
|
failure.agent_id
|
|
4214
4064
|
),
|
|
@@ -27,13 +27,13 @@ pub(super) fn dirty_topology_refusal_value(
|
|
|
27
27
|
"status": "refused_dirty_topology",
|
|
28
28
|
"reason": reason,
|
|
29
29
|
"session_name": session_name,
|
|
30
|
-
"error": "send refused: tmux endpoint/socket topology is inconsistent; run
|
|
30
|
+
"error": "send refused: tmux endpoint/socket topology is inconsistent; run doctor from the intended leader socket before sending",
|
|
31
31
|
"issues": issue_ids
|
|
32
32
|
.iter()
|
|
33
33
|
.map(|id| json!({"id": id}))
|
|
34
34
|
.collect::<Vec<_>>(),
|
|
35
35
|
"next_actions": [
|
|
36
|
-
"team-agent
|
|
36
|
+
"team-agent doctor --json",
|
|
37
37
|
format!("team-agent claim-leader --team {repair_team} --confirm --json"),
|
|
38
38
|
format!("team-agent takeover --team {repair_team} --confirm --json")
|
|
39
39
|
],
|
|
@@ -10,7 +10,6 @@ pub(crate) enum CommandTier {
|
|
|
10
10
|
Guided,
|
|
11
11
|
Secondary,
|
|
12
12
|
DevInternal,
|
|
13
|
-
CompatHidden,
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
@@ -23,14 +22,12 @@ pub(crate) enum CommandCategory {
|
|
|
23
22
|
Setup,
|
|
24
23
|
Observe,
|
|
25
24
|
Dev,
|
|
26
|
-
Compat,
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
30
28
|
pub(crate) enum CommandKind {
|
|
31
29
|
Dispatch(DispatchKind),
|
|
32
30
|
LeaderPassthrough { provider: &'static str },
|
|
33
|
-
SpecOnlyAlias { alias_of: &'static str },
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
@@ -42,15 +39,12 @@ pub(crate) enum TokenUsage {
|
|
|
42
39
|
|
|
43
40
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
44
41
|
pub(crate) enum DispatchKind {
|
|
45
|
-
Init,
|
|
46
42
|
QuickStart,
|
|
47
43
|
Send,
|
|
48
44
|
AllowPeerTalk,
|
|
49
45
|
Status,
|
|
50
|
-
Stop,
|
|
51
46
|
Shutdown,
|
|
52
47
|
Restart,
|
|
53
|
-
RestartAgent,
|
|
54
48
|
StartAgent,
|
|
55
49
|
StopAgent,
|
|
56
50
|
ResetAgent,
|
|
@@ -58,9 +52,6 @@ pub(crate) enum DispatchKind {
|
|
|
58
52
|
CloneAgent,
|
|
59
53
|
ForkAgent,
|
|
60
54
|
RemoveAgent,
|
|
61
|
-
StuckList,
|
|
62
|
-
StuckCancel,
|
|
63
|
-
AcknowledgeIdle,
|
|
64
55
|
Takeover,
|
|
65
56
|
ClaimLeader,
|
|
66
57
|
AttachLeader,
|
|
@@ -77,7 +68,6 @@ pub(crate) enum DispatchKind {
|
|
|
77
68
|
Profile,
|
|
78
69
|
Results,
|
|
79
70
|
Wait,
|
|
80
|
-
Diagnose,
|
|
81
71
|
Preflight,
|
|
82
72
|
WaitReady,
|
|
83
73
|
E2e,
|
|
@@ -87,15 +77,12 @@ pub(crate) enum DispatchKind {
|
|
|
87
77
|
}
|
|
88
78
|
|
|
89
79
|
pub(crate) const ALL_DISPATCH_KINDS: &[DispatchKind] = &[
|
|
90
|
-
DispatchKind::Init,
|
|
91
80
|
DispatchKind::QuickStart,
|
|
92
81
|
DispatchKind::Send,
|
|
93
82
|
DispatchKind::AllowPeerTalk,
|
|
94
83
|
DispatchKind::Status,
|
|
95
|
-
DispatchKind::Stop,
|
|
96
84
|
DispatchKind::Shutdown,
|
|
97
85
|
DispatchKind::Restart,
|
|
98
|
-
DispatchKind::RestartAgent,
|
|
99
86
|
DispatchKind::StartAgent,
|
|
100
87
|
DispatchKind::StopAgent,
|
|
101
88
|
DispatchKind::ResetAgent,
|
|
@@ -103,9 +90,6 @@ pub(crate) const ALL_DISPATCH_KINDS: &[DispatchKind] = &[
|
|
|
103
90
|
DispatchKind::CloneAgent,
|
|
104
91
|
DispatchKind::ForkAgent,
|
|
105
92
|
DispatchKind::RemoveAgent,
|
|
106
|
-
DispatchKind::StuckList,
|
|
107
|
-
DispatchKind::StuckCancel,
|
|
108
|
-
DispatchKind::AcknowledgeIdle,
|
|
109
93
|
DispatchKind::Takeover,
|
|
110
94
|
DispatchKind::ClaimLeader,
|
|
111
95
|
DispatchKind::AttachLeader,
|
|
@@ -122,7 +106,6 @@ pub(crate) const ALL_DISPATCH_KINDS: &[DispatchKind] = &[
|
|
|
122
106
|
DispatchKind::Profile,
|
|
123
107
|
DispatchKind::Results,
|
|
124
108
|
DispatchKind::Wait,
|
|
125
|
-
DispatchKind::Diagnose,
|
|
126
109
|
DispatchKind::Preflight,
|
|
127
110
|
DispatchKind::WaitReady,
|
|
128
111
|
DispatchKind::E2e,
|
|
@@ -149,7 +132,6 @@ pub(crate) struct CommandSpec {
|
|
|
149
132
|
pub(crate) command_help: bool,
|
|
150
133
|
pub(crate) suggestion_index: bool,
|
|
151
134
|
pub(crate) token_usage: TokenUsage,
|
|
152
|
-
pub(crate) alias_of: Option<&'static str>,
|
|
153
135
|
pub(crate) sunset: Option<&'static str>,
|
|
154
136
|
pub(crate) action: Option<&'static str>,
|
|
155
137
|
pub(crate) governance: Option<GovernanceNote>,
|
|
@@ -162,58 +144,50 @@ pub(crate) struct CommandSpec {
|
|
|
162
144
|
/// numeric slack threshold.
|
|
163
145
|
#[rustfmt::skip]
|
|
164
146
|
pub(crate) const COMMAND_SPECS: &[CommandSpec] = &[
|
|
165
|
-
CommandSpec { name: "quick-start", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::Dispatch(DispatchKind::QuickStart), summary: "start or attach a team from TEAM.md", usage: "usage: team-agent quick-start [TEAMDIR] [--workspace WORKSPACE] [--name NAME] [--team-id TEAM|--team TEAM] [--yes] [--backend tmux|conpty] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional,
|
|
166
|
-
CommandSpec { name: "send", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Send), summary: "persist a message for an in-team short name or fully-qualified logical recipient", usage: "usage: team-agent send TO MESSAGE... [--workspace WORKSPACE] [--team TEAM] [--mailbox] [--json]\nTO forms are co-equal: an in-team short name (for example `team-agent send reviewer \"Review\"`) or `<workspace>::<team>/<agent>`.", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional,
|
|
167
|
-
CommandSpec { name: "status", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Status), summary: "show current team status", usage: "usage: team-agent status [AGENT] [--workspace WORKSPACE] [--team TEAM] [--summary|--json] [--detail]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No,
|
|
168
|
-
CommandSpec { name: "models", tier: CommandTier::Core, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Models), summary: "list exact provider model ids", usage: "usage: team-agent models [--provider pi|cursor_agent] [QUERY|--search TEXT] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No,
|
|
169
|
-
CommandSpec { name: "results", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Results), summary: "read reported results for a case", usage: "usage: team-agent results --case CASE_ID [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No,
|
|
170
|
-
CommandSpec { name: "wait", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Wait), summary: "block until a task result is stored", usage: "usage: team-agent wait --task TASK [--workspace WORKSPACE] [--json]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::No,
|
|
171
|
-
CommandSpec { name: "restart", tier: CommandTier::Core, category: CommandCategory::TeamLifecycle, kind: CommandKind::Dispatch(DispatchKind::Restart), summary: "restart the selected team", usage: "usage: team-agent restart [WORKSPACE] [--team TEAM] [--allow-fresh] [--session-converge-deadline SECONDS] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional,
|
|
172
|
-
CommandSpec { name: "shutdown", tier: CommandTier::Core, category: CommandCategory::TeamLifecycle, kind: CommandKind::Dispatch(DispatchKind::Shutdown), summary: "stop the selected team", usage: "usage: team-agent shutdown [--workspace WORKSPACE] [--team TEAM] [--keep-logs] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No,
|
|
173
|
-
CommandSpec { name: "add-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::AddAgent), summary: "add or force-recreate a worker", usage: "usage: team-agent add-agent AGENT --role-file FILE [--force] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional,
|
|
174
|
-
CommandSpec { name: "start-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::StartAgent), summary: "start an existing worker", usage: "usage: team-agent start-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--force] [--allow-fresh] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional,
|
|
175
|
-
CommandSpec { name: "stop-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::StopAgent), summary: "stop a worker", usage: "usage: team-agent stop-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No,
|
|
176
|
-
CommandSpec { name: "reset-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ResetAgent), summary: "reset a worker session", usage: "usage: team-agent reset-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--discard-session] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional,
|
|
177
|
-
CommandSpec { name: "
|
|
178
|
-
CommandSpec { name: "
|
|
179
|
-
CommandSpec { name: "
|
|
180
|
-
CommandSpec { name: "attach-leader", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::AttachLeader), summary: "bind an external leader pane", usage: "usage: team-agent attach-leader [--workspace WORKSPACE] [--team TEAM] [--pane PANE] [--provider PROVIDER] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
|
|
147
|
+
CommandSpec { name: "quick-start", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::Dispatch(DispatchKind::QuickStart), summary: "start or attach a team from TEAM.md", usage: "usage: team-agent quick-start [TEAMDIR] [--workspace WORKSPACE] [--name NAME] [--team-id TEAM|--team TEAM] [--yes] [--backend tmux|conpty] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, sunset: None, action: None, governance: None },
|
|
148
|
+
CommandSpec { name: "send", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Send), summary: "persist a message for an in-team short name or fully-qualified logical recipient", usage: "usage: team-agent send TO MESSAGE... [--workspace WORKSPACE] [--team TEAM] [--mailbox] [--json]\nTO forms are co-equal: an in-team short name (for example `team-agent send reviewer \"Review\"`) or `<workspace>::<team>/<agent>`.", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, sunset: Some("next compatibility release"), action: Some("use positional logical TO and the returned message id"), governance: None },
|
|
149
|
+
CommandSpec { name: "status", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Status), summary: "show current team status", usage: "usage: team-agent status [AGENT] [--workspace WORKSPACE] [--team TEAM] [--summary|--json] [--detail]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
150
|
+
CommandSpec { name: "models", tier: CommandTier::Core, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Models), summary: "list exact provider model ids", usage: "usage: team-agent models [--provider pi|cursor_agent] [QUERY|--search TEXT] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
151
|
+
CommandSpec { name: "results", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Results), summary: "read reported results for a case", usage: "usage: team-agent results --case CASE_ID [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
152
|
+
CommandSpec { name: "wait", tier: CommandTier::Core, category: CommandCategory::Daily, kind: CommandKind::Dispatch(DispatchKind::Wait), summary: "block until a task result is stored", usage: "usage: team-agent wait --task TASK [--workspace WORKSPACE] [--json]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
153
|
+
CommandSpec { name: "restart", tier: CommandTier::Core, category: CommandCategory::TeamLifecycle, kind: CommandKind::Dispatch(DispatchKind::Restart), summary: "restart the selected team", usage: "usage: team-agent restart [WORKSPACE] [--team TEAM] [--allow-fresh] [--session-converge-deadline SECONDS] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, sunset: None, action: None, governance: None },
|
|
154
|
+
CommandSpec { name: "shutdown", tier: CommandTier::Core, category: CommandCategory::TeamLifecycle, kind: CommandKind::Dispatch(DispatchKind::Shutdown), summary: "stop the selected team", usage: "usage: team-agent shutdown [--workspace WORKSPACE] [--team TEAM] [--keep-logs] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
155
|
+
CommandSpec { name: "add-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::AddAgent), summary: "add or force-recreate a worker", usage: "usage: team-agent add-agent AGENT --role-file FILE [--force] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, sunset: None, action: None, governance: None },
|
|
156
|
+
CommandSpec { name: "start-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::StartAgent), summary: "start an existing worker", usage: "usage: team-agent start-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--force] [--allow-fresh] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, sunset: None, action: None, governance: None },
|
|
157
|
+
CommandSpec { name: "stop-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::StopAgent), summary: "stop a worker", usage: "usage: team-agent stop-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
158
|
+
CommandSpec { name: "reset-agent", tier: CommandTier::Core, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ResetAgent), summary: "reset a worker session", usage: "usage: team-agent reset-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--discard-session] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::Conditional, sunset: None, action: None, governance: None },
|
|
159
|
+
CommandSpec { name: "claim-leader", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::ClaimLeader), summary: "bind this pane when doctor reports rebind_required", usage: "usage: team-agent claim-leader [--workspace WORKSPACE] [--team TEAM] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
160
|
+
CommandSpec { name: "takeover", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::Takeover), summary: "replace a live leader binding with explicit consent", usage: "usage: team-agent takeover [--workspace WORKSPACE] [--team TEAM] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
161
|
+
CommandSpec { name: "attach-leader", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::AttachLeader), summary: "bind an external leader pane", usage: "usage: team-agent attach-leader [--workspace WORKSPACE] [--team TEAM] [--pane PANE] [--provider PROVIDER] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
181
162
|
|
|
182
|
-
CommandSpec { name: "codex", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "codex" }, summary: "launch a Codex leader", usage: "usage: team-agent codex [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes,
|
|
183
|
-
CommandSpec { name: "claude", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "claude" }, summary: "launch a Claude leader", usage: "usage: team-agent claude [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes,
|
|
184
|
-
CommandSpec { name: "copilot", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "copilot" }, summary: "launch a Copilot leader", usage: "usage: team-agent copilot [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes,
|
|
185
|
-
CommandSpec { name: "grok", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "grok" }, summary: "launch a Grok leader", usage: "usage: team-agent grok [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes,
|
|
186
|
-
CommandSpec { name: "cursor", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "cursor" }, summary: "launch a Cursor leader", usage: "usage: team-agent cursor [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes,
|
|
187
|
-
CommandSpec { name: "pi", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "pi" }, summary: "launch a Pi leader", usage: "usage: team-agent pi -- --model <exact> --thinking <effort>", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes,
|
|
163
|
+
CommandSpec { name: "codex", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "codex" }, summary: "launch a Codex leader", usage: "usage: team-agent codex [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes, sunset: None, action: None, governance: None },
|
|
164
|
+
CommandSpec { name: "claude", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "claude" }, summary: "launch a Claude leader", usage: "usage: team-agent claude [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes, sunset: None, action: None, governance: None },
|
|
165
|
+
CommandSpec { name: "copilot", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "copilot" }, summary: "launch a Copilot leader", usage: "usage: team-agent copilot [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes, sunset: None, action: None, governance: None },
|
|
166
|
+
CommandSpec { name: "grok", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "grok" }, summary: "launch a Grok leader", usage: "usage: team-agent grok [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes, sunset: None, action: None, governance: None },
|
|
167
|
+
CommandSpec { name: "cursor", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "cursor" }, summary: "launch a Cursor leader", usage: "usage: team-agent cursor [provider args...]", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes, sunset: None, action: None, governance: None },
|
|
168
|
+
CommandSpec { name: "pi", tier: CommandTier::Core, category: CommandCategory::Start, kind: CommandKind::LeaderPassthrough { provider: "pi" }, summary: "launch a Pi leader", usage: "usage: team-agent pi -- --model <exact> --thinking <effort>", default_help: false, command_help: true, suggestion_index: true, token_usage: TokenUsage::Yes, sunset: None, action: None, governance: None },
|
|
188
169
|
|
|
189
|
-
CommandSpec { name: "
|
|
190
|
-
CommandSpec { name: "
|
|
191
|
-
CommandSpec { name: "
|
|
192
|
-
CommandSpec { name: "
|
|
193
|
-
CommandSpec { name: "
|
|
194
|
-
CommandSpec { name: "
|
|
195
|
-
CommandSpec { name: "
|
|
196
|
-
CommandSpec { name: "
|
|
197
|
-
CommandSpec { name: "
|
|
198
|
-
CommandSpec { name: "
|
|
199
|
-
CommandSpec { name: "
|
|
200
|
-
CommandSpec { name: "fork-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ForkAgent), summary: "fork a worker", usage: "usage: team-agent fork-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
|
|
201
|
-
CommandSpec { name: "clone-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::CloneAgent), summary: "clone a worker role into a fresh session", usage: "usage: team-agent clone-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, alias_of: None, sunset: None, action: None, governance: None },
|
|
202
|
-
CommandSpec { name: "allow-peer-talk", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::AllowPeerTalk), summary: "allow direct worker peer talk", usage: "usage: team-agent allow-peer-talk A B [--workspace WORKSPACE] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "capability/config surface" }) },
|
|
203
|
-
CommandSpec { name: "approvals", tier: CommandTier::Secondary, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Approvals), summary: "inspect provider approval state", usage: "usage: team-agent approvals [AGENT] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "approval diagnostics" }) },
|
|
204
|
-
CommandSpec { name: "profile", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::Profile), summary: "manage provider profiles", usage: "usage: team-agent profile COMMAND NAME [--workspace WORKSPACE] [--team TEAM] [--auth-mode MODE] [--proxy-mode direct|inherit] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "provider/profile setup" }) },
|
|
205
|
-
CommandSpec { name: "install-skill", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::InstallSkill), summary: "install or uninstall Team Agent skills", usage: "usage: team-agent install-skill (--source DIR | --uninstall) [--target codex|claude|copilot|all] [--dest DIR] [--dry-run] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "capability setup" }) },
|
|
206
|
-
CommandSpec { name: "inbox", tier: CommandTier::Secondary, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Inbox), summary: "inspect recent message summaries", usage: "usage: team-agent inbox AGENT [-n N|--limit N] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, alias_of: None, sunset: None, action: None, governance: None },
|
|
170
|
+
CommandSpec { name: "leaders", tier: CommandTier::Secondary, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Leaders), summary: "list live, stale, or ambiguous host leaders", usage: "usage: team-agent leaders [QUERY|--search TEXT] [--all|--stale] [--json] | --prune [--dry-run] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
171
|
+
CommandSpec { name: "doctor", tier: CommandTier::Core, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Doctor), summary: "inspect environment and Team runtime health", usage: "usage: team-agent doctor [SPEC] [--workspace WORKSPACE] [--team TEAM] [--gate orphans|comms] [--comms] [--fix] [--fix-schema] [--cleanup-orphans] [--confirm] [--json]", default_help: true, command_help: true, suggestion_index: true, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
172
|
+
CommandSpec { name: "attach-app-server-leader", tier: CommandTier::Guided, category: CommandCategory::GuidedRecovery, kind: CommandKind::Dispatch(DispatchKind::AttachAppServerLeader), summary: "bind an app-server leader receiver", usage: "usage: team-agent attach-app-server-leader [--workspace WORKSPACE] [--team TEAM] --socket unix:///path.sock --thread-id THREAD_ID [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
173
|
+
CommandSpec { name: "remove-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::RemoveAgent), summary: "remove a worker", usage: "usage: team-agent remove-agent AGENT [--workspace WORKSPACE] [--team TEAM] [--from-spec] [--confirm] [--force] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
174
|
+
CommandSpec { name: "fork-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::ForkAgent), summary: "fork a worker", usage: "usage: team-agent fork-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, sunset: None, action: None, governance: None },
|
|
175
|
+
CommandSpec { name: "clone-agent", tier: CommandTier::Secondary, category: CommandCategory::WorkerLifecycle, kind: CommandKind::Dispatch(DispatchKind::CloneAgent), summary: "clone a worker role into a fresh session", usage: "usage: team-agent clone-agent SOURCE_AGENT --as AGENT [--label LABEL] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Conditional, sunset: None, action: None, governance: None },
|
|
176
|
+
CommandSpec { name: "allow-peer-talk", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::AllowPeerTalk), summary: "allow direct worker peer talk", usage: "usage: team-agent allow-peer-talk A B [--workspace WORKSPACE] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "capability/config surface" }) },
|
|
177
|
+
CommandSpec { name: "approvals", tier: CommandTier::Secondary, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Approvals), summary: "inspect provider approval state", usage: "usage: team-agent approvals [AGENT] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "approval diagnostics" }) },
|
|
178
|
+
CommandSpec { name: "profile", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::Profile), summary: "manage provider profiles", usage: "usage: team-agent profile COMMAND NAME [--workspace WORKSPACE] [--team TEAM] [--auth-mode MODE] [--proxy-mode direct|inherit] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "provider/profile setup" }) },
|
|
179
|
+
CommandSpec { name: "install-skill", tier: CommandTier::Secondary, category: CommandCategory::Setup, kind: CommandKind::Dispatch(DispatchKind::InstallSkill), summary: "install or uninstall Team Agent skills", usage: "usage: team-agent install-skill (--source DIR | --uninstall) [--target codex|claude|copilot|all] [--dest DIR] [--dry-run] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: Some(GovernanceNote { decision: "secondary", reason: "capability setup" }) },
|
|
180
|
+
CommandSpec { name: "inbox", tier: CommandTier::Secondary, category: CommandCategory::Observe, kind: CommandKind::Dispatch(DispatchKind::Inbox), summary: "inspect recent message summaries", usage: "usage: team-agent inbox AGENT [-n N|--limit N] [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
207
181
|
|
|
208
|
-
CommandSpec { name: "identity", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Identity), summary: "inspect identity metadata", usage: "usage: team-agent identity [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
209
|
-
CommandSpec { name: "watch", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Watch), summary: "watch event logs", usage: "usage: team-agent watch [--workspace WORKSPACE] [--team TEAM]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
210
|
-
CommandSpec { name: "sessions", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Sessions), summary: "inspect session inventory", usage: "usage: team-agent sessions [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
211
|
-
CommandSpec { name: "validate", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Validate), summary: "validate a team spec", usage: "usage: team-agent validate [SPEC] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
212
|
-
CommandSpec { name: "preflight", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Preflight), summary: "run preflight checks", usage: "usage: team-agent preflight [TEAMDIR] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
213
|
-
CommandSpec { name: "wait-ready", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::WaitReady), summary: "wait for runtime readiness", usage: "usage: team-agent wait-ready [--workspace WORKSPACE] [--team TEAM] [--timeout SECONDS] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
214
|
-
CommandSpec { name: "e2e", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::E2e), summary: "run e2e harness", usage: "usage: team-agent e2e [--workspace WORKSPACE] [--providers LIST] [--real] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Yes,
|
|
215
|
-
CommandSpec { name: "peek", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Peek), summary: "capture low-level terminal output", usage: "usage: team-agent peek AGENT [--workspace WORKSPACE] [--tail N|--head N] [--search TEXT] [--allow-raw-screen] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
216
|
-
CommandSpec { name: "coordinator", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Coordinator), summary: "run the coordinator daemon", usage: "usage: team-agent coordinator [--workspace WORKSPACE] [--once] [--tick-interval SECONDS]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No,
|
|
182
|
+
CommandSpec { name: "identity", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Identity), summary: "inspect identity metadata", usage: "usage: team-agent identity [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
183
|
+
CommandSpec { name: "watch", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Watch), summary: "watch event logs", usage: "usage: team-agent watch [--workspace WORKSPACE] [--team TEAM]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
184
|
+
CommandSpec { name: "sessions", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Sessions), summary: "inspect session inventory", usage: "usage: team-agent sessions [--workspace WORKSPACE] [--team TEAM] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
185
|
+
CommandSpec { name: "validate", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Validate), summary: "validate a team spec", usage: "usage: team-agent validate [SPEC] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
186
|
+
CommandSpec { name: "preflight", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Preflight), summary: "run preflight checks", usage: "usage: team-agent preflight [TEAMDIR] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
187
|
+
CommandSpec { name: "wait-ready", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::WaitReady), summary: "wait for runtime readiness", usage: "usage: team-agent wait-ready [--workspace WORKSPACE] [--team TEAM] [--timeout SECONDS] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
188
|
+
CommandSpec { name: "e2e", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::E2e), summary: "run e2e harness", usage: "usage: team-agent e2e [--workspace WORKSPACE] [--providers LIST] [--real] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::Yes, sunset: None, action: None, governance: None },
|
|
189
|
+
CommandSpec { name: "peek", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Peek), summary: "capture low-level terminal output", usage: "usage: team-agent peek AGENT [--workspace WORKSPACE] [--tail N|--head N] [--search TEXT] [--allow-raw-screen] [--json]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
190
|
+
CommandSpec { name: "coordinator", tier: CommandTier::DevInternal, category: CommandCategory::Dev, kind: CommandKind::Dispatch(DispatchKind::Coordinator), summary: "run the coordinator daemon", usage: "usage: team-agent coordinator [--workspace WORKSPACE] [--once] [--tick-interval SECONDS]", default_help: false, command_help: true, suggestion_index: false, token_usage: TokenUsage::No, sunset: None, action: None, governance: None },
|
|
217
191
|
];
|
|
218
192
|
|
|
219
193
|
pub(crate) fn command_spec(name: &str) -> Option<&'static CommandSpec> {
|