@hashicorp/kits 0.1.8 → 0.1.10

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 (153) hide show
  1. package/README.md +2 -0
  2. package/dist/adapters/base-adapter.d.ts.map +1 -1
  3. package/dist/adapters/base-adapter.js +13 -4
  4. package/dist/adapters/base-adapter.js.map +1 -1
  5. package/dist/adapters/command-parser.d.ts +12 -0
  6. package/dist/adapters/command-parser.d.ts.map +1 -1
  7. package/dist/adapters/command-parser.js +7 -1
  8. package/dist/adapters/command-parser.js.map +1 -1
  9. package/dist/adapters/gemini-cli/installer.js +1 -1
  10. package/dist/adapters/gemini-cli/installer.js.map +1 -1
  11. package/dist/cli/install.d.ts.map +1 -1
  12. package/dist/cli/install.js +34 -29
  13. package/dist/cli/install.js.map +1 -1
  14. package/dist/cli/uninstall.d.ts +1 -0
  15. package/dist/cli/uninstall.d.ts.map +1 -1
  16. package/dist/cli/uninstall.js +57 -62
  17. package/dist/cli/uninstall.js.map +1 -1
  18. package/dist/cli/upgrade.d.ts.map +1 -1
  19. package/dist/cli/upgrade.js +53 -57
  20. package/dist/cli/upgrade.js.map +1 -1
  21. package/dist/core/types.d.ts +2 -2
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/lockfile/index.d.ts +1 -1
  27. package/dist/lockfile/index.d.ts.map +1 -1
  28. package/dist/lockfile/index.js +1 -1
  29. package/dist/lockfile/index.js.map +1 -1
  30. package/dist/lockfile/read.d.ts.map +1 -1
  31. package/dist/lockfile/read.js +15 -24
  32. package/dist/lockfile/read.js.map +1 -1
  33. package/dist/lockfile/types.d.ts +4 -2
  34. package/dist/lockfile/types.d.ts.map +1 -1
  35. package/dist/lockfile/types.js +4 -2
  36. package/dist/lockfile/types.js.map +1 -1
  37. package/dist/lockfile/write.d.ts.map +1 -1
  38. package/dist/lockfile/write.js +7 -0
  39. package/dist/lockfile/write.js.map +1 -1
  40. package/dist/manifest/read.d.ts.map +1 -1
  41. package/dist/manifest/read.js +14 -19
  42. package/dist/manifest/read.js.map +1 -1
  43. package/dist/manifest/types.d.ts +2 -0
  44. package/dist/manifest/types.d.ts.map +1 -1
  45. package/dist/manifest/types.js +2 -0
  46. package/dist/manifest/types.js.map +1 -1
  47. package/dist/manifest/write.d.ts.map +1 -1
  48. package/dist/manifest/write.js +4 -1
  49. package/dist/manifest/write.js.map +1 -1
  50. package/dist/resolution/primitives-registry.d.ts.map +1 -1
  51. package/dist/resolution/primitives-registry.js +27 -1
  52. package/dist/resolution/primitives-registry.js.map +1 -1
  53. package/dist/tui/compatibility.d.ts.map +1 -1
  54. package/dist/tui/compatibility.js +81 -44
  55. package/dist/tui/compatibility.js.map +1 -1
  56. package/dist/tui/env-prompt.d.ts.map +1 -1
  57. package/dist/tui/env-prompt.js +39 -37
  58. package/dist/tui/env-prompt.js.map +1 -1
  59. package/dist/tui/harness-select.d.ts.map +1 -1
  60. package/dist/tui/harness-select.js +12 -18
  61. package/dist/tui/harness-select.js.map +1 -1
  62. package/dist/tui/index.d.ts +3 -1
  63. package/dist/tui/index.d.ts.map +1 -1
  64. package/dist/tui/index.js +12 -7
  65. package/dist/tui/index.js.map +1 -1
  66. package/dist/tui/kit-select.d.ts.map +1 -1
  67. package/dist/tui/kit-select.js +18 -22
  68. package/dist/tui/kit-select.js.map +1 -1
  69. package/dist/tui/progress.d.ts.map +1 -1
  70. package/dist/tui/progress.js +19 -14
  71. package/dist/tui/progress.js.map +1 -1
  72. package/dist/tui/renderer.d.ts +109 -0
  73. package/dist/tui/renderer.d.ts.map +1 -0
  74. package/dist/tui/renderer.js +296 -0
  75. package/dist/tui/renderer.js.map +1 -0
  76. package/dist/tui/resolution.d.ts.map +1 -1
  77. package/dist/tui/resolution.js +29 -22
  78. package/dist/tui/resolution.js.map +1 -1
  79. package/dist/tui/scope-compatibility.d.ts.map +1 -1
  80. package/dist/tui/scope-compatibility.js +17 -15
  81. package/dist/tui/scope-compatibility.js.map +1 -1
  82. package/dist/tui/scope-select.d.ts +1 -0
  83. package/dist/tui/scope-select.d.ts.map +1 -1
  84. package/dist/tui/scope-select.js +18 -16
  85. package/dist/tui/scope-select.js.map +1 -1
  86. package/dist/tui/summary.d.ts.map +1 -1
  87. package/dist/tui/summary.js +118 -57
  88. package/dist/tui/summary.js.map +1 -1
  89. package/dist/tui/types.d.ts +1 -0
  90. package/dist/tui/types.d.ts.map +1 -1
  91. package/dist/tui/uninstall.d.ts +13 -0
  92. package/dist/tui/uninstall.d.ts.map +1 -0
  93. package/dist/tui/uninstall.js +100 -0
  94. package/dist/tui/uninstall.js.map +1 -0
  95. package/dist/tui/upgrade-select.d.ts +26 -0
  96. package/dist/tui/upgrade-select.d.ts.map +1 -1
  97. package/dist/tui/upgrade-select.js +162 -123
  98. package/dist/tui/upgrade-select.js.map +1 -1
  99. package/dist/tui/upgrade.d.ts +15 -0
  100. package/dist/tui/upgrade.d.ts.map +1 -0
  101. package/dist/tui/upgrade.js +47 -0
  102. package/dist/tui/upgrade.js.map +1 -0
  103. package/dist/validation/schema-registry.d.ts +18 -0
  104. package/dist/validation/schema-registry.d.ts.map +1 -0
  105. package/dist/validation/schema-registry.js +112 -0
  106. package/dist/validation/schema-registry.js.map +1 -0
  107. package/dist/validation/schema-validator.d.ts +18 -0
  108. package/dist/validation/schema-validator.d.ts.map +1 -0
  109. package/dist/validation/schema-validator.js +62 -0
  110. package/dist/validation/schema-validator.js.map +1 -0
  111. package/dist/validation/validate-commands.d.ts +3 -1
  112. package/dist/validation/validate-commands.d.ts.map +1 -1
  113. package/dist/validation/validate-commands.js +37 -10
  114. package/dist/validation/validate-commands.js.map +1 -1
  115. package/dist/validation/validate-hooks.d.ts.map +1 -1
  116. package/dist/validation/validate-hooks.js +11 -15
  117. package/dist/validation/validate-hooks.js.map +1 -1
  118. package/dist/validation/validate-kits.d.ts +1 -4
  119. package/dist/validation/validate-kits.d.ts.map +1 -1
  120. package/dist/validation/validate-kits.js +19 -52
  121. package/dist/validation/validate-kits.js.map +1 -1
  122. package/dist/validation/validate-mcp.d.ts.map +1 -1
  123. package/dist/validation/validate-mcp.js +10 -19
  124. package/dist/validation/validate-mcp.js.map +1 -1
  125. package/dist/validation/validate-skills.d.ts +3 -1
  126. package/dist/validation/validate-skills.d.ts.map +1 -1
  127. package/dist/validation/validate-skills.js +42 -71
  128. package/dist/validation/validate-skills.js.map +1 -1
  129. package/dist/validation/validate-subagents.d.ts +3 -1
  130. package/dist/validation/validate-subagents.d.ts.map +1 -1
  131. package/dist/validation/validate-subagents.js +15 -118
  132. package/dist/validation/validate-subagents.js.map +1 -1
  133. package/package.json +1 -1
  134. package/schemas/{command.schema.json → command.schema.v1.0.0.json} +15 -2
  135. package/schemas/examples/hook-program-valid.json +14 -4
  136. package/schemas/examples/http-server-valid.json +2 -1
  137. package/schemas/examples/invalid-sensitive-header-no-envvar.json +2 -1
  138. package/schemas/examples/invalid-sensitive-header-with-value.json +2 -1
  139. package/schemas/examples/invalid-sensitive-var-with-default.json +6 -2
  140. package/schemas/examples/stdio-server-valid.json +6 -2
  141. package/schemas/hook-binding.schema.v1.0.0.json +107 -0
  142. package/schemas/hook-program.schema.v1.0.0.json +255 -0
  143. package/schemas/{kit.schema.json → kit.schema.v1.0.0.json} +108 -19
  144. package/schemas/kits-lock.schema.v1.0.0.json +478 -0
  145. package/schemas/{kits-manifest.schema.json → kits-manifest.schema.v1.0.0.json} +38 -9
  146. package/schemas/{kits-registry.schema.json → kits-registry.schema.v1.0.0.json} +16 -5
  147. package/schemas/{mcp-server.schema.json → mcp-server.schema.v1.0.0.json} +73 -20
  148. package/schemas/{primitives-registry.schema.json → primitives-registry.schema.v1.0.0.json} +19 -5
  149. package/schemas/{skill.schema.json → skill.schema.v1.0.0.json} +28 -5
  150. package/schemas/{subagent.schema.json → subagent.schema.v1.0.0.json} +28 -5
  151. package/schemas/hook-binding.schema.json +0 -63
  152. package/schemas/hook-program.schema.json +0 -136
  153. package/schemas/kits-lock.schema.json +0 -282
