@intentius/chant 0.18.11 → 0.18.13

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.
@@ -0,0 +1,22 @@
1
+ import type { CommandContext } from "../registry.js";
2
+ /** One emulator's state — the machine-readable `--json` unit (#920). */
3
+ export interface EmulatorReport {
4
+ lexicon: string;
5
+ /** Container name (e.g. `chant-floci`). */
6
+ name: string;
7
+ /** `http://localhost:<port>` when up; empty when down. */
8
+ endpoint: string;
9
+ /** Env that points the SDK / `chant graph --live` / a triggered Op at it. */
10
+ env: Record<string, string>;
11
+ }
12
+ /**
13
+ * chant emulator up|down|status [--lexicon <name>] [--json] (#920)
14
+ *
15
+ * Boot / stop / inspect the local emulators of the project's configured lexicons
16
+ * (Floci for aws, floci-az/gcp, mudflaps/spritzer for fly). `up` leaves them
17
+ * running (persistent, unlike the in-Op boot/teardown) so a consumer can deploy to
18
+ * and observe them; `--json` reports each one's endpoint + the env that redirects
19
+ * tooling at it. Consumed by behold `serve --local`.
20
+ */
21
+ export declare function runEmulator(ctx: CommandContext): Promise<number>;
22
+ //# sourceMappingURL=emulator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emulator.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/emulator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAcD;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmDtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAmC,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAiB9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA2LpD"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAmC,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAkB9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA2LpD"}
@@ -93,15 +93,27 @@ export interface IRExport {
93
93
  /** Producer-side attribute the output reads (e.g. "Arn"). */
94
94
  attr?: string;
95
95
  }
96
+ /** A cross-stack import this stack consumes — a `Parameter` fed from another
97
+ * stack's output at deploy time. A viewer matches an import `name` to another
98
+ * stack's export `name` to draw the cross-stack edge; the parameter's in-stack
99
+ * consumers are ordinary `$ref` edges to `node` (#513). */
100
+ export interface IRImport {
101
+ /** Parameter name — the cross-stack handle (e.g. "clusterArn"). */
102
+ name: string;
103
+ /** Logical name of the parameter node. */
104
+ node: string;
105
+ }
96
106
  /** The full graph IR for a project at the default (declarable) detail level. */
97
107
  export interface GraphIR {
98
108
  nodes: IRNode[];
99
109
  edges: IREdge[];
100
110
  groups: IRGroups;
101
- /** Outputs this stack publishes for other stacks to import. Imports are already
102
- * nodes (`AWS::CloudFormation::Parameter` etc.); a viewer matches an import's
103
- * name to an export's name to draw the cross-stack edge to its producer (#513). */
111
+ /** Outputs this stack publishes for other stacks to import (#513). */
104
112
  exports?: IRExport[];
113
+ /** Parameters this stack imports from other stacks. A viewer matches an import's
114
+ * `name` to another stack's export `name` to draw the cross-stack edge; the
115
+ * parameter's in-stack consumers are ordinary `$ref` edges to it (#513). */
116
+ imports?: IRImport[];
105
117
  }
106
118
  /**
107
119
  * Build the graph IR from resolved entities (the output of `discover`). Pure and
@@ -1 +1 @@
1
- {"version":3,"file":"graph-ir.d.ts","sourceRoot":"","sources":["../src/graph-ir.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,cAAc,CAAC;AAI7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;;GAQG;AAEH,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iCAAiC;AACjC,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,mCAAmC;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAED,qEAAqE;AACrE,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,IAAI,EAAE,KAAK,CAAC;IACZ,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qFAAqF;A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,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,eAAe,EAAE,GAAG,OAAO,CA+BzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAUvE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAgC7E"}
package/dist/lexicon.d.ts CHANGED
@@ -8,6 +8,7 @@ import type { ArtifactIntegrity } from "./lexicon-integrity.js";
8
8
  import type { CompletionContext, CompletionItem, HoverContext, HoverInfo, CodeActionContext, CodeAction } from "./lsp/types.js";
9
9
  import type { McpToolContribution, McpResourceContribution } from "./mcp/types.js";
10
10
  import type { DriverComponent } from "./components/driver.js";
11
+ import type { EmulatorCapability } from "./op/emulator-lifecycle.js";
11
12
  import type { RuleMeta } from "./audit/catalog.js";
12
13
  import type { ReferenceCatalog } from "./graph-refs.js";
13
14
  export type { ReferenceCatalog, IdentityRule, RefRule } from "./graph-refs.js";
@@ -233,6 +234,11 @@ export interface LexiconPlugin {
233
234
  verbose?: boolean;
234
235
  force?: boolean;
235
236
  }): Promise<void>;
237
+ /** Local emulator (#920), if this lexicon has one (Floci for aws, floci-az/gcp,
238
+ * mudflaps/spritzer for fly). Drives `chant emulator up|down|status` and lets a
239
+ * consumer (behold `--local`) boot it + point apply/observe at it — no cloud
240
+ * account. Absent when the lexicon has no local emulator. */
241
+ readonly emulator?: EmulatorCapability;
236
242
  /** Return lint rules provided by this lexicon */
