UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

725 lines (724 loc) • 25.8 kB
import { z } from "zod"; import type { ComputerResources } from "../resources.js"; import type { Blocker } from "./safety.js"; /** * The housekeeping report. A pass produces a stored report (every item it * found, with its section); `GET /v1/housekeeping` serves a view of it shaped * for the phone (warnings, suggestions, kept, cleaned), minus dismissed items. * The view's schema below is the contract: docs/housekeeping.md documents it, * fixtures/conformance/housekeeping-*.json exercise it, and the apps decode * those fixtures. Add fields freely; change or remove one only with `schema` + 1. */ export declare const SCHEMA = 1; export declare const AREAS: readonly ["memory", "disk", "sessions", "worktrees", "simulators", "docker"]; export type Area = typeof AREAS[number]; export type ItemKind = "cache" | "worktree" | "tmp" | "pane" | "job" | "simulator" | "docker" | "health" | "process"; export type Severity = "info" | "warn" | "high"; export type Trigger = "tick" | "low-disk" | "high-load" | "manual" | "approve"; export type ActionKind = "delete-path" | "remove-worktree" | "close-pane" | "end-job" | "end-process" | "shutdown-simulator" | "delete-simulator" | "prune-docker-builder"; /** warning: an observation; suggestion: needs the owner; kept: a safety rule holds it; auto: the Hook does it itself. */ export type Section = "warning" | "suggestion" | "kept" | "auto"; declare const paneSchema: z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>; declare const targetSchema: z.ZodObject<{ path: z.ZodOptional<z.ZodString>; repo: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; pid: z.ZodOptional<z.ZodNumber>; udid: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export declare const warningSchema: z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; severity: z.ZodEnum<{ high: "high"; info: "info"; warn: "warn"; }>; title: z.ZodString; detail: z.ZodString; since: z.ZodString; fix: z.ZodOptional<z.ZodString>; pane: z.ZodOptional<z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; session: z.ZodOptional<z.ZodString>; dispatch: z.ZodOptional<z.ZodString>; notify: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>; export declare const suggestionSchema: z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; kind: z.ZodString; title: z.ZodString; target: z.ZodObject<{ path: z.ZodOptional<z.ZodString>; repo: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; pid: z.ZodOptional<z.ZodNumber>; udid: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, z.core.$strip>; reason: z.ZodString; evidence: z.ZodArray<z.ZodString>; sizeBytes: z.ZodOptional<z.ZodNumber>; actionLabel: z.ZodString; since: z.ZodString; pane: z.ZodOptional<z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; session: z.ZodOptional<z.ZodString>; dispatch: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export declare const keptSchema: z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; title: z.ZodString; target: z.ZodObject<{ path: z.ZodOptional<z.ZodString>; repo: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; pid: z.ZodOptional<z.ZodNumber>; udid: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, z.core.$strip>; reason: z.ZodString; }, z.core.$strip>; export declare const cleanedSchema: z.ZodObject<{ id: z.ZodString; at: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; kind: z.ZodString; title: z.ZodString; target: z.ZodObject<{ path: z.ZodOptional<z.ZodString>; repo: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; pid: z.ZodOptional<z.ZodNumber>; udid: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, z.core.$strip>; freedBytes: z.ZodNumber; reportedBytes: z.ZodOptional<z.ZodNumber>; removedEntries: z.ZodOptional<z.ZodNumber>; by: z.ZodEnum<{ auto: "auto"; cli: "cli"; conductor: "conductor"; phone: "phone"; }>; }, z.core.$strip>; export declare const dismissedSchema: z.ZodObject<{ id: z.ZodString; section: z.ZodEnum<{ kept: "kept"; suggestions: "suggestions"; warnings: "warnings"; }>; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; title: z.ZodString; dismissedAt: z.ZodString; }, z.core.$strip>; /** Everything on the computer the owner may handle, with `?inventory=1` (inventory.ts). */ export declare const inventorySchema: z.ZodObject<{ collectedAt: z.ZodString; durationMs: z.ZodNumber; scanning: z.ZodOptional<z.ZodBoolean>; stale: z.ZodOptional<z.ZodBoolean>; worktrees: z.ZodArray<z.ZodObject<{ id: z.ZodString; repo: z.ZodString; branch: z.ZodOptional<z.ZodString>; path: z.ZodString; main: z.ZodBoolean; sizeBytes: z.ZodOptional<z.ZodNumber>; lastCommitAt: z.ZodOptional<z.ZodString>; dirty: z.ZodNumber; untracked: z.ZodNumber; unpushed: z.ZodNumber; stashes: z.ZodNumber; inProgress: z.ZodOptional<z.ZodString>; locked: z.ZodOptional<z.ZodLiteral<true>>; sessions: z.ZodArray<z.ZodObject<{ pane: z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>; agent: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; processes: z.ZodArray<z.ZodObject<{ pid: z.ZodNumber; command: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; action: z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>>; space: z.ZodArray<z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; kind: z.ZodString; title: z.ZodString; path: z.ZodOptional<z.ZodString>; udid: z.ZodOptional<z.ZodString>; sizeBytes: z.ZodNumber; lastUsedAt: z.ZodOptional<z.ZodString>; inUse: z.ZodOptional<z.ZodString>; note: z.ZodOptional<z.ZodString>; action: z.ZodOptional<z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; }, z.core.$strip>>; sessions: z.ZodArray<z.ZodObject<{ id: z.ZodString; pane: z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>; agent: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; project: z.ZodOptional<z.ZodString>; status: z.ZodOptional<z.ZodString>; idleSeconds: z.ZodOptional<z.ZodNumber>; cwd: z.ZodOptional<z.ZodString>; dispatch: z.ZodOptional<z.ZodString>; role: z.ZodOptional<z.ZodString>; receipt: z.ZodOptional<z.ZodObject<{ id: z.ZodString; returnRead: z.ZodBoolean; }, z.core.$strip>>; action: z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>>; processes: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; name: z.ZodString; pid: z.ZodNumber; processes: z.ZodNumber; cpuPercent: z.ZodNumber; memoryBytes: z.ZodNumber; swapBytes: z.ZodOptional<z.ZodNumber>; startedAt: z.ZodOptional<z.ZodString>; command: z.ZodString; pane: z.ZodOptional<z.ZodObject<{ server: z.ZodString; pane: z.ZodString; label: z.ZodOptional<z.ZodString>; agent: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; action: z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>>>; errors: z.ZodOptional<z.ZodArray<z.ZodObject<{ check: z.ZodString; message: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; export declare const viewSchema: z.ZodObject<{ computer: z.ZodOptional<z.ZodObject<{ id: z.ZodString; name: z.ZodString; aliases: z.ZodArray<z.ZodString>; }, z.core.$strip>>; schema: z.ZodLiteral<1>; revision: z.ZodString; generatedAt: z.ZodString; nextCheckAt: z.ZodOptional<z.ZodString>; health: z.ZodObject<{ load1: z.ZodNumber; cores: z.ZodNumber; memoryUsedBytes: z.ZodNumber; memoryTotalBytes: z.ZodNumber; memoryPressure: z.ZodEnum<{ critical: "critical"; normal: "normal"; warn: "warn"; }>; diskFreeBytes: z.ZodNumber; diskTotalBytes: z.ZodNumber; tmpBytes: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>; warnings: z.ZodArray<z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; severity: z.ZodEnum<{ high: "high"; info: "info"; warn: "warn"; }>; title: z.ZodString; detail: z.ZodString; since: z.ZodString; fix: z.ZodOptional<z.ZodString>; pane: z.ZodOptional<z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; session: z.ZodOptional<z.ZodString>; dispatch: z.ZodOptional<z.ZodString>; notify: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>>; suggestions: z.ZodArray<z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; kind: z.ZodString; title: z.ZodString; target: z.ZodObject<{ path: z.ZodOptional<z.ZodString>; repo: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; pid: z.ZodOptional<z.ZodNumber>; udid: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, z.core.$strip>; reason: z.ZodString; evidence: z.ZodArray<z.ZodString>; sizeBytes: z.ZodOptional<z.ZodNumber>; actionLabel: z.ZodString; since: z.ZodString; pane: z.ZodOptional<z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; session: z.ZodOptional<z.ZodString>; dispatch: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; kept: z.ZodArray<z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; title: z.ZodString; target: z.ZodObject<{ path: z.ZodOptional<z.ZodString>; repo: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; pid: z.ZodOptional<z.ZodNumber>; udid: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, z.core.$strip>; reason: z.ZodString; }, z.core.$strip>>; cleaned: z.ZodArray<z.ZodObject<{ id: z.ZodString; at: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; kind: z.ZodString; title: z.ZodString; target: z.ZodObject<{ path: z.ZodOptional<z.ZodString>; repo: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; pid: z.ZodOptional<z.ZodNumber>; udid: z.ZodOptional<z.ZodString>; name: z.ZodOptional<z.ZodString>; }, z.core.$strip>; freedBytes: z.ZodNumber; reportedBytes: z.ZodOptional<z.ZodNumber>; removedEntries: z.ZodOptional<z.ZodNumber>; by: z.ZodEnum<{ auto: "auto"; cli: "cli"; conductor: "conductor"; phone: "phone"; }>; }, z.core.$strip>>; dismissed: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; section: z.ZodEnum<{ kept: "kept"; suggestions: "suggestions"; warnings: "warnings"; }>; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; title: z.ZodString; dismissedAt: z.ZodString; }, z.core.$strip>>>; inventory: z.ZodOptional<z.ZodObject<{ collectedAt: z.ZodString; durationMs: z.ZodNumber; scanning: z.ZodOptional<z.ZodBoolean>; stale: z.ZodOptional<z.ZodBoolean>; worktrees: z.ZodArray<z.ZodObject<{ id: z.ZodString; repo: z.ZodString; branch: z.ZodOptional<z.ZodString>; path: z.ZodString; main: z.ZodBoolean; sizeBytes: z.ZodOptional<z.ZodNumber>; lastCommitAt: z.ZodOptional<z.ZodString>; dirty: z.ZodNumber; untracked: z.ZodNumber; unpushed: z.ZodNumber; stashes: z.ZodNumber; inProgress: z.ZodOptional<z.ZodString>; locked: z.ZodOptional<z.ZodLiteral<true>>; sessions: z.ZodArray<z.ZodObject<{ pane: z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>; agent: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; processes: z.ZodArray<z.ZodObject<{ pid: z.ZodNumber; command: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; action: z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>>; space: z.ZodArray<z.ZodObject<{ id: z.ZodString; area: z.ZodEnum<{ disk: "disk"; docker: "docker"; memory: "memory"; sessions: "sessions"; simulators: "simulators"; worktrees: "worktrees"; }>; kind: z.ZodString; title: z.ZodString; path: z.ZodOptional<z.ZodString>; udid: z.ZodOptional<z.ZodString>; sizeBytes: z.ZodNumber; lastUsedAt: z.ZodOptional<z.ZodString>; inUse: z.ZodOptional<z.ZodString>; note: z.ZodOptional<z.ZodString>; action: z.ZodOptional<z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; }, z.core.$strip>>; sessions: z.ZodArray<z.ZodObject<{ id: z.ZodString; pane: z.ZodObject<{ target: z.ZodObject<{ server: z.ZodString; workspace: z.ZodOptional<z.ZodString>; tab: z.ZodOptional<z.ZodString>; pane: z.ZodString; }, z.core.$loose>; label: z.ZodOptional<z.ZodString>; }, z.core.$strip>; agent: z.ZodOptional<z.ZodString>; title: z.ZodOptional<z.ZodString>; project: z.ZodOptional<z.ZodString>; status: z.ZodOptional<z.ZodString>; idleSeconds: z.ZodOptional<z.ZodNumber>; cwd: z.ZodOptional<z.ZodString>; dispatch: z.ZodOptional<z.ZodString>; role: z.ZodOptional<z.ZodString>; receipt: z.ZodOptional<z.ZodObject<{ id: z.ZodString; returnRead: z.ZodBoolean; }, z.core.$strip>>; action: z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>>; processes: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; name: z.ZodString; pid: z.ZodNumber; processes: z.ZodNumber; cpuPercent: z.ZodNumber; memoryBytes: z.ZodNumber; swapBytes: z.ZodOptional<z.ZodNumber>; startedAt: z.ZodOptional<z.ZodString>; command: z.ZodString; pane: z.ZodOptional<z.ZodObject<{ server: z.ZodString; pane: z.ZodString; label: z.ZodOptional<z.ZodString>; agent: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; action: z.ZodObject<{ id: z.ZodString; kind: z.ZodString; label: z.ZodString; allowed: z.ZodBoolean; reason: z.ZodOptional<z.ZodString>; confirm: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>>>; errors: z.ZodOptional<z.ZodArray<z.ZodObject<{ check: z.ZodString; message: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>; errors: z.ZodOptional<z.ZodArray<z.ZodObject<{ check: z.ZodString; message: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>; export declare const approveResultSchema: z.ZodObject<{ results: z.ZodArray<z.ZodObject<{ id: z.ZodString; status: z.ZodEnum<{ done: "done"; failed: "failed"; gone: "gone"; refused: "refused"; started: "started"; }>; reason: z.ZodOptional<z.ZodString>; freedBytes: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; revision: z.ZodString; }, z.core.$strip>; export declare const badgeSchema: z.ZodObject<{ revision: z.ZodString; warnings: z.ZodNumber; suggestions: z.ZodNumber; worst: z.ZodNullable<z.ZodEnum<{ high: "high"; info: "info"; warn: "warn"; }>>; freedTodayBytes: z.ZodNumber; }, z.core.$strip>; export type HousekeepingView = z.infer<typeof viewSchema>; export type Warning = z.infer<typeof warningSchema>; export type Suggestion = z.infer<typeof suggestionSchema>; export type Kept = z.infer<typeof keptSchema>; export type Cleaned = z.infer<typeof cleanedSchema>; export type ApproveResult = z.infer<typeof approveResultSchema>; export type Badge = z.infer<typeof badgeSchema>; export type InventoryView = z.infer<typeof inventorySchema>; export type ItemTarget = z.infer<typeof targetSchema>; export type PaneLink = z.infer<typeof paneSchema>; /** What a check proposes. */ export interface ItemDraft { section: Section; area: Area; kind: ItemKind; title: string; /** Plain sentence: why (a suggestion's or kept item's reason, a warning's detail). */ reason: string; target: ItemTarget; /** The state that, when it changes, makes this a new item (new id, dismissal lapses). */ fingerprint: string; /** A fixed id (machine-health findings keep theirs); otherwise derived from kind, target and fingerprint. */ id?: string; severity?: Severity; fix?: string; evidence?: string[]; sizeBytes?: number; action?: ActionKind; actionLabel?: string; blockers?: Blocker[]; notify?: boolean; pane?: PaneLink; session?: string; dispatch?: string; } export interface StoredItem extends ItemDraft { id: string; since: string; } export interface StoredReport { version: 1; id: string; computer: string; generatedAt: string; trigger: Trigger; durationMs: number; health: HousekeepingView["health"]; items: StoredItem[]; errors?: Array<{ check: string; message: string; }>; } export declare function itemId(kind: ItemKind, target: ItemTarget, fingerprint: string): string; /** Only a cache may be cleaned without the owner; anything else proposing `auto` becomes a suggestion. */ export declare function clampSection(kind: ItemKind, section: Section): Section; export declare function healthOf(resources: ComputerResources): HousekeepingView["health"]; export declare function buildReport(input: { computer: string; trigger: Trigger; startedAt: number; finishedAt: number; drafts: ItemDraft[]; previous?: StoredReport; health: HousekeepingView["health"]; errors?: StoredReport["errors"]; }): StoredReport; /** The phone's view: dismissed items left out (listed when asked), cleaned from the log, a revision over all of it. */ export declare function viewOf(report: StoredReport, options: { cleaned: Cleaned[]; dismissed: Map<string, { fingerprint: string; at: string; }>; includeDismissed?: boolean; nextCheckAt?: string; inventory?: { collectedAt: string; scanning?: boolean; ids: string[]; }; include?: InventoryView; }): HousekeepingView; export declare function badgeOf(view: HousekeepingView, now: number): Badge; export {};