@modernedi/configuration-runner 0.2.0-rc.0

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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one of
111
+ the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor has
163
+ been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 ModernEDI
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,106 @@
1
+ # ModernEDI configuration runner
2
+
3
+ `@modernedi/configuration-runner` is a small, vendor-neutral automation runner for ModernEDI configuration as code. It turns a portable bundle directory into a reviewable plan, then applies only the exact plan that was reviewed. It is intentionally not a general ModernEDI CLI and does not duplicate server-side validation.
4
+
5
+ The runner works in any CI system that can run Node.js 20 or later. Vendor-specific workflows should remain thin adapters around these three commands.
6
+
7
+ ## Install and run
8
+
9
+ Use an exact package version in protected automation. The examples below use the aggregate scenario-capable release:
10
+
11
+ ```sh
12
+ npx --yes @modernedi/configuration-runner@0.2.0 plan \
13
+ --bundle ./modernedi \
14
+ --plan-out ./artifacts/plan.json
15
+ ```
16
+
17
+ The package depends on the exact `@modernedi/sdk@0.3.0` API contract.
18
+
19
+ Set these environment variables through your CI secret store:
20
+
21
+ - `MODERNEDI_API_KEY` — required; a read-capable key is sufficient for `plan` and `wait`, while `apply-reviewed` requires configuration write access.
22
+ - `MODERNEDI_API_URL` — optional API base URL override.
23
+ - `MODERNEDI_APP_URL` — optional workspace base URL override. Result artifacts otherwise link to `https://app.modernedi.com/`.
24
+ - `MODERNEDI_IDEMPOTENCY_KEY` — required only for `apply-reviewed`. Persist one stable, non-secret deployment identity and reuse it when retrying the same apply. Leading or trailing whitespace is rejected.
25
+
26
+ ## Bundle boundary
27
+
28
+ The same bundle can contain AS2 connections, partners, mappings, scenario definitions, and scenario bindings. Scenarios remain optional. Binding source uses portable `partnerKey` and `mappingKey` references; resolved runtime IDs, automatic syntax-tree pins, and run evidence are not authored repository configuration. See the [scenario configuration guide](https://www.modernedi.com/docs/scenarios/reference#configuration-and-git).
29
+
30
+ `--bundle` names an editable directory containing `modernedi.json`. The runner submits only the files inventoried by that manifest. It rejects absolute paths, traversal, Windows drive/stream syntax, `_state`, invalid UTF-8, missing files, duplicate case-folded paths, and any symlink in an inventoried path. Extra files are ignored rather than uploaded.
31
+
32
+ JSON manifest and resource hashes are calculated from recursively key-sorted compact JSON. Source-file hashes use their exact bytes. Paths are ordered by a stable code-unit comparison, independent of the host locale.
33
+
34
+ Edit JSON with your usual indentation, property ordering, and final newline. Edit mapping source directly. The runner derives `transform.sourceSha256` and both manifest inventories' `contentSha256` values in memory; you do not update checksums by hand, and your files are not rewritten. Automatic external Git synchronization uses the same preparation rules. Formatting-only JSON edits produce the same desired configuration; whitespace changes in mapping source remain real source changes.
35
+
36
+ Keep resource keys and paths stable. When adding or removing resources or source files, update the explicit `modernedi.json` inventory too. Missing inventoried files still fail validation; they are not interpreted as accidental deletions. The prepared API request and reviewed plan remain strict, checksummed artifacts, and `apply-reviewed` still rejects semantic changes made after review.
37
+
38
+ ModernEDI remains authoritative for document shape, mapping compilation, semantic validation, scenario impact, and the resulting plan identity.
39
+
40
+ ## Plan in review automation
41
+
42
+ Run with a read-capable key on a proposed bundle:
43
+
44
+ ```sh
45
+ npx --yes @modernedi/configuration-runner@0.2.0 plan \
46
+ --bundle ./modernedi \
47
+ --plan-out ./artifacts/plan.json
48
+ ```
49
+
50
+ The command prints a human summary and writes deterministic `plan.json`. Preserve that file as the reviewed build artifact. A plan with validation errors is still written, but the command exits `2` and the artifact has `planSha256: null`.
51
+
52
+ `plan.json` contains both identities that later authorize deployment and the complete wire plan reviewers saw. Editing the embedded operations or diagnostics without changing the top-level hashes does not authorize an apply: protected apply compares the entire freshly generated wire plan exactly.
53
+
54
+ ## Apply after protected merge
55
+
56
+ Download the reviewed `plan.json`, check out the exact protected revision, and supply a persisted idempotency key:
57
+
58
+ ```sh
59
+ export MODERNEDI_IDEMPOTENCY_KEY="production:configuration:build-1842"
60
+
61
+ npx --yes @modernedi/configuration-runner@0.2.0 apply-reviewed \
62
+ --bundle ./modernedi \
63
+ --reviewed-plan ./artifacts/plan.json \
64
+ --result-out ./artifacts/result.json \
65
+ --timeout-seconds 900
66
+ ```
67
+
68
+ Before applying, the runner reloads the bundle, re-plans against the workspace's current state, and requires an exact match of:
69
+
70
+ - the desired bundle SHA-256;
71
+ - the plan SHA-256;
72
+ - the complete plan JSON, including operations, diagnostics, validation context, and scenario impact.
73
+
74
+ It then submits the exact desired files with the fresh plan's exact `If-Match` ETag and the caller's idempotency key. Drift fails closed without an apply call.
75
+
76
+ As soon as the server accepts the apply, `result.json` is written atomically with the `PENDING` operation. It is updated after every poll and on `SUCCEEDED`. If polling times out, the database transaction may already be committed; do not submit a new apply merely to resume observation.
77
+
78
+ ## Resume a pending operation
79
+
80
+ Use the stored result artifact and a read-capable key:
81
+
82
+ ```sh
83
+ npx --yes @modernedi/configuration-runner@0.2.0 wait \
84
+ --result ./artifacts/result.json \
85
+ --timeout-seconds 900
86
+ ```
87
+
88
+ `wait` reads only the recorded operation ID, verifies returned bundle and plan identities, and atomically updates the same file. Use `--result-out <path>` to preserve the input separately. A completed result includes a deep link to the corresponding deployment in the ModernEDI workspace.
89
+
90
+ ## Artifact schemas
91
+
92
+ Both public automation artifacts use `apiVersion: modernedi.com/configuration-runner/v1` and have closed JSON Schemas:
93
+
94
+ - [`schemas/configuration-plan-artifact.schema.json`](./schemas/configuration-plan-artifact.schema.json)
95
+ - [`schemas/configuration-apply-result-artifact.schema.json`](./schemas/configuration-apply-result-artifact.schema.json)
96
+
97
+ The schemas are included in the npm package for editor, policy, and artifact-validation tooling. The result schema references definitions in the adjacent plan schema, so keep both files together.
98
+
99
+ ## Exit codes
100
+
101
+ - `0` — plan applicable, apply succeeded, or wait observed success.
102
+ - `2` — local bundle problem or server plan not applicable.
103
+ - `3` — reviewed evidence mismatch or drift.
104
+ - `4` — stored/pending apply could not be observed to completion within the bound.
105
+ - `64` — usage or required environment configuration error.
106
+ - `1` — API or unexpected runtime failure.
@@ -0,0 +1,27 @@
1
+ import { type ConfigurationApplyOperationResponse, type ConfigurationPlanResponse } from "@modernedi/sdk";
2
+ import { type JsonValue } from "./canonical-json.js";
3
+ export declare const RUNNER_ARTIFACT_API_VERSION = "modernedi.com/configuration-runner/v1";
4
+ export interface ConfigurationPlanArtifact {
5
+ apiVersion: typeof RUNNER_ARTIFACT_API_VERSION;
6
+ kind: "ConfigurationPlanArtifact";
7
+ desiredBundleSha256: string;
8
+ planSha256: string | null;
9
+ plan: Record<string, JsonValue>;
10
+ }
11
+ export interface ConfigurationApplyResultArtifact {
12
+ apiVersion: typeof RUNNER_ARTIFACT_API_VERSION;
13
+ kind: "ConfigurationApplyResultArtifact";
14
+ reviewed: {
15
+ desiredBundleSha256: string;
16
+ planSha256: string;
17
+ };
18
+ idempotencyReplayed: boolean | null;
19
+ workspaceUrl: string;
20
+ operation: Record<string, JsonValue>;
21
+ }
22
+ export declare function configurationPlanArtifact(plan: ConfigurationPlanResponse): ConfigurationPlanArtifact;
23
+ export declare function configurationApplyResultArtifact(reviewed: Pick<ConfigurationPlanArtifact, "desiredBundleSha256" | "planSha256">, result: ConfigurationApplyOperationResponse, idempotencyReplayed: boolean | null, appUrl?: string): ConfigurationApplyResultArtifact;
24
+ export declare function readConfigurationApplyResultArtifact(artifactPath: string): Promise<ConfigurationApplyResultArtifact>;
25
+ export declare function readConfigurationPlanArtifact(artifactPath: string): Promise<ConfigurationPlanArtifact>;
26
+ export declare function writeArtifact(artifactPath: string, artifact: ConfigurationPlanArtifact | ConfigurationApplyResultArtifact): Promise<void>;
27
+ //# sourceMappingURL=artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC/B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MA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promises";
2
+ import path from "node:path";
3
+ import { ConfigurationApplyOperationResponseToJSON, ConfigurationPlanResponseToJSON, } from "@modernedi/sdk";
4
+ import { deterministicJson, isJsonObject, } from "./canonical-json.js";
5
+ import { runnerError } from "./errors.js";
6
+ export const RUNNER_ARTIFACT_API_VERSION = "modernedi.com/configuration-runner/v1";
7
+ export function configurationPlanArtifact(plan) {
8
+ const wirePlan = plainJsonObject(ConfigurationPlanResponseToJSON(plan));
9
+ return {
10
+ apiVersion: RUNNER_ARTIFACT_API_VERSION,
11
+ kind: "ConfigurationPlanArtifact",
12
+ desiredBundleSha256: plan.desiredBundleSha256,
13
+ planSha256: plan.planSha256,
14
+ plan: wirePlan,
15
+ };
16
+ }
17
+ export function configurationApplyResultArtifact(reviewed, result, idempotencyReplayed, appUrl = "https://app.modernedi.com/") {
18
+ if (reviewed.planSha256 === null) {
19
+ throw runnerError("REVIEWED_PLAN_NOT_APPLICABLE", "Reviewed plan artifact does not contain an applicable plan identity.", 3);
20
+ }
21
+ const wire = plainJsonObject(ConfigurationApplyOperationResponseToJSON(result));
22
+ const operation = wire.operation;
23
+ if (!isJsonObject(operation)) {
24
+ throw runnerError("APPLY_RESULT_INVALID", "ModernEDI returned an invalid configuration apply operation.");
25
+ }
26
+ return {
27
+ apiVersion: RUNNER_ARTIFACT_API_VERSION,
28
+ kind: "ConfigurationApplyResultArtifact",
29
+ reviewed: {
30
+ desiredBundleSha256: reviewed.desiredBundleSha256,
31
+ planSha256: reviewed.planSha256,
32
+ },
33
+ idempotencyReplayed,
34
+ workspaceUrl: configurationOperationUrl(appUrl, String(operation.operationId)),
35
+ operation,
36
+ };
37
+ }
38
+ export async function readConfigurationApplyResultArtifact(artifactPath) {
39
+ let parsed;
40
+ try {
41
+ parsed = JSON.parse(await readFile(artifactPath, "utf8"));
42
+ }
43
+ catch (error) {
44
+ throw runnerError("APPLY_RESULT_UNREADABLE", `Apply result artifact could not be read: ${error instanceof Error ? error.message : String(error)}.`, 4);
45
+ }
46
+ if (!isJsonObject(parsed)) {
47
+ throw invalidApplyResult("artifact must be a JSON object");
48
+ }
49
+ assertExactKeys(parsed, [
50
+ "apiVersion",
51
+ "kind",
52
+ "reviewed",
53
+ "idempotencyReplayed",
54
+ "workspaceUrl",
55
+ "operation",
56
+ ], invalidApplyResult);
57
+ if (parsed.apiVersion !== RUNNER_ARTIFACT_API_VERSION
58
+ || parsed.kind !== "ConfigurationApplyResultArtifact") {
59
+ throw invalidApplyResult("artifact identity is unsupported");
60
+ }
61
+ if (!isJsonObject(parsed.reviewed)) {
62
+ throw invalidApplyResult("reviewed must be an object");
63
+ }
64
+ assertExactKeys(parsed.reviewed, ["desiredBundleSha256", "planSha256"], invalidApplyResult);
65
+ const desiredBundleSha256 = requireSha256(parsed.reviewed.desiredBundleSha256, "reviewed.desiredBundleSha256", invalidApplyResult);
66
+ const planSha256 = requireSha256(parsed.reviewed.planSha256, "reviewed.planSha256", invalidApplyResult);
67
+ if (parsed.idempotencyReplayed !== null
68
+ && typeof parsed.idempotencyReplayed !== "boolean") {
69
+ throw invalidApplyResult("idempotencyReplayed must be boolean or null");
70
+ }
71
+ if (typeof parsed.workspaceUrl !== "string") {
72
+ throw invalidApplyResult("workspaceUrl must be a string");
73
+ }
74
+ if (!isJsonObject(parsed.operation)) {
75
+ throw invalidApplyResult("operation must be an object");
76
+ }
77
+ assertExactKeys(parsed.operation, [
78
+ "operationId",
79
+ "status",
80
+ "desiredBundleSha256",
81
+ "planSha256",
82
+ "baseSnapshotEtag",
83
+ "appliedSnapshotEtag",
84
+ "runtimeConfigurationRevision",
85
+ "summary",
86
+ "operations",
87
+ "runtimePublication",
88
+ "requestedAt",
89
+ "committedAt",
90
+ "completedAt",
91
+ ], invalidApplyResult);
92
+ if (typeof parsed.operation.operationId !== "string"
93
+ || !/^apply-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u
94
+ .test(parsed.operation.operationId)) {
95
+ throw invalidApplyResult("operation.operationId is invalid");
96
+ }
97
+ if (parsed.operation.status !== "PENDING"
98
+ && parsed.operation.status !== "SUCCEEDED") {
99
+ throw invalidApplyResult("operation.status is unsupported");
100
+ }
101
+ if (parsed.operation.desiredBundleSha256 !== desiredBundleSha256
102
+ || parsed.operation.planSha256 !== planSha256) {
103
+ throw invalidApplyResult("reviewed identities do not match the stored operation");
104
+ }
105
+ return {
106
+ apiVersion: RUNNER_ARTIFACT_API_VERSION,
107
+ kind: "ConfigurationApplyResultArtifact",
108
+ reviewed: { desiredBundleSha256, planSha256 },
109
+ idempotencyReplayed: parsed.idempotencyReplayed,
110
+ workspaceUrl: parsed.workspaceUrl,
111
+ operation: parsed.operation,
112
+ };
113
+ }
114
+ export async function readConfigurationPlanArtifact(artifactPath) {
115
+ let parsed;
116
+ try {
117
+ parsed = JSON.parse(await readFile(artifactPath, "utf8"));
118
+ }
119
+ catch (error) {
120
+ throw runnerError("REVIEWED_PLAN_UNREADABLE", `Reviewed plan artifact could not be read: ${error instanceof Error ? error.message : String(error)}.`, 3);
121
+ }
122
+ if (!isJsonObject(parsed)) {
123
+ throw invalidReviewedPlan("artifact must be a JSON object");
124
+ }
125
+ assertExactKeys(parsed, ["apiVersion", "kind", "desiredBundleSha256", "planSha256", "plan"]);
126
+ if (parsed.apiVersion !== RUNNER_ARTIFACT_API_VERSION
127
+ || parsed.kind !== "ConfigurationPlanArtifact") {
128
+ throw invalidReviewedPlan("artifact identity is unsupported");
129
+ }
130
+ const desiredBundleSha256 = requireSha256(parsed.desiredBundleSha256, "desiredBundleSha256");
131
+ const planSha256 = requireNullableSha256(parsed.planSha256, "planSha256");
132
+ if (!isJsonObject(parsed.plan)) {
133
+ throw invalidReviewedPlan("plan must be an object");
134
+ }
135
+ if (parsed.plan.desiredBundleSha256 !== desiredBundleSha256
136
+ || parsed.plan.planSha256 !== planSha256) {
137
+ throw invalidReviewedPlan("top-level reviewed identities do not match the embedded plan");
138
+ }
139
+ if (typeof parsed.plan.applicable !== "boolean") {
140
+ throw invalidReviewedPlan("embedded plan applicable must be a boolean");
141
+ }
142
+ if (parsed.plan.applicable !== (planSha256 !== null)) {
143
+ throw invalidReviewedPlan("embedded plan applicability does not match planSha256");
144
+ }
145
+ return {
146
+ apiVersion: RUNNER_ARTIFACT_API_VERSION,
147
+ kind: "ConfigurationPlanArtifact",
148
+ desiredBundleSha256,
149
+ planSha256,
150
+ plan: parsed.plan,
151
+ };
152
+ }
153
+ export async function writeArtifact(artifactPath, artifact) {
154
+ const target = path.resolve(artifactPath);
155
+ await mkdir(path.dirname(target), { recursive: true });
156
+ const temporary = path.join(path.dirname(target), `.${path.basename(target)}.${process.pid}.tmp`);
157
+ try {
158
+ await writeFile(temporary, deterministicJson(artifact), {
159
+ encoding: "utf8",
160
+ mode: 0o600,
161
+ });
162
+ await rename(temporary, target);
163
+ }
164
+ finally {
165
+ await rm(temporary, { force: true });
166
+ }
167
+ }
168
+ function plainJsonObject(value) {
169
+ const parsed = JSON.parse(JSON.stringify(value));
170
+ if (!isJsonObject(parsed)) {
171
+ throw runnerError("ARTIFACT_SERIALIZATION_INVALID", "SDK response could not be represented as a JSON object.");
172
+ }
173
+ return parsed;
174
+ }
175
+ function assertExactKeys(value, expected, invalid = invalidReviewedPlan) {
176
+ const actual = Object.keys(value).sort();
177
+ const wanted = [...expected].sort();
178
+ if (actual.length !== wanted.length
179
+ || actual.some((key, index) => key !== wanted[index])) {
180
+ throw invalid(`artifact fields must be exactly ${wanted.join(", ")}`);
181
+ }
182
+ }
183
+ function requireSha256(value, field, invalid = invalidReviewedPlan) {
184
+ if (typeof value !== "string" || !/^[0-9a-f]{64}$/u.test(value)) {
185
+ throw invalid(`${field} must be lowercase SHA-256`);
186
+ }
187
+ return value;
188
+ }
189
+ function requireNullableSha256(value, field) {
190
+ if (value === null) {
191
+ return null;
192
+ }
193
+ return requireSha256(value, field);
194
+ }
195
+ function invalidReviewedPlan(detail) {
196
+ return runnerError("REVIEWED_PLAN_INVALID", `Reviewed plan artifact is invalid: ${detail}.`, 3);
197
+ }
198
+ function invalidApplyResult(detail) {
199
+ return runnerError("APPLY_RESULT_INVALID", `Apply result artifact is invalid: ${detail}.`, 4);
200
+ }
201
+ function configurationOperationUrl(appUrl, operationId) {
202
+ let url;
203
+ try {
204
+ url = new URL(appUrl);
205
+ }
206
+ catch {
207
+ throw runnerError("APP_URL_INVALID", "MODERNEDI_APP_URL must be an absolute HTTP or HTTPS URL.", 64);
208
+ }
209
+ if ((url.protocol !== "https:" && url.protocol !== "http:")
210
+ || url.username || url.password) {
211
+ throw runnerError("APP_URL_INVALID", "MODERNEDI_APP_URL must be an absolute HTTP or HTTPS URL without credentials.", 64);
212
+ }
213
+ url.search = "";
214
+ url.searchParams.set("configurationApplyOperationId", operationId);
215
+ url.hash = "configuration-deployments-panel";
216
+ return url.toString();
217
+ }
218
+ //# sourceMappingURL=artifacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,yCAAyC,EACzC,+BAA+B,GAGhC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,YAAY,GAEb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,MAAM,2BAA2B,GACtC,uCAAuC,CAAC;AAsB1C,MAAM,UAAU,yBAAyB,CACvC,IAA+B;IAE/B,MAAM,QAAQ,GAAG,eAAe,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,OAAO;QACL,UAAU,EAAE,2BAA2B;QACvC,IAAI,EAAE,2BAA2B;QACjC,mBAAmB,EAAE,IAAI,CAAC,mBAAm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C/C,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAc;IACxC,OAAO,WAAW,CAChB,sBAAsB,EACtB,qCAAqC,MAAM,GAAG,EAC9C,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB,CAAC,MAAc,EAAE,WAAmB;IACpE,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,WAAW,CACf,iBAAiB,EACjB,0DAA0D,EAC1D,EAAE,CACH,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,CAAC;WACtD,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClC,MAAM,WAAW,CACf,iBAAiB,EACjB,8EAA8E,EAC9E,EAAE,CACH,CAAC;IACJ,CAAC;IACD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IAChB,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,+BAA+B,EAAE,WAAW,CAAC,CAAC;IACnE,GAAG,CAAC,IAAI,GAAG,iCAAiC,CAAC;IAC7C,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type ConfigurationPlanRequest } from "@modernedi/sdk";
2
+ export interface LoadedConfigurationBundle {
3
+ request: ConfigurationPlanRequest;
4
+ bundleSha256: string;
5
+ }
6
+ export declare function loadConfigurationBundleDirectory(bundleDirectory: string): Promise<LoadedConfigurationBundle>;
7
+ //# sourceMappingURL=bundle-directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-directory.d.ts","sourceRoot":"","sources":["../src/bundle-directory.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,wBAAwB,EAC9B,MAAM,gBAAgB,CAAC;AAgCxB,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,wBAAwB,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,gCAAgC,CACpD,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,yBAAyB,CAAC,CAgHpC"}