237
243
  lintRules?(): LintRule[];
238
244
  /** Return declarative rule specs for compilation via rule() */
@@ -1 +1 @@
1
- {"version":3,"file":"lexicon.d.ts","sourceRoot":"","sources":["../src/lexicon.ts"],"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AED;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IAC1C,iDAAiD;IACjD,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAkBtE"}
@@ -17,6 +17,17 @@ export interface EmulatorSpec {
17
17
  /** Extra `docker run` args inserted before the image (e.g. a socket mount). */
18
18
  runArgs?: readonly string[];
19
19
  }
20
+ /**
21
+ * A lexicon's local-emulator capability (#920) — what `chant emulator` needs to
22
+ * boot it and point tooling at it. The `spec` drives the Docker lifecycle; `env`
23
+ * returns the variables that redirect the SDK / `chant graph --live` / a triggered
24
+ * Op at the running emulator (e.g. `AWS_ENDPOINT_URL`). `env` is `{}` when the
25
+ * emulator is reached only via an explicit apply argument, not a global variable.
26
+ */
27
+ export interface EmulatorCapability {
28
+ spec: EmulatorSpec;
29
+ env(endpoint: string): Record<string, string>;
30
+ }
20
31
  /** Per-call overrides for {@link EmulatorLifecycle.up} / `runCommand`. */
21
32
  export interface EmulatorUpArgs {
22
33
  name?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"emulator-lifecycle.d.ts","sourceRoot":"","sources":["../../src/op/emulator-lifecycle.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,aAAa,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,0EAA0E;AAC1E,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAC1C,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,C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AU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAC1C,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E,IAAI,CAAC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,iBAAiB,CAyEvE"}
@@ -2,7 +2,7 @@ export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForSta
2
2
  export { OpResource } from "./resource.js";
3
3
  export { safeHeartbeat, sleep } from "./activity-runtime.js";
4
4
  export { emulatorLifecycle } from "./emulator-lifecycle.js";
5
- export type { EmulatorSpec, EmulatorUpArgs, EmulatorLifecycle } from "./emulator-lifecycle.js";
5
+ export type { EmulatorSpec, EmulatorCapability, EmulatorUpArgs, EmulatorLifecycle } from "./emulator-lifecycle.js";
6
6
  export type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep } from "./types.js";
7
7
  export { discoverOps } from "./discover.js";
8
8
  export type { DiscoveredOp, OpDiscoveryResult } from "./discover.js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MAAM,sBAAsB,CAAC;AAChH,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClH,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.18.11",
