Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

567 B
Raw Blame
import { z } from "zod";
import { CanonicalTimeSchema } from "../core/boundaries.ts";
import { IdSchema } from "../core/ids.ts";

/** Host power facts persisted by the kernel; routine policy may consume them but does not own them. */
export const PowerEventKindSchema = z.enum([
  "suspend",
  "resume",
  "start",
  "on-ac",
  "on-battery",
  "lock-screen",
  "unlock-screen",
]);
export const PowerEventSchema = z.strictObject({
  id: IdSchema,
  kind: PowerEventKindSchema,
  at: CanonicalTimeSchema,
});
export type PowerEvent = z.infer<typeof PowerEventSchema>;