@tpmjs/tools-sprites-checkpoint-restore
Restore a sprite to a previous checkpoint state, reverting all filesystem changes since that checkpoint. Use this to undo changes or recover from errors.
Test @tpmjs/tools-sprites-checkpoint-restore (spritesCheckpointRestoreTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-sprites-checkpoint-restorepnpm add @tpmjs/tools-sprites-checkpoint-restoreyarn add @tpmjs/tools-sprites-checkpoint-restorebun add @tpmjs/tools-sprites-checkpoint-restoredeno add npm:@tpmjs/tools-sprites-checkpoint-restoreimport { spritesCheckpointRestoreTool } from '@tpmjs/tools-sprites-checkpoint-restore';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { spritesCheckpointRestoreTool } from '@tpmjs/tools-sprites-checkpoint-restore';
const result = await generateText({
model: openai('gpt-4o'),
tools: { spritesCheckpointRestoreTool },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
namestringName of the sprite to restore
checkpointIdstringID of the checkpoint to restore to
Schema extracted: 1/16/2026, 3:45:35 AM
Restore a sprite to a previous checkpoint state, reverting all filesystem changes.
npm install @tpmjs/sprites-checkpoint-restore
SPRITES_TOKEN environment variable - Get your token from https://sprites.devimport { spritesCheckpointRestoreTool } from '@tpmjs/sprites-checkpoint-restore'; const result = await spritesCheckpointRestoreTool.execute({ name: 'my-sandbox', checkpointId: 'chk_abc123' }); console.log(result); // { // restored: true, // checkpointId: 'chk_abc123', // sprite: { // name: 'my-sandbox', // status: 'running', // createdAt: '2024-01-15T10:30:00Z' // } // }
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the sprite to restore |
checkpointId | string | Yes | ID of the checkpoint to restore to |
| Field | Type | Description |
|---|---|---|
restored | boolean | Whether restoration was successful |
checkpointId | string | ID of the checkpoint that was restored |
sprite | Sprite | Updated sprite details after restoration |
| Field | Type | Description |
|---|---|---|
name | string | Name of the sprite |
status | 'creating' | 'running' | 'stopped' | 'error' | Current status |
createdAt | string | ISO 8601 timestamp of creation |
runtime | string? | Optional runtime configuration |
metadata | object? | Optional custom metadata |
Restoring a checkpoint will replace the current filesystem state. Any changes made after the checkpoint was created will be lost.
The tool throws errors in these cases:
SPRITES_TOKEN environment variable is not setMIT
Downloads/month
0
Quality Score