The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
import { checkFailedNext } from './check-next'
it('gives the first manifest error a file and line while preserving the total count', () => {
const errors = [
{ file: 'boxlite.toml', line: 8, rule: 'unknown_field', message: 'unknown field ports' },
{ file: 'boxlite.toml', rule: 'missing', message: 'image is missing' },
]
expect(checkFailedNext(errors)).toMatch(/^fix boxlite\.toml:8: unknown field ports.*2 in all/)
expect(checkFailedNext([])).toContain('boxlite app deploy --check')
})
it.each([
['migration_changed', 'migrations/0001_init.sql', 'modified', 'git checkout -- migrations/0001_init.sql'],
['stale_base', 'boxlite.toml', 'stale', 'boxlite app init --pull'],
['secret_not_found', 'boxlite.toml', 'Set MAIL_KEY', 'Set MAIL_KEY'],
])('offers the recovery action for %s', (rule, file, message, next) => {
expect(checkFailedNext([{ rule, file, message }])).toContain(next)
})