UNPKG

@adonis-agora/agent

Version:

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

34 lines • 1.06 kB
import { AgUiEncoder as CoreEncoder, } from './core/index.js'; import { toAgUiFrame } from './frames.js'; /** * The local AG-UI encoder, reading this package's {@link StreamFrame}s. A pure state machine: the same frames * always give the same events. */ export class AgUiEncoder { core; constructor(options) { this.core = new CoreEncoder(options); } /** How many frames of the library stream this encoder has consumed. */ get consumed() { return this.core.consumed; } /** The run is waiting on at least one approval or question set nobody has settled yet. */ get waiting() { return this.core.waiting; } /** A tool call is announced and neither answered nor parked: more frames are coming. */ get busy() { return this.core.busy; } start() { return this.core.start(); } encode(frame) { return this.core.encode(toAgUiFrame(frame)); } finish(ended = false) { return this.core.finish(ended); } } //# sourceMappingURL=encoder.js.map