@linxiraos/pi-utils 1.1.11 → 1.1.12

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.1.12] - 2026-09-10
6
+
7
+ - worker 宿主选择器族统一为 `__zeta_worker_*` 前缀(与主 CLI 对齐)。
8
+
5
9
  ## [1.1.11] - 2026-09-08
6
10
 
7
11
  ### Fixed
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @linxiraos/pi-utils
2
2
 
3
- Shared utilities for [oh-my-pi](https://github.com/can1357/oh-my-pi) packages. Zero ceremony, Bun-first.
3
+ Shared utilities for Zeta packages. Zero ceremony, Bun-first.
4
4
 
5
5
  ## Notable modules
6
6
 
@@ -33,5 +33,4 @@ Ships TypeScript source directly (no build step); requires Bun ≥ 1.3.14.
33
33
 
34
34
  ## References
35
35
 
36
- - [Monorepo README](https://github.com/can1357/oh-my-pi#readme)
37
36
  - [CHANGELOG](./CHANGELOG.md)
@@ -119,7 +119,7 @@ export declare function getProjectAgentDir(cwd?: string): string;
119
119
  export declare function getReportsDir(): string;
120
120
  /** Get the logs directory (~/.zeta/logs). */
121
121
  export declare function getLogsDir(): string;
122
- /** Get this process's dated log path (~/.zeta/logs/omp.YYYY-MM-DD.PID.log). */
122
+ /** Get this process's dated log path (~/.zeta/logs/zeta.YYYY-MM-DD.PID.log). */
123
123
  export declare function getLogPath(date?: Date, pid?: number): string;
124
124
  /**
125
125
  * Get the plugins directory (~/.zeta/plugins or its XDG equivalent).
@@ -263,9 +263,9 @@ export declare function getAgentModulesDir(agentDir?: string): string;
263
263
  export declare function getMemoriesDir(agentDir?: string): string;
264
264
  /** Get the terminal sessions directory (~/.zeta/agent/terminal-sessions). */
265
265
  export declare function getTerminalSessionsDir(agentDir?: string): string;
266
- /** Get the crash log path (~/.zeta/agent/omp-crash.log). */
266
+ /** Get the crash log path (~/.zeta/agent/zeta-crash.log). */
267
267
  export declare function getCrashLogPath(agentDir?: string): string;
268
- /** Get the debug log path (~/.zeta/agent/omp-debug.log). */
268
+ /** Get the debug log path (~/.zeta/agent/zeta-debug.log). */
269
269
  export declare function getDebugLogPath(agentDir?: string): string;
270
270
  /** Get the secret placeholder key path (~/.zeta/agent/secret-placeholder.key; XDG default: $XDG_STATE_HOME/zeta/secret-placeholder.key). Adopts a legacy key on first XDG resolution. */
271
271
  export declare function getSecretPlaceholderKeyPath(): string;
@@ -295,7 +295,7 @@ export declare function getMCPConfigPath(scope: "user" | "project", cwd?: string
295
295
  export declare function getSSHConfigPath(scope: "user" | "project", cwd?: string): string;
296
296
  /**
297
297
  * Application label for usage attribution (`OMP_APP_NAME`), defaulting to
298
- * `omp`. Embedders that drive omp programmatically (robomp, CI bots, …) set
298
+ * `zeta`. Embedders that drive zeta programmatically (robomp, CI bots, …) set
299
299
  * the env var so broker-side per-client burn tracking can answer "what did
300
300
  * app X use" instead of folding everything into one install-wide bucket.
301
301
  */
@@ -1,5 +1,5 @@
1
1
  /** Prefix reserved for argv selectors dispatched by the shared CLI worker host. */
2
- export declare const WORKER_HOST_SELECTOR_PREFIX = "__omp_worker_";
2
+ export declare const WORKER_HOST_SELECTOR_PREFIX = "__zeta_worker_";
3
3
  /** Whether an argv value selects a worker hosted by the shared CLI entrypoint. */
4
4
  export declare function isWorkerHostSelector(value: string | undefined): value is string;
5
5
  /** Called by CLI entrypoints whose main module dispatches worker argv selectors. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linxiraos/pi-utils",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "Shared utilities for pi packages",
5
5
  "keywords": [
6
6
  "utilities",
@@ -51,7 +51,7 @@
51
51
  "test": "bun test --parallel"
52
52
  },
53
53
  "dependencies": {
54
- "@linxiraos/pi-natives": "1.1.11"
54
+ "@linxiraos/pi-natives": "1.1.12"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/bun": "^1.3.14"
package/src/dirs.ts CHANGED
@@ -568,7 +568,7 @@ export function getLogsDir(): string {
568
568
  return dirs.rootSubdir("logs", "state");
569
569
  }
570
570
 
571
- /** Get this process's dated log path (~/.zeta/logs/omp.YYYY-MM-DD.PID.log). */
571
+ /** Get this process's dated log path (~/.zeta/logs/zeta.YYYY-MM-DD.PID.log). */
572
572
  export function getLogPath(date = new Date(), pid = process.pid): string {
573
573
  return path.join(getLogsDir(), `${APP_NAME}.${date.toISOString().slice(0, 10)}.${pid}.log`);
574
574
  }
@@ -893,12 +893,12 @@ export function getTerminalSessionsDir(agentDir?: string): string {
893
893
  return dirs.agentSubdir(agentDir, "terminal-sessions", "state");
894
894
  }
895
895
 
896
- /** Get the crash log path (~/.zeta/agent/omp-crash.log). */
896
+ /** Get the crash log path (~/.zeta/agent/zeta-crash.log). */
897
897
  export function getCrashLogPath(agentDir?: string): string {
898
- return dirs.agentSubdir(agentDir, "omp-crash.log", "state");
898
+ return dirs.agentSubdir(agentDir, "zeta-crash.log", "state");
899
899
  }
900
900
 
901
- /** Get the debug log path (~/.zeta/agent/omp-debug.log). */
901
+ /** Get the debug log path (~/.zeta/agent/zeta-debug.log). */
902
902
  export function getDebugLogPath(agentDir?: string): string {
903
903
  return dirs.agentSubdir(agentDir, `${APP_NAME}-debug.log`, "state");
904
904
  }
@@ -1018,13 +1018,13 @@ let cachedInstallId: string | null = null;
1018
1018
  const INSTALL_ID_FILE = "install-id";
1019
1019
  /**
1020
1020
  * Application label for usage attribution (`OMP_APP_NAME`), defaulting to
1021
- * `omp`. Embedders that drive omp programmatically (robomp, CI bots, …) set
1021
+ * `zeta`. Embedders that drive zeta programmatically (robomp, CI bots, …) set
1022
1022
  * the env var so broker-side per-client burn tracking can answer "what did
1023
1023
  * app X use" instead of folding everything into one install-wide bucket.
1024
1024
  */
1025
1025
  export function getAppName(): string {
1026
1026
  const value = process.env.OMP_APP_NAME?.trim();
1027
- return value ? value : "omp";
1027
+ return value ? value : "zeta";
1028
1028
  }
1029
1029
 
1030
1030
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -1,7 +1,7 @@
1
1
  import { stripWindowsExtendedLengthPathPrefix } from "./path";
2
2
 
3
3
  /** Prefix reserved for argv selectors dispatched by the shared CLI worker host. */
4
- export const WORKER_HOST_SELECTOR_PREFIX = "__omp_worker_";
4
+ export const WORKER_HOST_SELECTOR_PREFIX = "__zeta_worker_";
5
5
 
6
6
  /** Whether an argv value selects a worker hosted by the shared CLI entrypoint. */
7
7
  export function isWorkerHostSelector(value: string | undefined): value is string {
@@ -10,7 +10,7 @@ export function isWorkerHostSelector(value: string | undefined): value is string
10
10
 
11
11
  /**
12
12
  * Main-module path declared by self-dispatching CLI entrypoints — entries
13
- * whose top-level argv handling routes hidden `__omp_*` worker selectors.
13
+ * whose top-level argv handling routes hidden `__zeta_**` worker selectors.
14
14
  * Worker spawn sites re-enter this module via `new Worker(entry, { argv })`,
15
15
  * so every distribution (source, npm bundle, compiled binary) needs exactly
16
16
  * one JavaScript entrypoint. Never set under `bun test`, SDK embedding, or