@webdavis/omp-rex-session-start0.3.0
Send Rex's session-start text to an omp agent running in a Rex pane.
Built for omp
The author tagged this package oh-my-pi.
Reports 0
No reports yet.
Readme
omp-rex-session-start
When omp runs in a Rex pane, this extension sends the main agent Rex's session-start text: that it runs in Rex, and which session and pane it's in. That lets the agent work with Rex on its own, such as splitting its pane or reading another tab's output.
Rex gives Claude Code and Codex this text through their hooks. omp has no Rex hook, so this extension asks Rex for the same text.
Install
omp plugin install npm:@webdavis/omp-rex-session-start
Restart omp after the install.
Use
There's nothing to do. Inside a Rex pane, the main agent gets the text before its first reply. Subagents don't. Outside Rex, the extension does nothing.
omp's status line shows how it's going. These are the default texts, which Settings can change:
| Status | Meaning |
|---|---|
rex → 1st prompt |
omp sends Rex's session-start text with the first prompt |
rex ✓ armed |
The agent got Rex's session-start text |
rex ✗ timed out |
Rex didn't answer within a second |
rex ✗ rex not found |
omp couldn't find the rex command |
rex ✗ rex failed |
Rex answered with an error or nothing |
rex ✓ armed clears itself after 5 minutes, or the time you set. A later success shows nothing. A failure shows again and stays until the next success, which shows rex ✓ armed again.
The first word is muted. The rest is in your theme's success color when sent and its error color on a failure. Where omp draws statuses in one color, the marks still tell the states apart.
A failure also shows a warning, once per session. The extension asks Rex again a minute later.
Run /rex-session-start to see the text the agent was sent, or why none was, and whether session naming is on.
Settings
| Setting | Meaning | Default |
|---|---|---|
waitingText |
The status shown until your first prompt | rex → 1st prompt |
sentText |
The status shown once the agent got the text | rex ✓ armed |
failedText |
The status shown on a failure, followed by the reason | rex ✗ |
sentVisibleFor |
How long the sent status stays on screen | 5m |
omp plugin config set @webdavis/omp-rex-session-start sentVisibleFor 2m
A change applies once you start a new session or restart omp. Write the time as a number and a unit: 30s, 5m, 2h or 1d. Units can be joined, as in 1h30m, and a number without a unit is minutes.
A time that can't be read this way, or isn't above zero, gives the default. So does a blank status text.
Session naming
Rex can ask agents to name their sessions. This extension follows the Rex app's "Let agents name sessions" setting, so omp agents name sessions only when Claude Code and Codex agents do.
Limits
- The extension needs omp 19.3 or later.
- It reads the session naming setting from the Rex app's preferences on macOS. Elsewhere, and when the setting can't be read, agents don't name sessions.
- The text is fetched once per omp process. A restarted or resumed session asks Rex again.
Develop
bun install # installs the dependencies listed in package.json
bun test # runs every test
bun test test/unit # runs only the isolated tests, which load nothing from omp
bun test test/integration # runs only the integration tests, which exercise the whole extension against a fake omp
bun test test/omp # runs only the tests that load omp, against the settings saved in test/fixtures
bun run typechecker # runs the TypeScript compiler's type-checker on the code in src/ and test/
bun run format # formats with Prettier, rewriting the files
bun run format:check # checks the formatting without changing any file
bun run verify # runs what CI runs: the tests, the type-checker and the format check
bun run workflows:check # runs actionlint and zizmor on the GitHub Actions workflows
workflows:check needs actionlint and zizmor, which are separate programs, not dependencies. Install them with:
brew install actionlint zizmor
It also needs gh logged in, so zizmor can include the audits that call the GitHub API, as CI does. Log in with:
gh auth login
Releasing
- Change
versioninpackage.jsonand merge the change tomainin a pull request. - Push a tag named
vfollowed by that version. The tag publishes the package to npm and creates the GitHub release.
git switch main && git pull
git tag -s v0.2.3 -m v0.2.3
git push origin v0.2.3