/** * Logical process table for `/proc`-style introspection (guest has no real PIDs). */ /** * @param {{ sessionId?: string, bootStartedMs?: number }} opts */ export function bareOsProcessTableSnapshot(opts = {}) { const sid = String(opts.sessionId || '').trim().slice(0, 128) const boot = typeof opts.bootStartedMs === 'number' ? opts.bootStartedMs : 0 const now = Date.now() return { schema: 1, note: 'Synthetic rows; Bare OS guests do not expose host OS processes.', processes: [ { pid: 1, ppid: 0, name: 'bare-os-kernel', state: 'running', startedAtMs: boot || now }, { pid: 2, ppid: 1, name: 'bare-os-booter', state: 'running', startedAtMs: boot || now }, { pid: 3, ppid: 2, name: 'bare-os-shell', state: 'running', startedAtMs: now, sessionId: sid || undefined } ], atMs: now } }