@cavi-ai/api-client/providers/agy
Package subpath: ./providers/agy
AGY_PROVIDER_MODULE#
Kind: variable
export declare const AGY_PROVIDER_MODULE: RuntimeProviderModule;AGY_RUNTIME_SUPPORT#
Kind: variable
/**
* Antigravity (agy) orchestration supports runs and streaming.
* Batching is optional and omitted for the initial implementation.
*/
export declare const AGY_RUNTIME_SUPPORT: {
readonly runs: true;
readonly streaming: true;
};AgyApiClient#
Kind: class
export declare class AgyApiClient extends BaseHttpApiClient implements RuntimeClient {
readonly request: HttpApiTransport;
private readonly defaultModel?;
private readonly runStore;
constructor(options: AgyApiClientOptions);
getRuntimeCapabilities(): Promise<RuntimeCapabilities>;
startRun(body: RuntimeRunStartBody): Promise<RuntimeRunStatus>;
streamRun(body: RuntimeRunStartBody, handlers: RunEventStreamHandlers, options?: {
signal?: AbortSignal;
}): Promise<void>;
getRun(runId: string): Promise<RuntimeRunStatus>;
cancelRun(runId: string): Promise<{
status: string;
}>;
}AgyApiClientOptions#
Kind: type
export type AgyApiClientOptions = {
/** Antigravity Orchestration API key. */
apiKey?: string;
baseUrl?: string;
defaultModel?: string;
fetchImpl?: typeof fetch;
onTrace?: HttpApiClientOptions["onTrace"];
};AgyGenerateResponse#
Kind: interface
/**
* Standard shape of an Antigravity orchestration synchronous response.
*/
export interface AgyGenerateResponse {
run_id?: string;
status?: string;
result?: {
output?: string;
artifacts?: string[];
};
}AgyRunRequestBody#
Kind: interface
/**
* The standard request payload structure for Antigravity (AGY) orchestration APIs.
*/
export interface AgyRunRequestBody {
agent_id: string;
instructions?: string;
context?: Record<string, unknown>;
stream?: boolean;
}buildAgyRequestBody#
Kind: function
/**
* Builds the Antigravity request body from the universal run-start body.
* Maps universal concepts (model -> agent_id, instructions -> instructions)
* to the AGY orchestration surface.
*/
export declare function buildAgyRequestBody(body: RuntimeRunStartBody, defaultAgentId?: string, stream?: boolean): {
agentId: string;
payload: AgyRunRequestBody;
};createAgyProviderModule#
Kind: function
export declare function createAgyProviderModule(config?: AgyApiClientOptions): RuntimeProviderModule;mapAgyResponseToRunStatus#
Kind: function
/**
* Maps an AGY orchestration response back to the universal RuntimeRunStatus contract.
*/
export declare function mapAgyResponseToRunStatus(agentId: string, response: AgyGenerateResponse, fallbackRunId: string): RuntimeRunStatus;