prpm 1.2.1 → 2.0.1

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.
Files changed (67) hide show
  1. package/README.md +90 -862
  2. package/dist/index.js +23233 -65
  3. package/dist/schemas/agents-md.schema.json +24 -0
  4. package/dist/schemas/aider.schema.json +24 -0
  5. package/dist/schemas/canonical.schema.json +435 -0
  6. package/dist/schemas/claude-agent.schema.json +62 -0
  7. package/dist/schemas/claude-hook.schema.json +70 -0
  8. package/dist/schemas/claude-plugin.schema.json +122 -0
  9. package/dist/schemas/claude-skill.schema.json +51 -0
  10. package/dist/schemas/claude-slash-command.schema.json +77 -0
  11. package/dist/schemas/claude.schema.json +52 -0
  12. package/dist/schemas/continue.schema.json +98 -0
  13. package/dist/schemas/copilot.schema.json +76 -0
  14. package/dist/schemas/cursor-command.schema.json +27 -0
  15. package/dist/schemas/cursor-hooks.schema.json +59 -0
  16. package/dist/schemas/cursor.schema.json +74 -0
  17. package/dist/schemas/droid-hook.schema.json +103 -0
  18. package/dist/schemas/droid-skill.schema.json +46 -0
  19. package/dist/schemas/droid-slash-command.schema.json +53 -0
  20. package/dist/schemas/droid.schema.json +46 -0
  21. package/dist/schemas/format-registry.schema.json +99 -0
  22. package/dist/schemas/gemini-md.schema.json +24 -0
  23. package/dist/schemas/gemini.schema.json +30 -0
  24. package/dist/schemas/kiro-agent.schema.json +146 -0
  25. package/dist/schemas/kiro-hook.schema.json +120 -0
  26. package/dist/schemas/kiro-steering.schema.json +74 -0
  27. package/dist/schemas/mcp-server.schema.json +130 -0
  28. package/dist/schemas/opencode-slash-command.schema.json +60 -0
  29. package/dist/schemas/opencode.schema.json +111 -0
  30. package/dist/schemas/prpm-manifest.schema.json +733 -0
  31. package/dist/schemas/replit.schema.json +21 -0
  32. package/dist/schemas/ruler.schema.json +22 -0
  33. package/dist/schemas/trae.schema.json +24 -0
  34. package/dist/schemas/windsurf.schema.json +22 -0
  35. package/dist/schemas/zencoder.schema.json +51 -0
  36. package/package.json +20 -14
  37. package/schemas/prpm-manifest.schema.json +465 -39
  38. package/dist/__tests__/e2e/test-helpers.js +0 -150
  39. package/dist/commands/collections.js +0 -606
  40. package/dist/commands/index.js +0 -186
  41. package/dist/commands/info.js +0 -82
  42. package/dist/commands/install.js +0 -477
  43. package/dist/commands/list.js +0 -166
  44. package/dist/commands/login.js +0 -281
  45. package/dist/commands/outdated.js +0 -128
  46. package/dist/commands/popular.js +0 -27
  47. package/dist/commands/publish.js +0 -274
  48. package/dist/commands/schema.js +0 -37
  49. package/dist/commands/search.js +0 -404
  50. package/dist/commands/telemetry.js +0 -103
  51. package/dist/commands/trending.js +0 -76
  52. package/dist/commands/uninstall.js +0 -77
  53. package/dist/commands/update.js +0 -121
  54. package/dist/commands/upgrade.js +0 -121
  55. package/dist/commands/whoami.js +0 -75
  56. package/dist/core/claude-config.js +0 -91
  57. package/dist/core/cursor-config.js +0 -130
  58. package/dist/core/downloader.js +0 -64
  59. package/dist/core/filesystem.js +0 -124
  60. package/dist/core/lockfile.js +0 -239
  61. package/dist/core/marketplace-converter.js +0 -198
  62. package/dist/core/registry-client.js +0 -265
  63. package/dist/core/schema-validator.js +0 -74
  64. package/dist/core/telemetry.js +0 -175
  65. package/dist/core/user-config.js +0 -79
  66. package/dist/types/registry.js +0 -5
  67. package/dist/types.js +0 -5
