@vitest-agent/cli 1.0.1 → 1.0.3
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 -4
- package/commands/agent.js +1 -1
- package/index.d.ts +3 -4
- package/index.js +2 -3
- package/lib/record-turn.js +1 -1
- package/package.json +3 -3
package/bin/vitest-agent.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { CliLive } from "../layers/CliLive.js";
|
|
3
|
-
import { CURRENT_CLI_VERSION } from "../index.js";
|
|
4
3
|
import { agentCommand } from "../commands/agent.js";
|
|
5
4
|
import { dbCommand } from "../commands/db.js";
|
|
6
5
|
import { doctorCommand } from "../commands/doctor.js";
|
|
7
6
|
import { NodeContext, NodeRuntime } from "@effect/platform-node";
|
|
8
|
-
import {
|
|
7
|
+
import { PathResolutionLive, formatFatalError, resolveDataPath, resolveLogFile, resolveLogLevel } from "@vitest-agent/sdk";
|
|
9
8
|
import { Cause, Console, Effect } from "effect";
|
|
10
9
|
import { Command } from "@effect/cli";
|
|
11
10
|
|
|
@@ -26,8 +25,6 @@ const cli = Command.run(rootCommand, {
|
|
|
26
25
|
});
|
|
27
26
|
const logLevel = resolveLogLevel();
|
|
28
27
|
const logFile = resolveLogFile();
|
|
29
|
-
// @vitest-agent/sdk and writes a single stderr line on mismatch.
|
|
30
|
-
if ("1.0.1" !== "0.0.0" && CURRENT_SDK_VERSION !== "1.0.1") process.stderr.write(`[@vitest-agent/cli] version drift: @vitest-agent/cli@${CURRENT_CLI_VERSION} with @vitest-agent/sdk@${CURRENT_SDK_VERSION}. Reinstall @vitest-agent/* packages so versions match.\n`);
|
|
31
28
|
const projectDir = process.env.VITEST_AGENT_PROJECT_DIR ?? process.cwd();
|
|
32
29
|
const main = resolveDataPath(projectDir).pipe(Effect.flatMap((dbPath) => Effect.suspend(() => cli(process.argv)).pipe(Effect.provide(CliLive(dbPath, logLevel, logFile)))), Effect.provide(PathResolutionLive(projectDir)), Effect.provide(NodeContext.layer), Effect.catchAllCause((cause) => {
|
|
33
30
|
if (Cause.defects(cause).length > 0) return Console.error(`vitest-agent: ${formatFatalError(cause)}`).pipe(Effect.andThen(Effect.failCause(cause)));
|
package/commands/agent.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { DataReader, DataStore, PerClientSessionMapWriter, ProjectIdentityNotRes
|
|
|
17
17
|
* @param logFile - optional path for structured log output
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
|
-
declare const CliLive: (dbPath: string, logLevel?: LogLevel.LogLevel, logFile?: string) => Layer.Layer<import("@vitest-agent/sdk").
|
|
20
|
+
declare const CliLive: (dbPath: string, logLevel?: LogLevel.LogLevel, logFile?: string) => Layer.Layer<import("@vitest-agent/sdk").DataReader | import("@vitest-agent/sdk").DataStore | import("@vitest-agent/sdk").DetailResolver | import("@vitest-agent/sdk").EnvironmentDetector | import("@vitest-agent/sdk").ExecutorResolver | import("@vitest-agent/sdk").FormatSelector | import("@vitest-agent/sdk").HistoryTracker | import("@vitest-agent/sdk").OutputRenderer | import("@vitest-agent/sdk").ProjectDiscovery | import("@effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | NodeContext.NodeContext, SqliteMigrator.MigrationError | import("@effect/sql/SqlError").SqlError | import("effect/ConfigError").ConfigError, never>;
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/layers/SidecarLive.d.ts
|
|
23
23
|
/**
|
|
@@ -43,7 +43,7 @@ interface SidecarPaths {
|
|
|
43
43
|
* @param paths - the three SQLite database paths to open
|
|
44
44
|
* @public
|
|
45
45
|
*/
|
|
46
|
-
declare const SidecarLive: (paths: SidecarPaths) => Layer.Layer<import("@vitest-agent/sdk").DataReader | import("@vitest-agent/sdk").DataStore |
|
|
46
|
+
declare const SidecarLive: (paths: SidecarPaths) => Layer.Layer<import("@vitest-agent/sdk").DataReader | import("@vitest-agent/sdk").DataStore | import("@vitest-agent/sdk").DiscoveryRegistry | import("@vitest-agent/sdk").PerClientSessionMapReader | import("@vitest-agent/sdk").PerClientSessionMapWriter | import("@vitest-agent/sdk").RunContext$ | NodeContext.NodeContext, SqliteMigrator.MigrationError | import("@effect/sql/SqlError").SqlError | import("effect/ConfigError").ConfigError, never>;
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/lib/internal-register-agent.d.ts
|
|
49
49
|
/**
|
|
@@ -158,8 +158,7 @@ declare const resolveSessionMapPath: () => Effect.Effect<string, ProjectIdentity
|
|
|
158
158
|
/**
|
|
159
159
|
* The version of this package, inlined at build time from
|
|
160
160
|
* `package.json#version` via rslib-builder's `__PACKAGE_VERSION__` substitution.
|
|
161
|
-
*
|
|
162
|
-
* partially-upgraded installs as a single stderr warning.
|
|
161
|
+
* Exported for version introspection by downstream tooling.
|
|
163
162
|
*
|
|
164
163
|
* @public
|
|
165
164
|
*/
|
package/index.js
CHANGED
|
@@ -7,12 +7,11 @@ import { DATA_DB_FILENAME, REGISTRY_DB_FILENAME, SESSIONS_DB_FILENAME, resolvePr
|
|
|
7
7
|
/**
|
|
8
8
|
* The version of this package, inlined at build time from
|
|
9
9
|
* `package.json#version` via rslib-builder's `__PACKAGE_VERSION__` substitution.
|
|
10
|
-
*
|
|
11
|
-
* partially-upgraded installs as a single stderr warning.
|
|
10
|
+
* Exported for version introspection by downstream tooling.
|
|
12
11
|
*
|
|
13
12
|
* @public
|
|
14
13
|
*/
|
|
15
|
-
const CURRENT_CLI_VERSION = "1.0.
|
|
14
|
+
const CURRENT_CLI_VERSION = "1.0.3";
|
|
16
15
|
|
|
17
16
|
//#endregion
|
|
18
17
|
export { CURRENT_CLI_VERSION, CliLive, DATA_DB_FILENAME, REGISTRY_DB_FILENAME, SESSIONS_DB_FILENAME, SidecarLive, registerAgentEffect, resolveProjectDataDir, resolveRegistryDir, resolveSessionMapPath };
|
package/lib/record-turn.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
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": [
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@effect/rpc": "^0.75.1",
|
|
45
45
|
"@effect/sql": "^0.51.1",
|
|
46
46
|
"@effect/sql-sqlite-node": "^0.52.0",
|
|
47
|
-
"@vitest-agent/sdk": "1.0
|
|
48
|
-
"@vitest-agent/sidecar": "1.0.
|
|
47
|
+
"@vitest-agent/sdk": "1.2.0",
|
|
48
|
+
"@vitest-agent/sidecar": "1.0.2",
|
|
49
49
|
"effect": "^3.21.4"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|