3
+ "version": "0.18.13",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -0,0 +1,156 @@
1
+ import { describe, test, expect, vi, beforeEach } from "vitest";
2
+ import { promisify } from "node:util";
3
+ import type { ParsedArgs } from "../registry";
4
+ import type { LexiconPlugin } from "../../lexicon";
5
+ import type { EmulatorCapability } from "../../op";
6
+
7
+ // `up`/`down`/`endpoint` come from the shared lifecycle — stub it so the handler's
8
+ // wiring (filtering, --json shape, action dispatch) is tested without Docker.
9
+ const upMock = vi.fn();
10
+ const downMock = vi.fn();
11
+
12
+ vi.mock("../../op", async () => {
13
+ const actual = await vi.importActual<typeof import("../../op")>("../../op");
14
+ return {
15
+ ...actual,
16
+ emulatorLifecycle: () => ({
17
+ up: (...a: unknown[]) => upMock(...a),
18
+ down: (...a: unknown[]) => downMock(...a),
19
+ endpoint: (port: number) => `http://localhost:${port}`,
20
+ }),
21
+ };
22
+ });
23
+
24
+ // `status` shells `docker ps -q -f name=…` via promisify(exec); drive its stdout.
25
+ let dockerPsStdout = "";
26
+ const execWithCustom = Object.assign(() => {}, {
27
+ [promisify.custom]: (_cmd: string) => Promise.resolve({ stdout: dockerPsStdout }),
28
+ });
29
+ vi.mock("node:child_process", async () => {
30
+ const actual = await vi.importActual<typeof import("node:child_process")>("node:child_process");
31
+ return { ...actual, exec: execWithCustom };
32
+ });
33
+
34
+ const { runEmulator } = await import("./emulator");
35
+
36
+ function cap(): EmulatorCapability {
37
+ return {
38
+ spec: { name: "chant-floci", image: "floci/floci:latest", containerPort: 4566, healthPath: "/_localstack/health" },
39
+ env: (endpoint) => ({ AWS_ENDPOINT_URL: endpoint, AWS_REGION: "us-east-1" }),
40
+ };
41
+ }
42
+
43
+ function plugin(name: string, emulator?: EmulatorCapability): LexiconPlugin {
44
+ return { name, emulator } as unknown as LexiconPlugin;
45
+ }
46
+
47
+ function makeArgs(overrides: Partial<ParsedArgs> = {}): ParsedArgs {
48
+ return {
49
+ command: "emulator", path: ".",
50
+ format: "", fix: false, watch: false, verbose: false, help: false, live: false,
51
+ ...overrides,
52
+ };
53
+ }
54
+
55
+ function stdout(): string[] {
56
+ const buf: string[] = [];
57
+ vi.spyOn(console, "log").mockImplementation((s: string) => { buf.push(s); });
58
+ return buf;
59
+ }
60
+ function stderr(): string[] {
61
+ const buf: string[] = [];
62
+ vi.spyOn(console, "error").mockImplementation((s: string) => { buf.push(s); });
63
+ return buf;
64
+ }
65
+
66
+ describe("runEmulator (#920)", () => {
67
+ beforeEach(() => {
68
+ upMock.mockReset();
69
+ downMock.mockReset();
70
+ dockerPsStdout = "";
71
+ vi.restoreAllMocks();
72
+ });
73
+
74
+ test("rejects a missing / unknown action with usage and exit 1", async () => {
75
+ const err = stderr();
76
+ expect(await runEmulator({ args: makeArgs(), plugins: [plugin("aws", cap())], serializers: [] })).toBe(1);
77
+ expect(err.join("\n")).toContain("Usage: chant emulator");
78
+ expect(await runEmulator({ args: makeArgs({ path: "restart" }), plugins: [], serializers: [] })).toBe(1);
79
+ });
80
+
81
+ test("up boots each emulator and reports endpoint + redirect env as JSON", async () => {
82
+ upMock.mockResolvedValue({ endpoint: "http://localhost:4566" });
83
+ const out = stdout();
84
+ const exit = await runEmulator({
85
+ args: makeArgs({ path: "up", json: true }),
86
+ plugins: [plugin("aws", cap()), plugin("gitlab")],
87
+ serializers: [],
88
+ });
89
+ expect(exit).toBe(0);
90
+ expect(upMock).toHaveBeenCalledTimes(1); // gitlab has no emulator → skipped
91
+ expect(JSON.parse(out.join(""))).toEqual({
92
+ emulators: [{
93
+ lexicon: "aws",
94
+ name: "chant-floci",
95
+ endpoint: "http://localhost:4566",
96
+ env: { AWS_ENDPOINT_URL: "http://localhost:4566", AWS_REGION: "us-east-1" },
97
+ }],
98
+ });
99
+ });
100
+
101
+ test("--lexicon narrows to the named lexicon", async () => {
102
+ upMock.mockResolvedValue({ endpoint: "http://localhost:4566" });
103
+ const out = stdout();
104
+ await runEmulator({
105
+ args: makeArgs({ path: "up", json: true, lexicon: "azure" }),
106
+ plugins: [plugin("aws", cap()), plugin("azure", cap())],
107
+ serializers: [],
108
+ });
109
+ const parsed = JSON.parse(out.join(""));
110
+ expect(parsed.emulators).toHaveLength(1);
111
+ expect(parsed.emulators[0].lexicon).toBe("azure");
112
+ });
113
+
114
+ test("down stops the emulator and reports it as down (no endpoint/env)", async () => {
115
+ downMock.mockResolvedValue(undefined);
116
+ const out = stdout();
117
+ const exit = await runEmulator({
118
+ args: makeArgs({ path: "down", json: true }),
119
+ plugins: [plugin("aws", cap())],
120
+ serializers: [],
121
+ });
122
+ expect(exit).toBe(0);
123
+ expect(downMock).toHaveBeenCalledTimes(1);
124
+ expect(JSON.parse(out.join("")).emulators[0]).toEqual({
125
+ lexicon: "aws", name: "chant-floci", endpoint: "", env: {},
126
+ });
127
+ });
128
+
129
+ test("status reports up when the container is running, down otherwise", async () => {
130
+ dockerPsStdout = "abc123\n";
131
+ let out = stdout();
132
+ await runEmulator({ args: makeArgs({ path: "status", json: true }), plugins: [plugin("aws", cap())], serializers: [] });
133
+ expect(JSON.parse(out.join("")).emulators[0].endpoint).toBe("http://localhost:4566");
134
+ expect(upMock).not.toHaveBeenCalled(); // status never boots
135
+
136
+ vi.restoreAllMocks();
137
+ dockerPsStdout = "";
138
+ out = stdout();
139
+ await runEmulator({ args: makeArgs({ path: "status", json: true }), plugins: [plugin("aws", cap())], serializers: [] });
140
+ const rep = JSON.parse(out.join("")).emulators[0];
141
+ expect(rep.endpoint).toBe("");
142
+ expect(rep.env).toEqual({});
143
+ });
144
+
145
+ test("no configured lexicon has an emulator → empty JSON, exit 0", async () => {
146
+ const out = stdout();
147
+ const exit = await runEmulator({
148
+ args: makeArgs({ path: "up", json: true }),
149
+ plugins: [plugin("gitlab"), plugin("github")],
150
+ serializers: [],
151
+ });
152
+ expect(exit).toBe(0);
153
+ expect(JSON.parse(out.join(""))).toEqual({ emulators: [] });
154
+ expect(upMock).not.toHaveBeenCalled();
155
+ });
156
+ });
@@ -0,0 +1,92 @@
1
+ import { exec } from "node:child_process";
2
+ import { promisify } from "node:util";
3
+ import { emulatorLifecycle } from "../../op";
4
+ import { formatError, formatWarning, formatSuccess } from "../format";
5
+ import type { CommandContext } from "../registry";
6
+
7
+ const execAsync = promisify(exec);
8
+
9
+ /** One emulator's state — the machine-readable `--json` unit (#920). */
10
+ export interface EmulatorReport {
11
+ lexicon: string;
12
+ /** Container name (e.g. `chant-floci`). */
13
+ name: string;
14
+ /** `http://localhost:<port>` when up; empty when down. */
15
+ endpoint: string;
16
+ /** Env that points the SDK / `chant graph --live` / a triggered Op at it. */
17
+ env: Record<string, string>;
18
+ }
19
+
20
+ const ACTIONS = new Set(["up", "down", "status"]);
21
+
22
+ /** True if a container of this name is running. */
23
+ async function isRunning(name: string): Promise<boolean> {
24
+ try {
25
+ const { stdout } = await execAsync(`docker ps -q -f name=${name}`);
26
+ return Boolean(stdout.trim());
27
+ } catch {
28
+ return false; // docker missing / not running — treat as down
29
+ }
30
+ }
31
+
32
+ /**
33
+ * chant emulator up|down|status [--lexicon <name>] [--json] (#920)
34
+ *
35
+ * Boot / stop / inspect the local emulators of the project's configured lexicons
36
+ * (Floci for aws, floci-az/gcp, mudflaps/spritzer for fly). `up` leaves them
37
+ * running (persistent, unlike the in-Op boot/teardown) so a consumer can deploy to
38
+ * and observe them; `--json` reports each one's endpoint + the env that redirects
39
+ * tooling at it. Consumed by behold `serve --local`.
40
+ */
41
+ export async function runEmulator(ctx: CommandContext): Promise<number> {
42
+ const { args, plugins } = ctx;
43
+ // Registered as compound `emulator <up|down|status>`, so the action word lands
44
+ // in args.path; the bare `emulator` fallback leaves it as the "." default.
45
+ const action = args.path;
46
+ if (!action || !ACTIONS.has(action)) {
47
+ console.error(formatError({ message: "Usage: chant emulator <up|down|status> [--lexicon <name>] [--json]" }));
48
+ return 1;
49
+ }
50
+
51
+ const withEmulator = plugins.filter((p) => p.emulator && (!args.lexicon || p.name === args.lexicon));
52
+ if (withEmulator.length === 0) {
53
+ if (args.json) {
54
+ console.log(JSON.stringify({ emulators: [] }));
55
+ return 0;
56
+ }
57
+ console.error(formatWarning({
58
+ message: args.lexicon
59
+ ? `Lexicon "${args.lexicon}" has no local emulator, or isn't configured for this project`
60
+ : "No configured lexicon has a local emulator",
61
+ }));
62
+ return 0;
63
+ }
64
+
65
+ const reports: EmulatorReport[] = [];
66
+ for (const p of withEmulator) {
67
+ const cap = p.emulator!;
68
+ const lc = emulatorLifecycle(cap.spec);
69
+ if (action === "up") {
70
+ const { endpoint } = await lc.up();
71
+ reports.push({ lexicon: p.name, name: cap.spec.name, endpoint, env: cap.env(endpoint) });
72
+ } else if (action === "down") {
73
+ await lc.down();
74
+ reports.push({ lexicon: p.name, name: cap.spec.name, endpoint: "", env: {} });
75
+ } else {
76
+ const running = await isRunning(cap.spec.name);
77
+ const endpoint = running ? lc.endpoint(cap.spec.containerPort) : "";
78
+ reports.push({ lexicon: p.name, name: cap.spec.name, endpoint, env: endpoint ? cap.env(endpoint) : {} });
79
+ }
80
+ }
81
+
82
+ if (args.json) {
83
+ console.log(JSON.stringify({ emulators: reports }));
84
+ return 0;
85
+ }
86
+ for (const r of reports) {
87
+ if (action === "up") console.error(formatSuccess(`${r.lexicon}: ${r.name} up on ${r.endpoint}`));
88
+ else if (action === "down") console.error(formatSuccess(`${r.lexicon}: ${r.name} down`));
89
+ else console.error(`${r.lexicon}: ${r.name} — ${r.endpoint ? `up on ${r.endpoint}` : "down"}`);
90
+ }
91
+ return 0;
92
+ }
package/src/cli/main.ts CHANGED
@@ -20,6 +20,7 @@ import { runLifecycleSnapshot, runLifecycleShow, runLifecycleDiff, runLifecycleR
20
20
  import { runComponentsStatus, runComponentsReleaseRecord, runComponentsUnknown } from "./handlers/components";
21
21
  import { runGraph } from "./handlers/graph";
22
22
  import { runOp, runOpList, runOpStatus, runOpSignal, runOpCancel, runOpLog } from "./handlers/run";
23
+ import { runEmulator } from "./handlers/emulator";
23
24
 
24
25
  /**
25
26
  * Parse command line arguments
@@ -309,6 +310,10 @@ Lexicon development:
309
310
  latest, diff surface vs committed baseline, print delta + PR
310
311
  label (dry run; --force bypasses the spec cache, --format json)
311
312
 
313
+ Local:
314
+ emulator <up|down|status> Boot/stop/inspect configured lexicons' local
315
+ emulators (Floci etc.); --lexicon <name>, --json
316
+
312
317
  Servers:
313
318
  serve lsp Start the LSP server (stdio)
314
319
  serve mcp Start the MCP server (stdio)
@@ -454,11 +459,18 @@ const registry: CommandDef[] = [
454
459
  { name: "components status", requiresPlugins: true, handler: runComponentsStatus },
455
460
  { name: "components release", handler: runComponentsReleaseRecord },
456
461
 
462
+ // Local emulators of configured lexicons (#920). Compound so the action word
463
+ // lands in args.path (not consumed as a project dir) and projectPath is forced ".".
464
+ { name: "emulator up", requiresPlugins: true, handler: runEmulator },
465
+ { name: "emulator down", requiresPlugins: true, handler: runEmulator },
466
+ { name: "emulator status", requiresPlugins: true, handler: runEmulator },
467
+
457
468
  // Serve subcommands
458
469
  { name: "serve lsp", requiresPlugins: true, handler: runServeLsp },
459
470
  { name: "serve mcp", requiresPlugins: true, handler: runServeMcp },
460
471
 
461
472
  // Fallback for unknown subcommands (must come after compound entries)
473
+ { name: "emulator", requiresPlugins: true, handler: runEmulator },
462
474
  { name: "lifecycle", handler: runLifecycleUnknown },
463
475
  { name: "dev", handler: runDevUnknown },
464
476
  { name: "serve", handler: runServeUnknown },
@@ -527,8 +539,12 @@ async function main(): Promise<void> {
527
539
  // missing plugins there is "no live evidence" (a warning), not a hard exit.
528
540
  const isGenerateComponents = match.def.name === "build" && args.components && !!args.generate;
529
541
  const isComponentsStatus = match.def.name === "components status";
542
+ // `emulator` (#920) is a property of the *configured* lexicons, not of any infra
543
+ // file — a fresh/local project with no declarables still boots Floci. Load from
544
+ // chant.config best-effort, like components status, rather than detectLexicon.
545
+ const isEmulator = match.def.name === "emulator" || match.def.name.startsWith("emulator ");
530
546
  const plugins = match.def.requiresPlugins
531
- ? isGenerateComponents || isComponentsStatus
547
+ ? isGenerateComponents || isComponentsStatus || isEmulator
532
548
  ? await loadPlugins(await resolveProjectLexicons(resolve(projectPath)).catch(() => [])).catch(() => [])
533
549
  : await loadPluginsOrExit(projectPath)
534
550
  : [];
@@ -5,11 +5,17 @@ import { AttrRef } from "./attrref";
5
5
  import { LexiconOutput } from "./lexicon-output";
6
6
  import { resolveAttrRefs } from "./discovery/resolve";
7
7
  import { setProvenance } from "./provenance";
8
+ import { INTRINSIC_MARKER } from "./intrinsic";
8
9
 
9
10
  function decl<T extends object>(base: T): Declarable & T {
10
11
  return { [DECLARABLE_MARKER]: true, ...base } as Declarable & T;
11
12
  }
12
13
 
14
+ /** A `Ref`-style intrinsic (CloudFormation `{ Ref: name }` shape). */
15
+ function ref(targetName: string): object {
16
+ return { [INTRINSIC_MARKER]: true, toJSON: () => ({ Ref: targetName }) };
17
+ }
18
+
13
19
  describe("buildGraphIr", () => {
14
20
  test("emits a node per resource with kind, lexicon, and scrubbed attrs", () => {
15
21
  const vpc = decl({ lexicon: "gcp", entityType: "Vpc", props: { autoCreateSubnetworks: false } });
@@ -26,6 +32,35 @@ describe("buildGraphIr", () => {
26
32
  expect(ir.nodes[0].attrs).not.toHaveProperty("entityType");
27
33
  });
28
34
 
35
+ test("resolves a Ref-to-node intrinsic into an edge + $ref, and lists parameter imports (#513)", () => {
36
+ const cluster = decl({ lexicon: "aws", entityType: "AWS::CloudFormation::Parameter" });
37
+ const service = decl({ lexicon: "aws", entityType: "AWS::ECS::Service", props: { Cluster: ref("clusterArn") } });
38
+ const entities = new Map<string, Declarable>([
39
+ ["clusterArn", cluster],
40
+ ["service", service],
41
+ ]);
42
+ resolveAttrRefs(entities);
43
+
44
+ const ir = buildGraphIr(entities);
45
+ // The Ref becomes a real dependency edge, not a dropped intrinsic.
46
+ expect(ir.edges).toContainEqual({ from: "service", to: "clusterArn", kind: "ref", viaAttr: "Cluster" });
47
+ // attrs mirror the edge as a $ref envelope, not {$intrinsic}.
48
+ expect(ir.nodes.find((n) => n.id === "service")!.attrs.Cluster).toEqual({ $ref: "clusterArn" });
49
+ // Parameter nodes are surfaced as import handles.
50
+ expect(ir.imports).toEqual([{ name: "clusterArn", node: "clusterArn" }]);
51
+ });
52
+
53
+ test("a Ref to a non-node (pseudo-parameter) stays an opaque intrinsic — no phantom edge (#513)", () => {
54
+ const service = decl({ lexicon: "aws", entityType: "AWS::ECS::Service", props: { Region: ref("AWS::Region") } });
55
+ const entities = new Map<string, Declarable>([["service", service]]);
56
+ resolveAttrRefs(entities);
57
+
58
+ const ir = buildGraphIr(entities);
59
+ expect(ir.edges).toEqual([]);
60
+ expect(ir.nodes[0].attrs.Region).toEqual({ $intrinsic: true });
61
+ expect(ir.imports).toBeUndefined();
62
+ });
63
+
29
64
  test("derives ref edges labelled with the consumer property", () => {
30
65
  const vpc = decl({ lexicon: "gcp", entityType: "Vpc" });
31
66
  const subnet = decl({ lexicon: "gcp", entityType: "Subnet", props: { network: new AttrRef(vpc, "id") } });
package/src/graph-ir.ts CHANGED
@@ -107,15 +107,28 @@ export interface IRExport {
107
107
  attr?: string;
108
108
  }
109
109
 
110
+ /** A cross-stack import this stack consumes — a `Parameter` fed from another
111
+ * stack's output at deploy time. A viewer matches an import `name` to another
112
+ * stack's export `name` to draw the cross-stack edge; the parameter's in-stack
113
+ * consumers are ordinary `$ref` edges to `node` (#513). */
114
+ export interface IRImport {
115
+ /** Parameter name — the cross-stack handle (e.g. "clusterArn"). */
116
+ name: string;
117
+ /** Logical name of the parameter node. */
118
+ node: string;
119
+ }
120
+
110
121
  /** The full graph IR for a project at the default (declarable) detail level. */
111
122
  export interface GraphIR {
112
123
  nodes: IRNode[];
113
124
  edges: IREdge[];
114
125
  groups: IRGroups;
115
- /** Outputs this stack publishes for other stacks to import. Imports are already
116
- * nodes (`AWS::CloudFormation::Parameter` etc.); a viewer matches an import's
117
- * name to an export's name to draw the cross-stack edge to its producer (#513). */
126
+ /** Outputs this stack publishes for other stacks to import (#513). */
118
127
  exports?: IRExport[];
128
+ /** Parameters this stack imports from other stacks. A viewer matches an import's
129
+ * `name` to another stack's export `name` to draw the cross-stack edge; the
130
+ * parameter's in-stack consumers are ordinary `$ref` edges to it (#513). */
131
+ imports?: IRImport[];
119
132
  }
120
133
 
121
134
  /** A node is anything that serializes to a resource — not a property or output. */
@@ -134,6 +147,22 @@ function relFile(file: string | undefined, projectPath?: string): string | undef
134
147
  return file;
135
148
  }
136
149
 
150
+ /** The logical name a `Ref`-style intrinsic points at, or undefined. Lexicon-
151
+ * agnostic: reads the intrinsic's `toJSON()` for the CloudFormation `{ Ref: name }`
152
+ * shape (aws `RefIntrinsic` etc.). A `Ref` to a node is a real dependency edge,
153
+ * not an opaque intrinsic (#513) — so we resolve it rather than flatten it. */
154
+ function refIntrinsicTarget(value: unknown): string | undefined {
155
+ try {
156
+ const json = (value as { toJSON?: () => unknown }).toJSON?.();
157
+ if (json && typeof json === "object" && typeof (json as { Ref?: unknown }).Ref === "string") {
158
+ return (json as { Ref: string }).Ref;
159
+ }
160
+ } catch {
161
+ // Unresolvable at graph-build time — leave it as an opaque intrinsic.
162
+ }
163
+ return undefined;
164
+ }
165
+
137
166
  /** Resolve the producer (logical name) an AttrRef points at. */
138
167
  function refTarget(ref: AttrRef, reverse: Map<object, string>): string | undefined {
139
168
  // Nested refs (under `props`) aren't assigned a logical name by resolveAttrRefs,
@@ -143,7 +172,7 @@ function refTarget(ref: AttrRef, reverse: Map<object, string>): string | undefin
143
172
  }
144
173
 
145
174
  /** Project a value into a JSON-safe, scrubbed form. References become `{ $ref }`. */
146
- function project(value: unknown, seen: Set<unknown>, reverse: Map<object, string>): unknown {
175
+ function project(value: unknown, seen: Set<unknown>, reverse: Map<object, string>, nodeIds: Set<string>): unknown {
147
176
  if (value === null) return null;
148
177
  const t = typeof value;
149
178
  if (t === "string" || t === "number" || t === "boolean") return value;
@@ -157,8 +186,12 @@ function project(value: unknown, seen: Set<unknown>, reverse: Map<object, string
157
186
  const to = refTarget(value, reverse);
158
187
  return { $ref: to ? `${to}.${value.attribute}` : value.attribute } satisfies AttrRefEnvelope;
159
188
  }
160
- // Other intrinsics (interpolations, pseudo-parameters): mark, don't inline.
161
189
  if ((value as Record<symbol, unknown>)[INTRINSIC_MARKER] === true) {
190
+ // A `Ref` to a known node is a real reference — surface it as `$ref` so attrs
191
+ // match the edge (#513). Other intrinsics (interpolations, pseudo-parameters,
192
+ // Ref to a non-node) stay opaque.
193
+ const to = refIntrinsicTarget(value);
194
+ if (to && nodeIds.has(to)) return { $ref: to } satisfies AttrRefEnvelope;
162
195
  return { $intrinsic: true };
163
196
  }
164
197
 
@@ -168,20 +201,20 @@ function project(value: unknown, seen: Set<unknown>, reverse: Map<object, string
168
201
  // Nested declarables (e.g. an inlined property-kind resource) keep their
169
202
  // config in a non-enumerable `props` bag, like top-level nodes — project that.
170
203
  if (isDeclarable(value)) {
171
- const out = projectConfig(value, seen, reverse);
204
+ const out = projectConfig(value, seen, reverse, nodeIds);
172
205
  seen.delete(value);
173
206
  return out;
174
207
  }
175
208
 
176
209
  if (Array.isArray(value)) {
177
- const out = value.map((v) => project(v, seen, reverse)).filter((v) => v !== undefined);
210
+ const out = value.map((v) => project(v, seen, reverse, nodeIds)).filter((v) => v !== undefined);
178
211
  seen.delete(value);
179
212
  return out;
180
213
  }
181
214
 
182
215
  const out: Record<string, unknown> = {};
183
216
  for (const [k, v] of Object.entries(value as Record<string, unknown>)) {
184
- const p = project(v, seen, reverse);
217
+ const p = project(v, seen, reverse, nodeIds);
185
218
  if (p !== undefined) out[k] = p;
186
219
  }
187
220
  seen.delete(value);
@@ -212,10 +245,11 @@ function projectConfig(
212
245
  entity: Declarable,
213
246
  seen: Set<unknown>,
214
247
  reverse: Map<object, string>,
248
+ nodeIds: Set<string>,
215
249
  ): Record<string, unknown> {
216
250
  const out: Record<string, unknown> = {};
217
251
  for (const [k, v] of configRoots(entity)) {
218
- const p = project(v, seen, reverse);
252
+ const p = project(v, seen, reverse, nodeIds);
219
253
  if (p !== undefined) out[k] = p;
220
254
  }
221
255
  return out;
@@ -239,7 +273,13 @@ function collectEdges(
239
273
  }
240
274
  return;
241
275
  }
242
- if ((value as Record<symbol, unknown>)[INTRINSIC_MARKER] === true) return;
276
+ if ((value as Record<symbol, unknown>)[INTRINSIC_MARKER] === true) {
277
+ // A `Ref` to a known node (a Parameter, or a resource) is a real dependency
278
+ // — resolve it to an edge instead of dropping it as an opaque intrinsic (#513).
279
+ const to = refIntrinsicTarget(value);
280
+ if (to && to !== from && nodeIds.has(to)) edges.push({ from, to, kind: "ref", viaAttr });
281
+ return;
282
+ }
243
283
  if (seen.has(value)) return;
244
284
  seen.add(value);
245
285
  if (Array.isArray(value)) {
@@ -287,7 +327,7 @@ export function buildGraphIr(
287
327
  id: name,
288
328
  kind: entity.entityType,
289
329
  lexicon: entity.lexicon,
290
- attrs: projectConfig(entity, new Set(), reverse),
330
+ attrs: projectConfig(entity, new Set(), reverse, nodeIds),
291
331
  };
292
332
  if (prov?.composite) node.compositeParent = prov.composite;
293
333
  if (prov?.compositeInstance) node.compositeInstance = prov.compositeInstance;
@@ -339,8 +379,17 @@ export function buildGraphIr(
339
379
  }
340
380
  exports.sort((a, b) => a.name.localeCompare(b.name));
341
381
 
382
+ // Cross-stack imports: parameter nodes are the handles this stack imports by,
383
+ // matched to another stack's export names (#513). Detected by kind — the aws
384
+ // `Parameter` is the cross-stack input mechanism.
385
+ const imports: IRImport[] = nodes
386
+ .filter((n) => /(^|::)Parameter$/i.test(n.kind))
387
+ .map((n) => ({ name: n.id, node: n.id }))
388
+ .sort((a, b) => a.name.localeCompare(b.name));
389
+
342
390
  const ir: GraphIR = { nodes, edges, groups };
343
391
  if (exports.length) ir.exports = exports;
392
+ if (imports.length) ir.imports = imports;
344
393
  return ir;
345
394
  }
346
395
 
package/src/lexicon.ts CHANGED
@@ -8,6 +8,7 @@ import type { ArtifactIntegrity } from "./lexicon-integrity";
8
8
  import type { CompletionContext, CompletionItem, HoverContext, HoverInfo, CodeActionContext, CodeAction } from "./lsp/types";
9
9
  import type { McpToolContribution, McpResourceContribution } from "./mcp/types";
10
10
  import type { DriverComponent } from "./components/driver";
11
+ import type { EmulatorCapability } from "./op/emulator-lifecycle";
11
12
  import type { RuleMeta } from "./audit/catalog";
12
13
  import type { ReferenceCatalog } from "./graph-refs";
13
14
 
@@ -250,6 +251,12 @@ export interface LexiconPlugin {
250
251
  /** Package lexicon into distributable tarball */
251
252
  package(options?: { verbose?: boolean; force?: boolean }): Promise<void>;
252
253
 
254
+ /** Local emulator (#920), if this lexicon has one (Floci for aws, floci-az/gcp,
255
+ * mudflaps/spritzer for fly). Drives `chant emulator up|down|status` and lets a
256
+ * consumer (behold `--local`) boot it + point apply/observe at it — no cloud
257
+ * account. Absent when the lexicon has no local emulator. */
258
+ readonly emulator?: EmulatorCapability;
259
+
253
260
  // ── Optional extensions ───────────────────────────────────
254
261
  /** Return lint rules provided by this lexicon */
255
262
  lintRules?(): LintRule[];
@@ -24,6 +24,18 @@ export interface EmulatorSpec {
24
24
  runArgs?: readonly string[];
25
25
  }
26
26
 
27
+ /**
28
+ * A lexicon's local-emulator capability (#920) — what `chant emulator` needs to
29
+ * boot it and point tooling at it. The `spec` drives the Docker lifecycle; `env`
30
+ * returns the variables that redirect the SDK / `chant graph --live` / a triggered
31
+ * Op at the running emulator (e.g. `AWS_ENDPOINT_URL`). `env` is `{}` when the
32
+ * emulator is reached only via an explicit apply argument, not a global variable.
33
+ */
34
+ export interface EmulatorCapability {
35
+ spec: EmulatorSpec;
36
+ env(endpoint: string): Record<string, string>;
37
+ }
38
+
27
39
  /** Per-call overrides for {@link EmulatorLifecycle.up} / `runCommand`. */
28
40
  export interface EmulatorUpArgs {
29
41
  name?: string;
package/src/op/index.ts CHANGED
@@ -10,7 +10,7 @@ export { Op, phase, activity, gate, build, kubectlApply, helmInstall, waitForSta
10
10
  export { OpResource } from "./resource";
11
11
  export { safeHeartbeat, sleep } from "./activity-runtime";
12
12
  export { emulatorLifecycle } from "./emulator-lifecycle";
13
- export type { EmulatorSpec, EmulatorUpArgs, EmulatorLifecycle } from "./emulator-lifecycle";
13
+ export type { EmulatorSpec, EmulatorCapability, EmulatorUpArgs, EmulatorLifecycle } from "./emulator-lifecycle";
14
14
  export type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep } from "./types";
15
15
  export { discoverOps } from "./discover";
16
16
  export type { DiscoveredOp, OpDiscoveryResult } from "./discover";