UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

42 lines (41 loc) • 1.7 kB
/** Validates international syntax and the fixed-length North American numbering plan. */ export declare function validatePhotonPhoneNumber(value: string): string | null; export interface PhotonManagedProject { projectId: string; projectSecret: string; assignedPhoneNumber?: string; /** Deletes the dedicated project when a later setup phase fails. */ cleanup(): Promise<void>; } export interface PhotonDeviceAuthorization { userCode: string; verificationUrl: string; } export interface ProvisionPhotonProjectOptions { projectName: string; phoneNumber: string; onAuthorization(authorization: PhotonDeviceAuthorization): void; signal?: AbortSignal; deps?: PhotonManagementDeps; } export interface UsePhotonProjectOptions { projectId: string; projectSecret: string; dedicatedLine?: string; phoneNumber?: string; deps?: PhotonManagementDeps; } export interface PhotonManagementDeps { fetch: typeof fetch; delay(ms: number, signal?: AbortSignal): Promise<void>; } /** Returns the least-loaded dedicated iMessage line, when the project has one. */ export declare function findDedicatedPhotonLine(input: { projectId: string; projectSecret: string; deps?: Pick<PhotonManagementDeps, "fetch">; }): Promise<string | undefined>; /** Authorizes Photon and creates an isolated iMessage project for one eve agent. */ export declare function provisionPhotonProject(options: ProvisionPhotonProjectOptions): Promise<PhotonManagedProject>; /** Validates existing Photon credentials and registers the agent's iMessage user. */ export declare function usePhotonProject(options: UsePhotonProjectOptions): Promise<PhotonManagedProject>;