@intentius/chant 0.49.0 → 0.50.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/dist/audit/catalog.d.ts +13 -3
- package/dist/audit/catalog.d.ts.map +1 -1
- package/dist/audit/core.d.ts +9 -0
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts +6 -0
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/fetch.d.ts.map +1 -1
- package/dist/audit/report-html.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +6 -0
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/report.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/audit/secrets.d.ts +95 -0
- package/dist/audit/secrets.d.ts.map +1 -0
- package/dist/audit/wrangler.d.ts +33 -0
- package/dist/audit/wrangler.d.ts.map +1 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts +7 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts +23 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts +31 -0
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts +11 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +32 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -0
- package/dist/cli/handlers/scenario.d.ts +39 -0
- package/dist/cli/handlers/scenario.d.ts.map +1 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/server.d.ts +35 -2
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/types.d.ts +29 -1
- package/dist/cli/mcp/types.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +14 -2
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/docs-rule-scanning.d.ts.map +1 -1
- package/dist/components/capability.d.ts +17 -2
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +7 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +15 -0
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/verbs/index.d.ts +6 -1
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/run-agent.d.ts +499 -0
- package/dist/components/verbs/run-agent.d.ts.map +1 -0
- package/dist/components/verbs/sign.d.ts +30 -0
- package/dist/components/verbs/sign.d.ts.map +1 -1
- package/dist/composite.d.ts +6 -1
- package/dist/composite.d.ts.map +1 -1
- package/dist/discovery/collect.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +15 -1
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/fold-rank.d.ts +66 -0
- package/dist/discovery/fold-rank.d.ts.map +1 -0
- package/dist/discovery/index.d.ts +15 -0
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +17 -0
- package/dist/discovery/param-deps.d.ts.map +1 -0
- package/dist/fold/fold.d.ts +55 -2
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/fold/subset.d.ts +21 -14
- package/dist/fold/subset.d.ts.map +1 -1
- package/dist/lexicon-schema.d.ts +2 -0
- package/dist/lexicon-schema.d.ts.map +1 -1
- package/dist/lexicon.d.ts +93 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/converge-ledger.d.ts +90 -0
- package/dist/lifecycle/converge-ledger.d.ts.map +1 -0
- package/dist/lifecycle/deep-diff.d.ts +18 -0
- package/dist/lifecycle/deep-diff.d.ts.map +1 -1
- package/dist/lifecycle/deep-observe.d.ts +9 -1
- package/dist/lifecycle/deep-observe.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +33 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +145 -21
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/lease.d.ts +113 -0
- package/dist/lifecycle/lease.d.ts.map +1 -0
- package/dist/lifecycle/scenario-eval.d.ts +42 -0
- package/dist/lifecycle/scenario-eval.d.ts.map +1 -0
- package/dist/lifecycle/scenario.d.ts +163 -0
- package/dist/lifecycle/scenario.d.ts.map +1 -0
- package/dist/lifecycle/symptoms.d.ts +63 -0
- package/dist/lifecycle/symptoms.d.ts.map +1 -0
- package/dist/lint/output-docs.d.ts +94 -0
- package/dist/lint/output-docs.d.ts.map +1 -0
- package/dist/lint/post-synth.d.ts +29 -0
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.d.ts +11 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.d.ts.map +1 -0
- package/dist/lsp/lexicon-providers.d.ts +7 -0
- package/dist/lsp/lexicon-providers.d.ts.map +1 -1
- package/dist/op/activity-contract.d.ts +139 -0
- package/dist/op/activity-contract.d.ts.map +1 -0
- package/dist/op/builders.d.ts +42 -2
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/converge-rule.d.ts +161 -0
- package/dist/op/converge-rule.d.ts.map +1 -0
- package/dist/op/generate-pipeline.d.ts +39 -0
- package/dist/op/generate-pipeline.d.ts.map +1 -0
- package/dist/op/index.d.ts +14 -0
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/op-verb-class.d.ts +42 -0
- package/dist/op/op-verb-class.d.ts.map +1 -0
- package/dist/op/operator.d.ts +128 -0
- package/dist/op/operator.d.ts.map +1 -0
- package/dist/op/step-output-ref.d.ts +187 -0
- package/dist/op/step-output-ref.d.ts.map +1 -0
- package/dist/op/types.d.ts +18 -1
- package/dist/op/types.d.ts.map +1 -1
- package/dist/provenance.d.ts +73 -3
- package/dist/provenance.d.ts.map +1 -1
- package/dist/runtime-adapter.d.ts +7 -1
- package/dist/runtime-adapter.d.ts.map +1 -1
- package/dist/serializer.d.ts +18 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/toml.d.ts +40 -5
- package/dist/toml.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/audit/catalog.test.ts +1 -1
- package/src/audit/catalog.ts +75 -3
- package/src/audit/core.ts +9 -0
- package/src/audit/discover.ts +29 -2
- package/src/audit/fetch.test.ts +216 -3
- package/src/audit/fetch.ts +270 -59
- package/src/audit/report-html.ts +5 -2
- package/src/audit/report-model.ts +9 -0
- package/src/audit/report.test.ts +22 -0
- package/src/audit/report.ts +3 -2
- package/src/audit/rules-doc.ts +2 -0
- package/src/audit/secrets.test.ts +303 -0
- package/src/audit/secrets.ts +406 -0
- package/src/audit/wrangler.test.ts +230 -0
- package/src/audit/wrangler.ts +290 -0
- package/src/build.ts +8 -3
- package/src/cli/command-group.ts +1 -1
- package/src/cli/commands/__fixtures__/schemas/sarif-2.1.0.schema.json +2882 -0
- package/src/cli/commands/audit.test.ts +215 -1
- package/src/cli/commands/audit.ts +86 -17
- package/src/cli/commands/build.test.ts +167 -2
- package/src/cli/commands/build.ts +114 -23
- package/src/cli/handlers/build.ts +2 -0
- package/src/cli/handlers/components.test.ts +199 -1
- package/src/cli/handlers/components.ts +160 -3
- package/src/cli/handlers/graph.test.ts +20 -0
- package/src/cli/handlers/graph.ts +10 -1
- package/src/cli/handlers/lifecycle.ts +12 -4
- package/src/cli/handlers/operator.test.ts +255 -0
- package/src/cli/handlers/operator.ts +240 -0
- package/src/cli/handlers/scenario.test.ts +456 -0
- package/src/cli/handlers/scenario.ts +330 -0
- package/src/cli/main.test.ts +23 -0
- package/src/cli/main.ts +72 -1
- package/src/cli/mcp/server.test.ts +265 -2
- package/src/cli/mcp/server.ts +84 -7
- package/src/cli/mcp/types.ts +27 -1
- package/src/cli/registry.ts +14 -2
- package/src/codegen/docs-rule-scanning.test.ts +42 -0
- package/src/codegen/docs-rule-scanning.ts +25 -2
- package/src/components/README.md +7 -0
- package/src/components/capability.ts +17 -2
- package/src/components/cli-support.test.ts +17 -0
- package/src/components/cli-support.ts +13 -1
- package/src/components/component-schema.test.ts +32 -0
- package/src/components/component.schema.json +6 -0
- package/src/components/component.test.ts +21 -0
- package/src/components/component.ts +15 -0
- package/src/components/driver.ts +12 -4
- package/src/components/verbs/index.ts +6 -1
- package/src/components/verbs/run-agent.test.ts +683 -0
- package/src/components/verbs/run-agent.ts +786 -0
- package/src/components/verbs/sign.test.ts +19 -0
- package/src/components/verbs/sign.ts +34 -2
- package/src/composite.ts +31 -2
- package/src/discovery/collect.ts +11 -2
- package/src/discovery/fold-import.test.ts +54 -0
- package/src/discovery/fold-import.ts +178 -38
- package/src/discovery/fold-rank.test.ts +197 -0
- package/src/discovery/fold-rank.ts +346 -0
- package/src/discovery/index.ts +16 -1
- package/src/discovery/param-deps.test.ts +118 -0
- package/src/discovery/param-deps.ts +170 -0
- package/src/fold/fold.test.ts +6 -2
- package/src/fold/fold.ts +184 -3
- package/src/fold/subset.test.ts +82 -19
- package/src/fold/subset.ts +79 -41
- package/src/lexicon-schema.ts +3 -0
- package/src/lexicon.ts +103 -2
- package/src/lifecycle/converge-ledger.test.ts +199 -0
- package/src/lifecycle/converge-ledger.ts +179 -0
- package/src/lifecycle/deep-diff.test.ts +79 -1
- package/src/lifecycle/deep-diff.ts +23 -0
- package/src/lifecycle/deep-observe.ts +13 -2
- package/src/lifecycle/gate-ledger.test.ts +103 -0
- package/src/lifecycle/gate-ledger.ts +140 -0
- package/src/lifecycle/git.test.ts +430 -0
- package/src/lifecycle/git.ts +446 -84
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/lease.test.ts +343 -0
- package/src/lifecycle/lease.ts +270 -0
- package/src/lifecycle/scenario-eval.test.ts +199 -0
- package/src/lifecycle/scenario-eval.ts +158 -0
- package/src/lifecycle/scenario.test.ts +195 -0
- package/src/lifecycle/scenario.ts +321 -0
- package/src/lifecycle/symptoms.test.ts +116 -0
- package/src/lifecycle/symptoms.ts +126 -0
- package/src/lint/output-docs.test.ts +220 -0
- package/src/lint/output-docs.ts +204 -0
- package/src/lint/post-synth.test.ts +97 -0
- package/src/lint/post-synth.ts +45 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.ts +26 -0
- package/src/lint/rules/comp/comp.test.ts +49 -1
- package/src/lint/rules/evl001-non-literal-expression.test.ts +8 -3
- package/src/lint/rules/evl001-non-literal-expression.ts +6 -6
- package/src/lsp/lexicon-providers.test.ts +44 -0
- package/src/lsp/lexicon-providers.ts +11 -1
- package/src/op/activity-contract.test.ts +180 -0
- package/src/op/activity-contract.ts +278 -0
- package/src/op/builders-exports.test.ts +17 -1
- package/src/op/builders.ts +59 -5
- package/src/op/converge-rule.test.ts +179 -0
- package/src/op/converge-rule.ts +311 -0
- package/src/op/generate-pipeline.test.ts +53 -0
- package/src/op/generate-pipeline.ts +99 -0
- package/src/op/index.ts +30 -0
- package/src/op/local-executor.test.ts +92 -0
- package/src/op/local-executor.ts +45 -9
- package/src/op/op-verb-class.test.ts +126 -0
- package/src/op/op-verb-class.ts +115 -0
- package/src/op/operator.test.ts +346 -0
- package/src/op/operator.ts +213 -0
- package/src/op/step-output-ref.test.ts +334 -0
- package/src/op/step-output-ref.ts +453 -0
- package/src/op/types.ts +18 -1
- package/src/provenance.test.ts +151 -4
- package/src/provenance.ts +118 -4
- package/src/runtime-adapter.ts +31 -10
- package/src/serializer.ts +18 -0
- package/src/toml.test.ts +157 -384
- package/src/toml.ts +371 -5
|
@@ -141,6 +141,13 @@ export interface ComponentGraphResult {
|
|
|
141
141
|
* `Component` contract already specifies. This is what lets a consumer join
|
|
142
142
|
* the component DAG to the resource graph without guessing at kinds. */
|
|
143
143
|
liveNames?: Record<string, string[]>;
|
|
144
|
+
/** Component name → the composite kind name(s) its resources come from (#1492),
|
|
145
|
+
* present only for components that declared `composites` explicitly. Unlike
|
|
146
|
+
* `liveNames`, there is no identity fallback — a component's own name is not
|
|
147
|
+
* a composite kind — so an undeclared component is left out of this map
|
|
148
|
+
* entirely rather than defaulting to a guess; a consumer with no entry here
|
|
149
|
+
* keeps applying its own naming-convention default. */
|
|
150
|
+
composites?: Record<string, string[]>;
|
|
144
151
|
error?: string;
|
|
145
152
|
}
|
|
146
153
|
|
|
@@ -173,10 +180,15 @@ export async function computeComponentGraph(
|
|
|
173
180
|
// component name → owned live resource names (#1491), declared or the
|
|
174
181
|
// contract's identity fallback.
|
|
175
182
|
const liveNames: Record<string, string[]> = {};
|
|
183
|
+
// component name → declared composite kind(s) (#1492), only for components
|
|
184
|
+
// that declared them — no identity fallback (see ComponentGraphResult doc).
|
|
185
|
+
const composites: Record<string, string[]> = {};
|
|
176
186
|
for (const [name, discovered] of result.components) {
|
|
177
187
|
files[name] = relative(path, discovered.filePath);
|
|
178
188
|
const declared = discovered.component.liveNames;
|
|
179
189
|
liveNames[name] = declared && declared.length > 0 ? [...declared] : [name];
|
|
190
|
+
const declaredComposites = discovered.component.composites;
|
|
191
|
+
if (declaredComposites && declaredComposites.length > 0) composites[name] = [...declaredComposites];
|
|
180
192
|
}
|
|
181
193
|
|
|
182
194
|
try {
|
|
@@ -185,7 +197,7 @@ export async function computeComponentGraph(
|
|
|
185
197
|
for (const c of driverComponents) {
|
|
186
198
|
for (const dep of c.dependsOn ?? []) edges.push({ from: c.name, to: dep });
|
|
187
199
|
}
|
|
188
|
-
return { success: true, order, waves, edges, files, liveNames };
|
|
200
|
+
return { success: true, order, waves, edges, files, liveNames, composites };
|
|
189
201
|
} catch (err) {
|
|
190
202
|
if (err instanceof UnknownDependencyError || err instanceof DependencyCycleError) {
|
|
191
203
|
return { success: false, order: [], waves: [], edges: [], error: err.message };
|
|
@@ -143,6 +143,38 @@ describe("Component JSON Schema", () => {
|
|
|
143
143
|
expect(validate(invalid)).toBe(false);
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
+
it("accepts an optional composites list (#1492)", () => {
|
|
147
|
+
const withComposites = {
|
|
148
|
+
name: "aws-plane",
|
|
149
|
+
archetype: "infra",
|
|
150
|
+
dependsOn: [],
|
|
151
|
+
composites: ["ArtifactBucket", "OperatorRole"],
|
|
152
|
+
deploy: [{ phase: "Apply", steps: [{ kind: "cfn-deploy", template: "t.json" }] }],
|
|
153
|
+
};
|
|
154
|
+
expect(validate(withComposites)).toBe(true);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it("omitting composites still validates (backward-compatible default)", () => {
|
|
158
|
+
const noComposites = {
|
|
159
|
+
name: "table",
|
|
160
|
+
archetype: "infra",
|
|
161
|
+
dependsOn: [],
|
|
162
|
+
deploy: [{ phase: "Apply", steps: [{ kind: "cfn-deploy", template: "t.json" }] }],
|
|
163
|
+
};
|
|
164
|
+
expect(validate(noComposites)).toBe(true);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it("rejects an empty composites array (minItems: 1)", () => {
|
|
168
|
+
const invalid = {
|
|
169
|
+
name: "table",
|
|
170
|
+
archetype: "infra",
|
|
171
|
+
dependsOn: [],
|
|
172
|
+
composites: [],
|
|
173
|
+
deploy: [{ phase: "Apply", steps: [{ kind: "cfn-deploy", template: "t.json" }] }],
|
|
174
|
+
};
|
|
175
|
+
expect(validate(invalid)).toBe(false);
|
|
176
|
+
});
|
|
177
|
+
|
|
146
178
|
it("rejects an invalid archetype value", () => {
|
|
147
179
|
const invalid = {
|
|
148
180
|
name: "x",
|
|
@@ -54,6 +54,12 @@
|
|
|
54
54
|
"description": "Optional: the live lexicon entity/resource name(s) this component owns, when they differ from `name` (#598). `chant components status --live` reconciles the release ledger against live evidence by joining on this name; omitted entirely (the default), the join falls back to `name` itself with no behavior change. A component that owns several live entities (e.g. a fan-out cluster with one stack per node) may list them all.",
|
|
55
55
|
"items": { "type": "string", "minLength": 1 },
|
|
56
56
|
"minItems": 1
|
|
57
|
+
},
|
|
58
|
+
"composites": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"description": "Optional: the composite kind name(s) this component's deployed resources come from, when a consumer cannot infer it from `name` (#1492). Without this, a consumer joining a composite graph to the component DAG guesses by kebab-casing each composite's kind and matching it against this component's `name`, which only holds when a component maps 1:1 to a composite named for it. Omitted entirely (the default), the naming convention stays in effect with no behavior change. A component built from several composites may list them all.",
|
|
61
|
+
"items": { "type": "string", "minLength": 1 },
|
|
62
|
+
"minItems": 1
|
|
57
63
|
}
|
|
58
64
|
},
|
|
59
65
|
"$defs": {
|
|
@@ -202,6 +202,27 @@ describe("projectToJson()", () => {
|
|
|
202
202
|
expect("liveNames" in projected).toBe(false);
|
|
203
203
|
});
|
|
204
204
|
|
|
205
|
+
it("projects an explicit composites list through unchanged (#1492)", () => {
|
|
206
|
+
const component: Component = {
|
|
207
|
+
name: "aws-plane",
|
|
208
|
+
dependsOn: [],
|
|
209
|
+
composites: ["ArtifactBucket", "OperatorRole"],
|
|
210
|
+
deploy: [phase("Apply", [{ kind: "cfn-deploy" }])],
|
|
211
|
+
};
|
|
212
|
+
const projected = projectToJson(component) as { composites?: string[] };
|
|
213
|
+
expect(projected.composites).toEqual(["ArtifactBucket", "OperatorRole"]);
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
it("omits composites from the projection when not authored (#1492)", () => {
|
|
217
|
+
const component: Component = {
|
|
218
|
+
name: "table",
|
|
219
|
+
dependsOn: [],
|
|
220
|
+
deploy: [phase("Apply", [{ kind: "cfn-deploy" }])],
|
|
221
|
+
};
|
|
222
|
+
const projected = projectToJson(component) as Record<string, unknown>;
|
|
223
|
+
expect("composites" in projected).toBe(false);
|
|
224
|
+
});
|
|
225
|
+
|
|
205
226
|
it("projects a stackOutput() wiring reference to its plain-JSON form", () => {
|
|
206
227
|
const component: Component = {
|
|
207
228
|
name: "svc",
|
|
@@ -148,6 +148,21 @@ export interface Component {
|
|
|
148
148
|
* name == entity join with no behavior change.
|
|
149
149
|
*/
|
|
150
150
|
liveNames?: string[];
|
|
151
|
+
/**
|
|
152
|
+
* Optional: the composite kind name(s) this component's deployed resources
|
|
153
|
+
* come from, when a consumer joining a composite graph to the component DAG
|
|
154
|
+
* cannot infer it from `name` (#1492). Components and composites are
|
|
155
|
+
* different namespaces, the same class of mismatch `liveNames` covers for
|
|
156
|
+
* components and lexicon entities: a consumer without this field guesses by
|
|
157
|
+
* kebab-casing each composite's kind and matching it against this
|
|
158
|
+
* component's `name` (`LoomBackend` -> `loom-backend`), which only holds
|
|
159
|
+
* when a component maps 1:1 to a composite named for it. A component built
|
|
160
|
+
* from several composites (e.g. one stack containing both an ArtifactBucket
|
|
161
|
+
* and an OperatorRole composite, plus loose resources) lists them all.
|
|
162
|
+
* Omitted entirely (the common case), the naming convention stays the
|
|
163
|
+
* default and nothing changes.
|
|
164
|
+
*/
|
|
165
|
+
composites?: string[];
|
|
151
166
|
}
|
|
152
167
|
|
|
153
168
|
/** Author a named phase. `steps` may mix capability `Step`s, `Gate`s, and nested `Phase`s (fan-out). */
|
package/src/components/driver.ts
CHANGED
|
@@ -313,11 +313,19 @@ export function resolveStepInput(
|
|
|
313
313
|
|
|
314
314
|
// ── Step + phase execution ───────────────────────────────────────────────
|
|
315
315
|
|
|
316
|
-
/**
|
|
316
|
+
/**
|
|
317
|
+
* A step executed and its resolved input, kept so saga rollback can call the
|
|
318
|
+
* same capability's `rollback` with the same input. `output` is the step's
|
|
319
|
+
* own `run()` result — threaded through to `rollback` (#1944) as the
|
|
320
|
+
* serializable identity channel `Capability.rollback`'s doc comment
|
|
321
|
+
* describes, alongside object identity (which already works here, since this
|
|
322
|
+
* driver runs entirely in-process — see this module's own doc comment).
|
|
323
|
+
*/
|
|
317
324
|
interface ExecutedStep {
|
|
318
325
|
step: DriverStep;
|
|
319
326
|
resolvedInput: Record<string, unknown>;
|
|
320
327
|
phaseName: string;
|
|
328
|
+
output: unknown;
|
|
321
329
|
}
|
|
322
330
|
|
|
323
331
|
class StepFailure extends Error {
|
|
@@ -435,7 +443,7 @@ async function runPhase(
|
|
|
435
443
|
}
|
|
436
444
|
return {
|
|
437
445
|
records: [record],
|
|
438
|
-
executed: record.status === "ok" ? [{ step: entry, resolvedInput, phaseName: phaseDef.phase }] : [],
|
|
446
|
+
executed: record.status === "ok" ? [{ step: entry, resolvedInput, phaseName: phaseDef.phase, output }] : [],
|
|
439
447
|
failed: record.status === "fail",
|
|
440
448
|
};
|
|
441
449
|
};
|
|
@@ -505,7 +513,7 @@ async function rollbackExecuted(
|
|
|
505
513
|
registry: CapabilityRegistry,
|
|
506
514
|
): Promise<DriverStepRecord[]> {
|
|
507
515
|
const records: DriverStepRecord[] = [];
|
|
508
|
-
for (const { step, resolvedInput, phaseName } of [...executed].reverse()) {
|
|
516
|
+
for (const { step, resolvedInput, phaseName, output } of [...executed].reverse()) {
|
|
509
517
|
const start = Date.now();
|
|
510
518
|
try {
|
|
511
519
|
const capability = registry.resolve(step.kind);
|
|
@@ -521,7 +529,7 @@ async function rollbackExecuted(
|
|
|
521
529
|
});
|
|
522
530
|
continue;
|
|
523
531
|
}
|
|
524
|
-
await capability.rollback(ctx, resolvedInput as never);
|
|
532
|
+
await capability.rollback(ctx, resolvedInput as never, output as never);
|
|
525
533
|
records.push({
|
|
526
534
|
component: ctx.component,
|
|
527
535
|
phase: phaseName,
|
|
@@ -30,7 +30,11 @@
|
|
|
30
30
|
* ./wrangler.ts) and `r2-sync` (#1293, ./r2-sync.ts) are the Cloudflare
|
|
31
31
|
* Workers apply leaves — real implementations over the same injectable
|
|
32
32
|
* `ProcessRunner` `sign` uses, shelling to `wrangler`/`rclone` rather than an
|
|
33
|
-
* AWS-shaped SDK client.
|
|
33
|
+
* AWS-shaped SDK client. `run-agent` (#1941, epic #1564 phase 1, ./run-agent.ts)
|
|
34
|
+
* is the typed schema + registry entry for a bounded, attested agent-turn
|
|
35
|
+
* capability over a fly Sprite — a typed stub for now (`run`/`rollback`
|
|
36
|
+
* reject with `CapabilityNotImplementedError`), `rollbackPolicy: "native"`
|
|
37
|
+
* declared up front; the real sprite-lifecycle implementation is #1942.
|
|
34
38
|
*/
|
|
35
39
|
|
|
36
40
|
export * from "./build-archive";
|
|
@@ -44,6 +48,7 @@ export * from "./component-bom";
|
|
|
44
48
|
export * from "./reproducibility";
|
|
45
49
|
export * from "./sign";
|
|
46
50
|
export * from "./verify";
|
|
51
|
+
export * from "./run-agent";
|
|
47
52
|
export * from "./wrangler";
|
|
48
53
|
export * from "./r2-sync";
|
|
49
54
|
export * from "./vuln-scan";
|