ReasoningSpec interface

The specification produced by the planning phase. - state: opaque JSON designed by the planning LLM for the evaluation LLM to track temporal context. Norsk does not interpret this. - prompt: the instruction sent to the evaluation LLM alongside each frame and the current state. - explanation: optional reasoning from the planning LLM about its design choices (why it chose certain state fields, etc.) - localAnalysis: optional list of local analysis tools to enable - includeFrame: whether to include JPEG frames in LLM calls (default true). Pass { on: "sceneChange" } to attach a frame only on the first call and after scene cuts (requires a scene_change tool in localAnalysis); everyNCalls adds a periodic refresh floor. A large token saver on static scenes. - events: function declarations the evaluation LLM can call. Carried through from the plan phase so the same events are registered at evaluation time.

Internally, the SDK implementation may carry additional handler state but this is not part of the public interface.

Signature:

export interface ReasoningSpec

Properties

Property Type Description

events?

EventDeclaration[]

(Optional)

explanation?

string

(Optional)

gate?

Gate

(Optional) Optional gate on the evaluation LLM call itself: a call is only made while the gate holds (analysisIntervalSecs still rate-limits on top). May reference any tool configured in localAnalysis.

includeAudio?

{ seconds: number; }

(Optional) Attach the last N seconds of programme audio (16kHz mono WAV) to each generative request. Requires an audio subscription on the node. Supported by Gemini and OpenAI audio-capable models (e.g. gpt-4o-audio-preview); rejected for the Claude provider, which has no audio input. Roughly 32 tokens/second on Gemini — usually cheaper than an image.

includeFrame?

boolean | { on: "sceneChange"; everyNCalls?: number; }

(Optional)

localAnalysis?

LocalAnalysisConfig[]

(Optional)

prompt

string

requirements?

SpecRequirement[]

(Optional) Artifact requirements declared by a flow-designing planner — things it cannot supply itself (galleries, customer model files). See SpecRequirement.

state

object

stateSchema?

StateFieldSchema[]

(Optional) Typed schema of the state record, one entry per state field. Designed by the Plan phase automatically; supply by hand for hand-written specs to get strict, schema-enforced state updates on providers that support them (otherwise field types are inferred from the current values).

subtitleWindowSecs?

number

(Optional) Time window (seconds) of recent subtitle/caption cues carried into the prompt and aggregated analysis — subscribe the node to any subtitle stream (e.g. a captioning node’s output). Default 30.