@oh-my-pi/pi-utils 15.5.15 → 15.7.0

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.
@@ -31,10 +31,10 @@ interface ArgInput {
31
31
  /** Builders that match the `Flags.*()` / `Args.*()` API from oclif. */
32
32
  export declare const Flags: {
33
33
  string<T extends FlagInput>(opts?: T): FlagDescriptor<"string"> & T;
34
- boolean<T_1 extends FlagInput>(opts?: T_1): FlagDescriptor<"boolean"> & T_1;
35
- integer<T_2 extends FlagInput & {
34
+ boolean<T extends FlagInput>(opts?: T): FlagDescriptor<"boolean"> & T;
35
+ integer<T extends FlagInput & {
36
36
  default?: number;
37
- }>(opts?: T_2): FlagDescriptor<"integer"> & T_2;
37
+ }>(opts?: T): FlagDescriptor<"integer"> & T;
38
38
  };
39
39
  export declare const Args: {
40
40
  string<T extends ArgInput>(opts?: T): ArgDescriptor & T;
@@ -113,6 +113,8 @@ export declare function getAgentDbPath(agentDir?: string): string;
113
113
  export declare function getHistoryDbPath(agentDir?: string): string;
114
114
  /** Get the path to models.db (model cache database). */
115
115
  export declare function getModelDbPath(agentDir?: string): string;
116
+ /** Get the tiny title model cache directory (~/.omp/agent/cache/tiny-models). */
117
+ export declare function getTinyModelsCacheDir(agentDir?: string): string;
116
118
  /** Get the sessions directory (~/.omp/agent/sessions). */
117
119
  export declare function getSessionsDir(agentDir?: string): string;
118
120
  /** Get the content-addressed blob store directory (~/.omp/agent/blobs). */
@@ -5,16 +5,6 @@ export interface ShellConfig {
5
5
  env: Record<string, string>;
6
6
  prefix: string | undefined;
7
7
  }
8
- /**
9
- * Strip disabled macOS malloc-stack-logging vars from `process.env` in place.
10
- *
11
- * macOS leaves `MallocStackLogging=0` (or similar) inherited by debug-attached
12
- * shells. Bun's libc init then prints `MallocStackLogging: can't turn off
13
- * malloc stack logging because it was not enabled.` to stderr for every
14
- * subprocess. Scrubbing once at startup means every child we spawn — bash,
15
- * bun subagents, plugin installs, ptree commands — inherits a clean env.
16
- */
17
- export declare function scrubProcessEnv(): void;
18
8
  /**
19
9
  * Resolve a basic shell (bash or sh) as fallback.
20
10
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-utils",
4
- "version": "15.5.15",
4
+ "version": "15.7.0",
5
5
  "description": "Shared utilities for pi packages",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -31,7 +31,7 @@
31
31
  "fmt": "biome format --write ."
32
32
  },
33
33
  "dependencies": {
34
- "@oh-my-pi/pi-natives": "15.5.15",
34
+ "@oh-my-pi/pi-natives": "15.7.0",
35
35
  "beautiful-mermaid": "^1.1.3",
36
36
  "handlebars": "^4.7.9",
37
37
  "winston": "^3.19.0",
package/src/dirs.ts CHANGED
@@ -28,6 +28,11 @@ export const VERSION: string = version;
28
28
  /** Minimum Bun version */
29
29
  export const MIN_BUN_VERSION: string = engines.bun.replace(/[^0-9.]/g, "");
30
30
 
31
+ try {
32
+ delete process.env.MallocStackLogging;
33
+ delete process.env.MallocStackLoggingNoCompact;
34
+ } catch {}
35
+
31
36
  // =============================================================================
32
37
  // Project directory
33
38
  // =============================================================================
@@ -392,6 +397,11 @@ export function getModelDbPath(agentDir?: string): string {
392
397
  return dirs.agentSubdir(agentDir, "models.db", "data");
393
398
  }
394
399
 
400
+ /** Get the tiny title model cache directory (~/.omp/agent/cache/tiny-models). */
401
+ export function getTinyModelsCacheDir(agentDir?: string): string {
402
+ return dirs.agentSubdir(agentDir, path.join("cache", "tiny-models"), "cache");
403
+ }
404
+
395
405
  /** Get the sessions directory (~/.omp/agent/sessions). */
396
406
  export function getSessionsDir(agentDir?: string): string {
397
407
  return dirs.agentSubdir(agentDir, "sessions", "data");
package/src/procmgr.ts CHANGED
@@ -13,20 +13,6 @@ export interface ShellConfig {
13
13
  }
14
14
  let cachedShellConfig: ShellConfig | null = null;
15
15
 
16
- /**
17
- * Strip disabled macOS malloc-stack-logging vars from `process.env` in place.
18
- *
19
- * macOS leaves `MallocStackLogging=0` (or similar) inherited by debug-attached
20
- * shells. Bun's libc init then prints `MallocStackLogging: can't turn off
21
- * malloc stack logging because it was not enabled.` to stderr for every
22
- * subprocess. Scrubbing once at startup means every child we spawn — bash,
23
- * bun subagents, plugin installs, ptree commands — inherits a clean env.
24
- */
25
- export function scrubProcessEnv(): void {
26
- delete process.env.MallocStackLogging;
27
- delete process.env.MallocStackLoggingNoCompact;
28
- }
29
-
30
16
  /**
31
17
  * Check if a shell binary is executable.
32
18
  */