@olivervea/pipelines 2.0.0-beta.35 → 2.0.0-beta.36

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/README.md CHANGED
@@ -436,6 +436,7 @@ Exact format: [`manifest.schema.json`](manifest.schema.json) (JSON Schema 2020-1
436
436
  - `{kind: "webhook", name, verify: {scheme: "hmac-sha256", secret, header, prefix} | {scheme: "bearer", secret}}`. The `map-trigger` event is `{headers, body}`; a `null` mapping yields a `skipped` envelope (the delivery is ignored).
437
437
  - **`failureHandlers`** is a list of `{step: Step, steps: [names] | null}`. Each handler's inputs are all FailureContext (`{"ref": "failure"}`).
438
438
  - **`retention`** (when present) is `{keepLatestRuns?, minRunAgeDays?, buildGraceDays?}`, non-negative integers that replace the instance's thresholds for this pipeline. Omitted when the definition sets none.
439
+ - **`ci`** (when present) is `{description?, input, secrets, stages}`: the checks run on pull requests. `input` is a model, `secrets` the sorted names CI steps may declare (each one a pipeline secret), `stages` shaped like the pipeline's. A step name in both the pipeline and `ci` is one step: everything it declares but its `input` mappings must match. CI steps can't have external inputs. Omitted when there is no CI.
439
440
  - **`secrets`** lists every secret used by steps, polls and webhooks, sorted, as `{name, description}`.
440
441
  - **`config`** lists every config entry steps declare, sorted by name, as `{name, description, required, schema}`. `schema` is the `z.input` view (defaults listed); it validates the entry's value in the config document. `required` is false when the schema accepts a missing value. A `secretRef` field is marked `"x-olve-kind": "secretRef"`, with the secret's name as `properties.secret.const`. Omitted when there are no entries.
441
442
  - **Step `configEntries`** names the entries the step receives (sorted; omitted when none). It is part of the step's content, like `secrets`. The step key `config` is the step's `settings`.
@@ -52,6 +52,41 @@
52
52
  "const": "2.0",
53
53
  "type": "string"
54
54
  },
55
+ "ci": {
56
+ "additionalProperties": false,
57
+ "description": "Checks run on pull requests (omitted when none). Steps are matched by name: a step in both the pipeline and CI is the same step.",
58
+ "properties": {
59
+ "description": {
60
+ "type": "string"
61
+ },
62
+ "input": {
63
+ "description": "CI input model.",
64
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
65
+ "type": "string"
66
+ },
67
+ "secrets": {
68
+ "description": "The pipeline secrets CI steps may declare, sorted by name.",
69
+ "items": {
70
+ "description": "Secret name; also the env var name in the step container.",
71
+ "pattern": "^[A-Z_][A-Z0-9_]*$",
72
+ "type": "string"
73
+ },
74
+ "type": "array"
75
+ },
76
+ "stages": {
77
+ "items": {
78
+ "$ref": "#/$defs/Stage"
79
+ },
80
+ "type": "array"
81
+ }
82
+ },
83
+ "required": [
84
+ "input",
85
+ "secrets",
86
+ "stages"
87
+ ],
88
+ "type": "object"
89
+ },
55
90
  "codeHash": {
56
91
  "description": "Hash of the whole build: the pipeline and its code bundled, plus the harness. Any code change makes a new pipeline version.",
57
92
  "pattern": "^sha256:[0-9a-f]{64}$",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olivervea/pipelines",
3
- "version": "2.0.0-beta.35",
3
+ "version": "2.0.0-beta.36",
4
4
  "description": "Olve.Pipelines v2 SDK: typed pipeline authoring, the step harness, and the build tool.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -390,6 +390,19 @@ export const Manifest = z
390
390
  ),
391
391
  triggers: z.array(Trigger),
392
392
  stages: z.array(Stage),
393
+ ci: z
394
+ .strictObject({
395
+ description: z.string().optional(),
396
+ input: modelName.describe('CI input model.'),
397
+ secrets: z
398
+ .array(secretName)
399
+ .describe('The pipeline secrets CI steps may declare, sorted by name.'),
400
+ stages: z.array(Stage),
401
+ })
402
+ .optional()
403
+ .describe(
404
+ 'Checks run on pull requests (omitted when none). Steps are matched by name: a step in both the pipeline and CI is the same step.',
405
+ ),
393
406
  failureHandlers: z.array(
394
407
  z.strictObject({
395
408
  step: StepDescriptor.describe(