@vitest-agent/engine 2.0.0 → 2.1.0

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 CHANGED
@@ -1,10 +1,10 @@
1
+ import { AppDirs, AppDirs as AppDirs$1, AppDirsError, AppDirsError as AppDirsError$1, XdgEnvError } from "@effected/xdg";
1
2
  import { Context, Effect, FileSystem, Layer, LogLevel, Option, Path, Schema } from "effect";
2
3
  import { ConfigFileShape } from "@effected/config-file";
3
4
  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, GoalDetail, GoalNotFoundError, GoalRow, GoalStatus, HistoryRecord, IdempotencyHit, IllegalStatusTransitionError, Phase, ProjectIdentityError, ProjectIdentityNotResolvableError, RegistrationConflictError, ResolvedThresholds, RunRetentionPolicy, StrayOutput, TddTaskAlreadyEndedError, TddTaskNotFoundError, TestClassification, TestRun, TrendEntry, TrendRecord, TurnPayload, VitestAgentConfig } from "@vitest-agent/sdk";
4
5
  import { SqlClient } from "effect/sql/SqlClient";
5
6
  import { CiName, RuntimeEnv } from "@effected/env";
6
7
  import { WorkspaceDiscovery, WorkspaceDiscoveryFailure, WorkspaceRootNotFoundError } from "@effected/workspaces";
7
- import { AppDirs, AppDirsError, XdgEnvError } from "@effected/xdg";
8
8
  import { ChildProcessSpawner } from "effect/process";
9
9
  import * as NodeServices from "@effect/platform-node/NodeServices";
10
10
  import { SqliteClient } from "@effect/sql-sqlite-node/SqliteClient";
@@ -1444,7 +1444,7 @@ export declare const DATA_FALLBACK_DIR = ".local/share/vitest-agent";
1444
1444
  * anchor the config file resolvers and workspace discovery.
1445
1445
  * @public
1446
1446
  */
1447
- export declare const PathResolutionLive: (projectDir: string) => Layer.Layer<AppDirs | VitestAgentConfigFile | WorkspaceDiscovery, import("@effected/xdg").XdgEnvError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
1447
+ export declare const PathResolutionLive: (projectDir: string) => Layer.Layer<AppDirs$1 | VitestAgentConfigFile | WorkspaceDiscovery, import("@effected/xdg").XdgEnvError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
1448
1448
  /** @public */
