@vitest-agent/engine 3.1.0 → 3.1.1
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 +6 -6
- package/index.js +18 -18
- package/layers/EnvironmentDetectorLive.js +1 -1
- package/layers/LoggerLive.js +2 -2
- package/layers/ProjectDiscoveryLive.js +1 -1
- package/layers/ProjectIdentityLive.js +1 -1
- package/package.json +21 -21
- package/programs/hook-paths.js +2 -2
- package/programs/platform-sidecar.js +1 -1
- package/programs/register-agent.js +1 -1
- package/project-dir.js +2 -2
- package/testing.js +2 -2
- package/tsdoc-metadata.json +1 -1
- package/utils/ensure-migrated.js +1 -1
- package/utils/format-fatal-error.js +2 -2
- package/version.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1269,7 +1269,7 @@ export declare class EnvironmentDetector extends EnvironmentDetector_base {}
|
|
|
1269
1269
|
*
|
|
1270
1270
|
* @remarks
|
|
1271
1271
|
* The agent/CI/human split is `@effected/env`'s `Audience.detect`, so the
|
|
1272
|
-
* engine and every `@effected/cli` front end agree on who is running; this
|
|
1272
|
+
* engine and every `@effected/cli-kit` front end agree on who is running; this
|
|
1273
1273
|
* only refines CI into GitHub Actions versus any other CI.
|
|
1274
1274
|
*
|
|
1275
1275
|
* @param runtime - the `@effected/env` runtime snapshot to classify
|
|
@@ -1361,7 +1361,7 @@ export declare const HistoryTrackerTest: {
|
|
|
1361
1361
|
};
|
|
1362
1362
|
/**
|
|
1363
1363
|
* Create a structured JSON (NDJSON) logger layer for stderr, over
|
|
1364
|
-
* `@effected/cli`'s `CliLog` in its diagnostics-only mode
|
|
1364
|
+
* `@effected/cli-kit`'s `CliLog` in its diagnostics-only mode
|
|
1365
1365
|
* (`format: "json"`, `plainLogger: false`): the already-resolved level is
|
|
1366
1366
|
* passed as `level`, and no plain `CliLogger` is installed beside the sink, so
|
|
1367
1367
|
* each record prints once and nothing reads the audience or the terminal.
|
|
@@ -1905,7 +1905,7 @@ export interface PlatformOptions {
|
|
|
1905
1905
|
/**
|
|
1906
1906
|
* Whether `PlatformLive` installs its own logger set (`LoggerLive`, from
|
|
1907
1907
|
* `logLevel` / `logFile`). Defaults to `true`. Pass `false` when the caller
|
|
1908
|
-
* already owns the logger set (for example `@effected/cli`'s `CliLog`
|
|
1908
|
+
* already owns the logger set (for example `@effected/cli-kit`'s `CliLog`
|
|
1909
1909
|
* installed by `CliRuntime.main`'s `env.log`): `LoggerLive` replaces the
|
|
1910
1910
|
* installed loggers, so leaving it in would silence the caller's set.
|
|
1911
1911
|
* `logLevel` and `logFile` are ignored when this is `false`.
|
|
@@ -2026,7 +2026,7 @@ export type HookPathsError = XdgEnvError | AppDirsError$1 | PlatformError | Proj
|
|
|
2026
2026
|
*
|
|
2027
2027
|
* Precedence: the `CLAUDE_PLUGIN_DATA` env var, then
|
|
2028
2028
|
* `VITEST_AGENT_SESSION_MAP_DIR`, then `~/.vitest-agent/` (`HOME`, then
|
|
2029
|
-
* `USERPROFILE`). The two variables are read through `@effected/
|
|
2029
|
+
* `USERPROFILE`). The two variables are read through `@effected/kit`'s
|
|
2030
2030
|
* `LaunchContext.resolve`: a value is trimmed, and a blank or unsubstituted
|
|
2031
2031
|
* `${...}` placeholder value counts as unset. The chosen directory is created. Fails with
|
|
2032
2032
|
* `ProjectIdentityNotResolvableError` when no home directory is resolvable.
|
|
@@ -2555,7 +2555,7 @@ export declare const recoverSessionContextFromSessionEnv: (opts: {
|
|
|
2555
2555
|
* Precedence: `VITEST_AGENT_PROJECT_DIR` (hook-driven override), then
|
|
2556
2556
|
* `VITEST_AGENT_REPORTER_PROJECT_DIR` (the plugin-spawned MCP server's
|
|
2557
2557
|
* hand-off), then `CLAUDE_PROJECT_DIR` (Claude Code's own convention),
|
|
2558
|
-
* then `cwd`. Delegates to `@effected/
|
|
2558
|
+
* then `cwd`. Delegates to `@effected/kit`'s `LaunchContext.projectDir`:
|
|
2559
2559
|
* a value is trimmed, and an empty or whitespace-only value, or one a plugin
|
|
2560
2560
|
* host left as a literal unsubstituted `${...}` placeholder, counts as unset.
|
|
2561
2561
|
* Pure: both the env map and the working directory are injected by the caller.
|
|
@@ -2701,7 +2701,7 @@ export declare const computeFailureSignature: (input: FailureSignatureInput) =>
|
|
|
2701
2701
|
* is (one from `Effect.runPromiseExit` keeps every reason and the span
|
|
2702
2702
|
* trail), and anything else is rendered as a defect, `Cause.die(err)`: an
|
|
2703
2703
|
* unexpected throw is a bug to report, and a defect is the shape whose
|
|
2704
|
-
* document carries the stack. `@effected/cli`'s `CliFailure.toDoc` keeps
|
|
2704
|
+
* document carries the stack. `@effected/cli-kit`'s `CliFailure.toDoc` keeps
|
|
2705
2705
|
* the program's own frames, hides `node_modules` and runtime frames,
|
|
2706
2706
|
* follows an `Error.cause` chain, and renders a non-`Error` value as its
|
|
2707
2707
|
* text.
|
package/index.js
CHANGED
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
import { VitestAgentConfigFile } from "./services/Config.js";
|
|
2
1
|
import { ConfigLive } from "./layers/ConfigLive.js";
|
|
3
|
-
import { DataReader } from "./services/DataReader.js";
|
|
4
|
-
import { HistoryTracker, historyKey } from "./services/HistoryTracker.js";
|
|
5
2
|
import { DataReaderLive } from "./layers/DataReaderLive.js";
|
|
6
|
-
import { DataStore, INLINE_ATTACHMENT_BODY_CAP_BYTES } from "./services/DataStore.js";
|
|
7
|
-
import { withPersistSavepoint, withPersistTransaction } from "./utils/persist-transaction.js";
|
|
8
3
|
import { DataStoreLive } from "./layers/DataStoreLive.js";
|
|
9
|
-
import { DetailResolver } from "./services/DetailResolver.js";
|
|
10
4
|
import { DetailResolverLive } from "./layers/DetailResolverLive.js";
|
|
11
|
-
import { DiscoveryRegistry } from "./services/DiscoveryRegistry.js";
|
|
12
5
|
import { DiscoveryRegistryLive } from "./layers/DiscoveryRegistryLive.js";
|
|
13
|
-
import { EnvironmentDetector } from "./services/EnvironmentDetector.js";
|
|
14
6
|
import { EnvironmentDetectorLive, classifyEnvironment } from "./layers/EnvironmentDetectorLive.js";
|
|
15
7
|
import { EnvironmentDetectorTest } from "./layers/EnvironmentDetectorTest.js";
|
|
16
|
-
import { ExecutorResolver } from "./services/ExecutorResolver.js";
|
|
17
8
|
import { ExecutorResolverLive } from "./layers/ExecutorResolverLive.js";
|
|
18
9
|
import { HistoryTrackerLive } from "./layers/HistoryTrackerLive.js";
|
|
19
10
|
import { HistoryTrackerTest } from "./layers/HistoryTrackerTest.js";
|
|
20
11
|
import { LoggerLive, resolveLogFile, resolveLogLevel } from "./layers/LoggerLive.js";
|
|
21
12
|
import { OutputPipelineLive } from "./layers/OutputPipelineLive.js";
|
|
22
13
|
import { APP_NAMESPACE, DATA_FALLBACK_DIR, PathResolutionLive } from "./layers/PathResolutionLive.js";
|
|
23
|
-
import { PerClientSessionMapReader, PerClientSessionMapWriter } from "./services/PerClientSessionMap.js";
|
|
24
14
|
import { PerClientSessionMapReaderLive, PerClientSessionMapWriterLive } from "./layers/PerClientSessionMapLive.js";
|
|
25
|
-
import { ProjectDiscovery } from "./services/ProjectDiscovery.js";
|
|
26
15
|
import { ProjectDiscoveryLive } from "./layers/ProjectDiscoveryLive.js";
|
|
27
16
|
import { ProjectDiscoveryTest } from "./layers/ProjectDiscoveryTest.js";
|
|
28
|
-
import { ProjectIdentity, resolveProjectIdentityFromCandidates } from "./services/ProjectIdentity.js";
|
|
29
17
|
import { ProjectIdentityLive, ProjectIdentityTest } from "./layers/ProjectIdentityLive.js";
|
|
30
|
-
import { AgentContext, RunContext, RunContext$, RunContextService } from "./services/RunContext.js";
|
|
31
|
-
import { probeHostMetadataFromEnv } from "./utils/host-metadata.js";
|
|
32
18
|
import { RunContextLive, RunContextTest } from "./layers/RunContextLive.js";
|
|
33
19
|
import { formatStrayOutputLine, formatTriageEffect } from "./lib/format-triage.js";
|
|
34
20
|
import { formatWrapupEffect } from "./lib/format-wrapup.js";
|
|
@@ -37,26 +23,40 @@ import migration$1 from "./migrations/0002_test_artifacts.js";
|
|
|
37
23
|
import { PROJECT_MIGRATIONS } from "./migrations/index.js";
|
|
38
24
|
import migration$2 from "./migrations/registry_0001_initial.js";
|
|
39
25
|
import migration$3 from "./migrations/session_map_0001_initial.js";
|
|
40
|
-
import { RegistryStore, SessionMapStore } from "./stores.js";
|
|
41
26
|
import { NodePlatformLayer, PlatformLive, makeSqliteStack } from "./platform.js";
|
|
42
27
|
import { endAgentEffect } from "./programs/end-agent.js";
|
|
43
28
|
import { DATA_DB_FILENAME, REGISTRY_DB_FILENAME, REGISTRY_STORE_OPTIONS, SESSIONS_DB_FILENAME, resolveHookPaths, resolveSessionMapPath } from "./programs/hook-paths.js";
|
|
44
29
|
import { RegistryStoreLive, SessionMapStoreLive, SidecarPlatformLive } from "./programs/platform-sidecar.js";
|
|
45
30
|
import { recordSessionEnd, recordSessionStart } from "./programs/record-session.js";
|
|
46
|
-
import { resolveSessionForRecording } from "./programs/resolve-session-for-recording.js";
|
|
47
31
|
import { dispatchRecordTddArtifactEffect, recordTddArtifactByTaskIdEffect, recordTddArtifactEffect } from "./programs/record-tdd-artifact.js";
|
|
48
32
|
import { parseAndValidateTurnPayload, recordTurnEffect } from "./programs/record-turn.js";
|
|
49
33
|
import { recordRunWorkspaceChangesEffect } from "./programs/record-workspace-changes.js";
|
|
50
|
-
import { IDEMPOTENCY_ROOT_SENTINEL, deriveIdempotencyKey } from "./services/idempotency.js";
|
|
51
34
|
import { registerAgentEffect } from "./programs/register-agent.js";
|
|
35
|
+
import { resolveSessionForRecording } from "./programs/resolve-session-for-recording.js";
|
|
52
36
|
import { recoverSessionContextFromSessionEnv } from "./programs/session-env.js";
|
|
53
37
|
import { resolveProjectDir } from "./project-dir.js";
|
|
38
|
+
import { VitestAgentConfigFile } from "./services/Config.js";
|
|
39
|
+
import { DataReader } from "./services/DataReader.js";
|
|
40
|
+
import { DataStore, INLINE_ATTACHMENT_BODY_CAP_BYTES } from "./services/DataStore.js";
|
|
41
|
+
import { DetailResolver } from "./services/DetailResolver.js";
|
|
42
|
+
import { DiscoveryRegistry } from "./services/DiscoveryRegistry.js";
|
|
43
|
+
import { EnvironmentDetector } from "./services/EnvironmentDetector.js";
|
|
44
|
+
import { ExecutorResolver } from "./services/ExecutorResolver.js";
|
|
45
|
+
import { HistoryTracker, historyKey } from "./services/HistoryTracker.js";
|
|
46
|
+
import { IDEMPOTENCY_ROOT_SENTINEL, deriveIdempotencyKey } from "./services/idempotency.js";
|
|
47
|
+
import { PerClientSessionMapReader, PerClientSessionMapWriter } from "./services/PerClientSessionMap.js";
|
|
48
|
+
import { ProjectDiscovery } from "./services/ProjectDiscovery.js";
|
|
49
|
+
import { ProjectIdentity, resolveProjectIdentityFromCandidates } from "./services/ProjectIdentity.js";
|
|
50
|
+
import { AgentContext, RunContext, RunContext$, RunContextService } from "./services/RunContext.js";
|
|
54
51
|
import { assembleHistoryRecord, assembleManifest } from "./sql/assemblers.js";
|
|
52
|
+
import { RegistryStore, SessionMapStore } from "./stores.js";
|
|
55
53
|
import { ensureMigrated } from "./utils/ensure-migrated.js";
|
|
56
54
|
import { computeFailureSignature, normalizeAssertionShape } from "./utils/failure-signature.js";
|
|
57
55
|
import { formatFatalError } from "./utils/format-fatal-error.js";
|
|
58
|
-
import {
|
|
56
|
+
import { probeHostMetadataFromEnv } from "./utils/host-metadata.js";
|
|
57
|
+
import { withPersistSavepoint, withPersistTransaction } from "./utils/persist-transaction.js";
|
|
59
58
|
import { DATABASE_FILENAME, resolveDataPath } from "./utils/resolve-data-path.js";
|
|
59
|
+
import { resolveProjectKeyFromCwd, resolveProjectKeyFromCwdEffect } from "./utils/resolve-project-key-from-cwd.js";
|
|
60
60
|
import { resolveWorkspaceKey } from "./utils/resolve-workspace-key.js";
|
|
61
61
|
import { CURRENT_ENGINE_VERSION } from "./version.js";
|
|
62
62
|
|
|
@@ -11,7 +11,7 @@ const ciEnvironment = (ci) => ci === "github-actions" ? "ci-github" : "ci-generi
|
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
13
|
* The agent/CI/human split is `@effected/env`'s `Audience.detect`, so the
|
|
14
|
-
* engine and every `@effected/cli` front end agree on who is running; this
|
|
14
|
+
* engine and every `@effected/cli-kit` front end agree on who is running; this
|
|
15
15
|
* only refines CI into GitHub Actions versus any other CI.
|
|
16
16
|
*
|
|
17
17
|
* @param runtime - the `@effected/env` runtime snapshot to classify
|
package/layers/LoggerLive.js
CHANGED
|
@@ -2,12 +2,12 @@ import { Layer, Logger, Option } from "effect";
|
|
|
2
2
|
import { CurrentRuntimeEnv } from "@effected/env";
|
|
3
3
|
import * as NodeFileSystem from "@effect/platform-node/NodeFileSystem";
|
|
4
4
|
import * as NodePath from "@effect/platform-node/NodePath";
|
|
5
|
-
import { CliLog } from "@effected/cli";
|
|
5
|
+
import { CliLog } from "@effected/cli-kit";
|
|
6
6
|
|
|
7
7
|
// src/layers/LoggerLive.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a structured JSON (NDJSON) logger layer for stderr, over
|
|
10
|
-
* `@effected/cli`'s `CliLog` in its diagnostics-only mode
|
|
10
|
+
* `@effected/cli-kit`'s `CliLog` in its diagnostics-only mode
|
|
11
11
|
* (`format: "json"`, `plainLogger: false`): the already-resolved level is
|
|
12
12
|
* passed as `level`, and no plain `CliLogger` is installed beside the sink, so
|
|
13
13
|
* each record prints once and nothing reads the audience or the terminal.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ProjectDiscovery } from "../services/ProjectDiscovery.js";
|
|
2
2
|
import { DiscoveryError, NON_DISCOVERABLE_DIRS } from "@vitest-agent/sdk";
|
|
3
3
|
import { Effect, FileSystem, Layer, Path } from "effect";
|
|
4
|
-
import { ErrorText } from "@effected/engine";
|
|
5
4
|
import { GlobPattern, GlobPatternOptions } from "@effected/glob";
|
|
5
|
+
import { ErrorText } from "@effected/kit";
|
|
6
6
|
import { descend } from "@effected/walker";
|
|
7
7
|
|
|
8
8
|
// src/layers/ProjectDiscoveryLive.ts
|
|
@@ -6,7 +6,7 @@ import { ProjectIdentityNotResolvableError, ProjectIdentitySourceError, VitestAg
|
|
|
6
6
|
import { Effect, FileSystem, Layer, Option, Result } from "effect";
|
|
7
7
|
import { WorkspaceDiscovery } from "@effected/workspaces";
|
|
8
8
|
import { AppDirs } from "@effected/xdg";
|
|
9
|
-
import { ErrorText } from "@effected/
|
|
9
|
+
import { ErrorText } from "@effected/kit";
|
|
10
10
|
import { LenientManifest } from "@effected/package-json";
|
|
11
11
|
|
|
12
12
|
// src/layers/ProjectIdentityLive.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/engine",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
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,26 +40,26 @@
|
|
|
40
40
|
"./package.json": "./package.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@effect/platform-node": "~4.1.
|
|
44
|
-
"@effect/sql-sqlite-node": "~4.1.
|
|
45
|
-
"@effected/app": "^0.
|
|
46
|
-
"@effected/cli": "^0.
|
|
47
|
-
"@effected/config-file": "^0.
|
|
48
|
-
"@effected/
|
|
49
|
-
"@effected/
|
|
50
|
-
"@effected/
|
|
51
|
-
"@effected/
|
|
52
|
-
"@effected/
|
|
53
|
-
"@effected/memfs": "^0.
|
|
54
|
-
"@effected/package-json": "^0.
|
|
55
|
-
"@effected/store": "^0.
|
|
56
|
-
"@effected/toml": "^0.
|
|
57
|
-
"@effected/walker": "^0.
|
|
58
|
-
"@effected/workspaces": "^0.
|
|
59
|
-
"@effected/xdg": "^0.
|
|
60
|
-
"@effected/yaml": "^0.
|
|
61
|
-
"@vitest-agent/sdk": "9.0.
|
|
62
|
-
"effect": "~4.1.
|
|
43
|
+
"@effect/platform-node": "~4.1.2",
|
|
44
|
+
"@effect/sql-sqlite-node": "~4.1.2",
|
|
45
|
+
"@effected/app": "^0.31.0",
|
|
46
|
+
"@effected/cli-kit": "^0.26.0",
|
|
47
|
+
"@effected/config-file": "^0.24.0",
|
|
48
|
+
"@effected/env": "^0.10.0",
|
|
49
|
+
"@effected/git": "^0.30.0",
|
|
50
|
+
"@effected/glob": "^0.18.0",
|
|
51
|
+
"@effected/jsonc": "^0.23.0",
|
|
52
|
+
"@effected/kit": "^0.12.0",
|
|
53
|
+
"@effected/memfs": "^0.23.0",
|
|
54
|
+
"@effected/package-json": "^0.29.0",
|
|
55
|
+
"@effected/store": "^0.23.0",
|
|
56
|
+
"@effected/toml": "^0.19.0",
|
|
57
|
+
"@effected/walker": "^0.25.0",
|
|
58
|
+
"@effected/workspaces": "^0.42.0",
|
|
59
|
+
"@effected/xdg": "^0.19.0",
|
|
60
|
+
"@effected/yaml": "^0.28.0",
|
|
61
|
+
"@vitest-agent/sdk": "9.0.3",
|
|
62
|
+
"effect": "~4.1.2"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=24.11.0"
|
package/programs/hook-paths.js
CHANGED
|
@@ -4,7 +4,7 @@ import { LEDGER_OPTIONS } from "../stores.js";
|
|
|
4
4
|
import { ProjectIdentityNotResolvableError } from "@vitest-agent/sdk";
|
|
5
5
|
import { Effect, FileSystem, Layer, Option, Path } from "effect";
|
|
6
6
|
import { AppDirs, Xdg } from "@effected/xdg";
|
|
7
|
-
import { LaunchContext } from "@effected/
|
|
7
|
+
import { LaunchContext } from "@effected/kit";
|
|
8
8
|
import { Store } from "@effected/store";
|
|
9
9
|
import { AppStore } from "@effected/app";
|
|
10
10
|
|
|
@@ -72,7 +72,7 @@ const hookAppDirs = (env) => {
|
|
|
72
72
|
*
|
|
73
73
|
* Precedence: the `CLAUDE_PLUGIN_DATA` env var, then
|
|
74
74
|
* `VITEST_AGENT_SESSION_MAP_DIR`, then `~/.vitest-agent/` (`HOME`, then
|
|
75
|
-
* `USERPROFILE`). The two variables are read through `@effected/
|
|
75
|
+
* `USERPROFILE`). The two variables are read through `@effected/kit`'s
|
|
76
76
|
* `LaunchContext.resolve`: a value is trimmed, and a blank or unsubstituted
|
|
77
77
|
* `${...}` placeholder value counts as unset. The chosen directory is created. Fails with
|
|
78
78
|
* `ProjectIdentityNotResolvableError` when no home directory is resolvable.
|
|
@@ -5,8 +5,8 @@ import { LoggerLive } from "../layers/LoggerLive.js";
|
|
|
5
5
|
import { PerClientSessionMapWriterLive } from "../layers/PerClientSessionMapLive.js";
|
|
6
6
|
import { RunContextLive } from "../layers/RunContextLive.js";
|
|
7
7
|
import migration from "../migrations/session_map_0001_initial.js";
|
|
8
|
-
import { CONNECTION_OPTIONS, LEDGER_OPTIONS, RegistryStore, SessionMapStore } from "../stores.js";
|
|
9
8
|
import { NodePlatformLayer, makeSqliteStack } from "../platform.js";
|
|
9
|
+
import { CONNECTION_OPTIONS, LEDGER_OPTIONS, RegistryStore, SessionMapStore } from "../stores.js";
|
|
10
10
|
import { REGISTRY_STORE_OPTIONS } from "./hook-paths.js";
|
|
11
11
|
import { Layer } from "effect";
|
|
12
12
|
import { Store } from "@effected/store";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DataReader } from "../services/DataReader.js";
|
|
2
2
|
import { DataStore } from "../services/DataStore.js";
|
|
3
|
+
import { deriveIdempotencyKey } from "../services/idempotency.js";
|
|
3
4
|
import { PerClientSessionMapWriter } from "../services/PerClientSessionMap.js";
|
|
4
5
|
import { RunContextService } from "../services/RunContext.js";
|
|
5
|
-
import { deriveIdempotencyKey } from "../services/idempotency.js";
|
|
6
6
|
import { Effect, Option } from "effect";
|
|
7
7
|
|
|
8
8
|
// src/programs/register-agent.ts
|
package/project-dir.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LaunchContext } from "@effected/
|
|
1
|
+
import { LaunchContext } from "@effected/kit";
|
|
2
2
|
|
|
3
3
|
// src/project-dir.ts
|
|
4
4
|
/**
|
|
@@ -16,7 +16,7 @@ const PROJECT_DIR_ENV_KEYS = [
|
|
|
16
16
|
* Precedence: `VITEST_AGENT_PROJECT_DIR` (hook-driven override), then
|
|
17
17
|
* `VITEST_AGENT_REPORTER_PROJECT_DIR` (the plugin-spawned MCP server's
|
|
18
18
|
* hand-off), then `CLAUDE_PROJECT_DIR` (Claude Code's own convention),
|
|
19
|
-
* then `cwd`. Delegates to `@effected/
|
|
19
|
+
* then `cwd`. Delegates to `@effected/kit`'s `LaunchContext.projectDir`:
|
|
20
20
|
* a value is trimmed, and an empty or whitespace-only value, or one a plugin
|
|
21
21
|
* host left as a literal unsubstituted `${...}` placeholder, counts as unset.
|
|
22
22
|
* Pure: both the env map and the working directory are injected by the caller.
|
package/testing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataReader } from "./services/DataReader.js";
|
|
2
1
|
import { DataStore } from "./services/DataStore.js";
|
|
3
|
-
import { PROJECT_MIGRATIONS } from "./migrations/index.js";
|
|
4
2
|
import { DataStoreTestLayer, makeTestLayer } from "./testing/layers.js";
|
|
3
|
+
import { PROJECT_MIGRATIONS } from "./migrations/index.js";
|
|
4
|
+
import { DataReader } from "./services/DataReader.js";
|
|
5
5
|
import { Agent, AgentId, AgentNotFoundError, AgentReport, BehaviorDetail, BehaviorNotFoundError, BehaviorRow, BehaviorStatus, CacheManifest, ChatId, CoverageBaselines, CoverageReport, DataStoreError, FileCoverageReport, GoalDetail, GoalNotFoundError, GoalRow, GoalStatus, HistoryRecord, IdempotencyHit, IllegalStatusTransitionError, RegistrationConflictError, RunRetentionPolicy, TddTaskAlreadyEndedError, TddTaskNotFoundError, TrendEntry, TrendRecord } from "@vitest-agent/sdk";
|
|
6
6
|
import { Effect, Layer } from "effect";
|
|
7
7
|
|
package/tsdoc-metadata.json
CHANGED
package/utils/ensure-migrated.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LoggerLive } from "../layers/LoggerLive.js";
|
|
2
2
|
import { PROJECT_MIGRATIONS } from "../migrations/index.js";
|
|
3
|
-
import { BUSY_TIMEOUT, LEDGER_OPTIONS, applyConnectionPragmas } from "../stores.js";
|
|
4
3
|
import { NodePlatformLayer } from "../platform.js";
|
|
4
|
+
import { BUSY_TIMEOUT, LEDGER_OPTIONS, applyConnectionPragmas } from "../stores.js";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { Store } from "@effected/store";
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cause } from "effect";
|
|
2
|
-
import { CliFailure, Render } from "@effected/cli";
|
|
2
|
+
import { CliFailure, Render } from "@effected/cli-kit";
|
|
3
3
|
|
|
4
4
|
// src/utils/format-fatal-error.ts
|
|
5
5
|
const ISSUE_URL = "https://github.com/spencerbeggs/vitest-agent/issues";
|
|
@@ -18,7 +18,7 @@ const CONTEXT = Render.contextOf({ audience: "human" });
|
|
|
18
18
|
* is (one from `Effect.runPromiseExit` keeps every reason and the span
|
|
19
19
|
* trail), and anything else is rendered as a defect, `Cause.die(err)`: an
|
|
20
20
|
* unexpected throw is a bug to report, and a defect is the shape whose
|
|
21
|
-
* document carries the stack. `@effected/cli`'s `CliFailure.toDoc` keeps
|
|
21
|
+
* document carries the stack. `@effected/cli-kit`'s `CliFailure.toDoc` keeps
|
|
22
22
|
* the program's own frames, hides `node_modules` and runtime frames,
|
|
23
23
|
* follows an `Error.cause` chain, and renders a non-`Error` value as its
|
|
24
24
|
* text.
|
package/version.js
CHANGED