UNPKG

@adonis-agora/agent

Version:

Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.

33 lines • 1.71 kB
import * as durable from '@adonis-agora/durable'; import type { AgentEngineContext } from '../../engine.js'; import type { AgentRunner } from '../../spi/agent-runner.js'; import { OpenCodeEngine, type OpenCodeEngineOptions } from '../engine.js'; /** * `@adonis-agora/agent/opencode/durable` — `openCode()` whose turns are durable workflows. Its own * entry point, so `@adonis-agora/durable` (an optional peer) is loaded only by an app that asks for * it. */ export interface OpenCodeDurableOptions extends OpenCodeEngineOptions { /** * The durable engine the turns run on. Omit → the app's (`WorkflowEngine` from the container, * bound by `@adonis-agora/durable`'s provider). */ workflowEngine?: durable.WorkflowEngine; } /** The OpenCode engine whose turns are `agora.agent.opencode.run` workflows. */ export declare class OpenCodeDurableEngine extends OpenCodeEngine { readonly options: OpenCodeDurableOptions; readonly name = "opencode-durable"; readonly durable = true; constructor(options: OpenCodeDurableOptions); createRunner(context: AgentEngineContext): Promise<AgentRunner>; } /** * `openCode()` whose turns are durable workflows — `engine: openCodeDurable({ host })` next to a * configured `@adonis-agora/durable`. Every step of a turn is checkpointed; a turn waiting on a person * survives restarts and is resumed by whichever process receives the decision. */ export declare function openCodeDurable(options: OpenCodeDurableOptions): OpenCodeDurableEngine; export { DurableOpenCodeAgentRunner } from './runner.js'; export { decisionToken, OPENCODE_RUN_WORKFLOW, OpenCodeRunWorkflow } from './workflow.js'; //# sourceMappingURL=index.d.ts.map