/**
 * Pi Goals Integration for Bolloon
 *
 * Provides persistent goal tracking and workflow orchestration.
 * Based on pi-goals philosophy: goal-oriented agent workflows with budget enforcement.
 *
 * Key features:
 * - Persistent goal state across sessions
 * - Goal queue with FIFO execution
 * - Budget enforcement (max time/tokens, min work thresholds)
 * - Workflow templates with {{args}} placeholders
 * - Churn monitoring to detect drift/stalling
 */
export interface Goal {
    id: string;
    objective: string;
    status: GoalStatus;
    createdAt: string;
    startedAt?: string;
    completedAt?: string;
    budget?: GoalBudget;
    result?: string;
    error?: string;
    summary?: string;
    metadata?: Record<string, unknown>;
}
export type GoalStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'paused' | 'cutoff';
export interface GoalBudget {
    maxTimeMs: number;
    maxTokens: number;
    minWorkMs?: number;
    minTokens?: number;
}
export interface GoalQueue {
    goals: Goal[];
    currentIndex: number;
}
export interface WorkflowTemplate {
    name: string;
    description?: string;
    goals: string[];
    args?: Record<string, {
        description?: string;
        default?: string;
    }>;
    gate?: string;
}
export interface ChurnEvent {
    goalId: string;
    type: 'drift' | 'stall' | 'repeat';
    message: string;
    timestamp: string;
}
/**
 * Create a new goal
 */
export declare function createGoal(objective: string, budget?: GoalBudget, metadata?: Record<string, unknown>): Promise<Goal>;
/**
 * Create a queue of goals
 */
export declare function createGoalQueue(objectives: string[], budgets?: GoalBudget[]): Promise<Goal[]>;
/**
 * Get current goal
 */
export declare function getCurrentGoal(): Goal | undefined;
/**
 * Start current goal
 */
export declare function startCurrentGoal(): Promise<Goal | undefined>;
/**
 * Complete current goal with result
 */
export declare function completeCurrentGoal(result?: string): Promise<Goal | undefined>;
/**
 * Fail current goal
 */
export declare function failCurrentGoal(error: string): Promise<Goal | undefined>;
/**
 * Cutoff current goal (exceeded budget)
 */
export declare function cutoffCurrentGoal(reason: string): Promise<Goal | undefined>;
/**
 * Pause current goal
 */
export declare function pauseCurrentGoal(): Promise<Goal | undefined>;
/**
 * Check budget for a goal
 */
export declare function checkBudget(goal: Goal, elapsedMs?: number, tokensUsed?: number): {
    exceeded: boolean;
    reason?: string;
};
/**
 * Get churn events for current goal
 */
export declare function getChurnForGoal(goalId: string): ChurnEvent[];
/**
 * Get goal statistics
 */
export declare function getGoalStats(): {
    total: number;
    pending: number;
    inProgress: number;
    completed: number;
    failed: number;
    paused: number;
    cutoff: number;
};
/**
 * Get queue summary
 */
export declare function getQueueSummary(): string;
/**
 * Load goals from disk
 */
export declare function loadGoals(): Promise<void>;
/**
 * Clear all goals
 */
export declare function clearGoals(): Promise<void>;
/**
 * Remove completed goals and compact queue
 */
export declare function compactQueue(): Promise<void>;
/**
 * Load workflow templates
 */
export declare function loadTemplates(): Promise<WorkflowTemplate[]>;
/**
 * Create goals from a template
 */
export declare function createFromTemplate(templateName: string, args: Record<string, string>): Promise<Goal[]>;
/**
 * Continue working on current goal (anti-stall)
 */
export declare function nudgeCurrentGoal(): Promise<Goal | undefined>;
