@oh-my-pi/cli 1.3.371 → 1.3.373

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,25 +9,30 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="https://www.npmjs.com/package/@oh-my-pi/cli"><img src="https://img.shields.io/npm/v/@oh-my-pi/cli?style=flat&colorA=18181B&colorB=F0DB4F" alt="npm version"></a>
13
- <a href="https://github.com/can1357/oh-my-pi/actions"><img src="https://img.shields.io/github/actions/workflow/status/can1357/oh-my-pi/ci.yml?style=flat&colorA=18181B" alt="CI"></a>
14
- <a href="https://github.com/can1357/oh-my-pi/blob/main/LICENSE"><img src="https://img.shields.io/github/license/can1357/oh-my-pi?style=flat&colorA=18181B" alt="License"></a>
12
+ <a href="https://www.npmjs.com/package/@oh-my-pi/cli"><img src="https://img.shields.io/npm/v/@oh-my-pi/cli?style=flat&colorA=222222&colorB=CB3837" alt="npm version"></a>
13
+ <a href="https://github.com/can1357/oh-my-pi/blob/main/CHANGELOG.md"><img src="https://img.shields.io/badge/changelog-keep-E05735?style=flat&colorA=222222" alt="Changelog"></a>
14
+ <a href="https://www.npmjs.com/package/@oh-my-pi/cli"><img src="https://img.shields.io/npm/dm/@oh-my-pi/cli?style=flat&colorA=222222&colorB=28A745" alt="npm downloads"></a>
15
+ <a href="https://github.com/can1357/oh-my-pi/actions"><img src="https://img.shields.io/github/actions/workflow/status/can1357/oh-my-pi/ci.yml?style=flat&colorA=222222&colorB=3FB950" alt="CI"></a>
16
+ <a href="https://github.com/can1357/oh-my-pi/blob/main/LICENSE"><img src="https://img.shields.io/github/license/can1357/oh-my-pi?style=flat&colorA=222222&colorB=58A6FF" alt="License"></a>
17
+ <a href="https://www.typescriptlang.org"><img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat&colorA=222222&logo=typescript&logoColor=white" alt="TypeScript"></a>
18
+ <a href="https://github.com/can1357/oh-my-pi/pulls"><img src="https://img.shields.io/badge/PRs-welcome-A855F7?style=flat&colorA=222222" alt="PRs welcome"></a>
19
+ <a href="https://bun.sh"><img src="https://img.shields.io/badge/runtime-Bun-f472b6?style=flat&colorA=222222" alt="Bun"></a>
15
20
  </p>
16
21
 
17
22
  ---
18
23
 
19
- ## Built-ins
24
+ ## Core Plugins
20
25
 
