@luxorai/sandbox
Version:
TypeScript SDK for Luxor Sandbox: cloud sandboxes (microVMs) for AI agents on Luxor Agent Cloud
35 lines (34 loc) • 1.5 kB
TypeScript
import type { Client } from "@connectrpc/connect";
import { type SSHGatewayClientService } from "./internal/proto/tenki/sandbox/v1/ssh_gateway_client_pb.js";
export interface SSHCertPermissions {
allowPty: boolean;
allowAgentForwarding: boolean;
allowPortForwardingLocal: boolean;
allowPortForwardingRemote: boolean;
allowX11Forwarding: boolean;
}
export interface SSHCert {
/**
* OpenSSH cert in authorized_keys format (begins with
* "ssh-ed25519-cert-v01@openssh.com"). Write it to disk alongside the
* private key as `<key>-cert.pub` so ssh auto-loads it, or pass it via
* `-o CertificateFile=`.
*/
sshCert: string;
/** User-CA public key for known_hosts pinning. */
caPub: string;
/**
* Whether the client should verify the gateway host certificate against
* caPub. False on engines that predate the field.
*/
pinHostKey?: boolean;
/** Hex-encoded serial, for audit/revocation correlation. */
certSerial: string;
/** Absolute expiry; new authentication attempts fail after this time. */
expiresAt?: Date;
/** Elapsed-time hint after issuance for minting a cert for a later connection. */
renewalAfterMs?: number;
/** Resolved permissions echoed from issuance policy. */
permissions?: SSHCertPermissions;
}
export declare function issueSandboxSSHCert(gatewayClient: Client<typeof SSHGatewayClientService>, sessionId: string, publicKey: string, ttlMs?: number): Promise<SSHCert>;