@monosmith/plugin-sdk 0.0.0-stage → 0.2.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.
Files changed (164) hide show
  1. package/README.md +90 -2
  2. package/build-dir/build-dir.algorithm.d.ts +16 -0
  3. package/build-dir/build-dir.algorithm.js +26 -0
  4. package/build-dir/index.d.ts +1 -0
  5. package/build-dir/index.js +1 -0
  6. package/ci/ci-contribution.algorithm.d.ts +28 -0
  7. package/ci/ci-contribution.algorithm.js +19 -0
  8. package/ci/index.d.ts +2 -0
  9. package/ci/index.js +1 -0
  10. package/codec/encode-by-schema.algorithm.d.ts +12 -0
  11. package/codec/encode-by-schema.algorithm.js +105 -0
  12. package/codec/encode-error.error.d.ts +4 -0
  13. package/codec/encode-error.error.js +7 -0
  14. package/codec/encode-json-value.algorithm.d.ts +13 -0
  15. package/codec/encode-json-value.algorithm.js +51 -0
  16. package/codec/index.d.ts +6 -0
  17. package/codec/index.js +5 -0
  18. package/codec/message-parse.error.d.ts +4 -0
  19. package/codec/message-parse.error.js +7 -0
  20. package/codec/method-codec.algorithm.d.ts +8 -0
  21. package/codec/method-codec.algorithm.js +31 -0
  22. package/codec/normalize-by-schema.algorithm.d.ts +14 -0
  23. package/codec/normalize-by-schema.algorithm.js +103 -0
  24. package/codec/params-error.error.d.ts +4 -0
  25. package/codec/params-error.error.js +7 -0
  26. package/codec/schema-lookup.algorithm.d.ts +13 -0
  27. package/codec/schema-lookup.algorithm.js +56 -0
  28. package/codec/wire-message.mapper.d.ts +27 -0
  29. package/codec/wire-message.mapper.js +62 -0
  30. package/concurrency/concurrency.policy.d.ts +21 -0
  31. package/concurrency/concurrency.policy.js +30 -0
  32. package/concurrency/index.d.ts +1 -0
  33. package/concurrency/index.js +1 -0
  34. package/conformance/check-generation.use-case.d.ts +12 -0
  35. package/conformance/check-generation.use-case.js +91 -0
  36. package/conformance/check-plugin.use-case.d.ts +25 -0
  37. package/conformance/check-plugin.use-case.js +81 -0
  38. package/conformance/check-scheduling.use-case.d.ts +11 -0
  39. package/conformance/check-scheduling.use-case.js +98 -0
  40. package/conformance/conformance-report.model.d.ts +22 -0
  41. package/conformance/conformance-report.model.js +23 -0
  42. package/conformance/find-manifests.algorithm.d.ts +7 -0
  43. package/conformance/find-manifests.algorithm.js +34 -0
  44. package/conformance/go-list.mapper.d.ts +4 -0
  45. package/conformance/go-list.mapper.js +8 -0
  46. package/conformance/index.d.ts +5 -0
  47. package/conformance/index.js +3 -0
  48. package/framing/frame-message.algorithm.d.ts +5 -0
  49. package/framing/frame-message.algorithm.js +8 -0
  50. package/framing/frame-reader.store.d.ts +15 -0
  51. package/framing/frame-reader.store.js +59 -0
  52. package/framing/framing.error.d.ts +4 -0
  53. package/framing/framing.error.js +7 -0
  54. package/framing/index.d.ts +3 -0
  55. package/framing/index.js +3 -0
  56. package/host/call-interrupted.error.d.ts +16 -0
  57. package/host/call-interrupted.error.js +20 -0
  58. package/host/connect-plugin.use-case.d.ts +26 -0
  59. package/host/connect-plugin.use-case.js +44 -0
  60. package/host/host-options.contract.d.ts +34 -0
  61. package/host/host-options.contract.js +4 -0
  62. package/host/index.d.ts +9 -0
  63. package/host/index.js +5 -0
  64. package/host/plugin-client.client.d.ts +61 -0
  65. package/host/plugin-client.client.js +297 -0
  66. package/host/start-plugin.use-case.d.ts +10 -0
  67. package/host/start-plugin.use-case.js +57 -0
  68. package/index.d.ts +16 -0
  69. package/index.js +21 -0
  70. package/jsondoc/indent-raw-json.algorithm.d.ts +8 -0
  71. package/jsondoc/indent-raw-json.algorithm.js +60 -0
  72. package/jsondoc/index.d.ts +2 -0
  73. package/jsondoc/index.js +2 -0
  74. package/jsondoc/json-document.error.d.ts +4 -0
  75. package/jsondoc/json-document.error.js +7 -0
  76. package/jsondoc/json-document.model.d.ts +38 -0
  77. package/jsondoc/json-document.model.js +113 -0
  78. package/jsondoc/scan-json-object.algorithm.d.ts +17 -0
  79. package/jsondoc/scan-json-object.algorithm.js +132 -0
  80. package/package.json +34 -4
  81. package/plugin-refs/index.d.ts +1 -0
  82. package/plugin-refs/index.js +1 -0
  83. package/plugin-refs/plugin-ref.policy.d.ts +9 -0
  84. package/plugin-refs/plugin-ref.policy.js +22 -0
  85. package/plugin-roles/index.d.ts +1 -0
  86. package/plugin-roles/index.js +1 -0
  87. package/plugin-roles/plugin-role.policy.d.ts +16 -0
  88. package/plugin-roles/plugin-role.policy.js +30 -0
  89. package/projects/audit-settings.policy.d.ts +5 -0
  90. package/projects/audit-settings.policy.js +8 -0
  91. package/projects/index.d.ts +6 -0
  92. package/projects/index.js +6 -0
  93. package/projects/manifest-match.algorithm.d.ts +7 -0
  94. package/projects/manifest-match.algorithm.js +38 -0
  95. package/projects/project-kind.policy.d.ts +9 -0
  96. package/projects/project-kind.policy.js +28 -0
  97. package/projects/publishes.policy.d.ts +7 -0
  98. package/projects/publishes.policy.js +8 -0
  99. package/projects/set-toolchain.algorithm.d.ts +7 -0
  100. package/projects/set-toolchain.algorithm.js +13 -0
  101. package/projects/stack-plugins.algorithm.d.ts +3 -0
  102. package/projects/stack-plugins.algorithm.js +4 -0
  103. package/protocol/index.d.ts +4 -0
  104. package/protocol/index.js +3 -0
  105. package/protocol/protocol-schema.contract.d.ts +3 -0
  106. package/protocol/protocol-schema.contract.js +1976 -0
  107. package/protocol/protocol-types.contract.d.ts +1057 -0
  108. package/protocol/protocol-types.contract.js +43 -0
  109. package/protocol/rpc-error.error.d.ts +9 -0
  110. package/protocol/rpc-error.error.js +13 -0
  111. package/protocol/schema-document.contract.d.ts +58 -0
  112. package/protocol/schema-document.contract.js +1 -0
  113. package/scaffold/index.d.ts +3 -0
  114. package/scaffold/index.js +2 -0
  115. package/scaffold/scaffold-data.mapper.d.ts +15 -0
  116. package/scaffold/scaffold-data.mapper.js +24 -0
  117. package/scaffold/scaffold-project.use-case.d.ts +20 -0
  118. package/scaffold/scaffold-project.use-case.js +13 -0
  119. package/serve/capabilities-of.algorithm.d.ts +14 -0
  120. package/serve/capabilities-of.algorithm.js +31 -0
  121. package/serve/claim-stdout.use-case.d.ts +10 -0
  122. package/serve/claim-stdout.use-case.js +14 -0
  123. package/serve/dispatch-request.use-case.d.ts +15 -0
  124. package/serve/dispatch-request.use-case.js +57 -0
  125. package/serve/index.d.ts +4 -0
  126. package/serve/index.js +2 -0
  127. package/serve/initialize-plugin.use-case.d.ts +9 -0
  128. package/serve/initialize-plugin.use-case.js +16 -0
  129. package/serve/plugin-members.config.d.ts +16 -0
  130. package/serve/plugin-members.config.js +25 -0
  131. package/serve/plugin.contract.d.ts +80 -0
  132. package/serve/plugin.contract.js +1 -0
  133. package/serve/protocol-streams.contract.d.ts +13 -0
  134. package/serve/protocol-streams.contract.js +1 -0
  135. package/serve/request-outcome.contract.d.ts +9 -0
  136. package/serve/request-outcome.contract.js +1 -0
  137. package/serve/request-pool.store.d.ts +49 -0
  138. package/serve/request-pool.store.js +110 -0
  139. package/serve/serve.use-case.d.ts +31 -0
  140. package/serve/serve.use-case.js +180 -0
  141. package/tasks/contribute-tasks.algorithm.d.ts +15 -0
  142. package/tasks/contribute-tasks.algorithm.js +22 -0
  143. package/tasks/index.d.ts +2 -0
  144. package/tasks/index.js +2 -0
  145. package/tasks/task.algorithm.d.ts +18 -0
  146. package/tasks/task.algorithm.js +23 -0
  147. package/templating/file-exists.error.d.ts +6 -0
  148. package/templating/file-exists.error.js +10 -0
  149. package/templating/index.d.ts +4 -0
  150. package/templating/index.js +4 -0
  151. package/templating/parse-template.algorithm.d.ts +11 -0
  152. package/templating/parse-template.algorithm.js +197 -0
  153. package/templating/render-template.algorithm.d.ts +7 -0
  154. package/templating/render-template.algorithm.js +87 -0
  155. package/templating/template-functions.algorithm.d.ts +10 -0
  156. package/templating/template-functions.algorithm.js +104 -0
  157. package/templating/template-syntax.contract.d.ts +33 -0
  158. package/templating/template-syntax.contract.js +1 -0
  159. package/templating/template.error.d.ts +4 -0
  160. package/templating/template.error.js +7 -0
  161. package/templating/tokenize-action.algorithm.d.ts +20 -0
  162. package/templating/tokenize-action.algorithm.js +57 -0
  163. package/templating/write-templates.use-case.d.ts +11 -0
  164. package/templating/write-templates.use-case.js +44 -0
