;
-/** The dynamic command's normalized form: the validated request plus the resolved collector policy (the raw
+/** The run command's normalized form: the validated request plus the resolved collector policy (the raw
* `--emit` value; `Collector.resolve` turns it into an explicit target or auto-discovers a local dashboard). */
export interface NormalizedRun {
- request: RunRequest;
+ request: NormalizedRunRequest;
emit?: string | null;
}
diff --git a/src/io/index.ts b/src/io/index.ts
index da5c97a..92145f8 100644
--- a/src/io/index.ts
+++ b/src/io/index.ts
@@ -12,5 +12,5 @@ export { OutputManager, condense } from "./OutputManager.js";
export { OutputValidator } from "./OutputValidator.js";
export type {
RawRunInput, RawGraphInput, RawDepsInput, RawComplexityInput, RawSymbolsInput,
- NormalizedRun, RunRequest, ProcessingResult, OutputOptions, OutputResult, FileOutput, OutputLog,
+ NormalizedRun, NormalizedRunRequest, ProcessingResult, OutputOptions, OutputResult, FileOutput, OutputLog,
} from "./descriptors.js";
diff --git a/src/shared/codes.ts b/src/shared/codes.ts
index e1af794..77863a7 100644
--- a/src/shared/codes.ts
+++ b/src/shared/codes.ts
@@ -20,7 +20,7 @@ export const Code = {
/** the outgoing envelope failed its own JSON-Schema validation (a structural bug — should never ship) */
SCHEMA: "E_SCHEMA",
- // ── dynamic trace (`run`) ────────────────────────────────────────────────
+ // ── run (breakpoint trace) ───────────────────────────────────────────────
/** the tracer engine threw — no usable trace was produced */
ENGINE_FATAL: "ENGINE_FATAL",
/** a Chrome journey step (goto/click/type/…) failed */
diff --git a/src/shared/runTool.ts b/src/shared/runTool.ts
index ab44ecb..d3abe25 100644
--- a/src/shared/runTool.ts
+++ b/src/shared/runTool.ts
@@ -15,7 +15,7 @@ export interface ToolRun {
* runTool — spawn a backing CLI tool, capture its output, and NEVER throw. A missing binary (ENOENT), a
* timeout, or a non-zero exit all resolve to `{ ok: false, error }` so the calling command can turn the
* failure into an error diagnostic on a still-well-formed Trace — the same "an agent always gets a Trace"
- * contract the dynamic/graph commands honour. The shared seam for the static analyses (madge/lizard/tree-sitter).
+ * contract the run/graph commands honour. The shared seam for the static analyses (madge/lizard/tree-sitter).
*
* Output is captured to temp FILES, not pipes. A child that prints a large payload and then calls
* `process.exit()` (madge does this) truncates piped stdout to the OS pipe buffer (~64KB on macOS) — the
diff --git a/test/io-input.test.js b/test/io-input.test.js
index 1290192..53c5dfd 100644
--- a/test/io-input.test.js
+++ b/test/io-input.test.js
@@ -1,7 +1,7 @@
// InputManager tests — the input tier. It accepts a transport-neutral parsed object (NOT argv), throws a
// structured InputError (never process.exit) on bad input, and normalizes the rest into a typed request.
// Pure + synchronous: no engine, no network. Covers the guards, the SECURITY-critical step redaction, and the
-// target/args normalization that used to be inlined in Cli.#runDynamic.
+// target/args normalization that used to be inlined in Cli.#runTrace.
import "reflect-metadata";
import { test } from "node:test";
import assert from "node:assert/strict";
@@ -58,7 +58,7 @@ test("acceptRun rejects an unknown step verb as an invalid-step InputError carry
assert.ok(error.problems.length >= 1);
});
-test("acceptRun surfaces a DynamicInput violation (out-of-range port) as an invalid-input InputError", () => {
+test("acceptRun surfaces a RunInput violation (out-of-range port) as an invalid-input InputError", () => {
const error = thrown(() => im.acceptRun(runRaw({ node: "70000", curl: "c" })));
assert.ok(error instanceof InputError);
assert.match(error.message, /^invalid input —/);
diff --git a/test/io-processing.test.js b/test/io-processing.test.js
index 9b211f5..32d572f 100644
--- a/test/io-processing.test.js
+++ b/test/io-processing.test.js
@@ -1,6 +1,6 @@
// ProcessingManager tests — the orchestration tier. Owns the collector wiring (resolve + serialized emit chain
// + onProgress + the failure→diagnostic fold), the abort path (EngineAbortError), the static collector forward,
-// and the command render thunks. The DynamicCommand is injected (a fake, like dynamic-diagnostics.test.js) and
+// and the command render thunks. The RunCommand is injected (a fake, like run-diagnostics.test.js) and
// Collector's static helpers are stubbed so no real network is touched. `node --test` isolates each file in its
// own process, so these stubs never leak into other suites.
import "reflect-metadata";
@@ -17,36 +17,36 @@ const mkTrace = () => new Trace({
meta: new TraceMeta({ at: "2026-01-01T00:00:00.000Z" }),
data: new TraceData({ events: [] }), ok: true,
});
-// A duck-typed DynamicCommand: `run` is the injected behavior, `render` proves the thunk is bound to it.
-const fakeDynamic = (run) => ({ run, render: (trace) => `rendered:${trace.command}` });
+// A duck-typed RunCommand: `run` is the injected behavior, `render` proves the thunk is bound to it.
+const fakeRun = (run) => ({ run, render: (trace) => `rendered:${trace.command}` });
-test("runDynamic: with no collector → returns the trace and a render thunk bound to the command", async () => {
+test("runTrace: with no collector → returns the trace and a render thunk bound to the command", async () => {
Collector.resolve = async () => null; // nothing configured, nothing discovered
const trace = mkTrace();
- const pm = new ProcessingManager(fakeDynamic(async () => ({ trace })));
- const result = await pm.runDynamic({ request: { target: "node" }, emit: null });
+ const pm = new ProcessingManager(fakeRun(async () => ({ trace })));
+ const result = await pm.runTrace({ request: { target: "node" }, emit: null });
assert.equal(result.trace, trace);
assert.equal(result.render(), "rendered:run.node");
});
-test("runDynamic: a throwing run rejects with EngineAbortError carrying the cause", async () => {
+test("runTrace: a throwing run rejects with EngineAbortError carrying the cause", async () => {
Collector.resolve = async () => null;
- const pm = new ProcessingManager(fakeDynamic(async () => { throw new Error("attach failed"); }));
+ const pm = new ProcessingManager(fakeRun(async () => { throw new Error("attach failed"); }));
await assert.rejects(
- () => pm.runDynamic({ request: { target: "node" }, emit: null }),
+ () => pm.runTrace({ request: { target: "node" }, emit: null }),
(error) => error instanceof EngineAbortError && error.code === "ENGINE_FATAL" && /attach failed/.test(error.message),
);
});
-test("runDynamic: a failing collector emit folds into an EMIT warn diagnostic on the returned trace", async () => {
+test("runTrace: a failing collector emit folds into an EMIT warn diagnostic on the returned trace", async () => {
const emitted = [];
Collector.resolve = async () => "http://collector.test";
Collector.emit = async (_url, envelope) => { emitted.push(envelope); return { ok: false, status: 400, body: "bad envelope" }; };
const trace = mkTrace();
// The fake streams one running envelope (onProgress), then returns the final one — both POSTs fail.
- const pm = new ProcessingManager(fakeDynamic(async (opts) => { opts.onProgress?.(trace); return { trace }; }));
+ const pm = new ProcessingManager(fakeRun(async (opts) => { opts.onProgress?.(trace); return { trace }; }));
- const result = await pm.runDynamic({ request: { target: "node" }, emit: null });
+ const result = await pm.runTrace({ request: { target: "node" }, emit: null });
assert.ok(emitted.length >= 1, "the collector should have received at least one envelope");
const emitDiag = result.trace.diagnostics.find((d) => d.code === "EMIT_FAILED");
assert.ok(emitDiag && emitDiag.level === "warn", "a failed emit must surface as an EMIT warn diagnostic");
diff --git a/test/io-validators.test.js b/test/io-validators.test.js
index a89397f..f163bf8 100644
--- a/test/io-validators.test.js
+++ b/test/io-validators.test.js
@@ -29,8 +29,8 @@ test("InputValidator.guardRunTrigger: requires a breakpoint first, then the targ
assert.equal(iv.guardRunTrigger(runRaw({ curl: "c" }), { target: TargetKind.Node, isChrome: false, steps: [] }), undefined);
});
-test("InputValidator.validateDynamic: an out-of-range port throws InputError carrying the problems", () => {
- const error = thrown(() => iv.validateDynamic({ target: TargetKind.Node, port: 70000, breakpoints: ["a:1"], exprs: [], steps: [] }));
+test("InputValidator.validateRun: an out-of-range port throws InputError carrying the problems", () => {
+ const error = thrown(() => iv.validateRun({ target: TargetKind.Node, port: 70000, breakpoints: ["a:1"], exprs: [], steps: [] }));
assert.ok(error instanceof InputError);
assert.match(error.message, /^invalid input —/);
assert.ok(error.problems.length >= 1);
diff --git a/test/journey.test.js b/test/journey.test.js
index 1274f39..1b9997e 100644
--- a/test/journey.test.js
+++ b/test/journey.test.js
@@ -1,4 +1,4 @@
-// JourneyRunner.parseStep — the pure `--step` parser DynamicCommand feeds the Chrome journey. The runner's
+// JourneyRunner.parseStep — the pure `--step` parser RunCommand feeds the Chrome journey. The runner's
// CDP driving needs a live Chrome (not exercised here); this pins the parsing contract. Run via `npm test`.
import "reflect-metadata"; // StepResult uses class-validator decorators (the domain loads this via Trace.ts)
import { test } from "node:test";
diff --git a/test/dynamic-diagnostics.test.js b/test/run-diagnostics.test.js
similarity index 82%
rename from test/dynamic-diagnostics.test.js
rename to test/run-diagnostics.test.js
index dca0dc7..a03bd17 100644
--- a/test/dynamic-diagnostics.test.js
+++ b/test/run-diagnostics.test.js
@@ -1,11 +1,11 @@
-// DynamicCommand diagnostics: a trace run must make its failures legible in the envelope (not just stderr),
+// RunCommand diagnostics: a trace run must make its failures legible in the envelope (not just stderr),
// and a thrown run must emit a TERMINAL envelope so the dashboard's "running" session resolves instead of
// hanging forever. Injects a fake tracer so we exercise the envelope/diagnostic logic without a real CDP target.
import "reflect-metadata";
import { test } from "node:test";
import assert from "node:assert/strict";
-import { DynamicCommand } from "../dist/cli/commands/DynamicCommand.js";
+import { RunCommand } from "../dist/cli/commands/RunCommand.js";
import { TargetKind } from "../dist/domain/Target.js";
const fakeTracer = (behavior) => ({
@@ -17,7 +17,7 @@ const nodeCapture = (over = {}) => ({ target: TargetKind.Node, trigger: "curl lo
test("a thrown run emits a TERMINAL envelope (running cleared, ENGINE_FATAL) so the dashboard resolves", async () => {
const seen = [];
- const cmd = new DynamicCommand(fakeTracer(() => { throw new Error("attach failed: ECONNREFUSED"); }));
+ const cmd = new RunCommand(fakeTracer(() => { throw new Error("attach failed: ECONNREFUSED"); }));
await assert.rejects(
cmd.run({ target: TargetKind.Node, port: 9229, onProgress: (t) => seen.push(t) }),
@@ -37,14 +37,14 @@ test("a thrown run emits a TERMINAL envelope (running cleared, ENGINE_FATAL) so
});
test("a captured fatal (no throw) yields ok:false + an ENGINE_FATAL diagnostic in the envelope", async () => {
- const cmd = new DynamicCommand(fakeTracer(() => nodeCapture({ fatal: "debugger disconnected" })));
+ const cmd = new RunCommand(fakeTracer(() => nodeCapture({ fatal: "debugger disconnected" })));
const { trace } = await cmd.run({ target: TargetKind.Node, port: 9229 });
assert.equal(trace.ok, false);
assert.ok(trace.diagnostics.some((d) => d.code === "ENGINE_FATAL"));
});
test("a clean empty node trace stays ok:true and not running (no false alarms)", async () => {
- const cmd = new DynamicCommand(fakeTracer(() => nodeCapture()));
+ const cmd = new RunCommand(fakeTracer(() => nodeCapture()));
const { trace } = await cmd.run({ target: TargetKind.Node, port: 9229 });
assert.equal(trace.ok, true);
assert.equal(trace.meta.running, undefined, "the final envelope is not flagged running");
diff --git a/ui/app/page.tsx b/ui/app/page.tsx
index d71756f..d7bd62e 100644
--- a/ui/app/page.tsx
+++ b/ui/app/page.tsx
@@ -381,7 +381,7 @@ export default function Home() {
Select a session, or run
- trace dynamic … --emit http://localhost:4000
+ trace run … --emit http://localhost:4000
) : (