@vitest-agent/engine 0.2.8 → 0.2.10
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/index.d.ts +11 -11
- package/layers/DataReaderLive.js +1 -1
- package/layers/DataStoreLive.js +1 -1
- package/layers/DiscoveryRegistryLive.js +1 -1
- package/layers/PerClientSessionMapLive.js +1 -1
- package/layers/ProjectIdentityLive.js +1 -1
- package/layers/RunContextLive.js +1 -1
- package/migrations/0001_initial.js +1 -1
- package/migrations/0002_test_artifacts.js +1 -1
- package/migrations/registry_0001_initial.js +1 -1
- package/migrations/session_map_0001_initial.js +1 -1
- package/package.json +14 -14
- package/programs/record-workspace-changes.js +1 -1
- package/testing.d.ts +9 -9
- package/utils/ensure-migrated.js +1 -1
- package/version.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Context, Effect, FileSystem, Layer, LogLevel, Option, Path, Schema } from "effect";
|
|
2
2
|
import { ConfigFileShape } from "@effected/config-file";
|
|
3
3
|
import { Agent, AgentNotFoundError, AgentReport, ArtifactKind, ArtifactKind as ArtifactKind$1, ArtifactSuite, ArtifactSuite as ArtifactSuite$1, BehaviorDetail, BehaviorNotFoundError, BehaviorRow, BehaviorStatus, CacheManifest, CitedArtifact, CoverageBaselines, CoverageReport, DataStoreError, DetailLevel, DiscoveryError, Environment, Executor, FileCoverageReport, FormatterContext, GoalDetail, GoalNotFoundError, GoalRow, GoalStatus, HistoryRecord, IdempotencyHit, IllegalStatusTransitionError, OutputFormat, Phase, ProjectIdentityNotResolvableError, RegistrationConflictError, RenderedOutput, ResolvedThresholds, TddTaskAlreadyEndedError, TddTaskNotFoundError, TestClassification, TestRun, TrendEntry, TrendRecord, TurnPayload, VitestAgentConfig } from "@vitest-agent/sdk";
|
|
4
|
-
import { SqlClient } from "effect/
|
|
4
|
+
import { SqlClient } from "effect/sql/SqlClient";
|
|
5
5
|
import { WorkspaceDiscovery, WorkspaceDiscoveryFailure, WorkspaceRootNotFoundError } from "@effected/workspaces";
|
|
6
6
|
import { AppDirs, AppDirsError, XdgEnvError } from "@effected/xdg";
|
|
7
|
-
import { ChildProcessSpawner } from "effect/
|
|
7
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
8
8
|
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
9
9
|
import { SqliteClient } from "@effect/sql-sqlite-node/SqliteClient";
|
|
10
|
-
import { MigrationError } from "effect/
|
|
11
|
-
import { SqlError } from "effect/
|
|
10
|
+
import { MigrationError } from "effect/sql/Migrator";
|
|
11
|
+
import { SqlError } from "effect/sql/SqlError";
|
|
12
12
|
import { PlatformError } from "effect/PlatformError";
|
|
13
13
|
//#region src/services/Config.d.ts
|
|
14
14
|
/**
|
|
@@ -1723,11 +1723,11 @@ export declare const formatWrapupEffect: (options: FormatWrapupOptions) => Effec
|
|
|
1723
1723
|
//#endregion
|
|
1724
1724
|
//#region src/migrations/0001_initial.d.ts
|
|
1725
1725
|
/** @internal */
|
|
1726
|
-
declare const migration: Effect.Effect<void, import("effect/
|
|
1726
|
+
declare const migration: Effect.Effect<void, import("effect/sql/SqlError").SqlError, SqlClient>;
|
|
1727
1727
|
//#endregion
|
|
1728
1728
|
//#region src/migrations/0002_test_artifacts.d.ts
|
|
1729
1729
|
/** @internal */
|
|
1730
|
-
declare const migration$1: Effect.Effect<void, import("effect/
|
|
1730
|
+
declare const migration$1: Effect.Effect<void, import("effect/sql/SqlError").SqlError, SqlClient>;
|
|
1731
1731
|
//#endregion
|
|
1732
1732
|
//#region src/migrations/index.d.ts
|
|
1733
1733
|
/**
|
|
@@ -1747,8 +1747,8 @@ declare const migration$1: Effect.Effect<void, import("effect/unstable/sql/SqlEr
|
|
|
1747
1747
|
* @public
|
|
1748
1748
|
*/
|
|
1749
1749
|
export declare const PROJECT_MIGRATIONS: {
|
|
1750
|
-
readonly "0001_initial": import("effect/Effect").Effect<void, import("effect/
|
|
1751
|
-
readonly "0002_test_artifacts": import("effect/Effect").Effect<void, import("effect/
|
|
1750
|
+
readonly "0001_initial": import("effect/Effect").Effect<void, import("effect/sql/SqlError").SqlError, import("effect/sql/SqlClient").SqlClient>;
|
|
1751
|
+
readonly "0002_test_artifacts": import("effect/Effect").Effect<void, import("effect/sql/SqlError").SqlError, import("effect/sql/SqlClient").SqlClient>;
|
|
1752
1752
|
};
|
|
1753
1753
|
//#endregion
|
|
1754
1754
|
//#region src/migrations/registry_0001_initial.d.ts
|
|
@@ -1766,11 +1766,11 @@ export declare const PROJECT_MIGRATIONS: {
|
|
|
1766
1766
|
* the `ON CONFLICT(project_key) DO UPDATE` upsert.
|
|
1767
1767
|
* @public
|
|
1768
1768
|
*/
|
|
1769
|
-
declare const migration$2: Effect.Effect<void, import("effect/
|
|
1769
|
+
declare const migration$2: Effect.Effect<void, import("effect/sql/SqlError").SqlError, SqlClient>;
|
|
1770
1770
|
//#endregion
|
|
1771
1771
|
//#region src/migrations/session_map_0001_initial.d.ts
|
|
1772
1772
|
/** @internal */
|
|
1773
|
-
declare const migration$3: Effect.Effect<void, import("effect/
|
|
1773
|
+
declare const migration$3: Effect.Effect<void, import("effect/sql/SqlError").SqlError, SqlClient>;
|
|
1774
1774
|
//#endregion
|
|
1775
1775
|
//#region src/platform.d.ts
|
|
1776
1776
|
/**
|
|
@@ -1983,7 +1983,7 @@ export interface SidecarPaths {
|
|
|
1983
1983
|
* metadata (the bin passes `process.env`)
|
|
1984
1984
|
* @public
|
|
1985
1985
|
*/
|
|
1986
|
-
export declare const SidecarPlatformLive: (paths: SidecarPaths, env: Record<string, string | undefined>) => Layer.Layer<DataReader | DataStore | DiscoveryRegistry | PerClientSessionMapReader | PerClientSessionMapWriter | RunContext$ | import("@effect/platform-node/NodeServices").NodeServices, import("
|
|
1986
|
+
export declare const SidecarPlatformLive: (paths: SidecarPaths, env: Record<string, string | undefined>) => Layer.Layer<DataReader | DataStore | DiscoveryRegistry | PerClientSessionMapReader | PerClientSessionMapWriter | RunContext$ | import("@effect/platform-node/NodeServices").NodeServices, import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, never>;
|
|
1987
1987
|
//#endregion
|
|
1988
1988
|
//#region src/programs/record-session.d.ts
|
|
1989
1989
|
/**
|
package/layers/DataReaderLive.js
CHANGED
|
@@ -2,7 +2,7 @@ import { DataReader } from "../services/DataReader.js";
|
|
|
2
2
|
import { historyKey } from "../services/HistoryTracker.js";
|
|
3
3
|
import { DataStoreError, extractSqlReason } from "@vitest-agent/sdk";
|
|
4
4
|
import { Effect, Layer, Option } from "effect";
|
|
5
|
-
import { SqlClient } from "effect/
|
|
5
|
+
import { SqlClient } from "effect/sql/SqlClient";
|
|
6
6
|
|
|
7
7
|
//#region src/layers/DataReaderLive.ts
|
|
8
8
|
/** @public */
|
package/layers/DataStoreLive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataStore, INLINE_ATTACHMENT_BODY_CAP_BYTES } from "../services/DataStore.js";
|
|
2
2
|
import { Agent, AgentNotFoundError, BehaviorNotFoundError, DataStoreError, GoalNotFoundError, IdempotencyHit, IllegalStatusTransitionError, RegistrationConflictError, TddTaskAlreadyEndedError, TddTaskNotFoundError, coerceErrorText, extractSqlReason } from "@vitest-agent/sdk";
|
|
3
3
|
import { Effect, Layer, Option } from "effect";
|
|
4
|
-
import { SqlClient } from "effect/
|
|
4
|
+
import { SqlClient } from "effect/sql/SqlClient";
|
|
5
5
|
import { Buffer } from "node:buffer";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiscoveryRegistry } from "../services/DiscoveryRegistry.js";
|
|
2
2
|
import { DataStoreError, extractSqlReason } from "@vitest-agent/sdk";
|
|
3
3
|
import { Effect, Layer } from "effect";
|
|
4
|
-
import { SqlClient } from "effect/
|
|
4
|
+
import { SqlClient } from "effect/sql/SqlClient";
|
|
5
5
|
|
|
6
6
|
//#region src/layers/DiscoveryRegistryLive.ts
|
|
7
7
|
const TABLE = "known_projects";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PerClientSessionMapReader, PerClientSessionMapWriter } from "../services/PerClientSessionMap.js";
|
|
2
2
|
import { DataStoreError, extractSqlReason } from "@vitest-agent/sdk";
|
|
3
3
|
import { Effect, Layer, Option } from "effect";
|
|
4
|
-
import { SqlClient } from "effect/
|
|
4
|
+
import { SqlClient } from "effect/sql/SqlClient";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { basename } from "node:path";
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import { ProjectIdentity, resolveProjectIdentityFromCandidates } from "../servic
|
|
|
3
3
|
import { ProjectIdentityNotResolvableError, VitestAgentConfig } from "@vitest-agent/sdk";
|
|
4
4
|
import { Effect, FileSystem, Layer, Option } from "effect";
|
|
5
5
|
import { WorkspaceDiscovery } from "@effected/workspaces";
|
|
6
|
-
import { ChildProcess, ChildProcessSpawner } from "effect/
|
|
6
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
7
7
|
|
|
8
8
|
//#region src/layers/ProjectIdentityLive.ts
|
|
9
9
|
const readGitRemote = (cwd) => Effect.gen(function* () {
|
package/layers/RunContextLive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentContext, RunContext, RunContextService } from "../services/RunContext.js";
|
|
2
2
|
import { probeHostMetadataFromEnv } from "@vitest-agent/sdk";
|
|
3
3
|
import { Effect, Layer, Option } from "effect";
|
|
4
|
-
import { ChildProcess, ChildProcessSpawner } from "effect/
|
|
4
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
5
5
|
|
|
6
6
|
//#region src/layers/RunContextLive.ts
|
|
7
7
|
const runGit = (spawner, cwd, args) => spawner.string(ChildProcess.make("git", args).pipe(ChildProcess.setCwd(cwd))).pipe(Effect.map((output) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared services, layers, SQLite data layer, migrations and platform resolution for the vitest-agent CLI and MCP server.",
|
|
6
6
|
"keywords": [
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"./package.json": "./package.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
44
|
-
"@effect/sql-sqlite-node": "4.0.0-rc.
|
|
45
|
-
"@effected/config-file": "^0.
|
|
46
|
-
"@effected/engine": "^0.
|
|
47
|
-
"@effected/glob": "^0.
|
|
48
|
-
"@effected/jsonc": "^0.
|
|
49
|
-
"@effected/toml": "^0.
|
|
50
|
-
"@effected/walker": "^0.
|
|
51
|
-
"@effected/workspaces": "^0.
|
|
52
|
-
"@effected/xdg": "^0.
|
|
53
|
-
"@effected/yaml": "^0.
|
|
54
|
-
"@vitest-agent/sdk": "5.1.
|
|
55
|
-
"effect": "4.0.0-rc.
|
|
43
|
+
"@effect/platform-node": "4.0.0-rc.118",
|
|
44
|
+
"@effect/sql-sqlite-node": "4.0.0-rc.118",
|
|
45
|
+
"@effected/config-file": "^0.13.0",
|
|
46
|
+
"@effected/engine": "^0.2.0",
|
|
47
|
+
"@effected/glob": "^0.9.0",
|
|
48
|
+
"@effected/jsonc": "^0.14.0",
|
|
49
|
+
"@effected/toml": "^0.10.0",
|
|
50
|
+
"@effected/walker": "^0.13.0",
|
|
51
|
+
"@effected/workspaces": "^0.30.1",
|
|
52
|
+
"@effected/xdg": "^0.8.0",
|
|
53
|
+
"@effected/yaml": "^0.18.0",
|
|
54
|
+
"@vitest-agent/sdk": "5.1.3",
|
|
55
|
+
"effect": "4.0.0-rc.118",
|
|
56
56
|
"std-env": "^4.2.0"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
package/testing.d.ts
CHANGED
|
@@ -1075,27 +1075,27 @@ export declare class DataReader extends DataReader_base {}
|
|
|
1075
1075
|
* @public
|
|
1076
1076
|
*/
|
|
1077
1077
|
export declare const PROJECT_MIGRATIONS: {
|
|
1078
|
-
readonly "0001_initial": import("effect/Effect").Effect<void, import("effect/
|
|
1079
|
-
readonly "0002_test_artifacts": import("effect/Effect").Effect<void, import("effect/
|
|
1078
|
+
readonly "0001_initial": import("effect/Effect").Effect<void, import("effect/sql/SqlError").SqlError, import("effect/sql/SqlClient").SqlClient>;
|
|
1079
|
+
readonly "0002_test_artifacts": import("effect/Effect").Effect<void, import("effect/sql/SqlError").SqlError, import("effect/sql/SqlClient").SqlClient>;
|
|
1080
1080
|
};
|
|
1081
1081
|
//#endregion
|
|
1082
1082
|
//#region src/testing/layers.d.ts
|
|
1083
1083
|
/** @public */
|
|
1084
|
-
export declare function makeTestLayer(filename: string): Layer.Layer<DataReader | DataStore | import("effect/
|
|
1084
|
+
export declare function makeTestLayer(filename: string): Layer.Layer<DataReader | DataStore | import("effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | import("@effect/platform-node/NodeServices").NodeServices, import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, never>;
|
|
1085
1085
|
/** @public */
|
|
1086
|
-
export declare const DataStoreTestLayer: Layer.Layer<DataReader | DataStore | import("effect/
|
|
1086
|
+
export declare const DataStoreTestLayer: Layer.Layer<DataReader | DataStore | import("effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | import("@effect/platform-node/NodeServices").NodeServices, import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, never>;
|
|
1087
1087
|
//#endregion
|
|
1088
1088
|
//#region src/testing/index.d.ts
|
|
1089
1089
|
/** @public */
|
|
1090
|
-
export declare function empty(filename: string): Layer.Layer<DataReader | DataStore | import("effect/
|
|
1090
|
+
export declare function empty(filename: string): Layer.Layer<DataReader | DataStore | import("effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | import("@effect/platform-node/NodeServices").NodeServices, import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, never>;
|
|
1091
1091
|
/** @public */
|
|
1092
|
-
export declare function singlePassingRun(filename: string): Layer.Layer<DataReader | DataStore | import("effect/
|
|
1092
|
+
export declare function singlePassingRun(filename: string): Layer.Layer<DataReader | DataStore | import("effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | import("@effect/platform-node/NodeServices").NodeServices, import("@vitest-agent/sdk").DataStoreError | import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, never>;
|
|
1093
1093
|
/** @public */
|
|
1094
|
-
export declare function withFailures(filename: string): Layer.Layer<DataReader | DataStore | import("effect/
|
|
1094
|
+
export declare function withFailures(filename: string): Layer.Layer<DataReader | DataStore | import("effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | import("@effect/platform-node/NodeServices").NodeServices, import("@vitest-agent/sdk").DataStoreError | import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, never>;
|
|
1095
1095
|
/** @public */
|
|
1096
|
-
export declare function flaky(filename: string): Layer.Layer<DataReader | DataStore | import("effect/
|
|
1096
|
+
export declare function flaky(filename: string): Layer.Layer<DataReader | DataStore | import("effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | import("@effect/platform-node/NodeServices").NodeServices, import("@vitest-agent/sdk").DataStoreError | import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError, never>;
|
|
1097
1097
|
/** @public */
|
|
1098
|
-
export declare function withTddTask(filename: string): Layer.Layer<DataReader | DataStore | import("effect/
|
|
1098
|
+
export declare function withTddTask(filename: string): Layer.Layer<DataReader | DataStore | import("effect/sql/SqlClient").SqlClient | import("@effect/sql-sqlite-node/SqliteClient").SqliteClient | import("@effect/platform-node/NodeServices").NodeServices, import("@vitest-agent/sdk").BehaviorNotFoundError | import("@vitest-agent/sdk").DataStoreError | import("@vitest-agent/sdk").GoalNotFoundError | import("@vitest-agent/sdk").IllegalStatusTransitionError | import("effect/sql/Migrator").MigrationError | import("effect/sql/SqlError").SqlError | import("@vitest-agent/sdk").TddTaskAlreadyEndedError | import("@vitest-agent/sdk").TddTaskNotFoundError, never>;
|
|
1099
1099
|
//#endregion
|
|
1100
1100
|
export { type AcceptanceMetrics, Agent, AgentId, AgentNotFoundError, AgentReport, type ArtifactKind, type ArtifactSuite, type AssociateRunSessionInput, BehaviorDetail, BehaviorNotFoundError, BehaviorRow, BehaviorStatus, CacheManifest, type ChangeKind, ChatId, type CitedArtifact, type CitedArtifactRow, type ClassificationQueryOptions, type CommitChangesEntry, CoverageBaselines, CoverageReport, type CreateBehaviorInput, type CreateGoalInput, type CurrentTddPhase, DataStoreError, type EndTddTaskInput, type FailureSignatureDetail, type FailureSignatureWriteInput, type FileCoverageInput, FileCoverageReport, type FlakyTest, GoalDetail, GoalNotFoundError, GoalRow, GoalStatus, type HistoryQueryOptions, HistoryRecord, type HypothesisDetail, type HypothesisInput, IdempotencyHit, type IdempotentResponseInput, type IllegalStatusTransitionEntity, IllegalStatusTransitionError, type ModuleInput, type ModuleListEntry, type NoteInput, type NoteRow, type PersistedAttachment, type PersistentFailure, type Phase, type ProjectRunSummary, type RegisterAgentInput, RegistrationConflictError, type ResolvedThresholds, type RunChangedFile, type RunInvocationMethod, type SessionDetail, type SessionInput, type SettingsInput, type SettingsListEntry, type SettingsRow, type StackFrameInput, type SuiteInput, type SuiteListEntry, type TagInventoryRow, type TddArtifactDetail, type TddArtifactRow, type TddPhaseDetail, TddTaskAlreadyEndedError, type TddTaskDetail, type TddTaskEndOutcome, type TddTaskInput, TddTaskNotFoundError, type TddTaskSummary, type TestAnnotationInput, type TestAnnotationRow, type TestArtifactInput, type TestArtifactQueryOptions, type TestArtifactRow, type TestAttachmentInput, type TestCaseInput, type TestError, type TestErrorInput, type TestListEntry, type TestLookupOptions, type TestRunInput, TrendEntry, TrendRecord, type TurnInput, type TurnSearchOptions, type TurnSummary, type UpdateBehaviorInput, type UpdateGoalInput, type ValidateHypothesisInput, type WriteCommitInput, type WriteRunChangedFilesInput, type WriteTddArtifactInput, type WriteTddPhaseInput, type WriteTddPhaseOutput };
|
|
1101
1101
|
//# sourceMappingURL=testing.d.ts.map
|
package/utils/ensure-migrated.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LoggerLive } from "../layers/LoggerLive.js";
|
|
2
2
|
import { NodePlatformLayer, makeSqliteStack } from "../platform.js";
|
|
3
3
|
import { Effect, Layer } from "effect";
|
|
4
|
-
import { SqlClient } from "effect/
|
|
4
|
+
import { SqlClient } from "effect/sql/SqlClient";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/ensure-migrated.ts
|
|
7
7
|
const GLOBAL_KEY = Symbol.for("vitest-agent/migration-promises");
|
package/version.js
CHANGED