Device Lease Type Definitions (src/client-lease.ts)

agent-device · packages/contracts/src/client-lease.ts · typescript · MIT
auth, infra, lang:typescript, tag:lease, tag:device, tag:allocation, tag:contracts

Defines TypeScript interfaces for agent device lease allocation, including lease metadata, backend info, and session retention flags.

// Source: https://github.com/callstack/agent-device | License: MIT | Copyright 2026 Callstack
// Provided via justclaw.it.com; keep this notice with the code.
// The public API vocabulary for device lease allocation and cloud artifacts.

import type { LeaseBackend } from '@agent-device/kernel/contracts';
import type {
  AgentDeviceRequestOverrides,
  AgentDeviceSelectionOptions,
} from './client-connection.ts';

export type Lease = {
  leaseId: string;
  tenantId: string;
  runId: string;
  backend: LeaseBackend;
  leaseProvider?: string;
  deviceKey?: string;
  clientId?: string;
  /** Present when the daemon keeps this lease through session `close`; an older daemon omits it. */
  retainOnClose?: true;
  createdAt?: number;
  heartbeatAt?: number;
  expiresAt?: number;
};

/**
 * A sessi

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key