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 sourceProperties:
| Name | Type | Description |
|---|---|---|
original | any | (optional) |
processed | any | |
wasProcessed | boolean | |
artifactId | string | (optional) |
Functions
processToolResult
View sourceProcess a tool result to handle large outputs
function processToolResult(result: any, toolName: string, spaceId?: string, threshold: number = 10000): Promise<ProcessedResult>Parameters:
| Name | Type | Description |
|---|---|---|
result | any | The tool result |
toolName | string | Name of the tool that produced the result |
spaceId | string (optional) | Space ID for artifact storage |
threshold | number | Size threshold in bytes (default 10KB) (default: 10000) |
isLargeResultReference
View sourceCheck if a result is a large result reference
function isLargeResultReference(result: any): booleanParameters:
| Name | Type | Description |
|---|---|---|
result | any |
loadLargeResult
View sourceLoad the original result from a large result reference
function loadLargeResult(reference: any, spaceId: string): Promise<any>Parameters:
| Name | Type | Description |
|---|---|---|
reference | any | |
spaceId | string |