@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
23 lines (22 loc) • 872 B
TypeScript
/**
* TaskExecutor — Runs a single task execution against NeuroLink.generate().
*
* Handles:
* - Isolated mode: fresh generate() call with no history
* - Continuation mode: loads conversation history, appends new exchange
* - Retry with exponential backoff for transient errors
* - Run result construction and logging
*/
import type { AutoresearchEmitter, NeuroLinkExecutable, Task, TaskRunResult, TaskStore } from "../types/index.js";
export declare class TaskExecutor {
private neurolink;
private store;
private emitter?;
constructor(neurolink: NeuroLinkExecutable, store: TaskStore, emitter?: AutoresearchEmitter | undefined);
/**
* Execute a task once. Called by the backend on each scheduled tick.
* Returns the run result (success or error).
*/
execute(task: Task): Promise<TaskRunResult>;
private executeOnce;
}