@intentius/chant 0.124.57 → 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-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 +26 -2
- 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/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/pr-pipeline.d.ts +56 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +55 -2
- 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/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 -1
- 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/mcp/types.d.ts +9 -0
- package/dist/mcp/types.d.ts.map +1 -1
- 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 +4 -4
- package/package.json +8 -1
- package/src/ci-product-words.test.ts +23 -0
- package/src/ci-product-words.ts +68 -3
- package/src/ci-product.ts +32 -1
- 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/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/pr-pipeline.ts +87 -2
- package/src/components/product-actions.test.ts +76 -0
- package/src/components/product-pipeline.ts +21 -2
- 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 -1
- 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/mcp/types.ts +9 -0
- 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
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"$defs": {
|
|
57
57
|
"name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
58
|
-
"do": { "enum": ["open", "open-concurrent", "plan", "approve", "merge", "apply", "out-of-band", "kill-job"] },
|
|
58
|
+
"do": { "enum": ["open", "open-concurrent", "await-pull", "plan", "approve", "merge", "comment", "apply", "out-of-band", "kill-job"] },
|
|
59
59
|
"step": {
|
|
60
60
|
"type": "object",
|
|
61
61
|
"required": ["id", "do"],
|
|
@@ -81,10 +81,29 @@
|
|
|
81
81
|
"type": "object",
|
|
82
82
|
"properties": {
|
|
83
83
|
"do": { "enum": ["plan", "approve", "merge"] },
|
|
84
|
-
"pull": { "$ref": "#/$defs/name", "description": "The id of the open step whose pull request this is." }
|
|
84
|
+
"pull": { "$ref": "#/$defs/name", "description": "The id of the open or await-pull step whose pull request this is." }
|
|
85
85
|
},
|
|
86
86
|
"required": ["pull"]
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"do": { "const": "await-pull" },
|
|
92
|
+
"branch": { "type": "string", "minLength": 1, "description": "The exact head branch of the pull request a product opens. Both runs wait for this same branch: the BREAK run does not add -break to it." },
|
|
93
|
+
"title": { "type": "string", "minLength": 1, "description": "Text the pull request's title must hold, when given." }
|
|
94
|
+
},
|
|
95
|
+
"required": ["branch"]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"do": { "const": "comment" },
|
|
101
|
+
"pull": { "$ref": "#/$defs/name", "description": "The id of the open or await-pull step whose pull request the comment goes on." },
|
|
102
|
+
"body": { "type": "string", "minLength": 1 },
|
|
103
|
+
"as": { "enum": ["author", "reviewer", "admin"], "description": "Who posts it. Default author." }
|
|
104
|
+
},
|
|
105
|
+
"required": ["pull", "body"]
|
|
106
|
+
},
|
|
88
107
|
{
|
|
89
108
|
"type": "object",
|
|
90
109
|
"properties": {
|
|
@@ -112,7 +131,7 @@
|
|
|
112
131
|
},
|
|
113
132
|
"outcome": {
|
|
114
133
|
"type": "object",
|
|
115
|
-
"description": "One thing a step must show. report reads the step's pr-plan.json or pr-apply.json; ledger reads the run records the scenario added; comment and
|
|
134
|
+
"description": "One thing a step must show. report reads the step's pr-plan.json or pr-apply.json; ledger reads the run records the scenario added; gated reads the gated requests the scenario added; comment, issue and pull read the forge; exit is an out-of-band command's exit code.",
|
|
116
135
|
"minProperties": 1,
|
|
117
136
|
"maxProperties": 1,
|
|
118
137
|
"additionalProperties": false,
|
|
@@ -136,7 +155,28 @@
|
|
|
136
155
|
"count": { "type": "integer", "minimum": 0 }
|
|
137
156
|
}
|
|
138
157
|
},
|
|
158
|
+
"gated": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"required": ["op"],
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"description": "Gated requests of op on the ledger, asked since the run started. A request is gated until a finished line names it, then ok when it applied and failed when it did not.",
|
|
163
|
+
"properties": {
|
|
164
|
+
"op": { "type": "string" },
|
|
165
|
+
"status": { "enum": ["gated", "ok", "failed"] },
|
|
166
|
+
"count": { "type": "integer", "minimum": 0 }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
139
169
|
"comment": { "type": "string", "minLength": 1, "description": "Text one of the step's pull request comments holds." },
|
|
170
|
+
"pull": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"additionalProperties": false,
|
|
173
|
+
"description": "The step's pull request: its title holds title, it changes every path in files, and with only it changes no other path.",
|
|
174
|
+
"properties": {
|
|
175
|
+
"title": { "type": "string", "minLength": 1 },
|
|
176
|
+
"files": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
177
|
+
"only": { "type": "boolean", "description": "files names every path the pull request changes." }
|
|
178
|
+
}
|
|
179
|
+
},
|
|
140
180
|
"issue": {
|
|
141
181
|
"type": "object",
|
|
142
182
|
"required": ["title"],
|
|
@@ -76,7 +76,7 @@ export interface DemoCycle {
|
|
|
76
76
|
steps: DemoCycleStep[];
|
|
77
77
|
reports?: DemoCycleReport[];
|
|
78
78
|
}
|
|
79
|
-
export declare const SCENARIO_STEP_KINDS: readonly ["open", "open-concurrent", "plan", "approve", "merge", "apply", "out-of-band", "kill-job"];
|
|
79
|
+
export declare const SCENARIO_STEP_KINDS: readonly ["open", "open-concurrent", "await-pull", "plan", "approve", "merge", "comment", "apply", "out-of-band", "kill-job"];
|
|
80
80
|
export type ScenarioStepKind = (typeof SCENARIO_STEP_KINDS)[number];
|
|
81
81
|
/** One thing a step must show. Exactly one key is set. */
|
|
82
82
|
export type ScenarioOutcome = {
|
|
@@ -91,8 +91,20 @@ export type ScenarioOutcome = {
|
|
|
91
91
|
status?: "ok" | "fail" | "gated" | "waiting";
|
|
92
92
|
count?: number;
|
|
93
93
|
};
|
|
94
|
+
} | {
|
|
95
|
+
gated: {
|
|
96
|
+
op: string;
|
|
97
|
+
status?: "gated" | "ok" | "failed";
|
|
98
|
+
count?: number;
|
|
99
|
+
};
|
|
94
100
|
} | {
|
|
95
101
|
comment: string;
|
|
102
|
+
} | {
|
|
103
|
+
pull: {
|
|
104
|
+
title?: string;
|
|
105
|
+
files?: string[];
|
|
106
|
+
only?: boolean;
|
|
107
|
+
};
|
|
96
108
|
} | {
|
|
97
109
|
issue: {
|
|
98
110
|
title: string;
|
|
@@ -112,9 +124,18 @@ export type ScenarioStep = (StepBase & {
|
|
|
112
124
|
overlay: string;
|
|
113
125
|
title: string;
|
|
114
126
|
body?: string;
|
|
127
|
+
}) | (StepBase & {
|
|
128
|
+
do: "await-pull";
|
|
129
|
+
branch: string;
|
|
130
|
+
title?: string;
|
|
115
131
|
}) | (StepBase & {
|
|
116
132
|
do: "plan" | "approve" | "merge";
|
|
117
133
|
pull: string;
|
|
134
|
+
}) | (StepBase & {
|
|
135
|
+
do: "comment";
|
|
136
|
+
pull: string;
|
|
137
|
+
body: string;
|
|
138
|
+
as?: "author" | "reviewer" | "admin";
|
|
118
139
|
}) | (StepBase & {
|
|
119
140
|
do: "apply";
|
|
120
141
|
merge: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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,KAAG,UAAU,CAAC,SAAS,CAAmC,CAAC"}
|
|
@@ -33,7 +33,7 @@ export const DEMO_STEPS = [
|
|
|
33
33
|
"stalled",
|
|
34
34
|
];
|
|
35
35
|
// ── e2e-scenario/v1 ───────────────────────────────────────────────────
|
|
36
|
-
export const SCENARIO_STEP_KINDS = ["open", "open-concurrent", "plan", "approve", "merge", "apply", "out-of-band", "kill-job"];
|
|
36
|
+
export const SCENARIO_STEP_KINDS = ["open", "open-concurrent", "await-pull", "plan", "approve", "merge", "comment", "apply", "out-of-band", "kill-job"];
|
|
37
37
|
let ajv;
|
|
38
38
|
function validatorFor(id) {
|
|
39
39
|
if (!ajv) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/e2e-harness/steps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/e2e-harness/steps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAoB3D,CAAC;AAEF,6CAA6C;AAC7C,wBAAgB,SAAS,CAAC,IAAI,GAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAM,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAEhH"}
|
|
@@ -3,12 +3,16 @@ export const HARNESS_LIMITS = {
|
|
|
3
3
|
/** The branch push and the pull request open. */
|
|
4
4
|
open: 60,
|
|
5
5
|
"open-concurrent": 60,
|
|
6
|
+
/** An open pull request from the branch, which a product opens. */
|
|
7
|
+
"await-pull": 300,
|
|
6
8
|
/** pr-plan.json at the head, from the push. */
|
|
7
9
|
plan: 600,
|
|
8
10
|
/** The forge review and chant approve. */
|
|
9
11
|
approve: 120,
|
|
10
12
|
/** The merge and its merge commit. */
|
|
11
13
|
merge: 60,
|
|
14
|
+
/** Posting a comment on the pull request. */
|
|
15
|
+
comment: 60,
|
|
12
16
|
/** pr-apply.json at the merge commit, from the merge. */
|
|
13
17
|
apply: 900,
|
|
14
18
|
/** A command run out of band. */
|
package/dist/mcp/types.d.ts
CHANGED
|
@@ -17,6 +17,15 @@ export interface McpToolContribution {
|
|
|
17
17
|
* that leaves it out is served only by the ordinary server.
|
|
18
18
|
*/
|
|
19
19
|
readOnly?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A CI product's tool that writes to the forge and nowhere else (chant#4655):
|
|
22
|
+
* it opens a pull request or posts a comment, and runs no Op, resolves no
|
|
23
|
+
* gate, approves, merges and applies nothing. `chant serve mcp --read-only
|
|
24
|
+
* --propose` serves a product tool that declares this; the read-only server
|
|
25
|
+
* without `--propose` refuses to start with one, and the ordinary server
|
|
26
|
+
* serves it as any other tool. Lexicon tools do not use it.
|
|
27
|
+
*/
|
|
28
|
+
forgeWrite?: true;
|
|
20
29
|
}
|
|
21
30
|
export interface McpResourceContribution {
|
|
22
31
|
uri: string;
|
package/dist/mcp/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mcp/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mcp/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAChC"}
|
package/dist/release-floors.d.ts
CHANGED
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
* this constant to the next patch (#4501). The check fails while a floor
|
|
20
20
|
* still names this constant after its version shipped.
|
|
21
21
|
*/
|
|
22
|
-
export declare const NEXT_RELEASE = "0.124.
|
|
22
|
+
export declare const NEXT_RELEASE = "0.124.58";
|
|
23
23
|
//# sourceMappingURL=release-floors.d.ts.map
|
package/dist/release-floors.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/template-request` (#4651): the template request
|
|
3
|
+
* document (template-request/v1), template.yml/v1 with its engine-neutral
|
|
4
|
+
* input kinds, the refusals, the branch and the pull request body.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./template-spec.js";
|
|
7
|
+
export * from "./template-request.js";
|
|
8
|
+
export * from "./request-body.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/template-request/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/template-request` (#4651): the template request
|
|
3
|
+
* document (template-request/v1), template.yml/v1 with its engine-neutral
|
|
4
|
+
* input kinds, the refusals, the branch and the pull request body.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./template-spec.js";
|
|
7
|
+
export * from "./template-request.js";
|
|
8
|
+
export * from "./request-body.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pull request body for a template request (#4651), and the read that
|
|
3
|
+
* recovers the request from it. The body names the template, the version,
|
|
4
|
+
* each input on its own row, the requester (and the claimed requester, when
|
|
5
|
+
* the client names one) and where the request came from,
|
|
6
|
+
* and says that nothing was applied or approved. The request itself follows
|
|
7
|
+
* in a fenced block whose info string is `json` and the schema id, so behold
|
|
8
|
+
* and an audit read it from the pull request without a second file.
|
|
9
|
+
*/
|
|
10
|
+
import { type CiProductWords } from "../ci-product-words.js";
|
|
11
|
+
import { type TemplateRequest } from "./template-request.js";
|
|
12
|
+
/** The request's pull request body, in the product's words (default: the active ones). */
|
|
13
|
+
export declare function requestBody(request: TemplateRequest, words?: CiProductWords): string;
|
|
14
|
+
/**
|
|
15
|
+
* The request a pull request body carries: the first fenced block whose info
|
|
16
|
+
* string is `json` and the template-request/v1 schema id, parsed and
|
|
17
|
+
* checked against the schema. Undefined when the body has no such block, or
|
|
18
|
+
* the block is not a valid request.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseRequestBody(body: string): TemplateRequest | undefined;
|
|
21
|
+
//# sourceMappingURL=request-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-body.d.ts","sourceRoot":"","sources":["../../src/template-request/request-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAqE,KAAK,eAAe,EAA2B,MAAM,oBAAoB,CAAC;AAsBtJ,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,GAAE,cAAqC,GAAG,MAAM,CAgC1G;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAgB1E"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pull request body for a template request (#4651), and the read that
|
|
3
|
+
* recovers the request from it. The body names the template, the version,
|
|
4
|
+
* each input on its own row, the requester (and the claimed requester, when
|
|
5
|
+
* the client names one) and where the request came from,
|
|
6
|
+
* and says that nothing was applied or approved. The request itself follows
|
|
7
|
+
* in a fenced block whose info string is `json` and the schema id, so behold
|
|
8
|
+
* and an audit read it from the pull request without a second file.
|
|
9
|
+
*/
|
|
10
|
+
import { activeProductWords } from "../ci-product-words.js";
|
|
11
|
+
import { TEMPLATE_REQUEST_SCHEMA_ID, templateName, validateTemplateRequest } from "./template-request.js";
|
|
12
|
+
const VIA = {
|
|
13
|
+
form: "the request form",
|
|
14
|
+
mcp: "an agent over MCP",
|
|
15
|
+
cli: "the command line",
|
|
16
|
+
};
|
|
17
|
+
/** Text in a table cell's code span, with `|` escaped so the row holds and a fence longer than any backticks inside. */
|
|
18
|
+
function code(text) {
|
|
19
|
+
const escaped = text.replace(/\|/g, "\\|").replace(/\n/g, " ");
|
|
20
|
+
const ticks = Math.max(0, ...[...escaped.matchAll(/`+/g)].map((m) => m[0].length));
|
|
21
|
+
const fence = "`".repeat(ticks + 1);
|
|
22
|
+
return ticks > 0 ? `${fence} ${escaped} ${fence}` : `${fence}${escaped}${fence}`;
|
|
23
|
+
}
|
|
24
|
+
/** A fence longer than any run of backticks in `text`, at least three. */
|
|
25
|
+
function fenceFor(text) {
|
|
26
|
+
const longest = Math.max(0, ...[...text.matchAll(/`+/g)].map((m) => m[0].length));
|
|
27
|
+
return "`".repeat(Math.max(3, longest + 1));
|
|
28
|
+
}
|
|
29
|
+
/** The request's pull request body, in the product's words (default: the active ones). */
|
|
30
|
+
export function requestBody(request, words = activeProductWords()) {
|
|
31
|
+
const what = request.kind === "addon" && request.addon !== undefined ? `add-on ${code(request.addon)} for app ${code(request.app)}` : `app ${code(request.app)}`;
|
|
32
|
+
const lines = [
|
|
33
|
+
`### ${words.product} request: ${what} from ${templateName(request.template)}`,
|
|
34
|
+
"",
|
|
35
|
+
"| | |",
|
|
36
|
+
"| --- | --- |",
|
|
37
|
+
`| Template | ${code(request.template)} |`,
|
|
38
|
+
`| Version | ${code(request.version)} |`,
|
|
39
|
+
`| Requested by | ${code(request.requestedBy)} |`,
|
|
40
|
+
...(request.claimedBy !== undefined ? [`| Claimed by (as given by the client; the forge does not vouch for it) | ${code(request.claimedBy)} |`] : []),
|
|
41
|
+
`| Through | ${VIA[request.via]} |`,
|
|
42
|
+
"",
|
|
43
|
+
];
|
|
44
|
+
const names = Object.keys(request.inputs).sort();
|
|
45
|
+
if (names.length > 0) {
|
|
46
|
+
lines.push("| Input | Value |", "| --- | --- |");
|
|
47
|
+
for (const name of names)
|
|
48
|
+
lines.push(`| ${code(name)} | ${code(JSON.stringify(request.inputs[name]) ?? "null")} |`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
lines.push("The request gives no inputs; every input takes its default.");
|
|
52
|
+
}
|
|
53
|
+
const [, applied] = words.verbs.apply;
|
|
54
|
+
const [, planned] = words.verbs.plan;
|
|
55
|
+
lines.push("", `Nothing was ${applied} or approved. This pull request only adds files; it is ${planned} like any other, and a person reviews and merges it.`, "");
|
|
56
|
+
const json = JSON.stringify(request, null, 2);
|
|
57
|
+
const fence = fenceFor(json);
|
|
58
|
+
lines.push(`${fence}json ${TEMPLATE_REQUEST_SCHEMA_ID}`, json, fence, "");
|
|
59
|
+
return lines.join("\n");
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The request a pull request body carries: the first fenced block whose info
|
|
63
|
+
* string is `json` and the template-request/v1 schema id, parsed and
|
|
64
|
+
* checked against the schema. Undefined when the body has no such block, or
|
|
65
|
+
* the block is not a valid request.
|
|
66
|
+
*/
|
|
67
|
+
export function parseRequestBody(body) {
|
|
68
|
+
const lines = body.replace(/\r\n/g, "\n").split("\n");
|
|
69
|
+
for (let i = 0; i < lines.length; i++) {
|
|
70
|
+
const open = /^(`{3,})json[ \t]+(\S+)[ \t]*$/.exec(lines[i]);
|
|
71
|
+
if (!open || open[2] !== TEMPLATE_REQUEST_SCHEMA_ID)
|
|
72
|
+
continue;
|
|
73
|
+
const fence = open[1];
|
|
74
|
+
const end = lines.findIndex((l, j) => j > i && l.trimEnd() === fence);
|
|
75
|
+
if (end < 0)
|
|
76
|
+
return undefined;
|
|
77
|
+
try {
|
|
78
|
+
const doc = JSON.parse(lines.slice(i + 1, end).join("\n"));
|
|
79
|
+
return validateTemplateRequest(doc).length === 0 ? doc : undefined;
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The template request, template-request/v1 (#4651): "an app named orders
|
|
3
|
+
* from template X at version Y with these inputs", as one JSON document.
|
|
4
|
+
* terragucci, plywood and behold all turn one into a pull request, and this
|
|
5
|
+
* module is where they agree on the document, its refusals and its branch.
|
|
6
|
+
* ./request-body.ts writes the pull request body that carries it.
|
|
7
|
+
*
|
|
8
|
+
* {@link checkTemplateRequest} reads the release catalog for the version's
|
|
9
|
+
* status and attestation, and the version's template.yml (./template-spec.ts)
|
|
10
|
+
* for its inputs. It reads no engine field: the inputs' kinds are
|
|
11
|
+
* engine-neutral.
|
|
12
|
+
*/
|
|
13
|
+
import { type AttestationState, type ReleaseCatalog } from "../lifecycle/release-catalog.js";
|
|
14
|
+
import { type TemplateSpec } from "./template-spec.js";
|
|
15
|
+
/** The first chant that writes and reads template-request/v1 and template.yml/v1 (#4651). */
|
|
16
|
+
export declare const TEMPLATE_REQUEST_FLOOR = "0.124.58";
|
|
17
|
+
/** The request document's `$schema`. */
|
|
18
|
+
export declare const TEMPLATE_REQUEST_SCHEMA_ID: string;
|
|
19
|
+
/** The request's contract version. */
|
|
20
|
+
export declare const TEMPLATE_REQUEST_CONTRACT = 1;
|
|
21
|
+
/** An app or add-on name: a lowercase letter, then up to 39 lowercase letters, digits and -. */
|
|
22
|
+
export declare const REQUEST_NAME_PATTERN: RegExp;
|
|
23
|
+
/** Where a request came from. */
|
|
24
|
+
export type TemplateRequestVia = "form" | "mcp" | "cli";
|
|
25
|
+
/** A template request. */
|
|
26
|
+
export interface TemplateRequest {
|
|
27
|
+
$schema: string;
|
|
28
|
+
contract: 1;
|
|
29
|
+
kind: "app" | "addon";
|
|
30
|
+
/** The template's address, such as `acme/bucket/aws`. */
|
|
31
|
+
template: string;
|
|
32
|
+
/** The version in the catalog, or a digest for a release that names none. */
|
|
33
|
+
version: string;
|
|
34
|
+
app: string;
|
|
35
|
+
/** For kind `addon`: the add-on's name. */
|
|
36
|
+
addon?: string;
|
|
37
|
+
/** The values given, by input name. */
|
|
38
|
+
inputs: Record<string, unknown>;
|
|
39
|
+
/** Who asked, as the forge vouches for it: the login of the run's actor. */
|
|
40
|
+
requestedBy: string;
|
|
41
|
+
/**
|
|
42
|
+
* The person the client says filled the form or asked the agent, when it
|
|
43
|
+
* names one. The forge does not vouch for it; it is shown as claimed.
|
|
44
|
+
*/
|
|
45
|
+
claimedBy?: string;
|
|
46
|
+
via: TemplateRequestVia;
|
|
47
|
+
}
|
|
48
|
+
/** The fields a caller gives {@link makeTemplateRequest}; `$schema` and `contract` are filled in. */
|
|
49
|
+
export type TemplateRequestInput = Omit<TemplateRequest, "$schema" | "contract">;
|
|
50
|
+
/**
|
|
51
|
+
* Why a request is refused. `invalid` is a document the schema refuses for
|
|
52
|
+
* a reason no other code names (a missing field, a `via` it does not know).
|
|
53
|
+
*/
|
|
54
|
+
export type TemplateRequestRefusalCode = "unknown-version" | "not-active" | "unsigned" | "unknown-input" | "missing-input" | "sensitive-input" | "input-type" | "bad-name" | "invalid";
|
|
55
|
+
/** Every refusal code, in the order {@link checkTemplateRequest} checks them. */
|
|
56
|
+
export declare const TEMPLATE_REQUEST_REFUSAL_CODES: readonly TemplateRequestRefusalCode[];
|
|
57
|
+
/** One refusal: its code, the request field it is about, and a sentence naming that field. */
|
|
58
|
+
export interface TemplateRequestRefusal {
|
|
59
|
+
code: TemplateRequestRefusalCode;
|
|
60
|
+
/** `app`, `addon`, `version`, `inputs.<name>`, or the schema path for `invalid`. */
|
|
61
|
+
field: string;
|
|
62
|
+
reason: string;
|
|
63
|
+
}
|
|
64
|
+
export type TemplateRequestCheck = {
|
|
65
|
+
ok: true;
|
|
66
|
+
request: TemplateRequest;
|
|
67
|
+
} | {
|
|
68
|
+
ok: false;
|
|
69
|
+
refusals: TemplateRequestRefusal[];
|
|
70
|
+
};
|
|
71
|
+
export interface CheckTemplateRequestOptions {
|
|
72
|
+
/**
|
|
73
|
+
* The catalog component the template is. Absent: the component named
|
|
74
|
+
* `request.template`. A product that lists components by path looks the
|
|
75
|
+
* address up itself and passes the name here.
|
|
76
|
+
*/
|
|
77
|
+
component?: string;
|
|
78
|
+
/** The lowest attestation a version may have. Default `signed`; `unsigned` accepts any. */
|
|
79
|
+
require?: AttestationState;
|
|
80
|
+
}
|
|
81
|
+
/** Fill `$schema` and `contract` into a request. */
|
|
82
|
+
export declare function makeTemplateRequest(input: TemplateRequestInput): TemplateRequest;
|
|
83
|
+
/** The schema problems of a request document, one line each; empty when it is valid. */
|
|
84
|
+
export declare function validateTemplateRequest(doc: unknown): string[];
|
|
85
|
+
/**
|
|
86
|
+
* Check a request against the catalog and the version's template.yml.
|
|
87
|
+
* Returns every refusal, each with its code and a reason naming the field.
|
|
88
|
+
* A bad name or a document the schema refuses stops the check there, and so
|
|
89
|
+
* does a version the catalog does not list; past that, the version's status
|
|
90
|
+
* and attestation and each input are all checked.
|
|
91
|
+
*/
|
|
92
|
+
export declare function checkTemplateRequest(request: unknown, catalog: ReleaseCatalog, templateSpec: TemplateSpec, options?: CheckTemplateRequestOptions): TemplateRequestCheck;
|
|
93
|
+
/**
|
|
94
|
+
* A template's name as a branch uses it: the second-to-last segment of an
|
|
95
|
+
* address with three or more (`acme/bucket/aws` is `bucket`), else the last.
|
|
96
|
+
*/
|
|
97
|
+
export declare function templateName(template: string): string;
|
|
98
|
+
/** The request's branch: `request/<template-name>/<app>`, and `/<addon>` after it for an add-on. */
|
|
99
|
+
export declare function requestBranch(request: Pick<TemplateRequest, "template" | "app"> & Partial<Pick<TemplateRequest, "kind" | "addon">>): string;
|
|
100
|
+
//# sourceMappingURL=template-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-request.d.ts","sourceRoot":"","sources":["../../src/template-request/template-request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAkB,KAAK,gBAAgB,EAAyB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACjI,OAAO,EAAmD,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGrG,6F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jC,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,oBAAoB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,sBAAsB,EAAE,CAAA;CAAE,CAAC;AAE9H,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAID,oDAAoD;AACpD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,GAAG,eAAe,CAehF;AAED,wFAAwF;AACxF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAE9D;AAID;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,2BAAgC,GACxC,oBAAoB,CAsEtB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,oGAAoG;AACpG,wBAAgB,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,MAAM,CAG3I"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The template request, template-request/v1 (#4651): "an app named orders
|
|
3
|
+
* from template X at version Y with these inputs", as one JSON document.
|
|
4
|
+
* terragucci, plywood and behold all turn one into a pull request, and this
|
|
5
|
+
* module is where they agree on the document, its refusals and its branch.
|
|
6
|
+
* ./request-body.ts writes the pull request body that carries it.
|
|
7
|
+
*
|
|
8
|
+
* {@link checkTemplateRequest} reads the release catalog for the version's
|
|
9
|
+
* status and attestation, and the version's template.yml (./template-spec.ts)
|
|
10
|
+
* for its inputs. It reads no engine field: the inputs' kinds are
|
|
11
|
+
* engine-neutral.
|
|
12
|
+
*/
|
|
13
|
+
import schema from "./template-request.schema.json" with { type: "json" };
|
|
14
|
+
import { NEXT_RELEASE } from "../release-floors.js";
|
|
15
|
+
import { catalogVersion } from "../lifecycle/release-catalog.js";
|
|
16
|
+
import { inputKindProblem, inputRequired, isAppOutputRef } from "./template-spec.js";
|
|
17
|
+
import { schemaProblems } from "./validate.js";
|
|
18
|
+
/** The first chant that writes and reads template-request/v1 and template.yml/v1 (#4651). */
|
|
19
|
+
export const TEMPLATE_REQUEST_FLOOR = NEXT_RELEASE;
|
|
20
|
+
/** The request document's `$schema`. */
|
|
21
|
+
export const TEMPLATE_REQUEST_SCHEMA_ID = schema.$id;
|
|
22
|
+
/** The request's contract version. */
|
|
23
|
+
export const TEMPLATE_REQUEST_CONTRACT = 1;
|
|
24
|
+
/** An app or add-on name: a lowercase letter, then up to 39 lowercase letters, digits and -. */
|
|
25
|
+
export const REQUEST_NAME_PATTERN = /^[a-z][a-z0-9-]{0,39}$/;
|
|
26
|
+
/** Every refusal code, in the order {@link checkTemplateRequest} checks them. */
|
|
27
|
+
export const TEMPLATE_REQUEST_REFUSAL_CODES = [
|
|
28
|
+
"bad-name",
|
|
29
|
+
"invalid",
|
|
30
|
+
"unknown-version",
|
|
31
|
+
"not-active",
|
|
32
|
+
"unsigned",
|
|
33
|
+
"unknown-input",
|
|
34
|
+
"sensitive-input",
|
|
35
|
+
"input-type",
|
|
36
|
+
"missing-input",
|
|
37
|
+
];
|
|
38
|
+
const ATTESTATION_RANK = { unsigned: 0, signed: 1, verified: 2 };
|
|
39
|
+
/** Fill `$schema` and `contract` into a request. */
|
|
40
|
+
export function makeTemplateRequest(input) {
|
|
41
|
+
const { kind, template, version, app, addon, inputs, requestedBy, claimedBy, via } = input;
|
|
42
|
+
return {
|
|
43
|
+
$schema: TEMPLATE_REQUEST_SCHEMA_ID,
|
|
44
|
+
contract: TEMPLATE_REQUEST_CONTRACT,
|
|
45
|
+
kind,
|
|
46
|
+
template,
|
|
47
|
+
version,
|
|
48
|
+
app,
|
|
49
|
+
...(addon !== undefined ? { addon } : {}),
|
|
50
|
+
inputs,
|
|
51
|
+
requestedBy,
|
|
52
|
+
...(claimedBy !== undefined ? { claimedBy } : {}),
|
|
53
|
+
via,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** The schema problems of a request document, one line each; empty when it is valid. */
|
|
57
|
+
export function validateTemplateRequest(doc) {
|
|
58
|
+
return schemaProblems(TEMPLATE_REQUEST_SCHEMA_ID, doc);
|
|
59
|
+
}
|
|
60
|
+
const isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
61
|
+
/**
|
|
62
|
+
* Check a request against the catalog and the version's template.yml.
|
|
63
|
+
* Returns every refusal, each with its code and a reason naming the field.
|
|
64
|
+
* A bad name or a document the schema refuses stops the check there, and so
|
|
65
|
+
* does a version the catalog does not list; past that, the version's status
|
|
66
|
+
* and attestation and each input are all checked.
|
|
67
|
+
*/
|
|
68
|
+
export function checkTemplateRequest(request, catalog, templateSpec, options = {}) {
|
|
69
|
+
const refused = (refusals) => ({ ok: false, refusals });
|
|
70
|
+
// Names first, so a bad one reads as bad-name and not as a schema pattern.
|
|
71
|
+
const names = [];
|
|
72
|
+
const probe = isRecord(request) ? { ...request } : {};
|
|
73
|
+
for (const field of ["app", "addon"]) {
|
|
74
|
+
const v = probe[field];
|
|
75
|
+
if (typeof v !== "string" || REQUEST_NAME_PATTERN.test(v))
|
|
76
|
+
continue;
|
|
77
|
+
names.push({
|
|
78
|
+
code: "bad-name",
|
|
79
|
+
field,
|
|
80
|
+
reason: `${field} ${JSON.stringify(v)} is not a name: a lowercase letter, then up to 39 lowercase letters, digits and -`,
|
|
81
|
+
});
|
|
82
|
+
probe[field] = "x";
|
|
83
|
+
}
|
|
84
|
+
if (names.length > 0)
|
|
85
|
+
return refused(names);
|
|
86
|
+
const problems = validateTemplateRequest(isRecord(request) ? probe : request);
|
|
87
|
+
if (problems.length > 0) {
|
|
88
|
+
return refused(problems.map((p) => ({ code: "invalid", field: p.split(" ")[0], reason: `the request ${p}` })));
|
|
89
|
+
}
|
|
90
|
+
const req = request;
|
|
91
|
+
const componentName = options.component ?? req.template;
|
|
92
|
+
const component = catalog.components.find((c) => c.name === componentName);
|
|
93
|
+
if (!component) {
|
|
94
|
+
return refused([{ code: "unknown-version", field: "version", reason: `version ${JSON.stringify(req.version)}: the catalog lists no template ${JSON.stringify(componentName)}` }]);
|
|
95
|
+
}
|
|
96
|
+
const version = catalogVersion(catalog, component.name, req.version);
|
|
97
|
+
if (!version) {
|
|
98
|
+
const listed = component.versions.map((v) => v.version ?? v.digest).join(", ") || "none";
|
|
99
|
+
return refused([{ code: "unknown-version", field: "version", reason: `version ${JSON.stringify(req.version)} of ${req.template} is not in the catalog (it lists ${listed})` }]);
|
|
100
|
+
}
|
|
101
|
+
const refusals = [];
|
|
102
|
+
if (version.status.state !== "active") {
|
|
103
|
+
const instead = version.status.replacement ? `; use ${version.status.replacement}` : "";
|
|
104
|
+
refusals.push({ code: "not-active", field: "version", reason: `version ${req.version} of ${req.template} is ${version.status.state}${instead}` });
|
|
105
|
+
}
|
|
106
|
+
const require = options.require ?? "signed";
|
|
107
|
+
if (ATTESTATION_RANK[version.attestation.state] < ATTESTATION_RANK[require]) {
|
|
108
|
+
refusals.push({ code: "unsigned", field: "version", reason: `version ${req.version} of ${req.template} is ${version.attestation.state}, and requests need ${require}` });
|
|
109
|
+
}
|
|
110
|
+
const byName = new Map(templateSpec.inputs.map((i) => [i.name, i]));
|
|
111
|
+
for (const [name, value] of Object.entries(req.inputs)) {
|
|
112
|
+
const field = `inputs.${name}`;
|
|
113
|
+
const input = byName.get(name);
|
|
114
|
+
if (!input) {
|
|
115
|
+
refusals.push({ code: "unknown-input", field, reason: `${field}: ${req.template} ${req.version} has no input ${JSON.stringify(name)}` });
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (input.sensitive) {
|
|
119
|
+
refusals.push({ code: "sensitive-input", field, reason: `${field} is sensitive, and a request is written into a pull request; the app reads it from its secret store` });
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
// An add-on's `app.<output>` names the app module's output; the renderer resolves it.
|
|
123
|
+
if (req.addon !== undefined && isAppOutputRef(value))
|
|
124
|
+
continue;
|
|
125
|
+
const p = inputKindProblem(input, value);
|
|
126
|
+
if (!p)
|
|
127
|
+
continue;
|
|
128
|
+
const why = isAppOutputRef(value) ? `; ${JSON.stringify(value)} reads as an app output, and only an add-on request can name one` : "";
|
|
129
|
+
refusals.push({ code: "input-type", field, reason: `${field} ${p}${why}` });
|
|
130
|
+
}
|
|
131
|
+
for (const input of templateSpec.inputs) {
|
|
132
|
+
if (input.sensitive || !inputRequired(input) || input.name in req.inputs)
|
|
133
|
+
continue;
|
|
134
|
+
refusals.push({ code: "missing-input", field: `inputs.${input.name}`, reason: `inputs.${input.name} is required by ${req.template} ${req.version} and the request gives none` });
|
|
135
|
+
}
|
|
136
|
+
return refusals.length > 0 ? refused(refusals) : { ok: true, request: req };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A template's name as a branch uses it: the second-to-last segment of an
|
|
140
|
+
* address with three or more (`acme/bucket/aws` is `bucket`), else the last.
|
|
141
|
+
*/
|
|
142
|
+
export function templateName(template) {
|
|
143
|
+
const parts = template.split("/").filter(Boolean);
|
|
144
|
+
return (parts.length >= 3 ? parts[parts.length - 2] : parts[parts.length - 1]) ?? template;
|
|
145
|
+
}
|
|
146
|
+
/** The request's branch: `request/<template-name>/<app>`, and `/<addon>` after it for an add-on. */
|
|
147
|
+
export function requestBranch(request) {
|
|
148
|
+
const base = `request/${templateName(request.template)}/${request.app}`;
|
|
149
|
+
return request.addon !== undefined ? `${base}/${request.addon}` : base;
|
|
150
|
+
}
|