@shog-lab/pi-utils
v0.1.2
Published
Shared infrastructure for pi-mind packages: pi spawn helper, .pi-mind path resolution.
Readme
@shog-lab/pi-utils
Internal infrastructure shared by pi-mind packages (pi-mind-core, pi-toolkit, pi-goals, pi-eval).
What's in here
spawnPi(opts)— programmatic pi-coding-agent spawn with--mode json, text streaming, and token usage extraction. Wraps node:child_process.resolvePiMindDir(cwd?)— resolve.pi-minddirectory location, respecting$PI_MIND_DIRenv var and git worktree boundaries (git rev-parse --git-common-dir).
Why a separate package
pi-mind-core, pi-toolkit (subagent), pi-goals, and pi-eval all drive pi
programmatically and need a shared spawn helper + path resolver.
Previously these lived inside the memory package, which forced everyone
else to depend on the entire memory package just to get a small utility.
Extracting to its own workspace keeps dependencies honest: everyone
depends on pi-utils, not on each other.
This package has no agent-facing tools — it's not loaded as a pi extension.
For agent-facing shared tools (web_search, understand_image, mcp-bridge,
spawn_subagent), see pi-toolkit.
