Anchorage API reference
    Preparing search index...

    Host-only dispatch recovery. Unlike public status, the ephemeral thread and resource may already have been released after a terminal unthreaded run, so this seam authorizes on the durable run owner before the target host proves the addressed thread/resource/run correlation from its snapshot.

    interface AgentThreadDispatchTopology {
        requireBoundThread: BoundThreadTargetValidator;
        consumeRemoteStepDispatch(
            context: ActorContext,
            permit: RemoteStepPermit,
        ): Promise<
            { kind: "accepted"; rawPermit: string }
            | { kind: "already-consumed" },
        >;
        consumeWorkflowRemoteStepDispatch(
            context: ActorContext,
            permit: RemoteStepPermit,
        ): Promise<
            { kind: "accepted"; rawPermit: string }
            | { kind: "already-consumed" },
        >;
        dispatchStatus(
            context: ActorContext,
            input: AgentThreadRunRef,
        ): Promise<AgentRunEnvelope | undefined>;
        getWorkflowRemoteStep(
            context: ActorContext,
            invocationId: string,
        ): Promise<WorkflowRemoteStepInvocation | undefined>;
        issueRemoteStepDispatch(
            context: ActorContext,
            invocationId: string,
            lifetimeMs: number,
        ): Promise<RemoteStepDispatchTicket>;
        issueWorkflowRemoteStepDispatch(
            context: ActorContext,
            invocationId: string,
            lifetimeMs: number,
        ): Promise<WorkflowRemoteStepDispatchTicket>;
        observe(
            context: ActorContext,
            input: AgentThreadObserveInput,
        ): Promise<Response>;
        recordWorkflowRemoteStepResult(
            context: ActorContext,
            invocationId: string,
            rawPermit: string,
            resultJson: string,
            evidenceJson: string,
        ): Promise<
            | { kind: "recorded"; resultDigest: string; resultJson: string }
            | { kind: "replay"; resultDigest: string; resultJson: string },
        >;
        registerWorkflowRemoteStep(
            context: ActorContext,
            workflowId: string,
            runId: string,
            hostDeadlineAt: number,
        ): Promise<WorkflowRemoteStepInvocation>;
        resume(
            context: ActorContext,
            record: ApprovalRecord,
            decision: ApprovalDecision,
        ): Promise<AgentRunEnvelope>;
        resumeRemoteStep(
            context: ActorContext,
            invocationId: string,
        ): Promise<AgentRunEnvelope>;
        start(
            context: ActorContext,
            input: AgentThreadStartInput,
        ): Promise<AgentRunEnvelope>;
        status(
            context: ActorContext,
            input: AgentThreadRunRef,
        ): Promise<AgentRunEnvelope | undefined>;
        terminate?(
            context: ActorContext,
            input: AgentThreadRunRef,
            replayOnly?: boolean,
        ): Promise<AgentRunEnvelope>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    requireBoundThread: BoundThreadTargetValidator

    Methods

    • Parameters

      • context: ActorContext
      • invocationId: string
      • rawPermit: string
      • resultJson: string
      • evidenceJson: string

      Returns Promise<
          | { kind: "recorded"; resultDigest: string; resultJson: string }
          | { kind: "replay"; resultDigest: string; resultJson: string },
      >