@@ -0,0 +1,1976 @@
1
+ /** The JSON Schema of the plugin protocol, as committed in packages/plugin-sdk/schema. */
2
+ export const protocolSchema = {
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "$id": "https://raw.githubusercontent.com/monosmith-app/monosmith/main/packages/plugin-sdk/schema/protocol.schema.json",
5
+ "title": "smith plugin protocol",
6
+ "description": "The messages of the smith plugin protocol: JSON-RPC 2.0 between the smith host and a plugin, a separate process. This file is generated from the Go types of packages/plugin-sdk/protocol, which are the source of truth; do not edit it. Regenerate it with `go run ./schemagen` in packages/plugin-sdk.\n\nx-methods maps each method name to the definitions of its params and result and to the capability a plugin advertises to be asked it (null: always available). x-errorCodes, x-roles and x-transport complete the contract. A definition's required members are the ones the Go SDK writes without omitempty.\n\nFraming: each message is the header Content-Length: <bytes of the body>, a blank line (CRLF CRLF) and the body, UTF-8 JSON, as the Language Server Protocol frames. The length counts bytes, not characters. The host sends initialize first, and a request with an id gets exactly one response with the same id. A request without an id is a notification and gets none. The host has at most as many requests in flight to a plugin as its initialize result declares in concurrency (absent: 1, the next request is sent after the previous is answered); responses may come in any order, matched by id. A plugin that advertised the cancel capability is sent the cancel notification for a request the host gives up on, and answers that request with its result or the request-cancelled error; a plugin without it is never sent cancel. Stdout carries only frames: a plugin logs to stderr. The host sets SMITH_PLUGIN=1 in the plugin's environment.\n\nReading: a receiver ignores members it does not know (the protocol grows by adding members), and treats a null array or object as an empty one, because the Go SDK writes a nil slice or map as null when the member is required. A member that is absent and a member with its zero value are the same for every optional member.\n\nPaths in messages are relative to the workspace and use forward slashes; only workspaceRoot is absolute and uses the host's separators.",
7
+ "x-protocolVersion": 1,
8
+ "x-transport": {
9
+ "framing": "content-length",
10
+ "encoding": "utf-8",
11
+ "jsonrpc": "2.0",
12
+ "maxMessageBytes": 67108864
13
+ },
14
+ "x-methods": {
15
+ "initialize": {
16
+ "description": "The first request, sent once by the host. The plugin picks a protocol version from the host's list and answers who it is and what it can do.",
17
+ "params": {
18
+ "$ref": "#/$defs/InitializeParams"
19
+ },
20
+ "result": {
21
+ "$ref": "#/$defs/InitializeResult"
22
+ },
23
+ "capability": null,
24
+ "notification": false
25
+ },
26
+ "shutdown": {
27
+ "description": "The last request. The plugin answers an empty object and exits.",
28
+ "params": {
29
+ "$ref": "#/$defs/Empty"
30
+ },
31
+ "result": {
32
+ "$ref": "#/$defs/Empty"
33
+ },
34
+ "capability": null,
35
+ "notification": false
36
+ },
37
+ "cancel": {
38
+ "description": "A notification, so it gets no response: the host asks the plugin to stop the in-flight request with the given id. The plugin then answers that request, with its result if the work was already done or with the request-cancelled error. An id that is unknown or already answered is ignored. The host sends it only to a plugin that advertised the capability.",
39
+ "params": {
40
+ "$ref": "#/$defs/CancelParams"
41
+ },
42
+ "result": null,
43
+ "capability": "cancel",
44
+ "notification": true
45
+ },
46
+ "discover": {
47
+ "description": "Describes the projects behind manifests the host found; a language plugin's way into the workspace.",
48
+ "params": {
49
+ "$ref": "#/$defs/DiscoverParams"
50
+ },
51
+ "result": {
52
+ "$ref": "#/$defs/DiscoverResult"
53
+ },
54
+ "capability": "discover",
55
+ "notification": false
56
+ },
57
+ "generate": {
58
+ "description": "Writes the starter files of a new project.",
59
+ "params": {
60
+ "$ref": "#/$defs/GenerateParams"
61
+ },
62
+ "result": {
63
+ "$ref": "#/$defs/GenerateResult"
64
+ },
65
+ "capability": "generate",
66
+ "notification": false
67
+ },
68
+ "version/write": {
69
+ "description": "Records a release version in a project's manifest.",
70
+ "params": {
71
+ "$ref": "#/$defs/VersionParams"
72
+ },
73
+ "result": {
74
+ "$ref": "#/$defs/VersionResult"
75
+ },
76
+ "capability": "version",
77
+ "notification": false
78
+ },
79
+ "publish": {
80
+ "description": "Publishes one project at one version, or builds the files attached to a release.",
81
+ "params": {
82
+ "$ref": "#/$defs/PublishParams"
83
+ },
84
+ "result": {
85
+ "$ref": "#/$defs/PublishResult"
86
+ },
87
+ "capability": "publish",
88
+ "notification": false
89
+ },
90
+ "ci": {
91
+ "description": "Describes what a generated pipeline needs for the plugin's projects.",
92
+ "params": {
93
+ "$ref": "#/$defs/CIParams"
94
+ },
95
+ "result": {
96
+ "$ref": "#/$defs/CIResult"
97
+ },
98
+ "capability": "ci",
99
+ "notification": false
100
+ },
101
+ "doctor": {
102
+ "description": "Checks the plugin's projects and reports findings, each with its remedy and, optionally, a fix.",
103
+ "params": {
104
+ "$ref": "#/$defs/DoctorParams"
105
+ },
106
+ "result": {
107
+ "$ref": "#/$defs/DoctorResult"
108
+ },
109
+ "capability": "doctor",
110
+ "notification": false
111
+ },
112
+ "contribute": {
113
+ "description": "Asks a convention (toolchain, structure, deploy) for the tasks and dependencies it adds to projects other plugins discovered.",
114
+ "params": {
115
+ "$ref": "#/$defs/ContributeParams"
116
+ },
117
+ "result": {
118
+ "$ref": "#/$defs/ContributeResult"
119
+ },
120
+ "capability": "contribute",
121
+ "notification": false
122
+ },
123
+ "remove": {
124
+ "description": "Lets a plugin clean up what it owns outside a project's directory after the project is removed.",
125
+ "params": {
126
+ "$ref": "#/$defs/RemoveParams"
127
+ },
128
+ "result": {
129
+ "$ref": "#/$defs/RemoveResult"
130
+ },
131
+ "capability": "remove",
132
+ "notification": false
133
+ },
134
+ "published": {
135
+ "description": "Asks which version of a project its registry has, so a release can check its tags against it.",
136
+ "params": {
137
+ "$ref": "#/$defs/PublishedParams"
138
+ },
139
+ "result": {
140
+ "$ref": "#/$defs/PublishedResult"
141
+ },
142
+ "capability": "published",
143
+ "notification": false
144
+ },
145
+ "dependencies/install": {
146
+ "description": "Adds packages to a project with the ecosystem's own toolchain, or, with no project, installs every dependency of the projects the plugin serves.",
147
+ "params": {
148
+ "$ref": "#/$defs/InstallParams"
149
+ },
150
+ "result": {
151
+ "$ref": "#/$defs/DependencyResult"
152
+ },
153
+ "capability": "dependencies",
154
+ "notification": false
155
+ },
156
+ "dependencies/uninstall": {
157
+ "description": "Removes packages from a project.",
158
+ "params": {
159
+ "$ref": "#/$defs/UninstallParams"
160
+ },
161
+ "result": {
162
+ "$ref": "#/$defs/DependencyResult"
163
+ },
164
+ "capability": "dependencies",
165
+ "notification": false
166
+ },
167
+ "dependencies/declared": {
168
+ "description": "Lists the dependencies the manifests of the plugin's projects declare.",
169
+ "params": {
170
+ "$ref": "#/$defs/DeclaredParams"
171
+ },
172
+ "result": {
173
+ "$ref": "#/$defs/DeclaredResult"
174
+ },
175
+ "capability": "declarations",
176
+ "notification": false
177
+ },
178
+ "dependencies/rewrite": {
179
+ "description": "Changes declared dependency specs in place.",
180
+ "params": {
181
+ "$ref": "#/$defs/RewriteParams"
182
+ },
183
+ "result": {
184
+ "$ref": "#/$defs/DependencyResult"
185
+ },
186
+ "capability": "declarations",
187
+ "notification": false
188
+ },
189
+ "dependencies/latest": {
190
+ "description": "Asks registries for the newest releases of dependencies, and how the tools the plugin pins compare with theirs.",
191
+ "params": {
192
+ "$ref": "#/$defs/LatestParams"
193
+ },
194
+ "result": {
195
+ "$ref": "#/$defs/LatestResult"
196
+ },
197
+ "capability": "latest",
198
+ "notification": false
199
+ }
200
+ },
201
+ "x-errorCodes": [
202
+ {
203
+ "name": "ParseError",
204
+ "code": -32700,
205
+ "description": "The message was not valid JSON. The response has a null id."
206
+ },
207
+ {
208
+ "name": "InvalidRequest",
209
+ "code": -32600,
210
+ "description": "The request is not valid, or arrived out of order: every request before initialize is refused with this code."
211
+ },
212
+ {
213
+ "name": "MethodNotFound",
214
+ "code": -32601,
215
+ "description": "The plugin does not implement the method, or did not advertise the capability. The message is \"method not supported: <method>\"."
216
+ },
217
+ {
218
+ "name": "InvalidParams",
219
+ "code": -32602,
220
+ "description": "The params do not have the shape the method expects."
221
+ },
222
+ {
223
+ "name": "InternalError",
224
+ "code": -32603,
225
+ "description": "The plugin failed in a way that is not the user's to act on, for example a result that could not be encoded."
226
+ },
227
+ {
228
+ "name": "PluginFailure",
229
+ "code": -32000,
230
+ "description": "The method ran and failed for a reason the user must act on (a missing toolchain, a bad manifest). The message is shown to the user as it is, so it should say what to do. An error a method of the Go SDK returns becomes this code."
231
+ },
232
+ {
233
+ "name": "RequestCancelled",
234
+ "code": -32800,
235
+ "description": "The plugin stopped the request because the host sent a cancel notification for its id. A plugin that had finished answers with the result instead. Only a plugin that advertised the cancel capability sends it; when a cancelled request fails with any error, the SDKs answer with this code."
236
+ }
237
+ ],
238
+ "x-roles": [
239
+ {
240
+ "name": "language",
241
+ "description": "Finds projects from manifests, turns imports into graph edges, writes versions and publishes.",
242
+ "cardinality": "exclusive",
243
+ "defaultFor": [
244
+ "language"
245
+ ]
246
+ },
247
+ {
248
+ "name": "toolchain",
249
+ "description": "Decides how a project builds, tests and lints.",
250
+ "cardinality": "perSlot",
251
+ "defaultFor": [
252
+ "language"
253
+ ]
254
+ },
255
+ {
256
+ "name": "scaffold",
257
+ "description": "Writes a new project's starter files.",
258
+ "cardinality": "exclusive",
259
+ "defaultFor": [
260
+ "language"
261
+ ]
262
+ },
263
+ {
264
+ "name": "structure",
265
+ "description": "Checks layout and code rules.",
266
+ "cardinality": "additive",
267
+ "defaultFor": [
268
+ "convention"
269
+ ]
270
+ },
271
+ {
272
+ "name": "deploy",
273
+ "description": "Adds pipeline steps and deploy targets.",
274
+ "cardinality": "additive",
275
+ "defaultFor": []
276
+ }
277
+ ],
278
+ "$defs": {
279
+ "ActionStep": {
280
+ "description": "ActionStep is a provider-native step: a GitHub action or an Azure task, with its inputs in the order they are written.",
281
+ "type": "object",
282
+ "properties": {
283
+ "uses": {
284
+ "type": "string",
285
+ "description": "Uses is the action (\"actions/setup-go@v7\") or task (\"GoTool@0\")."
286
+ },
287
+ "inputs": {
288
+ "type": "array",
289
+ "items": {
290
+ "$ref": "#/$defs/Input"
291
+ }
292
+ }
293
+ },
294
+ "required": [
295
+ "uses"
296
+ ]
297
+ },
298
+ "AssetSpec": {
299
+ "description": "AssetSpec describes the release files of an app.",
300
+ "type": "object",
301
+ "properties": {
302
+ "name": {
303
+ "type": "string",
304
+ "description": "Name is the file name pattern; placeholders are {product}, {version}, {os}, {arch} and {ext}."
305
+ },
306
+ "product": {
307
+ "type": "string",
308
+ "description": "Product fills {product}; it defaults to the project name."
309
+ },
310
+ "platforms": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "string"
314
+ },
315
+ "description": "Platforms are \"os/arch\" pairs in the language's own spelling."
316
+ },
317
+ "osAlias": {
318
+ "type": "object",
319
+ "additionalProperties": {
320
+ "type": "string"
321
+ },
322
+ "description": "OSAlias and ArchAlias rename an os or arch in file names only."
323
+ },
324
+ "archAlias": {
325
+ "type": "object",
326
+ "additionalProperties": {
327
+ "type": "string"
328
+ }
329
+ },
330
+ "versionVariable": {
331
+ "type": "string",
332
+ "description": "VersionVariable is the symbol the version is stamped into, for languages that stamp at link time (Go: main.version)."
333
+ },
334
+ "outDir": {
335
+ "type": "string",
336
+ "description": "OutDir is the workspace-relative directory the files go to."
337
+ }
338
+ },
339
+ "required": [
340
+ "name",
341
+ "platforms",
342
+ "outDir"
343
+ ]
344
+ },
345
+ "AuditSettings": {
346
+ "description": "AuditSettings are the workspace's audit policy choices ([ci] audit_*).",
347
+ "type": "object",
348
+ "properties": {
349
+ "policies": {
350
+ "type": "array",
351
+ "items": {
352
+ "type": "string"
353
+ },
354
+ "description": "Policies are the ecosystems (\"node\", \"go\", \"python\", \"rust\") whose policy checks run in `smith ci audit`, as extra Audit steps."
355
+ },
356
+ "warn": {
357
+ "type": "array",
358
+ "items": {
359
+ "type": "string"
360
+ },
361
+ "description": "Warn are the policies whose checks only warn instead of blocking."
362
+ },
363
+ "allowInstallScripts": {
364
+ "type": "array",
365
+ "items": {
366
+ "type": "string"
367
+ },
368
+ "description": "AllowInstallScripts names npm packages whose install scripts the node policy accepts."
369
+ },
370
+ "maxUnsafe": {
371
+ "type": "integer",
372
+ "description": "MaxUnsafe is the number of unsafe blocks the rust policy accepts in all (zero: none)."
373
+ }
374
+ }
375
+ },
376
+ "CIParams": {
377
+ "description": "CIParams gives the plugin the projects it owns so it can describe what CI needs for them.",
378
+ "type": "object",
379
+ "properties": {
380
+ "projects": {
381
+ "type": "array",
382
+ "items": {
383
+ "$ref": "#/$defs/Project"
384
+ }
385
+ },
386
+ "audit": {
387
+ "$ref": "#/$defs/AuditSettings",
388
+ "description": "Audit is the workspace's opt-in to policy checks beyond the vulnerability scan; the zero value asks for none."
389
+ }
390
+ },
391
+ "required": [
392
+ "projects"
393
+ ]
394
+ },
395
+ "CIResult": {
396
+ "description": "CIResult is the plugin's contribution to every generated pipeline.",
397
+ "type": "object",
398
+ "properties": {
399
+ "stores": {
400
+ "type": "array",
401
+ "items": {
402
+ "$ref": "#/$defs/PackageStore"
403
+ },
404
+ "description": "Stores are the package managers' download stores the pipeline caches between runs, keyed on the lockfiles that decide what is in them."
405
+ },
406
+ "toolchains": {
407
+ "type": "array",
408
+ "items": {
409
+ "$ref": "#/$defs/Toolchain"
410
+ },
411
+ "description": "Toolchains are rendered as provider-native setup steps."
412
+ },
413
+ "setup": {
414
+ "type": "array",
415
+ "items": {
416
+ "$ref": "#/$defs/Step"
417
+ },
418
+ "description": "Setup steps run in `smith ci setup`, in order, from the workspace root."
419
+ },
420
+ "audit": {
421
+ "type": "array",
422
+ "items": {
423
+ "$ref": "#/$defs/Step"
424
+ },
425
+ "description": "Audit steps run in `smith ci audit`."
426
+ },
427
+ "postRelease": {
428
+ "type": "array",
429
+ "items": {
430
+ "$ref": "#/$defs/Step"
431
+ },
432
+ "description": "PostRelease steps run at the end of `smith ci release`, whether or not anything was released, with the release's credentials: work that must follow every push to the release branch (setting a registry description from a file). They run only after a release that did not fail, from the workspace root, and a step that is not Blocking only warns."
433
+ },
434
+ "credentials": {
435
+ "type": "array",
436
+ "items": {
437
+ "$ref": "#/$defs/Credential"
438
+ },
439
+ "description": "Credentials names the environment variables `smith ci release` needs."
440
+ },
441
+ "permissions": {
442
+ "type": "array",
443
+ "items": {
444
+ "type": "string"
445
+ },
446
+ "description": "Permissions are the GitHub Actions token permissions the release needs beyond the defaults (\"packages: write\" to push to ghcr.io). Other providers have no such permissions and ignore them."
447
+ },
448
+ "authenticate": {
449
+ "type": "array",
450
+ "items": {
451
+ "$ref": "#/$defs/Toolchain"
452
+ },
453
+ "description": "Authenticate are provider-native steps that sign in to a private registry before setup (Azure Pipelines' npmAuthenticate@0, say). A provider the plugin gives no step for gets none: its credentials come from the environment instead."
454
+ }
455
+ }
456
+ },
457
+ "CancelParams": {
458
+ "description": "CancelParams are the params of the cancel notification.",
459
+ "type": "object",
460
+ "properties": {
461
+ "id": {
462
+ "type": "integer",
463
+ "description": "ID is the id of the in-flight request to stop. An id the plugin does not know, or whose request is already answered, is ignored."
464
+ }
465
+ },
466
+ "required": [
467
+ "id"
468
+ ]
469
+ },
470
+ "Capabilities": {
471
+ "description": "Capabilities are the optional methods a plugin implements.",
472
+ "type": "object",
473
+ "properties": {
474
+ "discover": {
475
+ "type": "boolean"
476
+ },
477
+ "generate": {
478
+ "type": "boolean"
479
+ },
480
+ "version": {
481
+ "type": "boolean"
482
+ },
483
+ "publish": {
484
+ "type": "boolean"
485
+ },
486
+ "ci": {
487
+ "type": "boolean"
488
+ },
489
+ "doctor": {
490
+ "type": "boolean"
491
+ },
492
+ "contribute": {
493
+ "type": "boolean",
494
+ "description": "Contribute is a convention plugin's: it adds tasks to projects other plugins discovered."
495
+ },
496
+ "remove": {
497
+ "type": "boolean",
498
+ "description": "Remove cleans up a removed project's traces outside its directory."
499
+ },
500
+ "published": {
501
+ "type": "boolean",
502
+ "description": "Published reports what a registry has of a project."
503
+ },
504
+ "dependencies": {
505
+ "type": "boolean",
506
+ "description": "Dependencies installs and uninstalls packages in its projects."
507
+ },
508
+ "declarations": {
509
+ "type": "boolean",
510
+ "description": "Declarations lists and rewrites declared dependency specs (sync, up)."
511
+ },
512
+ "latest": {
513
+ "type": "boolean",
514
+ "description": "Latest reports the newest releases of dependencies and pinned tools."
515
+ },
516
+ "cancel": {
517
+ "type": "boolean",
518
+ "description": "Cancel says the plugin stops the work of a request when the host sends a cancel notification with its id, then answers that request with its result (if the work was already done) or the request-cancelled error. A host never sends the notification to a plugin without it."
519
+ }
520
+ }
521
+ },
522
+ "ContributeParams": {
523
+ "description": "ContributeParams hands a plugin the projects it applies to: those whose stack includes it, or, for a workspace-wide convention, those of the languages it supports that smith.toml enables it for.",
524
+ "type": "object",
525
+ "properties": {
526
+ "projects": {
527
+ "type": "array",
528
+ "items": {
529
+ "$ref": "#/$defs/Project"
530
+ }
531
+ }
532
+ },
533
+ "required": [
534
+ "projects"
535
+ ]
536
+ },
537
+ "ContributeResult": {
538
+ "description": "ContributeResult is what a convention adds, by project name.",
539
+ "type": "object",
540
+ "properties": {
541
+ "projects": {
542
+ "type": "object",
543
+ "additionalProperties": {
544
+ "$ref": "#/$defs/Contribution"
545
+ }
546
+ }
547
+ }
548
+ },
549
+ "Contribution": {
550
+ "description": "Contribution is a convention's addition to one project.",
551
+ "type": "object",
552
+ "properties": {
553
+ "tasks": {
554
+ "type": "object",
555
+ "additionalProperties": {
556
+ "$ref": "#/$defs/Task"
557
+ },
558
+ "description": "Tasks are new tasks. A task the project already has is kept as it is."
559
+ },
560
+ "replace": {
561
+ "type": "object",
562
+ "additionalProperties": {
563
+ "$ref": "#/$defs/Task"
564
+ },
565
+ "description": "Replace are tasks that replace the project's task of the same name, or are added when it has none."
566
+ },
567
+ "dependsOn": {
568
+ "type": "object",
569
+ "additionalProperties": {
570
+ "type": "array",
571
+ "items": {
572
+ "type": "string"
573
+ }
574
+ },
575
+ "description": "DependsOn adds dependencies to tasks the project already has, by task name ({\"lint\": [\"slice-check\"]})."
576
+ }
577
+ }
578
+ },
579
+ "Credential": {
580
+ "description": "Credential is a secret the release phase needs.",
581
+ "type": "object",
582
+ "properties": {
583
+ "env": {
584
+ "type": "string"
585
+ },
586
+ "description": {
587
+ "type": "string"
588
+ },
589
+ "required": {
590
+ "type": "boolean",
591
+ "description": "Required false means release works without it (e.g. a dry run target)."
592
+ },
593
+ "setup": {
594
+ "type": "boolean",
595
+ "description": "Setup gives it to `smith ci setup` (and the native job's setup) as well: installs from a private registry need it, not only the release."
596
+ },
597
+ "tasks": {
598
+ "type": "boolean",
599
+ "description": "Tasks gives it to every step that runs tasks (verify, pack, native) as well: the remote cache's key and credentials are read there, not only by the release."
600
+ }
601
+ },
602
+ "required": [
603
+ "env",
604
+ "description",
605
+ "required"
606
+ ]
607
+ },
608
+ "Declaration": {
609
+ "description": "Declaration is one dependency one manifest declares.",
610
+ "type": "object",
611
+ "properties": {
612
+ "project": {
613
+ "type": "string",
614
+ "description": "Project is the declaring project's name, \"\" for the root manifest."
615
+ },
616
+ "file": {
617
+ "type": "string",
618
+ "description": "File is the manifest, workspace-relative."
619
+ },
620
+ "name": {
621
+ "type": "string",
622
+ "description": "Name is the dependency's name as the ecosystem compares names."
623
+ },
624
+ "spec": {
625
+ "type": "string",
626
+ "description": "Spec is the declared range or version (^1.2.3, >=2.31), \"\" when the manifest gives none."
627
+ },
628
+ "section": {
629
+ "type": "string",
630
+ "description": "Section is where it is declared: dependencies, devDependencies, dev..."
631
+ },
632
+ "peer": {
633
+ "type": "boolean",
634
+ "description": "Peer declarations state what a package works with, not what is installed: sync and up leave them alone."
635
+ },
636
+ "rewritable": {
637
+ "type": "boolean",
638
+ "description": "Rewritable is false for a spec smith must not rewrite: a URL, a git ref, a workspace alias, a compound range, environment markers."
639
+ }
640
+ },
641
+ "required": [
642
+ "file",
643
+ "name",
644
+ "spec",
645
+ "section",
646
+ "rewritable"
647
+ ]
648
+ },
649
+ "DeclaredParams": {
650
+ "description": "DeclaredParams asks for the dependencies the plugin's projects declare (and the workspace root's manifest, when the ecosystem has one).",
651
+ "type": "object",
652
+ "properties": {
653
+ "projects": {
654
+ "type": "array",
655
+ "items": {
656
+ "$ref": "#/$defs/Project"
657
+ }
658
+ }
659
+ },
660
+ "required": [
661
+ "projects"
662
+ ]
663
+ },
664
+ "DeclaredResult": {
665
+ "description": "DeclaredResult is every declaration, and the version installed of each name where the plugin can tell.",
666
+ "type": "object",
667
+ "properties": {
668
+ "declarations": {
669
+ "type": "array",
670
+ "items": {
671
+ "$ref": "#/$defs/Declaration"
672
+ }
673
+ },
674
+ "installed": {
675
+ "type": "object",
676
+ "additionalProperties": {
677
+ "type": "string"
678
+ }
679
+ }
680
+ },
681
+ "required": [
682
+ "declarations"
683
+ ]
684
+ },
685
+ "DependencyResult": {
686
+ "description": "DependencyResult lists the workspace-relative files the plugin changed and notes for the user.",
687
+ "type": "object",
688
+ "properties": {
689
+ "files": {
690
+ "type": "array",
691
+ "items": {
692
+ "type": "string"
693
+ }
694
+ },
695
+ "notes": {
696
+ "type": "array",
697
+ "items": {
698
+ "type": "string"
699
+ }
700
+ }
701
+ }
702
+ },
703
+ "DevcontainerFeature": {
704
+ "description": "DevcontainerFeature is a dev container feature and its options (https://containers.dev/features).",
705
+ "type": "object",
706
+ "properties": {
707
+ "id": {
708
+ "type": "string",
709
+ "description": "ID is the feature reference, e.g. \"ghcr.io/devcontainers/features/go:1\"."
710
+ },
711
+ "options": {
712
+ "type": "object",
713
+ "additionalProperties": {
714
+ "type": "string"
715
+ }
716
+ }
717
+ },
718
+ "required": [
719
+ "id"
720
+ ]
721
+ },
722
+ "DiscoverParams": {
723
+ "description": "DiscoverParams asks a plugin to describe the projects behind manifests the host found. Paths are workspace-relative and use forward slashes.",
724
+ "type": "object",
725
+ "properties": {
726
+ "manifests": {
727
+ "type": "array",
728
+ "items": {
729
+ "type": "string"
730
+ }
731
+ }
732
+ },
733
+ "required": [
734
+ "manifests"
735
+ ]
736
+ },
737
+ "DiscoverResult": {
738
+ "description": "DiscoverResult describes every manifest that is a project of this plugin. A manifest the plugin does not own is simply left out.",
739
+ "type": "object",
740
+ "properties": {
741
+ "projects": {
742
+ "type": "array",
743
+ "items": {
744
+ "$ref": "#/$defs/Project"
745
+ }
746
+ }
747
+ },
748
+ "required": [
749
+ "projects"
750
+ ]
751
+ },
752
+ "DoctorParams": {
753
+ "description": "DoctorParams gives the plugin its projects to check.",
754
+ "type": "object",
755
+ "properties": {
756
+ "projects": {
757
+ "type": "array",
758
+ "items": {
759
+ "$ref": "#/$defs/Project"
760
+ }
761
+ }
762
+ },
763
+ "required": [
764
+ "projects"
765
+ ]
766
+ },
767
+ "DoctorResult": {
768
+ "description": "DoctorResult carries the plugin's findings.",
769
+ "type": "object",
770
+ "properties": {
771
+ "findings": {
772
+ "type": "array",
773
+ "items": {
774
+ "$ref": "#/$defs/Finding"
775
+ }
776
+ }
777
+ },
778
+ "required": [
779
+ "findings"
780
+ ]
781
+ },
782
+ "Empty": {
783
+ "description": "An object with no members.",
784
+ "type": "object"
785
+ },
786
+ "FileEdit": {
787
+ "description": "FileEdit is one file's new content, workspace-relative; Delete removes it.",
788
+ "type": "object",
789
+ "properties": {
790
+ "path": {
791
+ "type": "string"
792
+ },
793
+ "content": {
794
+ "type": "string"
795
+ },
796
+ "delete": {
797
+ "type": "boolean"
798
+ }
799
+ },
800
+ "required": [
801
+ "path"
802
+ ]
803
+ },
804
+ "Finding": {
805
+ "description": "Finding is one check. Every failed finding names its remedy.",
806
+ "type": "object",
807
+ "properties": {
808
+ "check": {
809
+ "type": "string"
810
+ },
811
+ "ok": {
812
+ "type": "boolean"
813
+ },
814
+ "detail": {
815
+ "type": "string"
816
+ },
817
+ "remedy": {
818
+ "type": "string"
819
+ },
820
+ "warning": {
821
+ "type": "boolean",
822
+ "description": "Warning true reports a problem without failing doctor."
823
+ },
824
+ "fix": {
825
+ "$ref": "#/$defs/Fix",
826
+ "description": "Fix is the change that clears a failed finding, when the plugin can write it; smith doctor --fix shows it as a diff before applying it."
827
+ }
828
+ },
829
+ "required": [
830
+ "check",
831
+ "ok"
832
+ ]
833
+ },
834
+ "Fix": {
835
+ "description": "Fix is a change that clears a failed finding: files' new contents, then commands to run, and questions the user answers first. Every part is optional; the host shows all of it before applying anything.\n\nA host that does not know Steps or Choices ignores them, so a plugin marks a fix Safe only when its Files alone are sound.",
836
+ "type": "object",
837
+ "properties": {
838
+ "description": {
839
+ "type": "string"
840
+ },
841
+ "safe": {
842
+ "type": "boolean",
843
+ "description": "Safe marks a fix that only restores what smith or the plugin owns and loses nothing of the user's; doctor --fix --yes applies only safe fixes with no Choices. Any other fix is asked about before it runs."
844
+ },
845
+ "files": {
846
+ "type": "array",
847
+ "items": {
848
+ "$ref": "#/$defs/FileEdit"
849
+ },
850
+ "description": "Files are written first, as whole new contents."
851
+ },
852
+ "steps": {
853
+ "type": "array",
854
+ "items": {
855
+ "$ref": "#/$defs/FixStep"
856
+ },
857
+ "description": "Steps run after the files, in order, from the workspace root; the first one that fails stops the rest."
858
+ },
859
+ "choices": {
860
+ "type": "array",
861
+ "items": {
862
+ "$ref": "#/$defs/FixChoice"
863
+ },
864
+ "description": "Choices are questions the user answers before the fix applies, in order. The answer's Fix is added to this one: its files and steps come after this fix's own. A fix with Choices is never applied unasked."
865
+ },
866
+ "applies_to": {
867
+ "type": "array",
868
+ "items": {
869
+ "type": "string"
870
+ },
871
+ "description": "AppliesTo names the projects the fix is for. The host folds fixes that share a Description and name projects into one (\"applies to 22 projects\"), so give the same Description to the same kind of fix on every project. A fix that edits one shared file for many projects lists them all here."
872
+ }
873
+ },
874
+ "required": [
875
+ "description",
876
+ "safe"
877
+ ]
878
+ },
879
+ "FixChoice": {
880
+ "description": "FixChoice is a question with options, one wizard step.",
881
+ "type": "object",
882
+ "properties": {
883
+ "question": {
884
+ "type": "string"
885
+ },
886
+ "options": {
887
+ "type": "array",
888
+ "items": {
889
+ "$ref": "#/$defs/FixChoiceOption"
890
+ }
891
+ }
892
+ },
893
+ "required": [
894
+ "question",
895
+ "options"
896
+ ]
897
+ },
898
+ "FixChoiceOption": {
899
+ "description": "FixChoiceOption is one answer: a label, and the Fix it adds when picked. The first option is the suggested one.",
900
+ "type": "object",
901
+ "properties": {
902
+ "label": {
903
+ "type": "string"
904
+ },
905
+ "fix": {
906
+ "$ref": "#/$defs/Fix"
907
+ }
908
+ },
909
+ "required": [
910
+ "label",
911
+ "fix"
912
+ ]
913
+ },
914
+ "FixStep": {
915
+ "description": "FixStep is a command to run in the workspace.",
916
+ "type": "object",
917
+ "properties": {
918
+ "description": {
919
+ "type": "string",
920
+ "description": "Description says in words what the command does."
921
+ },
922
+ "argv": {
923
+ "type": "array",
924
+ "items": {
925
+ "type": "string"
926
+ },
927
+ "description": "Argv is the program and its arguments; no shell is involved."
928
+ },
929
+ "dir": {
930
+ "type": "string",
931
+ "description": "Dir is where it runs, workspace-relative; empty is the workspace root."
932
+ }
933
+ },
934
+ "required": [
935
+ "description",
936
+ "argv"
937
+ ]
938
+ },
939
+ "GenerateParams": {
940
+ "description": "GenerateParams asks a plugin to scaffold a project. The host chooses the directory from the kind (apps/, libs/, packages/).",
941
+ "type": "object",
942
+ "properties": {
943
+ "kind": {
944
+ "$ref": "#/$defs/ProjectKind"
945
+ },
946
+ "name": {
947
+ "type": "string"
948
+ },
949
+ "directory": {
950
+ "type": "string",
951
+ "description": "Directory is workspace-relative, forward slashes; it does not exist yet."
952
+ },
953
+ "workspace": {
954
+ "$ref": "#/$defs/WorkspaceInfo",
955
+ "description": "Workspace carries what a template needs to know about the monorepo."
956
+ },
957
+ "stack": {
958
+ "type": "string",
959
+ "description": "Stack is the stack the project is created with. The plugin that writes the manifest records it there, so discovery reports it back."
960
+ },
961
+ "convention": {
962
+ "type": "boolean",
963
+ "description": "Convention is true when the plugin is asked as a workspace convention ([conventions.<name>] applying to the new project), not as one of the stack's plugins. A plugin adds only what every matching project needs then: a suite or starter files belong to the stack that names it."
964
+ },
965
+ "settings": {
966
+ "type": "object",
967
+ "description": "Settings are this plugin's own settings for the new project, from the recipe the project is created from (its settings.<plugin> table); the same table is later the plugin's entry in Project.Settings. Nil when there are none."
968
+ }
969
+ },
970
+ "required": [
971
+ "kind",
972
+ "name",
973
+ "directory",
974
+ "workspace"
975
+ ]
976
+ },
977
+ "GenerateResult": {
978
+ "description": "GenerateResult lists what the plugin wrote, workspace-relative.",
979
+ "type": "object",
980
+ "properties": {
981
+ "files": {
982
+ "type": "array",
983
+ "items": {
984
+ "type": "string"
985
+ }
986
+ },
987
+ "notes": {
988
+ "type": "array",
989
+ "items": {
990
+ "type": "string"
991
+ },
992
+ "description": "Notes are printed to the user after generation."
993
+ }
994
+ },
995
+ "required": [
996
+ "files"
997
+ ]
998
+ },
999
+ "InitializeParams": {
1000
+ "description": "InitializeParams is sent once, first, by the host.",
1001
+ "type": "object",
1002
+ "properties": {
1003
+ "protocolVersions": {
1004
+ "type": "array",
1005
+ "items": {
1006
+ "type": "integer"
1007
+ },
1008
+ "description": "ProtocolVersions lists every major version the host can speak."
1009
+ },
1010
+ "host": {
1011
+ "$ref": "#/$defs/Peer"
1012
+ },
1013
+ "workspaceRoot": {
1014
+ "type": "string",
1015
+ "description": "WorkspaceRoot is an absolute path using the host OS separators."
1016
+ }
1017
+ },
1018
+ "required": [
1019
+ "protocolVersions",
1020
+ "host",
1021
+ "workspaceRoot"
1022
+ ]
1023
+ },
1024
+ "InitializeResult": {
1025
+ "description": "InitializeResult tells the host who the plugin is and what it can do.",
1026
+ "type": "object",
1027
+ "properties": {
1028
+ "protocolVersion": {
1029
+ "type": "integer",
1030
+ "description": "ProtocolVersion is the version the plugin chose from the host's list."
1031
+ },
1032
+ "plugin": {
1033
+ "$ref": "#/$defs/Peer"
1034
+ },
1035
+ "kind": {
1036
+ "$ref": "#/$defs/PluginKind"
1037
+ },
1038
+ "capabilities": {
1039
+ "$ref": "#/$defs/Capabilities"
1040
+ },
1041
+ "concurrency": {
1042
+ "type": "integer",
1043
+ "description": "Concurrency is how many requests the plugin can work on at the same time; the host never has more in flight. Absent or 0 means 1, which is what every plugin that says nothing does: the host sends the next request only after the previous one is answered. N above 1 allows that many, and ConcurrencyUnlimited (-1) leaves the number to the host. Any other negative value is invalid and read as 1."
1044
+ },
1045
+ "languages": {
1046
+ "type": "array",
1047
+ "items": {
1048
+ "type": "string"
1049
+ },
1050
+ "description": "Languages are the values a user passes to --lang to reach this plugin."
1051
+ },
1052
+ "manifests": {
1053
+ "type": "array",
1054
+ "items": {
1055
+ "type": "string"
1056
+ },
1057
+ "description": "Manifests are file base names (package.json, go.mod), or patterns of them (*.csproj), whose presence in a directory may make it a project of this plugin."
1058
+ },
1059
+ "roles": {
1060
+ "type": "array",
1061
+ "items": {
1062
+ "$ref": "#/$defs/Role"
1063
+ },
1064
+ "description": "Roles are the levels the plugin can be chosen for in a project's make-up (a stack, a recipe). Empty means the default of its kind (see DefaultRoles). A role is a level: there is no separate level field, because one plugin can play several (a scaffold that is also a toolchain)."
1065
+ },
1066
+ "provides": {
1067
+ "type": "array",
1068
+ "items": {
1069
+ "type": "string"
1070
+ },
1071
+ "description": "Provides are the slots a toolchain plugin fills: the task names it owns (\"test\" for a test runner). A slot is exclusive: two plugins of one project may not provide the same task."
1072
+ },
1073
+ "requires": {
1074
+ "type": "array",
1075
+ "items": {
1076
+ "$ref": "#/$defs/PluginRef"
1077
+ },
1078
+ "description": "Requires are plugins that must also be in the project for this one to work: a Node toolchain requires the node language plugin."
1079
+ },
1080
+ "conflicts": {
1081
+ "type": "array",
1082
+ "items": {
1083
+ "$ref": "#/$defs/PluginRef"
1084
+ },
1085
+ "description": "Conflicts are plugins that must not be in the same project."
1086
+ },
1087
+ "stacks": {
1088
+ "type": "array",
1089
+ "items": {
1090
+ "$ref": "#/$defs/Stack"
1091
+ },
1092
+ "description": "Stacks are ready-made stacks the plugin publishes."
1093
+ }
1094
+ },
1095
+ "required": [
1096
+ "protocolVersion",
1097
+ "plugin",
1098
+ "kind",
1099
+ "capabilities"
1100
+ ]
1101
+ },
1102
+ "Input": {
1103
+ "description": "Input is one input of an ActionStep. Values are written as quoted YAML strings, except true and false.",
1104
+ "type": "object",
1105
+ "properties": {
1106
+ "name": {
1107
+ "type": "string"
1108
+ },
1109
+ "value": {
1110
+ "type": "string"
1111
+ }
1112
+ },
1113
+ "required": [
1114
+ "name",
1115
+ "value"
1116
+ ]
1117
+ },
1118
+ "InstallParams": {
1119
+ "description": "InstallParams asks a plugin to add packages to one of its projects with the ecosystem's own toolchain, or, with no project, to install every dependency of the projects it serves (a fresh clone's first step).",
1120
+ "type": "object",
1121
+ "properties": {
1122
+ "project": {
1123
+ "$ref": "#/$defs/Project",
1124
+ "description": "Project is the project the packages go into; nil installs everything."
1125
+ },
1126
+ "projects": {
1127
+ "type": "array",
1128
+ "items": {
1129
+ "$ref": "#/$defs/Project"
1130
+ },
1131
+ "description": "Projects are the projects the plugin serves, when Project is nil."
1132
+ },
1133
+ "packages": {
1134
+ "type": "array",
1135
+ "items": {
1136
+ "type": "string"
1137
+ },
1138
+ "description": "Packages are names or pinned specs as the ecosystem writes them (left-pad, requests>=2.31, github.com/pkg/errors@v0.9.1)."
1139
+ },
1140
+ "dev": {
1141
+ "type": "boolean",
1142
+ "description": "Dev adds them as development dependencies where the ecosystem has such a thing; a plugin without one says so in a note."
1143
+ }
1144
+ }
1145
+ },
1146
+ "LatestParams": {
1147
+ "description": "LatestParams asks for the newest stable release of each dependency, and, with Tools, how the tools the plugin pins compare with their latest.",
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "names": {
1151
+ "type": "array",
1152
+ "items": {
1153
+ "type": "string"
1154
+ }
1155
+ },
1156
+ "tools": {
1157
+ "type": "boolean"
1158
+ }
1159
+ }
1160
+ },
1161
+ "LatestResult": {
1162
+ "description": "LatestResult maps each name to its newest stable version. A name the registry could not be asked about is in Unreachable, with the reason; a name the registry does not have is in neither.",
1163
+ "type": "object",
1164
+ "properties": {
1165
+ "latest": {
1166
+ "type": "object",
1167
+ "additionalProperties": {
1168
+ "type": "string"
1169
+ }
1170
+ },
1171
+ "unreachable": {
1172
+ "type": "object",
1173
+ "additionalProperties": {
1174
+ "type": "string"
1175
+ }
1176
+ },
1177
+ "tools": {
1178
+ "type": "array",
1179
+ "items": {
1180
+ "$ref": "#/$defs/ToolPin"
1181
+ }
1182
+ }
1183
+ }
1184
+ },
1185
+ "PackageStore": {
1186
+ "description": "PackageStore is where a package manager keeps what it downloaded (npm's ~/.npm, Go's module cache). A generated pipeline restores it before setup and saves it after a run, keyed on Files, so `npm ci` or `go mod download` fetches only what changed. A pull request from a fork restores it and never writes the base repository's cache.",
1187
+ "type": "object",
1188
+ "properties": {
1189
+ "name": {
1190
+ "type": "string",
1191
+ "description": "Name identifies the store (\"npm\", \"go\") and is part of its cache key."
1192
+ },
1193
+ "path": {
1194
+ "type": "string",
1195
+ "description": "Path is the store's default location, which GitHub Actions caches as it is (\"~/.npm\")."
1196
+ },
1197
+ "env": {
1198
+ "type": "string",
1199
+ "description": "Env is the environment variable that moves the store (NPM_CONFIG_CACHE, GOMODCACHE). Azure Pipelines and GitLab CI cache only directories under their own workspace, so they set it to one and cache that instead."
1200
+ },
1201
+ "files": {
1202
+ "type": "array",
1203
+ "items": {
1204
+ "type": "string"
1205
+ },
1206
+ "description": "Files are the lockfiles that key the store: workspace-relative paths or globs. GitLab CI keys on the first two."
1207
+ }
1208
+ },
1209
+ "required": [
1210
+ "name",
1211
+ "path",
1212
+ "env",
1213
+ "files"
1214
+ ]
1215
+ },
1216
+ "Peer": {
1217
+ "description": "Peer names one side of the connection.",
1218
+ "type": "object",
1219
+ "properties": {
1220
+ "name": {
1221
+ "type": "string"
1222
+ },
1223
+ "version": {
1224
+ "type": "string"
1225
+ }
1226
+ },
1227
+ "required": [
1228
+ "name",
1229
+ "version"
1230
+ ]
1231
+ },
1232
+ "PluginKind": {
1233
+ "description": "PluginKind separates plugins that understand a language from plugins that add to projects a language plugin discovered (toolchains, structure rules, scaffolds, deploy targets), which are all of kind convention.\n\nPlugin kinds.",
1234
+ "type": "string",
1235
+ "enum": [
1236
+ "language",
1237
+ "convention"
1238
+ ]
1239
+ },
1240
+ "PluginRef": {
1241
+ "description": "PluginRef names the plugins a requirement or a conflict is about. Every field set must match; at least one must be set.",
1242
+ "type": "object",
1243
+ "properties": {
1244
+ "level": {
1245
+ "$ref": "#/$defs/Role",
1246
+ "description": "Level is the role the plugin is chosen for in the project."
1247
+ },
1248
+ "name": {
1249
+ "type": "string",
1250
+ "description": "Name is the plugin's name, or for a language plugin one of its languages (\"node\", \"javascript\")."
1251
+ },
1252
+ "slot": {
1253
+ "type": "string",
1254
+ "description": "Slot is a task the plugin provides (\"test\")."
1255
+ }
1256
+ }
1257
+ },
1258
+ "Project": {
1259
+ "description": "Project is one unit of the monorepo as a plugin sees it.",
1260
+ "type": "object",
1261
+ "properties": {
1262
+ "name": {
1263
+ "type": "string",
1264
+ "description": "Name is unique across the workspace; it is what users type."
1265
+ },
1266
+ "root": {
1267
+ "type": "string",
1268
+ "description": "Root is the workspace-relative directory, forward slashes."
1269
+ },
1270
+ "language": {
1271
+ "type": "string"
1272
+ },
1273
+ "kind": {
1274
+ "$ref": "#/$defs/ProjectKind"
1275
+ },
1276
+ "exports": {
1277
+ "type": "array",
1278
+ "items": {
1279
+ "type": "string"
1280
+ },
1281
+ "description": "Exports are the identifiers other projects import this one by: an npm package name, a Go module path, a Python import name."
1282
+ },
1283
+ "imports": {
1284
+ "type": "array",
1285
+ "items": {
1286
+ "type": "string"
1287
+ },
1288
+ "description": "Imports are identifiers this project's sources import. The host keeps the ones another project exports and turns them into graph edges."
1289
+ },
1290
+ "version": {
1291
+ "type": "string",
1292
+ "description": "Version is the version recorded in the manifest, if it has one."
1293
+ },
1294
+ "toolchain": {
1295
+ "type": "string",
1296
+ "description": "Toolchain is the version of the compiler or runtime the project's tasks run with (\"node 20.11.0\", \"go 1.23.4\"), as the plugin probed it. It goes into every task's cache key, so a result from another version is a miss. Empty when the plugin cannot tell, and then it is left out."
1297
+ },
1298
+ "publishTo": {
1299
+ "type": "string",
1300
+ "description": "PublishTo is where a package publishes, when its manifest says: \"pub.dev\" for the public registry that takes a package only from a run on its tag (so a release does not publish it itself), \"none\" for a package that is never published, or a repository URL. Empty when the plugin does not say."
1301
+ },
1302
+ "description": {
1303
+ "type": "string",
1304
+ "description": "Description is the one-line description the manifest records (package.json description, pyproject.toml project.description, the pom's <description>), if it has one. Conventions use it where a registry asks for a summary."
1305
+ },
1306
+ "tagPrefix": {
1307
+ "type": "string",
1308
+ "description": "TagPrefix overrides the release tag prefix; empty means \"<name>@\". Go modules use \"<root>/v\" so `go get` can resolve the tag."
1309
+ },
1310
+ "tasks": {
1311
+ "type": "object",
1312
+ "additionalProperties": {
1313
+ "$ref": "#/$defs/Task"
1314
+ }
1315
+ },
1316
+ "tags": {
1317
+ "type": "array",
1318
+ "items": {
1319
+ "type": "string"
1320
+ }
1321
+ },
1322
+ "stack": {
1323
+ "type": "string",
1324
+ "description": "Stack is the stack recorded in the project's manifest, if any."
1325
+ },
1326
+ "settings": {
1327
+ "type": "object",
1328
+ "additionalProperties": {
1329
+ "type": "object"
1330
+ },
1331
+ "description": "Settings are plugins' settings for this project from smith.toml, by plugin name: [projects.<project>.settings.<name>] (what a recipe's settings became when it created the project), and for a convention its [conventions.<name>] settings and the project's [projects.<project>.<name>] on top. Set by the host; a plugin reads its own entry."
1332
+ },
1333
+ "registries": {
1334
+ "$ref": "#/$defs/Registries",
1335
+ "description": "Registries are the private registries the project installs from and publishes to, from smith.toml [registries]; nil means the public ones. Set by the host."
1336
+ }
1337
+ },
1338
+ "required": [
1339
+ "name",
1340
+ "root",
1341
+ "language",
1342
+ "kind"
1343
+ ]
1344
+ },
1345
+ "ProjectKind": {
1346
+ "description": "ProjectKind is the universal kind vocabulary.\n\nProject kinds. An app is deployed, never published; a lib is internal and never published; a package is published.",
1347
+ "type": "string",
1348
+ "enum": [
1349
+ "app",
1350
+ "lib",
1351
+ "package"
1352
+ ]
1353
+ },
1354
+ "PublishParams": {
1355
+ "description": "PublishParams asks a plugin to publish one project at one version.",
1356
+ "type": "object",
1357
+ "properties": {
1358
+ "project": {
1359
+ "$ref": "#/$defs/Project"
1360
+ },
1361
+ "version": {
1362
+ "type": "string"
1363
+ },
1364
+ "dryRun": {
1365
+ "type": "boolean"
1366
+ },
1367
+ "assets": {
1368
+ "$ref": "#/$defs/AssetSpec",
1369
+ "description": "Assets, when set, asks the plugin to build the files attached to the release (an app's per-platform binaries) instead of publishing to a registry."
1370
+ },
1371
+ "platform": {
1372
+ "type": "string",
1373
+ "description": "Platform, when set, is the \"os/arch\" (Go's spelling) of the runner a native project is published from: each native job publishes its own platform's build (a VS Code extension's target) and nothing else."
1374
+ },
1375
+ "tagged": {
1376
+ "type": "boolean",
1377
+ "description": "Tagged says the publish runs on the project's own tag, in the run the registry trusts (pub.dev's automated publishing); a registry that takes a package only from such a run is published to only then."
1378
+ },
1379
+ "commit": {
1380
+ "type": "string",
1381
+ "description": "Commit is the full hash of the commit being released, and Branch the release branch, for a plugin that tags what it publishes with them (a container image's sha-<short> and branch tags). Empty when unknown."
1382
+ },
1383
+ "branch": {
1384
+ "type": "string"
1385
+ }
1386
+ },
1387
+ "required": [
1388
+ "project",
1389
+ "version"
1390
+ ]
1391
+ },
1392
+ "PublishResult": {
1393
+ "description": "PublishResult reports what happened. Skipped with a reason is a success: an already-published version makes a re-run safe.",
1394
+ "type": "object",
1395
+ "properties": {
1396
+ "published": {
1397
+ "type": "boolean"
1398
+ },
1399
+ "skipped": {
1400
+ "type": "string"
1401
+ },
1402
+ "registry": {
1403
+ "type": "string"
1404
+ },
1405
+ "assets": {
1406
+ "type": "array",
1407
+ "items": {
1408
+ "type": "string"
1409
+ },
1410
+ "description": "Assets are the workspace-relative files built for the release, in upload order; in a dry run, the files that would be built."
1411
+ },
1412
+ "assetPlatforms": {
1413
+ "type": "object",
1414
+ "additionalProperties": {
1415
+ "type": "string"
1416
+ },
1417
+ "description": "AssetPlatforms maps each archive among Assets to the \"os/arch\" it was built for, so the host can describe them (package manager manifests)."
1418
+ },
1419
+ "binary": {
1420
+ "type": "string",
1421
+ "description": "Binary is the executable's name inside each archive, without \".exe\"."
1422
+ },
1423
+ "images": {
1424
+ "type": "array",
1425
+ "items": {
1426
+ "$ref": "#/$defs/PublishedImage"
1427
+ },
1428
+ "description": "Images are the container images pushed, one per registry, for a deploy step or a GitOps manifest to refer to by digest."
1429
+ }
1430
+ },
1431
+ "required": [
1432
+ "published"
1433
+ ]
1434
+ },
1435
+ "PublishedImage": {
1436
+ "description": "PublishedImage is one container image a release pushed.",
1437
+ "type": "object",
1438
+ "properties": {
1439
+ "reference": {
1440
+ "type": "string",
1441
+ "description": "Reference is the image without a tag: ghcr.io/acme/api."
1442
+ },
1443
+ "tags": {
1444
+ "type": "array",
1445
+ "items": {
1446
+ "type": "string"
1447
+ },
1448
+ "description": "Tags are the tags pushed, in the order they were."
1449
+ },
1450
+ "digest": {
1451
+ "type": "string",
1452
+ "description": "Digest is the manifest digest the registry holds (\"sha256:...\"); empty when it could not be read."
1453
+ }
1454
+ },
1455
+ "required": [
1456
+ "reference",
1457
+ "tags"
1458
+ ]
1459
+ },
1460
+ "PublishedParams": {
1461
+ "description": "PublishedParams asks which version of a project its registry has.",
1462
+ "type": "object",
1463
+ "properties": {
1464
+ "project": {
1465
+ "$ref": "#/$defs/Project"
1466
+ }
1467
+ },
1468
+ "required": [
1469
+ "project"
1470
+ ]
1471
+ },
1472
+ "PublishedResult": {
1473
+ "description": "PublishedResult is the newest version the registry has of a project.",
1474
+ "type": "object",
1475
+ "properties": {
1476
+ "version": {
1477
+ "type": "string",
1478
+ "description": "Version is empty when the registry does not know the project: its first release is still to come."
1479
+ },
1480
+ "registry": {
1481
+ "type": "string",
1482
+ "description": "Registry names where the plugin looked, for messages."
1483
+ },
1484
+ "unreachable": {
1485
+ "type": "boolean",
1486
+ "description": "Unreachable is true when the registry could not be asked (offline, an error), so nothing can be concluded; Detail says why."
1487
+ },
1488
+ "detail": {
1489
+ "type": "string"
1490
+ }
1491
+ }
1492
+ },
1493
+ "Registries": {
1494
+ "description": "Registries are the registries a project uses, set by the host from smith.toml: Install is where the workspace installs packages from, Publish where the project is published. Nil, or a nil member, means the public registry, as before.",
1495
+ "type": "object",
1496
+ "properties": {
1497
+ "install": {
1498
+ "$ref": "#/$defs/Registry"
1499
+ },
1500
+ "publish": {
1501
+ "$ref": "#/$defs/Registry"
1502
+ },
1503
+ "noPublish": {
1504
+ "type": "boolean",
1505
+ "description": "NoPublish means smith.toml says registry = \"none\": the release versions and tags the project and publishes it to no registry (a registry that builds from the tag, such as JitPack, does the rest)."
1506
+ }
1507
+ }
1508
+ },
1509
+ "Registry": {
1510
+ "description": "Registry is a package registry smith.toml names in [registries.<name>]: a private feed (Azure Artifacts, GitHub Packages, any token-protected registry) a language plugin installs from or publishes to. Each URL is optional; a plugin reads the one for its ecosystem.",
1511
+ "type": "object",
1512
+ "properties": {
1513
+ "name": {
1514
+ "type": "string"
1515
+ },
1516
+ "auth": {
1517
+ "type": "string",
1518
+ "description": "Auth is how the registry is signed in to: AuthAzureArtifacts, AuthGitHubPackages or AuthToken."
1519
+ },
1520
+ "tokenEnv": {
1521
+ "type": "string",
1522
+ "description": "TokenEnv is the environment variable holding the token, for AuthToken."
1523
+ },
1524
+ "npm": {
1525
+ "type": "string",
1526
+ "description": "NPM is the npm registry URL."
1527
+ },
1528
+ "pypi": {
1529
+ "type": "string",
1530
+ "description": "PyPI is the simple index pip installs from; PyPIUpload is where twine uploads."
1531
+ },
1532
+ "pypiUpload": {
1533
+ "type": "string"
1534
+ },
1535
+ "nuget": {
1536
+ "type": "string",
1537
+ "description": "NuGet is the NuGet v3 service index."
1538
+ },
1539
+ "maven": {
1540
+ "type": "string",
1541
+ "description": "Maven is the Maven repository packages deploy to: an https URL, or MavenGitHub for the GitHub Packages repository of the repository the release runs in."
1542
+ }
1543
+ },
1544
+ "required": [
1545
+ "name",
1546
+ "auth"
1547
+ ]
1548
+ },
1549
+ "RemoveParams": {
1550
+ "description": "RemoveParams tells a plugin a project is being removed. The host deletes the project's directory first; the plugin cleans what it owns outside it (a go.work entry, a lockfile, an installed package).",
1551
+ "type": "object",
1552
+ "properties": {
1553
+ "project": {
1554
+ "$ref": "#/$defs/Project"
1555
+ },
1556
+ "dryRun": {
1557
+ "type": "boolean",
1558
+ "description": "DryRun asks what would change, without changing it."
1559
+ }
1560
+ },
1561
+ "required": [
1562
+ "project"
1563
+ ]
1564
+ },
1565
+ "RemoveResult": {
1566
+ "description": "RemoveResult lists the workspace-relative files the plugin changed (or, in a dry run, would change), and notes for the user.",
1567
+ "type": "object",
1568
+ "properties": {
1569
+ "files": {
1570
+ "type": "array",
1571
+ "items": {
1572
+ "type": "string"
1573
+ }
1574
+ },
1575
+ "notes": {
1576
+ "type": "array",
1577
+ "items": {
1578
+ "type": "string"
1579
+ }
1580
+ }
1581
+ }
1582
+ },
1583
+ "Request": {
1584
+ "description": "Request is a JSON-RPC 2.0 request, or a notification when ID is nil.",
1585
+ "type": "object",
1586
+ "properties": {
1587
+ "jsonrpc": {
1588
+ "type": "string"
1589
+ },
1590
+ "id": {
1591
+ "type": "integer"
1592
+ },
1593
+ "method": {
1594
+ "type": "string"
1595
+ },
1596
+ "params": {}
1597
+ },
1598
+ "required": [
1599
+ "jsonrpc",
1600
+ "method"
1601
+ ]
1602
+ },
1603
+ "Response": {
1604
+ "description": "Response is a JSON-RPC 2.0 response. Exactly one of Result and Error is set.",
1605
+ "type": "object",
1606
+ "properties": {
1607
+ "jsonrpc": {
1608
+ "type": "string"
1609
+ },
1610
+ "id": {
1611
+ "type": [
1612
+ "integer",
1613
+ "null"
1614
+ ]
1615
+ },
1616
+ "result": {},
1617
+ "error": {
1618
+ "$ref": "#/$defs/ResponseError"
1619
+ }
1620
+ },
1621
+ "required": [
1622
+ "jsonrpc",
1623
+ "id"
1624
+ ]
1625
+ },
1626
+ "ResponseError": {
1627
+ "description": "ResponseError is a JSON-RPC 2.0 error object.",
1628
+ "type": "object",
1629
+ "properties": {
1630
+ "code": {
1631
+ "type": "integer"
1632
+ },
1633
+ "message": {
1634
+ "type": "string"
1635
+ }
1636
+ },
1637
+ "required": [
1638
+ "code",
1639
+ "message"
1640
+ ]
1641
+ },
1642
+ "Rewrite": {
1643
+ "description": "Rewrite changes one declaration's spec.",
1644
+ "type": "object",
1645
+ "properties": {
1646
+ "declaration": {
1647
+ "$ref": "#/$defs/Declaration"
1648
+ },
1649
+ "spec": {
1650
+ "type": "string"
1651
+ }
1652
+ },
1653
+ "required": [
1654
+ "declaration",
1655
+ "spec"
1656
+ ]
1657
+ },
1658
+ "RewriteParams": {
1659
+ "description": "RewriteParams asks a plugin to change declared specs in place.",
1660
+ "type": "object",
1661
+ "properties": {
1662
+ "changes": {
1663
+ "type": "array",
1664
+ "items": {
1665
+ "$ref": "#/$defs/Rewrite"
1666
+ }
1667
+ }
1668
+ },
1669
+ "required": [
1670
+ "changes"
1671
+ ]
1672
+ },
1673
+ "Role": {
1674
+ "description": "Role is a part a plugin plays in a project's make-up: its level. Some levels are exclusive (one plugin per project, or per slot) and the others additive (any number, and they only add).",
1675
+ "type": "string",
1676
+ "enum": [
1677
+ "language",
1678
+ "toolchain",
1679
+ "structure",
1680
+ "scaffold",
1681
+ "deploy"
1682
+ ],
1683
+ "x-enumDescriptions": {
1684
+ "language": "Finds projects from manifests, turns imports into graph edges, writes versions and publishes.",
1685
+ "toolchain": "Decides how a project builds, tests and lints.",
1686
+ "structure": "Checks layout and code rules.",
1687
+ "scaffold": "Writes a new project's starter files.",
1688
+ "deploy": "Adds pipeline steps and deploy targets."
1689
+ }
1690
+ },
1691
+ "Stack": {
1692
+ "description": "Stack is a named set of plugins a project is built with: one language plugin, and the toolchain, structure, scaffold and deploy plugins on top. Plugins are named, never assumed to be built in.",
1693
+ "type": "object",
1694
+ "properties": {
1695
+ "name": {
1696
+ "type": "string"
1697
+ },
1698
+ "description": {
1699
+ "type": "string"
1700
+ },
1701
+ "language": {
1702
+ "type": "string",
1703
+ "description": "Language is the language plugin that discovers the stack's projects."
1704
+ },
1705
+ "toolchain": {
1706
+ "type": "array",
1707
+ "items": {
1708
+ "type": "string"
1709
+ },
1710
+ "description": "Toolchain plugins decide how projects build, test and lint, in order: a later one may replace a task an earlier one added."
1711
+ },
1712
+ "structure": {
1713
+ "type": "array",
1714
+ "items": {
1715
+ "type": "string"
1716
+ }
1717
+ },
1718
+ "scaffold": {
1719
+ "type": "string",
1720
+ "description": "Scaffold generates new projects; empty means the language plugin does."
1721
+ },
1722
+ "deploy": {
1723
+ "type": "array",
1724
+ "items": {
1725
+ "type": "string"
1726
+ }
1727
+ }
1728
+ },
1729
+ "required": [
1730
+ "name",
1731
+ "language"
1732
+ ]
1733
+ },
1734
+ "Step": {
1735
+ "description": "Step is one command a CI phase runs.",
1736
+ "type": "object",
1737
+ "properties": {
1738
+ "name": {
1739
+ "type": "string"
1740
+ },
1741
+ "command": {
1742
+ "type": "array",
1743
+ "items": {
1744
+ "type": "string"
1745
+ }
1746
+ },
1747
+ "dir": {
1748
+ "type": "string",
1749
+ "description": "Dir is the workspace-relative directory to run in; empty means the workspace root."
1750
+ },
1751
+ "blocking": {
1752
+ "type": "boolean",
1753
+ "description": "Blocking false makes a failure a warning instead of an error."
1754
+ },
1755
+ "cacheFiles": {
1756
+ "type": "array",
1757
+ "items": {
1758
+ "type": "string"
1759
+ },
1760
+ "description": "CacheFiles are workspace-relative files whose content decides what an audit step finds (a lockfile). When any exists, smith remembers a passing run per content of these files and per day, in the task cache, and skips the step while both are unchanged; a failing run is always repeated. Only the audit phase reads it."
1761
+ }
1762
+ },
1763
+ "required": [
1764
+ "name",
1765
+ "command",
1766
+ "blocking"
1767
+ ]
1768
+ },
1769
+ "Task": {
1770
+ "description": "Task is a command the host can run, hash and cache.",
1771
+ "type": "object",
1772
+ "properties": {
1773
+ "command": {
1774
+ "type": "array",
1775
+ "items": {
1776
+ "type": "string"
1777
+ },
1778
+ "description": "Command is an argv array; it is never passed through a shell."
1779
+ },
1780
+ "cwd": {
1781
+ "type": "string",
1782
+ "description": "Cwd is workspace-relative; empty means the project root."
1783
+ },
1784
+ "env": {
1785
+ "type": "object",
1786
+ "additionalProperties": {
1787
+ "type": "string"
1788
+ }
1789
+ },
1790
+ "inputs": {
1791
+ "type": "array",
1792
+ "items": {
1793
+ "type": "string"
1794
+ },
1795
+ "description": "Inputs are globs relative to the project root. Empty means every tracked or untracked-but-not-ignored file of the project."
1796
+ },
1797
+ "outputs": {
1798
+ "type": "array",
1799
+ "items": {
1800
+ "type": "string"
1801
+ },
1802
+ "description": "Outputs are directories relative to the project root, restored on a cache hit."
1803
+ },
1804
+ "dependsOn": {
1805
+ "type": "array",
1806
+ "items": {
1807
+ "type": "string"
1808
+ },
1809
+ "description": "DependsOn lists task names: \"build\" runs this project's build first, \"^build\" runs the build of every project this one imports first."
1810
+ },
1811
+ "cache": {
1812
+ "type": "boolean"
1813
+ },
1814
+ "description": {
1815
+ "type": "string",
1816
+ "description": "Description is shown by `smith explain` and the TUI."
1817
+ },
1818
+ "verify": {
1819
+ "type": "boolean",
1820
+ "description": "Verify asks CI's verify phase (smith ci verify) to run the task too, after lint, typecheck, test and build, for the affected projects that have it: an app's container image, so a broken Dockerfile fails the pull request, not the release. It is skipped, with a warning, where its program is not installed."
1821
+ },
1822
+ "serve": {
1823
+ "type": "string",
1824
+ "description": "Serve names a task (\"web:start\", or \"start\" in the same project) that smith starts before this one and stops after it, whatever the result: the app an end-to-end suite tests. Its own dependsOn run first."
1825
+ },
1826
+ "serveUrl": {
1827
+ "type": "string",
1828
+ "description": "ServeURL is what smith waits for (an HTTP 2xx) before it runs the task, and passes to it as E2E_BASE_URL. Empty: the task starts at once."
1829
+ },
1830
+ "serveTimeout": {
1831
+ "type": "string",
1832
+ "description": "ServeTimeout is how long to wait for ServeURL, as a Go duration (\"60s\"); empty means 60s."
1833
+ }
1834
+ },
1835
+ "required": [
1836
+ "command"
1837
+ ]
1838
+ },
1839
+ "ToolPin": {
1840
+ "description": "ToolPin is a tool the plugin installs at a pinned version (in CI, the dev container, the venv) against the newest release; informational.",
1841
+ "type": "object",
1842
+ "properties": {
1843
+ "name": {
1844
+ "type": "string"
1845
+ },
1846
+ "pinned": {
1847
+ "type": "string"
1848
+ },
1849
+ "latest": {
1850
+ "type": "string",
1851
+ "description": "Latest is empty when its release feed could not be reached."
1852
+ },
1853
+ "newer": {
1854
+ "type": "boolean",
1855
+ "description": "Newer is true when Latest is a release the pin does not cover."
1856
+ }
1857
+ },
1858
+ "required": [
1859
+ "name",
1860
+ "pinned"
1861
+ ]
1862
+ },
1863
+ "Toolchain": {
1864
+ "description": "Toolchain is a runtime the pipeline must install, and how. Plugins asking for the same name share one setup step (the first plugin's).",
1865
+ "type": "object",
1866
+ "properties": {
1867
+ "name": {
1868
+ "type": "string"
1869
+ },
1870
+ "version": {
1871
+ "type": "string"
1872
+ },
1873
+ "github": {
1874
+ "$ref": "#/$defs/ActionStep",
1875
+ "description": "GitHub is the GitHub Actions step that installs it (an action)."
1876
+ },
1877
+ "azure": {
1878
+ "$ref": "#/$defs/ActionStep",
1879
+ "description": "Azure is the Azure Pipelines step that installs it (a task)."
1880
+ },
1881
+ "install": {
1882
+ "type": "string",
1883
+ "description": "Install is a shell command that installs it, run on a provider the plugin gives no native step for."
1884
+ },
1885
+ "devcontainer": {
1886
+ "$ref": "#/$defs/DevcontainerFeature",
1887
+ "description": "Devcontainer is the dev container feature that installs it at the same version, so the editor's container matches CI."
1888
+ }
1889
+ },
1890
+ "required": [
1891
+ "name",
1892
+ "version"
1893
+ ]
1894
+ },
1895
+ "UninstallParams": {
1896
+ "description": "UninstallParams asks a plugin to remove packages from one of its projects.",
1897
+ "type": "object",
1898
+ "properties": {
1899
+ "project": {
1900
+ "$ref": "#/$defs/Project"
1901
+ },
1902
+ "packages": {
1903
+ "type": "array",
1904
+ "items": {
1905
+ "type": "string"
1906
+ }
1907
+ }
1908
+ },
1909
+ "required": [
1910
+ "project",
1911
+ "packages"
1912
+ ]
1913
+ },
1914
+ "VersionParams": {
1915
+ "description": "VersionParams asks a plugin to record a new version in a project manifest.",
1916
+ "type": "object",
1917
+ "properties": {
1918
+ "project": {
1919
+ "$ref": "#/$defs/Project"
1920
+ },
1921
+ "version": {
1922
+ "type": "string"
1923
+ },
1924
+ "dependencies": {
1925
+ "type": "object",
1926
+ "additionalProperties": {
1927
+ "type": "string"
1928
+ },
1929
+ "description": "Dependencies maps exported identifiers of other workspace projects to their new versions, so the plugin can update dependency ranges."
1930
+ },
1931
+ "dryRun": {
1932
+ "type": "boolean"
1933
+ }
1934
+ },
1935
+ "required": [
1936
+ "project",
1937
+ "version"
1938
+ ]
1939
+ },
1940
+ "VersionResult": {
1941
+ "description": "VersionResult lists the files that were (or, in a dry run, would be) changed.",
1942
+ "type": "object",
1943
+ "properties": {
1944
+ "files": {
1945
+ "type": "array",
1946
+ "items": {
1947
+ "type": "string"
1948
+ }
1949
+ }
1950
+ },
1951
+ "required": [
1952
+ "files"
1953
+ ]
1954
+ },
1955
+ "WorkspaceInfo": {
1956
+ "description": "WorkspaceInfo is the subset of workspace settings plugins may use.",
1957
+ "type": "object",
1958
+ "properties": {
1959
+ "name": {
1960
+ "type": "string"
1961
+ },
1962
+ "scope": {
1963
+ "type": "string",
1964
+ "description": "Scope is the npm scope for packages, with its @ (e.g. \"@acme\")."
1965
+ },
1966
+ "modulePrefix": {
1967
+ "type": "string",
1968
+ "description": "ModulePrefix is the Go module path prefix, e.g. github.com/acme/repo."
1969
+ }
1970
+ },
1971
+ "required": [
1972
+ "name"
1973
+ ]
1974
+ }
1975
+ }
1976
+ };