UNPKG

agents

Version:
74 lines (72 loc) 1.88 kB
import { n as BaseEvent, t as MCPObservabilityEvent } from "./mcp-BwPscEiF.js"; //#region src/observability/agent.d.ts /** * Agent-specific observability events * These track the lifecycle and operations of an Agent */ type AgentObservabilityEvent = | BaseEvent<"state:update", {}> | BaseEvent< "rpc", { method: string; streaming?: boolean; } > | BaseEvent<"message:request" | "message:response", {}> | BaseEvent<"message:clear"> | BaseEvent< "schedule:create" | "schedule:execute" | "schedule:cancel", { callback: string; id: string; } > | BaseEvent<"destroy"> | BaseEvent< "connect", { connectionId: string; } > | BaseEvent< | "workflow:start" | "workflow:event" | "workflow:approved" | "workflow:rejected" | "workflow:terminated" | "workflow:paused" | "workflow:resumed" | "workflow:restarted", { workflowId: string; workflowName?: string; eventType?: string; reason?: string; } >; //#endregion //#region src/observability/index.d.ts /** * Union of all observability event types from different domains */ type ObservabilityEvent = AgentObservabilityEvent | MCPObservabilityEvent; interface Observability { /** * Emit an event for the Agent's observability implementation to handle. * @param event - The event to emit * @param ctx - The execution context of the invocation (optional) */ emit(event: ObservabilityEvent, ctx?: DurableObjectState): void; } /** * A generic observability implementation that logs events to the console. */ declare const genericObservability: Observability; //#endregion export { ObservabilityEvent as n, genericObservability as r, Observability as t }; //# sourceMappingURL=index-N6791tVt.d.ts.map