@@ -0,0 +1,103 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/droid/hook.json",
4
+ "$comment": "https://docs.factory.ai/cli/configuration/hooks",
5
+ "title": "Factory Droid Hook Format",
6
+ "description": "JSON Schema for Factory Droid Hooks - defined in settings.json files. Valid hook events: PreToolUse (runs before tool calls, can block them), PostToolUse (runs after tool calls complete), UserPromptSubmit (runs when user submits a prompt, before Droid processes it), Notification (runs when Droid sends notifications), Stop (runs when Droid finishes responding), SubagentStop (runs when sub-droid tasks complete), PreCompact (runs before Droid runs a compact operation), SessionStart (runs when Droid starts a new session or resumes an existing session), SessionEnd (runs when Droid session ends)",
7
+ "type": "object",
8
+ "required": ["hooks"],
9
+ "properties": {
10
+ "hooks": {
11
+ "type": "object",
12
+ "description": "Hook configurations organized by event type. Each key must be a valid hook event name.",
13
+ "patternProperties": {
14
+ "^(PreToolUse|PostToolUse|Notification|UserPromptSubmit|Stop|SubagentStop|PreCompact|SessionStart|SessionEnd)$": {
15
+ "type": "array",
16
+ "description": "Array of hook configurations for this event. PreToolUse: runs before tool calls (can block them). PostToolUse: runs after tool calls complete. UserPromptSubmit: runs when user submits a prompt, before Droid processes it. Notification: runs when Droid sends notifications. Stop: runs when Droid finishes responding. SubagentStop: runs when sub-droid tasks complete. PreCompact: runs before Droid runs a compact operation. SessionStart: runs when Droid starts a new session or resumes an existing session. SessionEnd: runs when Droid session ends.",
17
+ "items": {
18
+ "type": "object",
19
+ "required": ["hooks"],
20
+ "properties": {
21
+ "matcher": {
22
+ "type": "string",
23
+ "description": "Pattern for tool names. Supports exact strings, regex, or '*' for all tools. Optional for most events."
24
+ },
25
+ "hooks": {
26
+ "type": "array",
27
+ "description": "Array of commands to execute",
28
+ "minItems": 1,
29
+ "items": {
30
+ "type": "object",
31
+ "required": ["type", "command"],
32
+ "properties": {
33
+ "type": {
34
+ "type": "string",
35
+ "enum": ["command"],
36
+ "description": "Hook type (currently only 'command' is supported)"
37
+ },
38
+ "command": {
39
+ "type": "string",
40
+ "description": "Bash command to run. Supports $FACTORY_PROJECT_DIR variable."
41
+ },
42
+ "timeout": {
43
+ "type": "number",
44
+ "description": "Execution limit in seconds (defaults to 60)",
45
+ "default": 60,
46
+ "minimum": 1
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "description": {
52
+ "type": "string",
53
+ "description": "Optional description for plugin hooks"
54
+ }
55
+ }
56
+ }
57
+ }
58
+ },
59
+ "additionalProperties": false
60
+ }
61
+ },
62
+ "examples": [
63
+ {
64
+ "hooks": {
65
+ "PreToolUse": [
66
+ {
67
+ "matcher": "write",
68
+ "hooks": [
69
+ {
70
+ "type": "command",
71
+ "command": "prettier --write \"$FACTORY_PROJECT_DIR/src/**/*.ts\"",
72
+ "timeout": 30
73
+ }
74
+ ]
75
+ }
76
+ ],
77
+ "PostToolUse": [
78
+ {
79
+ "matcher": "*",
80
+ "hooks": [
81
+ {
82
+ "type": "command",
83
+ "command": "git add .",
84
+ "timeout": 60
85
+ }
86
+ ]
87
+ }
88
+ ],
89
+ "SessionStart": [
90
+ {
91
+ "matcher": "startup",
92
+ "hooks": [
93
+ {
94
+ "type": "command",
95
+ "command": "echo 'Session started at $(date)' >> $FACTORY_PROJECT_DIR/.factory/session.log"
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ }
101
+ }
102
+ ]
103
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/droid/skill.json",
4
+ "$comment": "https://docs.factory.ai/cli/configuration/skills",
5
+ "title": "Factory Droid Skill Format",
6
+ "description": "JSON Schema for Factory Droid Skills - SKILL.md files stored in .factory/skills/<skill-name>/",
7
+ "type": "object",
8
+ "required": ["frontmatter", "content"],
9
+ "properties": {
10
+ "frontmatter": {
11
+ "type": "object",
12
+ "required": ["name", "description"],
13
+ "properties": {
14
+ "name": {
15
+ "type": "string",
16
+ "description": "Unique identifier for the skill (kebab-case recommended)"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "Brief explanation of what the skill does and when to use it"
21
+ },
22
+ "allowed-tools": {
23
+ "type": "array",
24
+ "description": "Reserved for future use. Safe to omit.",
25
+ "items": {
26
+ "type": "string"
27
+ }
28
+ }
29
+ },
30
+ "additionalProperties": true
31
+ },
32
+ "content": {
33
+ "type": "string",
34
+ "description": "Skill workflow and instructions as markdown"
35
+ }
36
+ },
37
+ "examples": [
38
+ {
39
+ "frontmatter": {
40
+ "name": "api-integration",
41
+ "description": "Integrate a new API endpoint with proper error handling"
42
+ },
43
+ "content": "# API Integration Skill\n\n## Steps\n\n1. Define the API endpoint specification\n2. Create the service layer function\n3. Add error handling and validation\n4. Write unit tests\n5. Update API documentation\n\n## Success Criteria\n\n- All tests pass\n- Error handling covers edge cases\n- Documentation is updated"
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/droid/slash-command.json",
4
+ "$comment": "https://docs.factory.ai/cli/configuration/custom-slash-commands",
5
+ "title": "Factory Droid Slash Command Format",
6
+ "description": "JSON Schema for Factory Droid Slash Commands - markdown files stored in .factory/commands/",
7
+ "type": "object",
8
+ "required": ["frontmatter", "content"],
9
+ "properties": {
10
+ "frontmatter": {
11
+ "type": "object",
12
+ "properties": {
13
+ "description": {
14
+ "type": "string",
15
+ "description": "Overrides the generated summary shown in slash suggestions"
16
+ },
17
+ "argument-hint": {
18
+ "type": "string",
19
+ "description": "Appends inline usage hints (e.g., /code-review <branch-name>)"
20
+ },
21
+ "allowed-tools": {
22
+ "type": "array",
23
+ "description": "Reserved for future use. Safe to omit.",
24
+ "items": {
25
+ "type": "string"
26
+ }
27
+ }
28
+ },
29
+ "additionalProperties": true
30
+ },
31
+ "content": {
32
+ "type": "string",
33
+ "description": "Command instructions and workflow as markdown"
34
+ }
35
+ },
36
+ "examples": [
37
+ {
38
+ "frontmatter": {
39
+ "description": "Review code for a specific branch",
40
+ "argument-hint": "<branch-name>"
41
+ },
42
+ "content": "# Code Review Command\n\nReview the code changes in the specified branch.\n\n## Instructions\n\n1. Compare branch with main\n2. Check for code quality issues\n3. Suggest improvements"
43
+ },
44
+ {
45
+ "frontmatter": {
46
+ "description": "Run tests for a specific file",
47
+ "argument-hint": "<file-path>",
48
+ "allowed-tools": ["bash", "read"]
49
+ },
50
+ "content": "Run tests for the specified file and report results."
51
+ }
52
+ ]
53
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/droid.json",
4
+ "$comment": "https://docs.factory.ai/cli/configuration",
5
+ "title": "Factory Droid Format",
6
+ "description": "JSON Schema for Factory Droid Skills, Hooks, and Slash Commands",
7
+ "type": "object",
8
+ "required": ["frontmatter", "content"],
9
+ "properties": {
10
+ "frontmatter": {
11
+ "type": "object",
12
+ "required": ["name", "description"],
13
+ "properties": {
14
+ "name": {
15
+ "type": "string",
16
+ "description": "Unique identifier for the skill/command"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "Brief explanation of the skill's purpose"
21
+ },
22
+ "argument-hint": {
23
+ "type": "string",
24
+ "description": "Optional usage hint for slash commands"
25
+ },
26
+ "allowed-tools": {
27
+ "type": "array",
28
+ "description": "Reserved for future use",
29
+ "items": {
30
+ "type": "string"
31
+ }
32
+ }
33
+ },
34
+ "additionalProperties": true
35
+ },
36
+ "content": {
37
+ "type": "string",
38
+ "description": "Body content as markdown"
39
+ },
40
+ "type": {
41
+ "type": "string",
42
+ "enum": ["skill", "slash-command", "hook"],
43
+ "description": "The type of Factory Droid artifact"
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/format-registry.json",
4
+ "title": "PRPM Format Registry",
5
+ "description": "Central registry defining all supported AI editor formats, their directory structures, file patterns, and scanning configurations",
6
+ "type": "object",
7
+ "required": ["version", "formats"],
8
+ "properties": {
9
+ "version": {
10
+ "type": "string",
11
+ "description": "Schema version for format registry"
12
+ },
13
+ "formats": {
14
+ "type": "object",
15
+ "description": "Map of format names to their configurations",
16
+ "additionalProperties": {
17
+ "$ref": "#/definitions/FormatConfig"
18
+ }
19
+ }
20
+ },
21
+ "definitions": {
22
+ "FormatConfig": {
23
+ "type": "object",
24
+ "required": ["name", "subtypes"],
25
+ "properties": {
26
+ "name": {
27
+ "type": "string",
28
+ "description": "Display name for the format"
29
+ },
30
+ "description": {
31
+ "type": "string",
32
+ "description": "Brief description of the format"
33
+ },
34
+ "documentationUrl": {
35
+ "type": "string",
36
+ "format": "uri",
37
+ "description": "URL to official documentation"
38
+ },
39
+ "subtypes": {
40
+ "type": "object",
41
+ "description": "Map of subtype names to their configurations",
42
+ "additionalProperties": {
43
+ "$ref": "#/definitions/SubtypeConfig"
44
+ }
45
+ },
46
+ "rootFiles": {
47
+ "type": "array",
48
+ "description": "Root-level files that indicate this format (e.g., .cursorrules)",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "defaultSubtype": {
54
+ "type": "string",
55
+ "description": "Default subtype to use when an unknown subtype is requested for this format"
56
+ }
57
+ }
58
+ },
59
+ "SubtypeConfig": {
60
+ "type": "object",
61
+ "required": ["directory", "filePatterns"],
62
+ "properties": {
63
+ "directory": {
64
+ "type": "string",
65
+ "description": "Directory path relative to project root where packages are stored"
66
+ },
67
+ "scanDirectory": {
68
+ "type": "string",
69
+ "description": "Directory to scan if different from install directory (e.g., Claude hooks)"
70
+ },
71
+ "filePatterns": {
72
+ "type": "array",
73
+ "description": "Glob patterns for matching package files (e.g., *.md, *.mdc, SKILL.md)",
74
+ "items": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "nested": {
79
+ "type": "boolean",
80
+ "description": "Whether packages are in subdirectories (e.g., .claude/skills/skill-name/)",
81
+ "default": false
82
+ },
83
+ "nestedIndicator": {
84
+ "type": "string",
85
+ "description": "File that indicates a valid package in nested mode (e.g., SKILL.md)"
86
+ },
87
+ "fileExtension": {
88
+ "type": "string",
89
+ "description": "Default file extension for this format (e.g., .md, .mdc, .toml)"
90
+ },
91
+ "usesPackageSubdirectory": {
92
+ "type": "boolean",
93
+ "description": "Whether directory path includes package name (e.g., .claude/skills/{name})",
94
+ "default": false
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/gemini-md.json",
4
+ "$comment": "https://geminicli.com/docs/cli/gemini-md/#_top",
5
+ "title": "GEMINI.md Format",
6
+ "description": "JSON Schema for GEMINI.md format - plain markdown project-specific AI instructions (NO frontmatter)",
7
+ "type": "object",
8
+ "required": ["content"],
9
+ "properties": {
10
+ "content": {
11
+ "type": "string",
12
+ "description": "Plain markdown content with project-specific instructions, persona definitions, coding style guides, and best practices. No frontmatter allowed. Supports @file.md syntax for importing other files."
13
+ }
14
+ },
15
+ "additionalProperties": false,
16
+ "examples": [
17
+ {
18
+ "content": "# General Instructions\n\nYou are a helpful coding assistant.\n\n## Coding Style\n\n- Use TypeScript strict mode\n- Follow functional programming patterns\n- Write comprehensive tests"
19
+ },
20
+ {
21
+ "content": "# Project Context\n\nThis is a Next.js application with TypeScript.\n\n## Architecture\n\n- App Router (not Pages Router)\n- Server Components by default\n- Client Components only when needed\n\n## Database\n\nPostgreSQL with Prisma ORM"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/gemini.json",
4
+ "$comment": "https://geminicli.com/docs/cli/custom-commands/",
5
+ "title": "Gemini Custom Commands Format",
6
+ "description": "JSON Schema for Gemini CLI custom commands - TOML files stored in .gemini/commands/",
7
+ "type": "object",
8
+ "required": ["prompt"],
9
+ "properties": {
10
+ "prompt": {
11
+ "type": "string",
12
+ "description": "The instruction text sent to the Gemini model. Can span multiple lines and supports placeholders like {{args}}, !{...} for shell commands, and @{...} for file injection."
13
+ },
14
+ "description": {
15
+ "type": "string",
16
+ "description": "A brief, single-line explanation of the command's purpose. Appears in /help menu. If omitted, system generates a generic description from filename."
17
+ }
18
+ },
19
+ "additionalProperties": false,
20
+ "examples": [
21
+ {
22
+ "prompt": "Review the code for potential bugs and suggest improvements.",
23
+ "description": "Code review assistant"
24
+ },
25
+ {
26
+ "prompt": "Generate unit tests for {{args}}",
27
+ "description": "Generate unit tests for the specified file"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,146 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/kiro/agent.json",
4
+ "$comment": "https://kiro.dev/docs/cli/custom-agents/",
5
+ "title": "Kiro Agent Configuration Format",
6
+ "description": "JSON Schema for Kiro custom agent configurations (.kiro/agents/*.json) - specialized AI assistants with specific tools and context",
7
+ "type": "object",
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "description": "Agent's identifier (optional, defaults to filename)"
12
+ },
13
+ "description": {
14
+ "type": "string",
15
+ "description": "Human-readable explanation of agent's purpose"
16
+ },
17
+ "prompt": {
18
+ "type": "string",
19
+ "description": "High-level context for the agent. Can be inline text or reference external markdown files via file:// URI"
20
+ },
21
+ "mcpServers": {
22
+ "type": "object",
23
+ "description": "Model Context Protocol (MCP) servers configuration",
24
+ "additionalProperties": {
25
+ "type": "object",
26
+ "properties": {
27
+ "command": {
28
+ "type": "string",
29
+ "description": "Command to start the MCP server"
30
+ },
31
+ "args": {
32
+ "type": "array",
33
+ "items": { "type": "string" },
34
+ "description": "Command-line arguments for the server"
35
+ },
36
+ "env": {
37
+ "type": "object",
38
+ "additionalProperties": { "type": "string" },
39
+ "description": "Environment variables for the server"
40
+ },
41
+ "timeout": {
42
+ "type": "number",
43
+ "description": "Server timeout in milliseconds"
44
+ }
45
+ },
46
+ "required": ["command"]
47
+ }
48
+ },
49
+ "tools": {
50
+ "type": "array",
51
+ "items": { "type": "string" },
52
+ "description": "List of available tools (built-in or from MCP servers). Supports wildcards."
53
+ },
54
+ "toolAliases": {
55
+ "type": "object",
56
+ "additionalProperties": { "type": "string" },
57
+ "description": "Rename tools to avoid naming conflicts"
58
+ },
59
+ "allowedTools": {
60
+ "type": "array",
61
+ "items": { "type": "string" },
62
+ "description": "Tools that can be used without user permission. Supports wildcards."
63
+ },
64
+ "toolsSettings": {
65
+ "type": "object",
66
+ "description": "Configure specific tool behaviors",
67
+ "additionalProperties": {
68
+ "type": "object",
69
+ "properties": {
70
+ "allowedPaths": {
71
+ "type": "array",
72
+ "items": { "type": "string" },
73
+ "description": "Allowed file paths for file system tools"
74
+ }
75
+ },
76
+ "additionalProperties": true
77
+ }
78
+ },
79
+ "resources": {
80
+ "type": "array",
81
+ "items": { "type": "string" },
82
+ "description": "Local file resources accessible to the agent (file:// URIs)"
83
+ },
84
+ "hooks": {
85
+ "type": "object",
86
+ "description": "Commands triggered at specific lifecycle points",
87
+ "properties": {
88
+ "agentSpawn": {
89
+ "type": "array",
90
+ "items": { "type": "string" }
91
+ },
92
+ "userPromptSubmit": {
93
+ "type": "array",
94
+ "items": { "type": "string" }
95
+ },
96
+ "preToolUse": {
97
+ "type": "array",
98
+ "items": { "type": "string" }
99
+ },
100
+ "postToolUse": {
101
+ "type": "array",
102
+ "items": { "type": "string" }
103
+ },
104
+ "stop": {
105
+ "type": "array",
106
+ "items": { "type": "string" }
107
+ }
108
+ }
109
+ },
110
+ "useLegacyMcpJson": {
111
+ "type": "boolean",
112
+ "description": "Include legacy MCP configurations"
113
+ },
114
+ "model": {
115
+ "type": "string",
116
+ "description": "Specific AI model for the agent"
117
+ }
118
+ },
119
+ "examples": [
120
+ {
121
+ "name": "backend-specialist",
122
+ "description": "Expert in building Express.js APIs with MongoDB",
123
+ "prompt": "You are a backend developer specializing in Node.js and Express. Focus on API design, database optimization, and security best practices.",
124
+ "tools": ["fs_read", "fs_write", "execute_bash"],
125
+ "toolsSettings": {
126
+ "fs_write": {
127
+ "allowedPaths": ["src/api/**", "tests/api/**", "server.js", "package.json"]
128
+ }
129
+ },
130
+ "resources": [
131
+ "file://.kiro/steering/backend-standards.md"
132
+ ]
133
+ },
134
+ {
135
+ "name": "aws-rust-agent",
136
+ "description": "Specialized agent for AWS and Rust development",
137
+ "prompt": "file://./prompts/aws-rust-expert.md",
138
+ "mcpServers": {
139
+ "fetch": { "command": "fetch-server", "args": [] },
140
+ "git": { "command": "git-mcp", "args": [] }
141
+ },
142
+ "tools": ["fetch", "git_status", "fs_read", "fs_write"],
143
+ "allowedTools": ["fetch", "git_status"]
144
+ }
145
+ ]
146
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://registry.prpm.dev/api/v1/schemas/kiro/hook.json",
4
+ "$comment": "https://kiro.dev/docs/hooks/",
5
+ "title": "Kiro Hook Format",
6
+ "description": "JSON Schema for Kiro hook configuration files (.kiro/hooks/*.json) - event-driven automations",
7
+ "type": "object",
8
+ "required": ["name", "description", "version", "when", "then"],
9
+ "properties": {
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Human-readable name for the hook",
13
+ "minLength": 1
14
+ },
15
+ "description": {
16
+ "type": "string",
17
+ "description": "Explanation of what this hook does",
18
+ "minLength": 1
19
+ },
20
+ "version": {
21
+ "type": "string",
22
+ "description": "Hook version (typically '1')",
23
+ "pattern": "^[0-9]+$"
24
+ },
25
+ "when": {
26
+ "type": "object",
27
+ "description": "Event trigger configuration",
28
+ "required": ["type", "patterns"],
29
+ "properties": {
30
+ "type": {
31
+ "type": "string",
32
+ "enum": ["fileCreated", "fileModified", "fileDeleted"],
33
+ "description": "Type of file system event to trigger on"
34
+ },
35
+ "patterns": {
36
+ "type": "array",
37
+ "description": "Glob patterns to match files",
38
+ "items": {
39
+ "type": "string"
40
+ },
41
+ "minItems": 1
42
+ }
43
+ }
44
+ },
45
+ "then": {
46
+ "type": "object",
47
+ "description": "Action to take when event occurs",
48
+ "required": ["type"],
49
+ "properties": {
50
+ "type": {
51
+ "type": "string",
52
+ "enum": ["askAgent", "runCommand"],
53
+ "description": "Type of action to perform"
54
+ },
55
+ "prompt": {
56
+ "type": "string",
57
+ "description": "Prompt for askAgent action type"
58
+ },
59
+ "command": {
60
+ "type": "string",
61
+ "description": "Shell command for runCommand action type"
62
+ }
63
+ },
64
+ "allOf": [
65
+ {
66
+ "if": {
67
+ "properties": {
68
+ "type": {
69
+ "const": "askAgent"
70
+ }
71
+ }
72
+ },
73
+ "then": {
74
+ "required": ["prompt"]
75
+ }
76
+ },
77
+ {
78
+ "if": {
79
+ "properties": {
80
+ "type": {
81
+ "const": "runCommand"
82
+ }
83
+ }
84
+ },
85
+ "then": {
86
+ "required": ["command"]
87
+ }
88
+ }
89
+ ]
90
+ }
91
+ },
92
+ "examples": [
93
+ {
94
+ "name": "Auto Test Files",
95
+ "description": "Creates test files for new components",
96
+ "version": "1",
97
+ "when": {
98
+ "type": "fileCreated",
99
+ "patterns": ["src/components/**/*.tsx"]
100
+ },
101
+ "then": {
102
+ "type": "askAgent",
103
+ "prompt": "A new component was created. Create a corresponding test file."
104
+ }
105
+ },
106
+ {
107
+ "name": "Lint on Save",
108
+ "description": "Runs linter when files are modified",
109
+ "version": "1",
110
+ "when": {
111
+ "type": "fileModified",
112
+ "patterns": ["src/**/*.ts", "src/**/*.tsx"]
113
+ },
114
+ "then": {
115
+ "type": "runCommand",
116
+ "command": "npm run lint"
117
+ }
118
+ }
119
+ ]
120
+ }