/** * BlockRun agent-market client — the shared engine behind the `/market` * slash command (a human browsing + hiring talent) and the agent_talent * tool (the agent hiring talent autonomously, mid-task). * * The market is business.blockrun.ai: a catalog of paid AI skills, each * runnable for ONE standard single-leg `exact` x402 USDC payment on Base. * Discovery is a free public GET; running a skill is a paid POST that * answers a 402 challenge with a wallet-signed payment — the same dance as * the gateway capability in src/tools/blockrun.ts, only the payment header * name (`x-payment`) and the base URL differ. * * Base-only by design: the market settles USDC on Base, so a hire always * pays from the EVM wallet (getOrCreateWallet) regardless of the session's * configured chain. */ export interface MarketSkill { slug: string; name: string; description: string; price_usd: number; backing_model: string; run_count: number; execution_type: 'prompt' | 'agent' | string; /** Live-data hostnames an `agent` skill fetches at run time (empty for `prompt`). */ data_sources: string[]; sample_input?: string; sample_output?: string; creator: { wallet: string; x: string | null; }; run_url: string; } /** GET the public catalog. No payment. Optional client-side keyword filter. */ export declare function fetchCatalog(opts?: { limit?: number; query?: string; signal?: AbortSignal; }): Promise; /** Filter the catalog by the fields a buyer searches on (AND over terms). */ export declare function filterCatalog(skills: MarketSkill[], query: string): MarketSkill[]; export interface RunOutcome { ok: boolean; status: number; result?: string; /** USD authorized on the paid attempt (0 if unpaid / pre-payment 4xx). */ paidUsd: number; txHash: string | null; error?: string; } /** * Hire a skill: POST the input, answer the 402 with a signed payment, retry, * return the result. Fails closed — the marketplace settles ONLY on a * successful run, so any non-2xx means the wallet was not charged. */ export declare function runMarketSkill(slug: string, input: string, opts?: { signal?: AbortSignal; timeoutMs?: number; runUrl?: string; maxUsd?: number; }): Promise; export declare function fmtUsd(n: number): string; /** A compact numbered list for the terminal (one row per skill). */ export declare function formatCatalogList(skills: MarketSkill[], opts?: { heading?: string; }): string; /** A fuller detail card for a single skill (shown by `/market info`). */ export declare function formatSkillCard(s: MarketSkill): string;