@intentius/chant 0.124.56 → 0.124.58
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/dist/ci-audit/index.d.ts.map +1 -1
- package/dist/ci-audit/index.js +1 -2
- package/dist/ci-product-words.d.ts +47 -2
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +59 -1
- package/dist/ci-product.d.ts +26 -2
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +30 -7
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +5 -1
- package/dist/cli/handlers/init.d.ts.map +1 -1
- package/dist/cli/handlers/init.js +16 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +14 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +90 -35
- package/dist/cli/handlers/serve.d.ts.map +1 -1
- package/dist/cli/handlers/serve.js +9 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +6 -2
- package/dist/cli/mcp/product-tools.d.ts +40 -7
- package/dist/cli/mcp/product-tools.d.ts.map +1 -1
- package/dist/cli/mcp/product-tools.js +59 -15
- package/dist/cli/mcp/read-only.d.ts +2 -1
- package/dist/cli/mcp/read-only.d.ts.map +1 -1
- package/dist/cli/mcp/read-only.js +2 -1
- package/dist/cli/mcp/server.d.ts +11 -0
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/server.js +15 -3
- package/dist/cli/mcp-config.d.ts +4 -1
- package/dist/cli/mcp-config.d.ts.map +1 -1
- package/dist/cli/mcp-config.js +6 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +9 -0
- package/dist/cli/registry.d.ts +8 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts +5 -2
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +9 -4
- package/dist/components/capability.d.ts +10 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/deploy-units.d.ts +12 -0
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/deploy-units.js +20 -1
- package/dist/components/pr-pipeline.d.ts +64 -2
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +66 -5
- package/dist/components/product-pipeline.d.ts +18 -1
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +8 -2
- package/dist/components/row-lease.d.ts +22 -1
- package/dist/components/row-lease.d.ts.map +1 -1
- package/dist/components/row-lease.js +32 -6
- package/dist/e2e-harness/driver.d.ts.map +1 -1
- package/dist/e2e-harness/driver.js +97 -0
- package/dist/e2e-harness/forgejo.d.ts +5 -1
- package/dist/e2e-harness/forgejo.d.ts.map +1 -1
- package/dist/e2e-harness/forgejo.js +35 -0
- package/dist/e2e-harness/index.d.ts +7 -0
- package/dist/e2e-harness/index.d.ts.map +1 -1
- package/dist/e2e-harness/index.js +11 -2
- package/dist/e2e-harness/ports.d.ts +31 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -1
- package/dist/e2e-harness/scenario.d.ts.map +1 -1
- package/dist/e2e-harness/scenario.js +9 -5
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +43 -3
- package/dist/e2e-harness/schemas/index.d.ts +22 -1
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -1
- package/dist/e2e-harness/schemas/index.js +1 -1
- package/dist/e2e-harness/steps.d.ts.map +1 -1
- package/dist/e2e-harness/steps.js +4 -0
- package/dist/lexicon.d.ts +9 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +39 -3
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +223 -15
- package/dist/lifecycle/lock-rows.d.ts +23 -0
- package/dist/lifecycle/lock-rows.d.ts.map +1 -1
- package/dist/lifecycle/lock-rows.js +47 -8
- package/dist/lifecycle/resource-lock.d.ts +70 -0
- package/dist/lifecycle/resource-lock.d.ts.map +1 -1
- package/dist/lifecycle/resource-lock.js +241 -5
- package/dist/mcp/types.d.ts +9 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/op/gate.js +21 -4
- package/dist/op/op-waves-release-port.js +1 -1
- package/dist/op/op-waves-release.d.ts +2 -1
- package/dist/op/op-waves-release.d.ts.map +1 -1
- package/dist/op/op-waves-run.d.ts +8 -0
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +101 -29
- package/dist/op/op-waves.d.ts +18 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +16 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +1 -2
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/template-request/index.d.ts +9 -0
- package/dist/template-request/index.d.ts.map +1 -0
- package/dist/template-request/index.js +8 -0
- package/dist/template-request/request-body.d.ts +21 -0
- package/dist/template-request/request-body.d.ts.map +1 -0
- package/dist/template-request/request-body.js +86 -0
- package/dist/template-request/template-request.d.ts +100 -0
- package/dist/template-request/template-request.d.ts.map +1 -0
- package/dist/template-request/template-request.js +150 -0
- package/dist/template-request/template-request.schema.json +100 -0
- package/dist/template-request/template-spec.d.ts +83 -0
- package/dist/template-request/template-spec.d.ts.map +1 -0
- package/dist/template-request/template-spec.js +146 -0
- package/dist/template-request/template.schema.json +114 -0
- package/dist/template-request/validate.d.ts +4 -0
- package/dist/template-request/validate.d.ts.map +1 -0
- package/dist/template-request/validate.js +21 -0
- package/dist/wave-runtime.mjs +310 -300
- package/package.json +8 -1
- package/src/ci-audit/index.ts +1 -2
- package/src/ci-product-words.test.ts +23 -0
- package/src/ci-product-words.ts +68 -3
- package/src/ci-product.ts +36 -6
- package/src/cli/commands/init.ts +3 -1
- package/src/cli/handlers/build.ts +5 -1
- package/src/cli/handlers/init.ts +18 -0
- package/src/cli/handlers/lifecycle.ts +13 -0
- package/src/cli/handlers/pr-before-merge.test.ts +1 -1
- package/src/cli/handlers/pr-deploy-inputs.test.ts +1 -1
- package/src/cli/handlers/pr-endpoint.test.ts +1 -1
- package/src/cli/handlers/pr-green.test.ts +1 -1
- package/src/cli/handlers/pr-plan-comment-targets.test.ts +1 -1
- package/src/cli/handlers/pr-plan-flags.test.ts +1 -1
- package/src/cli/handlers/pr-plan-targets.test.ts +1 -1
- package/src/cli/handlers/pr-record.test.ts +34 -2
- package/src/cli/handlers/pr-waves-blocked.test.ts +1 -1
- package/src/cli/handlers/pr-waves.test.ts +1 -1
- package/src/cli/handlers/pr.test.ts +1 -1
- package/src/cli/handlers/pr.ts +86 -31
- package/src/cli/handlers/serve.ts +9 -0
- package/src/cli/main.ts +6 -2
- package/src/cli/mcp/product-tools.test.ts +57 -1
- package/src/cli/mcp/product-tools.ts +67 -15
- package/src/cli/mcp/read-only.ts +2 -1
- package/src/cli/mcp/server.ts +20 -5
- package/src/cli/mcp-config.test.ts +52 -2
- package/src/cli/mcp-config.ts +6 -3
- package/src/cli/parse-args.ts +7 -0
- package/src/cli/registry.ts +8 -0
- package/src/components/auto-release.test.ts +4 -2
- package/src/components/auto-release.ts +9 -5
- package/src/components/capability.ts +10 -0
- package/src/components/deploy-units.test.ts +18 -1
- package/src/components/deploy-units.ts +26 -1
- package/src/components/pr-pipeline.ts +99 -5
- package/src/components/product-actions.test.ts +76 -0
- package/src/components/product-pipeline.ts +21 -2
- package/src/components/row-lease.test.ts +61 -1
- package/src/components/row-lease.ts +48 -7
- package/src/e2e-harness/driver.test.ts +163 -0
- package/src/e2e-harness/driver.ts +86 -1
- package/src/e2e-harness/forgejo.ts +42 -1
- package/src/e2e-harness/index.ts +12 -2
- package/src/e2e-harness/ports.ts +33 -0
- package/src/e2e-harness/scenario.ts +8 -6
- package/src/e2e-harness/schemas/README.md +11 -2
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +43 -3
- package/src/e2e-harness/schemas/index.ts +5 -1
- package/src/e2e-harness/schemas.test.ts +44 -1
- package/src/e2e-harness/steps.ts +4 -0
- package/src/lexicon.ts +9 -0
- package/src/lifecycle/git.test.ts +155 -0
- package/src/lifecycle/git.ts +213 -17
- package/src/lifecycle/lock-rows.test.ts +6 -1
- package/src/lifecycle/lock-rows.ts +58 -7
- package/src/lifecycle/resource-lock-wait.test.ts +292 -0
- package/src/lifecycle/resource-lock.ts +261 -7
- package/src/mcp/types.ts +9 -0
- package/src/op/gate.test.ts +7 -5
- package/src/op/gate.ts +20 -4
- package/src/op/op-waves-after-plan.test.ts +1 -2
- package/src/op/op-waves-ledger-lock.test.ts +208 -0
- package/src/op/op-waves-release-port.ts +1 -1
- package/src/op/op-waves-release.ts +1 -1
- package/src/op/op-waves-run.ts +104 -29
- package/src/op/op-waves.ts +18 -0
- package/src/pr-loop-bundle.test.ts +0 -2
- package/src/pr-loop.ts +1 -2
- package/src/release-floors.ts +1 -1
- package/src/template-request/__fixtures__/request-body.md +41 -0
- package/src/template-request/index.ts +8 -0
- package/src/template-request/request-body.ts +91 -0
- package/src/template-request/template-request.schema.json +100 -0
- package/src/template-request/template-request.test.ts +316 -0
- package/src/template-request/template-request.ts +235 -0
- package/src/template-request/template-spec.ts +176 -0
- package/src/template-request/template.schema.json +114 -0
- package/src/template-request/validate.ts +28 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/chant/schemas/template-request/v1/template.schema.json",
|
|
4
|
+
"title": "chant template",
|
|
5
|
+
"description": "template.yml, version 1 of its contract: what a template asks for when someone requests an app or an add-on from it. It sits in the template's signed release beside the code it describes. A form shows one field per input; an agent and a command line read the same list. Each input has an engine-neutral kind, and each engine maps the kinds to its own types. Readers ignore fields they do not know; a field is only ever added within a version.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"contract",
|
|
9
|
+
"description",
|
|
10
|
+
"inputs"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"$schema": {
|
|
14
|
+
"const": "https://intentius.io/chant/schemas/template-request/v1/template.schema.json"
|
|
15
|
+
},
|
|
16
|
+
"contract": {
|
|
17
|
+
"const": 1
|
|
18
|
+
},
|
|
19
|
+
"kind": {
|
|
20
|
+
"enum": [
|
|
21
|
+
"app",
|
|
22
|
+
"addon"
|
|
23
|
+
],
|
|
24
|
+
"default": "app",
|
|
25
|
+
"description": "What a request makes from this template: a new app, or an add-on to an app that already exists."
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"description": "One or two sentences a person reads before requesting it."
|
|
31
|
+
},
|
|
32
|
+
"inputs": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"description": "The inputs, in the order a form shows them. Names are unique. An add-on request may give any input the string `app.<output>`, naming an output of the app's module, which the engine resolves.",
|
|
35
|
+
"items": {
|
|
36
|
+
"$ref": "#/$defs/input"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"$defs": {
|
|
41
|
+
"scalarKind": {
|
|
42
|
+
"enum": [
|
|
43
|
+
"string",
|
|
44
|
+
"number",
|
|
45
|
+
"bool"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"kind": {
|
|
49
|
+
"description": "An input's engine-neutral kind. string: a JSON string. number: a finite JSON number. bool: true or false. list: a JSON array, each element of kind `of` when given. map: a JSON object, each value of kind `of` when given. object: a JSON object with any fields. An engine maps each kind to one of its own types (Terraform: string, number, bool, list(<of>), map(<of>), and any for object or for a list or map without `of`).",
|
|
50
|
+
"enum": [
|
|
51
|
+
"string",
|
|
52
|
+
"number",
|
|
53
|
+
"bool",
|
|
54
|
+
"list",
|
|
55
|
+
"map",
|
|
56
|
+
"object"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"input": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": [
|
|
62
|
+
"name",
|
|
63
|
+
"kind"
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"name": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_-]*$",
|
|
69
|
+
"description": "The name a request gives the value under, and the variable the engine sets."
|
|
70
|
+
},
|
|
71
|
+
"kind": {
|
|
72
|
+
"$ref": "#/$defs/kind"
|
|
73
|
+
},
|
|
74
|
+
"of": {
|
|
75
|
+
"$ref": "#/$defs/scalarKind",
|
|
76
|
+
"description": "For a list or a map only: the kind of each element or value."
|
|
77
|
+
},
|
|
78
|
+
"label": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1,
|
|
81
|
+
"description": "The form field's label. Absent: the name."
|
|
82
|
+
},
|
|
83
|
+
"description": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Help text shown under the field."
|
|
86
|
+
},
|
|
87
|
+
"default": {
|
|
88
|
+
"description": "The value used when a request gives none. It must be of the input's kind. An input with a default is optional."
|
|
89
|
+
},
|
|
90
|
+
"required": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Whether a request must give a value. Absent: true when there is no default, false when there is. An input with a default cannot be required."
|
|
93
|
+
},
|
|
94
|
+
"sensitive": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"default": false,
|
|
97
|
+
"description": "A secret. A request never carries it, because the request is written into a pull request; the app reads it from its own secret store."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"dependentSchemas": {
|
|
101
|
+
"of": {
|
|
102
|
+
"properties": {
|
|
103
|
+
"kind": {
|
|
104
|
+
"enum": [
|
|
105
|
+
"list",
|
|
106
|
+
"map"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** One Ajv for the template-request/v1 schemas (template.yml and the request), compiled on first use. */
|
|
2
|
+
/** The problems of `doc` against the schema `id`, one line each; empty when it is valid. */
|
|
3
|
+
export declare function schemaProblems(id: string, doc: unknown): string[];
|
|
4
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/template-request/validate.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAezG,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAWjE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** One Ajv for the template-request/v1 schemas (template.yml and the request), compiled on first use. */
|
|
2
|
+
import requestSchema from "./template-request.schema.json" with { type: "json" };
|
|
3
|
+
import templateSchema from "./template.schema.json" with { type: "json" };
|
|
4
|
+
import { loadAjv2020 } from "../workspace/ajv2020.js";
|
|
5
|
+
let ajv;
|
|
6
|
+
/** The problems of `doc` against the schema `id`, one line each; empty when it is valid. */
|
|
7
|
+
export function schemaProblems(id, doc) {
|
|
8
|
+
if (!ajv) {
|
|
9
|
+
const Ajv = loadAjv2020();
|
|
10
|
+
const made = new Ajv({ allErrors: true, strict: true });
|
|
11
|
+
for (const s of [requestSchema, templateSchema])
|
|
12
|
+
made.addSchema(s);
|
|
13
|
+
ajv = made;
|
|
14
|
+
}
|
|
15
|
+
const fn = ajv.getSchema(id);
|
|
16
|
+
if (!fn)
|
|
17
|
+
throw new Error(`no schema ${id}`);
|
|
18
|
+
if (fn(doc))
|
|
19
|
+
return [];
|
|
20
|
+
return (fn.errors ?? []).map((e) => `${e.instancePath || "/"} ${e.message ?? "is not valid"}`);
|
|
21
|
+
}
|