@monosmith/plugin-sdk 2.0.0-beta.10 → 2.0.0-beta.12

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.10",
3
+ "version": "2.0.0-beta.12",
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",
@@ -643,6 +643,10 @@ export const protocolSchema = {
643
643
  "type": "boolean",
644
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
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
+ },
646
650
  "declared": {
647
651
  "type": "boolean",
648
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."
@@ -1430,6 +1434,13 @@ export const protocolSchema = {
1430
1434
  "dir": {
1431
1435
  "type": "string",
1432
1436
  "description": "Dir is where it runs, workspace-relative; empty is the workspace root."
1437
+ },
1438
+ "env": {
1439
+ "type": "array",
1440
+ "items": {
1441
+ "type": "string"
1442
+ },
1443
+ "description": "Env are KEY=VALUE entries added to the environment of the command (GOBIN=<folder> makes go install write there). Absent adds none."
1433
1444
  }
1434
1445
  },
1435
1446
  "required": [
@@ -2049,6 +2060,10 @@ export const protocolSchema = {
2049
2060
  "type": "string",
2050
2061
  "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."
2051
2062
  },
2063
+ "packDir": {
2064
+ "type": "string",
2065
+ "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."
2066
+ },
2052
2067
  "finalize": {
2053
2068
  "type": "array",
2054
2069
  "items": {
@@ -2197,6 +2212,10 @@ export const protocolSchema = {
2197
2212
  "noPublish": {
2198
2213
  "type": "boolean",
2199
2214
  "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)."
2215
+ },
2216
+ "packToRelease": {
2217
+ "type": "boolean",
2218
+ "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."
2200
2219
  }
2201
2220
  }
2202
2221
  },
@@ -2605,7 +2624,7 @@ export const protocolSchema = {
2605
2624
  ]
2606
2625
  },
2607
2626
  "ToolInstall": {
2608
- "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\" and \"cargo\". The host builds the exact command from the manager and Package; Package may hold {major} and {major.minor}, 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.",
2627
+ "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.",
2609
2628
  "type": "object",
2610
2629
  "properties": {
2611
2630
  "manager": {
@@ -2695,6 +2714,10 @@ export const protocolSchema = {
2695
2714
  "type": "boolean",
2696
2715
  "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."
2697
2716
  },
2717
+ "exact": {
2718
+ "type": "boolean",
2719
+ "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."
2720
+ },
2698
2721
  "install": {
2699
2722
  "type": "array",
2700
2723
  "items": {
@@ -211,6 +211,12 @@ export interface Capabilities {
211
211
  * plugin that lacks it.
212
212
  */
213
213
  channels?: boolean;
214
+ /**
215
+ * Packs says publish honours PublishParams.PackDir: it writes the package file and publishes
216
+ * nowhere (registry = "github-release"). A host never calls publish with the setting on a plugin
217
+ * that lacks it, since the plugin would publish to the public registry.
218
+ */
219
+ packs?: boolean;
214
220
  /**
215
221
  * Declared says the plugin describes the projects smith.toml declares for its language
216
222
  * (DiscoverParams.declared): folders with no manifest of their own. A plugin without it finds a
@@ -668,6 +674,11 @@ export interface FixStep {
668
674
  argv: string[];
669
675
  /** Dir is where it runs, workspace-relative; empty is the workspace root. */
670
676
  dir?: string;
677
+ /**
678
+ * Env are KEY=VALUE entries added to the environment of the command (GOBIN=<folder> makes go
679
+ * install write there). Absent adds none.
680
+ */
681
+ env?: string[];
671
682
  }
672
683
  /**
673
684
  * GenerateParams asks a plugin to scaffold a project. The host chooses the directory from the kind
@@ -1097,6 +1108,14 @@ export interface PublishParams {
1097
1108
  * means the default. Only npm has such a wait. A publish never waits.
1098
1109
  */
1099
1110
  propagationWait?: string;
1111
+ /**
1112
+ * PackDir, when set, turns the call into a pack: the plugin writes the package file of the
1113
+ * project's ecosystem (npm tarball, wheel and sdist, .nupkg, .gem, .crate) and returns the files
1114
+ * in PublishResult.Assets, and publishes nothing anywhere. A workspace-relative folder. The host
1115
+ * sends it only to a plugin with the packs capability. In a dry run the plugin lists the files it
1116
+ * would write, writes none, and reads no registry.
1117
+ */
1118
+ packDir?: string;
1100
1119
  /**
1101
1120
  * Finalize turns the call into the last phase of a release: nothing is published; for each move
1102
1121
  * the plugin waits until its packages are fetchable, then moves the dist-tag. The host sends it
@@ -1190,6 +1209,13 @@ export interface Registries {
1190
1209
  * rest).
1191
1210
  */
1192
1211
  noPublish?: boolean;
1212
+ /**
1213
+ * PackToRelease means smith.toml says registry = "github-release": the release packs the project
1214
+ * into its ecosystem's package file and attaches it to the project's GitHub Release, publishing
1215
+ * to no registry. The host sends PublishParams.PackDir to a plugin with the packs capability and
1216
+ * never calls publish on one without it.
1217
+ */
1218
+ packToRelease?: boolean;
1193
1219
  }
1194
1220
  /**
1195
1221
  * Registry is a package registry smith.toml names in [registries.<name>]: a private feed (Azure
@@ -1387,9 +1413,10 @@ export interface Task {
1387
1413
  }
1388
1414
  /**
1389
1415
  * ToolInstall is one way to get a tool with a package manager. Manager is one of: "winget", "brew",
1390
- * "brew-cask", "apt", "dnf", "pacman", "npm", "uv", "fnm", "rustup" and "cargo". The host builds
1391
- * the exact command from the manager and Package; Package may hold {major} and {major.minor}, which
1392
- * the pinned or suggested version fills. The language's own installers (uv, fnm, rustup, cargo) are
1416
+ * "brew-cask", "apt", "dnf", "pacman", "npm", "uv", "fnm", "rustup", "cargo" and "go" (go install,
1417
+ * for a tool published as a Go module). The host builds the exact command from the manager and
1418
+ * Package; Package may hold {major}, {major.minor} and {version} (the whole version), which the
1419
+ * pinned or suggested version fills. The language's own installers (uv, fnm, rustup, cargo) are
1393
1420
  * offered only when they are already on the machine.
1394
1421
  */
1395
1422
  export interface ToolInstall {
@@ -1461,6 +1488,12 @@ export interface ToolNeed {
1461
1488
  * Doctor reports it as a warning, not a failure.
1462
1489
  */
1463
1490
  optional?: boolean;
1491
+ /**
1492
+ * Exact says Suggested is the one version the workspace wants, such as the version CI pins: an
1493
+ * installed version that differs, older or newer, is reported as different, and an install
1494
+ * fetches that version.
1495
+ */
1496
+ exact?: boolean;
1464
1497
  /** Install are the ways to get the tool, per package manager and system. */
1465
1498
  install?: ToolInstall[];
1466
1499
  /**