Skip to Content
SDKvibexProcessor

processor

Module: vibex/processor

Result Processor for handling large tool outputs

Automatically saves large tool results as artifacts to avoid token consumption

Interfaces

ProcessedResult

View source

Properties:

NameTypeDescription
originalany(optional)
processedany
wasProcessedboolean
artifactIdstring(optional)

Functions

processToolResult

View source

Process a tool result to handle large outputs

function processToolResult(result: any, toolName: string, spaceId?: string, threshold: number = 10000): Promise<ProcessedResult>

Parameters:

NameTypeDescription
resultanyThe tool result
toolNamestringName of the tool that produced the result
spaceIdstring (optional)Space ID for artifact storage
thresholdnumberSize threshold in bytes (default 10KB) (default: 10000)

isLargeResultReference

View source

Check if a result is a large result reference

function isLargeResultReference(result: any): boolean

Parameters:

NameTypeDescription
resultany

loadLargeResult

View source

Load the original result from a large result reference

function loadLargeResult(reference: any, spaceId: string): Promise<any>

Parameters:

NameTypeDescription
referenceany
spaceIdstring