Skip to main content
Version: 1.x

Interface: AgenticCheckpoint

Beta

Checkpoint state for long-running agentic test generation sessions.

Remarks

Beta — serialization format may change in minor releases.

Serializable to JSON via JSON.stringify(). The JSON shape is:

{
"sessionId": "string (UUID recommended)",
"currentStep": "number (0-based index)",
"completedSteps": ["string[]"],
"remainingSteps": ["string[]"],
"state": { "arbitrary JSON-safe key/value pairs" },
"timestamp": "string (ISO 8601)"
}

Persist with JSON.stringify(checkpoint) and restore with JSON.parse(stored) as AgenticCheckpoint. All fields are readonly — create a new object to update.

The state record must only contain JSON-serializable values (no functions, Dates, or circular references).

Intent

Enable resumable multi-step AI test generation workflows.

Example

const checkpoint: AgenticCheckpoint = {
sessionId: 'sess-001',
currentStep: 2,
completedSteps: ['discover', 'plan'],
remainingSteps: ['generate', 'validate'],
state: { pageUrl: 'https://my.app/launchpad' },
timestamp: new Date().toISOString(),
};

// Persist to disk
await fs.writeFile('checkpoint.json', JSON.stringify(checkpoint));

// Restore
const restored = JSON.parse(await fs.readFile('checkpoint.json', 'utf8')) as AgenticCheckpoint;
handler.saveCheckpoint(restored);

Properties

completedSteps

readonly completedSteps: string[]

Beta

Ordered list of step names that have already completed.


currentStep

readonly currentStep: number

Beta

Index of the currently executing step (0-based).


remainingSteps

readonly remainingSteps: string[]

Beta

Ordered list of step names yet to execute.


sessionId

readonly sessionId: string

Beta

Unique session identifier (UUID recommended).


state

readonly state: Record<string, unknown>

Beta

Arbitrary serializable step state (JSON-safe).


timestamp

readonly timestamp: string

Beta

ISO 8601 timestamp when this checkpoint was created.