Public declaration syntax from forge-ts/packages/forge-core/src/brew.ts Original source SHA-256: 1808014702a023eb526a0173992a656f64a9e66c8ff42c7856b98204a6b849b7 Function bodies and constant values are omitted. This is not the complete implementation. Source line 39 export type BrewId = string; Source line 52 export type NodeId = string; Source line 64 export type BrewVersion = string; Source line 75 export type JoinMode = | { readonly type: 'await_all' } | { readonly type: 'first_success' } | { readonly type: 'first_n'; readonly n: number }; Source line 81 export function joinAwaitAll(): JoinMode; Source line 86 export function joinFirstSuccess(): JoinMode; Source line 91 export function joinFirstN(n: number): JoinMode; Source line 107 export type BrewNodeKind = | { readonly type: 'agent_step'; readonly provider: string; readonly systemPrompt?: string; readonly maxSteps: number; } | { readonly type: 'tool_invocation'; readonly toolId: string; readonly tier: ToolTier; } | { readonly type: 'mcp_call'; readonly serverId: string; readonly toolName: string; } | { readonly type: 'web_operation'; readonly operation: string; } | { readonly type: 'conditional_branch'; readonly conditionExpr: string; readonly trueTarget: NodeId; readonly falseTarget: NodeId; } | { readonly type: 'parallel_fork'; readonly branches: readonly NodeId[]; readonly joinMode: JoinMode; } | { readonly type: 'sub_brew_ref'; readonly brewId: BrewId; } | { readonly type: 'human_checkpoint'; readonly prompt: string; readonly timeoutMs?: number; }; Source line 155 export interface BrewNode { /** Stable identifier within this brew. */ readonly id: NodeId; /** The node's execution semantics. */ readonly kind: BrewNodeKind; /** Arbitrary key-value metadata for tooling and visualization. */ readonly metadata: Readonly>; } Source line 177 export const BrewEdgeKind /* type inferred in source */; Source line 187 export type BrewEdgeKind = (typeof BrewEdgeKind)[keyof typeof BrewEdgeKind]; Source line 192 export interface BrewEdge { /** Source node. */ readonly from: NodeId; /** Target node. */ readonly to: NodeId; /** Edge semantics. */ readonly kind: BrewEdgeKind; } Source line 215 export interface Brew { /** Unique identifier for this brew definition. */ readonly id: BrewId; /** Semantic version of this brew definition. */ readonly version: BrewVersion; /** The graph's nodes, keyed by stable node ID. */ readonly nodes: ReadonlyMap; /** The graph's edges, sorted by (from, to, kind) for determinism. */ readonly edges: readonly BrewEdge[]; /** Designated entry nodes. Execution begins at these nodes. */ readonly entryNodes: readonly NodeId[]; /** Designated exit nodes. Execution terminates when all exit nodes complete. */ readonly exitNodes: readonly NodeId[]; /** Optional model topology for this brew. */ readonly topology?: ModelTopology; }