import type { HttpClient, RequestOptions } from "../http.js"; import type { AgentDownloadLink, AgentRequest, AgentRequestList, MachineShareResult } from "../types.js"; /** * Files fetched from the caller's own machine. * * A request is asked for on one surface, approved by a person, carried out by * an agent on their laptop, and finishes with the bytes in storage. Everything * up to that point was already visible through the API; `downloadLink` is what * makes the result retrievable rather than merely describable. */ export declare class Agent { #private; constructor(http: HttpClient); /** The row, including whether it finished and how large the result is. */ request(id: string, options?: RequestOptions): Promise; /** * A short-lived link to the bytes of a finished request. * * Returns the URL rather than the file, and that is a deliberate limit of * this package rather than an oversight. The transport under every other * method parses JSON, retries, and attaches the API key; none of those is * right for a hundred-megabyte binary body, and building a second request * path inside the SDK to serve one method is how a client ends up with two * retry policies that differ only during an outage. Fetch the URL with * whatever already streams in your runtime - it needs no credential, which * is the whole reason it is signed. * * Treat the URL as the file. It is a bearer credential for exactly one * object, it expires in minutes, and it should not be logged or stored. */ downloadLink(id: string, options?: RequestOptions): Promise; /** * A Space's requests — what the project has in flight and what came back, * whoever raised it and whichever machine answered. For an editor or owner * of the Space; a viewer, and anybody not in it, is answered 404. */ spaceRequests(spaceId: string, options?: RequestOptions): Promise; /** * Shares one of your own machines into a Space, so the Space's editors can * ask it for files and commands. Every such ask waits for you, the * machine's owner, whatever your own approval settings say. Session * credentials only. */ shareMachine(args: { hostname: string; space: string; }, options?: RequestOptions): Promise; /** Takes a machine back out of a Space. Requests already answered stay answered. */ unshareMachine(args: { hostname: string; space: string; }, options?: RequestOptions): Promise; }