Skip to content

Types Reference

Complete TypeScript interface documentation for all vibe-check types.

Context Types

Interfaces for test and workflow contexts

Result Types

Interfaces for agent execution results

Data Types

Interfaces for files, tools, and captured data

Configuration Types

Types for agent and test configuration


Types for test and workflow execution contexts.

The fixture context available in vibeTest functions.

interface VibeTestContext {
runAgent(opts: RunAgentOptions): Promise<RunResult>;
judge(result: RunResult, opts: JudgeOptions): Promise<JudgeResult>;
expect: typeof import('vitest')['expect'];
annotate(message: string, type?: string): Promise<void>;
task: Task;
}

The orchestration context available in vibeWorkflow functions.

interface WorkflowContext {
stage(name: string, opts: StageOptions): Promise<RunResult>;
until(condition: () => boolean | Promise<boolean>, body: () => Promise<void>): Promise<void>;
annotate(message: string, type?: string): Promise<void>;
}

Real-time execution monitoring for reactive patterns.

class AgentExecution {
watch(callback: (partial: PartialRunResult) => void | Promise<void>): void;
await(): Promise<RunResult>;
}

Types for agent execution results and captured data.

Complete results from an agent run with all captured context.

interface RunResult {
files: FileChangeMap;
tools: ToolCall[];
git: GitState;
timeline: TimelineEvent[];
metrics: Metrics;
// ... see full reference
}

In-progress execution state available during agent runs.

interface PartialRunResult {
files: FileChangeMap;
tools: ToolCall[];
timeline: TimelineEvent[];
// ... see full reference
}

Details about a single file modification.

interface FileChange {
path: string;
status: 'added' | 'modified' | 'deleted' | 'renamed';
before?: FileSnapshot;
after?: FileSnapshot;
diff: string;
}

A correlated tool invocation with inputs and outputs.

interface ToolCall {
name: string;
inputs: unknown;
outputs?: unknown;
error?: string;
timestamp: number;
}

Types for LLM-based quality evaluation.

Schemas for defining evaluation criteria and receiving judge results.

interface Rubric {
criteria: Criterion[];
model?: string;
}
interface JudgeResult {
passed: boolean;
score: number;
criteriaResults: CriterionResult[];
reasoning: string;
}

Types for configuring agents, tests, and the framework.

All configuration options for agents, tests, and global defaults.

interface AgentConfig {
name: string;
model: string;
maxTurns?: number;
hooks?: HookConfig;
mcpServers?: McpServerConfig[];
}
interface VibeConfig {
reporters?: ('cost' | 'html')[];
defaults?: AgentDefaults;
htmlReport?: HtmlReportConfig;
}

Types for custom matchers and assertions.

All available custom matchers with their signatures.

interface CustomMatchers<R = unknown> {
toHaveChangedFiles(paths: string[]): R;
toHaveNoDeletedFiles(): R;
toHaveUsedTool(name: string, opts?: { min?: number }): R;
toUseOnlyTools(allowlist: string[]): R;
toCompleteAllTodos(): R;
toPassRubric(rubric: Rubric): Promise<R>;
toStayUnderCost(maxUsd: number): R;
}

vibeTest
├─> VibeTestContext (fixtures)
│ ├─> runAgent() returns RunResult
│ └─> judge() returns JudgeResult
└─> Custom Matchers operate on RunResult
vibeWorkflow
├─> WorkflowContext (orchestration)
│ └─> stage() returns RunResult
└─> Cumulative context across stages
RunResult contains:
├─> FileChangeMap (files)
├─> ToolCall[] (tools)
├─> GitState (git)
├─> TimelineEvent[] (timeline)
└─> Metrics (metrics)

// Core types
import type {
VibeTestContext,
WorkflowContext,
AgentExecution,
RunResult,
PartialRunResult
} from '@dao/vibe-check';
// Data types
import type {
FileChange,
ToolCall,
GitState,
TimelineEvent,
Metrics
} from '@dao/vibe-check';
// Evaluation types
import type {
Rubric,
Criterion,
JudgeResult
} from '@dao/vibe-check';
// Configuration types
import type {
AgentConfig,
VibeConfig,
RunAgentOptions
} from '@dao/vibe-check';