@@ -1,15 +1,27 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://hashicorp.com/schemas/mcp-server.schema.json",
3
+ "$id": "https://hashicorp.com/schemas/mcp-server.schema.v1.0.0.json",
4
4
  "title": "MCP Server Configuration",
5
5
  "description": "Schema for MCP server configuration files with sensitivity classification for environment variables and headers",
6
6
  "type": "object",
7
- "required": ["name", "version", "description", "transport"],
7
+ "required": [
8
+ "$schema",
9
+ "schemaVersion",
10
+ "name",
11
+ "version",
12
+ "description",
13
+ "transport"
14
+ ],
8
15
  "properties": {
9
16
  "$schema": {
10
17
  "type": "string",
11
18
  "description": "JSON Schema reference"
12
19
  },
20
+ "schemaVersion": {
21
+ "type": "string",
22
+ "const": "1.0.0",
23
+ "description": "Version of this schema (semver)"
24
+ },
13
25
  "name": {
14
26
  "type": "string",
15
27
  "minLength": 1,
@@ -29,8 +41,12 @@
29
41
  },
30
42
  "transport": {
31
43
  "oneOf": [
32
- { "$ref": "#/$defs/stdioTransport" },
33
- { "$ref": "#/$defs/httpTransport" }
44
+ {
45
+ "$ref": "#/$defs/stdioTransport"
46
+ },
47
+ {
48
+ "$ref": "#/$defs/httpTransport"
49
+ }
34
50
  ],
35
51
  "description": "Transport configuration (STDIO or HTTP)"
36
52
  },
@@ -75,7 +91,10 @@
75
91
  "$defs": {
76
92
  "stdioTransport": {
77
93
  "type": "object",
78
- "required": ["type", "command"],
94
+ "required": [
95
+ "type",
96
+ "command"
97
+ ],
79
98
  "properties": {
80
99
  "type": {
81
100
  "const": "stdio",
@@ -88,7 +107,9 @@
88
107
  },
89
108
  "args": {
90
109
  "type": "array",
91
- "items": { "type": "string" },
110
+ "items": {
111
+ "type": "string"
112
+ },
92
113
  "description": "Command arguments"
93
114
  },
94
115
  "cwd": {
@@ -101,7 +122,10 @@
101
122
  },
102
123
  "httpTransport": {
103
124
  "type": "object",
104
- "required": ["type", "url"],
125
+ "required": [
126
+ "type",
127
+ "url"
128
+ ],
105
129
  "properties": {
106
130
  "type": {
107
131
  "const": "http",
@@ -125,7 +149,11 @@
125
149
  },
126
150
  "envVarDefinition": {
127
151
  "type": "object",
128
- "required": ["description", "required", "sensitive"],
152
+ "required": [
153
+ "description",
154
+ "required",
155
+ "sensitive"
156
+ ],
129
157
  "properties": {
130
158
  "description": {
131
159
  "type": "string",
@@ -148,20 +176,29 @@
148
176
  "additionalProperties": false,
149
177
  "if": {
150
178
  "properties": {
151
- "sensitive": { "const": true }
179
+ "sensitive": {
180
+ "const": true
181
+ }
152
182
  },
153
- "required": ["sensitive"]
183
+ "required": [
184
+ "sensitive"
185
+ ]
154
186
  },
155
187
  "then": {
156
188
  "not": {
157
- "required": ["default"]
189
+ "required": [
190
+ "default"
191
+ ]
158
192
  }
159
193
  },
160
194
  "description": "Environment variable definition with sensitivity classification"
161
195
  },
162
196
  "headerDefinition": {
163
197
  "type": "object",
164
- "required": ["description", "sensitive"],
198
+ "required": [
199
+ "description",
200
+ "sensitive"
201
+ ],
165
202
  "properties": {
166
203
  "description": {
167
204
  "type": "string",
@@ -192,14 +229,22 @@
192
229
  {
193
230
  "if": {
194
231
  "properties": {
195
- "sensitive": { "const": true }
232
+ "sensitive": {
233
+ "const": true
234
+ }
196
235
  },
197
- "required": ["sensitive"]
236
+ "required": [
237
+ "sensitive"
238
+ ]
198
239
  },
199
240
  "then": {
200
- "required": ["envVar"],
241
+ "required": [
242
+ "envVar"
243
+ ],
201
244
  "not": {
202
- "required": ["value"]
245
+ "required": [
246
+ "value"
247
+ ]
203
248
  }
204
249
  }
205
250
  }
@@ -208,7 +253,9 @@
208
253
  },
209
254
  "toolDefinition": {
210
255
  "type": "object",
211
- "required": ["description"],
256
+ "required": [
257
+ "description"
258
+ ],
212
259
  "properties": {
213
260
  "description": {
214
261
  "type": "string",
@@ -221,7 +268,9 @@
221
268
  },
222
269
  "resourceDefinition": {
223
270
  "type": "object",
224
- "required": ["description"],
271
+ "required": [
272
+ "description"
273
+ ],
225
274
  "properties": {
226
275
  "description": {
227
276
  "type": "string",
@@ -238,7 +287,9 @@
238
287
  },
239
288
  "promptDefinition": {
240
289
  "type": "object",
241
- "required": ["description"],
290
+ "required": [
291
+ "description"
292
+ ],
242
293
  "properties": {
243
294
  "description": {
244
295
  "type": "string",
@@ -294,7 +345,9 @@
294
345
  },
295
346
  "keywords": {
296
347
  "type": "array",
297
- "items": { "type": "string" },
348
+ "items": {
349
+ "type": "string"
350
+ },
298
351
  "description": "Keywords for discovery"
299
352
  }
300
353
  },
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft-07/schema#",
3
- "$id": "https://hashicorp.com/schemas/primitives-registry.schema.json",
3
+ "$id": "https://hashicorp.com/schemas/primitives-registry.schema.v1.0.0.json",
4
4
  "title": "Primitives Registry",
5
5
  "description": "Schema for primitives-registry.json - the shared primitives registry at the repository root",
6
6
  "type": "object",
7
- "required": ["schemaVersion", "primitives"],
7
+ "required": [
8
+ "$schema",
9
+ "schemaVersion",
10
+ "primitives"
11
+ ],
8
12
  "properties": {
9
13
  "$schema": {
10
14
  "type": "string",
@@ -12,7 +16,7 @@
12
16
  },
13
17
  "schemaVersion": {
14
18
  "type": "string",
15
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
19
+ "const": "1.0.0",
16
20
  "description": "Version of this schema (semver)"
17
21
  },
18
22
  "primitives": {
@@ -61,7 +65,12 @@
61
65
  "definitions": {
62
66
  "primitiveEntry": {
63
67
  "type": "object",
64
- "required": ["description", "path", "versions", "latest"],
68
+ "required": [
69
+ "description",
70
+ "path",
71
+ "versions",
72
+ "latest"
73
+ ],
65
74
  "properties": {
66
75
  "description": {
67
76
  "type": "string",
@@ -90,7 +99,12 @@
90
99
  },
91
100
  "versionEntry": {
92
101
  "type": "object",
93
- "required": ["version", "released", "changelog", "path"],
102
+ "required": [
103
+ "version",
104
+ "released",
105
+ "changelog",
106
+ "path"
107
+ ],
94
108
  "properties": {
95
109
  "version": {
96
110
  "type": "string",
@@ -1,11 +1,25 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft-07/schema#",
3
- "$id": "https://hashicorp.com/schemas/skill.schema.json",
3
+ "$id": "https://hashicorp.com/schemas/skill.schema.v1.0.0.json",
4
4
  "title": "Skill Frontmatter",
5
5
  "description": "Schema for skill primitive SKILL.md YAML frontmatter",
6
6
  "type": "object",
7
- "required": ["name", "description"],
7
+ "required": [
8
+ "$schema",
9
+ "schemaVersion",
10
+ "name",
11
+ "description"
12
+ ],
8
13
  "properties": {
14
+ "$schema": {
15
+ "type": "string",
16
+ "description": "JSON Schema reference"
17
+ },
18
+ "schemaVersion": {
19
+ "type": "string",
20
+ "const": "1.0.0",
21
+ "description": "Version of this schema (semver)"
22
+ },
9
23
  "name": {
10
24
  "type": "string",
11
25
  "minLength": 3,
@@ -67,7 +81,10 @@
67
81
  "description": "Canonical hook bindings scoped to the skill lifecycle",
68
82
  "items": {
69
83
  "type": "object",
70
- "required": ["ref", "binding"],
84
+ "required": [
85
+ "ref",
86
+ "binding"
87
+ ],
71
88
  "properties": {
72
89
  "ref": {
73
90
  "type": "string",
@@ -77,11 +94,17 @@
77
94
  "binding": {
78
95
  "type": "object",
79
96
  "description": "Hook binding definition",
80
- "required": ["event"],
97
+ "required": [
98
+ "event"
99
+ ],
81
100
  "properties": {
82
101
  "event": {
83
102
  "type": "string",
84
- "enum": ["tool.before", "tool.after", "subagent.stop"],
103
+ "enum": [
104
+ "tool.before",
105
+ "tool.after",
106
+ "subagent.stop"
107
+ ],
85
108
  "description": "Canonical skill hook event"
86
109
  }
87
110
  },
@@ -1,11 +1,25 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft-07/schema#",
3
- "$id": "https://hashicorp.com/schemas/subagent.schema.json",
3
+ "$id": "https://hashicorp.com/schemas/subagent.schema.v1.0.0.json",
4
4
  "title": "Subagent Frontmatter",
5
5
  "description": "Schema for subagent primitive Markdown frontmatter",
6
6
  "type": "object",
7
- "required": ["name", "description"],
7
+ "required": [
8
+ "$schema",
9
+ "schemaVersion",
10
+ "name",
11
+ "description"
12
+ ],
8
13
  "properties": {
14
+ "$schema": {
15
+ "type": "string",
16
+ "description": "JSON Schema reference"
17
+ },
18
+ "schemaVersion": {
19
+ "type": "string",
20
+ "const": "1.0.0",
21
+ "description": "Version of this schema (semver)"
22
+ },
9
23
  "name": {
10
24
  "type": "string",
11
25
  "minLength": 3,
@@ -78,7 +92,10 @@
78
92
  "description": "Canonical hook bindings scoped to the subagent lifecycle",
79
93
  "items": {
80
94
  "type": "object",
81
- "required": ["ref", "binding"],
95
+ "required": [
96
+ "ref",
97
+ "binding"
98
+ ],
82
99
  "properties": {
83
100
  "ref": {
84
101
  "type": "string",
@@ -88,11 +105,17 @@
88
105
  "binding": {
89
106
  "type": "object",
90
107
  "description": "Hook binding definition",
91
- "required": ["event"],
108
+ "required": [
109
+ "event"
110
+ ],
92
111
  "properties": {
93
112
  "event": {
94
113
  "type": "string",
95
- "enum": ["tool.before", "tool.after", "subagent.stop"],
114
+ "enum": [
115
+ "tool.before",
116
+ "tool.after",
117
+ "subagent.stop"
118
+ ],
96
119
  "description": "Canonical subagent hook event"
97
120
  }
98
121
  },
@@ -1,63 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft-07/schema#",
3
- "$id": "https://hashicorp.com/schemas/hook-binding.schema.json",
4
- "title": "Hook Binding",
5
- "description": "Schema for canonical hook binding objects used in kit.json and subagent frontmatter",
6
- "type": "object",
7
- "required": ["event"],
8
- "properties": {
9
- "event": {
10
- "type": "string",
11
- "enum": [
12
- "session.start",
13
- "session.end",
14
- "prompt.submit",
15
- "tool.before",
16
- "tool.after",
17
- "permission.request",
18
- "notification",
19
- "compaction.before",
20
- "subagent.start",
21
- "subagent.stop",
22
- "error"
23
- ],
24
- "description": "Canonical hook event"
25
- },
26
- "matcher": {
27
- "type": "object",
28
- "properties": {
29
- "tools": {
30
- "type": "array",
31
- "items": { "type": "string" },
32
- "minItems": 1
33
- }
34
- },
35
- "additionalProperties": false
36
- },
37
- "policy": {
38
- "type": "object",
39
- "properties": {
40
- "on_success": { "type": "string", "enum": ["continue", "warn", "block"] },
41
- "on_failure": { "type": "string", "enum": ["continue", "warn", "block"] },
42
- "on_timeout": { "type": "string", "enum": ["continue", "warn", "block"] }
43
- },
44
- "additionalProperties": false
45
- },
46
- "args": {
47
- "type": "object",
48
- "additionalProperties": {
49
- "anyOf": [
50
- { "type": "string", "minLength": 1 },
51
- { "type": "number" },
52
- { "type": "boolean" },
53
- { "type": "array", "items": { "type": ["string", "number", "boolean"] } }
54
- ]
55
- }
56
- },
57
- "env": {
58
- "type": "object",
59
- "additionalProperties": { "type": "string", "minLength": 1 }
60
- }
61
- },
62
- "additionalProperties": false
63
- }
@@ -1,136 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft-07/schema#",
3
- "$id": "https://hashicorp.com/schemas/hook-program.schema.json",
4
- "title": "Hook Program Config",
5
- "description": "Schema for hook program config.json files",
6
- "type": "object",
7
- "required": ["name", "version", "description", "runtime", "io"],
8
- "properties": {
9
- "name": {
10
- "type": "string",
11
- "minLength": 3,
12
- "maxLength": 50,
13
- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
14
- "description": "Hook program name in lowercase kebab-case"
15
- },
16
- "version": {
17
- "type": "string",
18
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
19
- "description": "Semver version string"
20
- },
21
- "description": {
22
- "type": "string",
23
- "minLength": 10,
24
- "maxLength": 200,
25
- "description": "Description of the hook program"
26
- },
27
- "runtime": {
28
- "type": "object",
29
- "required": ["type", "entrypoint"],
30
- "properties": {
31
- "type": {
32
- "type": "string",
33
- "enum": ["command", "prompt", "opencode-plugin"],
34
- "description": "Hook runtime type"
35
- },
36
- "entrypoint": {
37
- "type": "string",
38
- "minLength": 1,
39
- "description": "Entrypoint file for the hook program"
40
- },
41
- "shell": {
42
- "type": "string",
43
- "description": "Shell to use for command runtime"
44
- },
45
- "working_directory": {
46
- "type": "string",
47
- "description": "Working directory for hook execution"
48
- },
49
- "args": {
50
- "type": "array",
51
- "items": { "type": "string" },
52
- "description": "Arguments passed to the runtime executable"
53
- },
54
- "timeout_ms": {
55
- "type": "number",
56
- "description": "Execution timeout in milliseconds"
57
- }
58
- },
59
- "additionalProperties": false,
60
- "allOf": [
61
- {
62
- "if": { "required": ["args"] },
63
- "then": { "required": ["shell"] }
64
- }
65
- ]
66
- },
67
- "io": {
68
- "type": "object",
69
- "required": ["stdin", "stdout"],
70
- "properties": {
71
- "stdin": {
72
- "type": "string",
73
- "enum": ["json", "none"],
74
- "description": "Expected stdin format"
75
- },
76
- "stdout": {
77
- "type": "string",
78
- "enum": ["json", "none"],
79
- "description": "Expected stdout format"
80
- },
81
- "error_codes": {
82
- "type": "object",
83
- "properties": {
84
- "success": { "type": "array", "items": { "type": "number" } },
85
- "warn": { "type": "array", "items": { "type": "number" } },
86
- "block": { "type": "array", "items": { "type": "number" } }
87
- },
88
- "additionalProperties": false
89
- }
90
- },
91
- "additionalProperties": false
92
- },
93
- "env": {
94
- "type": "object",
95
- "additionalProperties": { "type": "string", "minLength": 1 },
96
- "description": "Default environment variables for the hook program"
97
- },
98
- "args": {
99
- "type": "array",
100
- "items": {
101
- "type": "object",
102
- "additionalProperties": false,
103
- "required": ["name", "kind", "type", "default"],
104
- "properties": {
105
- "name": { "type": "string", "minLength": 1 },
106
- "kind": { "type": "string", "enum": ["positional", "flag"] },
107
- "flag": { "type": "string", "minLength": 2 },
108
- "type": { "type": "string", "enum": ["string", "number", "boolean", "array"] },
109
- "default": {
110
- "anyOf": [
111
- { "type": "string" },
112
- { "type": "number" },
113
- { "type": "boolean" },
114
- { "type": "array", "items": { "type": ["string", "number", "boolean"] } }
115
- ]
116
- },
117
- "description": { "type": "string" },
118
- "valueStyle": { "type": "string", "enum": ["space", "equals"] }
119
- },
120
- "allOf": [
121
- {
122
- "if": { "properties": { "kind": { "const": "flag" } } },
123
- "then": { "required": ["flag"] }
124
- }
125
- ]
126
- },
127
- "description": "Optional ordered argument schema for hook programs"
128
- },
129
- "metadata": {
130
- "type": "object",
131
- "additionalProperties": true,
132
- "description": "Arbitrary metadata for the hook program"
133
- }
134
- },
135
- "additionalProperties": false
136
- }