import { APIResource } from "../core/resource.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; export declare class Environments extends APIResource { /** * Get a specific environment connection by deviceId */ retrieve(deviceID: string, options?: RequestOptions): APIPromise; /** * List all active environment connections for the organization */ list(query?: EnvironmentListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Send a message to a specific environment connection */ sendMessage(connectionID: string, body: EnvironmentSendMessageParams, options?: RequestOptions): APIPromise; } export interface EnvironmentRetrieveResponse { id: string; connectedAt: number | null; connectionId: string | null; connectionName: string; deviceId: string; firstSeenAt: number; lastHeartbeat: number | null; lastSeenAt: number; organizationId: string; podId: string | null; apiKeyOwner?: string; currentMode?: 'default' | 'standard' | 'acceptEdits' | 'bypassPermissions' | 'unrestricted'; metadata?: EnvironmentRetrieveResponse.Metadata; userId?: string; } export declare namespace EnvironmentRetrieveResponse { interface Metadata { gitBranch?: string; lettaCodeVersion?: string; nodeVersion?: string; os?: string; workingDirectory?: string; [k: string]: unknown; } } export interface EnvironmentListResponse { connections: Array; hasNextPage: boolean; } export declare namespace EnvironmentListResponse { interface Connection { id: string; connectedAt: number | null; connectionId: string | null; connectionName: string; deviceId: string; firstSeenAt: number; lastHeartbeat: number | null; lastSeenAt: number; organizationId: string; podId: string | null; apiKeyOwner?: string; currentMode?: 'default' | 'standard' | 'acceptEdits' | 'bypassPermissions' | 'unrestricted'; metadata?: Connection.Metadata; userId?: string; } namespace Connection { interface Metadata { gitBranch?: string; lettaCodeVersion?: string; nodeVersion?: string; os?: string; workingDirectory?: string; [k: string]: unknown; } } } export interface EnvironmentSendMessageResponse { message: string; success: boolean; } export interface EnvironmentListParams { after?: string; limit?: string; onlineOnly?: string; source?: 'local' | 'remote'; userId?: string; } export interface EnvironmentSendMessageParams { messages: Array; agentId?: string; conversationId?: string | null; } export declare namespace EnvironmentSendMessageParams { interface UnionMember0 { client_message_id: string; content: string | Array; role: 'user'; otid?: string; } namespace UnionMember0 { interface UnionMember1 { text: string; type: 'text'; } } interface UnionMember1 { approvals: Array; type: 'approval'; } namespace UnionMember1 { interface UnionMember0 { status: 'success' | 'error'; tool_call_id: string; tool_return: string | Array; stderr?: Array | null; stdout?: Array | null; type?: 'tool'; } namespace UnionMember0 { interface UnionMember1 { text: string; type: 'text'; } } interface UnionMember1 { approve: boolean; tool_call_id: string; reason?: string | null; type?: 'approval'; updated_input?: { [key: string]: unknown; } | null; } } } export declare namespace Environments { export { type EnvironmentRetrieveResponse as EnvironmentRetrieveResponse, type EnvironmentListResponse as EnvironmentListResponse, type EnvironmentSendMessageResponse as EnvironmentSendMessageResponse, type EnvironmentListParams as EnvironmentListParams, type EnvironmentSendMessageParams as EnvironmentSendMessageParams, }; } //# sourceMappingURL=environments.d.mts.map