Function: looksLikeSpooledArtifact()
ts
function looksLikeSpooledArtifact(
value: unknown,
): value is {
asString: () => Promise<string>;
byteLength: () => Promise<number>;
lineCount: () => Promise<number>;
};Defined in: src/batteries/llm/chat_common/helpers.ts:395
Structural (cross-realm-safe) check that a tool result is a @nhtio/adk!SpooledArtifact: it exposes the reader surface the handle pattern needs (asString + byteLength/lineCount) and a constructor carrying the toolMethods descriptor list the model is told to call. Used instead of a bare instanceof so a SpooledArtifact from another realm (worker, bundle copy) still matches.
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is { asString: () => Promise<string>; byteLength: () => Promise<number>; lineCount: () => Promise<number> }