# Variable ForestResultSchema`Const`

ForestResultSchema: ZodObject<
{
forestId: ZodString;
problem: ZodString;
bestSolution: ZodNullable<
ZodObject<
{
treeId: ZodString;
path: ZodArray<ZodString>;
conclusionNode: ZodObject<
{
id: ZodString;
treeId: ZodString;
parentId: ZodNullable<ZodString>;
children: ZodArray<ZodString>;
depth: ZodNumber;
stepType: ZodEnum<
{
inference: "inference";
hypothesis: "hypothesis";
synthesis: "synthesis";
decomposition: "decomposition";
verification: "verification";
conclusion: "conclusion";
},
>;
content: ZodString;
metadata: ZodObject<
{
source: ZodOptional<ZodString>;
tokensUsed: ZodOptional<ZodNumber>;
generationTimeMs: ZodOptional<ZodNumber>;
crossReferences: ZodOptional<ZodArray<(...)>>;
custom: ZodOptional<ZodRecord<(...), (...)>>;
},
$strip,
>;
state: ZodEnum<
{
error: "error";
pending: "pending";
completed: "completed";
active: "active";
pruned: "pruned";
},
>;
isActive: ZodBoolean;
activationScore: ZodNumber;
confidence: ZodNumber;
qualityScore: ZodNumber;
estimatedValue: ZodNumber;
createdAt: ZodNumber;
updatedAt: ZodNumber;
},
$strip,
>;
confidence: ZodNumber;
qualityScore: ZodNumber;
combinedScore: ZodNumber;
},
$strip,
>,
>;
topPaths: ZodArray<
ZodObject<
{
treeId: ZodString;
path: ZodArray<ZodString>;
targetNodeId: ZodString;
score: ZodNumber;
breakdown: ZodObject<
{
confidenceScore: ZodNumber;
qualityScore: ZodNumber;
coherenceScore: ZodNumber;
depthFactor: ZodNumber;
conclusionBonus: ZodNumber;
},
$strip,
>;
reachesConclusion: ZodBoolean;
length: ZodNumber;
},
$strip,
>,
>;
finalState: ZodEnum<
{
timeout: "timeout";
completed: "completed";
initializing: "initializing";
exploring: "exploring";
converging: "converging";
},
>;
terminationReason: ZodEnum<
{
error: "error";
max_tokens: "max_tokens";
no_progress: "no_progress";
solution_found: "solution_found";
convergence: "convergence";
max_time: "max_time";
max_depth: "max_depth";
},
>;
statistics: ZodObject<
{
totalTrees: ZodNumber;
activeTrees: ZodNumber;
totalNodes: ZodNumber;
totalActiveNodes: ZodNumber;
maxDepth: ZodNumber;
bestPathScore: ZodNumber;
avgTreeScore: ZodNumber;
totalTokensUsed: ZodNumber;
totalExplorationTimeMs: ZodNumber;
activationRatio: ZodNumber;
},
$strip,
>;
durationMs: ZodNumber;
totalTokensUsed: ZodNumber;
explorationHistory: ZodOptional<
ZodArray<
ZodObject<
{
timestamp: ZodNumber;
eventType: ZodEnum<
{
tree_created: "tree_created";
node_created: "node_created";
node_activated: "node_activated";
node_deactivated: "node_deactivated";
node_completed: "node_completed";
node_pruned: "node_pruned";
path_scored: "path_scored";
cross_tree_share: "cross_tree_share";
conclusion_reached: "conclusion_reached";
tree_completed: "tree_completed";
forest_converging: "forest_converging";
forest_completed: "forest_completed";
},
>;
treeId: ZodOptional<ZodString>;
nodeId: ZodOptional<ZodString>;
details: ZodRecord<ZodString, ZodUnknown>;
},
$strip,
>,
>,
>;
},
$strip,
> = ...

Schema for ForestResult validation (partial).

- Defined in packages/nexus-agents/src/agents/reasoning/forest-result-types.ts:187