@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
|
@@ -18,6 +18,7 @@ use crate::model::ids::TaskId;
|
|
|
18
18
|
use crate::model::task_graph::{find_dependency_cycle, TaskNode};
|
|
19
19
|
use crate::model::yaml::Value as Yaml;
|
|
20
20
|
use crate::model::{permissions, yaml};
|
|
21
|
+
use crate::provider::wire::{is_claude_family, parse_canonical_provider};
|
|
21
22
|
|
|
22
23
|
/// result_envelope_v1 顶层 required(= allowed)。
|
|
23
24
|
const RESULT_REQUIRED: &[&str] = &[
|
|
@@ -175,9 +176,6 @@ fn result_schema_errors(envelope: &Value) -> Vec<String> {
|
|
|
175
176
|
const ROOT_KEYS: &[&str] = &[
|
|
176
177
|
"version", "team", "leader", "agents", "routing", "communication", "runtime", "context", "tasks",
|
|
177
178
|
];
|
|
178
|
-
// Copilot 一期加入白名单(design §B compiler.py:249-251 同位 + cr verdict 总裁,
|
|
179
|
-
// MUST-NOT-7 跨厂商等价 — 设计 / cr 已落地 26 约束)。
|
|
180
|
-
const SUPPORTED_PROVIDERS: &[&str] = &["claude", "claude_code", "codex", "copilot", "gemini_cli", "fake"];
|
|
181
179
|
const AUTH_MODES: &[&str] = &["subscription", "official_api", "compatible_api"];
|
|
182
180
|
const VALID_DISPLAY_BACKENDS: &[&str] = &[
|
|
183
181
|
"none", "tmux_attach", "iterm", "ghostty", "ghostty_window", "ghostty_workspace", "adaptive",
|
|
@@ -326,7 +324,7 @@ fn check_agent(agent: &Yaml, path: &str, errors: &mut Vec<String>) {
|
|
|
326
324
|
}
|
|
327
325
|
Some(effort) if effort.is_claude_only() => {
|
|
328
326
|
let provider = agent.get("provider").and_then(Yaml::as_str).unwrap_or("");
|
|
329
|
-
if !
|
|
327
|
+
if !parse_canonical_provider(provider).is_some_and(is_claude_family) {
|
|
330
328
|
errors.push(format!(
|
|
331
329
|
"{path}/effort: effort '{raw}' is only supported by claude/claude_code (provider: {provider})"
|
|
332
330
|
));
|
|
@@ -476,13 +474,19 @@ fn semantic_errors(spec: &Yaml, base_dir: &Path) -> Vec<String> {
|
|
|
476
474
|
}
|
|
477
475
|
|
|
478
476
|
let leader_provider = leader.and_then(|l| l.get("provider"));
|
|
479
|
-
if !leader_provider
|
|
477
|
+
if !leader_provider
|
|
478
|
+
.and_then(Yaml::as_str)
|
|
479
|
+
.is_some_and(|p| parse_canonical_provider(p).is_some())
|
|
480
|
+
{
|
|
480
481
|
e.push(format!("/leader/provider: unknown provider {}", py_repr(leader_provider)));
|
|
481
482
|
}
|
|
482
483
|
|
|
483
484
|
for (idx, agent) in agents.iter().enumerate() {
|
|
484
485
|
let provider = agent.get("provider");
|
|
485
|
-
if !provider
|
|
486
|
+
if !provider
|
|
487
|
+
.and_then(Yaml::as_str)
|
|
488
|
+
.is_some_and(|p| parse_canonical_provider(p).is_some())
|
|
489
|
+
{
|
|
486
490
|
e.push(format!("/agents/{idx}/provider: unknown provider {}", py_repr(provider)));
|
|
487
491
|
}
|
|
488
492
|
if let Some(auth) = agent.get("auth_mode") {
|