Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

1.8 KB
Raw Blame
import type {
  ChatAttachment as ContractChatAttachment,
  ChatImageAttachment as ContractChatImageAttachment,
  OrchestrationCheckpointFile,
  OrchestrationCheckpointSummary,
  OrchestrationLatestTurn,
  OrchestrationMessage,
  OrchestrationSession,
  ProjectScript as ContractProjectScript,
  ProviderInteractionMode,
  RuntimeMode,
} from "@akeru/contracts";
import type {
  EnvironmentProject,
  EnvironmentThread,
  EnvironmentThreadShell,
} from "@akeru/client-runtime/state/shell";

export type SessionPhase = "disconnected" | "connecting" | "ready" | "running";

export const DEFAULT_RUNTIME_MODE: RuntimeMode = "full-access";

export const DEFAULT_INTERACTION_MODE: ProviderInteractionMode = "default";

export const DEFAULT_THREAD_TERMINAL_HEIGHT = 280;

export const DEFAULT_THREAD_TERMINAL_ID = "term-1";

export const MAX_TERMINALS_PER_GROUP = 4;

export type ProjectScript = ContractProjectScript;

export interface ThreadTerminalGroup {
  id: string;
  terminalIds: string[];
  splitDirection?: "horizontal" | "vertical";
}

export interface ChatImageAttachment extends ContractChatImageAttachment {
  readonly previewUrl?: string;
}

export type ChatAttachment = ContractChatAttachment & { readonly previewUrl?: string };

export interface ChatMessage extends Omit<OrchestrationMessage, "attachments"> {
  readonly attachments?: ReadonlyArray<ChatAttachment> | undefined;
}

export type TurnDiffFileChange = OrchestrationCheckpointFile;

export type TurnDiffSummary = OrchestrationCheckpointSummary;

export type Project = EnvironmentProject;

export type Thread = EnvironmentThread;

export type ThreadShell = EnvironmentThreadShell;

export interface ThreadTurnState {
  latestTurn: OrchestrationLatestTurn | null;
}

export type SidebarThreadSummary = EnvironmentThreadShell;

export type ThreadSession = OrchestrationSession;