@sema-agent/core
Version:
Stateless, task-oriented AI agent core
14 lines (13 loc) • 698 B
TypeScript
import { Dispatcher } from "undici";
/**
* The one dispatcher every first-party brain hands its fetch: the sending members are the engine's
* ({@link SENDING_MEMBERS}); every other member — state, lifecycle, events — is the host's, read when
* accessed ({@link hostMember}), so nothing a fetch starts reading has to be added to a list here.
* Stateless; owns no sockets.
*/
export declare const ENGINE_DISPATCHER: Dispatcher;
/** The `fetch` a brain sends its requests through: the caller's `fetchImpl` (else Node's `fetch`), each
* request carrying {@link ENGINE_DISPATCHER} in its init. */
export declare function resolveFetch(config: {
fetchImpl?: typeof fetch;
}): typeof fetch;