@monosmith/plugin-sdk 2.0.0-beta.1 → 2.0.0-beta.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monosmith/plugin-sdk",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "The TypeScript SDK for writing smith plugins: the protocol's types, the serve loop, a test host, the conformance checks, templating and key-order-keeping JSON editing. No runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -616,6 +616,10 @@ export const protocolSchema = {
616
616
  "channels": {
617
617
  "type": "boolean",
618
618
  "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."
619
+ },
620
+ "declared": {
621
+ "type": "boolean",
622
+ "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."
619
623
  }
620
624
  }
621
625
  },
@@ -941,6 +945,28 @@ export const protocolSchema = {
941
945
  "projects"
942
946
  ]
943
947
  },
948
+ "DeclaredProject": {
949
+ "description": "DeclaredProject is a project smith.toml declares: a folder with no manifest.",
950
+ "type": "object",
951
+ "properties": {
952
+ "name": {
953
+ "type": "string",
954
+ "description": "Name is the project's name, the key of its [projects.<name>] table."
955
+ },
956
+ "root": {
957
+ "type": "string",
958
+ "description": "Root is the workspace-relative folder."
959
+ },
960
+ "kind": {
961
+ "$ref": "#/$defs/ProjectKind",
962
+ "description": "Kind is \"app\", \"lib\" or \"package\", or empty for the plugin's choice."
963
+ }
964
+ },
965
+ "required": [
966
+ "name",
967
+ "root"
968
+ ]
969
+ },
944
970
  "DeclaredResult": {
945
971
  "description": "DeclaredResult is every declaration, and the version installed of each name where the plugin can tell.",
946
972
  "type": "object",
@@ -1116,6 +1142,13 @@ export const protocolSchema = {
1116
1142
  "items": {
1117
1143
  "type": "string"
1118
1144
  }
1145
+ },
1146
+ "declared": {
1147
+ "type": "array",
1148
+ "items": {
1149
+ "$ref": "#/$defs/DeclaredProject"
1150
+ },
1151
+ "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."
1119
1152
  }
1120
1153
  },
1121
1154
  "required": [
@@ -204,6 +204,13 @@ export interface Capabilities {
204
204
  * plugin that lacks it.
205
205
  */
206
206
  channels?: boolean;
207
+ /**
208
+ * Declared says the plugin describes the projects smith.toml declares for its language
209
+ * (DiscoverParams.declared): folders with no manifest of their own. A plugin without it finds a
210
+ * project by its manifest only, and the host refuses a declaration for its language with a
211
+ * message that says so.
212
+ */
213
+ declared?: boolean;
207
214
  }
208
215
  /**
209
216
  * ChangeKindParams asks a plugin what changing a project's kind edits. The plugin writes nothing:
@@ -406,6 +413,15 @@ export interface Declaration {
406
413
  export interface DeclaredParams {
407
414
  projects: Project[];
408
415
  }
416
+ /** DeclaredProject is a project smith.toml declares: a folder with no manifest. */
417
+ export interface DeclaredProject {
418
+ /** Name is the project's name, the key of its [projects.<name>] table. */
419
+ name: string;
420
+ /** Root is the workspace-relative folder. */
421
+ root: string;
422
+ /** Kind is "app", "lib" or "package", or empty for the plugin's choice. */
423
+ kind?: ProjectKind;
424
+ }
409
425
  /**
410
426
  * DeclaredResult is every declaration, and the version installed of each name where the plugin can
411
427
  * tell.
@@ -502,6 +518,13 @@ export interface DevcontainerFeature {
502
518
  */
503
519
  export interface DiscoverParams {
504
520
  manifests: string[];
521
+ /**
522
+ * Declared are the projects smith.toml declares for this plugin's language ([projects.<name>]
523
+ * with a root and a language): folders with no manifest of their own, such as a program that is a
524
+ * package of the Go module above it. The plugin describes each one in its result, or answers with
525
+ * an error saying why it cannot.
526
+ */
527
+ declared?: DeclaredProject[];
505
528
  }
506
529
  /**
507
530
  * DiscoverResult describes every manifest that is a project of this plugin. A manifest the plugin