@vitest-agent/cli 4.0.11 → 4.0.12
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/bin/vitest-agent.js +1 -2
- package/commands/agent.js +1 -2
- package/commands/db.js +1 -2
- package/commands/doctor.js +1 -2
- package/commands/record.js +1 -2
- package/commands/triage.js +1 -2
- package/commands/wrapup.js +1 -2
- package/index.d.ts +0 -2
- package/layers/project-data.js +1 -2
- package/lib/format-db-query.js +1 -2
- package/lib/format-doctor.js +1 -2
- package/lib/render-failure.js +1 -2
- package/lib/version-formatter.js +1 -2
- package/main.d.ts +0 -2
- package/main.js +1 -2
- package/package.json +14 -14
- package/version.js +2 -3
package/bin/vitest-agent.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { main } from "../main.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/bin.ts
|
|
5
5
|
/**
|
|
6
6
|
* CLI entry point for vitest-agent. Thin shim over `main.ts` — the
|
|
7
7
|
* assembled program that owns the process.
|
|
@@ -10,5 +10,4 @@ import { main } from "../main.js";
|
|
|
10
10
|
*/
|
|
11
11
|
main();
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { };
|
package/commands/agent.js
CHANGED
|
@@ -13,7 +13,7 @@ import { classifyTestPath, detectNonDefaultDiscoverStrategy, findOwningWorkspace
|
|
|
13
13
|
import { exitCodeForTag, injectEnv } from "@vitest-agent/sdk/dispatch";
|
|
14
14
|
import { resolveSidecarBinaryPath } from "@vitest-agent/sidecar";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/commands/agent.ts
|
|
17
17
|
const writeStdout = (line) => Effect.sync(() => {
|
|
18
18
|
process.stdout.write(`${line}\n`);
|
|
19
19
|
});
|
|
@@ -216,5 +216,4 @@ const agentCommand = agentParent.pipe(Command.withSubcommands([
|
|
|
216
216
|
checkTestPathSubcommand
|
|
217
217
|
]));
|
|
218
218
|
|
|
219
|
-
//#endregion
|
|
220
219
|
export { agentCommand, checkTestPathSubcommand, endAgentSubcommand, injectEnvSubcommand, registerAgentSubcommand, sidecarPathSubcommand };
|
package/commands/db.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Argument, Command, Flag, Prompt } from "effect/cli";
|
|
|
7
7
|
import { layer } from "@effect/sql-sqlite-node/SqliteClient";
|
|
8
8
|
import { SqlClient } from "effect/sql/SqlClient";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/commands/db.ts
|
|
11
11
|
const pathCommand = Command.make("path", {}, () => Effect.gen(function* () {
|
|
12
12
|
const { dir } = yield* ProjectDir;
|
|
13
13
|
const dbPath = yield* resolveDataPath(dir);
|
|
@@ -99,5 +99,4 @@ const dbCommand = dbParent.pipe(Command.withSubcommands([
|
|
|
99
99
|
queryCommand
|
|
100
100
|
]));
|
|
101
101
|
|
|
102
|
-
//#endregion
|
|
103
102
|
export { dbCommand };
|
package/commands/doctor.js
CHANGED
|
@@ -4,7 +4,7 @@ import { DataReader, resolveDataPath } from "@vitest-agent/engine";
|
|
|
4
4
|
import { Effect, Option } from "effect";
|
|
5
5
|
import { Command, Flag } from "effect/cli";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/doctor.ts
|
|
8
8
|
const formatOption = Flag.withDefault(Flag.Literals("format", ["markdown", "json"]), "markdown");
|
|
9
9
|
const writeOutput = (results, format) => Effect.sync(() => {
|
|
10
10
|
if (format === "json") process.stdout.write(`${JSON.stringify(results, null, 2)}\n`);
|
|
@@ -105,5 +105,4 @@ const doctorCommand = Command.make("doctor", { format: formatOption }, ({ format
|
|
|
105
105
|
if (results.some((r) => !r.passed)) yield* Effect.sync(() => process.exit(1));
|
|
106
106
|
})).pipe(Command.provide(ProjectDataLive));
|
|
107
107
|
|
|
108
|
-
//#endregion
|
|
109
108
|
export { doctorCommand };
|
package/commands/record.js
CHANGED
|
@@ -3,7 +3,7 @@ import { DataReader, DataStore, dispatchRecordTddArtifactEffect, recordRunWorksp
|
|
|
3
3
|
import { Effect, Option } from "effect";
|
|
4
4
|
import { Argument, Command, Flag } from "effect/cli";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/commands/record.ts
|
|
7
7
|
const chatId = Flag.String("chat-id").pipe(Flag.withDescription("Host chat id (`session_id` in the Claude Code hook envelope; equivalent in other clients)"));
|
|
8
8
|
const occurredAt = Flag.String("occurred-at").pipe(Flag.withDefault((/* @__PURE__ */ new Date()).toISOString()), Flag.withDescription("ISO 8601 timestamp; defaults to now"));
|
|
9
9
|
const payloadArg = Argument.String("payload-json").pipe(Argument.withDescription("Stringified JSON payload (validated against TurnPayload)"));
|
|
@@ -195,5 +195,4 @@ const recordCommand = Command.make("record").pipe(Command.withSubcommands([
|
|
|
195
195
|
testCaseTurnsSubcommand
|
|
196
196
|
]), Command.withDescription("Hook write surface (Decision D3): turn, session-start, session-end, tdd-artifact, run-workspace-changes"), Command.provide(ProjectDataLive));
|
|
197
197
|
|
|
198
|
-
//#endregion
|
|
199
198
|
export { recordCommand };
|
package/commands/triage.js
CHANGED
|
@@ -3,7 +3,7 @@ import { formatTriageEffect } from "@vitest-agent/engine";
|
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
import { Command, Flag } from "effect/cli";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/commands/triage.ts
|
|
7
7
|
const formatOption = Flag.withDefault(Flag.Literals("format", [
|
|
8
8
|
"markdown",
|
|
9
9
|
"json",
|
|
@@ -28,5 +28,4 @@ const triageCommand = Command.make("triage", {
|
|
|
28
28
|
yield* Effect.sync(() => process.stdout.write(md.length > 0 ? `${md}\n` : ""));
|
|
29
29
|
})).pipe(Command.withDescription("Emit the W3 orientation triage brief for SessionStart"), Command.provide(ProjectDataLive));
|
|
30
30
|
|
|
31
|
-
//#endregion
|
|
32
31
|
export { triageCommand };
|
package/commands/wrapup.js
CHANGED
|
@@ -3,7 +3,7 @@ import { formatWrapupEffect } from "@vitest-agent/engine";
|
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
import { Command, Flag } from "effect/cli";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/commands/wrapup.ts
|
|
7
7
|
const rowIdOption = Flag.optional(Flag.Int("row-id"));
|
|
8
8
|
const chatIdOption = Flag.optional(Flag.String("chat-id"));
|
|
9
9
|
const kindOption = Flag.withDefault(Flag.Literals("kind", [
|
|
@@ -35,5 +35,4 @@ const wrapupCommand = Command.make("wrapup", {
|
|
|
35
35
|
yield* Effect.sync(() => process.stdout.write(md.length > 0 ? `${md}\n` : ""));
|
|
36
36
|
})).pipe(Command.withDescription("Emit the W5 wrap-up prompt for a session"), Command.provide(ProjectDataLive));
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
export { wrapupCommand };
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/version.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The version of this package, inlined at build time from
|
|
4
3
|
* `package.json#version` via rslib-builder's `__PACKAGE_VERSION__` substitution.
|
|
@@ -8,5 +7,4 @@
|
|
|
8
7
|
* @public
|
|
9
8
|
*/
|
|
10
9
|
export declare const CURRENT_CLI_VERSION: string;
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=index.d.ts.map
|
package/layers/project-data.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformLive, resolveDataPath } from "@vitest-agent/engine";
|
|
2
2
|
import { Context, Effect, Layer } from "effect";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/layers/project-data.ts
|
|
5
5
|
/**
|
|
6
6
|
* The resolved absolute project directory plus the environment it was
|
|
7
7
|
* resolved from. Provided once by `main.ts` from `resolveProjectDir`.
|
|
@@ -22,5 +22,4 @@ const ProjectDataLive = Layer.unwrap(Effect.gen(function* () {
|
|
|
22
22
|
});
|
|
23
23
|
}));
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { ProjectDataLive, ProjectDir };
|
package/lib/format-db-query.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/format-db-query.ts
|
|
2
2
|
const renderCell = (value) => {
|
|
3
3
|
if (value === null || value === void 0) return "NULL";
|
|
4
4
|
if (typeof value === "object") return JSON.stringify(value);
|
|
@@ -22,5 +22,4 @@ const formatDbQuery = (rows, format) => {
|
|
|
22
22
|
return [renderLine(columns), ...cells.map(renderLine)].join("\n");
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { formatDbQuery };
|
package/lib/format-doctor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/format-doctor.ts
|
|
2
2
|
function formatDoctor(results) {
|
|
3
3
|
const lines = [];
|
|
4
4
|
lines.push("## Doctor\n");
|
|
@@ -10,5 +10,4 @@ function formatDoctor(results) {
|
|
|
10
10
|
return lines.join("\n");
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { formatDoctor };
|
package/lib/render-failure.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fmt } from "@effected/cli";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/lib/render-failure.ts
|
|
5
5
|
/**
|
|
6
6
|
* The one-line name of a typed failure: its `_tag` when it carries one (a
|
|
7
7
|
* `PlatformError`, `SqlError`, `StoreError`), else its `Error` name.
|
|
@@ -59,5 +59,4 @@ const renderFailure = (error, details) => {
|
|
|
59
59
|
];
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { renderFailure };
|
package/lib/version-formatter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { distributionSuffix } from "@effected/engine";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/lib/version-formatter.ts
|
|
4
4
|
/**
|
|
5
5
|
* The `CliOutput.Formatter` methods `main.ts` replaces through
|
|
6
6
|
* `CliRuntime.main`'s `env.formatter`: only `formatVersion`, so `--version`
|
|
@@ -24,5 +24,4 @@ const carrierVersionFormatter = (distribution) => {
|
|
|
24
24
|
return { formatVersion: (name, version) => `${name} ${version}${suffix}` };
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
export { carrierVersionFormatter };
|
package/main.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Distribution } from "@effected/engine";
|
|
2
|
-
//#region src/main.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Options the carrier's bin shim passes to {@link main}.
|
|
5
4
|
*
|
|
@@ -65,5 +64,4 @@ export interface MainOptions {
|
|
|
65
64
|
* @public
|
|
66
65
|
*/
|
|
67
66
|
export declare const main: (options?: MainOptions) => void;
|
|
68
|
-
//#endregion
|
|
69
67
|
//# sourceMappingURL=main.d.ts.map
|
package/main.js
CHANGED
|
@@ -14,7 +14,7 @@ import { PathResolutionLive, resolveProjectDir } from "@vitest-agent/engine";
|
|
|
14
14
|
import { Effect, Layer, Option } from "effect";
|
|
15
15
|
import { Command } from "effect/cli";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/main.ts
|
|
18
18
|
/**
|
|
19
19
|
* Assembled CLI program. Owns the process: resolves the project directory, wires the
|
|
20
20
|
* root platform (no database), and runs the root command through
|
|
@@ -126,5 +126,4 @@ const main = (options = {}) => {
|
|
|
126
126
|
NodeRuntime.runMain(program);
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
//#endregion
|
|
130
129
|
export { main };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "On-demand CLI for vitest-agent. Reads cached test data and reports status, overview, coverage, history, trends, and cache health.",
|
|
6
6
|
"keywords": [
|
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
"vitest-agent": "bin/vitest-agent.js"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@effect/platform-node": "^4.0.
|
|
47
|
-
"@effect/sql-sqlite-node": "^4.0.
|
|
48
|
-
"@effected/cli": "^0.
|
|
49
|
-
"@effected/config-file": "^0.
|
|
50
|
-
"@effected/engine": "^0.
|
|
51
|
-
"@effected/env": "^0.
|
|
52
|
-
"@effected/glob": "^0.
|
|
53
|
-
"@effected/walker": "^0.
|
|
54
|
-
"@effected/workspaces": "^0.
|
|
55
|
-
"@vitest-agent/engine": "1.1.
|
|
56
|
-
"@vitest-agent/sdk": "7.0.
|
|
57
|
-
"@vitest-agent/sidecar": "2.2.
|
|
58
|
-
"effect": "^4.0.
|
|
46
|
+
"@effect/platform-node": "^4.0.6",
|
|
47
|
+
"@effect/sql-sqlite-node": "^4.0.6",
|
|
48
|
+
"@effected/cli": "^0.20.0",
|
|
49
|
+
"@effected/config-file": "^0.18.0",
|
|
50
|
+
"@effected/engine": "^0.8.0",
|
|
51
|
+
"@effected/env": "^0.5.0",
|
|
52
|
+
"@effected/glob": "^0.14.0",
|
|
53
|
+
"@effected/walker": "^0.19.0",
|
|
54
|
+
"@effected/workspaces": "^0.36.1",
|
|
55
|
+
"@vitest-agent/engine": "1.1.1",
|
|
56
|
+
"@vitest-agent/sdk": "7.0.5",
|
|
57
|
+
"@vitest-agent/sidecar": "2.2.12",
|
|
58
|
+
"effect": "^4.0.6"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=24.11.0"
|
package/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/version.ts
|
|
2
2
|
/**
|
|
3
3
|
* The version of this package, inlined at build time from
|
|
4
4
|
* `package.json#version` via rslib-builder's `__PACKAGE_VERSION__` substitution.
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
|
-
const CURRENT_CLI_VERSION = "4.0.
|
|
10
|
+
const CURRENT_CLI_VERSION = "4.0.12";
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { CURRENT_CLI_VERSION };
|