@linxiraos/pi-utils 1.1.8 → 1.1.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.
Files changed (170) hide show
  1. package/CHANGELOG.md +2 -3
  2. package/README.md +18 -18
  3. package/package.json +57 -63
  4. package/src/async.ts +16 -0
  5. package/src/dirs.ts +15 -10
  6. package/src/incoming-json.ts +856 -0
  7. package/src/index.ts +1 -0
  8. package/src/json-lexer.ts +413 -0
  9. package/src/json-parse.ts +93 -350
  10. package/src/tls-fetch.ts +2 -16
  11. package/THIRD-PARTY-NOTICES.txt +0 -22909
  12. package/dist/types/abortable.d.ts +0 -32
  13. package/dist/types/acp/connection.d.ts +0 -118
  14. package/dist/types/acp/protocol.d.ts +0 -526
  15. package/dist/types/acp/schema.d.ts +0 -41
  16. package/dist/types/acp/stream.d.ts +0 -8
  17. package/dist/types/acp/transport.d.ts +0 -88
  18. package/dist/types/acp.d.ts +0 -6
  19. package/dist/types/ar/arj.d.ts +0 -5
  20. package/dist/types/ar/asar.d.ts +0 -7
  21. package/dist/types/ar/bytes.d.ts +0 -20
  22. package/dist/types/ar/cab.d.ts +0 -5
  23. package/dist/types/ar/checksums.d.ts +0 -10
  24. package/dist/types/ar/codecs/bzip2.d.ts +0 -4
  25. package/dist/types/ar/codecs/gzip.d.ts +0 -6
  26. package/dist/types/ar/codecs/lzma.d.ts +0 -6
  27. package/dist/types/ar/codecs/lzw.d.ts +0 -4
  28. package/dist/types/ar/codecs/lzx.d.ts +0 -7
  29. package/dist/types/ar/codecs/xz.d.ts +0 -4
  30. package/dist/types/ar/codecs/zstd.d.ts +0 -6
  31. package/dist/types/ar/cpio.d.ts +0 -7
  32. package/dist/types/ar/deb.d.ts +0 -5
  33. package/dist/types/ar/entries.d.ts +0 -22
  34. package/dist/types/ar/error.d.ts +0 -8
  35. package/dist/types/ar/index.d.ts +0 -11
  36. package/dist/types/ar/iso.d.ts +0 -5
  37. package/dist/types/ar/limits.d.ts +0 -33
  38. package/dist/types/ar/lzh.d.ts +0 -7
  39. package/dist/types/ar/open.d.ts +0 -45
  40. package/dist/types/ar/paths.d.ts +0 -18
  41. package/dist/types/ar/rar/rar4-decoder.d.ts +0 -6
  42. package/dist/types/ar/rar/rar5-decoder.d.ts +0 -6
  43. package/dist/types/ar/rar.d.ts +0 -5
  44. package/dist/types/ar/reader.d.ts +0 -28
  45. package/dist/types/ar/registry.d.ts +0 -17
  46. package/dist/types/ar/rpm.d.ts +0 -5
  47. package/dist/types/ar/sevenzip/decode.d.ts +0 -33
  48. package/dist/types/ar/sevenzip.d.ts +0 -5
  49. package/dist/types/ar/source.d.ts +0 -54
  50. package/dist/types/ar/tar.d.ts +0 -9
  51. package/dist/types/ar/types.d.ts +0 -99
  52. package/dist/types/ar/unix-ar.d.ts +0 -7
  53. package/dist/types/ar/write.d.ts +0 -10
  54. package/dist/types/ar/zip.d.ts +0 -10
  55. package/dist/types/async.d.ts +0 -22
  56. package/dist/types/binary.d.ts +0 -23
  57. package/dist/types/browsers.d.ts +0 -68
  58. package/dist/types/chalk.d.ts +0 -125
  59. package/dist/types/cli.d.ts +0 -134
  60. package/dist/types/color.d.ts +0 -136
  61. package/dist/types/dates.d.ts +0 -7
  62. package/dist/types/dirs.d.ts +0 -325
  63. package/dist/types/docx/converter.d.ts +0 -46
  64. package/dist/types/docx/xml.d.ts +0 -26
  65. package/dist/types/docx.d.ts +0 -11
  66. package/dist/types/dom/core.d.ts +0 -431
  67. package/dist/types/dom/parser.d.ts +0 -7
  68. package/dist/types/dom/selector.d.ts +0 -5
  69. package/dist/types/dom.d.ts +0 -5
  70. package/dist/types/env.d.ts +0 -133
  71. package/dist/types/fetch-retry.d.ts +0 -98
  72. package/dist/types/file-lock.d.ts +0 -23
  73. package/dist/types/format.d.ts +0 -37
  74. package/dist/types/frontmatter.d.ts +0 -46
  75. package/dist/types/fs-error.d.ts +0 -31
  76. package/dist/types/glob.d.ts +0 -28
  77. package/dist/types/headers.d.ts +0 -34
  78. package/dist/types/index.d.ts +0 -42
  79. package/dist/types/json-parse.d.ts +0 -83
  80. package/dist/types/json.d.ts +0 -20
  81. package/dist/types/logger/rotating-file.d.ts +0 -18
  82. package/dist/types/logger.d.ts +0 -96
  83. package/dist/types/loop-phase.d.ts +0 -10
  84. package/dist/types/lru.d.ts +0 -46
  85. package/dist/types/marked/core.d.ts +0 -445
  86. package/dist/types/marked.d.ts +0 -2
  87. package/dist/types/materialize-string.d.ts +0 -7
  88. package/dist/types/math-delimiters.d.ts +0 -45
  89. package/dist/types/mermaid-ascii.d.ts +0 -11
  90. package/dist/types/mime.d.ts +0 -29
  91. package/dist/types/module-timer.d.ts +0 -1
  92. package/dist/types/path-tree.d.ts +0 -76
  93. package/dist/types/path.d.ts +0 -4
  94. package/dist/types/peek-file.d.ts +0 -29
  95. package/dist/types/postmortem.d.ts +0 -178
  96. package/dist/types/process-name.d.ts +0 -7
  97. package/dist/types/procmgr.d.ts +0 -74
  98. package/dist/types/prompt.d.ts +0 -18
  99. package/dist/types/ptree.d.ts +0 -124
  100. package/dist/types/readability/readability.d.ts +0 -9
  101. package/dist/types/readability/readerable.d.ts +0 -10
  102. package/dist/types/readability/types.d.ts +0 -70
  103. package/dist/types/readability.d.ts +0 -4
  104. package/dist/types/ring.d.ts +0 -93
  105. package/dist/types/runtime-install.d.ts +0 -85
  106. package/dist/types/sanitize-text.d.ts +0 -29
  107. package/dist/types/snowflake.d.ts +0 -25
  108. package/dist/types/sqlite.d.ts +0 -26
  109. package/dist/types/stderr-guard.d.ts +0 -22
  110. package/dist/types/stream.d.ts +0 -75
  111. package/dist/types/tab-spacing.d.ts +0 -24
  112. package/dist/types/temp.d.ts +0 -24
  113. package/dist/types/template.d.ts +0 -62
  114. package/dist/types/timing-buffer.d.ts +0 -22
  115. package/dist/types/tls-fetch.d.ts +0 -37
  116. package/dist/types/turndown/gfm.d.ts +0 -11
  117. package/dist/types/turndown/html.d.ts +0 -5
  118. package/dist/types/turndown/service.d.ts +0 -21
  119. package/dist/types/turndown/types.d.ts +0 -70
  120. package/dist/types/turndown.d.ts +0 -4
  121. package/dist/types/type-guards.d.ts +0 -5
  122. package/dist/types/vendor/mermaid-ascii/ascii/ansi.d.ts +0 -41
  123. package/dist/types/vendor/mermaid-ascii/ascii/canvas.d.ts +0 -89
  124. package/dist/types/vendor/mermaid-ascii/ascii/class-diagram.d.ts +0 -7
  125. package/dist/types/vendor/mermaid-ascii/ascii/converter.d.ts +0 -12
  126. package/dist/types/vendor/mermaid-ascii/ascii/draw.d.ts +0 -66
  127. package/dist/types/vendor/mermaid-ascii/ascii/edge-bundling.d.ts +0 -48
  128. package/dist/types/vendor/mermaid-ascii/ascii/edge-routing.d.ts +0 -43
  129. package/dist/types/vendor/mermaid-ascii/ascii/er-diagram.d.ts +0 -7
  130. package/dist/types/vendor/mermaid-ascii/ascii/grid.d.ts +0 -56
  131. package/dist/types/vendor/mermaid-ascii/ascii/index.d.ts +0 -65
  132. package/dist/types/vendor/mermaid-ascii/ascii/multiline-utils.d.ts +0 -27
  133. package/dist/types/vendor/mermaid-ascii/ascii/pathfinder.d.ts +0 -17
  134. package/dist/types/vendor/mermaid-ascii/ascii/sequence.d.ts +0 -7
  135. package/dist/types/vendor/mermaid-ascii/ascii/shapes/circle.d.ts +0 -11
  136. package/dist/types/vendor/mermaid-ascii/ascii/shapes/corners.d.ts +0 -34
  137. package/dist/types/vendor/mermaid-ascii/ascii/shapes/diamond.d.ts +0 -11
  138. package/dist/types/vendor/mermaid-ascii/ascii/shapes/hexagon.d.ts +0 -11
  139. package/dist/types/vendor/mermaid-ascii/ascii/shapes/index.d.ts +0 -26
  140. package/dist/types/vendor/mermaid-ascii/ascii/shapes/rectangle.d.ts +0 -31
  141. package/dist/types/vendor/mermaid-ascii/ascii/shapes/rounded.d.ts +0 -11
  142. package/dist/types/vendor/mermaid-ascii/ascii/shapes/special.d.ts +0 -59
  143. package/dist/types/vendor/mermaid-ascii/ascii/shapes/stadium.d.ts +0 -17
  144. package/dist/types/vendor/mermaid-ascii/ascii/shapes/state.d.ts +0 -30
  145. package/dist/types/vendor/mermaid-ascii/ascii/shapes/types.d.ts +0 -55
  146. package/dist/types/vendor/mermaid-ascii/ascii/types.d.ts +0 -206
  147. package/dist/types/vendor/mermaid-ascii/ascii/validate.d.ts +0 -51
  148. package/dist/types/vendor/mermaid-ascii/ascii/xychart.d.ts +0 -2
  149. package/dist/types/vendor/mermaid-ascii/class/parser.d.ts +0 -6
  150. package/dist/types/vendor/mermaid-ascii/class/types.d.ts +0 -102
  151. package/dist/types/vendor/mermaid-ascii/er/parser.d.ts +0 -6
  152. package/dist/types/vendor/mermaid-ascii/er/types.d.ts +0 -76
  153. package/dist/types/vendor/mermaid-ascii/index.d.ts +0 -1
  154. package/dist/types/vendor/mermaid-ascii/multiline-utils.d.ts +0 -9
  155. package/dist/types/vendor/mermaid-ascii/parser.d.ts +0 -7
  156. package/dist/types/vendor/mermaid-ascii/sequence/parser.d.ts +0 -6
  157. package/dist/types/vendor/mermaid-ascii/sequence/types.d.ts +0 -130
  158. package/dist/types/vendor/mermaid-ascii/text-metrics.d.ts +0 -23
  159. package/dist/types/vendor/mermaid-ascii/types.d.ts +0 -114
  160. package/dist/types/vendor/mermaid-ascii/xychart/colors.d.ts +0 -25
  161. package/dist/types/vendor/mermaid-ascii/xychart/parser.d.ts +0 -6
  162. package/dist/types/vendor/mermaid-ascii/xychart/types.d.ts +0 -145
  163. package/dist/types/version.d.ts +0 -18
  164. package/dist/types/vterm/buffer.d.ts +0 -99
  165. package/dist/types/vterm/query-responder.d.ts +0 -24
  166. package/dist/types/vterm/terminal.d.ts +0 -44
  167. package/dist/types/vterm.d.ts +0 -9
  168. package/dist/types/which.d.ts +0 -37
  169. package/dist/types/worker-host.d.ts +0 -51
  170. package/dist/types/xml.d.ts +0 -31
