AI Agent Type Definitions (types/index.ts)

autocontext · ts/src/types/index.ts · typescript · Apache-2.0
ai, lang:typescript, fw:zod, tag:validation

Provides Zod-validated schemas and TypeScript interfaces for AI agent tasks and image attachments. Use this to ensure type safety when building AI-driven agent workflows.

// Source: https://github.com/greyhaven-ai/autocontext | 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.
/**
 * Core types for autocontext — mirrors Python dataclasses with Zod validation.
 */

import { z } from "zod";

import type { ValidatedImageAttachment } from "./image-attachments.js";

export {
  IMAGE_ATTACHMENTS_CAPABILITY,
  ImageAttachmentListSchema,
  ImageAttachmentMediaTypeSchema,
  ImageAttachmentSchema,
  ImageAttachmentSourceSchema,
  ImageAttachmentValidationError,
  MAX_IMAGE_AGGREGATE_ENCODED_BYTES,
  MAX_IMAGE_ATTACHMENTS,
  MAX_IMAGE_DIMENSION,
  MAX_IMAGE_ENCODED_BYTES,
  MAX_IMAGE_RGBA_BYTES,
  MAX_IMAGE_SOURCE_BYTES,
  encodeValidatedImage,
  validateImageAtt

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

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

Get a free API key