import { type AutomationJob } from '../automation/jobs';
export type AgenticMode = 'build' | 'operate';
export interface AgenticModeClassification {
    mode: AgenticMode;
    reason: string;
    matchedTriggers: string[];
}
export interface AgenticServiceDefinition {
    service_id: string;
    service_name: string;
    mode: 'operate';
    purpose: string;
    persistent_state_schema: Record<string, unknown>;
    supported_commands: string[];
    schedules: Array<Record<string, unknown>>;
    reminder_rules: string[];
    notification_templates: Record<string, string>;
    state_transition_rules: string[];
    review_rules: string[];
    close_archive_rules: string[];
    user_interaction_examples: string[];
    safety_confirmation_rules: string[];
    storage_location: string;
    enable_disable_controls: string[];
    automation_job_id?: string;
    created_at: string;
    updated_at: string;
}
export interface BulletJournalTask {
    id: string;
    title: string;
    description: string;
    status: 'open' | 'closed';
    priority: 'low' | 'normal' | 'high';
    due_date: string | null;
    created_at: string;
    updated_at: string;
    closed_at: string | null;
    tags: string[];
    notes: string[];
}
export interface BulletJournalNote {
    id: string;
    content: string;
    created_at: string;
    updated_at: string;
    tags: string[];
    linked_task_id: string | null;
}
export interface BulletJournalState {
    service_id: 'bullet_journal';
    mode: 'operate';
    tasks: BulletJournalTask[];
    notes: BulletJournalNote[];
    daily_logs: Array<Record<string, unknown>>;
    collections: Array<Record<string, unknown>>;
    closed_tasks: BulletJournalTask[];
    reminders: Array<Record<string, unknown>>;
    reviews: Array<Record<string, unknown>>;
    reminder_time: string;
    reminders_paused: boolean;
    enabled: boolean;
    created_at: string;
    updated_at: string;
}
export interface GenericOperateState {
    service_id: string;
    mode: 'operate';
    observations: Array<Record<string, unknown>>;
    tasks: Array<Record<string, unknown>>;
    notes: Array<Record<string, unknown>>;
    reminders: Array<Record<string, unknown>>;
    reviews: Array<Record<string, unknown>>;
    enabled: boolean;
    reminders_paused: boolean;
    created_at: string;
    updated_at: string;
}
export interface StoredAgenticService {
    service: AgenticServiceDefinition;
    state: BulletJournalState | GenericOperateState | Record<string, unknown>;
}
export interface AgenticServicesExport {
    version: 1;
    exported_at: string;
    source: 'ollama-agent-harness';
    services: StoredAgenticService[];
}
export interface ImportAgenticServicesResult {
    imported: string[];
    skipped: string[];
}
export interface OperateServiceResult {
    handled: boolean;
    response: string;
    classification: AgenticModeClassification;
    service?: AgenticServiceDefinition;
    state?: BulletJournalState | GenericOperateState;
    schedule?: AutomationJob | null;
    capabilityLimitations?: string | null;
}
export interface OperateHandlerOptions {
    /** Returns a human-readable limitation message for missing capabilities, or null. */
    checkCapabilities?: (required: string[]) => string | null;
}
export declare function classifyAgenticMode(message: string): AgenticModeClassification;
export declare function handleOperateModeRequest(projectDir: string, message: string, now?: Date, options?: OperateHandlerOptions): Promise<OperateServiceResult>;
export declare function createOrUpdateBulletJournalService(projectDir: string, input?: {
    reminderTime?: string;
}, now?: Date): Promise<{
    service: AgenticServiceDefinition;
    state: BulletJournalState;
    schedule: AutomationJob | null;
}>;
export declare function listAgenticServices(projectDir: string): Promise<StoredAgenticService[]>;
export declare function getAgenticService(projectDir: string, serviceId: string): Promise<StoredAgenticService | null>;
export declare function exportAgenticServices(projectDir: string, serviceIds?: string[], now?: Date): Promise<AgenticServicesExport>;
export declare function importAgenticServices(projectDir: string, payload: unknown, options?: {
    overwrite?: boolean;
}, now?: Date): Promise<ImportAgenticServicesResult>;
export declare function createOrUpdateGenericOperateService(projectDir: string, request: string, now?: Date): Promise<{
    service: AgenticServiceDefinition;
    state: GenericOperateState;
    schedule: AutomationJob | null;
}>;
//# sourceMappingURL=agenticServiceMode.d.ts.map