/** * Run an agent's tools on a compute provider. * * `toolsRunOn` was already wired end to end -- resolvePlacement picks a place, * Agent.invokeTool routes through it -- but the registry `registerToolPlace` * fills was EMPTY. The mechanism existed and nothing populated it, which is why * the option sat in the behaviour ledger as unhonoured. * * This registers the compute providers as tool places: * * new Agent({ instructions: '...', toolsRunOn: 'docker', tools: [...] }) * * A tool that runs elsewhere must be something the other side can execute. A * JavaScript closure cannot cross that boundary, so a tool is dispatched * remotely only when it declares a `command` -- otherwise it runs locally and * says so, rather than pretending isolation it does not have. */ import { type ToolPlaceLike } from '../agent/features/placement'; import { type ComputeProvider } from './types'; /** A tool that can run on a compute provider declares how to invoke itself. */ export interface RemotableTool { /** Shell command template. `{{arg}}` placeholders are filled from args. */ command?: string; } export declare class ComputeToolPlace implements ToolPlaceLike { readonly placeName: string; private provider; private instance; private commands; private warnedHostFallback; constructor(provider: ComputeProvider, commands?: Record); /** Declare how a named tool is invoked on the far side. */ setCommand(toolName: string, command: string): void; private ensureInstance; runTool(toolName: string, args: Record, localImplementation: () => Promise): Promise; shutdown(): Promise; } /** * Make the compute providers selectable as `toolsRunOn` values. * * Idempotent, and called on import of `praisonai/compute`, so the registry is * populated by the act of having providers rather than by a caller remembering * a setup step. */ export declare function registerComputeToolPlaces(): void;