eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
19 lines (18 loc) • 910 B
TypeScript
import type { z } from "#compiled/zod/index.js";
import type { JsonValue } from "#shared/json.js";
import { TASK_VIEW_JSON_SCHEMA } from "#tools/framework/task-contract.js";
import type { TaskView } from "#tasks/types.js";
/**
* Model-visible task view, inferred from {@link TASK_VIEW_JSON_SCHEMA}.
*
* This is the public projection of `TaskView` (#tasks/types.js), not a
* replacement for it: the durable view additionally carries private
* `executor` and `usage`, and its module must stay zod-free because it is
* bundled into workflow bodies.
*/
type TaskViewJson = z.infer<typeof TASK_VIEW_JSON_SCHEMA>;
/** Projects a task view into the JSON value carried by tool results. */
export declare function taskViewToJson(view: TaskView): TaskViewJson;
/** Projects many views into one `{ tasks }` tool output. */
export declare function taskViewsToJson(views: readonly TaskView[]): JsonValue;
export {};