Summary
src/pocketflow/workflow.ts creates results as new Map<string, AgentResult>(), but src/agents/types.ts defines SharedStore.results as Record<string, AgentResult>. These are not compatible and will cause runtime errors when code accesses store.results via Record-style dot notation on a Map.
Locations
src/pocketflow/workflow.ts line: results: new Map<string, AgentResult>()
src/agents/types.ts: results: Record<string, AgentResult>
src/pocketflow/nodes/async-parallel-batch.ts: store.results.set(r.agentName, r) — uses Map API
Recommended Fix
Align the type. Since Map is used throughout the node implementations, update SharedStore:
results: Map<string, AgentResult>
Backlink: #1
Summary
src/pocketflow/workflow.tscreatesresultsasnew Map<string, AgentResult>(), butsrc/agents/types.tsdefinesSharedStore.resultsasRecord<string, AgentResult>. These are not compatible and will cause runtime errors when code accessesstore.resultsvia Record-style dot notation on a Map.Locations
src/pocketflow/workflow.tsline:results: new Map<string, AgentResult>()src/agents/types.ts:results: Record<string, AgentResult>src/pocketflow/nodes/async-parallel-batch.ts:store.results.set(r.agentName, r)— uses Map APIRecommended Fix
Align the type. Since
Mapis used throughout the node implementations, updateSharedStore:Backlink: #1