53a3aef39a
Review follow-up: a live subagent focused from the Agent Hub renders its session name in the status line (session_name segment reads sessionManager.getSessionName()), so the blanket agentKind === "sub" skip made the user-enabled title.refreshOnReplan silently ineffective and left focused subagents untitled after their first todo replan. Focus only exists in an interactive host, and subagents run in-process, so gate the skip on a process-global interactive-host flag: subagents skip the replan title refresh only in non-interactive hosts (print/RPC/ACP/eval/SDK/ CI) where no session tree is focusable. The interactive entrypoint declares the host via setInteractiveHost(isInteractive); the flag defaults false, so bun test and headless embedders keep the optimization without leaking state. Fixes #5910
@oh-my-pi/pi-utils
Shared utilities for oh-my-pi packages. Zero ceremony, Bun-first.
Notable modules
| Module | Purpose |
|---|---|
logger |
Centralized logger writing to ~/.omp/logs/ with rotation (TUI-safe — never stdout) |
prompt |
Handlebars-based prompt templating and formatting helpers |
dirs |
Path helpers for omp config directories (~/.omp, XDG-aware on Linux) |
stream |
readStream / readLines helpers over ReadableStream |
ptree / procmgr |
Process trees, ChildProcess wrapper, process lifecycle management |
postmortem |
Cleanup callbacks on exit, signals, and fatal exceptions |
which |
$which() binary lookup with caching |
fetch-retry |
fetch with retry/backoff policies |
fs-error |
Errno guards (isEnoent and friends) |
env / worker-host |
Environment plumbing and side-effect-free worker-host entry contract (workerHostEntry) |
abortable / async |
AbortSignal-aware stream/promise helpers |
peek-file |
Read the first N bytes of a file with pooled buffers |
frontmatter, glob, mime, temp, format, color, snowflake, tab-spacing, path-tree, sanitize-text |
Smaller single-purpose helpers |
Import from the root barrel or per-module subpaths (@oh-my-pi/pi-utils/<module>).
Install
bun add @oh-my-pi/pi-utils
Ships TypeScript source directly (no build step); requires Bun ≥ 1.3.14.