@team-agent/installer 0.4.7 → 0.4.9

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.
@@ -584,6 +584,44 @@ pub trait Transport: Send + Sync {
584
584
  self.spawn_into(session, window, argv, cwd, env)
585
585
  }
586
586
 
587
+ /// 0.4.x (CR C-2): leader-specific spawn variant. Instead of `exec <cmd>`
588
+ /// (which makes the provider the pane's primary process and turns the
589
+ /// pane into `[exited]` when the provider exits), build a shell line
590
+ /// that runs the provider as a CHILD of a long-lived shell:
591
+ /// `cd ... && unset ... && KEY=val ... <cmd>; rc=$?; printf '\n[team-agent] <provider> exited with %s\n' "$rc"; exec "${SHELL:-/bin/zsh}" -l`.
592
+ /// When the provider exits, the pane returns to an interactive shell with
593
+ /// an explicit exit marker — matching manual `tmux new-session` then
594
+ /// `claude` behaviour. Default falls back to plain `spawn_first_with_env_unset`
595
+ /// for backends that have no shell layer (test-only `OfflineTransport`).
596
+ fn spawn_first_with_leader_shell_wrapper(
597
+ &self,
598
+ session: &SessionName,
599
+ window: &WindowName,
600
+ argv: &[String],
601
+ cwd: &Path,
602
+ env: &BTreeMap<String, String>,
603
+ env_unset: &[String],
604
+ provider_label: &str,
605
+ ) -> Result<SpawnResult, TransportError> {
606
+ let _ = provider_label;
607
+ self.spawn_first_with_env_unset(session, window, argv, cwd, env, env_unset)
608
+ }
609
+
610
+ /// 同 [`Transport::spawn_first_with_leader_shell_wrapper`],对应 `spawn_into`。
611
+ fn spawn_into_with_leader_shell_wrapper(
612
+ &self,
613
+ session: &SessionName,
614
+ window: &WindowName,
615
+ argv: &[String],
616
+ cwd: &Path,
617
+ env: &BTreeMap<String, String>,
618
+ env_unset: &[String],
619
+ provider_label: &str,
620
+ ) -> Result<SpawnResult, TransportError> {
621
+ let _ = provider_label;
622
+ self.spawn_into_with_env_unset(session, window, argv, cwd, env, env_unset)
623
+ }
624
+
587
625
  // —— INJECT / CAPTURE / QUERY(RIE):按稳定 Target 寻址 ——
588
626
 
589
627
  /// 归并 set/load-buffer + paste-buffer + send submit;空文本走纯 send-keys
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-agent/installer",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
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.4.7",
24
- "@team-agent/cli-darwin-x64": "0.4.7",
25
- "@team-agent/cli-linux-x64": "0.4.7"
23
+ "@team-agent/cli-darwin-arm64": "0.4.9",
24
+ "@team-agent/cli-darwin-x64": "0.4.9",
25
+ "@team-agent/cli-linux-x64": "0.4.9"
26
26
  },
27
27
  "scripts": {
28
28
  "postinstall": "node npm/bincheck.mjs",