AutoMovie API
    Preparing search index...

    Function scriptAncestors

    • The refinement chain above one screenplay node, nearest first and excluding the node itself: ["scene-1", "act-1", "intent"] for a beat under that scene.

      Feedback located on a leaf walks this chain so a correction can target the beat, the scene, the act or the intent; which level to fix is the agent's call. The walker serves trees validateScriptTree has accepted, but throws on an unknown nodeId, a parent reference that does not resolve, or a parent cycle, naming the id at fault, because a chain that silently stopped short would misdirect the correction round. When ids repeat, the last node with an id is the one walked.

      Parameters

      • tree: readonly IAutoMovieScriptNode[]

        Every node of the screenplay tree.

      • nodeId: string

        The node whose ancestors are wanted.

      Returns string[]

      Ancestor ids from the parent up to the root.