//#region src/integrations/claude-agent-sdk.d.ts
/**
 * Claude Agent SDK integration for @amplitude/ai.
 *
 * Provides {@link ClaudeAgentSDKTracker} — a convenience adapter that
 * hooks into the Claude Agent SDK (`@anthropic-ai/claude-agent-sdk`) and
 * automatically emits the correct Amplitude `[Agent] *` events.
 *
 * No runtime dependency on `@anthropic-ai/claude-agent-sdk` — all types
 * are structural (optional peer dependency pattern).
 *
 * @example
 * ```typescript
 * import { AmplitudeAI } from '@amplitude/ai';
 * import { ClaudeAgentSDKTracker } from '@amplitude/ai/integrations/claude-agent-sdk';
 *
 * const ai = new AmplitudeAI({ apiKey: '...' });
 * const agent = ai.agent('my-agent');
 * const tracker = new ClaudeAgentSDKTracker();
 *
 * const session = agent.session({ userId: 'u1' });
 * await session.run(async (s) => {
 *   const agentOptions = {
 *     hooks: tracker.hooks(s),
 *     // ...other options
 *   };
 *   for await (const message of query(agentOptions)) {
 *     tracker.process(s, message);
 *   }
 * });
 * ```
 */
type HookFn = (inputData: Record<string, unknown>, toolUseId: string | null, context: Record<string, unknown>) => Promise<Record<string, unknown>>;
interface SessionLike {
  trackToolCall(toolName: string, latencyMs: number, success: boolean, opts?: Record<string, unknown>): string;
  trackAiMessage(content: string, model: string, provider: string, latencyMs: number, opts?: Record<string, unknown>): string;
  trackUserMessage(content: string, opts?: Record<string, unknown>): string;
}
interface ClaudeAgentSDKTrackerOptions {
  defaultProvider?: string;
  defaultModel?: string;
}
declare class ClaudeAgentSDKTracker {
  private _defaultProvider;
  private _defaultModel;
  private _toolTimers;
  constructor(options?: ClaudeAgentSDKTrackerOptions);
  /**
   * Returns hooks dict ready to pass to `ClaudeAgentOptions`.
   *
   * @param session - An active `@amplitude/ai` Session (from `agent.session()`)
   */
  hooks(session: SessionLike): Record<string, Array<{
    matcher: string | null;
    hooks: Array<HookFn>;
  }>>;
  /**
   * Process a message from the Claude Agent SDK `query()` stream.
   *
   * Dispatches based on message constructor name or `role` field and
   * emits the appropriate Amplitude event via the session.
   *
   * @param session - An active `@amplitude/ai` Session
   * @param message - A message yielded by `query()`
   */
  process(session: SessionLike, message: unknown): void;
  private _makePreToolHook;
  private _makePostToolHook;
  private _processAssistantMessage;
  private _processUserMessage;
}
//#endregion
export { ClaudeAgentSDKTracker, ClaudeAgentSDKTrackerOptions };
//# sourceMappingURL=claude-agent-sdk.d.ts.map