): Promise<{
id: string;
output: T;
info: object | undefined;
}>;
export interface AsStepOptions {
name?: string;
type: string;
tags?: string[];
info?: object;
}
/** Wrap a function so that it runs as a step.
*
* export const doIt = asStep(async doIt(input) => {
* await callModel(input)
* })
* */
export declare function asStep(fn: (...args: P) => Promise, options?: AsStepOptions): (...args: P) => Promise;
/** Explicitly provide an existing `RunContext`, for cases where the function is not causally linked to the run closely
* enough for it to be retrieved through the normal AsyncLocalStorage mechanism. */
export declare function runWithContext(ctx: RunContext, fn: () => T): T;
/** Record additional information about a step that is only known after starting it.
* This data will be shallowly merged with existing step information. */
export declare function recordStepInfo(info: object): void;
/** Record additional information about a run that is only known after starting it.
* This data will be shallowly merged with existing run information. */
export declare function recordRunInfo(info: object): void;
/** Set the status that will be written to the run when it finishes. */
export declare function setRunFinishStatus(state: string): void;
/** Get the current Chronicle client from the event context, or the global client. */
export declare function chronicleClient(): ChronicleClient;
//# sourceMappingURL=runs.d.ts.map