prpm 1.2.1 → 2.1.0
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 +90 -862
- package/dist/index.js +24163 -65
- package/dist/schemas/agents-md.schema.json +24 -0
- package/dist/schemas/aider.schema.json +24 -0
- package/dist/schemas/canonical.schema.json +435 -0
- package/dist/schemas/claude-agent.schema.json +62 -0
- package/dist/schemas/claude-hook.schema.json +70 -0
- package/dist/schemas/claude-plugin.schema.json +122 -0
- package/dist/schemas/claude-skill.schema.json +51 -0
- package/dist/schemas/claude-slash-command.schema.json +77 -0
- package/dist/schemas/claude.schema.json +52 -0
- package/dist/schemas/continue.schema.json +98 -0
- package/dist/schemas/copilot.schema.json +76 -0
- package/dist/schemas/cursor-command.schema.json +27 -0
- package/dist/schemas/cursor-hooks.schema.json +59 -0
- package/dist/schemas/cursor.schema.json +74 -0
- package/dist/schemas/droid-hook.schema.json +103 -0
- package/dist/schemas/droid-skill.schema.json +46 -0
- package/dist/schemas/droid-slash-command.schema.json +53 -0
- package/dist/schemas/droid.schema.json +46 -0
- package/dist/schemas/format-capabilities.schema.json +101 -0
- package/dist/schemas/format-registry.schema.json +99 -0
- package/dist/schemas/gemini-extension.schema.json +77 -0
- package/dist/schemas/gemini-md.schema.json +24 -0
- package/dist/schemas/gemini.schema.json +30 -0
- package/dist/schemas/kiro-agent.schema.json +146 -0
- package/dist/schemas/kiro-hook.schema.json +165 -0
- package/dist/schemas/kiro-steering.schema.json +74 -0
- package/dist/schemas/mcp-server.schema.json +130 -0
- package/dist/schemas/opencode-plugin.schema.json +391 -0
- package/dist/schemas/opencode-slash-command.schema.json +60 -0
- package/dist/schemas/opencode.schema.json +111 -0
- package/dist/schemas/prpm-manifest.schema.json +758 -0
- package/dist/schemas/replit.schema.json +21 -0
- package/dist/schemas/ruler.schema.json +22 -0
- package/dist/schemas/trae.schema.json +24 -0
- package/dist/schemas/windsurf.schema.json +22 -0
- package/dist/schemas/zed-extension.schema.json +238 -0
- package/dist/schemas/zed.schema.json +44 -0
- package/dist/schemas/zencoder.schema.json +51 -0
- package/package.json +20 -14
- package/schemas/prpm-manifest.schema.json +490 -39
- package/dist/__tests__/e2e/test-helpers.js +0 -150
- package/dist/commands/collections.js +0 -606
- package/dist/commands/index.js +0 -186
- package/dist/commands/info.js +0 -82
- package/dist/commands/install.js +0 -477
- package/dist/commands/list.js +0 -166
- package/dist/commands/login.js +0 -281
- package/dist/commands/outdated.js +0 -128
- package/dist/commands/popular.js +0 -27
- package/dist/commands/publish.js +0 -274
- package/dist/commands/schema.js +0 -37
- package/dist/commands/search.js +0 -404
- package/dist/commands/telemetry.js +0 -103
- package/dist/commands/trending.js +0 -76
- package/dist/commands/uninstall.js +0 -77
- package/dist/commands/update.js +0 -121
- package/dist/commands/upgrade.js +0 -121
- package/dist/commands/whoami.js +0 -75
- package/dist/core/claude-config.js +0 -91
- package/dist/core/cursor-config.js +0 -130
- package/dist/core/downloader.js +0 -64
- package/dist/core/filesystem.js +0 -124
- package/dist/core/lockfile.js +0 -239
- package/dist/core/marketplace-converter.js +0 -198
- package/dist/core/registry-client.js +0 -265
- package/dist/core/schema-validator.js +0 -74
- package/dist/core/telemetry.js +0 -175
- package/dist/core/user-config.js +0 -79
- package/dist/types/registry.js +0 -5
- package/dist/types.js +0 -5
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://registry.prpm.dev/api/v1/schemas/opencode/plugin.json",
|
|
4
|
+
"$comment": "https://opencode.ai/docs/plugins/",
|
|
5
|
+
"title": "OpenCode Plugin Format",
|
|
6
|
+
"description": "JSON Schema for OpenCode plugin modules. Plugins are JavaScript/TypeScript modules that hook into events across commands, files, LSP, messages, permissions, server, sessions, todos, tools, and TUI interactions. Plugins export an async function that receives a context object (with project, client, $, directory, worktree) and returns an object with an event handler function.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["name", "description", "plugin"],
|
|
9
|
+
"$defs": {
|
|
10
|
+
"eventTypes": {
|
|
11
|
+
"command": {
|
|
12
|
+
"command.executed": {
|
|
13
|
+
"description": "Triggered when a command is executed",
|
|
14
|
+
"event": "command.executed"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"file": {
|
|
18
|
+
"file.edited": {
|
|
19
|
+
"description": "Triggered when a file is edited",
|
|
20
|
+
"event": "file.edited"
|
|
21
|
+
},
|
|
22
|
+
"file.watcher.updated": {
|
|
23
|
+
"description": "Triggered when a file watcher detects changes",
|
|
24
|
+
"event": "file.watcher.updated"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"installation": {
|
|
28
|
+
"installation.updated": {
|
|
29
|
+
"description": "Triggered when installation state is updated",
|
|
30
|
+
"event": "installation.updated"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"lsp": {
|
|
34
|
+
"lsp.client.diagnostics": {
|
|
35
|
+
"description": "Triggered when LSP client receives diagnostics",
|
|
36
|
+
"event": "lsp.client.diagnostics"
|
|
37
|
+
},
|
|
38
|
+
"lsp.updated": {
|
|
39
|
+
"description": "Triggered when LSP state is updated",
|
|
40
|
+
"event": "lsp.updated"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"message": {
|
|
44
|
+
"message.part.removed": {
|
|
45
|
+
"description": "Triggered when a message part is removed",
|
|
46
|
+
"event": "message.part.removed"
|
|
47
|
+
},
|
|
48
|
+
"message.part.updated": {
|
|
49
|
+
"description": "Triggered when a message part is updated",
|
|
50
|
+
"event": "message.part.updated"
|
|
51
|
+
},
|
|
52
|
+
"message.removed": {
|
|
53
|
+
"description": "Triggered when a message is removed",
|
|
54
|
+
"event": "message.removed"
|
|
55
|
+
},
|
|
56
|
+
"message.updated": {
|
|
57
|
+
"description": "Triggered when a message is updated",
|
|
58
|
+
"event": "message.updated"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"permission": {
|
|
62
|
+
"permission.replied": {
|
|
63
|
+
"description": "Triggered when a permission request receives a reply",
|
|
64
|
+
"event": "permission.replied"
|
|
65
|
+
},
|
|
66
|
+
"permission.updated": {
|
|
67
|
+
"description": "Triggered when permission state is updated",
|
|
68
|
+
"event": "permission.updated"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"server": {
|
|
72
|
+
"server.connected": {
|
|
73
|
+
"description": "Triggered when server connection is established",
|
|
74
|
+
"event": "server.connected"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"session": {
|
|
78
|
+
"session.created": {
|
|
79
|
+
"description": "Triggered when a new session is created",
|
|
80
|
+
"event": "session.created"
|
|
81
|
+
},
|
|
82
|
+
"session.compacted": {
|
|
83
|
+
"description": "Triggered when a session is compacted",
|
|
84
|
+
"event": "session.compacted"
|
|
85
|
+
},
|
|
86
|
+
"session.deleted": {
|
|
87
|
+
"description": "Triggered when a session is deleted",
|
|
88
|
+
"event": "session.deleted"
|
|
89
|
+
},
|
|
90
|
+
"session.diff": {
|
|
91
|
+
"description": "Triggered when session changes are detected",
|
|
92
|
+
"event": "session.diff"
|
|
93
|
+
},
|
|
94
|
+
"session.error": {
|
|
95
|
+
"description": "Triggered when a session error occurs",
|
|
96
|
+
"event": "session.error"
|
|
97
|
+
},
|
|
98
|
+
"session.idle": {
|
|
99
|
+
"description": "Triggered when session becomes idle",
|
|
100
|
+
"event": "session.idle"
|
|
101
|
+
},
|
|
102
|
+
"session.status": {
|
|
103
|
+
"description": "Triggered when session status changes",
|
|
104
|
+
"event": "session.status"
|
|
105
|
+
},
|
|
106
|
+
"session.updated": {
|
|
107
|
+
"description": "Triggered when session is updated",
|
|
108
|
+
"event": "session.updated"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"todo": {
|
|
112
|
+
"todo.updated": {
|
|
113
|
+
"description": "Triggered when a todo item is updated",
|
|
114
|
+
"event": "todo.updated"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"tool": {
|
|
118
|
+
"tool.execute.after": {
|
|
119
|
+
"description": "Triggered after a tool execution completes",
|
|
120
|
+
"event": "tool.execute.after"
|
|
121
|
+
},
|
|
122
|
+
"tool.execute.before": {
|
|
123
|
+
"description": "Triggered before a tool execution begins",
|
|
124
|
+
"event": "tool.execute.before"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"tui": {
|
|
128
|
+
"tui.prompt.append": {
|
|
129
|
+
"description": "Triggered when content is appended to the TUI prompt",
|
|
130
|
+
"event": "tui.prompt.append"
|
|
131
|
+
},
|
|
132
|
+
"tui.command.execute": {
|
|
133
|
+
"description": "Triggered when a TUI command is executed",
|
|
134
|
+
"event": "tui.command.execute"
|
|
135
|
+
},
|
|
136
|
+
"tui.toast.show": {
|
|
137
|
+
"description": "Triggered when a toast notification is shown",
|
|
138
|
+
"event": "tui.toast.show"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"properties": {
|
|
144
|
+
"name": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "Plugin name"
|
|
147
|
+
},
|
|
148
|
+
"description": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"description": "Brief description of plugin functionality"
|
|
151
|
+
},
|
|
152
|
+
"version": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "Semantic version",
|
|
155
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
156
|
+
},
|
|
157
|
+
"author": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Plugin author"
|
|
160
|
+
},
|
|
161
|
+
"plugin": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"description": "Plugin implementation details",
|
|
164
|
+
"required": ["file"],
|
|
165
|
+
"properties": {
|
|
166
|
+
"file": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "Path to plugin JavaScript/TypeScript file (e.g., plugin.js, plugin.ts)"
|
|
169
|
+
},
|
|
170
|
+
"export": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"description": "Named export from the plugin file",
|
|
173
|
+
"default": "default"
|
|
174
|
+
},
|
|
175
|
+
"location": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "Plugin location: 'project' (.opencode/plugin/) or 'global' (~/.config/opencode/plugin)",
|
|
178
|
+
"enum": ["project", "global"],
|
|
179
|
+
"default": "project"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"hooks": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"description": "Event hooks implemented by this plugin. All event handlers receive an event object with the event type and relevant data. Plugin exports: export const MyPlugin = async (context) => { return { event: async ({ event }) => { /* handler */ } } }",
|
|
186
|
+
"properties": {
|
|
187
|
+
"command": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"description": "Command execution events",
|
|
190
|
+
"items": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"enum": [
|
|
193
|
+
"command.executed"
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"file": {
|
|
198
|
+
"type": "array",
|
|
199
|
+
"description": "File system events including edits and watcher updates",
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"enum": [
|
|
203
|
+
"file.edited",
|
|
204
|
+
"file.watcher.updated"
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"installation": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"description": "Installation state events",
|
|
211
|
+
"items": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": [
|
|
214
|
+
"installation.updated"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"lsp": {
|
|
219
|
+
"type": "array",
|
|
220
|
+
"description": "Language Server Protocol events including diagnostics and state updates",
|
|
221
|
+
"items": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"enum": [
|
|
224
|
+
"lsp.client.diagnostics",
|
|
225
|
+
"lsp.updated"
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"message": {
|
|
230
|
+
"type": "array",
|
|
231
|
+
"description": "Message and message part lifecycle events",
|
|
232
|
+
"items": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"enum": [
|
|
235
|
+
"message.part.removed",
|
|
236
|
+
"message.part.updated",
|
|
237
|
+
"message.removed",
|
|
238
|
+
"message.updated"
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"permission": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"description": "Permission request and response events",
|
|
245
|
+
"items": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"enum": [
|
|
248
|
+
"permission.replied",
|
|
249
|
+
"permission.updated"
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"server": {
|
|
254
|
+
"type": "array",
|
|
255
|
+
"description": "Server connection events",
|
|
256
|
+
"items": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"enum": [
|
|
259
|
+
"server.connected"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"session": {
|
|
264
|
+
"type": "array",
|
|
265
|
+
"description": "Session lifecycle events including creation, updates, errors, and deletion",
|
|
266
|
+
"items": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"enum": [
|
|
269
|
+
"session.created",
|
|
270
|
+
"session.compacted",
|
|
271
|
+
"session.deleted",
|
|
272
|
+
"session.diff",
|
|
273
|
+
"session.error",
|
|
274
|
+
"session.idle",
|
|
275
|
+
"session.status",
|
|
276
|
+
"session.updated"
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"todo": {
|
|
281
|
+
"type": "array",
|
|
282
|
+
"description": "Todo item update events",
|
|
283
|
+
"items": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"enum": [
|
|
286
|
+
"todo.updated"
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"tool": {
|
|
291
|
+
"type": "array",
|
|
292
|
+
"description": "Tool execution lifecycle events (before/after execution)",
|
|
293
|
+
"items": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"enum": [
|
|
296
|
+
"tool.execute.after",
|
|
297
|
+
"tool.execute.before"
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"tui": {
|
|
302
|
+
"type": "array",
|
|
303
|
+
"description": "Terminal UI events including prompts, commands, and notifications",
|
|
304
|
+
"items": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"enum": [
|
|
307
|
+
"tui.prompt.append",
|
|
308
|
+
"tui.command.execute",
|
|
309
|
+
"tui.toast.show"
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"tools": {
|
|
316
|
+
"type": "array",
|
|
317
|
+
"description": "Custom tools provided by this plugin",
|
|
318
|
+
"items": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"required": ["name", "description"],
|
|
321
|
+
"properties": {
|
|
322
|
+
"name": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"description": "Tool name"
|
|
325
|
+
},
|
|
326
|
+
"description": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"description": "Tool description"
|
|
329
|
+
},
|
|
330
|
+
"parameters": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"description": "Tool parameters (JSON Schema)"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"examples": [
|
|
339
|
+
{
|
|
340
|
+
"name": "env-protection",
|
|
341
|
+
"description": "Prevents sharing .env files",
|
|
342
|
+
"version": "1.0.0",
|
|
343
|
+
"author": "Security Team",
|
|
344
|
+
"plugin": {
|
|
345
|
+
"file": "env-protection.js",
|
|
346
|
+
"location": "global"
|
|
347
|
+
},
|
|
348
|
+
"hooks": {
|
|
349
|
+
"file": ["onFileRead"],
|
|
350
|
+
"permission": ["onPermissionRequest"]
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "notification-plugin",
|
|
355
|
+
"description": "Sends notifications on command completion",
|
|
356
|
+
"version": "1.0.0",
|
|
357
|
+
"author": "DevOps Team",
|
|
358
|
+
"plugin": {
|
|
359
|
+
"file": "notify.ts",
|
|
360
|
+
"export": "NotifyPlugin",
|
|
361
|
+
"location": "project"
|
|
362
|
+
},
|
|
363
|
+
"hooks": {
|
|
364
|
+
"command": ["onCommandEnd", "onCommandError"]
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "custom-tools",
|
|
369
|
+
"description": "Adds custom development tools",
|
|
370
|
+
"version": "1.0.0",
|
|
371
|
+
"plugin": {
|
|
372
|
+
"file": "tools.js"
|
|
373
|
+
},
|
|
374
|
+
"tools": [
|
|
375
|
+
{
|
|
376
|
+
"name": "lint",
|
|
377
|
+
"description": "Run linter on current file",
|
|
378
|
+
"parameters": {
|
|
379
|
+
"type": "object",
|
|
380
|
+
"properties": {
|
|
381
|
+
"fix": {
|
|
382
|
+
"type": "boolean",
|
|
383
|
+
"description": "Auto-fix issues"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://registry.prpm.dev/api/v1/schemas/opencode/slash-command.json",
|
|
4
|
+
"$comment": "https://opencode.ai/docs/slash-commands/",
|
|
5
|
+
"title": "OpenCode Slash Command Format",
|
|
6
|
+
"description": "JSON Schema for OpenCode Slash Commands - markdown files with YAML frontmatter stored in .opencode/command/",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["frontmatter", "content"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"frontmatter": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["template"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"description": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Brief description of what the command does (shown in TUI)"
|
|
17
|
+
},
|
|
18
|
+
"template": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The prompt text sent to the LLM when executed. Required field. Supports placeholders: $ARGUMENTS, $1-$9, !`command`, @filename"
|
|
21
|
+
},
|
|
22
|
+
"agent": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Specifies which agent executes the command"
|
|
25
|
+
},
|
|
26
|
+
"model": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Overrides default model for this command (e.g., 'anthropic/claude-sonnet-4-20250514')"
|
|
29
|
+
},
|
|
30
|
+
"subtask": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Forces subagent invocation behavior when true"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": true
|
|
36
|
+
},
|
|
37
|
+
"content": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Additional command documentation or notes (optional)"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"examples": [
|
|
43
|
+
{
|
|
44
|
+
"frontmatter": {
|
|
45
|
+
"description": "Run tests for a specific file",
|
|
46
|
+
"template": "Run the tests for $1 and report the results",
|
|
47
|
+
"agent": "test-runner",
|
|
48
|
+
"subtask": true
|
|
49
|
+
},
|
|
50
|
+
"content": "# Test Runner Command\n\nExecutes tests for the specified file and provides a detailed report."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"frontmatter": {
|
|
54
|
+
"template": "Review the following code for best practices:\n\n@$1",
|
|
55
|
+
"model": "anthropic/claude-sonnet-4-20250514"
|
|
56
|
+
},
|
|
57
|
+
"content": ""
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://registry.prpm.dev/api/v1/schemas/opencode.json",
|
|
4
|
+
"$comment": "https://opencode.ai/docs/agents/",
|
|
5
|
+
"title": "OpenCode Agent Format",
|
|
6
|
+
"description": "JSON Schema for OpenCode Agents - markdown files with YAML frontmatter stored in .opencode/agent/",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["frontmatter", "content"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"frontmatter": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["description", "mode"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"description": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Brief explanation of the agent's purpose and use cases (required)"
|
|
17
|
+
},
|
|
18
|
+
"mode": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["subagent", "primary", "all"],
|
|
21
|
+
"description": "Determines how the agent can be used: 'primary' (main assistant), 'subagent' (spawned by primary), or 'all' (both contexts). Required field.",
|
|
22
|
+
"default": "all"
|
|
23
|
+
},
|
|
24
|
+
"model": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Override default model (e.g., 'anthropic/claude-sonnet-4-20250514')"
|
|
27
|
+
},
|
|
28
|
+
"temperature": {
|
|
29
|
+
"type": "number",
|
|
30
|
+
"minimum": 0.0,
|
|
31
|
+
"maximum": 1.0,
|
|
32
|
+
"description": "Controls response randomness (0.0-1.0). Defaults to model-specific values (typically 0, or 0.55 for Qwen models)"
|
|
33
|
+
},
|
|
34
|
+
"prompt": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Path to custom system prompt file using {file:./path} syntax"
|
|
37
|
+
},
|
|
38
|
+
"tools": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"description": "Enable/disable specific tools. Supports wildcards (e.g., 'mymcp_*')",
|
|
41
|
+
"properties": {
|
|
42
|
+
"write": { "type": "boolean" },
|
|
43
|
+
"edit": { "type": "boolean" },
|
|
44
|
+
"bash": { "type": "boolean" },
|
|
45
|
+
"read": { "type": "boolean" },
|
|
46
|
+
"grep": { "type": "boolean" },
|
|
47
|
+
"glob": { "type": "boolean" },
|
|
48
|
+
"webfetch": { "type": "boolean" },
|
|
49
|
+
"websearch": { "type": "boolean" }
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": { "type": "boolean" }
|
|
52
|
+
},
|
|
53
|
+
"permission": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"description": "Manages tool access with values: 'ask', 'allow', or 'deny'",
|
|
56
|
+
"properties": {
|
|
57
|
+
"edit": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": ["ask", "allow", "deny"]
|
|
60
|
+
},
|
|
61
|
+
"bash": {
|
|
62
|
+
"oneOf": [
|
|
63
|
+
{ "type": "string", "enum": ["ask", "allow", "deny"] },
|
|
64
|
+
{ "type": "object", "description": "Specific commands allowed" }
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"webfetch": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": ["ask", "allow", "deny"]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": {
|
|
73
|
+
"oneOf": [
|
|
74
|
+
{ "type": "string", "enum": ["ask", "allow", "deny"] },
|
|
75
|
+
{ "type": "object" }
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"disable": {
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"description": "When true, disables the agent"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"additionalProperties": true
|
|
85
|
+
},
|
|
86
|
+
"content": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "System prompt content as markdown text"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"examples": [
|
|
92
|
+
{
|
|
93
|
+
"frontmatter": {
|
|
94
|
+
"description": "Reviews code for best practices",
|
|
95
|
+
"mode": "subagent",
|
|
96
|
+
"model": "anthropic/claude-sonnet-4-20250514",
|
|
97
|
+
"temperature": 0.7,
|
|
98
|
+
"tools": {
|
|
99
|
+
"write": false,
|
|
100
|
+
"edit": true,
|
|
101
|
+
"bash": false
|
|
102
|
+
},
|
|
103
|
+
"permission": {
|
|
104
|
+
"edit": "ask",
|
|
105
|
+
"bash": "deny"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"content": "You are an expert code reviewer.\n\n## Instructions\n\n- Check for code smells\n- Verify test coverage\n- Suggest improvements"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|