@join-pantheon/cli 0.32.0-rc.2 → 0.32.0-rc.3

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/dist/uninstall.js CHANGED
@@ -1,4 +1,4 @@
1
- import { execFileSync } from "node:child_process";
1
+ import { execFileSync, spawn } from "node:child_process";
2
2
  import { existsSync, lstatSync, readFileSync, readdirSync, rmdirSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { platform } from "node:os";
4
4
  import { posix, win32 } from "node:path";
@@ -94,6 +94,21 @@ export function managedInstall(home, os = platform(), env = process.env, fs = re
94
94
  const log = os === "win32" ? p.join(root, "install.log") : p.join(root, "logs", "install.log");
95
95
  return { os, root, runtime, binDir, launcher, log, present: fs.exists(runtime) || fs.exists(launcher) };
96
96
  }
97
+ export function finishAfterExit(paths) {
98
+ if (!paths.length || paths.some((x) => /["%^&|<>]/.test(x)))
99
+ return false;
100
+ try {
101
+ const rm = paths.map((x) => `rmdir /s /q "${x}" 2>nul & del /f /q "${x}" 2>nul`).join(" & ");
102
+ const child = spawn("cmd.exe", ["/d", "/s", "/c", `"ping -n 6 127.0.0.1 >nul & ${rm}"`], {
103
+ detached: true, stdio: "ignore", windowsHide: true, windowsVerbatimArguments: true,
104
+ });
105
+ child.unref();
106
+ return true;
107
+ }
108
+ catch {
109
+ return false;
110
+ }
111
+ }
97
112
  export function removeManagedInstall(o) {
98
113
  const fs = o.fs ?? realUninstallFs;
99
114
  const env = o.env ?? process.env;
@@ -170,7 +185,10 @@ export function removeManagedInstall(o) {
170
185
  }
171
186
  const lockedHere = m.os === "win32" && !!o.running && o.running.root.toLowerCase() === m.root.toLowerCase();
172
187
  if (lockedHere) {
173
- left.push(`${m.root} — Windows keeps Pantheon's node.exe locked while this command runs. Close your agent windows and this one, then in a new PowerShell: Remove-Item -Recurse -Force "$env:LOCALAPPDATA\\Pantheon"`);
188
+ const finish = (o.finishLater ?? finishAfterExit)([m.runtime, m.binDir, m.log]);
189
+ left.push(finish
190
+ ? `${m.root} — Windows keeps Pantheon's node.exe locked while this command runs, so it is removed a few seconds after this command exits. If it is still there afterwards, an agent window has it open: close them, then in PowerShell: Remove-Item -Recurse -Force "$env:LOCALAPPDATA\\Pantheon"`
191
+ : `${m.root} — Windows keeps Pantheon's node.exe locked while this command runs. Close your agent windows and this one, then in a new PowerShell: Remove-Item -Recurse -Force "$env:LOCALAPPDATA\\Pantheon"`);
174
192
  return { removed, left };
175
193
  }
176
194
  for (const [path, what] of [[m.launcher, "the pantheon command"], [m.log, "the installer's log"], [m.runtime, "Pantheon's own Node and the CLI in it"]]) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "format": 1,
3
- "built_at": "2026-10-03T12:09:02.195Z",
3
+ "built_at": "2026-10-03T13:04:44.121Z",
4
4
  "swiftc": "Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)",
5
5
  "helpers": {
6
6
  "pantheon-tray": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@join-pantheon/cli",
3
- "version": "0.32.0-rc.2",
3
+ "version": "0.32.0-rc.3",
4
4
  "description": "Let your coding agent collaborate directly with your teammates' agents — ask, agree an interface, and deliver, without a human relaying messages.",
5
5
  "type": "module",
6
6
  "bin": {