21
- | Plugin | Description |
22
- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
23
- | **[@oh-my-pi/subagents](https://npmjs.com/package/@oh-my-pi/subagents)** | Task delegation with specialized sub-agents (task, planner, explore, reviewer) |
24
- | **[@oh-my-pi/lsp](https://npmjs.com/package/@oh-my-pi/lsp)** | Language Server Protocol for code intelligence, diagnostics, and refactoring |
25
- | **[@oh-my-pi/anthropic-websearch](https://npmjs.com/package/@oh-my-pi/anthropic-websearch)** | Claude web search using Anthropic's built-in web_search tool |
26
- | **[@oh-my-pi/exa](https://npmjs.com/package/@oh-my-pi/exa)** | Exa AI-powered web search, company/people lookup, and websets |
27
- | **[@oh-my-pi/perplexity](https://npmjs.com/package/@oh-my-pi/perplexity)** | Perplexity AI search with Sonar models (fast and pro) |
28
- | **[@oh-my-pi/user-prompt](https://npmjs.com/package/@oh-my-pi/user-prompt)** | Interactive user prompting for gathering input during execution |
29
- | **[@oh-my-pi/init](https://npmjs.com/package/@oh-my-pi/init)** | `/init` command to generate AGENTS.md documentation for a codebase |
30
- | **[@oh-my-pi/metal-theme](https://npmjs.com/package/@oh-my-pi/metal-theme)** | A metal theme 🤘 |
26
+ | | Plugin | Description |
27
+ | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------ |
28
+ | [![npm](https://img.shields.io/badge/npm-FF4F84?style=flat&logo=npm&logoColor=white)](https://npmjs.com/package/@oh-my-pi/subagents) | **[subagents](./plugins/subagents)** | Task delegation with specialized sub-agents (task, planner, explore, reviewer) |
29
+ | [![npm](https://img.shields.io/badge/npm-31D6FF?style=flat&logo=npm&logoColor=white)](https://npmjs.com/package/@oh-my-pi/lsp) | **[lsp](./plugins/lsp)** | Language Server Protocol for code intelligence, diagnostics, and refactoring |
30
+ | [![npm](https://img.shields.io/badge/npm-00E1B3?style=flat&logo=npm&logoColor=white)](https://npmjs.com/package/@oh-my-pi/anthropic-websearch) | **[anthropic-websearch](./plugins/anthropic-websearch)** | Claude web search using Anthropic's built-in web_search tool |
31
+ | [![npm](https://img.shields.io/badge/npm-FF9638?style=flat&logo=npm&logoColor=white)](https://npmjs.com/package/@oh-my-pi/exa) | **[exa](./plugins/exa)** | Exa AI-powered web search, company/people lookup, and websets |
32
+ | [![npm](https://img.shields.io/badge/npm-BDFF4F?style=flat&logo=npm&logoColor=222)](https://npmjs.com/package/@oh-my-pi/perplexity) | **[perplexity](./plugins/perplexity)** | Perplexity AI search with Sonar models (fast and pro) |
33
+ | [![npm](https://img.shields.io/badge/npm-D7A6FF?style=flat&logo=npm&logoColor=222)](https://npmjs.com/package/@oh-my-pi/user-prompt) | **[user-prompt](./plugins/user-prompt)** | Interactive user prompting for gathering input during execution |
34
+ | [![npm](https://img.shields.io/badge/npm-4FF1FF?style=flat&logo=npm&logoColor=222)](https://npmjs.com/package/@oh-my-pi/init) | **[init](./plugins/init)** | `/init` command to generate AGENTS.md documentation for a codebase |
35
+ | [![npm](https://img.shields.io/badge/npm-FFD16C?style=flat&logo=npm&logoColor=222)](https://npmjs.com/package/@oh-my-pi/metal-theme) | **[metal-theme](./plugins/metal-theme)** | A metal theme 🤘 |
31
36
 
32
37
  ---
33
38
 
@@ -67,18 +72,20 @@ omp installs plugins globally via npm and sets up your pi configuration:
67
72
  ├── agent/ # Pi's agent directory
68
73
  │ ├── agents/ # Agent definitions (.md) - symlinked
69
74
  │ ├── commands/ # Slash commands (.md) - symlinked
75
+ │ ├── hooks/omp/ # Hook loader
76
+ │ │ └── index.ts # Generated loader - imports hooks from node_modules
70
77
  │ ├── tools/omp/ # Tool loader
71
78
  │ │ └── index.ts # Generated loader - imports tools from node_modules
72
79
  │ └── themes/ # Theme files (.json) - symlinked
73
80
  └── plugins/
74
81
  ├── package.json # Installed plugins manifest
75
- ├── node_modules/ # Plugin packages (tools loaded directly from here)
82
+ ├── node_modules/ # Plugin packages (tools/hooks loaded directly from here)
76
83
  └── store/ # Runtime configs (survives npm updates)
77
84
  ```
78
85
 
79
86
  **Non-tool files** (agents, commands, themes) are symlinked via `omp.install` entries.
80
87
 
81
- **Tools** are loaded directly from node_modules via a generated loader. Plugins specify `omp.tools` pointing to their tool factory. This allows tools to use npm dependencies without workarounds.
88
+ **Tools and Hooks** are loaded directly from node_modules via generated loaders. Plugins specify `omp.tools` and/or `omp.hooks` pointing to their factory modules. This allows using npm dependencies without workarounds.
82
89
 
83
90
  ## Project-Level Overrides
84
91
 
@@ -248,6 +255,24 @@ For plugins with custom tools, use the `tools` field instead of `install`:
248
255
 
249
256
  The `tools` field points to a directory containing an `index.ts` that exports a tool factory. Tools are loaded directly from node_modules, so npm dependencies work normally.
250
257
 
258
+ ### Hooks
259
+
260
+ For plugins with lifecycle hooks, use the `hooks` field:
261
+
262
+ ```json
263
+ {
264
+ "name": "@oh-my-pi/my-hooks",
265
+ "version": "1.0.0",
266
+ "keywords": ["omp-plugin"],
267
+ "omp": {
268
+ "hooks": "hooks"
269
+ },
270
+ "files": ["hooks"]
271
+ }
272
+ ```
273
+
274
+ The `hooks` field points to a directory containing an `index.ts` that exports a hook factory (`HookFactory`). Hooks subscribe to agent events like `tool_call`, `session`, etc.
275
+
251
276
  ### Features and Variables
252
277
 
253
278
  Plugins can define optional features and configurable variables:
package/dist/cli.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- #!/usr/bin/env bun
2
1
  export {};
3
2
  //# sourceMappingURL=cli.d.ts.map