import type { Db } from "@rudderhq/db";
import type { AgentRunScene } from "@rudderhq/shared";
export declare const AGENT_STARTUP_CONTEXT_VERSION = "agent-startup-context/v1";
export declare const DEFAULT_AGENT_STARTUP_CONTEXT_LIMITS: {
    totalChars: number;
    memoryFileChars: number;
    issueSnippetChars: number;
    chatSnippetChars: number;
};
export type AgentStartupMemoryEntry = {
    dateKey: string;
    relativePath: string;
    content: string;
    existed: boolean;
    created: boolean;
    error?: string;
};
export type AgentStartupIssueEntry = {
    id: string;
    identifier: string | null;
    status: string;
    role: string;
    assignee: string | null;
    reviewer: string | null;
    title: string;
    snippet: string | null;
    createdAt: Date | string | null;
    updatedAt: Date | string | null;
};
export type AgentStartupChatEntry = {
    id: string;
    activityAt: Date | string | null;
    title: string;
    snippet: string | null;
};
export type AgentStartupContextPromptInput = {
    todayMemory: AgentStartupMemoryEntry;
    yesterdayMemory: AgentStartupMemoryEntry;
    recentIssues: AgentStartupIssueEntry[];
    recentChats: AgentStartupChatEntry[];
    metrics: {
        version: string;
        totalChars: number;
        limitChars: number;
        omittedIssues: number;
        omittedChats: number;
    };
};
export type AgentStartupContextLimits = Partial<typeof DEFAULT_AGENT_STARTUP_CONTEXT_LIMITS>;
export type BuildAgentStartupContextInput = {
    orgId: string;
    agentId: string;
    agentHome: string;
    memoryDir: string;
    scene: AgentRunScene;
    issueId?: string | null;
    projectId?: string | null;
    chatConversationId?: string | null;
    now?: Date;
};
export type AgentStartupContextBundle = {
    version: typeof AGENT_STARTUP_CONTEXT_VERSION;
    sections: string[];
    sourceRefs: Array<{
        kind: "memory" | "issue" | "chat";
        id: string;
        ref: string;
    }>;
    markdown: string;
    metrics: {
        version: typeof AGENT_STARTUP_CONTEXT_VERSION;
        totalChars: number;
        limitChars: number;
        recentIssuesCount: number;
        recentChatsCount: number;
        omittedIssues: number;
        omittedChats: number;
    };
    omissions: string[];
};
export declare function buildAgentStartupContextPrompt(input: AgentStartupContextPromptInput, limits?: AgentStartupContextLimits): string;
export declare function agentStartupContextService(db: Db): {
    buildForRun: (input: BuildAgentStartupContextInput) => Promise<AgentStartupContextBundle>;
};
//# sourceMappingURL=agent-startup-context.d.ts.map