/**
 * AgentTaskAdapter — bridges agent sessions (AgentOrchestrator / WRFC agents)
 * into the unified RuntimeTask registry.
 *
 * Each running agent gets a corresponding RuntimeTask of kind 'agent'. The
 * adapter maps agent lifecycle state strings to task lifecycle transitions.
 */
import type { RuntimeStore } from '../../store/index.js';
import type { AgentLifecycleState } from '@pellux/goodvibes-sdk/platform/runtime/store/domains/agents';
/** Owner context for an agent task. */
export interface AgentOwner {
    /** Session ID that spawned this agent. */
    sessionId: string;
}
/**
 * Bridges agent sessions into the RuntimeTask registry.
 *
 * @example
 * ```ts
 * const adapter = new AgentTaskAdapter(store);
 * const taskId = adapter.wrapAgent('agent_1', 'Fix the linting errors', { sessionId: 'sess_1' });
 * adapter.handleAgentStateChange('agent_1', 'running');
 * adapter.handleAgentStateChange('agent_1', 'completed');
 * ```
 */
export declare class AgentTaskAdapter {
    private readonly _store;
    /** Maps agent ID → task ID. */
    private readonly _agentToTask;
    /** Maps task ID → agent ID. */
    private readonly _taskToAgent;
    private readonly _dispatch;
    constructor(_store: RuntimeStore);
    /**
     * Wrap an agent session as a RuntimeTask.
     *
     * @param agentId - Unique agent ID from the agent system.
     * @param task - Human-readable description of what the agent is doing.
     * @param owner - Session that spawned this agent.
     * @returns The new task ID.
     */
    wrapAgent(agentId: string, task: string, owner: AgentOwner): string;
    /**
     * Handle an agent lifecycle state change and transition the task accordingly.
     *
     * @param agentId - The agent whose state changed.
     * @param state - New agent lifecycle state (AgentLifecycleState string).
     */
    handleAgentStateChange(agentId: string, state: AgentLifecycleState): void;
    /**
     * Cancel an agent task by task ID.
     * Marks the task as cancelled in the store. The caller is responsible for
     * actually stopping the agent session.
     *
     * @param taskId - The RuntimeTask ID to cancel.
     */
    cancelAgent(taskId: string): void;
    /**
     * Reconcile adapter state with an external agent registry snapshot.
     *
     * @param activeAgents - Current snapshot of active agents: agentId → task description.
     * @param owner - Default owner context for auto-wrapped agents.
     */
    sync(activeAgents: ReadonlyMap<string, string>, owner?: AgentOwner): void;
    private _upsertTask;
    private _transitionTask;
}
//# sourceMappingURL=agent-adapter.d.ts.map