import type { ResourceRef } from "@stigmer/sdk";
/** Return value of {@link useAgentRefFromSession}. */
export interface UseAgentRefFromSessionReturn {
    /** Resolved agent reference, or `null` while loading or on error. */
    readonly agentRef: ResourceRef | null;
    /** `true` while the chained lookups are in flight. */
    readonly isLoading: boolean;
    /** Error from the last failed lookup, or `null` when healthy. */
    readonly error: Error | null;
}
/**
 * Derives an {@link ResourceRef} for the agent used by a session,
 * given the session's `agentInstanceId`.
 *
 * Chains two lookups:
 * 1. `agentInstance.get(instanceId)` → `spec.agentId`
 * 2. `agent.get(agentId)` → `metadata.org` + `metadata.slug`
 *
 * Pass `null` or empty string to skip (stable no-op). The hook
 * re-derives when `instanceId` changes and discards stale in-flight
 * requests via cancellation.
 *
 * @example
 * ```tsx
 * const { agentRef, isLoading } = useAgentRefFromSession(
 *   session?.spec?.agentInstanceId ?? null,
 * );
 * ```
 */
export declare function useAgentRefFromSession(instanceId: string | null | undefined): UseAgentRefFromSessionReturn;
//# sourceMappingURL=useAgentRefFromSession.d.ts.map