pi-omp-session-sync
Bidirectional session sync between vanilla Pi (@earendil-works/pi-coding-agent) and OMP (@oh-my-pi/pi-coding-agent)
Package details
Install pi-omp-session-sync from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-omp-session-sync- Package
pi-omp-session-sync- Version
0.1.0- Published
- May 27, 2026
- Downloads
- not available
- Author
- jms830
- License
- MIT
- Types
- extension
- Size
- 59.7 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./adapters/pi/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-omp-session-sync
Bidirectional session sync between vanilla Pi (@earendil-works/pi-coding-agent) and OMP (@oh-my-pi/pi-coding-agent).
Adds a /pi-omp-sync slash command to whichever runtime you're in. When run inside Pi it imports OMP sessions; when run inside OMP it imports Pi sessions. Sessions get rewritten into the target runtime's native JSONL format with the model entry shape and title metadata each runtime expects.
Features
/pi-omp-syncslash command in both runtimes- Interactive session selector
list,status,all,all --dry-run,open <session-id>subcommands- Filters:
--cwd,--since,--updated-since,--limit,--source-dir - Idempotent registry keyed by source session id + source mtime
- Stale-source detection: re-imports automatically when the source file changes
- OMP-only entry types (
mode_change,service_tier_change,session_init) skipped on OMP→Pi model_changereshaped both directions ({provider, modelId}↔model: "provider/modelId")- Title round-tripped: Pi's
session_infoentry ↔ OMP's headertitle
Install
Vanilla Pi
pi install /path/to/pi-omp-session-sync
…or add the absolute repo path to ~/.pi/agent/settings.json:packages[].
OMP
Add the package as a file: dependency in ~/.omp/plugins/package.json and symlink the repo into ~/.omp/plugins/node_modules/pi-omp-session-sync:
ln -s /path/to/pi-omp-session-sync ~/.omp/plugins/node_modules/pi-omp-session-sync
Then update ~/.omp/plugins/package.json:
{
"dependencies": {
"pi-omp-session-sync": "file:/path/to/pi-omp-session-sync"
}
}
Verify with omp plugin doctor.
Usage
/pi-omp-sync # interactive selector
/pi-omp-sync <session-id> # sync a specific session
/pi-omp-sync list [search] # list source-runtime sessions
/pi-omp-sync status # show registry + pending counts
/pi-omp-sync all --dry-run # preview bulk sync
/pi-omp-sync all # bulk sync, idempotent
/pi-omp-sync open <session-id> # switch to a synced session
Flags:
--source-dir /path/to/sessions
--registry /path/to/registry.json
--limit 100
--cwd /repo/path
--since 2026-05-01
--updated-since 2026-05-15
--force
--dry-run
Behavior
When running inside Pi, the command imports OMP sessions into Pi. When running inside OMP, the command imports Pi sessions into OMP.
Each imported session becomes a new native session file in the target runtime. The source file is never modified. The registry (~/.pi/agent/pi-omp-sync-registry.json or ~/.omp/agent/pi-omp-sync-registry.json) tracks source session id → target session file, mtime, and conversion version. A bulk re-run skips sessions whose source mtime hasn't changed; --force overrides.
What's preserved
| Concept | Pi format | OMP format | Round-trip |
|---|---|---|---|
| Title | session_info.name entry |
header title + titleSource |
yes |
| Model | model_change {provider, modelId} |
model_change {model: "provider/modelId"} |
yes |
| Messages | message.message (AgentMessage) |
same | yes |
| Thinking level | thinking_level_change |
same | yes |
| Custom messages | custom_message |
same | yes |
| OMP-only entries | n/a | mode_change, service_tier_change, session_init |
dropped on OMP→Pi |
Tests
bun test