@co0ontty/wand 4.75.2-beta.g0c40bc0 → 4.75.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "commit": "0c40bc05212ddd1238c5e34b8e22c360948d714d",
3
- "builtAt": "2026-09-24T07:47:55.588Z",
4
- "version": "4.75.2-beta.g0c40bc0",
5
- "channel": "beta"
2
+ "commit": "f59a3c6dc6450e8289c06a75742258844046afd0",
3
+ "builtAt": "2026-09-24T07:36:52.533Z",
4
+ "version": "4.75.2",
5
+ "channel": "stable"
6
6
  }
@@ -11,4 +11,4 @@ export interface StructuredRunRetentionEntry {
11
11
  */
12
12
  export declare function structuredRunEvictionOrder(entries: readonly StructuredRunRetentionEntry[], now?: number): string[];
13
13
  export declare function runTerminalDaemon(configPath: string): Promise<void>;
14
- export declare function readTerminalDaemonPid(configPath: string, uidOverride?: number): number | null;
14
+ export declare function readTerminalDaemonPid(configPath: string): number | null;
@@ -531,9 +531,9 @@ function fileHoldsValue(filePath, expected) {
531
531
  return false;
532
532
  }
533
533
  }
534
- export function readTerminalDaemonPid(configPath, uidOverride) {
534
+ export function readTerminalDaemonPid(configPath) {
535
535
  try {
536
- const value = Number(readFileSync(terminalDaemonPaths(configPath, uidOverride).pidPath, "utf8").trim());
536
+ const value = Number(readFileSync(terminalDaemonPaths(configPath).pidPath, "utf8").trim());
537
537
  return Number.isSafeInteger(value) && value > 0 ? value : null;
538
538
  }
539
539
  catch {
@@ -643,23 +643,8 @@ function terminalServicePathFor(scope) {
643
643
  }
644
644
  return "";
645
645
  }
646
- /**
647
- * 本 config 的 config 文件 owner uid。
648
- *
649
- * daemon 在 unit/plist 里被钉成 config owner,端点路径里的 uid 也是它;而
650
- * `wand service:install` 常常是 sudo 跑的(uid 0),所以任何涉及 daemon 文件的读取
651
- * 都必须用这个 uid,不能用调用者的。
652
- */
653
- function configOwnerUid(configPath) {
654
- try {
655
- return statUid(path.resolve(configPath));
656
- }
657
- catch {
658
- return undefined;
659
- }
660
- }
661
646
  function hasLiveTerminalDaemon(configPath) {
662
- const pid = readTerminalDaemonPid(configPath, configOwnerUid(configPath));
647
+ const pid = readTerminalDaemonPid(configPath);
663
648
  return pid !== null && isPidAlive(pid);
664
649
  }
665
650
  /** 按 config 派生两套 daemon 的端点(socket 在 /tmp、pid 在 config 目录旁边)。
@@ -669,7 +654,14 @@ function hasLiveTerminalDaemon(configPath) {
669
654
  * 端点,把健康 daemon 当成僵尸(2026-09-24 真实发生过,两个 daemon 被误杀)。
670
655
  */
671
656
  function daemonEndpointStates(configPath) {
672
- const ownerUid = configOwnerUid(configPath);
657
+ const ownerUid = (() => {
658
+ try {
659
+ return statUid(path.resolve(configPath));
660
+ }
661
+ catch {
662
+ return undefined;
663
+ }
664
+ })();
673
665
  const render = renderPaths(configPath, ownerUid);
674
666
  const terminal = terminalDaemonPaths(configPath, ownerUid);
675
667
  const endpoints = [
@@ -751,7 +743,7 @@ export function isDaemonProcessForConfig(pid, configPath, kind) {
751
743
  * 看不到 detail,所以这句拼进 message 里。
752
744
  */
753
745
  function staleDaemonNote(configPath) {
754
- const render = renderPaths(configPath, configOwnerUid(configPath));
746
+ const render = renderPaths(configPath);
755
747
  const pid = readDaemonPidFile(render.pidPath);
756
748
  if (pid === null || !isPidAlive(pid))
757
749
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@co0ontty/wand",
3
- "version": "4.75.2-beta.g0c40bc0",
3
+ "version": "4.75.2",
4
4
  "description": "A web console for Claude Code, Codex, OpenCode, and other local CLI tools.",
5
5
  "type": "module",
6
6
  "bin": {