skills.onResult
onResult(handler: (result: SkillResult) => void): UnsubscribeSubscribe to skill results. The handler is called after every successful
processFile or execute call, receiving the SkillResult.
Handler errors are caught per-handler and logged to console.error; a
failing handler never prevents subsequent handlers from running.
handler | (result: SkillResult) => void | Callback invoked with each result. |
Returns: Unsubscribe
Example
const unsub = api.skills.onResult((r) => console.log("got", r.nodes.length, "nodes"));
// later:
unsub();