Anchorage API reference
    Preparing search index...

    Type Alias RequestContextProvider

    RequestContextProvider: (
        workflowId: string,
        runId: string,
        leg: RunLeg,
    ) =>
        | Record<string, unknown>
        | undefined
        | Promise<Record<string, unknown> | undefined>

    Server-side requestContext supplied during start and resume preparation. Trusted host starts and verified schedule targets may supply non-reserved application context through storedRequestContext. Capability values, including approval grants, derive from trusted server-side state through this provider (security-threat-model.md, trust boundary 6). Use trusted sources such as the flowsafe approval store; never derive capabilities from client input, model output, or tool results.

    Resume values overwrite matching persisted keys. Omitting a key retains its persisted value. A provider that scopes a capability per leg must return its key for each leg, using an empty grant list to revoke persisted connector grants.

    Type Declaration

      • (
            workflowId: string,
            runId: string,
            leg: RunLeg,
        ):
            | Record<string, unknown>
            | undefined
            | Promise<Record<string, unknown> | undefined>
      • Parameters

        • workflowId: string
        • runId: string
        • leg: RunLeg

        Returns
            | Record<string, unknown>
            | undefined
            | Promise<Record<string, unknown> | undefined>