src/types.ts

spectyra · packages/shared/src/types.ts · typescript · MIT
payments

types.ts from ImMrLucky/spectyra

// Source: https://github.com/ImMrLucky/spectyra | License: MIT | Copyright 2026 Kent Hamilton (Spectyra)
// Provided via justclaw.it.com; keep this notice with the code.
export type Path = "talk" | "code";
export type Mode = "baseline" | "optimized";
export type Provider = "openai" | "anthropic" | "gemini" | "grok";

/**
 * Provider interface for web UI (shows available providers)
 */
export interface ProviderInfo {
  name: string;
  models: string[];
  supportsUsage: boolean;
}

/**
 * Legacy Message type - for backward compatibility
 * Prefer ChatMessage for new code (supports tool role)
 */
export interface Message {
  role: "user" | "assistant" | "system";
  content: string;
}

/**
 * Canonical ChatMessage type - used across optimizer, SDK, and agents
 * Supports all message roles inc

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

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

Get a free API key