import type { NetworkId } from "../chains/index.js"; import type { HttpClient } from "../http.js"; import type { EventBus } from "../events.js"; import type { AgentApprovalResponse, AgentConnectorDecisionInput, AgentConnectorDecisionResponse, AgentDecisionInput, AgentRunStateResponse, AgentStreamCreateParams, AgentWatchParams, X402PaymentSigner } from "../types/index.js"; import { type RunEvent, type StreamResult } from "@compose-market/core/sse/stream"; import { type CallOptions } from "./inference.js"; export interface AgentContext { baseUrl: string; http: HttpClient; getWalletMaybe: () => { address: string | null; network: NetworkId | null; }; getTokenMaybe: () => string | null; getX402SignerMaybe?: () => X402PaymentSigner | null; events: EventBus; userAgent: string; } export declare class Agent { private readonly ctx; constructor(ctx: AgentContext); stream(params: AgentStreamCreateParams, options?: CallOptions): AsyncGenerator; /** * Durable run state for reattach/resume: the thread's current plan state * machine (plan + connector requests) when present, otherwise the * Temporal projection. */ runState(params: { agentWallet: string; runId: string; threadId: string; }): Promise; /** * Watch a run's plan lifecycle over SSE: snapshot of the current * proposal and connector requests, durable child-event replay, then * live transitions until the plan reaches a terminal state or the * watch times out. Unpaid — observation only. */ watch(params: AgentWatchParams, options?: CallOptions): AsyncGenerator; stop(params: { agentWallet: string; runId: string; threadId?: string; }): Promise<{ stopped: boolean; }>; decide(params: AgentDecisionInput): Promise; decideConnector(params: AgentConnectorDecisionInput): Promise; } export type { AgentConnectorDecisionInput, AgentDecisionInput, AgentRunStateResponse, AgentStreamCreateParams, AgentWatchParams, RunEvent }; //# sourceMappingURL=agent.d.ts.map