From 7b1df2607e49b2f58c06cbd9e1f8e04f3850778f Mon Sep 17 00:00:00 2001 From: Overlord Date: Mon, 12 Oct 2026 23:49:05 +0200 Subject: [PATCH] Introduce spawner app with sandboxing support and client protocol implementation. Co-Authored-By: Claude Opus 5.5 --- .dockerignore | 9 + .gitea/workflows/images.yml | 28 + .gitignore | 3 + apps/spawner/Dockerfile | 11 + apps/spawner/package.json | 11 + apps/spawner/src/cli.ts | 57 ++ apps/spawner/src/config.ts | 40 + apps/spawner/src/docker.ts | 103 ++ apps/spawner/src/main.ts | 33 + apps/spawner/src/sandbox.test.ts | 45 + apps/spawner/src/sandbox.ts | 170 ++++ apps/spawner/src/server.test.ts | 158 +++ apps/spawner/src/server.ts | 90 ++ deploy.sh | 20 +- deploy/compose.yml | 28 + package.json | 20 + packages/protocol/package.json | 6 + packages/protocol/src/client.ts | 78 ++ packages/protocol/src/index.ts | 3 + packages/protocol/src/lines.ts | 54 ++ packages/protocol/src/spawner.test.ts | 53 + packages/protocol/src/spawner.ts | 99 ++ pnpm-lock.yaml | 1296 +++++++++++++++++++++++++ pnpm-workspace.yaml | 5 + sandbox/Dockerfile | 5 +- tsconfig.json | 18 + 26 files changed, 2438 insertions(+), 5 deletions(-) create mode 100644 .dockerignore create mode 100644 apps/spawner/Dockerfile create mode 100644 apps/spawner/package.json create mode 100644 apps/spawner/src/cli.ts create mode 100644 apps/spawner/src/config.ts create mode 100644 apps/spawner/src/docker.ts create mode 100644 apps/spawner/src/main.ts create mode 100644 apps/spawner/src/sandbox.test.ts create mode 100644 apps/spawner/src/sandbox.ts create mode 100644 apps/spawner/src/server.test.ts create mode 100644 apps/spawner/src/server.ts create mode 100644 deploy/compose.yml create mode 100644 package.json create mode 100644 packages/protocol/package.json create mode 100644 packages/protocol/src/client.ts create mode 100644 packages/protocol/src/index.ts create mode 100644 packages/protocol/src/lines.ts create mode 100644 packages/protocol/src/spawner.test.ts create mode 100644 packages/protocol/src/spawner.ts create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml create mode 100644 tsconfig.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b03ef04 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.git +.gitea +.idea +.tools +**/node_modules +**/dist +runtime +sandbox +deploy diff --git a/.gitea/workflows/images.yml b/.gitea/workflows/images.yml index 58f19c5..527c678 100644 --- a/.gitea/workflows/images.yml +++ b/.gitea/workflows/images.yml @@ -9,6 +9,17 @@ env: REGISTRY: git.security-command.org/securitycommand jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24 + - run: corepack pnpm install --frozen-lockfile + - run: corepack pnpm typecheck + - run: corepack pnpm test + sandbox: runs-on: ubuntu-latest steps: @@ -24,3 +35,20 @@ jobs: image="$REGISTRY/homepage-sandbox" docker build -t "$image:${{ gitea.sha }}" -t "$image:${{ gitea.ref_name }}" sandbox/ docker push --all-tags "$image" + + spawner: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Log in to the registry + run: > + echo "${{ secrets.REGISTRY_TOKEN }}" + | docker login "${REGISTRY%%/*}" -u "${{ secrets.REGISTRY_USER }}" --password-stdin + + - name: Build and push + run: | + image="$REGISTRY/homepage-spawner" + docker build -f apps/spawner/Dockerfile -t "$image:${{ gitea.sha }}" -t "$image:${{ gitea.ref_name }}" . + docker push --all-tags "$image" diff --git a/.gitignore b/.gitignore index 3f3a887..1a0e624 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ # ---> Strict .* !.git* +!.dockerignore *.md !README.md /runtime/ +node_modules/ +dist/ diff --git a/apps/spawner/Dockerfile b/apps/spawner/Dockerfile new file mode 100644 index 0000000..17bbc18 --- /dev/null +++ b/apps/spawner/Dockerfile @@ -0,0 +1,11 @@ +# Build context is the repository root. +FROM node:24-alpine AS build +WORKDIR /src +COPY . . +RUN corepack pnpm install --frozen-lockfile \ + && corepack pnpm --filter @homepage/spawner build + +FROM node:24-alpine +COPY --from=build /src/apps/spawner/dist/spawner.js /app/spawner.js +USER 10001:10100 +CMD ["node", "/app/spawner.js"] diff --git a/apps/spawner/package.json b/apps/spawner/package.json new file mode 100644 index 0000000..304ec7e --- /dev/null +++ b/apps/spawner/package.json @@ -0,0 +1,11 @@ +{ + "name": "@homepage/spawner", + "private": true, + "type": "module", + "scripts": { + "build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=esm --outfile=dist/spawner.js" + }, + "dependencies": { + "@homepage/protocol": "workspace:*" + } +} diff --git a/apps/spawner/src/cli.ts b/apps/spawner/src/cli.ts new file mode 100644 index 0000000..cfe13ba --- /dev/null +++ b/apps/spawner/src/cli.ts @@ -0,0 +1,57 @@ +import { randomBytes } from 'node:crypto'; +import { SpawnerClient } from '@homepage/protocol'; + +const usage = 'usage: cli.ts run | list | kill '; + +const [socketPath, command, argument] = process.argv.slice(2); +if (!socketPath || !command) { + console.error(usage); + process.exit(2); +} + +const client = new SpawnerClient(socketPath); + +async function run(): Promise +{ + const sessionId = randomBytes(12).toString('base64url'); + const containerId = await client.spawn(sessionId, Math.floor(Date.now() / 1000) + 20 * 60); + const stream = await client.attach(containerId); + + const resize = () => client.resize(containerId, process.stdout.columns, process.stdout.rows).catch(() => {}); + await resize(); + process.stdout.on('resize', resize); + + if (process.stdin.isTTY) process.stdin.setRawMode(true); + process.stdin.pipe(stream, { end: false }); + stream.pipe(process.stdout); + + stream.on('close', async () => + { + if (process.stdin.isTTY) process.stdin.setRawMode(false); + await client.kill(containerId).catch(() => {}); + process.exit(0); + }); +} + +switch (command) +{ + case 'run': + await run(); + break; + + case 'list': + console.log(JSON.stringify(await client.list(), null, 2)); + break; + + case 'kill': + if (!argument) { + console.error(usage); + process.exit(2); + } + await client.kill(argument); + break; + + default: + console.error(usage); + process.exit(2); +} diff --git a/apps/spawner/src/config.ts b/apps/spawner/src/config.ts new file mode 100644 index 0000000..3a08d88 --- /dev/null +++ b/apps/spawner/src/config.ts @@ -0,0 +1,40 @@ +import { isAbsolute } from 'node:path'; + +export type SpawnerConfig = { + dockerSocket: string; + listenSocket: string; + image: string; + /** Host paths, resolved by the sandbox daemon and never opened by the spawner. */ + contentDir: string; + statusDir: string; + maxSandboxes: number; + /** Only for local development with Podman, where gVisor is unavailable. */ + allowNonGvisor: boolean; +}; + +function required(env: NodeJS.ProcessEnv, name: string): string { + const value = env[name]; + if (!value) throw new Error(`${name} is not set`); + return value; +} + +function absolute(env: NodeJS.ProcessEnv, name: string): string { + const value = required(env, name); + if (!isAbsolute(value)) throw new Error(`${name} must be an absolute path`); + return value; +} + +export function loadConfig(env: NodeJS.ProcessEnv): SpawnerConfig { + const maxSandboxes = Number(env.MAX_SANDBOXES ?? 16); + if (!Number.isInteger(maxSandboxes) || maxSandboxes < 1) throw new Error('MAX_SANDBOXES must be a positive integer'); + + return { + dockerSocket: env.DOCKER_SOCKET ?? '/run/docker-sandbox/docker.sock', + listenSocket: env.SPAWNER_SOCKET ?? '/run/spawner/spawner.sock', + image: required(env, 'SANDBOX_IMAGE'), + contentDir: absolute(env, 'CONTENT_DIR'), + statusDir: absolute(env, 'STATUS_DIR'), + allowNonGvisor: env.SPAWNER_ALLOW_NON_GVISOR === '1', + maxSandboxes, + }; +} diff --git a/apps/spawner/src/docker.ts b/apps/spawner/src/docker.ts new file mode 100644 index 0000000..95cfa9a --- /dev/null +++ b/apps/spawner/src/docker.ts @@ -0,0 +1,103 @@ +import { request } from 'node:http'; +import type { Socket } from 'node:net'; + +export class DockerError extends Error { + readonly status: number; + + constructor(status: number, message: string) { + super(message); + this.status = status; + } +} + +/** + * Minimal client for the few Docker Engine API calls the spawner needs. + * Works with Docker and with Podman's Docker compatible API. + */ +export class DockerClient +{ + readonly socketPath: string; + + constructor(socketPath: string) { + this.socketPath = socketPath; + } + + call(method: string, path: string, body?: unknown): Promise + { + return new Promise((resolve, reject) => + { + const payload = body === undefined ? undefined : JSON.stringify(body); + + const req = request( + { + socketPath: this.socketPath, + method, + path, + headers: payload ? { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(payload) } : {}, + }, + (res) => + { + const chunks: Buffer[] = []; + res.on('data', (chunk: Buffer) => chunks.push(chunk)); + res.on('end', () => + { + const text = Buffer.concat(chunks).toString('utf8'); + const status = res.statusCode ?? 0; + + if (status >= 400) + { + reject(new DockerError(status, errorMessage(text) ?? `docker responded with ${status}`)); + return; + } + + try { resolve((text ? JSON.parse(text) : undefined) as T); } + catch { resolve(undefined as T); } + }); + res.on('error', reject); + }, + ); + + req.on('error', reject); + req.end(payload); + }); + } + + /** Upgrades the connection to a raw stream, as used by attach. */ + hijack(path: string): Promise + { + return new Promise((resolve, reject) => + { + const req = request({ + socketPath: this.socketPath, + method: 'POST', + path, + headers: { Connection: 'Upgrade', Upgrade: 'tcp' }, + }); + + req.on('upgrade', (_res, socket, head) => + { + if (head.length > 0) socket.unshift(head); + resolve(socket); + }); + + req.on('response', (res) => + { + res.resume(); + reject(new DockerError(res.statusCode ?? 0, `attach failed with ${res.statusCode}`)); + }); + + req.on('error', reject); + req.end(); + }); + } +} + +function errorMessage(text: string): string | undefined +{ + try + { + const parsed = JSON.parse(text) as { message?: unknown }; + return typeof parsed.message === 'string' ? parsed.message : undefined; + } + catch { return text || undefined; } +} diff --git a/apps/spawner/src/main.ts b/apps/spawner/src/main.ts new file mode 100644 index 0000000..a5b3dd3 --- /dev/null +++ b/apps/spawner/src/main.ts @@ -0,0 +1,33 @@ +import { chmodSync, rmSync } from 'node:fs'; +import { loadConfig } from './config.ts'; +import { SandboxManager } from './sandbox.ts'; +import { createSpawnerServer } from './server.ts'; + +const log = (message: string) => console.log(`[spawner] ${message}`); + +const config = loadConfig(process.env); +const manager = new SandboxManager(config); + +await manager.assertRuntime(); +const reaped = await manager.reapOrphans(); +if (reaped > 0) log(`removed ${reaped} orphaned sandbox(es)`); + +// The socket must never be reachable by anyone outside the shared group, +// not even for the moment between creating it and changing its mode. +process.umask(0o117); +rmSync(config.listenSocket, { force: true }); + +const server = createSpawnerServer(manager, log); +server.listen(config.listenSocket, () => +{ + chmodSync(config.listenSocket, 0o660); + log(`listening on ${config.listenSocket}`); +}); + +for (const signal of ['SIGTERM', 'SIGINT'] as const) +{ + process.once(signal, () => { + server.close(); + process.exit(0); + }); +} diff --git a/apps/spawner/src/sandbox.test.ts b/apps/spawner/src/sandbox.test.ts new file mode 100644 index 0000000..1f3f0a6 --- /dev/null +++ b/apps/spawner/src/sandbox.test.ts @@ -0,0 +1,45 @@ +import { describe, expect, it } from 'vitest'; +import type { SpawnerConfig } from './config.ts'; +import { containerSpec } from './sandbox.ts'; + +const config: SpawnerConfig = { + dockerSocket: '/docker.sock', + listenSocket: '/spawner.sock', + image: 'registry/homepage-sandbox@sha256:abc', + contentDir: '/srv/content', + statusDir: '/srv/status', + maxSandboxes: 16, + allowNonGvisor: false, +}; + +describe('containerSpec', () => { + const spec = containerSpec(config, 'session123', 1_800_000_000); + const host = spec.HostConfig; + + it('isolates the sandbox', () => { + expect(host.Privileged).toBe(false); + expect(host.ReadonlyRootfs).toBe(true); + expect(host.NetworkMode).toBe('none'); + expect(spec.NetworkDisabled).toBe(true); + expect(host.CapDrop).toEqual(['ALL']); + expect(host.SecurityOpt).toContain('no-new-privileges'); + expect(spec.User).toBe('guest'); + }); + + it('limits resources', () => { + expect(host.Memory).toBe(80 * 1024 * 1024); + expect(host.MemorySwap).toBe(host.Memory); + expect(host.NanoCpus).toBe(500_000_000); + expect(host.PidsLimit).toBe(50); + expect(host.LogConfig.Type).toBe('none'); + }); + + it('mounts host paths read only', () => { + expect(host.Binds).toEqual(['/srv/content:/srv/www:ro', '/srv/status:/var/status:ro']); + expect(Object.values(host.Tmpfs).every((options) => options.includes('noexec'))).toBe(true); + }); + + it('passes only the session id and expiry into the container', () => { + expect(spec.Env).toEqual(['SESSION_ID=session123', 'SESSION_EXPIRES_AT=1800000000', 'TERM=xterm-256color']); + }); +}); diff --git a/apps/spawner/src/sandbox.ts b/apps/spawner/src/sandbox.ts new file mode 100644 index 0000000..92b90fd --- /dev/null +++ b/apps/spawner/src/sandbox.ts @@ -0,0 +1,170 @@ +import type { Socket } from 'node:net'; +import { SANDBOX_LABEL, SESSION_LABEL, type ManagedContainer } from '@homepage/protocol'; +import type { SpawnerConfig } from './config.ts'; +import { DockerClient, DockerError } from './docker.ts'; + +const MiB = 1024 * 1024; + +/** + * The complete container configuration of a sandbox session. Only the + * validated session id and expiry come from outside. Keep in sync with + * deploy/host/sandbox-flags.sh. + */ +export function containerSpec(config: SpawnerConfig, sessionId: string, expiresAt: number) +{ + return { + Image: config.image, + User: 'guest', + Hostname: 'sandbox', + Env: [`SESSION_ID=${sessionId}`, `SESSION_EXPIRES_AT=${expiresAt}`, 'TERM=xterm-256color'], + Tty: true, + OpenStdin: true, + StdinOnce: false, + AttachStdin: true, + AttachStdout: true, + AttachStderr: true, + NetworkDisabled: true, + Labels: { [SANDBOX_LABEL]: '1', [SESSION_LABEL]: sessionId }, + HostConfig: { + Privileged: false, + ReadonlyRootfs: true, + NetworkMode: 'none', + CapDrop: ['ALL'], + SecurityOpt: ['no-new-privileges'], + IpcMode: 'private', + Memory: 80 * MiB, + MemorySwap: 80 * MiB, + NanoCpus: 500_000_000, + PidsLimit: 50, + Ulimits: [{ Name: 'nofile', Soft: 256, Hard: 256 }], + Tmpfs: { + '/home/guest': 'size=8m,mode=1777,noexec,nosuid', + '/tmp': 'size=8m,noexec,nosuid', + }, + Binds: [`${config.contentDir}:/srv/www:ro`, `${config.statusDir}:/var/status:ro`], + LogConfig: { Type: 'none', Config: {} }, + AutoRemove: true, + }, + }; +} + +type ContainerSummary = { + Id: string; + State: string; + Labels?: Record; +}; + +type ContainerDetails = { + Id: string; + State: { Status: string }; + Config: { Labels?: Record }; +}; + +export class SandboxManager { + readonly config: SpawnerConfig; + readonly docker: DockerClient; + + constructor(config: SpawnerConfig, docker = new DockerClient(config.dockerSocket)) { + this.config = config; + this.docker = docker; + } + + async assertRuntime(): Promise + { + const info = await this.docker.call<{ DefaultRuntime?: string }>('GET', '/info'); + if (info.DefaultRuntime !== 'runsc' && !this.config.allowNonGvisor) { + throw new Error(`the sandbox daemon runs "${info.DefaultRuntime}" instead of gVisor (runsc)`); + } + } + + async spawn(sessionId: string, expiresAt: number): Promise + { + const existing = await this.list(); + if (existing.length >= this.config.maxSandboxes) throw new Error('sandbox limit reached'); + + const created = await this.docker.call<{ Id: string }>( + 'POST', + `/containers/create?name=sandbox-${sessionId}`, + containerSpec(this.config, sessionId, expiresAt), + ); + + return created.Id; + } + + /** Attaches before starting, so the motd and first prompt are not lost. */ + async attach(containerId: string): Promise + { + const container = await this.managed(containerId); + const stream = await this.docker.hijack( + `/containers/${container.Id}/attach?stream=1&stdin=1&stdout=1&stderr=1`, + ); + + if (container.State.Status === 'created') + { + try { await this.docker.call('POST', `/containers/${container.Id}/start`); } + catch (error) + { + stream.destroy(); + throw error; + } + } + + return stream; + } + + async resize(containerId: string, cols: number, rows: number): Promise { + const container = await this.managed(containerId); + await this.docker.call('POST', `/containers/${container.Id}/resize?h=${rows}&w=${cols}`); + } + + async kill(containerId: string): Promise + { + let container: ContainerDetails; + try { container = await this.managed(containerId); } + catch (error) + { + if (error instanceof DockerError && error.status === 404) return; + throw error; + } + + await this.remove(container.Id); + } + + async list(): Promise + { + const filters = encodeURIComponent(JSON.stringify({ label: [`${SANDBOX_LABEL}=1`] })); + const containers = await this.docker.call('GET', `/containers/json?all=1&filters=${filters}`); + + return containers + .filter((container) => container.Labels?.[SANDBOX_LABEL] === '1') + .map((container) => ({ + containerId: container.Id, + sessionId: container.Labels?.[SESSION_LABEL] ?? '', + running: container.State === 'running', + })); + } + + /** Removes sandboxes left over from a previous run, because nobody can reach them anymore. */ + async reapOrphans(): Promise { + const containers = await this.list(); + await Promise.all(containers.map((container) => this.remove(container.containerId))); + return containers.length; + } + + private async managed(containerId: string): Promise { + const container = await this.docker.call('GET', `/containers/${containerId}/json`); + if (container.Config.Labels?.[SANDBOX_LABEL] !== '1') throw new Error('not a sandbox container'); + return container; + } + + private async remove(containerId: string): Promise + { + try { await this.docker.call('DELETE', `/containers/${containerId}?force=1`); } + catch (error) + { + // A container with AutoRemove may already be gone or in removal. + if (error instanceof DockerError && (error.status === 404 || error.status === 409)) return; + throw error; + } + } +} diff --git a/apps/spawner/src/server.test.ts b/apps/spawner/src/server.test.ts new file mode 100644 index 0000000..8d6fda0 --- /dev/null +++ b/apps/spawner/src/server.test.ts @@ -0,0 +1,158 @@ +import { mkdtempSync, rmSync } from 'node:fs'; +import { createServer, type IncomingMessage, type Server as HttpServer } from 'node:http'; +import type { Server, Socket } from 'node:net'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { SANDBOX_LABEL, SpawnerClient, SpawnerError } from '@homepage/protocol'; +import { afterEach, beforeEach, describe, expect, it } from 'vitest'; +import type { SpawnerConfig } from './config.ts'; +import { SandboxManager } from './sandbox.ts'; +import { createSpawnerServer } from './server.ts'; + +const MANAGED = 'aaaaaaaaaaaa'; +const FOREIGN = 'bbbbbbbbbbbb'; + +type Call = { method: string; path: string; body?: unknown }; + +/** Pretends to be the Docker Engine API. Attached streams echo input in upper case. */ +function fakeDocker(socketPath: string, calls: Call[]): Promise { + const containers = new Map; status: string }>([ + [MANAGED, { labels: { [SANDBOX_LABEL]: '1' }, status: 'created' }], + [FOREIGN, { labels: {}, status: 'running' }], + ]); + + const server = createServer(async (req: IncomingMessage, res) => { + const chunks: Buffer[] = []; + for await (const chunk of req) chunks.push(chunk as Buffer); + const text = Buffer.concat(chunks).toString(); + const url = new URL(req.url!, 'http://docker'); + calls.push({ method: req.method!, path: url.pathname, body: text ? JSON.parse(text) : undefined }); + + const send = (status: number, body?: unknown) => { + res.writeHead(status, { 'Content-Type': 'application/json' }); + res.end(body === undefined ? '' : JSON.stringify(body)); + }; + const id = url.pathname.split('/')[2] ?? ''; + const container = containers.get(id); + + if (url.pathname === '/info') return send(200, { DefaultRuntime: 'runsc' }); + if (url.pathname === '/containers/json') { + return send( + 200, + [...containers].map(([Id, c]) => ({ Id, State: c.status, Labels: c.labels })), + ); + } + if (url.pathname === '/containers/create') { + const created = String(containers.size).padStart(12, 'c'); + containers.set(created, { labels: { [SANDBOX_LABEL]: '1' }, status: 'created' }); + return send(201, { Id: created }); + } + if (!container) return send(404, { message: 'no such container' }); + if (url.pathname.endsWith('/json')) { + return send(200, { Id: id, State: { Status: container.status }, Config: { Labels: container.labels } }); + } + if (url.pathname.endsWith('/start')) { + container.status = 'running'; + return send(204); + } + if (url.pathname.endsWith('/resize')) return send(200); + if (req.method === 'DELETE') { + containers.delete(id); + return send(204); + } + send(404, { message: 'unexpected call' }); + }); + + server.on('upgrade', (req: IncomingMessage, socket: Socket) => { + calls.push({ method: req.method!, path: new URL(req.url!, 'http://docker').pathname }); + socket.write('HTTP/1.1 101 UPGRADED\r\nConnection: Upgrade\r\nUpgrade: tcp\r\n\r\n'); + socket.on('data', (data) => socket.write(data.toString().toUpperCase())); + }); + + return new Promise((resolve) => server.listen(socketPath, () => resolve(server))); +} + +function read(socket: Socket): Promise { + return new Promise((resolve) => { + socket.once('data', (data) => resolve(data.toString())); + socket.resume(); + }); +} + +describe('spawner server', () => { + let dir: string; + let docker: HttpServer; + let spawner: Server; + let client: SpawnerClient; + let calls: Call[]; + let config: SpawnerConfig; + + beforeEach(async () => { + dir = mkdtempSync(join(tmpdir(), 'spawner-test-')); + calls = []; + docker = await fakeDocker(join(dir, 'docker.sock'), calls); + config = { + dockerSocket: join(dir, 'docker.sock'), + listenSocket: join(dir, 'spawner.sock'), + image: 'sandbox@sha256:abc', + contentDir: '/srv/content', + statusDir: '/srv/status', + maxSandboxes: 2, + allowNonGvisor: false, + }; + spawner = createSpawnerServer(new SandboxManager(config), () => {}); + await new Promise((resolve) => spawner.listen(config.listenSocket, resolve)); + client = new SpawnerClient(config.listenSocket); + }); + + afterEach(() => { + spawner.close(); + docker.close(); + rmSync(dir, { recursive: true, force: true }); + }); + + it('creates a sandbox with the hardcoded spec', async () => { + const containerId = await client.spawn('session123', Math.floor(Date.now() / 1000) + 600); + expect(containerId).toBe('ccccccccccc2'); + const create = calls.find((call) => call.path === '/containers/create'); + expect(create?.body).toMatchObject({ Image: 'sandbox@sha256:abc', HostConfig: { NetworkMode: 'none' } }); + }); + + it('refuses to spawn beyond the sandbox limit', async () => { + const expiresAt = Math.floor(Date.now() / 1000) + 600; + await client.spawn('session123', expiresAt); + await expect(client.spawn('session456', expiresAt)).rejects.toThrow('sandbox limit reached'); + }); + + it('attaches before starting and bridges the stream', async () => { + const stream = await client.attach(MANAGED); + const paths = calls.map((call) => call.path); + expect(paths.indexOf(`/containers/${MANAGED}/attach`)).toBeLessThan(paths.indexOf(`/containers/${MANAGED}/start`)); + + stream.write('hello'); + expect(await read(stream)).toBe('HELLO'); + stream.destroy(); + }); + + it('refuses containers it does not manage', async () => { + await expect(client.attach(FOREIGN)).rejects.toThrow('not a sandbox container'); + await expect(client.kill(FOREIGN)).rejects.toThrow('not a sandbox container'); + expect(calls.some((call) => call.method === 'DELETE')).toBe(false); + }); + + it('kills managed containers and tolerates missing ones', async () => { + await client.kill(MANAGED); + await client.kill('dddddddddddd'); + expect(calls.filter((call) => call.method === 'DELETE').map((call) => call.path)).toEqual([ + `/containers/${MANAGED}`, + ]); + }); + + it('lists only managed containers', async () => { + expect(await client.list()).toEqual([{ containerId: MANAGED, sessionId: '', running: false }]); + }); + + it('answers invalid requests with an error', async () => { + await expect(client.resize('../../info', 80, 24)).rejects.toThrow(SpawnerError); + }); +}); diff --git a/apps/spawner/src/server.ts b/apps/spawner/src/server.ts new file mode 100644 index 0000000..186e8f7 --- /dev/null +++ b/apps/spawner/src/server.ts @@ -0,0 +1,90 @@ +import { createServer, type Server, type Socket } from 'node:net'; +import { + InvalidRequestError, + MAX_REQUEST_BYTES, + parseRequest, + readLine, + type SpawnerResponse, +} from '@homepage/protocol'; +import type { SandboxManager } from './sandbox.ts'; + +export type Logger = (message: string) => void; + +function respond(connection: Socket, response: SpawnerResponse): void { + connection.write(`${JSON.stringify(response)}\n`); +} + +function bridge(connection: Socket, upstream: Socket, rest: Buffer): void +{ + const close = () => { + connection.destroy(); + upstream.destroy(); + }; + + connection.on('close', close); + upstream.on('close', close); + connection.on('error', close); + upstream.on('error', close); + + if (rest.length > 0) upstream.write(rest); + + connection.pipe(upstream); + upstream.pipe(connection); +} + +async function handle(connection: Socket, manager: SandboxManager, log: Logger): Promise +{ + const { line, rest } = await readLine(connection, MAX_REQUEST_BYTES); + const request = parseRequest(line); + + switch (request.op) + { + case 'spawn': { + const containerId = await manager.spawn(request.sessionId, request.expiresAt); + log(`spawned ${containerId.slice(0, 12)} for session ${request.sessionId}`); + respond(connection, { ok: true, containerId }); + break; + } + case 'attach': { + const upstream = await manager.attach(request.containerId); + respond(connection, { ok: true }); + bridge(connection, upstream, rest); + return; + } + case 'resize': + await manager.resize(request.containerId, request.cols, request.rows); + respond(connection, { ok: true }); + break; + + case 'kill': + await manager.kill(request.containerId); + log(`killed ${request.containerId.slice(0, 12)}`); + respond(connection, { ok: true }); + break; + + case 'list': + respond(connection, { ok: true, containers: await manager.list() }); + break; + } + + connection.end(); +} + +export function createSpawnerServer(manager: SandboxManager, log: Logger): Server +{ + return createServer((connection) => + { + connection.on('error', () => connection.destroy()); + + handle(connection, manager, log).catch((error: unknown) => + { + const message = error instanceof Error ? error.message : 'internal error'; + + if (!(error instanceof InvalidRequestError)) log(`request failed: ${message}`); + if (!connection.destroyed) { + respond(connection, { ok: false, error: message }); + connection.end(); + } + }); + }); +} diff --git a/deploy.sh b/deploy.sh index 57e4332..72520ae 100755 --- a/deploy.sh +++ b/deploy.sh @@ -73,15 +73,27 @@ pull_image() { commit=$(as_owner git rev-parse HEAD) sandbox_tag="${REGISTRY}/homepage-sandbox:${commit}" +spawner_tag="${REGISTRY}/homepage-spawner:${commit}" pull_image sandbox_docker "$sandbox_tag" -sandbox_image=$(sandbox_docker image inspect --format '{{index .RepoDigests 0}}' "$sandbox_tag") +pull_image docker "$spawner_tag" +digest() { "$1" image inspect --format '{{index .RepoDigests 0}}' "$2"; } -install -d -m 0755 runtime +# The spawner runs as 10001 and shares group 10100 with the backend. +install -d -m 0755 runtime runtime/status +install -d -o 10001 -g 10100 -m 0750 runtime/spawner cat > runtime/deploy.env <=24" + }, + "scripts": { + "typecheck": "tsc -p .", + "test": "vitest run", + "build": "pnpm -r build" + }, + "devDependencies": { + "@types/node": "^26.6.5", + "esbuild": "^0.28.2", + "typescript": "^7.0.2", + "vitest": "~5.0.3" + } +} diff --git a/packages/protocol/package.json b/packages/protocol/package.json new file mode 100644 index 0000000..e7e8ee3 --- /dev/null +++ b/packages/protocol/package.json @@ -0,0 +1,6 @@ +{ + "name": "@homepage/protocol", + "private": true, + "type": "module", + "exports": "./src/index.ts" +} diff --git a/packages/protocol/src/client.ts b/packages/protocol/src/client.ts new file mode 100644 index 0000000..61956c8 --- /dev/null +++ b/packages/protocol/src/client.ts @@ -0,0 +1,78 @@ +import { connect, type Socket } from 'node:net'; +import { readLine } from './lines.ts'; +import type { ManagedContainer, SpawnerRequest, SpawnerResponse } from './spawner.ts'; + +const MAX_RESPONSE_BYTES = 1024 * 1024; + +export class SpawnerError extends Error {} + +// noinspection ExceptionCaughtLocallyJS +export class SpawnerClient +{ + readonly socketPath: string; + + constructor(socketPath: string) { this.socketPath = socketPath; } + + async spawn(sessionId: string, expiresAt: number): Promise { + const response = await this.request({ op: 'spawn', sessionId, expiresAt }); + return response.containerId!; + } + + /** + * Returns a raw duplex stream to the container's terminal. The container + * is started by the first attach, and the stream starts paused, so no early + * output gets lost before the caller pipes or resumes it. + */ + async attach(containerId: string): Promise { + const { socket } = await this.open({ op: 'attach', containerId }); + return socket; + } + + async resize(containerId: string, cols: number, rows: number): Promise { + await this.request({ op: 'resize', containerId, cols, rows }); + } + + async kill(containerId: string): Promise { + await this.request({ op: 'kill', containerId }); + } + + async list(): Promise { + const response = await this.request({ op: 'list' }); + return response.containers ?? []; + } + + private async request(request: SpawnerRequest): Promise { + const { socket, response } = await this.open(request); + socket.destroy(); + return response; + } + + private open(request: SpawnerRequest): Promise<{ socket: Socket; response: SpawnerResponse & { ok: true } }> + { + return new Promise((resolve, reject) => + { + const socket = connect(this.socketPath); + socket.once('error', reject); + socket.once('connect', async () => + { + socket.off('error', reject); + try + { + socket.write(`${JSON.stringify(request)}\n`); + const { line, rest } = await readLine(socket, MAX_RESPONSE_BYTES, 30_000); + const response = JSON.parse(line) as SpawnerResponse; + + if (!response.ok) throw new SpawnerError(response.error); + if (rest.length > 0) socket.unshift(rest); + + resolve({ socket, response }); + } + catch (error) + { + socket.destroy(); + reject(error); + } + }); + }); + } +} diff --git a/packages/protocol/src/index.ts b/packages/protocol/src/index.ts new file mode 100644 index 0000000..97007fc --- /dev/null +++ b/packages/protocol/src/index.ts @@ -0,0 +1,3 @@ +export * from './spawner.ts'; +export * from './lines.ts'; +export * from './client.ts'; diff --git a/packages/protocol/src/lines.ts b/packages/protocol/src/lines.ts new file mode 100644 index 0000000..fee5f45 --- /dev/null +++ b/packages/protocol/src/lines.ts @@ -0,0 +1,54 @@ +import type { Socket } from 'node:net'; + +export type Line = { + line: string; + /** Bytes received after the newline, which belong to the following stream. */ + rest: Buffer; +}; + +export function readLine(socket: Socket, maxBytes: number, timeoutMs = 5000): Promise { + return new Promise((resolve, reject) => + { + let buffered = Buffer.alloc(0); + + const finish = (error: Error | null, result?: Line) => + { + clearTimeout(timer); + + socket.off('data', onData); + socket.off('end', onEnd); + socket.off('error', onError); + + if (error) reject(error); + else resolve(result!); + }; + + const onData = (chunk: Buffer) => + { + buffered = Buffer.concat([buffered, chunk]); + + const newline = buffered.indexOf(0x0a); + if (newline === -1) { + if (buffered.length > maxBytes) finish(new Error('line too long')); + return; + } + + if (newline > maxBytes) { + finish(new Error('line too long')); + return; + } + + socket.pause(); + finish(null, { line: buffered.subarray(0, newline).toString('utf8'), rest: buffered.subarray(newline + 1) }); + }; + + const onEnd = () => finish(new Error('connection closed before a full line arrived')); + const onError = (error: Error) => finish(error); + const timer = setTimeout(() => finish(new Error('timed out waiting for a line')), timeoutMs); + + socket.on('data', onData); + socket.once('end', onEnd); + socket.once('error', onError); + socket.resume(); + }); +} diff --git a/packages/protocol/src/spawner.test.ts b/packages/protocol/src/spawner.test.ts new file mode 100644 index 0000000..06afa55 --- /dev/null +++ b/packages/protocol/src/spawner.test.ts @@ -0,0 +1,53 @@ +import { describe, expect, it } from 'vitest'; +import { InvalidRequestError, MAX_SESSION_SECONDS, parseRequest } from './spawner.ts'; + +const now = 1_800_000_000; +const parse = (value: unknown) => parseRequest(JSON.stringify(value), now); + +describe('parseRequest', () => { + it('accepts a valid spawn', () => { + expect(parse({ op: 'spawn', sessionId: 'abcdEFGH_-12', expiresAt: now + 1200 })).toEqual({ + op: 'spawn', + sessionId: 'abcdEFGH_-12', + expiresAt: now + 1200, + }); + }); + + it.each([ + ['short id', { op: 'spawn', sessionId: 'abc', expiresAt: now + 60 }], + ['id with shell characters', { op: 'spawn', sessionId: 'abcdefgh;rm', expiresAt: now + 60 }], + ['expiry in the past', { op: 'spawn', sessionId: 'abcdefgh', expiresAt: now }], + ['expiry too far ahead', { op: 'spawn', sessionId: 'abcdefgh', expiresAt: now + MAX_SESSION_SECONDS + 1 }], + ['fractional expiry', { op: 'spawn', sessionId: 'abcdefgh', expiresAt: now + 1.5 }], + ['uppercase container id', { op: 'kill', containerId: 'ABCDEF123456' }], + ['container id with path', { op: 'attach', containerId: '../../info' }], + ['unknown op', { op: 'exec', containerId: 'abcdef123456' }], + ['array', [{ op: 'list' }]], + ['null', null], + ])('rejects %s', (_name, value) => { + expect(() => parse(value)).toThrow(InvalidRequestError); + }); + + it('rejects malformed json', () => { + expect(() => parseRequest('{"op":', now)).toThrow(InvalidRequestError); + }); + + it('ignores inherited properties', () => { + expect(() => parseRequest('{"__proto__":{"op":"list"}}', now)).toThrow(InvalidRequestError); + }); + + it('clamps the terminal size', () => { + expect(parse({ op: 'resize', containerId: 'abcdef123456', cols: 9999, rows: 0 })).toEqual({ + op: 'resize', + containerId: 'abcdef123456', + cols: 500, + rows: 1, + }); + }); + + it('rejects a non integer terminal size', () => { + expect(() => parse({ op: 'resize', containerId: 'abcdef123456', cols: '80', rows: 24 })).toThrow( + InvalidRequestError, + ); + }); +}); diff --git a/packages/protocol/src/spawner.ts b/packages/protocol/src/spawner.ts new file mode 100644 index 0000000..0c57559 --- /dev/null +++ b/packages/protocol/src/spawner.ts @@ -0,0 +1,99 @@ +export const SANDBOX_LABEL = 'org.security-command.sandbox'; +export const SESSION_LABEL = 'org.security-command.session'; + +export const MAX_REQUEST_BYTES = 4096; +export const MAX_SESSION_SECONDS = 6 * 60 * 60; +export const MAX_TERMINAL_SIZE = 500; + +export type SpawnerRequest = + | { op: 'spawn'; sessionId: string; expiresAt: number } + | { op: 'attach'; containerId: string } + | { op: 'resize'; containerId: string; cols: number; rows: number } + | { op: 'kill'; containerId: string } + | { op: 'list' }; + +export type ManagedContainer = { + containerId: string; + sessionId: string; + running: boolean; +}; + +export type SpawnerResponse = + | { ok: true; containerId?: string; containers?: ManagedContainer[] } + | { ok: false; error: string }; + +const SESSION_ID = /^[A-Za-z0-9_-]{8,64}$/; +const CONTAINER_ID = /^[0-9a-f]{12,64}$/; + +export class InvalidRequestError extends Error {} + +function invalid(message: string): never { + throw new InvalidRequestError(message); +} + +function field(input: Record, name: string): unknown { + return Object.hasOwn(input, name) ? input[name] : undefined; +} + +function sessionId(value: unknown): string { + return typeof value === 'string' && SESSION_ID.test(value) ? value : invalid('invalid session id'); +} + +function containerId(value: unknown): string { + return typeof value === 'string' && CONTAINER_ID.test(value) ? value : invalid('invalid container id'); +} + +function terminalSize(value: unknown): number { + if (typeof value !== 'number' || !Number.isInteger(value)) invalid('invalid terminal size'); + return Math.min(Math.max(value, 1), MAX_TERMINAL_SIZE); +} + +/** + * Parses one request line. Everything the backend sends is treated as + * untrusted, because the backend faces the internet and may be compromised. + */ +export function parseRequest(line: string, nowSeconds = Math.floor(Date.now() / 1000)): SpawnerRequest +{ + let input: unknown; + try { input = JSON.parse(line); } + catch { invalid('malformed json'); } + + if (typeof input !== 'object' || input === null || Array.isArray(input)) invalid('request must be an object'); + + const request = input as Record; + switch (field(request, 'op')) + { + case 'spawn': { + const expiresAt = field(request, 'expiresAt'); + + if ( + typeof expiresAt !== 'number' || + !Number.isInteger(expiresAt) || + expiresAt <= nowSeconds || + expiresAt > nowSeconds + MAX_SESSION_SECONDS + ) { invalid('invalid expiry'); } + + return { op: 'spawn', sessionId: sessionId(field(request, 'sessionId')), expiresAt }; + } + + case 'attach': + return { op: 'attach', containerId: containerId(field(request, 'containerId')) }; + + case 'resize': + return { + op: 'resize', + containerId: containerId(field(request, 'containerId')), + cols: terminalSize(field(request, 'cols')), + rows: terminalSize(field(request, 'rows')), + }; + + case 'kill': + return { op: 'kill', containerId: containerId(field(request, 'containerId')) }; + + case 'list': + return { op: 'list' }; + + default: + return invalid('unknown op'); + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..67eeb1f --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1296 @@ +--- +lockfileVersion: '9.0' + +importers: + + .: + configDependencies: {} + packageManagerDependencies: + pnpm: + specifier: 12.11.2 + version: 12.11.2 + +packages: + + '@pnpm/exe.android-arm64@12.11.2': + resolution: {integrity: sha512-owLw13OfPkEoY+hLBNeeG+dCFhywr7q2d/EHPz4mNL2RhKnv8gNwMARkjkiDQu234aItVwFNDeGnmQXm+ikkAg==} + cpu: [arm64] + os: [android] + + '@pnpm/exe.android-x64@12.11.2': + resolution: {integrity: sha512-GYPkVebl4iokOA/4MPSpGoUVfFlsth7uqOCe1XiaiM23LAdvUOMJBObqHJijr89ZqjwHm9pO6vO45GRwJ2U2qA==} + cpu: [x64] + os: [android] + + '@pnpm/exe.darwin-arm64@12.11.2': + resolution: {integrity: sha512-n9M4On66y8FDxUAKgMO1FXt0qihyG4e+56p3/F0uo8Bx9KplW8BwKVnXigzCJ8aNM6sVVPkOE6M9XXbeVIxnZA==} + cpu: [arm64] + os: [darwin] + + '@pnpm/exe.darwin-x64@12.11.2': + resolution: {integrity: sha512-oSW7n3sBT0c0cyk4kj10T2Y6Mpm+OFEiCAWozgX039tdoI6yqJF1uaFD3sw7ugLdu6VV3+uY0pa1TUZIPdxDWA==} + cpu: [x64] + os: [darwin] + + '@pnpm/exe.freebsd-x64@12.11.2': + resolution: {integrity: sha512-qbzc3KoDpa/Lkf8vs3jnDe6dUUbso+6eLIyssYFMiliLpYNxn8dirk11YoNnOQcdHVB50v5RFls1Yid6ttT5pg==} + cpu: [x64] + os: [freebsd] + + '@pnpm/exe.linux-arm64-musl@12.11.2': + resolution: {integrity: sha512-uMEYDwKRktGwANubQ+kYCwmhNwg3Ik6qK89ahsbQ5cP30R/5FVJb/T99vr9XRUBC/A7mZI6eeT92oyVas9ACyg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-arm64@12.11.2': + resolution: {integrity: sha512-6e8ZAQUwFXAWHHHv5FesWqf/kEK04wuitBv5f/gxzkC0DiBfaixr+f+6JQede8SF4Ji5LcMwVFJbzAtffpWxEg==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-ppc64@12.11.2': + resolution: {integrity: sha512-Ui8A4nepkVupx2VpuFfysEluMvWK6gTB5rgVts7Ss/+8dj0RD28x3F/seNeH/zSypgC6yKdV6qsKVQh/uffTuQ==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-riscv64@12.11.2': + resolution: {integrity: sha512-i1yLdQ5bu+wjQ+srtFoJAaY2gN/+oXHFdjul4llCeoDxHE0rTIG3R41NhHfCjyFPW4+CpbBT58933CL9sMOCnA==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-s390x@12.11.2': + resolution: {integrity: sha512-YS1/lhPjjTsN4QL50VaFZKRa3Uc/bDnhE8eKbJMFvuX06UuFS5YaiDg04APoZdfVSGqTfX27QAg7rfLMSWaqxA==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@pnpm/exe.linux-x64-musl@12.11.2': + resolution: {integrity: sha512-7eIxQR05fvJxCujUSKp5KTtehJ7QqrgqP/HD1+BcB/SaV2Be4XI1PEHiOgA1zxsiMIeMvTF6E4G4dYHrFjeXRg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@pnpm/exe.linux-x64@12.11.2': + resolution: {integrity: sha512-FK7QKe24AYgppJwO3mpooYptduuvIGqKJPi5ac7MdnWkjUy46JBfYhCW0grnkWKC8YOf0x+vGviuQqJEj3SpQQ==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@pnpm/exe.win32-arm64@12.11.2': + resolution: {integrity: sha512-PCTjVDdJb6VvraZxrEeFv6EqEA0hhIsAySx28e95J2Tqpi88hLpgOXgNqV0vpxq9A+b8GLQfyk/D+1UlJPv/YQ==} + cpu: [arm64] + os: [win32] + + '@pnpm/exe.win32-x64@12.11.2': + resolution: {integrity: sha512-8sgX86OvRjJ3yZs/TvGR2L31wH9ScPZ+f+geKI3ikuB0RRiK3i4LlTRO8OXN6pdRqj8epMde4312MCjj7JsJdA==} + cpu: [x64] + os: [win32] + + pnpm@12.11.2: + resolution: {integrity: sha512-JaUWUqGWeFr18ovabf6NxYLr76SsHRgCIc4TkCMcX7dmN4IupLbkYzznSs3LCnf3Ja8RutOBd/3t2u6BipVcuQ==} + engines: {node: '>=18.*'} + hasBin: true + +snapshots: + + '@pnpm/exe.android-arm64@12.11.2': + optional: true + + '@pnpm/exe.android-x64@12.11.2': + optional: true + + '@pnpm/exe.darwin-arm64@12.11.2': + optional: true + + '@pnpm/exe.darwin-x64@12.11.2': + optional: true + + '@pnpm/exe.freebsd-x64@12.11.2': + optional: true + + '@pnpm/exe.linux-arm64-musl@12.11.2': + optional: true + + '@pnpm/exe.linux-arm64@12.11.2': + optional: true + + '@pnpm/exe.linux-ppc64@12.11.2': + optional: true + + '@pnpm/exe.linux-riscv64@12.11.2': + optional: true + + '@pnpm/exe.linux-s390x@12.11.2': + optional: true + + '@pnpm/exe.linux-x64-musl@12.11.2': + optional: true + + '@pnpm/exe.linux-x64@12.11.2': + optional: true + + '@pnpm/exe.win32-arm64@12.11.2': + optional: true + + '@pnpm/exe.win32-x64@12.11.2': + optional: true + + pnpm@12.11.2: + optionalDependencies: + '@pnpm/exe.android-arm64': 12.11.2 + '@pnpm/exe.android-x64': 12.11.2 + '@pnpm/exe.darwin-arm64': 12.11.2 + '@pnpm/exe.darwin-x64': 12.11.2 + '@pnpm/exe.freebsd-x64': 12.11.2 + '@pnpm/exe.linux-arm64': 12.11.2 + '@pnpm/exe.linux-arm64-musl': 12.11.2 + '@pnpm/exe.linux-ppc64': 12.11.2 + '@pnpm/exe.linux-riscv64': 12.11.2 + '@pnpm/exe.linux-s390x': 12.11.2 + '@pnpm/exe.linux-x64': 12.11.2 + '@pnpm/exe.linux-x64-musl': 12.11.2 + '@pnpm/exe.win32-arm64': 12.11.2 + '@pnpm/exe.win32-x64': 12.11.2 + +--- +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/node': + specifier: ^26.6.5 + version: 26.6.5 + esbuild: + specifier: ^0.28.2 + version: 0.28.2 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + vitest: + specifier: ~5.0.3 + version: 5.0.3(@types/node@26.6.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)) + + apps/spawner: + dependencies: + '@homepage/protocol': + specifier: workspace:* + version: link:../../packages/protocol + + packages/protocol: {} + +packages: + + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@oxc-project/types@0.153.0': + resolution: {integrity: sha512-jSNrRIyvPVLL5E1z/tS5zLAprosGz/FuI1PWwEOz59j3E4TTTzSpqKb/RDGqJhhW0QHYISGXxq582wGx6T11Tw==} + + '@rolldown/binding-android-arm-eabi@1.2.13': + resolution: {integrity: sha512-Vu/NICrgdRvUOeaJZIyB2FP63s6fO/4ud5l8dXmxDx9yDyn+mN0y+gsvsVviSli+T361Aqo0h46EuMoobrwawA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.2.13': + resolution: {integrity: sha512-6LEoIrGy5vvCd2boNnv2soPSUZj/PRvhp8R/t9KlX+mIZxThIE/ZqxrGXxmuNX0FuvQFvLdZr7S4HrYpYBVhEQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.13': + resolution: {integrity: sha512-CaJSRzlQ6Q+zkDMVA9OkVxBjVoPRCDEE3v0FSJ9kIQBgRjFApA3Si4ijhbNVUji7ZJt+PfO0e46qy4nPInHUPA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.13': + resolution: {integrity: sha512-e4r340I5hxSzJkD3YJBxgzq/rJ3wwxwdLLb2FPt1Zpyem20nrQPT11DDEEkazwxaHumH8wpglsp/Ozgj/wT6mw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.13': + resolution: {integrity: sha512-hoBWDZ4/K/mJKVMbsgUd1jfpA2DiOrJ54mpegObU9TBHBBrtX4FLIXJJQRDPZ/2Dn91GvPob+Z2hwKJzf4E5SQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.13': + resolution: {integrity: sha512-oF9fZu3vTWnTiVAkDFxU9PJLt1nh20K9RRpuHsR7ZnE2L7XookBbDBVLojCVSLGbvtSlxeUNnjAj6DbNsKyzbg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.13': + resolution: {integrity: sha512-DTpb/+jMiqWMPgphn4ksW1zW+XLJ6dJJ9FMvnIk9I291LhCctMPhMYJrP5t9p6C9qa3KXadDdUEZHBaPh3kNxQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.13': + resolution: {integrity: sha512-xU+Kvv9N2A3SY35zFh1FWWNjxbadE/BKeqnkXe7vScU4GZsw757BlVmDLITZEq8DPpk6m7uoDYkK7P+x/uU5Ow==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.13': + resolution: {integrity: sha512-XMk/hnhh25oQ756Lclb1Q11h4ll0xC0Esa5w4Vzp+mAE2S3AGJgeM0SonrIgY8fHhjarb6hcoTuwoFG0VVP2ig==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.13': + resolution: {integrity: sha512-U1BoTHYmlywE2n3HUWjzZ+8EQsKr+OwpxYuDWaubx42tUL8QSL7nOqRz/NVHanibbFP3M1Rxuprz/wNcbMKjqw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.13': + resolution: {integrity: sha512-J4cm80Pc6wEwV5AZ42o62sIQgDk+Y7R2s646jIwuvO+4V46QB58N4vVuMPWCBaNgursXLpmUWJV//WQAkPvHBQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.13': + resolution: {integrity: sha512-W0euZS40U4V6JkmEnVCIX9mcsL6cbXQ4X8c2w+MMOIjFg68TXUW+u3RT+2e1t1pv9mg/EP3pDtK3POXdQ7Rxyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.13': + resolution: {integrity: sha512-do/AF/4n9MRshia3a5aXoy8xM2c6mgfT6D7H/dY6my5z+hfCIR4ab7mk4IRj++nsEQpKy39kd0DQnDq+r692tw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.13': + resolution: {integrity: sha512-6FtUf2cJZobutJdxnGYX8z0vtbgqU0b2v8vfBhkXb9wp2MppMFtkunE+IaOntyi01rkIQoPW2GHABtfzsC0BRQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.13': + resolution: {integrity: sha512-UKhFaZTeTcbKrb3iU82m17jVcPEAoqDkCN5MBqgPyZSwp/cQmib21crTS0DdH7T1B7wZRWEI89YQAOJMet5yhg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/node@26.6.5': + resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + '@vitest/mocker@5.0.3': + resolution: {integrity: sha512-T8sWAIbkSyAjkwTcaEc3Iu0o9A27X1/kdXrizhZkGuSKScRQtRzclfAMpOTcGdXCsqxeWlpGy3XjqaW8CpLORg==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.3': + resolution: {integrity: sha512-XhFysQTB8AZ+P4gMi+Lpo99vg2AZi0qKpaB9yXQl37+CaMEAPO3iH/wGVnSyL5MPERiLezpqTVtrR6UZH5GCXg==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} + engines: {node: '>=18'} + hasBin: true + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + magic-string@1.4.3: + resolution: {integrity: sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==} + + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + obug@2.2.1: + resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + engines: {node: '>=12.20.0'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + postcss@8.5.29: + resolution: {integrity: sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ==} + engines: {node: ^10 || ^12 || >=14} + + rolldown@1.2.13: + resolution: {integrity: sha512-/5apOkwWxtACcQtZ5WlrAsKS4JwXVThQPJZ3RqIruRY9UG9M8e0VlXN068xum/JRKA4aIUoJ13ghe/kGCvidiQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + + tinybench@6.2.2: + resolution: {integrity: sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==} + engines: {node: '>=20.0.0'} + + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + undici-types@8.9.0: + resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} + + vite@8.3.4: + resolution: {integrity: sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@5.0.3: + resolution: {integrity: sha512-xMw97S3rjdtj5dkVat7jCsqWBpvchs3RlpQctUqwJD0KkERk40vz2fJ77lDwW/Vzh/pk18eItYAzkodhSes3jQ==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.3 + '@vitest/browser-preview': 5.0.3 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.3 + '@vitest/coverage-v8': 5.0.3 + '@vitest/ui': 5.0.3 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + +snapshots: + + '@esbuild/aix-ppc64@0.28.2': + optional: true + + '@esbuild/android-arm64@0.28.2': + optional: true + + '@esbuild/android-arm@0.28.2': + optional: true + + '@esbuild/android-x64@0.28.2': + optional: true + + '@esbuild/darwin-arm64@0.28.2': + optional: true + + '@esbuild/darwin-x64@0.28.2': + optional: true + + '@esbuild/freebsd-arm64@0.28.2': + optional: true + + '@esbuild/freebsd-x64@0.28.2': + optional: true + + '@esbuild/linux-arm64@0.28.2': + optional: true + + '@esbuild/linux-arm@0.28.2': + optional: true + + '@esbuild/linux-ia32@0.28.2': + optional: true + + '@esbuild/linux-loong64@0.28.2': + optional: true + + '@esbuild/linux-mips64el@0.28.2': + optional: true + + '@esbuild/linux-ppc64@0.28.2': + optional: true + + '@esbuild/linux-riscv64@0.28.2': + optional: true + + '@esbuild/linux-s390x@0.28.2': + optional: true + + '@esbuild/linux-x64@0.28.2': + optional: true + + '@esbuild/netbsd-arm64@0.28.2': + optional: true + + '@esbuild/netbsd-x64@0.28.2': + optional: true + + '@esbuild/openbsd-arm64@0.28.2': + optional: true + + '@esbuild/openbsd-x64@0.28.2': + optional: true + + '@esbuild/openharmony-arm64@0.28.2': + optional: true + + '@esbuild/sunos-x64@0.28.2': + optional: true + + '@esbuild/win32-arm64@0.28.2': + optional: true + + '@esbuild/win32-ia32@0.28.2': + optional: true + + '@esbuild/win32-x64@0.28.2': + optional: true + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@oxc-project/types@0.153.0': {} + + '@rolldown/binding-android-arm-eabi@1.2.13': + optional: true + + '@rolldown/binding-android-arm64@1.2.13': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.13': + optional: true + + '@rolldown/binding-darwin-x64@1.2.13': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.13': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.13': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.13': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.13': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.13': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.13': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.13': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.13': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.13': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.13': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.13': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.9': {} + + '@types/node@26.6.5': + dependencies: + undici-types: 8.9.0 + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + '@vitest/mocker@5.0.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2))': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.3 + estree-walker: 3.0.3 + magic-string: 1.4.3 + optionalDependencies: + vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2) + + '@vitest/spy@5.0.3': {} + + assertion-error@2.0.1: {} + + chai@6.3.0: {} + + detect-libc@2.1.2: {} + + es-module-lexer@2.3.2: {} + + esbuild@0.28.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + expect-type@1.4.0: {} + + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + + fsevents@2.3.3: + optional: true + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + magic-string@1.4.3: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + nanoid@3.3.20: {} + + obug@2.2.1: {} + + picocolors@1.1.1: {} + + picomatch@4.0.7: {} + + postcss@8.5.29: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + + rolldown@1.2.13: + dependencies: + '@oxc-project/types': 0.153.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.2.13 + '@rolldown/binding-android-arm64': 1.2.13 + '@rolldown/binding-darwin-arm64': 1.2.13 + '@rolldown/binding-darwin-x64': 1.2.13 + '@rolldown/binding-freebsd-x64': 1.2.13 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.13 + '@rolldown/binding-linux-arm64-gnu': 1.2.13 + '@rolldown/binding-linux-arm64-musl': 1.2.13 + '@rolldown/binding-linux-ppc64-gnu': 1.2.13 + '@rolldown/binding-linux-s390x-gnu': 1.2.13 + '@rolldown/binding-linux-x64-gnu': 1.2.13 + '@rolldown/binding-linux-x64-musl': 1.2.13 + '@rolldown/binding-openharmony-arm64': 1.2.13 + '@rolldown/binding-win32-arm64-msvc': 1.2.13 + '@rolldown/binding-win32-x64-msvc': 1.2.13 + + source-map-js@1.2.2: {} + + std-env@4.3.0: {} + + tinybench@6.2.2: {} + + tinyexec@1.3.1: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + undici-types@8.9.0: {} + + vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.29 + rolldown: 1.2.13 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 26.6.5 + esbuild: 0.28.2 + fsevents: 2.3.3 + + vitest@5.0.3(@types/node@26.6.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.3 + obug: 2.2.1 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.2 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2) + why-is-node-running: 3.2.1 + optionalDependencies: + '@types/node': 26.6.5 + transitivePeerDependencies: + - msw + + why-is-node-running@3.2.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..32c2173 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,5 @@ +packages: + - apps/* + - packages/* +allowBuilds: + esbuild: true diff --git a/sandbox/Dockerfile b/sandbox/Dockerfile index a3c3e2e..7d06950 100644 --- a/sandbox/Dockerfile +++ b/sandbox/Dockerfile @@ -13,9 +13,12 @@ RUN rm -f /etc/dpkg/dpkg.cfg.d/docker \ figlet cowsay fortune-mod fortunes-min sl curl wget \ && rm -rf /var/lib/apt/lists/* +# The home directory stays empty, because Podman copies image content into +# tmpfs mounts and Docker does not. All shell configuration lives in /etc. # Setuid binaries are useless under no-new-privileges, so they are stripped # to keep the attack surface minimal even if that option is ever dropped. -RUN useradd --uid 1000 --create-home --shell /bin/bash guest \ +RUN useradd --uid 1000 --no-create-home --home-dir /home/guest --shell /bin/bash guest \ + && mkdir /home/guest \ && find / -xdev -perm /6000 -type f -exec chmod a-s {} + COPY etc/ /etc/ diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..551e614 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es2024", + "module": "nodenext", + "moduleResolution": "nodenext", + "lib": ["es2024"], + "types": ["node"], + "strict": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + "erasableSyntaxOnly": true, + "verbatimModuleSyntax": true, + "allowImportingTsExtensions": true, + "noEmit": true, + "skipLibCheck": true + }, + "include": ["apps/*/src", "packages/*/src"] +}