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.

718 B
Raw Blame
import { z } from "zod";

/** Fixed categories of a recognized command-sandbox block. */
export const SandboxBlockKindSchema = z.enum([
  "outside_workplace_write",
  "protected_name",
  "git_resource",
  "network",
  "local_service",
  "system_service",
  "protected_path",
  "credential_read",
  "protected_read",
  "other",
]);
export type SandboxBlockKind = z.infer<typeof SandboxBlockKindSchema>;

/** A listed command shape — program, optional fixed arguments, optional trailing `*`. */
export const OutsideCommandPatternSchema = z
  .string()
  .trim()
  .min(1)
  .max(200)
  .regex(/^[^\s*]+(?: [^\s*]+)*(?: \*)?$/);
export const OutsideCommandPatternsSchema = z.array(OutsideCommandPatternSchema).max(32);