package/CHANGELOG.md CHANGED
@@ -2,10 +2,9 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [1.1.8] - 2026-09-04
5
+ ## [1.1.9] - 2026-09-05
6
6
 
7
- - Added `symlinkDirectorySync` Windows-correct directory links (junction) for tests and tooling that must link temp trees without elevation.
8
- - Extended the temp-removal retry window to 7.5s: measured Windows handle-release latency after a child process dies reaches ~5s, and the previous 2s window flaked suites cleaning up trees containing SQLite databases.
7
+ - USER_AGENT constant restored to zeta/<version> (the v18.1.10 merge re-introduced the upstream omp/ UA on every provider request); brand wording in path-resolver docs corrected; profile validation error message Zeta'd.
9
8
 
10
9
  ## [1.1.6] - 2026-08-30
11
10
 
package/README.md CHANGED
@@ -1,25 +1,25 @@
1
1
  # @linxiraos/pi-utils
2
2
 
3
- Shared utilities for [Zeta](https://github.com/Linxira-OS/linxira-zeta) packages. Zero ceremony, Bun-first.
3
+ Shared utilities for [oh-my-pi](https://github.com/can1357/oh-my-pi) packages. Zero ceremony, Bun-first.
4
4
 
5
5
  ## Notable modules
6
6
 
7
- | Module | Purpose |
8
- | --- | --- |
9
- | `logger` | Centralized logger writing to `~/.zeta/logs/` with rotation (TUI-safe — never stdout) |
10
- | `prompt` | Handlebars-based prompt templating and formatting helpers |
11
- | `dirs` | Path helpers for Zeta config directories (`~/.zeta`, XDG-aware on Linux) |
12
- | `stream` | `readStream` / `readLines` helpers over `ReadableStream` |
13
- | `ptree` / `procmgr` | Process trees, `ChildProcess` wrapper, process lifecycle management |
14
- | `postmortem` | Cleanup callbacks on exit, signals, and fatal exceptions |
15
- | `which` | `$which()` binary lookup with caching |
16
- | `fetch-retry` | `fetch` with retry/backoff policies |
17
- | `fs-error` | Errno guards (`isEnoent` and friends) |
18
- | `env` / `worker-host` | Environment plumbing and side-effect-free worker-host entry contract (`workerHostEntry`) |
19
- | `abortable` / `async` | AbortSignal-aware stream/promise helpers |
20
- | `math-delimiters` | LaTeX span/block delimiter grammar (offsets only) shared by the TUI and collab-web renderers |
21
- | `peek-file` | Read the first N bytes of a file with pooled buffers |
22
- | `frontmatter`, `glob`, `mime`, `temp`, `format`, `color`, `snowflake`, `tab-spacing`, `path-tree`, `sanitize-text` | Smaller single-purpose helpers |
7
+ | Module | Purpose |
8
+ | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- |
9
+ | `logger` | Centralized logger writing to `~/.zeta/logs/` with rotation (TUI-safe — never stdout) |
10
+ | `prompt` | Handlebars-based prompt templating and formatting helpers |
11
+ | `dirs` | Path helpers for omp config directories (`~/.zeta`, XDG-aware on Linux) |
12
+ | `stream` | `readStream` / `readLines` helpers over `ReadableStream` |
13
+ | `ptree` / `procmgr` | Process trees, `ChildProcess` wrapper, process lifecycle management |
14
+ | `postmortem` | Cleanup callbacks on exit, signals, and fatal exceptions |
15
+ | `which` | `$which()` binary lookup with caching |
16
+ | `fetch-retry` | `fetch` with retry/backoff policies |
17
+ | `fs-error` | Errno guards (`isEnoent` and friends) |
18
+ | `env` / `worker-host` | Environment plumbing and side-effect-free worker-host entry contract (`workerHostEntry`) |
19
+ | `abortable` / `async` | AbortSignal-aware stream/promise helpers |
20
+ | `math-delimiters` | LaTeX span/block delimiter grammar (offsets only) shared by the TUI and collab-web renderers |
21
+ | `peek-file` | Read the first N bytes of a file with pooled buffers |
22
+ | `frontmatter`, `glob`, `mime`, `temp`, `format`, `color`, `snowflake`, `tab-spacing`, `path-tree`, `sanitize-text` | Smaller single-purpose helpers |
23
23
 
24
24
  Import from the root barrel or per-module subpaths (`@linxiraos/pi-utils/<module>`).
25
25
 
@@ -33,5 +33,5 @@ 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/Linxira-OS/linxira-zeta#readme)
36
+ - [Monorepo README](https://github.com/can1357/oh-my-pi#readme)
37
37
  - [CHANGELOG](./CHANGELOG.md)
package/package.json CHANGED
@@ -1,65 +1,59 @@
1
1
  {
2
- "type": "module",
3
- "name": "@linxiraos/pi-utils",
4
- "version": "1.1.8",
5
- "description": "Shared utilities for pi packages",
6
- "homepage": "https://linxira-os.github.io/zeta/",
7
- "author": "Can Boluk",
8
- "license": "MIT",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
12
- "directory": "packages/utils"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/Linxira-OS/linxira-zeta/issues"
16
- },
17
- "keywords": [
18
- "utilities",
19
- "cli",
20
- "logging",
21
- "streams"
22
- ],
23
- "main": "./src/index.ts",
24
- "types": "./dist/types/index.d.ts",
25
- "scripts": {
26
- "check": "biome check . && bun run check:types",
27
- "check:types": "tsgo -p tsconfig.json --noEmit",
28
- "lint": "biome lint .",
29
- "test": "bun test --parallel",
30
- "fix": "biome check --write --unsafe .",
31
- "fmt": "biome format --write ."
32
- },
33
- "dependencies": {
34
- "@linxiraos/pi-natives": "1.1.8"
35
- },
36
- "devDependencies": {
37
- "@types/bun": "^1.3.14"
38
- },
39
- "engines": {
40
- "bun": ">=1.3.14"
41
- },
42
- "files": [
43
- "src",
44
- "README.md",
45
- "CHANGELOG.md",
46
- "LICENSE",
47
- "THIRD-PARTY-NOTICES.txt",
48
- "dist/types"
49
- ],
50
- "exports": {
51
- ".": {
52
- "types": "./dist/types/index.d.ts",
53
- "import": "./src/index.ts"
54
- },
55
- "./ar": {
56
- "types": "./dist/types/ar/index.d.ts",
57
- "import": "./src/ar/index.ts"
58
- },
59
- "./*": {
60
- "types": "./dist/types/*.d.ts",
61
- "import": "./src/*.ts"
62
- },
63
- "./*.js": "./src/*.ts"
64
- }
2
+ "engines": {
3
+ "bun": ">=1.3.14"
4
+ },
5
+ "devDependencies": {
6
+ "@types/bun": "^1.3.14"
7
+ },
8
+ "dependencies": {
9
+ "@linxiraos/pi-natives": "1.1.9"
10
+ },
11
+ "scripts": {
12
+ "test": "bun test --parallel",
13
+ "check:types": "tsgo -p tsconfig.json --noEmit",
14
+ "check": "tsgo -p tsconfig.json --noEmit"
15
+ },
16
+ "exports": {
17
+ "./*.js": "./src/*.ts",
18
+ "./*": {
19
+ "import": "./src/*.ts",
20
+ "types": "./src/*.ts"
21
+ },
22
+ "./ar": {
23
+ "import": "./src/ar/index.ts",
24
+ "types": "./src/ar/index.ts"
25
+ },
26
+ ".": {
27
+ "import": "./src/index.ts",
28
+ "types": "./src/index.ts"
29
+ }
30
+ },
31
+ "types": "./src/index.ts",
32
+ "main": "./src/index.ts",
33
+ "type": "module",
34
+ "files": [
35
+ "src",
36
+ "README.md",
37
+ "CHANGELOG.md"
38
+ ],
39
+ "repository": {
40
+ "directory": "packages/utils",
41
+ "url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
42
+ "type": "git"
43
+ },
44
+ "author": "Can Boluk",
45
+ "license": "MIT",
46
+ "bugs": {
47
+ "url": "https://github.com/Linxira-OS/linxira-zeta/issues"
48
+ },
49
+ "homepage": "https://linxira-os.github.io/zeta/",
50
+ "keywords": [
51
+ "utilities",
52
+ "cli",
53
+ "logging",
54
+ "streams"
55
+ ],
56
+ "description": "Shared utilities for pi packages",
57
+ "version": "1.1.9",
58
+ "name": "@linxiraos/pi-utils"
65
59
  }
package/src/async.ts CHANGED
@@ -108,3 +108,19 @@ export class AsyncDrain<T> {
108
108
  return this.#promise;
109
109
  }
110
110
  }
111
+
112
+ /**
113
+ * Runs async operations one at a time in call order. Each `run` starts after
114
+ * the previous operation settles (success or failure) and returns that
115
+ * operation's own promise, so a rejected step never poisons the queue. Used by
116
+ * stateful cursors whose concurrent pulls must not interleave.
117
+ */
118
+ export class Serial {
119
+ #tail: Promise<unknown> = Promise.resolve();
120
+
121
+ run<T>(op: () => Promise<T>): Promise<T> {
122
+ const result = this.#tail.then(op, op);
123
+ this.#tail = result.catch(() => {});
124
+ return result;
125
+ }
126
+ }
package/src/dirs.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  * variables are set, paths are redirected to XDG-compliant locations under
9
9
  * $XDG_*_HOME/zeta/. This requires running `zeta config migrate` first to
10
10
  * move data to the new locations. No filesystem existence checks are performed
11
- * — if the env var is set, omp trusts that the migration has been done.
11
+ * — if the env var is set, zeta trusts that the migration has been done.
12
12
  */
13
13
 
14
14
  import * as fs from "node:fs";
@@ -17,7 +17,7 @@ import * as path from "node:path";
17
17
  import { engines, version } from "../package.json" with { type: "json" };
18
18
  import { isEnoent, isEnotdir } from "./fs-error";
19
19
 
20
- /** App name (e.g. "omp") */
20
+ /** App name (e.g. "zeta") */
21
21
  export const APP_NAME: string = "zeta";
22
22
 
23
23
  /** Config directory name (e.g. ".zeta") */
@@ -67,7 +67,7 @@ export function normalizeProfileName(profile: string | undefined): string | unde
67
67
  WINDOWS_RESERVED_BASENAME_RE.test(normalized)
68
68
  ) {
69
69
  throw new Error(
70
- `Invalid OMP profile "${profile}". Profile names must match ${PROFILE_NAME_RE.source}, ` +
70
+ `Invalid Zeta profile "${profile}". Profile names must match ${PROFILE_NAME_RE.source}, ` +
71
71
  `cannot be "." or "..", cannot end with ".", and cannot be a Windows reserved device name ` +
72
72
  `(CON, PRN, AUX, NUL, COM0-9, LPT0-9, or any of those with an extension).`,
73
73
  );
@@ -97,7 +97,7 @@ function getProfileFromEnv(): string | undefined {
97
97
  * crash a bare `import` of this module with an uncaught stack trace before the
98
98
  * CLI's error handling is in scope. The default profile is used instead; the
99
99
  * CLI re-validates the env (see `runCli` in coding-agent/src/cli.ts) so the
100
- * user still gets a clean "Invalid OMP profile" message.
100
+ * user still gets a clean "Invalid Zeta profile" message.
101
101
  */
102
102
  function readProfileFromEnvSafe(): string | undefined {
103
103
  try {
@@ -295,7 +295,7 @@ export function getConfigAgentDirName(): string {
295
295
  type XdgCategory = "data" | "state" | "cache";
296
296
 
297
297
  /**
298
- * Resolves and caches all omp directory paths. On Linux, when XDG environment
298
+ * Resolves and caches all zeta directory paths. On Linux, when XDG environment
299
299
  * variables are set, paths are redirected under $XDG_*_HOME/zeta/. A new
300
300
  * instance is created whenever the agent directory changes, which naturally
301
301
  * invalidates all cached paths.
@@ -949,6 +949,11 @@ export function getSecretPlaceholderKeyPath(): string {
949
949
  return keyPath;
950
950
  }
951
951
 
952
+ /** Directory holding the per-model tiny-worker sockets and logs (~/.zeta/run/tiny; XDG default: $XDG_STATE_HOME/zeta/run/tiny). */
953
+ export function getTinyWorkerRuntimeDir(): string {
954
+ return dirs.rootSubdir(path.join("run", "tiny"), "state");
955
+ }
956
+
952
957
  /** Root directory containing every per-project daemon runtime scope (~/.zeta/run/daemons; XDG default: $XDG_STATE_HOME/zeta/run/daemons). */
953
958
  export function getDaemonRuntimeRoot(): string {
954
959
  return dirs.rootSubdir(path.join("run", "daemons"), "state");
@@ -1108,11 +1113,6 @@ export function getInstallId(): string {
1108
1113
  return next;
1109
1114
  }
1110
1115
 
1111
- /** Test-only: clear cached install id. Never call from production code. */
1112
- export function __resetInstallIdCacheForTests(): void {
1113
- cachedInstallId = null;
1114
- }
1115
-
1116
1116
  /** Get the project-level tracking directory (<project>/.zeta/tracking). */
1117
1117
  export function getProjectTrackingDir(cwd: string = getProjectDir()): string {
1118
1118
  return path.join(getProjectAgentDir(cwd), "tracking");
@@ -1122,3 +1122,8 @@ export function getProjectTrackingDir(cwd: string = getProjectDir()): string {
1122
1122
  export function getTrackingIndexPath(agentDir?: string): string {
1123
1123
  return path.join(agentDir ?? getAgentDir(), "tracking-index.json");
1124
1124
  }
1125
+
1126
+ /** Test-only: clear cached install id. Never call from production code. */
1127
+ export function __resetInstallIdCacheForTests(): void {
1128
+ cachedInstallId = null;
1129
+ }