1449
1449
  export interface MapSessionInput {
1450
1450
  readonly hostSessionId: string;
@@ -1995,7 +1995,7 @@ export interface HookPaths {
1995
1995
  *
1996
1996
  * @public
1997
1997
  */
1998
- export type HookPathsError = XdgEnvError | AppDirsError | PlatformError | ProjectIdentityNotResolvableError;
1998
+ export type HookPathsError = XdgEnvError | AppDirsError$1 | PlatformError | ProjectIdentityNotResolvableError;
1999
1999
  /**
2000
2000
  * Resolve the per-client `sessions.db` path.
2001
2001
  *
@@ -2752,7 +2752,7 @@ export interface ResolveDataPathOptions {
2752
2752
  * @param options - Optional programmatic overrides.
2753
2753
  * @public
2754
2754
  */
2755
- export declare const resolveDataPath: (projectDir: string, options?: ResolveDataPathOptions) => Effect.Effect<any, import("@effected/xdg").AppDirsError | import("effect/PlatformError").PlatformError | import("@effected/config-file").ConfigReadError<import("@effected/config-file").ConfigCodecError>, AppDirs | FileSystem.FileSystem | VitestAgentConfigFile>;
2755
+ export declare const resolveDataPath: (projectDir: string, options?: ResolveDataPathOptions) => Effect.Effect<string, import("@effected/xdg").AppDirsError | import("effect/PlatformError").PlatformError | import("@effected/config-file").ConfigReadError<import("@effected/config-file").ConfigCodecError>, AppDirs$1 | FileSystem.FileSystem | VitestAgentConfigFile>;
2756
2756
  /**
2757
2757
  * Compute the project key for a workspace by reading `package.json`
2758
2758
  * fields directly. Returns the canonical `host__path` form when a git
@@ -2809,5 +2809,5 @@ export declare const resolveProjectKeyFromCwdEffect: (cwd: string) => Effect.Eff
2809
2809
  export declare const resolveWorkspaceKey: (projectDir: string) => Effect.Effect<string, WorkspaceRootNotFoundError | WorkspaceDiscoveryFailure, WorkspaceDiscovery>;
2810
2810
  /** Build-time injected package version (see architecture.md D36). @public */
2811
2811
  export declare const CURRENT_ENGINE_VERSION: string;
2812
- export { type ArtifactKind, type ArtifactSuite, type FormatTriageOptions, type FormatWrapupOptions, type MigrationRecord, type Phase, type WrapupKind, migration as migration0001, migration$1 as migration0002, migration$2 as registryMigration0001, migration$3 as sessionMapMigration0001 };
2812
+ export { type AppDirs, type AppDirsError, type ArtifactKind, type ArtifactSuite, type FormatTriageOptions, type FormatWrapupOptions, type MigrationRecord, type Phase, type WrapupKind, migration as migration0001, migration$1 as migration0002, migration$2 as registryMigration0001, migration$3 as sessionMapMigration0001 };
2813
2813
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { VitestAgentConfigFile } from "../services/Config.js";
2
- import { ConfigFile, ConfigResolver, MergeStrategy, TomlCodec } from "@effected/config-file";
2
+ import { ConfigFile, ConfigResolver, MergeStrategy } from "@effected/config-file";
3
+ import { TomlCodec } from "@effected/config-file/toml";
3
4
  import { VitestAgentConfig } from "@vitest-agent/sdk";
4
5
 
5
6
  // src/layers/ConfigLive.ts
@@ -319,7 +319,8 @@ const DataReaderLive = Layer.effect(DataReader, Effect.gen(function* () {
319
319
  project,
320
320
  updatedAt: tests.reduce((latest, t) => {
321
321
  const ts = t.runs[0]?.timestamp ?? "";
322
- return ts > latest ? ts : latest;
322
+ if (ts > latest) return ts;
323
+ return latest;
323
324
  }, "") || (/* @__PURE__ */ new Date()).toISOString(),
324
325
  tests
325
326
  };
@@ -852,8 +853,8 @@ const DataReaderLive = Layer.effect(DataReader, Effect.gen(function* () {
852
853
  const manifest = {
853
854
  updatedAt: rows.reduce((latest, r) => {
854
855
  if (!r.last_run) return latest;
855
- if (!latest) return r.last_run;
856
- return r.last_run > latest ? r.last_run : latest;
856
+ if (!latest || r.last_run > latest) return r.last_run;
857
+ return latest;
857
858
  }, null) ?? (/* @__PURE__ */ new Date()).toISOString(),
858
859
  cacheDir: dbPath,
859
860
  projects
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/engine",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
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": [
@@ -42,19 +42,19 @@
42
42
  "dependencies": {
43
43
  "@effect/platform-node": "^4.0.6",
44
44
  "@effect/sql-sqlite-node": "^4.0.6",
45
- "@effected/app": "^0.26.0",
46
- "@effected/cli": "^0.22.0",
47
- "@effected/config-file": "^0.19.1",
45
+ "@effected/app": "^0.27.1",
46
+ "@effected/cli": "^0.22.2",
47
+ "@effected/config-file": "^0.20.1",
48
48
  "@effected/engine": "^0.8.0",
49
49
  "@effected/env": "^0.5.0",
50
50
  "@effected/glob": "^0.14.0",
51
51
  "@effected/jsonc": "^0.20.0",
52
- "@effected/store": "^0.18.0",
52
+ "@effected/store": "^0.19.0",
53
53
  "@effected/toml": "^0.16.0",
54
- "@effected/walker": "^0.19.0",
55
- "@effected/workspaces": "^0.38.0",
56
- "@effected/xdg": "^0.14.1",
57
- "@effected/yaml": "^0.25.0",
54
+ "@effected/walker": "^0.20.1",
55
+ "@effected/workspaces": "^0.39.0",
56
+ "@effected/xdg": "^0.15.1",
57
+ "@effected/yaml": "^0.25.1",
58
58
  "@vitest-agent/sdk": "8.0.0",
59
59
  "effect": "^4.0.6"
60
60
  },
package/sql/assemblers.js CHANGED
@@ -11,7 +11,8 @@ import { historyKey } from "../services/HistoryTracker.js";
11
11
  function assembleManifest(rows, dbPath) {
12
12
  return {
13
13
  updatedAt: rows.reduce((latest, row) => {
14
- return row.timestamp > latest ? row.timestamp : latest;
14
+ if (row.timestamp > latest) return row.timestamp;
15
+ return latest;
15
16
  }, (/* @__PURE__ */ new Date(0)).toISOString()),
16
17
  cacheDir: dbPath,
17
18
  projects: rows.map((row) => {
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.59.1"
8
+ "packageVersion": "7.59.4"
9
9
  }
10
10
  ]
11
11
  }
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
2
  /** Build-time injected package version (see architecture.md D36). @public */
3
- const CURRENT_ENGINE_VERSION = "2.0.0";
3
+ const CURRENT_ENGINE_VERSION = "2.1.0";
4
4
 
5
5
  export { CURRENT_ENGINE_VERSION };