@oh-my-pi/cli 1.3.37 → 1.3.372
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 +73 -53
- package/dist/cli.js +10067 -2956
- package/dist/commands/config.d.ts +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/enable.d.ts.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/features.d.ts.map +1 -1
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/install.d.ts +2 -2
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/link.d.ts.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/outdated.d.ts.map +1 -1
- package/dist/commands/render-web.d.ts +10 -0
- package/dist/commands/render-web.d.ts.map +1 -0
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/why.d.ts.map +1 -1
- package/dist/conflicts.d.ts +1 -1
- package/dist/conflicts.d.ts.map +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/loader.d.ts +17 -5
- package/dist/loader.d.ts.map +1 -1
- package/dist/lockfile.d.ts.map +1 -1
- package/dist/manifest.d.ts +3 -1
- package/dist/manifest.d.ts.map +1 -1
- package/dist/npm.d.ts +2 -2
- package/dist/npm.d.ts.map +1 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/progress.d.ts.map +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/symlinks.d.ts +1 -1
- package/dist/symlinks.d.ts.map +1 -1
- package/dist/utils/fetch.d.ts +18 -0
- package/dist/utils/fetch.d.ts.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -67,18 +67,20 @@ omp installs plugins globally via npm and sets up your pi configuration:
|
|
|
67
67
|
├── agent/ # Pi's agent directory
|
|
68
68
|
│ ├── agents/ # Agent definitions (.md) - symlinked
|
|
69
69
|
│ ├── commands/ # Slash commands (.md) - symlinked
|
|
70
|
+
│ ├── hooks/omp/ # Hook loader
|
|
71
|
+
│ │ └── index.ts # Generated loader - imports hooks from node_modules
|
|
70
72
|
│ ├── tools/omp/ # Tool loader
|
|
71
73
|
│ │ └── index.ts # Generated loader - imports tools from node_modules
|
|
72
74
|
│ └── themes/ # Theme files (.json) - symlinked
|
|
73
75
|
└── plugins/
|
|
74
76
|
├── package.json # Installed plugins manifest
|
|
75
|
-
├── node_modules/ # Plugin packages (tools loaded directly from here)
|
|
77
|
+
├── node_modules/ # Plugin packages (tools/hooks loaded directly from here)
|
|
76
78
|
└── store/ # Runtime configs (survives npm updates)
|
|
77
79
|
```
|
|
78
80
|
|
|
79
81
|
**Non-tool files** (agents, commands, themes) are symlinked via `omp.install` entries.
|
|
80
82
|
|
|
81
|
-
**Tools** are loaded directly from node_modules via
|
|
83
|
+
**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
84
|
|
|
83
85
|
## Project-Level Overrides
|
|
84
86
|
|
|
@@ -214,16 +216,16 @@ Plugins are npm packages with an `omp` field in `package.json`:
|
|
|
214
216
|
|
|
215
217
|
```json
|
|
216
218
|
{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
"name": "my-cool-plugin",
|
|
220
|
+
"version": "1.0.0",
|
|
221
|
+
"keywords": ["omp-plugin"],
|
|
222
|
+
"omp": {
|
|
223
|
+
"install": [
|
|
224
|
+
{ "src": "agents/researcher.md", "dest": "agent/agents/researcher.md" },
|
|
225
|
+
{ "src": "commands/research.md", "dest": "agent/commands/research.md" }
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"files": ["agents", "commands"]
|
|
227
229
|
}
|
|
228
230
|
```
|
|
229
231
|
|
|
@@ -233,58 +235,76 @@ For plugins with custom tools, use the `tools` field instead of `install`:
|
|
|
233
235
|
|
|
234
236
|
```json
|
|
235
237
|
{
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
238
|
+
"name": "@oh-my-pi/my-tools",
|
|
239
|
+
"version": "1.0.0",
|
|
240
|
+
"keywords": ["omp-plugin"],
|
|
241
|
+
"omp": {
|
|
242
|
+
"tools": "tools"
|
|
243
|
+
},
|
|
244
|
+
"files": ["tools"],
|
|
245
|
+
"dependencies": {
|
|
246
|
+
"some-npm-package": "^1.0.0"
|
|
247
|
+
}
|
|
246
248
|
}
|
|
247
249
|
```
|
|
248
250
|
|
|
249
251
|
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
252
|
|
|
253
|
+
### Hooks
|
|
254
|
+
|
|
255
|
+
For plugins with lifecycle hooks, use the `hooks` field:
|
|
256
|
+
|
|
257
|
+
```json
|
|
258
|
+
{
|
|
259
|
+
"name": "@oh-my-pi/my-hooks",
|
|
260
|
+
"version": "1.0.0",
|
|
261
|
+
"keywords": ["omp-plugin"],
|
|
262
|
+
"omp": {
|
|
263
|
+
"hooks": "hooks"
|
|
264
|
+
},
|
|
265
|
+
"files": ["hooks"]
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
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.
|
|
270
|
+
|
|
251
271
|
### Features and Variables
|
|
252
272
|
|
|
253
273
|
Plugins can define optional features and configurable variables:
|
|
254
274
|
|
|
255
275
|
```json
|
|
256
276
|
{
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
277
|
+
"name": "@oh-my-pi/exa",
|
|
278
|
+
"version": "1.0.0",
|
|
279
|
+
"keywords": ["omp-plugin"],
|
|
280
|
+
"omp": {
|
|
281
|
+
"tools": "tools",
|
|
282
|
+
"runtime": "tools/runtime.json",
|
|
283
|
+
"variables": {
|
|
284
|
+
"apiKey": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"env": "EXA_API_KEY",
|
|
287
|
+
"description": "Exa API key",
|
|
288
|
+
"required": true
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"features": {
|
|
292
|
+
"search": {
|
|
293
|
+
"description": "Web search capabilities",
|
|
294
|
+
"default": true
|
|
295
|
+
},
|
|
296
|
+
"websets": {
|
|
297
|
+
"description": "Curated content collections",
|
|
298
|
+
"default": false,
|
|
299
|
+
"variables": {
|
|
300
|
+
"defaultCollection": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"default": "general"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
288
308
|
}
|
|
289
309
|
```
|
|
290
310
|
|