Skip to content
Français

RecoveryRetentionPolicy

import type { RecoveryRetentionPolicy } from "@elie-laloum/outpost";
  • versionRequired
    1
    Policy format version; must be 1.
  • scopesRequired
    readonly ("clean-workspaces" | "closed-logs" | "task-cache")[]
    Data that may become eligible: clean-workspaces (clean worktrees on a branch, local only), closed-logs (closed journals) and task-cache (task cache entries). At least one; nothing outside them is ever eligible.
  • minAgeMsRequired
    number
    Minimum time since the entry’s last modification, in milliseconds; 0 accepts any age. For a journal, the index and every segment must be old enough.
  • maxBytesOptional
    number | undefined
    Limit on projectedBytes; above it the plan’s quota is exceeded. It never makes more entries eligible.
  • maxWorkspacesOptional
    number | undefined
    Limit on the worktrees left after pruning; above it the plan’s quota is exceeded. It never makes more worktrees eligible, and a transporter rejects it with code configuration.
export interface RecoveryRetentionPolicy {
  readonly version: 1;
  readonly scopes: readonly (
    "clean-workspaces" | "closed-logs" | "task-cache"
  )[];
  readonly minAgeMs: number;
  readonly maxBytes?: number;
  readonly maxWorkspaces?: number;
}