import { SessionId, AgentManifest, AgentName, Run, Event, RunId, AwaitResume } from '../models/models.js'; import { Input } from './types.js'; import 'zod'; import 'type-fest'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ type FetchLike = typeof fetch; interface ClientInit { baseUrl?: string; /** * Optional fetch implementation to use. Defaults to `globalThis.fetch`. * Can also be used for advanced use cases like mocking, proxying, custom certs etc. */ fetch?: FetchLike; sessionId?: string; } declare class Client { #private; constructor(init?: ClientInit); get sessionId(): string | undefined; withSession(cb: (session: Client) => Promise, sessionId?: SessionId): Promise; ping(): Promise; agents(): Promise; agent(name: AgentName): Promise; runSync(agentName: AgentName, input: Input): Promise; runAsync(agentName: AgentName, input: Input): Promise; runStream(agentName: AgentName, input: Input, signal?: AbortSignal): AsyncGenerator; runStatus(runId: RunId): Promise; runEvents(runId: RunId): Promise; runCancel(runId: RunId): Promise; runResumeSync(runId: RunId, awaitResume: AwaitResume): Promise; runResumeAsync(runId: RunId, awaitResume: AwaitResume): Promise; runResumeStream(runId: RunId, awaitResume: AwaitResume, signal?: AbortSignal): AsyncGenerator; } export { Client, type ClientInit };