/** * darwin-langgraph — LangGraph.js adapter for darwin-agents. * * Public entry. 11 surfaces + re-exported types + error classes. * * @example * ```ts * import { StateGraph } from "@langchain/langgraph"; * import { defineAgent } from "darwin-agents"; * import { * createDarwinNode, * darwinAnnotation, * withDarwinEvolution, * } from "darwin-langgraph"; * * const researcher = defineAgent({ * name: "researcher", * role: "Topic Researcher", * description: "Five bullets on a topic.", * systemPrompt: "Return exactly 5 bullet points.", * }); * * const graph = withDarwinEvolution( * new StateGraph(darwinAnnotation()) * .addNode("research", createDarwinNode(researcher)) * .addEdge("__start__", "research") * .compile(), * { * nodeMap: { research: "researcher" }, * onTrajectory: (event) => { * console.log(`${event.nodeName} (${event.agentName}) trajectory:`, event.trajectory); * }, * }, * ); * * const result = await graph.invoke({ task: "What is GEPA?" }); * console.log(result.output); * ``` */ export { createDarwinNode, type CreateDarwinNodeOptions, type DarwinNodeFn, type DarwinRunOptionsPassthrough, } from "./create-darwin-node.js"; export { darwinAnnotation, getDarwinChannelSpec, lastWriteWinsTrajectoryReducer, } from "./darwin-annotation.js"; export { withDarwinEvolution, type DarwinEvolutionOptions, type DarwinNodeMapEntry, type DarwinTrajectoryEvent, } from "./with-darwin-evolution.js"; export { DarwinCallbackHandler, MAX_KNOWN_TRACE_VERSION, type DarwinCallbackHandlerOptions, type DarwinToolEvent, } from "./darwin-callback-handler.js"; export { toOtelAttributes, toolCallToOtelAttributes, type OtelAttributes, type ToOtelAttributesOptions, type ToolCallOtelOptions, } from "./to-otel-attributes.js"; export { darwinMessagesAnnotation, getMessagesChannelSpec, } from "./darwin-messages-annotation.js"; export { darwinAccumulatingAnnotation, getDarwinAccumulatingChannelSpec, darwinTrajectoryAccumulatorReducer, } from "./darwin-accumulating-annotation.js"; export { TokenBudgetCallbackHandler, createTokenBudgetCallbacks, type TokenBudgetOptions, type TokenBudgetExceedInfo, type TokenBudgetTickInfo, } from "./token-budget.js"; export { toW3CTraceContext, type ToW3CTraceContextOptions, type W3CTraceContext, } from "./to-w3c-trace-context.js"; export type { DarwinNodeAttemptInfo } from "./create-darwin-node.js"; export { DarwinNodeError, DarwinEvolutionHookError, DarwinTokenBudgetExceededError, } from "./errors.js"; export type { AgentDefinition, DarwinExperiment, ExecutionTrace, LLMProvider, MemoryProvider, RunResult, TraceToolCall, TraceTokenUsage, TraceTurnError, } from "./types.js"; /** Adapter version — sync with `package.json` on every release. */ export declare const VERSION = "0.5.4"; //# sourceMappingURL=index.d.ts.map