omp packages

@mzwing/pi-session-hub0.3.1

Lists, reads, messages and starts independent Pi sessions

GitHub Actions Published 1 day ago MIT ~747 downloads/mo

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.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@mzwing/pi-session-hub

npm

A Pi extension that lets the Pi sessions on one machine find, read and message each other, and start independent headless sessions.

Install

pi install npm:@mzwing/pi-session-hub

Requires Pi 1.3.0 or later.

Usage

The model gets four tools:

Tool What it does
session_list Lists the running sessions on this machine and the recent sessions of this project
session_read Shows another session's conversation as its model sees it
session_send Messages a running session, starting a turn there unless wake is false
session_spawn Starts a headless pi --print session that outlives this one, or continues a stopped one with resume

/sessions shows the same list as session_list, and /sessions <id> a session's transcript.

Messages wait in a queue under ~/.pi/agent/pi-session-hub/, so one that reaches a headless session after its run has ended is read when that session next starts. A spawned session writes its output to ~/.pi/agent/pi-session-hub/logs/<id>.log.

A spawned session runs headless, so @gotgenes/pi-permission-system denies whatever would ask. Give it rules without asks, or add @mzwing/pi-permission-auto-review to the authorizer chain.

Programmatic use

Other extensions message and start sessions through @mzwing/pi-session-hub/api, whose exports are listed in src/api.ts.

Credits

Spawned sessions re-invoke Pi the way getPiInvocation does in Pi's subagent example.

License

MIT