@team-agent/installer 0.5.124 → 0.5.126
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 -8
- package/Cargo.toml +1 -1
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/crates/team-agent/Cargo.toml +0 -1
- package/crates/team-agent/src/cli/diagnose.rs +39 -69
- package/crates/team-agent/src/cli/emit.rs +45 -15
- package/crates/team-agent/src/cli/intent/runtime.rs +5 -53
- package/crates/team-agent/src/cli/intent/runtime_tests.rs +10 -130
- package/crates/team-agent/src/cli/leader.rs +2 -3
- package/crates/team-agent/src/cli/leader_prompt.rs +1 -1
- package/crates/team-agent/src/cli/mod.rs +28 -33
- package/crates/team-agent/src/cli/models.rs +44 -880
- package/crates/team-agent/src/cli/route.rs +1 -1
- package/crates/team-agent/src/cli/send/persist.rs +36 -0
- package/crates/team-agent/src/cli/send/presentation.rs +7 -1
- package/crates/team-agent/src/cli/send.rs +3 -1
- package/crates/team-agent/src/cli/spec.rs +1 -2
- package/crates/team-agent/src/cli/status_port/brief.rs +66 -0
- package/crates/team-agent/src/cli/tests/base.rs +4 -11
- package/crates/team-agent/src/cli/tests/mod.rs +1 -1
- package/crates/team-agent/src/cli/tests/run_delegation.rs +5 -4
- package/crates/team-agent/src/cli/tests/status_send.rs +17 -0
- package/crates/team-agent/src/compiler/tests.rs +39 -8
- package/crates/team-agent/src/compiler.rs +28 -204
- package/crates/team-agent/src/contract_runtime/backend.rs +79 -40
- package/crates/team-agent/src/contract_runtime/config.rs +37 -24
- package/crates/team-agent/src/contract_runtime/discovery.rs +33 -0
- package/crates/team-agent/src/contract_runtime/fork.rs +368 -0
- package/crates/team-agent/src/contract_runtime/framework.rs +87 -34
- package/crates/team-agent/src/contract_runtime/mod.rs +1 -0
- package/crates/team-agent/src/contract_runtime/registry.rs +299 -21
- package/crates/team-agent/src/coordinator/runtime_detectors.rs +0 -1
- package/crates/team-agent/src/coordinator/tests/api_error_recovery.rs +29 -8
- package/crates/team-agent/src/coordinator/tests/health_sync.rs +0 -42
- package/crates/team-agent/src/coordinator/tick.rs +89 -1
- package/crates/team-agent/src/db/message_store.rs +78 -3
- package/crates/team-agent/src/layout/worker_window_helpers.rs +0 -1
- package/crates/team-agent/src/leader/prompt.rs +1 -2
- package/crates/team-agent/src/leader/provider_attribution.rs +0 -52
- package/crates/team-agent/src/leader/start.rs +1 -2
- package/crates/team-agent/src/leader/tests/prompt_contract.rs +2 -3
- package/crates/team-agent/src/lifecycle/launch/add_agent.rs +91 -0
- package/crates/team-agent/src/lifecycle/launch/add_agent_state.rs +15 -195
- package/crates/team-agent/src/lifecycle/launch/agent_state.rs +0 -9
- package/crates/team-agent/src/lifecycle/launch/clone_agent.rs +11 -27
- package/crates/team-agent/src/lifecycle/launch/fork_agent.rs +18 -29
- package/crates/team-agent/src/lifecycle/launch/fork_entry.rs +6 -87
- package/crates/team-agent/src/lifecycle/launch/mcp_config.rs +3 -11
- package/crates/team-agent/src/lifecycle/launch/pi_mcp.rs +74 -244
- package/crates/team-agent/src/lifecycle/launch/quick_start.rs +0 -24
- package/crates/team-agent/src/lifecycle/launch/role_source.rs +5 -0
- package/crates/team-agent/src/lifecycle/launch/spawn.rs +21 -61
- package/crates/team-agent/src/lifecycle/launch/spec_state.rs +0 -1
- package/crates/team-agent/src/lifecycle/launch/worker_env.rs +0 -108
- package/crates/team-agent/src/lifecycle/launch.rs +2 -43
- package/crates/team-agent/src/lifecycle/profile_launch.rs +21 -348
- package/crates/team-agent/src/lifecycle/profile_smoke.rs +1 -2
- package/crates/team-agent/src/lifecycle/restart/common.rs +43 -378
- package/crates/team-agent/src/lifecycle/restart/selection.rs +5 -5
- package/crates/team-agent/src/lifecycle/restart.rs +0 -2
- package/crates/team-agent/src/lifecycle/role_config.rs +42 -3
- package/crates/team-agent/src/lifecycle/tests/behavioral_diff_264_red.rs +11 -6
- package/crates/team-agent/src/lifecycle/tests/claude_profile_launch_red.rs +8 -320
- package/crates/team-agent/src/lifecycle/tests/cli_argv_routing_red.rs +60 -145
- package/crates/team-agent/src/lifecycle/tests/clone_fork_copilot_perms_red.rs +8 -334
- package/crates/team-agent/src/lifecycle/tests/communication_mode_runtime_contract_red.rs +30 -11
- package/crates/team-agent/src/lifecycle/tests/copilot_provider_red.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests/core.rs +17 -16
- package/crates/team-agent/src/lifecycle/tests/grok_require_explicit_model_red.rs +12 -12
- package/crates/team-agent/src/lifecycle/tests/harvest2_a_batch_red.rs +3 -51
- package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +26 -28
- package/crates/team-agent/src/lifecycle/tests/pi_catalog_red.rs +6 -18
- package/crates/team-agent/src/lifecycle/tests/pi_command_red.rs +52 -70
- package/crates/team-agent/src/lifecycle/tests/pi_dual_entry_red.rs +4 -157
- package/crates/team-agent/src/lifecycle/tests/pi_executable_mcp_red.rs +10 -302
- package/crates/team-agent/src/lifecycle/tests/pi_lifecycle_doctor_red.rs +1 -68
- package/crates/team-agent/src/lifecycle/tests/pi_native_mcp_capability_red.rs +1 -19
- package/crates/team-agent/src/lifecycle/tests/pi_session_delivery_red.rs +2 -100
- package/crates/team-agent/src/lifecycle/tests/quick_start_worker_readiness_red.rs +11 -10
- package/crates/team-agent/src/lifecycle/tests/restart_rebind_hotfix_252_red.rs +0 -1
- package/crates/team-agent/src/lifecycle/tests/restart_session_capture_red.rs +2 -106
- package/crates/team-agent/src/lifecycle/tests/status_credential_redaction_contract.rs +2 -2
- package/crates/team-agent/src/lifecycle/tests/swallow_batch4_semantics_red.rs +2 -254
- package/crates/team-agent/src/lifecycle/tests/upgrade_compat_0211_red.rs +4 -4
- package/crates/team-agent/src/lifecycle/tests/verify_rs031_window_consistency_red.rs +6 -5
- package/crates/team-agent/src/lifecycle/tests/worker_spawn_env_red.rs +7 -153
- package/crates/team-agent/src/lifecycle/tests.rs +0 -6
- package/crates/team-agent/src/lifecycle/types.rs +2 -18
- package/crates/team-agent/src/lifecycle/worker_command_context.rs +2 -4
- package/crates/team-agent/src/mcp_server/readiness.rs +148 -97
- package/crates/team-agent/src/mcp_server/readiness_tests.rs +115 -16
- package/crates/team-agent/src/messaging/delivery.rs +185 -168
- package/crates/team-agent/src/messaging/delivery_consumption_tests.rs +5 -5
- package/crates/team-agent/src/messaging/enter_rescue_tests.rs +1 -1
- package/crates/team-agent/src/messaging/helpers.rs +19 -0
- package/crates/team-agent/src/messaging/tests/dup_inject.rs +67 -5
- package/crates/team-agent/src/messaging/tests/runtime.rs +110 -4
- package/crates/team-agent/src/messaging/tests/spine.rs +46 -36
- package/crates/team-agent/src/model/enums.rs +1 -8
- package/crates/team-agent/src/provider/adapter.rs +33 -302
- package/crates/team-agent/src/provider/adapters/mod.rs +4 -5
- package/crates/team-agent/src/provider/argv_route.rs +1 -5
- package/crates/team-agent/src/provider/bypass_flags.rs +3 -11
- package/crates/team-agent/src/provider/classify.rs +68 -3
- package/crates/team-agent/src/provider/faults.rs +1 -1
- package/crates/team-agent/src/provider/model_catalog.rs +14 -273
- package/crates/team-agent/src/provider/session/capture.rs +7 -107
- package/crates/team-agent/src/provider/session/context_fork/outcome.rs +0 -4
- package/crates/team-agent/src/provider/session/context_fork.rs +17 -109
- package/crates/team-agent/src/provider/session_scan/common.rs +11 -36
- package/crates/team-agent/src/provider/session_scan/pi.rs +1 -34
- package/crates/team-agent/src/provider/session_scan.rs +4 -14
- package/crates/team-agent/src/provider/submit_now.rs +5 -28
- package/crates/team-agent/src/provider/tests/adapter.rs +39 -275
- package/crates/team-agent/src/provider/tests/classify.rs +53 -0
- package/crates/team-agent/src/provider/tests/command_helpers.rs +3 -15
- package/crates/team-agent/src/provider/tests/idle.rs +0 -25
- package/crates/team-agent/src/provider/types.rs +1 -1
- package/crates/team-agent/src/provider/wire.rs +79 -11
- package/crates/team-agent/src/state/abnormal_watch/tests/mod.rs +1 -1
- package/crates/team-agent/src/state/persist.rs +6 -6
- package/crates/team-agent/src/state/repository/tests.rs +2 -2
- package/crates/team-agent/src/tmux_backend/native_input_tests.rs +2 -178
- package/crates/team-agent/src/tmux_backend/tests.rs +151 -0
- package/crates/team-agent/src/tmux_backend.rs +43 -8
- package/crates/team-agent/src/transport/native_input.rs +2 -231
- package/package.json +4 -4
- package/skills/team-agent/SKILL.md +7 -5
- package/skills/team-agent/command-coverage.json +15 -1
- package/skills/team-agent/docs/reference/team-agent-operator.md +5 -3
- package/skills/team-agent/references/team-agent-operator.md +5 -3
- package/crates/team-agent/src/lifecycle/launch/cursor_create_chat.rs +0 -229
- package/crates/team-agent/src/lifecycle/launch/cursor_mcp.rs +0 -522
- package/crates/team-agent/src/lifecycle/launch/cursor_mcp_iso.rs +0 -282
- package/crates/team-agent/src/lifecycle/restart/avatar.rs +0 -1805
- package/crates/team-agent/src/lifecycle/tests/claude_compatible_config_red.rs +0 -325
- package/crates/team-agent/src/lifecycle/tests/cursor_mcp_overlay.rs +0 -576
- package/crates/team-agent/src/lifecycle/tests/cursor_require_explicit_model_red.rs +0 -222
- package/crates/team-agent/src/lifecycle/tests/cursor_restart_resume_red.rs +0 -511
- package/crates/team-agent/src/lifecycle/tests/pi_compiler_red.rs +0 -210
- package/crates/team-agent/src/lifecycle/tests/pi_fork_session_inheritance_red.rs +0 -1409
- package/crates/team-agent/src/provider/adapters/claude.rs +0 -78
- package/crates/team-agent/src/provider/adapters/claude_fork.rs +0 -131
- package/crates/team-agent/src/provider/adapters/cursor_agent.rs +0 -44
- package/crates/team-agent/src/provider/adapters/pi.rs +0 -100
- package/crates/team-agent/src/provider/session/context_fork/claude.rs +0 -123
- package/crates/team-agent/src/provider/session_scan/claude.rs +0 -523
- package/crates/team-agent/src/provider/session_scan/cursor.rs +0 -538
- package/crates/team-agent/src/provider/testdata/cursor-list-models-native.stdout +0 -250
- package/crates/team-agent/src/test_support/models_timeout_fixture.rs +0 -144
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
//! ---
|
|
2
|
-
//! purpose: cursor 候选 A——`agent create-chat` 解析首行 chatId 后按记录 PID 杀
|
|
3
|
-
//! contract:
|
|
4
|
-
//! provides:
|
|
5
|
-
//! - name: apply_cursor_create_chat_plan
|
|
6
|
-
//! what: 无 pending 时把 CLI chatId 写入 expected_session_id 并 `--resume` 该 id
|
|
7
|
-
//! - name: create_cursor_chat_id
|
|
8
|
-
//! what: 跑 create-chat,读第一行 UUID,只杀本调用记录的 PID
|
|
9
|
-
//! requires:
|
|
10
|
-
//! - name: cursor-agent-cli
|
|
11
|
-
//! what: PATH 上的 `agent`;不存在或首行非法则返回 None(降级候选 B)
|
|
12
|
-
//! boundary:
|
|
13
|
-
//! - 不发明 --session-id;不 pkill/killall;不 wait 子进程自行退出
|
|
14
|
-
//! - 不读 chats 正文、不打印 proxy 值
|
|
15
|
-
//! - 已有 expected_session_id 或 argv 已含 --resume 则不动
|
|
16
|
-
//! - 2026-08-21 活体:create-chat 后 `--resume` 的存档在 pane stop 后被清;
|
|
17
|
-
//! TUI 自建会话能留盘。fresh 路径不调用本函数(走 scan 唯一 hex)。
|
|
18
|
-
//! maturity: wired
|
|
19
|
-
//! ---
|
|
20
|
-
|
|
21
|
-
use std::io::{BufRead, BufReader};
|
|
22
|
-
use std::path::Path;
|
|
23
|
-
use std::process::{Command, Stdio};
|
|
24
|
-
use std::sync::mpsc;
|
|
25
|
-
use std::thread;
|
|
26
|
-
use std::time::Duration;
|
|
27
|
-
|
|
28
|
-
use crate::provider::types::{CommandPlan, SessionId};
|
|
29
|
-
|
|
30
|
-
const FIRST_LINE_TIMEOUT: Duration = Duration::from_secs(5);
|
|
31
|
-
const TERM_GRACE: Duration = Duration::from_millis(200);
|
|
32
|
-
|
|
33
|
-
/// ---
|
|
34
|
-
/// purpose: 冷启/无 session 的 cursor 计划绑定 create-chat 得到的 chatId
|
|
35
|
-
/// params:
|
|
36
|
-
/// plan: build_command_plan 产出;workspace: 物理 cwd
|
|
37
|
-
/// returns: 成功则 expected_session_id 与 argv `--resume <id>` 齐;失败则计划不变
|
|
38
|
-
/// contract:
|
|
39
|
-
/// provides:
|
|
40
|
-
/// - name: apply_cursor_create_chat_plan
|
|
41
|
-
/// what: 只在无 pending 且 argv 无 --resume 时写入 CLI chatId
|
|
42
|
-
/// boundary:
|
|
43
|
-
/// - 库测试(cfg(test))不调真实 agent,避免订阅/挂起;具名测试打 create_cursor_chat_id
|
|
44
|
-
/// - 不在 launch/restart fresh 调用:活体证实 `--resume` 空聊存档停 pane 后消失
|
|
45
|
-
/// ---
|
|
46
|
-
pub(crate) fn apply_cursor_create_chat_plan(plan: &mut CommandPlan, workspace: &Path) {
|
|
47
|
-
if cfg!(test) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if plan.expected_session_id.is_some() {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if plan.argv.iter().any(|flag| flag == "--resume") {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
let Some(chat_id) = create_cursor_chat_id(workspace) else {
|
|
57
|
-
return;
|
|
58
|
-
};
|
|
59
|
-
plan.expected_session_id = Some(SessionId::new(chat_id.clone()));
|
|
60
|
-
plan.argv.push("--resume".to_string());
|
|
61
|
-
plan.argv.push(chat_id);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/// ---
|
|
65
|
-
/// purpose: 跑 `agent create-chat`,解析首行 UUID,按记录 PID 终止挂起进程
|
|
66
|
-
/// params:
|
|
67
|
-
/// workspace: create-chat 的 cwd(物理 workspace)
|
|
68
|
-
/// returns: 合法 UUID;命令缺失/超时/非法首行则 None
|
|
69
|
-
/// contract:
|
|
70
|
-
/// provides:
|
|
71
|
-
/// - name: create_cursor_chat_id
|
|
72
|
-
/// what: 读一行就停;不 wait 退出;只杀本 Child.id()
|
|
73
|
-
/// boundary:
|
|
74
|
-
/// - 禁 pkill/killall;pid 0/1 不杀
|
|
75
|
-
/// ---
|
|
76
|
-
pub(crate) fn create_cursor_chat_id(workspace: &Path) -> Option<String> {
|
|
77
|
-
create_cursor_chat_id_with_command("agent", workspace)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
fn create_cursor_chat_id_with_command(program: &str, workspace: &Path) -> Option<String> {
|
|
81
|
-
let mut child = Command::new(program)
|
|
82
|
-
.arg("create-chat")
|
|
83
|
-
.current_dir(workspace)
|
|
84
|
-
.stdin(Stdio::null())
|
|
85
|
-
.stdout(Stdio::piped())
|
|
86
|
-
.stderr(Stdio::null())
|
|
87
|
-
.spawn()
|
|
88
|
-
.ok()?;
|
|
89
|
-
let pid = child.id();
|
|
90
|
-
let stdout = child.stdout.take()?;
|
|
91
|
-
let (tx, rx) = mpsc::channel();
|
|
92
|
-
thread::spawn(move || {
|
|
93
|
-
let mut reader = BufReader::new(stdout);
|
|
94
|
-
let mut line = String::new();
|
|
95
|
-
let result = reader.read_line(&mut line).ok().and_then(|_| parse_chat_id_line(&line));
|
|
96
|
-
let _ = tx.send(result);
|
|
97
|
-
});
|
|
98
|
-
let parsed = match rx.recv_timeout(FIRST_LINE_TIMEOUT) {
|
|
99
|
-
Ok(value) => value,
|
|
100
|
-
Err(_) => None,
|
|
101
|
-
};
|
|
102
|
-
kill_recorded_pid(pid);
|
|
103
|
-
let _ = child.wait();
|
|
104
|
-
parsed
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
fn parse_chat_id_line(line: &str) -> Option<String> {
|
|
108
|
-
let token = line
|
|
109
|
-
.trim()
|
|
110
|
-
.split_whitespace()
|
|
111
|
-
.next()
|
|
112
|
-
.unwrap_or("")
|
|
113
|
-
.trim_matches(['"', '\'']);
|
|
114
|
-
is_chat_uuid(token).then(|| token.to_string())
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
fn is_chat_uuid(value: &str) -> bool {
|
|
118
|
-
let bytes = value.as_bytes();
|
|
119
|
-
if bytes.len() != 36 {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
for (i, b) in bytes.iter().enumerate() {
|
|
123
|
-
if i == 8 || i == 13 || i == 18 || i == 23 {
|
|
124
|
-
if *b != b'-' {
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
} else if !b.is_ascii_hexdigit() {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
true
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
fn kill_recorded_pid(pid: u32) {
|
|
135
|
-
if pid == 0 || pid == 1 {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
#[cfg(unix)]
|
|
139
|
-
{
|
|
140
|
-
let raw = pid as i32;
|
|
141
|
-
unsafe {
|
|
142
|
-
libc::kill(raw, libc::SIGTERM);
|
|
143
|
-
}
|
|
144
|
-
thread::sleep(TERM_GRACE);
|
|
145
|
-
unsafe {
|
|
146
|
-
libc::kill(raw, libc::SIGKILL);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
#[cfg(not(unix))]
|
|
150
|
-
{
|
|
151
|
-
let _ = pid;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
#[cfg(test)]
|
|
156
|
-
mod tests {
|
|
157
|
-
#![allow(clippy::unwrap_used)]
|
|
158
|
-
|
|
159
|
-
use super::*;
|
|
160
|
-
use std::os::unix::fs::PermissionsExt;
|
|
161
|
-
use std::sync::atomic::{AtomicU64, Ordering};
|
|
162
|
-
|
|
163
|
-
fn tmp_root(tag: &str) -> std::path::PathBuf {
|
|
164
|
-
static CTR: AtomicU64 = AtomicU64::new(0);
|
|
165
|
-
let dir = std::env::temp_dir().join(format!(
|
|
166
|
-
"ta-d117-create-chat-{}-{}-{}",
|
|
167
|
-
tag,
|
|
168
|
-
std::process::id(),
|
|
169
|
-
CTR.fetch_add(1, Ordering::Relaxed)
|
|
170
|
-
));
|
|
171
|
-
let _ = std::fs::remove_dir_all(&dir);
|
|
172
|
-
std::fs::create_dir_all(&dir).unwrap();
|
|
173
|
-
dir
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
fn write_stub(dir: &Path, body: &str) -> std::path::PathBuf {
|
|
177
|
-
let path = dir.join("agent");
|
|
178
|
-
std::fs::write(&path, body).unwrap();
|
|
179
|
-
let mut perm = std::fs::metadata(&path).unwrap().permissions();
|
|
180
|
-
perm.set_mode(0o755);
|
|
181
|
-
std::fs::set_permissions(&path, perm).unwrap();
|
|
182
|
-
path
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
#[test]
|
|
186
|
-
fn create_chat_reads_first_line_and_kills_recorded_pid() {
|
|
187
|
-
let base = tmp_root("ok");
|
|
188
|
-
let ws = base.join("ws");
|
|
189
|
-
std::fs::create_dir_all(&ws).unwrap();
|
|
190
|
-
let bin = write_stub(
|
|
191
|
-
&base,
|
|
192
|
-
"#!/bin/sh\necho '681c8837-d564-44fa-98bf-4ff5a66592e2'\nkill -STOP $$\n",
|
|
193
|
-
);
|
|
194
|
-
let got = create_cursor_chat_id_with_command(bin.to_str().unwrap(), &ws);
|
|
195
|
-
assert_eq!(
|
|
196
|
-
got.as_deref(),
|
|
197
|
-
Some("681c8837-d564-44fa-98bf-4ff5a66592e2")
|
|
198
|
-
);
|
|
199
|
-
let _ = std::fs::remove_dir_all(&base);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
#[test]
|
|
203
|
-
fn create_chat_rejects_non_uuid_first_line() {
|
|
204
|
-
let base = tmp_root("bad");
|
|
205
|
-
let ws = base.join("ws");
|
|
206
|
-
std::fs::create_dir_all(&ws).unwrap();
|
|
207
|
-
let bin = write_stub(&base, "#!/bin/sh\necho not-a-uuid\nkill -STOP $$\n");
|
|
208
|
-
let got = create_cursor_chat_id_with_command(bin.to_str().unwrap(), &ws);
|
|
209
|
-
assert!(got.is_none());
|
|
210
|
-
let _ = std::fs::remove_dir_all(&base);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
#[test]
|
|
214
|
-
fn apply_is_noop_when_resume_already_present() {
|
|
215
|
-
let mut plan = CommandPlan {
|
|
216
|
-
argv: vec![
|
|
217
|
-
"agent".into(),
|
|
218
|
-
"--resume".into(),
|
|
219
|
-
"already-bound".into(),
|
|
220
|
-
],
|
|
221
|
-
expected_session_id: None,
|
|
222
|
-
provider_projects_root: None,
|
|
223
|
-
managed_mcp_config: false,
|
|
224
|
-
};
|
|
225
|
-
apply_cursor_create_chat_plan(&mut plan, Path::new("/tmp"));
|
|
226
|
-
assert!(plan.expected_session_id.is_none());
|
|
227
|
-
assert_eq!(plan.argv.iter().filter(|a| *a == "--resume").count(), 1);
|
|
228
|
-
}
|
|
229
|
-
}
|