AI Traffic Inspector Schemas (schemas/inspector.ts)

AIRoute · src/shared/schemas/inspector.ts · typescript · Apache-2.0
ai, dev-tools, fw:zod, tag:inspector

Zod validation schemas for an LLM traffic inspector, covering session management, capture modes, proxy config, and TLS interception.

// Source: https://github.com/jaccen/AIRoute | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from "zod";

export const InspectorCustomHostSchema = z.object({
  host: z.string().min(1),
  enabled: z.boolean().default(true),
  label: z.string().nullable().optional(),
  kind: z.enum(["llm", "app", "custom"]).default("custom"),
});

export const InspectorSessionStartSchema = z.object({ name: z.string().optional() });

export const InspectorSessionPatchSchema = z.object({
  action: z.enum(["stop", "rename"]),
  name: z.string().optional(),
});

export const InspectorCaptureModeActionSchema = z.object({
  action: z.enum(["start", "stop"]),
});

export const InspectorSystemP

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key