import { FarmAgentRuntimeInstance, createAgentRuntimeIntegration } from '@farm.js/core/agent-runtime'; interface CloudflareAgentOutputOptions { root: string; outputDir: string; config: string; routePrefix: string; environment?: string; } interface CloudflareAgentDeployMetadata { version: 1; provider: "cloudflare-agents"; config: string; environment?: string; } interface CloudflareAgentOutput { wrapperPath: string; configPath: string; metadataPath: string; } /** Compose Farm's Cloudflare module output with a Cloudflare Agents Worker. */ declare function writeCloudflareAgentOutput(options: CloudflareAgentOutputOptions): Promise; interface CloudflareAgentDevOptions { /** Fixed Wrangler port. Farm chooses an available loopback port by default. */ port?: number; /** Run Wrangler against Cloudflare's remote development environment. */ remote?: boolean; /** Forward Wrangler output through Farm's logger. Defaults to true. */ logs?: boolean; /** Maximum time to wait for Wrangler. Defaults to 60 seconds. */ timeoutMs?: number; } interface CloudflareAgentOptions { /** Wrangler configuration, relative to farm.config.ts. Defaults to wrangler.jsonc. */ config?: string; /** Same-origin route owned by Cloudflare Agents. Defaults to /agents. */ routePrefix?: string; /** Use an already-running Workers runtime instead of starting Wrangler in development. */ origin?: string; /** Wrangler environment passed to development and deployment commands. */ environment?: string; /** Disable managed local development or configure the Wrangler process. */ dev?: false | CloudflareAgentDevOptions; } interface CloudflareAgentRuntime extends FarmAgentRuntimeInstance { readonly config: string; readonly environment?: string; } type BaseCloudflareAgentIntegration = ReturnType; type CloudflareAgentIntegration = Omit & { readonly instance: CloudflareAgentRuntime; }; /** * Runs Cloudflare Agents beside Farm in development and composes both into one Worker build. * * @example * integrations: { agent: cfAgent() } */ declare function cfAgent(options?: CloudflareAgentOptions): CloudflareAgentIntegration; declare function createWranglerDevArgs(input: { binary: string; config: string; port: number; remote?: boolean; environment?: string; }): string[]; declare function assertCloudflareAgentNodeVersion(version?: string): void; export { type CloudflareAgentDeployMetadata, type CloudflareAgentDevOptions, type CloudflareAgentIntegration, type CloudflareAgentOptions, type CloudflareAgentOutput, type CloudflareAgentOutputOptions, type CloudflareAgentRuntime, assertCloudflareAgentNodeVersion, cfAgent, createWranglerDevArgs, writeCloudflareAgentOutput };