@vitest-agent/sdk 2.0.10 → 2.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/formatters/terminal.js +2 -1
- package/index.js +1 -1
- package/internal-inject-env.js +2 -1
- package/layers/DiscoveryRegistryLive.js +1 -1
- package/package.json +3 -3
- package/testing.d.ts +594 -594
- package/utils/resolve-data-path.js +3 -1
- package/utils/resolve-project-key-from-cwd.js +2 -1
package/formatters/terminal.js
CHANGED
|
@@ -31,7 +31,8 @@ import * as path from "node:path";
|
|
|
31
31
|
*/
|
|
32
32
|
const FAILED_TEST_ROW = /^( {4}(?:\x1b\[\d+m)?✗(?:\x1b\[\d+m)? )([^ ]+)( > )/gm;
|
|
33
33
|
const wrapHyperlinks = (text, ctx) => text.replace(FAILED_TEST_ROW, (_match, prefix, captured, suffix) => {
|
|
34
|
-
|
|
34
|
+
const absolute = path.resolve(process.cwd(), captured);
|
|
35
|
+
return `${prefix}${osc8(`file://${absolute}`, captured, { enabled: !ctx.noColor })}${suffix}`;
|
|
35
36
|
});
|
|
36
37
|
/** @public */
|
|
37
38
|
const TerminalFormatter = {
|
package/index.js
CHANGED
|
@@ -115,7 +115,7 @@ import { requiredArtifactForTransition, transitionEnforcesBehaviorMatch, validat
|
|
|
115
115
|
* substituted yet. Exported for version introspection by downstream tooling.
|
|
116
116
|
* @public
|
|
117
117
|
*/
|
|
118
|
-
const CURRENT_SDK_VERSION = "2.0.
|
|
118
|
+
const CURRENT_SDK_VERSION = "2.0.12";
|
|
119
119
|
|
|
120
120
|
//#endregion
|
|
121
121
|
export { ActionSeverity, ActorType, Agent, AgentConsoleMode, AgentContext, AgentId, AgentNotFoundError, AgentPluginOptions, AgentReport, AgentReporterOptions, BehaviorAbandonedEvent, BehaviorAddedEvent, BehaviorCompletedEvent, BehaviorDetail, BehaviorNotFoundError, BehaviorRow, BehaviorScopedEventTypes, BehaviorStartedEvent, BehaviorStatus, BehaviorsReadyEvent, BlockedEvent, CURRENT_SDK_VERSION, CacheManifest, CacheManifestEntry, ChannelEvent, ChatId, CiConsoleMode, ConfigLive, ConsoleLeakFile, ConsoleLeaks, ConsoleLogLevel, ConsoleMode, ConsoleOutputMode, ConsoleOutputs, ConversationId, ConversationNotFoundError, CoverageBaselines, FileCoverageReport as CoverageFile, CoverageGap, CoverageLevel, CoverageMetric, CoverageRenderState, CoverageReport, CoverageTargets, CoverageTargetsMetrics, CoverageTotals, DATABASE_FILENAME, DataReader, DataReaderLive, DataStore, DataStoreError, DataStoreLive, DetailLevel, DetailResolver, DetailResolverLive, DiscoveryError, DiscoveryRegistry, DiscoveryRegistryLive, Environment, EnvironmentDetector, EnvironmentDetectorLive, EnvironmentDetectorTest, Executor, ExecutorResolver, ExecutorResolverLive, FailureRecord, FileCoverageReport, FileEditPayload, FormatSelector, FormatSelectorLive, GfmFormatter, GitCommandError, GoalAbandonedEvent, GoalAddedEvent, GoalCompletedEvent, GoalDetail, GoalNotFoundError, GoalRow, GoalStartedEvent, GoalStatus, GoalsReadyEvent, HistoryRecord, HistoryTracker, HistoryTrackerLive, HistoryTrackerTest, HookFirePayload, HookStatus, HookType, HostKind, HostMetadataParseError, HumanConsoleMode, HypothesisPayload, IDEMPOTENCY_ROOT_SENTINEL, IdempotencyHit, IllegalStatusTransitionError, JsonFormatter, LoggerLive, MarkdownFormatter, MetricThresholds, ModuleRecord, ModuleReport, NotePayload, OutputFormat, OutputPipelineLive, OutputRenderer, OutputRendererLive, PackageManager, PathResolutionError, PathResolutionLive, PatternThresholds, PerClientSessionMapReader, PerClientSessionMapReaderLive, PerClientSessionMapWriter, PerClientSessionMapWriterLive, PhaseTransitionEvent, ProbeMissError, ProjectDiscovery, ProjectDiscoveryLive, ProjectDiscoveryTest, ProjectIdentity, ProjectIdentityLive, ProjectIdentityNotResolvableError, ProjectIdentityTest, ProjectKey, RegistrationConflictError, RenderState, RenderTotals, ReportError, ReportSummary, ResolvedThresholds, RunContext, RunContext$, RunContextLive, RunContextService, RunContextTest, RunEvent, SessionCompleteEvent, SessionNotFoundError, SessionOutcome, SidecarTimeoutError, SilentFormatter, SuggestedActionRecord, TagCountEntry, TddTaskAlreadyEndedError, TddTaskId, TddTaskNotFoundError, TerminalFormatter, TestClassification, TestHistory, TestRecord, TestReport, TestRun, TestRunReason, TestState, ToolCallPayload, ToolResultPayload, Transport, TrendEntry, TrendRecord, TurnPayload, UserPromptPayload, VitestAgentConfig, VitestAgentConfigFile, _resetMigrationCacheForTesting, ansi, assembleHistoryRecord, assembleManifest, buildAgentReport, buildConsoleLeaks, buildEnvPrefix, canonicalizeGitUrl, ciAnnotationsFormatter, classifyTest, collectConsoleLeakEntries, compressLines, computeFailureSignature, computeTrend, countSuiteFailures, deriveIdempotencyKey, detectPackageManager, detectVitestScripts, determineTier, ensureMigrated, extractSqlReason, findFunctionBoundary, formatConsoleMarkdown, formatFatalError, formatGfm, formatTriageEffect, formatWrapupEffect, getRecentDirection, getRunCommand, getWorstMetric, gitUrlToProjectKey, hashTargets, historyKey, initialRenderState, isTimeoutError, isVitestInvocation, migration as migration0001, normalizeAssertionShape, normalizeWorkspaceKey, osc8, probeHostMetadataFromEnv, migration$1 as registryMigration0001, relativePath, requiredArtifactForTransition, resolveCoverageInput, resolveDataPath, resolveLogFile, resolveLogLevel, resolveProjectIdentityFromCandidates, resolveProjectKeyFromCwd, resolveWorkspaceKey, rewriteBashCommand, safeFilename, migration$2 as sessionMapMigration0001, stripAnsi, transitionEnforcesBehaviorMatch, validateCoverageConfig, validateCoverageTargetsShape, validatePhaseTransition };
|
package/internal-inject-env.js
CHANGED
|
@@ -27,7 +27,8 @@ const injectEnv = (input) => {
|
|
|
27
27
|
const conversationId = input.env.VITEST_AGENT_CONVERSATION_ID;
|
|
28
28
|
const agentId = input.env.VITEST_AGENT_AGENT_ID;
|
|
29
29
|
if (conversationId === void 0 || agentId === void 0) return input.command;
|
|
30
|
-
const
|
|
30
|
+
const scripts = readPackageScripts(input.cwd);
|
|
31
|
+
const vitestScripts = detectVitestScripts(scripts);
|
|
31
32
|
const parentAgentId = input.env.VITEST_AGENT_PARENT_AGENT_ID;
|
|
32
33
|
return rewriteBashCommand({
|
|
33
34
|
command: input.command,
|
|
@@ -14,7 +14,7 @@ const rowToDomain = (row) => ({
|
|
|
14
14
|
firstSeenAt: row.first_seen_at,
|
|
15
15
|
lastSeenAt: row.last_seen_at
|
|
16
16
|
});
|
|
17
|
-
const dayInMs =
|
|
17
|
+
const dayInMs = 864e5;
|
|
18
18
|
/** @public */
|
|
19
19
|
const DiscoveryRegistryLive = Layer.effect(DiscoveryRegistry, Effect.gen(function* () {
|
|
20
20
|
const sql = yield* SqlClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared Effect Schema, SQLite migrations, data layer, services, formatters, and utilities for vitest-agent packages.",
|
|
6
6
|
"keywords": [
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@effected/jsonc": "^0.5.1",
|
|
52
52
|
"@effected/toml": "^0.3.1",
|
|
53
53
|
"@effected/walker": "^0.3.3",
|
|
54
|
-
"@effected/workspaces": "^0.9.
|
|
54
|
+
"@effected/workspaces": "^0.9.3",
|
|
55
55
|
"@effected/xdg": "^0.1.9",
|
|
56
56
|
"@effected/yaml": "^0.6.0",
|
|
57
|
-
"acorn": "^8.
|
|
57
|
+
"acorn": "^8.18.0",
|
|
58
58
|
"acorn-typescript": "^1.4.13",
|
|
59
59
|
"ajv": "^8.20.0",
|
|
60
60
|
"effect": "4.0.0-beta.101",
|