Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .omp-plugin/marketplace.json

This file was deleted.

11 changes: 6 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
extensions, published as one installable plugin. Install/update/uninstall live in
[`README.md`](./README.md); this file is for _changing_ the code.

The repo root is the plugin manifest: root `package.json` `omp.extensions` lists every
entry point, so one install pulls the whole suite. Each extension is a Bun workspace
member under `extensions/*`. TypeScript run directly by [Bun](https://bun.com/docs/llms.txt)
The repo root is the plugin manifest: root `package.json` `omp.features` declares every
extension as a selectable feature (all `default: true`), so a bare install pulls the whole
suite and a bracketed spec loads a subset. Each extension is a Bun workspace member
under `extensions/*`. TypeScript run directly by [Bun](https://bun.com/docs/llms.txt)
(1.x, Node 24) — **no build step**.

## Layout

```text
package.json root manifest; omp.extensions array = the install contract
package.json root manifest; omp.features map = the install contract (one feature per extension)
extensions/<name>/ one workspace member per extension
index.ts entry: default export receives ExtensionAPI, wires pi.on(...) hooks
index.test.ts colocated bun:test suite
Expand Down Expand Up @@ -65,7 +66,7 @@ what release-please parses on `master`.

1. `mkdir extensions/<name>` with a `package.json` (`name`, `"version": "0.0.0"`,
`omp.extensions: ["./index.ts"]`).
2. Add its entry to the **root** `omp.extensions` array — a member missing from it won't load.
2. Add a feature entry to the **root** `omp.features` map: `"<name>": { "description": "…", "default": true, "extensions": ["./extensions/<name>/index.ts"] }`. `default: true` keeps it in the bare whole-suite install; the key is the `[<name>]` selector. A member missing from it won't load.
3. `bun install`.

## Included extensions
Expand Down
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,32 @@

Personal [oh-my-pi](https://omp.sh) extensions, published as one installable plugin.

The repo root is itself the plugin manifest: root `package.json` `omp.extensions` lists
every extension entry point, so a single `omp plugin install` pulls the whole suite. Each
extension lives in its own Bun workspace member under `extensions/*` for isolated
The repo root is itself the plugin manifest: root `package.json` `omp.features` declares
every extension as a selectable feature (all `default: true`), so a bare `omp plugin
install` enables the whole suite while a bracketed spec enables just the features you name.
Each extension lives in its own Bun workspace member under `extensions/*` for isolated
development and testing.

## Install

All specs install the same single `omp-plugins` package (both extension directories come
with it); the bracket only selects which features **load**:

```sh
omp plugin install github:rblaine95/omp-plugins
omp plugin install github:rblaine95/omp-plugins # enable whole suite
omp plugin install 'github:rblaine95/omp-plugins[rules-guard]' # enable just rules-guard
omp plugin install 'github:rblaine95/omp-plugins[usage-status]' # enable just usage-status
omp plugin install 'github:rblaine95/omp-plugins[*]' # all features, explicit
```

Extensions load on the next omp start. `omp plugin list` shows `omp-plugins` as enabled.
Quote any bracketed spec — shells like zsh treat `[...]` as a glob. Extensions load on the
next omp start. `omp plugin list` shows the one `omp-plugins` package as enabled regardless
of selection. Change which features load later, without reinstalling, via
`omp plugin features @rblaine95/omp-plugins`.

> Marketplace installs (`name@marketplace`) cannot activate these — omp loads
> `omp.extensions`/`omp.features` only for git/npm/`link` installs, never from a marketplace
> cache. Use the `omp plugin install github:…` commands above.

## Update

Expand Down Expand Up @@ -71,5 +85,5 @@ install pulls in zero runtime dependencies.
## Adding an extension

1. `mkdir extensions/<name>` with its own `package.json` (`name`, `"version": "0.0.0"`, `omp.extensions: ["./index.ts"]`) — members are not versioned independently.
2. Add the entry to the root `package.json` `omp.extensions` array, which is what a git install reads.
2. Add a feature entry to the root `package.json` `omp.features` map — `{ "description": "…", "default": true, "extensions": ["./extensions/<name>/index.ts"] }`. This is what a git install reads; `default: true` keeps it in the bare whole-suite install, and its key becomes the `[<name>]` selector.
3. `bun install` to register the new workspace member.
20 changes: 16 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,21 @@
},
"packageManager": "bun@1.3.14",
"omp": {
"extensions": [
"./extensions/rules-guard/index.ts",
"./extensions/usage-status/index.ts"
]
"features": {
"rules-guard": {
"description": "Enforce the Claude permissions allow/deny policy across all omp tools (read/write/edit/find/search/bash/eval/browser).",
"default": true,
"extensions": [
"./extensions/rules-guard/index.ts"
]
},
"usage-status": {
"description": "Show remaining subscription usage and reset countdowns for every provider, in a color-coded row above the omp editor.",
"default": true,
"extensions": [
"./extensions/usage-status/index.ts"
]
}
}
}
}