Skip to content
Français

ResourceActivityRecord

import type { ResourceActivityRecord } from "@elie-laloum/outpost";
  • versionRequired
    1
    Version of this serialized record format; currently 1.
  • idRequired
    string
    Random UUID of the record, stored at resources/<id>.json.
  • pidRequired
    number
    PID of the Outpost process that provisioned the sandbox, not of a process inside it.
  • identityOptional
    LocalProcessIdentity | undefined
    Host, boot, PID namespace and start time of the writing process, used to tell a live owner from a reused PID. Absent when written outside Linux; ownership is then unknown.
  • sandboxProviderRequired
    string
    Name of the sandbox provider that allocated the sandbox, such as docker or vercel.
  • placementRequired
    "mounted" | "remote" | "host"
    How the sandbox reaches the workspace: mounted (host worktree mounted, Docker or Podman), remote (copy synchronized with the host: Vercel, Daytona, Firecracker, isolated containers) or host (local provider).
  • workspaceRequired
    string
    Host path of the worktree the sandbox works on. Recovery retention never prunes a workspace named by a record.
  • createdAtRequired
    string
    ISO time the sandbox was registered, before the provider acquired it.
  • updatedAtRequired
    string
    ISO time of the last phase or operation change.
  • phaseRequired
    "allocating" | "ready" | "closing" | "cleanup-failed" | "allocation-uncertain"
    Last recorded lifecycle phase: allocating, ready, closing, cleanup-failed or allocation-uncertain.
  • operationsRequired
    readonly ResourceOperation[]
    Operations running when the record was written, one entry per kind with its concurrent count. Empty when the sandbox is idle.
  • lastOperationOptional
    ResourceOperationResult | undefined
    Most recently finished operation, completed or failed.
  • lastFailureOptional
    ResourceOperationResult | undefined
    Most recent operation recorded as failed, retained after subsequent successes.
export interface ResourceActivityRecord {
  readonly version: 1;
  readonly id: string;
  readonly pid: number;
  readonly identity?: LocalProcessIdentity;
  readonly sandboxProvider: string;
  readonly placement: "mounted" | "remote" | "host";
  readonly workspace: string;
  readonly createdAt: string;
  readonly updatedAt: string;
  readonly phase: ResourcePhase;
  readonly operations: readonly ResourceOperation[];
  readonly lastOperation?: ResourceOperationResult;
  readonly lastFailure?: ResourceOperationResult;
}