UNPKG

@adonis-agora/agent

Version:

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

22 lines • 1.21 kB
import type { UIMessage } from 'ai'; import type { ActionProposal } from '../../../index.js'; import type { AgentBackend } from '../backend.js'; export interface ActionProposalsState { items: ActionProposal[]; error: Error | null; /** * The server does not serve proposals: its `action-proposals` route answered `404`, `405` or * `501`. Nothing is read again for the rest of the session — no polling, no refetch on focus. */ unsupported: boolean; refresh(): Promise<void>; } /** `cause` says the proposals route is not there at all (not a transient failure of one read). */ export declare function isProposalsUnsupported(cause: unknown): boolean; export declare function useActionProposals(backend: AgentBackend, threadId: string | undefined, setMessages: (update: (current: UIMessage[]) => UIMessage[]) => void, refreshKey: string, pollMs?: number, /** * An outcome was newly written to the thread (not one already there when the thread was first * read): the server may continue the conversation from it with a turn this chat did not start. */ onAdmitted?: (proposalIds: string[]) => void): ActionProposalsState; //# sourceMappingURL=use-action-proposals.d.ts.map