@robhowley/pi-proc1.0.0
Burn down the orchestration runtime. One primitive to run, resume, and wait for Pi processes. All the orchestration you need. The rest is just a skill.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-proc
Burn down the orchestration runtime.
LLMs don't need orchestration frameworks. Give them a process primitive, let them organize their own work, and get out of the way.
Run Pi. Resume Pi. Wait for Pi. Fan-out? Review loops? Write a skill. Pi is built on primitives, not bloat. The workflow belongs to the model, not the runtime.
One tool. Two actions. No framework.
Install
pi install npm:@robhowley/pi-proc
Requirement: pi must be configured and on PATH
API
One tool, pi_process:
type PiProcessInput =
| {
action: 'run';
prompt: string;
mode?: 'sync' | 'async' | 'detached'; // default: sync
sessionId?: string; // resume by ID or file path
cwd?: string; // relative to the caller
model?: string; // provider/model:thinking
agent?: string; // named configuration
args?: string[]; // native Pi CLI flags
}
| {
action: 'wait';
runIds: string[];
timeoutMs?: number; // 0 = poll; omit = wait indefinitely
};
| Mode | Behavior |
|---|---|
sync |
Blocking. Wait for the result. |
async |
Nonblocking. Return immediately; notify on completion; stop the child on normal parent exit. |
detached |
Fire and forget. Return immediately; survive parent exit. |
run returns runId, sessionId, and status. wait returns { runs, timedOut }; timedOut means some runs remain pending.
Only async runs notify the originating session. wait suppresses notifications for finished runs it returns. Timeout or cancellation stops waiting, not the child.
Resume with sessionId, keeping cwd and session-storage flags unchanged. Parallel runs do not isolate files.
args tokens are forwarded unchanged, in order. Use separate option/value tokens for built-ins, for example ['--model', 'provider/model'], not ['--model=provider/model']. Extension assignments such as --custom=@note are not rewritten. Pi's native -- ends option parsing. Print mode and session selection belong to pi_process; use sessionId to resume.
Agent files are just configuration
Yes, agent: "reviewer" works and loads <cwd>/.pi/agents/reviewer.md, falling back to <agentDir>/agents/reviewer.md only if absent. An agent is just named Pi process configuration. Nothing more.
---
model: provider/model
tools: [read, grep, find]
thinking: high
---
Review the implementation. Report concrete defects.
Frontmatter sets defaults; the body appends system instructions. Explicit parameters and CLI arguments override frontmatter defaults.
Under the hood
- Everything is saved, nothing is pruned. Recover any run at
<agentDir>/pi-proc/runs/<runId>/ <agentDir>is Pi's config directory (PI_CODING_AGENT_DIR, default~/.pi/agent). Children inherit the profile. Old runs stay where they are, with no migration or cross-profile lookup.- Override run storage only with
PI_PROC_HOME; agent lookup still uses<agentDir>. Choose another executable withPI_PROC_BIN. - Results include the last 24 KiB of stdout, 4 KiB of stderr, and failure diagnostics.
logPathpoints to full stdout; stderr is alongside it. - At most 64 active runs per state root.
- Parent-exit cleanup is best-effort SIGTERM. SIGKILL, ignored SIGTERM, or separately detached descendants can leave children running.
License
MIT.