handie-cua
Version:
A shell package for machine and session management
27 lines (26 loc) • 662 B
TypeScript
export interface Machine {
id: string;
streamUrl: string;
runNewSession: (options: SessionOptions) => Promise<Session>;
}
export interface SessionOptions {
task: string;
apiKey: string;
}
export interface Session {
id: string;
newTask: (options: TaskOptions) => Promise<void>;
on: (event: 'update', callback: (update: any) => void) => void;
}
export interface TaskOptions {
task: string;
useBrowserCookies?: boolean;
allowApplications?: string[];
apiKey: string;
}
export interface MachineOptions {
apiKey: string;
}
export interface Handie {
spawnMachine: (options: MachineOptions) => Promise<Machine>;
}