@toist/spec 0.8.0 → 0.8.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to `@toist/spec` are recorded here.
4
4
 
5
+ ## 0.8.2 — 2026-05-08
6
+
7
+ - **Pipeline `apiVersion` canonical literal renamed** from `"2121.fi/v1"`
8
+ to `"toist.in/v1"`. The legacy literal is still accepted with a
9
+ deprecation warning (`apiVersion "2121.fi/v1" is deprecated; use
10
+ "toist.in/v1" instead`). Existing pipelines keep working; the warning
11
+ tells authors what to update. Will eventually become a hard error.
12
+ - Generated JSON Schema `$id` updated to
13
+ `https://toist.in/schemas/pipeline-v1.json` and the schema title to
14
+ `Pipeline (toist.in/v1)`.
15
+ - Aligns with the `@toist/*` npm scope, the `/manifest` schema URL
16
+ shipped in v0.8.0 (`https://toist.in/schemas/manifest-v1.json`), and
17
+ the public website.
18
+
19
+ ## 0.8.1 — 2026-05-08
20
+
21
+ Lockstep version bump. No functional changes in this package.
22
+
5
23
  ## 0.8.0 — 2026-05-08
6
24
 
7
25
  - **Structural `DataHandle` / `DataStatement` interfaces** replace the
package/README.md CHANGED
@@ -6,7 +6,7 @@ Pure Toist pipeline-format tooling: YAML parsing, discriminator/expression parsi
6
6
  import { parseYaml, validateSpec } from "@toist/spec"
7
7
 
8
8
  const spec = parseYaml(`
9
- apiVersion: "2121.fi/v1"
9
+ apiVersion: "toist.in/v1"
10
10
  id: hello
11
11
  nodes:
12
12
  - id: greet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toist/spec",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/jsonschema.ts CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  import type { ParamDef, PortDef, NodeKindManifest, ResourceTypeDef } from "./kinds.ts"
11
11
 
12
- const API_VERSION = "2121.fi/v1"
12
+ const API_VERSION = "toist.in/v1"
13
13
  const SLUG_PATTERN = "^[A-Za-z][\\w-]*$"
14
14
 
15
15
  export type JsonSchema = Record<string, unknown>
@@ -185,8 +185,8 @@ export function pipelineSchema(kinds: NodeKindManifest[]): JsonSchema {
185
185
 
186
186
  return {
187
187
  $schema: "https://json-schema.org/draft/2020-12/schema",
188
- $id: `https://2121.fi/pipeline-spec/v1/pipeline.schema.json`,
189
- title: "Pipeline (2121.fi/v1)",
188
+ $id: `https://toist.in/schemas/pipeline-v1.json`,
189
+ title: "Pipeline (toist.in/v1)",
190
190
  description: "Generated from the live kind manifest. Regenerate when kinds are added or changed.",
191
191
  type: "object",
192
192
  properties: {
package/src/validate.ts CHANGED
@@ -92,7 +92,14 @@ export interface ValidateResult {
92
92
  // ─── Closed sets and constants ───────────────────────────────────────────────
93
93
 
94
94
  const SLUG_RE = /^[A-Za-z][\w-]*$/
95
- const API_VERSION = "2121.fi/v1"
95
+
96
+ // v0.8.2 renamed the spec authority from `2121.fi` (the company) to
97
+ // `toist.in` (the public product). Both literals are accepted; the
98
+ // legacy form emits a deprecation warning and rewrites to the canonical
99
+ // form on the parsed spec. Will eventually become a hard error — give
100
+ // it a major bump's worth of grace first.
101
+ const API_VERSION = "toist.in/v1"
102
+ const API_VERSION_LEGACY = "2121.fi/v1"
96
103
 
97
104
  const ALLOWED_PIPELINE_KEYS = new Set([
98
105
  "apiVersion", "id", "label", "description", "schedule", "payloadSchema", "nodes",
@@ -147,13 +154,17 @@ export function validateSpec(input: unknown, options: ValidateOptions = {}): Val
147
154
  }
148
155
  }
149
156
 
150
- // §13.4 — apiVersion. Implicit-v1 with warning per §7.
157
+ // §13.4 — apiVersion. Implicit-v1 with warning per §7. Two accepted
158
+ // literals: "toist.in/v1" (canonical) and "2121.fi/v1" (legacy, warned).
151
159
  let apiVersion: string
152
160
  if (spec.apiVersion === undefined) {
153
161
  warnings.push(`apiVersion absent; treating as "${API_VERSION}". Add apiVersion: "${API_VERSION}" explicitly.`)
154
162
  apiVersion = API_VERSION
155
163
  } else if (spec.apiVersion === API_VERSION) {
156
164
  apiVersion = API_VERSION
165
+ } else if (spec.apiVersion === API_VERSION_LEGACY) {
166
+ warnings.push(`apiVersion "${API_VERSION_LEGACY}" is deprecated; use "${API_VERSION}" instead.`)
167
+ apiVersion = API_VERSION
157
168
  } else {
158
169
  errors.push(`unsupported apiVersion: ${JSON.stringify(spec.apiVersion)} (this runner accepts "${API_VERSION}")`)
159
170
  apiVersion = API_VERSION