Member Junction
    Preparing search index...
    • Maps the agent's per-step directive plus the run's sourceArtifactId onto a target plan. Pure — no I/O. Absent directive reproduces AgentRunner's historical behavior exactly: a sourceArtifactId is versioned, otherwise the legacy chain (previous artifact on the message, else a new artifact) applies.

      An UNRECOGNIZED behavior resolves exactly like an absent directive. It deliberately does not fall straight through to 'legacy': 'legacy' means "previous artifact on this message, else a new one", and on a fresh agent-response detail there is no previous artifact — so dropping the run's sourceArtifactId on the floor would make a garbled directive STRICTER than no directive at all, silently starting a new artifact where the continuity signal said to add a version. The caller logs the mismatch (see IsKnownArtifactBehavior); this function stays pure.

      Parameters

      • directive: ArtifactDirective

        The step's artifact directive, or undefined when the agent asked for nothing.

      • sourceArtifactId: string

        The artifact the run was launched against, if any.

      Returns ArtifactTargetPlan

      The plan to execute: suppress, create-new, version a specific artifact, or legacy chain.