Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

630 B
Raw Blame
import { sha256hex } from './auth'
import { snapshotId } from './blobs'

const entry = { path: 'start.sh', mode: 0o755, size: 4, sha256: sha256hex('run!') }

it('identifies the same project regardless of manifest order while preserving modes and names', () => {
  const config = { path: 'config.json', mode: 0o644, size: 2, sha256: sha256hex('{}') }
  const id = snapshotId([entry, config])
  expect(id).toMatch(/^snap_[a-f0-9]{64}$/)
  expect(snapshotId([config, entry])).toBe(id)
  expect(snapshotId([{ ...entry, mode: 0o644 }, config])).not.toBe(id)
  expect(snapshotId([{ ...entry, path: 'script' }, config])).not.toBe(id)
})