Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/tools / / toResultEnvelope
Function: toResultEnvelope()
ts
function toResultEnvelope<TOutput>(opts): ResultEnvelope<TOutput>;Defined in: packages/tools/src/result/envelope.ts:35
Convert a raw execute(...) return value into a canonical ResultEnvelope. Streaming-hint tools that returned void use the chunks parameter to materialise the assembled body.
Type Parameters
| Type Parameter |
|---|
TOutput |
Parameters
| Parameter | Type |
|---|---|
opts | { chunks?: readonly ContentChunk[]; raw: | void | TOutput | ToolReturn<TOutput>; } |
opts.chunks? | readonly ContentChunk[] |
opts.raw | | void | TOutput | ToolReturn<TOutput> |
Returns
ResultEnvelope<TOutput>