@monosmith/plugin-sdk 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/protocol/protocol-schema.contract.js +836 -2
- package/protocol/protocol-types.contract.d.ts +639 -1
- package/scaffold/index.d.ts +1 -1
- package/scaffold/index.js +1 -1
- package/scaffold/scaffold-project.use-case.js +1 -1
- package/serve/index.d.ts +1 -1
- package/serve/plugin-members.config.js +5 -0
- package/serve/plugin.contract.d.ts +19 -2
- /package/scaffold/{scaffold-data.mapper.d.ts → template-fields.mapper.d.ts} +0 -0
- /package/scaffold/{scaffold-data.mapper.js → template-fields.mapper.js} +0 -0
|
@@ -175,6 +175,28 @@ export const protocolSchema = {
|
|
|
175
175
|
"capability": "dependencies",
|
|
176
176
|
"notification": false
|
|
177
177
|
},
|
|
178
|
+
"dependencies/link": {
|
|
179
|
+
"description": "Makes a project depend on a library of the same workspace and language, in the ecosystem's own form, then installs or locks as that needs.",
|
|
180
|
+
"params": {
|
|
181
|
+
"$ref": "#/$defs/LinkParams"
|
|
182
|
+
},
|
|
183
|
+
"result": {
|
|
184
|
+
"$ref": "#/$defs/LinkResult"
|
|
185
|
+
},
|
|
186
|
+
"capability": "link",
|
|
187
|
+
"notification": false
|
|
188
|
+
},
|
|
189
|
+
"dependencies/unlink": {
|
|
190
|
+
"description": "Removes the dependency of a project on a library of the same workspace.",
|
|
191
|
+
"params": {
|
|
192
|
+
"$ref": "#/$defs/UnlinkParams"
|
|
193
|
+
},
|
|
194
|
+
"result": {
|
|
195
|
+
"$ref": "#/$defs/DependencyResult"
|
|
196
|
+
},
|
|
197
|
+
"capability": "link",
|
|
198
|
+
"notification": false
|
|
199
|
+
},
|
|
178
200
|
"dependencies/declared": {
|
|
179
201
|
"description": "Lists the dependencies the manifests of the plugin's projects declare.",
|
|
180
202
|
"params": {
|
|
@@ -207,6 +229,39 @@ export const protocolSchema = {
|
|
|
207
229
|
},
|
|
208
230
|
"capability": "latest",
|
|
209
231
|
"notification": false
|
|
232
|
+
},
|
|
233
|
+
"sbom/components": {
|
|
234
|
+
"description": "Asks which components a project ships (its locked dependencies, read from a lockfile where the ecosystem has one and from the manifest otherwise), as package URLs, for the SBOM a release attaches.",
|
|
235
|
+
"params": {
|
|
236
|
+
"$ref": "#/$defs/ComponentsParams"
|
|
237
|
+
},
|
|
238
|
+
"result": {
|
|
239
|
+
"$ref": "#/$defs/ComponentsResult"
|
|
240
|
+
},
|
|
241
|
+
"capability": "components",
|
|
242
|
+
"notification": false
|
|
243
|
+
},
|
|
244
|
+
"derive": {
|
|
245
|
+
"description": "Asks which files a plugin derives from facts and the project graph (a tsconfig's references, a test config's display name). The plugin writes nothing: it answers with the content, and the host rewrites a file only when its ownership record allows.",
|
|
246
|
+
"params": {
|
|
247
|
+
"$ref": "#/$defs/DeriveParams"
|
|
248
|
+
},
|
|
249
|
+
"result": {
|
|
250
|
+
"$ref": "#/$defs/DeriveResult"
|
|
251
|
+
},
|
|
252
|
+
"capability": "derive",
|
|
253
|
+
"notification": false
|
|
254
|
+
},
|
|
255
|
+
"api/surface": {
|
|
256
|
+
"description": "Asks for the public API names of a project, at the working tree or at a git revision (its last release tag), so a release can compare them and say what bump the change needs.",
|
|
257
|
+
"params": {
|
|
258
|
+
"$ref": "#/$defs/APISurfaceParams"
|
|
259
|
+
},
|
|
260
|
+
"result": {
|
|
261
|
+
"$ref": "#/$defs/APISurfaceResult"
|
|
262
|
+
},
|
|
263
|
+
"capability": "apiSurface",
|
|
264
|
+
"notification": false
|
|
210
265
|
}
|
|
211
266
|
},
|
|
212
267
|
"x-errorCodes": [
|
|
@@ -287,6 +342,42 @@ export const protocolSchema = {
|
|
|
287
342
|
}
|
|
288
343
|
],
|
|
289
344
|
"$defs": {
|
|
345
|
+
"APISurfaceParams": {
|
|
346
|
+
"description": "APISurfaceParams asks a plugin for the public API names of one project.",
|
|
347
|
+
"type": "object",
|
|
348
|
+
"properties": {
|
|
349
|
+
"project": {
|
|
350
|
+
"$ref": "#/$defs/Project"
|
|
351
|
+
},
|
|
352
|
+
"ref": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"description": "Ref is the git revision to read the project at (the tag of its last release). Empty means the working tree."
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"required": [
|
|
358
|
+
"project"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"APISurfaceResult": {
|
|
362
|
+
"description": "APISurfaceResult is the public API of a project: the names its entry points export. A host compares the names of two revisions; it never reads their meaning, so a plugin chooses its own spelling and keeps it stable.",
|
|
363
|
+
"type": "object",
|
|
364
|
+
"properties": {
|
|
365
|
+
"names": {
|
|
366
|
+
"type": "array",
|
|
367
|
+
"items": {
|
|
368
|
+
"type": "string"
|
|
369
|
+
},
|
|
370
|
+
"description": "Names are the exported names, sorted. A name an entry point other than the main one exports is prefixed with that entry point and a colon (\"./cli:run\"). An empty list is an answer: the project exports nothing."
|
|
371
|
+
},
|
|
372
|
+
"unreadable": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"description": "Unreadable says why the API could not be listed (no entry point, no source at the revision). When set, Names is empty and the host skips the project without a warning."
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"required": [
|
|
378
|
+
"names"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
290
381
|
"ActionStep": {
|
|
291
382
|
"description": "ActionStep is a provider-native step: a GitHub action or an Azure task, with its inputs in the order they are written.",
|
|
292
383
|
"type": "object",
|
|
@@ -520,6 +611,10 @@ export const protocolSchema = {
|
|
|
520
611
|
"type": "boolean",
|
|
521
612
|
"description": "Dependencies installs and uninstalls packages in its projects."
|
|
522
613
|
},
|
|
614
|
+
"link": {
|
|
615
|
+
"type": "boolean",
|
|
616
|
+
"description": "Link makes a project depend on a library of the same workspace in the ecosystem's own form (a workspace dependency, a path dependency, a project reference), and takes it out again. A plugin without it is refused by the host with one sentence that tells the user to add the dependency by hand."
|
|
617
|
+
},
|
|
523
618
|
"declarations": {
|
|
524
619
|
"type": "boolean",
|
|
525
620
|
"description": "Declarations lists and rewrites declared dependency specs (sync, up)."
|
|
@@ -531,6 +626,30 @@ export const protocolSchema = {
|
|
|
531
626
|
"cancel": {
|
|
532
627
|
"type": "boolean",
|
|
533
628
|
"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."
|
|
629
|
+
},
|
|
630
|
+
"components": {
|
|
631
|
+
"type": "boolean",
|
|
632
|
+
"description": "Components lists a project's dependencies for its SBOM."
|
|
633
|
+
},
|
|
634
|
+
"derive": {
|
|
635
|
+
"type": "boolean",
|
|
636
|
+
"description": "Derive says which files the plugin derives from facts and the project graph (smith derive)."
|
|
637
|
+
},
|
|
638
|
+
"apiSurface": {
|
|
639
|
+
"type": "boolean",
|
|
640
|
+
"description": "APISurface lists the names a project exports, at a git revision, so a release can warn when the commits ask for a smaller bump than the API change needs."
|
|
641
|
+
},
|
|
642
|
+
"channels": {
|
|
643
|
+
"type": "boolean",
|
|
644
|
+
"description": "Channels says a prerelease version the plugin publishes never takes the place of the stable one: the plugin publishes under PublishParams.Tag, a release channel's name, without moving the registry's stable pointer (npm's latest), or its registry orders a prerelease below the release (PyPI, NuGet) and needs no tag. A host does not publish a package of a release channel with a plugin that lacks it."
|
|
645
|
+
},
|
|
646
|
+
"packs": {
|
|
647
|
+
"type": "boolean",
|
|
648
|
+
"description": "Packs says publish honours PublishParams.PackDir: it writes the package file and publishes nowhere (registry = \"github-release\"). A host never calls publish with the setting on a plugin that lacks it, since the plugin would publish to the public registry."
|
|
649
|
+
},
|
|
650
|
+
"declared": {
|
|
651
|
+
"type": "boolean",
|
|
652
|
+
"description": "Declared says the plugin describes the projects smith.toml declares for its language (DiscoverParams.declared): folders with no manifest of their own. A plugin without it finds a project by its manifest only, and the host refuses a declaration for its language with a message that says so."
|
|
534
653
|
}
|
|
535
654
|
}
|
|
536
655
|
},
|
|
@@ -588,6 +707,143 @@ export const protocolSchema = {
|
|
|
588
707
|
}
|
|
589
708
|
}
|
|
590
709
|
},
|
|
710
|
+
"Choice": {
|
|
711
|
+
"description": "Choice is one option on an axis of a project's make-up: a framework, a test runner, a style library. A plugin publishes the choices it owns in InitializeResult.Choices; the host checks a selection of them (smith add --with react,vitest,bootstrap) and turns it into a stack. What a choice writes (dependencies, tasks, files) stays with the plugin: the host never sees it.",
|
|
712
|
+
"type": "object",
|
|
713
|
+
"properties": {
|
|
714
|
+
"axis": {
|
|
715
|
+
"type": "string",
|
|
716
|
+
"description": "Axis is the question the choice answers: \"framework\", \"test\", \"style\", \"lint\". The plugins agree on the name; the host only compares it."
|
|
717
|
+
},
|
|
718
|
+
"name": {
|
|
719
|
+
"type": "string",
|
|
720
|
+
"description": "Name identifies the choice in a selection and is unique among the choices of all loaded plugins."
|
|
721
|
+
},
|
|
722
|
+
"description": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
},
|
|
725
|
+
"title": {
|
|
726
|
+
"type": "string",
|
|
727
|
+
"description": "Title is the name shown to a person (\"Electron\" for electron). Without it the name is shown."
|
|
728
|
+
},
|
|
729
|
+
"aliases": {
|
|
730
|
+
"type": "array",
|
|
731
|
+
"items": {
|
|
732
|
+
"type": "string"
|
|
733
|
+
},
|
|
734
|
+
"description": "Aliases are words that find the choice when a person searches the catalogue (smith compose): \"desktop\", \"serverless\", \"web\"."
|
|
735
|
+
},
|
|
736
|
+
"layer": {
|
|
737
|
+
"type": "string",
|
|
738
|
+
"description": "Layer is where the choice sits in the stack of a project: \"framework\", \"shell\" (a desktop shell), \"host\" (where cloud code runs), \"test\", \"lint\", \"style\" or a layer of the plugin's own. Without it the layer is the axis. It is for display and grouping: the axis decides conflicts."
|
|
739
|
+
},
|
|
740
|
+
"language": {
|
|
741
|
+
"type": "string",
|
|
742
|
+
"description": "Language is the language plugin the choice applies to (\"node\")."
|
|
743
|
+
},
|
|
744
|
+
"roles": {
|
|
745
|
+
"type": "array",
|
|
746
|
+
"items": {
|
|
747
|
+
"$ref": "#/$defs/Role"
|
|
748
|
+
},
|
|
749
|
+
"description": "Roles are the roles the choice's plugin plays in a stack built from it: scaffold (it writes the project) and/or toolchain (it joins the toolchain). Empty means it only adds to what a plugin of the selection already writes, as a style does."
|
|
750
|
+
},
|
|
751
|
+
"needs": {
|
|
752
|
+
"type": "array",
|
|
753
|
+
"items": {
|
|
754
|
+
"type": "string"
|
|
755
|
+
},
|
|
756
|
+
"description": "Needs are axes that the selection must have a choice on. An axis the person leaves out is filled with the default of the axis."
|
|
757
|
+
},
|
|
758
|
+
"default": {
|
|
759
|
+
"type": "boolean",
|
|
760
|
+
"description": "Default marks the choice the host adds when a selection needs its axis and has no choice on it."
|
|
761
|
+
},
|
|
762
|
+
"suggested": {
|
|
763
|
+
"type": "boolean",
|
|
764
|
+
"description": "Suggested marks the choice an asker pre-selects on its axis. The solver never adds it by itself: an axis that a choice needs and that has no Default is asked, and the person answers (ADR 0072)."
|
|
765
|
+
},
|
|
766
|
+
"many": {
|
|
767
|
+
"type": "boolean",
|
|
768
|
+
"description": "Many allows the choice next to other choices of its axis that are Many too. By default a selection has one choice per axis."
|
|
769
|
+
},
|
|
770
|
+
"requires": {
|
|
771
|
+
"type": "array",
|
|
772
|
+
"items": {
|
|
773
|
+
"type": "string"
|
|
774
|
+
},
|
|
775
|
+
"description": "Requires are choices that must be in the selection."
|
|
776
|
+
},
|
|
777
|
+
"conflicts": {
|
|
778
|
+
"type": "array",
|
|
779
|
+
"items": {
|
|
780
|
+
"type": "string"
|
|
781
|
+
},
|
|
782
|
+
"description": "Conflicts are choices that must not be in the selection."
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"required": [
|
|
786
|
+
"axis",
|
|
787
|
+
"name",
|
|
788
|
+
"language"
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
"Component": {
|
|
792
|
+
"description": "Component is one dependency of a project.",
|
|
793
|
+
"type": "object",
|
|
794
|
+
"properties": {
|
|
795
|
+
"name": {
|
|
796
|
+
"type": "string"
|
|
797
|
+
},
|
|
798
|
+
"version": {
|
|
799
|
+
"type": "string",
|
|
800
|
+
"description": "Version is the locked version, or the declared range when the project has no lockfile."
|
|
801
|
+
},
|
|
802
|
+
"purl": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"description": "PURL is the package URL (https://github.com/package-url/purl-spec)."
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"required": [
|
|
808
|
+
"name",
|
|
809
|
+
"purl"
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
"ComponentsParams": {
|
|
813
|
+
"description": "ComponentsParams asks a plugin for the components one of its projects ships: what a CycloneDX SBOM lists.",
|
|
814
|
+
"type": "object",
|
|
815
|
+
"properties": {
|
|
816
|
+
"project": {
|
|
817
|
+
"$ref": "#/$defs/Project"
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
"required": [
|
|
821
|
+
"project"
|
|
822
|
+
]
|
|
823
|
+
},
|
|
824
|
+
"ComponentsResult": {
|
|
825
|
+
"description": "ComponentsResult lists the components, read from a lockfile where the ecosystem has one and from the manifest otherwise. An empty list is an answer: the project declares no dependencies.",
|
|
826
|
+
"type": "object",
|
|
827
|
+
"properties": {
|
|
828
|
+
"components": {
|
|
829
|
+
"type": "array",
|
|
830
|
+
"items": {
|
|
831
|
+
"$ref": "#/$defs/Component"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"source": {
|
|
835
|
+
"type": "string",
|
|
836
|
+
"description": "Source is the workspace-relative file the list was read from, \"\" when the project has none."
|
|
837
|
+
},
|
|
838
|
+
"purl": {
|
|
839
|
+
"type": "string",
|
|
840
|
+
"description": "PURL is the project's own package URL when it has a registry identity (without a version: the release supplies it); \"\" otherwise."
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"required": [
|
|
844
|
+
"components"
|
|
845
|
+
]
|
|
846
|
+
},
|
|
591
847
|
"ContributeParams": {
|
|
592
848
|
"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.",
|
|
593
849
|
"type": "object",
|
|
@@ -646,6 +902,10 @@ export const protocolSchema = {
|
|
|
646
902
|
"release": {
|
|
647
903
|
"$ref": "#/$defs/ReleaseDefaults",
|
|
648
904
|
"description": "Release is how the project's release files are made, for a project that releases through GitHub releases and leaves them out of its smith.toml [projects.<name>.release] table; what the table sets wins."
|
|
905
|
+
},
|
|
906
|
+
"facts": {
|
|
907
|
+
"type": "object",
|
|
908
|
+
"description": "Facts are the plugin's default facts for the project: typed values under namespaced keys ({\"source.roots\": [\"src\"]}) that other settings and plugins read through the merged Project.Facts. They are the lowest scope: a [facts] table in smith.toml wins over them, and two plugins that publish different values for one key are an error that names both."
|
|
649
909
|
}
|
|
650
910
|
}
|
|
651
911
|
},
|
|
@@ -734,6 +994,28 @@ export const protocolSchema = {
|
|
|
734
994
|
"projects"
|
|
735
995
|
]
|
|
736
996
|
},
|
|
997
|
+
"DeclaredProject": {
|
|
998
|
+
"description": "DeclaredProject is a project smith.toml declares: a folder with no manifest.",
|
|
999
|
+
"type": "object",
|
|
1000
|
+
"properties": {
|
|
1001
|
+
"name": {
|
|
1002
|
+
"type": "string",
|
|
1003
|
+
"description": "Name is the project's name, the key of its [projects.<name>] table."
|
|
1004
|
+
},
|
|
1005
|
+
"root": {
|
|
1006
|
+
"type": "string",
|
|
1007
|
+
"description": "Root is the workspace-relative folder."
|
|
1008
|
+
},
|
|
1009
|
+
"kind": {
|
|
1010
|
+
"$ref": "#/$defs/ProjectKind",
|
|
1011
|
+
"description": "Kind is \"app\", \"lib\" or \"package\", or empty for the plugin's choice."
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
"required": [
|
|
1015
|
+
"name",
|
|
1016
|
+
"root"
|
|
1017
|
+
]
|
|
1018
|
+
},
|
|
737
1019
|
"DeclaredResult": {
|
|
738
1020
|
"description": "DeclaredResult is every declaration, and the version installed of each name where the plugin can tell.",
|
|
739
1021
|
"type": "object",
|
|
@@ -773,6 +1055,114 @@ export const protocolSchema = {
|
|
|
773
1055
|
}
|
|
774
1056
|
}
|
|
775
1057
|
},
|
|
1058
|
+
"DeriveParams": {
|
|
1059
|
+
"description": "DeriveParams asks a plugin for the files it can derive from facts and the project graph. The plugin writes nothing: it answers with the content, and the host decides, from its ownership record, whether to write it.",
|
|
1060
|
+
"type": "object",
|
|
1061
|
+
"properties": {
|
|
1062
|
+
"projects": {
|
|
1063
|
+
"type": "array",
|
|
1064
|
+
"items": {
|
|
1065
|
+
"$ref": "#/$defs/Project"
|
|
1066
|
+
},
|
|
1067
|
+
"description": "Projects are the projects the plugin serves."
|
|
1068
|
+
},
|
|
1069
|
+
"graph": {
|
|
1070
|
+
"type": "object",
|
|
1071
|
+
"additionalProperties": {
|
|
1072
|
+
"type": "array",
|
|
1073
|
+
"items": {
|
|
1074
|
+
"type": "string"
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
"description": "Graph maps a project name to the names of the projects it depends on inside the workspace, sorted. The host resolved these edges: a plugin does not repeat that work."
|
|
1078
|
+
},
|
|
1079
|
+
"owned": {
|
|
1080
|
+
"type": "array",
|
|
1081
|
+
"items": {
|
|
1082
|
+
"type": "string"
|
|
1083
|
+
},
|
|
1084
|
+
"description": "Owned are the workspace-relative paths the host's ownership record says smith owns. A plugin proposes such a file again even when it is missing on disk, so deleting a derived file and deriving restores it. A file that is not owned and not on disk is not proposed."
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
"required": [
|
|
1088
|
+
"projects"
|
|
1089
|
+
]
|
|
1090
|
+
},
|
|
1091
|
+
"DeriveResult": {
|
|
1092
|
+
"description": "DeriveResult carries the files a plugin derives.",
|
|
1093
|
+
"type": "object",
|
|
1094
|
+
"properties": {
|
|
1095
|
+
"files": {
|
|
1096
|
+
"type": "array",
|
|
1097
|
+
"items": {
|
|
1098
|
+
"$ref": "#/$defs/DerivedFile"
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
"diverging": {
|
|
1102
|
+
"type": "array",
|
|
1103
|
+
"items": {
|
|
1104
|
+
"$ref": "#/$defs/DivergentFile"
|
|
1105
|
+
},
|
|
1106
|
+
"description": "Diverging are files a renderer looked at and left alone because they differ from the shape their siblings share. They are not drift: the project owns them. The host shows them in `smith derive --explain` and in the doctor, and never writes them."
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1109
|
+
"required": [
|
|
1110
|
+
"files"
|
|
1111
|
+
]
|
|
1112
|
+
},
|
|
1113
|
+
"DerivedFile": {
|
|
1114
|
+
"description": "DerivedFile is the content one renderer derives for one file.",
|
|
1115
|
+
"type": "object",
|
|
1116
|
+
"properties": {
|
|
1117
|
+
"project": {
|
|
1118
|
+
"type": "string",
|
|
1119
|
+
"description": "Project is the project the file belongs to."
|
|
1120
|
+
},
|
|
1121
|
+
"path": {
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"description": "Path is workspace-relative, with forward slashes."
|
|
1124
|
+
},
|
|
1125
|
+
"mode": {
|
|
1126
|
+
"type": "string",
|
|
1127
|
+
"description": "Mode is DeriveFile, DeriveRegion or DeriveKeys."
|
|
1128
|
+
},
|
|
1129
|
+
"renderer": {
|
|
1130
|
+
"type": "string",
|
|
1131
|
+
"description": "Renderer is the stable id of the renderer, for example \"node.tsconfig.references\". It names the region markers."
|
|
1132
|
+
},
|
|
1133
|
+
"version": {
|
|
1134
|
+
"type": "integer",
|
|
1135
|
+
"description": "Version is the renderer's version. A new version means new output for the same inputs, so the host rewrites an unedited file."
|
|
1136
|
+
},
|
|
1137
|
+
"content": {
|
|
1138
|
+
"type": "string",
|
|
1139
|
+
"description": "Content is the whole file (DeriveFile) or the lines of the region (DeriveRegion), without the markers. Unused for DeriveKeys."
|
|
1140
|
+
},
|
|
1141
|
+
"comment": {
|
|
1142
|
+
"type": "string",
|
|
1143
|
+
"description": "Comment is the line comment leader of the file (\"//\", \"#\"): the host writes a generated header after it in a DeriveFile. Empty for a format without comments, then the file has no header."
|
|
1144
|
+
},
|
|
1145
|
+
"format": {
|
|
1146
|
+
"type": "string",
|
|
1147
|
+
"description": "Format is \"json\" or \"toml\" for DeriveKeys."
|
|
1148
|
+
},
|
|
1149
|
+
"table": {
|
|
1150
|
+
"type": "string",
|
|
1151
|
+
"description": "Table is the TOML table that holds the keys (\"tool.smith\"); required for \"toml\", unused for \"json\", whose keys are the top-level ones."
|
|
1152
|
+
},
|
|
1153
|
+
"keys": {
|
|
1154
|
+
"type": "object",
|
|
1155
|
+
"description": "Keys are the owned keys and their values (DeriveKeys). A TOML value is a string, a number, a boolean or an array of those."
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
"required": [
|
|
1159
|
+
"project",
|
|
1160
|
+
"path",
|
|
1161
|
+
"mode",
|
|
1162
|
+
"renderer",
|
|
1163
|
+
"version"
|
|
1164
|
+
]
|
|
1165
|
+
},
|
|
776
1166
|
"DevcontainerFeature": {
|
|
777
1167
|
"description": "DevcontainerFeature is a dev container feature and its options (https://containers.dev/features).",
|
|
778
1168
|
"type": "object",
|
|
@@ -801,6 +1191,20 @@ export const protocolSchema = {
|
|
|
801
1191
|
"items": {
|
|
802
1192
|
"type": "string"
|
|
803
1193
|
}
|
|
1194
|
+
},
|
|
1195
|
+
"declared": {
|
|
1196
|
+
"type": "array",
|
|
1197
|
+
"items": {
|
|
1198
|
+
"$ref": "#/$defs/DeclaredProject"
|
|
1199
|
+
},
|
|
1200
|
+
"description": "Declared are the projects smith.toml declares for this plugin's language ([projects.<name>] with a root and a language): folders with no manifest of their own, such as a program that is a package of the Go module above it. The plugin describes each one in its result, or answers with an error saying why it cannot."
|
|
1201
|
+
},
|
|
1202
|
+
"settings": {
|
|
1203
|
+
"type": "object",
|
|
1204
|
+
"additionalProperties": {
|
|
1205
|
+
"type": "object"
|
|
1206
|
+
},
|
|
1207
|
+
"description": "Settings are this plugin's settings for projects, by project name, from smith.toml [projects.<project>.settings.<plugin>]. They reach the plugin here because the tasks it describes may depend on them (the Go plugin's build tags). A project with no settings is absent."
|
|
804
1208
|
}
|
|
805
1209
|
},
|
|
806
1210
|
"required": [
|
|
@@ -822,6 +1226,34 @@ export const protocolSchema = {
|
|
|
822
1226
|
"projects"
|
|
823
1227
|
]
|
|
824
1228
|
},
|
|
1229
|
+
"DivergentFile": {
|
|
1230
|
+
"description": "DivergentFile is a file a renderer does not derive because the project made it differ from its siblings.",
|
|
1231
|
+
"type": "object",
|
|
1232
|
+
"properties": {
|
|
1233
|
+
"project": {
|
|
1234
|
+
"type": "string",
|
|
1235
|
+
"description": "Project is the project the file belongs to."
|
|
1236
|
+
},
|
|
1237
|
+
"path": {
|
|
1238
|
+
"type": "string",
|
|
1239
|
+
"description": "Path is workspace-relative, with forward slashes."
|
|
1240
|
+
},
|
|
1241
|
+
"renderer": {
|
|
1242
|
+
"type": "string",
|
|
1243
|
+
"description": "Renderer is the stable id of the renderer that compared the file."
|
|
1244
|
+
},
|
|
1245
|
+
"detail": {
|
|
1246
|
+
"type": "string",
|
|
1247
|
+
"description": "Detail says in a sentence how the file differs from its siblings."
|
|
1248
|
+
}
|
|
1249
|
+
},
|
|
1250
|
+
"required": [
|
|
1251
|
+
"project",
|
|
1252
|
+
"path",
|
|
1253
|
+
"renderer",
|
|
1254
|
+
"detail"
|
|
1255
|
+
]
|
|
1256
|
+
},
|
|
825
1257
|
"DoctorParams": {
|
|
826
1258
|
"description": "DoctorParams gives the plugin its projects to check.",
|
|
827
1259
|
"type": "object",
|
|
@@ -875,15 +1307,28 @@ export const protocolSchema = {
|
|
|
875
1307
|
]
|
|
876
1308
|
},
|
|
877
1309
|
"Finding": {
|
|
878
|
-
"description": "Finding is one check. Every failed finding names its remedy.",
|
|
1310
|
+
"description": "Finding is one check. Every failed finding names its problem and its remedy.",
|
|
879
1311
|
"type": "object",
|
|
880
1312
|
"properties": {
|
|
881
1313
|
"check": {
|
|
882
|
-
"type": "string"
|
|
1314
|
+
"type": "string",
|
|
1315
|
+
"description": "Check is the rule, stated as it should hold (\"golangci-lint is 2.15.0, as in CI\"). A passing finding is listed by it."
|
|
883
1316
|
},
|
|
884
1317
|
"ok": {
|
|
885
1318
|
"type": "boolean"
|
|
886
1319
|
},
|
|
1320
|
+
"problem": {
|
|
1321
|
+
"type": "string",
|
|
1322
|
+
"description": "Problem is what is wrong, in one line (\"golangci-lint is 2.14.0, CI uses 2.15.0\"). A failed finding is listed by it; one without it is listed by its Check."
|
|
1323
|
+
},
|
|
1324
|
+
"project": {
|
|
1325
|
+
"type": "string",
|
|
1326
|
+
"description": "Project is the project the finding is about, as the workspace names it (\"web\"); empty for a finding about the workspace itself. The host files a finding under its project, so the Check, Problem and Detail need not name it."
|
|
1327
|
+
},
|
|
1328
|
+
"area": {
|
|
1329
|
+
"type": "string",
|
|
1330
|
+
"description": "Area is the part of the workspace a workspace-wide finding is about, in one lowercase word: \"toolchain\", \"ci\", \"lint\", \"dependencies\", \"release\", \"git\" or \"config\". A finding with a Project has none."
|
|
1331
|
+
},
|
|
887
1332
|
"detail": {
|
|
888
1333
|
"type": "string"
|
|
889
1334
|
},
|
|
@@ -977,6 +1422,10 @@ export const protocolSchema = {
|
|
|
977
1422
|
},
|
|
978
1423
|
"fix": {
|
|
979
1424
|
"$ref": "#/$defs/Fix"
|
|
1425
|
+
},
|
|
1426
|
+
"disabled": {
|
|
1427
|
+
"type": "string",
|
|
1428
|
+
"description": "Disabled, when not empty, is the reason the option cannot be picked: an interface shows the option greyed with the reason, and picking it is an error."
|
|
980
1429
|
}
|
|
981
1430
|
},
|
|
982
1431
|
"required": [
|
|
@@ -1002,6 +1451,13 @@ export const protocolSchema = {
|
|
|
1002
1451
|
"dir": {
|
|
1003
1452
|
"type": "string",
|
|
1004
1453
|
"description": "Dir is where it runs, workspace-relative; empty is the workspace root."
|
|
1454
|
+
},
|
|
1455
|
+
"env": {
|
|
1456
|
+
"type": "array",
|
|
1457
|
+
"items": {
|
|
1458
|
+
"type": "string"
|
|
1459
|
+
},
|
|
1460
|
+
"description": "Env are KEY=VALUE entries added to the environment of the command (GOBIN=<folder> makes go install write there). Absent adds none."
|
|
1005
1461
|
}
|
|
1006
1462
|
},
|
|
1007
1463
|
"required": [
|
|
@@ -1038,6 +1494,24 @@ export const protocolSchema = {
|
|
|
1038
1494
|
"settings": {
|
|
1039
1495
|
"type": "object",
|
|
1040
1496
|
"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."
|
|
1497
|
+
},
|
|
1498
|
+
"facts": {
|
|
1499
|
+
"type": "object",
|
|
1500
|
+
"description": "Facts are the shared facts that hold for the new project, from smith.toml: [projects.<name>.facts] over [facts]. A key that is absent was set by no one: the plugin scaffolds its own default. Set by the host; read only."
|
|
1501
|
+
},
|
|
1502
|
+
"shape": {
|
|
1503
|
+
"type": "object",
|
|
1504
|
+
"additionalProperties": {
|
|
1505
|
+
"type": "string"
|
|
1506
|
+
},
|
|
1507
|
+
"description": "Shape is the dialect the new project should have: the facts (see Project.Shape) that most projects of its kind and language agree on, as the host counted them. A plugin applies the keys it follows (see InitializeResult.Follows) and ignores the rest. Nil when there is nothing to follow, or the person asked for a fresh project."
|
|
1508
|
+
},
|
|
1509
|
+
"choices": {
|
|
1510
|
+
"type": "array",
|
|
1511
|
+
"items": {
|
|
1512
|
+
"type": "string"
|
|
1513
|
+
},
|
|
1514
|
+
"description": "Choices are the choices (see Choice) the new project is built from, the stack's Choices, in the order they apply: a choice comes after those it requires. A plugin applies the choices it owns and ignores the rest. Absent when the stack is not a selection. Set by the host; read only."
|
|
1041
1515
|
}
|
|
1042
1516
|
},
|
|
1043
1517
|
"required": [
|
|
@@ -1174,6 +1648,27 @@ export const protocolSchema = {
|
|
|
1174
1648
|
"$ref": "#/$defs/ProjectKind"
|
|
1175
1649
|
},
|
|
1176
1650
|
"description": "Kinds are the project kinds the plugin can scaffold with generate. Absent or empty means all three (app, lib and package): what every plugin that says nothing does. A plugin that scaffolds only some, such as an app, lists them, so the host offers and the conformance suite asks for just those."
|
|
1651
|
+
},
|
|
1652
|
+
"follows": {
|
|
1653
|
+
"type": "array",
|
|
1654
|
+
"items": {
|
|
1655
|
+
"type": "string"
|
|
1656
|
+
},
|
|
1657
|
+
"description": "Follows are the shape keys (see Project.Shape) the plugin applies when it generates a project with GenerateParams.Shape. Where siblings split on a key, the host asks the person only for a key that a plugin of the stack follows. Absent means the plugin follows none."
|
|
1658
|
+
},
|
|
1659
|
+
"choices": {
|
|
1660
|
+
"type": "array",
|
|
1661
|
+
"items": {
|
|
1662
|
+
"$ref": "#/$defs/Choice"
|
|
1663
|
+
},
|
|
1664
|
+
"description": "Choices are the options on an axis (framework, test, style) the plugin owns. The host lists them (smith choices) and checks a selection of them (smith add --with). Absent means the plugin owns none."
|
|
1665
|
+
},
|
|
1666
|
+
"tools": {
|
|
1667
|
+
"type": "array",
|
|
1668
|
+
"items": {
|
|
1669
|
+
"$ref": "#/$defs/ToolNeed"
|
|
1670
|
+
},
|
|
1671
|
+
"description": "Tools are the programs the plugin needs on the person's machine. The host detects them and, when one is missing, presents the ways to get it (smith tools). Absent means the plugin declares none."
|
|
1177
1672
|
}
|
|
1178
1673
|
},
|
|
1179
1674
|
"required": [
|
|
@@ -1270,6 +1765,94 @@ export const protocolSchema = {
|
|
|
1270
1765
|
}
|
|
1271
1766
|
}
|
|
1272
1767
|
},
|
|
1768
|
+
"LinkOption": {
|
|
1769
|
+
"description": "LinkOption is one way to write the dependency, with its consequence in words a person who read no manual can follow.",
|
|
1770
|
+
"type": "object",
|
|
1771
|
+
"properties": {
|
|
1772
|
+
"spec": {
|
|
1773
|
+
"type": "string",
|
|
1774
|
+
"description": "Spec is the value passed back in LinkParams.Spec."
|
|
1775
|
+
},
|
|
1776
|
+
"label": {
|
|
1777
|
+
"type": "string",
|
|
1778
|
+
"description": "Label is the option in a few words."
|
|
1779
|
+
},
|
|
1780
|
+
"meaning": {
|
|
1781
|
+
"type": "string",
|
|
1782
|
+
"description": "Meaning says what happens with this option."
|
|
1783
|
+
}
|
|
1784
|
+
},
|
|
1785
|
+
"required": [
|
|
1786
|
+
"spec",
|
|
1787
|
+
"label",
|
|
1788
|
+
"meaning"
|
|
1789
|
+
]
|
|
1790
|
+
},
|
|
1791
|
+
"LinkParams": {
|
|
1792
|
+
"description": "LinkParams asks a plugin to make Project depend on Library, a lib or package of the same workspace and language, in the ecosystem's own form, and to install or lock as that needs. The host has checked that both exist, that the languages match, that Library is not an app, and that the link makes no cycle; the plugin answers with an error that names the file when it cannot write the dependency.",
|
|
1793
|
+
"type": "object",
|
|
1794
|
+
"properties": {
|
|
1795
|
+
"project": {
|
|
1796
|
+
"$ref": "#/$defs/Project",
|
|
1797
|
+
"description": "Project is the project that gains the dependency."
|
|
1798
|
+
},
|
|
1799
|
+
"library": {
|
|
1800
|
+
"$ref": "#/$defs/Project",
|
|
1801
|
+
"description": "Library is the project it depends on."
|
|
1802
|
+
},
|
|
1803
|
+
"quiet": {
|
|
1804
|
+
"type": "boolean",
|
|
1805
|
+
"description": "Quiet keeps the package manager's output unless it fails."
|
|
1806
|
+
},
|
|
1807
|
+
"plan": {
|
|
1808
|
+
"type": "boolean",
|
|
1809
|
+
"description": "Plan asks for the plan only: the plugin writes nothing and answers with the manifest, the line it would write and the choices the user has."
|
|
1810
|
+
},
|
|
1811
|
+
"spec": {
|
|
1812
|
+
"type": "string",
|
|
1813
|
+
"description": "Spec is the version range the user chose from LinkResult.Options; empty means the plugin's default, or the form the workspace already uses."
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
"required": [
|
|
1817
|
+
"project",
|
|
1818
|
+
"library"
|
|
1819
|
+
]
|
|
1820
|
+
},
|
|
1821
|
+
"LinkResult": {
|
|
1822
|
+
"description": "LinkResult is what a link wrote, or with LinkParams.Plan would write.",
|
|
1823
|
+
"type": "object",
|
|
1824
|
+
"properties": {
|
|
1825
|
+
"files": {
|
|
1826
|
+
"type": "array",
|
|
1827
|
+
"items": {
|
|
1828
|
+
"type": "string"
|
|
1829
|
+
},
|
|
1830
|
+
"description": "Files are the workspace-relative files changed (or to be changed)."
|
|
1831
|
+
},
|
|
1832
|
+
"notes": {
|
|
1833
|
+
"type": "array",
|
|
1834
|
+
"items": {
|
|
1835
|
+
"type": "string"
|
|
1836
|
+
},
|
|
1837
|
+
"description": "Notes are for the user."
|
|
1838
|
+
},
|
|
1839
|
+
"manifest": {
|
|
1840
|
+
"type": "string",
|
|
1841
|
+
"description": "Manifest is the file the dependency goes into, workspace-relative."
|
|
1842
|
+
},
|
|
1843
|
+
"line": {
|
|
1844
|
+
"type": "string",
|
|
1845
|
+
"description": "Line is the dependency as it is written there, for the plan shown before anything is written (\"@acme/core\": \"*\")."
|
|
1846
|
+
},
|
|
1847
|
+
"options": {
|
|
1848
|
+
"type": "array",
|
|
1849
|
+
"items": {
|
|
1850
|
+
"$ref": "#/$defs/LinkOption"
|
|
1851
|
+
},
|
|
1852
|
+
"description": "Options are the real choices of the range written, with the default first. Empty when the ecosystem has none, or the workspace already follows a convention (then Line shows it)."
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
},
|
|
1273
1856
|
"PackageStore": {
|
|
1274
1857
|
"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.",
|
|
1275
1858
|
"type": "object",
|
|
@@ -1418,6 +2001,13 @@ export const protocolSchema = {
|
|
|
1418
2001
|
},
|
|
1419
2002
|
"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."
|
|
1420
2003
|
},
|
|
2004
|
+
"shape": {
|
|
2005
|
+
"type": "object",
|
|
2006
|
+
"additionalProperties": {
|
|
2007
|
+
"type": "string"
|
|
2008
|
+
},
|
|
2009
|
+
"description": "Shape is the dialect of the project: named facts about how it is made (\"build.tool\": \"esbuild\", \"test.runner\": \"@swc/jest\", \"exports.target\": \"dist\"), each a short string, read from the manifest and files the plugin already reads in discovery. The host counts the shapes of the projects of one kind and language to let a new project follow what they do, and knows no key itself. Nil when the plugin does not describe shapes."
|
|
2010
|
+
},
|
|
1421
2011
|
"registries": {
|
|
1422
2012
|
"$ref": "#/$defs/Registries",
|
|
1423
2013
|
"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."
|
|
@@ -1425,6 +2015,10 @@ export const protocolSchema = {
|
|
|
1425
2015
|
"releaseAssets": {
|
|
1426
2016
|
"$ref": "#/$defs/AssetSpec",
|
|
1427
2017
|
"description": "ReleaseAssets is what an app's release builds, from smith.toml [projects.<project>.release]: the platforms and file names, so a plugin can check (doctor) and prepare (CI) for them. Nil for a project that has no release files. Set by the host."
|
|
2018
|
+
},
|
|
2019
|
+
"facts": {
|
|
2020
|
+
"type": "object",
|
|
2021
|
+
"description": "Facts are the shared facts that hold for the project, merged by the host, narrowest scope first: [projects.<name>.facts], then [facts], then the defaults plugins published through Contribution.Facts. A key that is absent was set by no one: the plugin uses its own default. A request made before every plugin has contributed carries the smith.toml facts and the defaults published so far. Set by the host; read only."
|
|
1428
2022
|
}
|
|
1429
2023
|
},
|
|
1430
2024
|
"required": [
|
|
@@ -1474,6 +2068,25 @@ export const protocolSchema = {
|
|
|
1474
2068
|
},
|
|
1475
2069
|
"branch": {
|
|
1476
2070
|
"type": "string"
|
|
2071
|
+
},
|
|
2072
|
+
"tag": {
|
|
2073
|
+
"type": "string",
|
|
2074
|
+
"description": "Tag is the name of the release channel the version belongs to (npm's dist-tag \"beta\"). When set, the plugin publishes under it and leaves the registry's stable pointer where it is, or ignores it when its registry has no such pointer. Only sent to a plugin with the channels capability."
|
|
2075
|
+
},
|
|
2076
|
+
"propagationWait": {
|
|
2077
|
+
"type": "string",
|
|
2078
|
+
"description": "PropagationWait is the longest time a plugin waits, in a Finalize call, for the packages of the release to be fetchable from the registry: a duration such as \"15m\", \"0\" to not wait. Empty means the default. Only npm has such a wait. A publish never waits."
|
|
2079
|
+
},
|
|
2080
|
+
"packDir": {
|
|
2081
|
+
"type": "string",
|
|
2082
|
+
"description": "PackDir, when set, turns the call into a pack: the plugin writes the package file of the project's ecosystem (npm tarball, wheel and sdist, .nupkg, .gem, .crate) and returns the files in PublishResult.Assets, and publishes nothing anywhere. A workspace-relative folder. The host sends it only to a plugin with the packs capability. In a dry run the plugin lists the files it would write, writes none, and reads no registry."
|
|
2083
|
+
},
|
|
2084
|
+
"finalize": {
|
|
2085
|
+
"type": "array",
|
|
2086
|
+
"items": {
|
|
2087
|
+
"$ref": "#/$defs/TagMove"
|
|
2088
|
+
},
|
|
2089
|
+
"description": "Finalize turns the call into the last phase of a release: nothing is published; for each move the plugin waits until its packages are fetchable, then moves the dist-tag. The host sends it after every project has published, so a wait never blocks another publish."
|
|
1477
2090
|
}
|
|
1478
2091
|
},
|
|
1479
2092
|
"required": [
|
|
@@ -1494,6 +2107,27 @@ export const protocolSchema = {
|
|
|
1494
2107
|
"registry": {
|
|
1495
2108
|
"type": "string"
|
|
1496
2109
|
},
|
|
2110
|
+
"notes": {
|
|
2111
|
+
"type": "array",
|
|
2112
|
+
"items": {
|
|
2113
|
+
"type": "string"
|
|
2114
|
+
},
|
|
2115
|
+
"description": "Notes are things the person must know about a publish that succeeded, such as a dist-tag that was not moved; the host prints them and the report keeps them."
|
|
2116
|
+
},
|
|
2117
|
+
"pendingMoves": {
|
|
2118
|
+
"type": "array",
|
|
2119
|
+
"items": {
|
|
2120
|
+
"$ref": "#/$defs/TagMove"
|
|
2121
|
+
},
|
|
2122
|
+
"description": "PendingMoves are the dist-tags the call did not move, because the packages the release needs were not fetchable yet. A publish returns them for the host to move at the end of the release; a Finalize call returns the ones still waiting when its time ran out. The release then ends with a warning, never silently."
|
|
2123
|
+
},
|
|
2124
|
+
"moved": {
|
|
2125
|
+
"type": "array",
|
|
2126
|
+
"items": {
|
|
2127
|
+
"type": "string"
|
|
2128
|
+
},
|
|
2129
|
+
"description": "Moved names the dist-tags a Finalize call moved (\"name@version tag\")."
|
|
2130
|
+
},
|
|
1497
2131
|
"assets": {
|
|
1498
2132
|
"type": "array",
|
|
1499
2133
|
"items": {
|
|
@@ -1595,6 +2229,10 @@ export const protocolSchema = {
|
|
|
1595
2229
|
"noPublish": {
|
|
1596
2230
|
"type": "boolean",
|
|
1597
2231
|
"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)."
|
|
2232
|
+
},
|
|
2233
|
+
"packToRelease": {
|
|
2234
|
+
"type": "boolean",
|
|
2235
|
+
"description": "PackToRelease means smith.toml says registry = \"github-release\": the release packs the project into its ecosystem's package file and attaches it to the project's GitHub Release, publishing to no registry. The host sends PublishParams.PackDir to a plugin with the packs capability and never calls publish on one without it."
|
|
1598
2236
|
}
|
|
1599
2237
|
}
|
|
1600
2238
|
},
|
|
@@ -1853,6 +2491,13 @@ export const protocolSchema = {
|
|
|
1853
2491
|
"items": {
|
|
1854
2492
|
"type": "string"
|
|
1855
2493
|
}
|
|
2494
|
+
},
|
|
2495
|
+
"choices": {
|
|
2496
|
+
"type": "array",
|
|
2497
|
+
"items": {
|
|
2498
|
+
"type": "string"
|
|
2499
|
+
},
|
|
2500
|
+
"description": "Choices make the stack a saved selection (see Choice). When they are set, the host derives the language, the scaffold and the toolchain from them, and Toolchain lists only the plugins to add after those. The plugins of the stack get the choices in GenerateParams.Choices."
|
|
1856
2501
|
}
|
|
1857
2502
|
},
|
|
1858
2503
|
"required": [
|
|
@@ -1895,6 +2540,36 @@ export const protocolSchema = {
|
|
|
1895
2540
|
"blocking"
|
|
1896
2541
|
]
|
|
1897
2542
|
},
|
|
2543
|
+
"TagMove": {
|
|
2544
|
+
"description": "TagMove is a dist-tag a publish left where it was, because the packages the release needs were not fetchable yet.",
|
|
2545
|
+
"type": "object",
|
|
2546
|
+
"properties": {
|
|
2547
|
+
"package": {
|
|
2548
|
+
"type": "string",
|
|
2549
|
+
"description": "Package and Version name the package that carries the tag."
|
|
2550
|
+
},
|
|
2551
|
+
"version": {
|
|
2552
|
+
"type": "string"
|
|
2553
|
+
},
|
|
2554
|
+
"tag": {
|
|
2555
|
+
"type": "string",
|
|
2556
|
+
"description": "Tag is the dist-tag to move to Version."
|
|
2557
|
+
},
|
|
2558
|
+
"awaits": {
|
|
2559
|
+
"type": "array",
|
|
2560
|
+
"items": {
|
|
2561
|
+
"type": "string"
|
|
2562
|
+
},
|
|
2563
|
+
"description": "Awaits are the packages that must be fetchable first."
|
|
2564
|
+
}
|
|
2565
|
+
},
|
|
2566
|
+
"required": [
|
|
2567
|
+
"package",
|
|
2568
|
+
"version",
|
|
2569
|
+
"tag",
|
|
2570
|
+
"awaits"
|
|
2571
|
+
]
|
|
2572
|
+
},
|
|
1898
2573
|
"Task": {
|
|
1899
2574
|
"description": "Task is a command the host can run, hash and cache.",
|
|
1900
2575
|
"type": "object",
|
|
@@ -1965,6 +2640,132 @@ export const protocolSchema = {
|
|
|
1965
2640
|
"command"
|
|
1966
2641
|
]
|
|
1967
2642
|
},
|
|
2643
|
+
"ToolInstall": {
|
|
2644
|
+
"description": "ToolInstall is one way to get a tool with a package manager. Manager is one of: \"winget\", \"brew\", \"brew-cask\", \"apt\", \"dnf\", \"pacman\", \"npm\", \"uv\", \"fnm\", \"rustup\", \"cargo\" and \"go\" (go install, for a tool published as a Go module). The host builds the exact command from the manager and Package; Package may hold {major}, {major.minor} and {version} (the whole version), which the pinned or suggested version fills. The language's own installers (uv, fnm, rustup, cargo) are offered only when they are already on the machine.",
|
|
2645
|
+
"type": "object",
|
|
2646
|
+
"properties": {
|
|
2647
|
+
"manager": {
|
|
2648
|
+
"type": "string"
|
|
2649
|
+
},
|
|
2650
|
+
"package": {
|
|
2651
|
+
"type": "string"
|
|
2652
|
+
},
|
|
2653
|
+
"note": {
|
|
2654
|
+
"type": "string",
|
|
2655
|
+
"description": "Note adds a sentence the person needs before choosing (\"a new terminal is needed\")."
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2658
|
+
"required": [
|
|
2659
|
+
"manager",
|
|
2660
|
+
"package"
|
|
2661
|
+
]
|
|
2662
|
+
},
|
|
2663
|
+
"ToolNeed": {
|
|
2664
|
+
"description": "ToolNeed is a program on the person's machine that a plugin needs to build, test or run its projects (Python, the .NET SDK, Docker). A plugin publishes the tools it needs in InitializeResult.Tools. The host detects them, and when one is missing it presents the ways to get it (ADR 0077): it never installs in silence. The plugin writes facts only (what the tool is, how to detect it, how each system gets it); the host decides how to ask.",
|
|
2665
|
+
"type": "object",
|
|
2666
|
+
"properties": {
|
|
2667
|
+
"name": {
|
|
2668
|
+
"type": "string",
|
|
2669
|
+
"description": "Name identifies the tool across plugins and in commands (smith tools install python). Two plugins that need the same tool use the same Name."
|
|
2670
|
+
},
|
|
2671
|
+
"title": {
|
|
2672
|
+
"type": "string",
|
|
2673
|
+
"description": "Title is what the tool is called in text: \"Python\", \"the .NET SDK\". Doctor words the check \"<Title> is installed\"."
|
|
2674
|
+
},
|
|
2675
|
+
"why": {
|
|
2676
|
+
"type": "string",
|
|
2677
|
+
"description": "Why says in plain words what smith needs the tool for."
|
|
2678
|
+
},
|
|
2679
|
+
"consequence": {
|
|
2680
|
+
"type": "string",
|
|
2681
|
+
"description": "Consequence says what stops working while the tool is missing, as the end of a sentence that starts \"If you skip it, \": \"smith test and smith build fail for the python projects\"."
|
|
2682
|
+
},
|
|
2683
|
+
"program": {
|
|
2684
|
+
"type": "string",
|
|
2685
|
+
"description": "Program is the program that carries the tool on PATH (\"python3\")."
|
|
2686
|
+
},
|
|
2687
|
+
"alternatives": {
|
|
2688
|
+
"type": "array",
|
|
2689
|
+
"items": {
|
|
2690
|
+
"type": "string"
|
|
2691
|
+
},
|
|
2692
|
+
"description": "Alternatives are other programs that also count (\"python\", \"py\")."
|
|
2693
|
+
},
|
|
2694
|
+
"versionArgs": {
|
|
2695
|
+
"type": "array",
|
|
2696
|
+
"items": {
|
|
2697
|
+
"type": "string"
|
|
2698
|
+
},
|
|
2699
|
+
"description": "VersionArgs are the arguments that make Program print its version. Absent means --version."
|
|
2700
|
+
},
|
|
2701
|
+
"pins": {
|
|
2702
|
+
"type": "array",
|
|
2703
|
+
"items": {
|
|
2704
|
+
"$ref": "#/$defs/ToolVersionPin"
|
|
2705
|
+
},
|
|
2706
|
+
"description": "Pins are the files where a workspace pins the version it wants. The first pin the host finds gives the version range. Absent means any version counts."
|
|
2707
|
+
},
|
|
2708
|
+
"choice": {
|
|
2709
|
+
"type": "string",
|
|
2710
|
+
"description": "Choice limits the tool to stacks that have this choice (\"azure-functions\"): the tool is not needed by a project built without it. Absent means every project of the plugin needs it."
|
|
2711
|
+
},
|
|
2712
|
+
"files": {
|
|
2713
|
+
"type": "array",
|
|
2714
|
+
"items": {
|
|
2715
|
+
"type": "string"
|
|
2716
|
+
},
|
|
2717
|
+
"description": "Files limit the tool to projects that hold one of these files in their folder (\"build.gradle.kts\"): a Gradle build needs gradle, a Maven build does not. A tool that the tasks of a project run (gradle, mvn) is declared this way. Absent means every project of the plugin needs it."
|
|
2718
|
+
},
|
|
2719
|
+
"systems": {
|
|
2720
|
+
"type": "array",
|
|
2721
|
+
"items": {
|
|
2722
|
+
"type": "string"
|
|
2723
|
+
},
|
|
2724
|
+
"description": "Systems limits the tool to these systems, named as Go names them (\"windows\", \"darwin\", \"linux\"): the Xcode Command Line Tools exist only on \"darwin\". Absent means every system."
|
|
2725
|
+
},
|
|
2726
|
+
"suggested": {
|
|
2727
|
+
"type": "string",
|
|
2728
|
+
"description": "Suggested is the version smith installs when no pin says one: \"3.13\". It fills {major} and {major.minor} in the install entries."
|
|
2729
|
+
},
|
|
2730
|
+
"optional": {
|
|
2731
|
+
"type": "boolean",
|
|
2732
|
+
"description": "Optional marks a tool whose absence only costs a feature (running a function app locally). Doctor reports it as a warning, not a failure."
|
|
2733
|
+
},
|
|
2734
|
+
"exact": {
|
|
2735
|
+
"type": "boolean",
|
|
2736
|
+
"description": "Exact says Suggested is the one version the workspace wants, such as the version CI pins: an installed version that differs, older or newer, is reported as different, and an install fetches that version."
|
|
2737
|
+
},
|
|
2738
|
+
"install": {
|
|
2739
|
+
"type": "array",
|
|
2740
|
+
"items": {
|
|
2741
|
+
"$ref": "#/$defs/ToolInstall"
|
|
2742
|
+
},
|
|
2743
|
+
"description": "Install are the ways to get the tool, per package manager and system."
|
|
2744
|
+
},
|
|
2745
|
+
"download": {
|
|
2746
|
+
"type": "string",
|
|
2747
|
+
"description": "Download is the official page of the tool, for the person who installs it by hand or has no package manager."
|
|
2748
|
+
},
|
|
2749
|
+
"source": {
|
|
2750
|
+
"type": "string",
|
|
2751
|
+
"description": "Source is the address of the page the Install entries were checked against."
|
|
2752
|
+
},
|
|
2753
|
+
"checked": {
|
|
2754
|
+
"type": "string",
|
|
2755
|
+
"description": "Checked is the date (YYYY-MM-DD) the entries were last checked."
|
|
2756
|
+
}
|
|
2757
|
+
},
|
|
2758
|
+
"required": [
|
|
2759
|
+
"name",
|
|
2760
|
+
"title",
|
|
2761
|
+
"why",
|
|
2762
|
+
"consequence",
|
|
2763
|
+
"program",
|
|
2764
|
+
"download",
|
|
2765
|
+
"source",
|
|
2766
|
+
"checked"
|
|
2767
|
+
]
|
|
2768
|
+
},
|
|
1968
2769
|
"ToolPin": {
|
|
1969
2770
|
"description": "ToolPin is a tool the plugin installs at a pinned version (in CI, the dev container, the venv) against the newest release; informational.",
|
|
1970
2771
|
"type": "object",
|
|
@@ -1989,6 +2790,23 @@ export const protocolSchema = {
|
|
|
1989
2790
|
"pinned"
|
|
1990
2791
|
]
|
|
1991
2792
|
},
|
|
2793
|
+
"ToolVersionPin": {
|
|
2794
|
+
"description": "ToolVersionPin names a file that pins the version of a tool and how to read it. Format is one of: \"text\" (the first word of the file, as in .nvmrc and .python-version), \"go-mod\" (the toolchain line, else the go line), \"pyproject\" (requires-python), \"global-json\" (sdk.version) and \"rust-toolchain\" (the channel).",
|
|
2795
|
+
"type": "object",
|
|
2796
|
+
"properties": {
|
|
2797
|
+
"file": {
|
|
2798
|
+
"type": "string",
|
|
2799
|
+
"description": "File is the base name of the file, looked up at the workspace root and in the folders of the projects that use the tool."
|
|
2800
|
+
},
|
|
2801
|
+
"format": {
|
|
2802
|
+
"type": "string"
|
|
2803
|
+
}
|
|
2804
|
+
},
|
|
2805
|
+
"required": [
|
|
2806
|
+
"file",
|
|
2807
|
+
"format"
|
|
2808
|
+
]
|
|
2809
|
+
},
|
|
1992
2810
|
"Toolchain": {
|
|
1993
2811
|
"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).",
|
|
1994
2812
|
"type": "object",
|
|
@@ -2040,6 +2858,22 @@ export const protocolSchema = {
|
|
|
2040
2858
|
"packages"
|
|
2041
2859
|
]
|
|
2042
2860
|
},
|
|
2861
|
+
"UnlinkParams": {
|
|
2862
|
+
"description": "UnlinkParams asks a plugin to remove the dependency of Project on Library. Notes of the result say so when the manifest held no such dependency.",
|
|
2863
|
+
"type": "object",
|
|
2864
|
+
"properties": {
|
|
2865
|
+
"project": {
|
|
2866
|
+
"$ref": "#/$defs/Project"
|
|
2867
|
+
},
|
|
2868
|
+
"library": {
|
|
2869
|
+
"$ref": "#/$defs/Project"
|
|
2870
|
+
}
|
|
2871
|
+
},
|
|
2872
|
+
"required": [
|
|
2873
|
+
"project",
|
|
2874
|
+
"library"
|
|
2875
|
+
]
|
|
2876
|
+
},
|
|
2043
2877
|
"VersionParams": {
|
|
2044
2878
|
"description": "VersionParams asks a plugin to record a new version in a project manifest.",
|
|
2045
2879
|
"type": "object",
|