Interface StepGateOptions

interface StepGateOptions {
    resolve: ((name) => undefined | ITool<any, any>);
    isDisabled?: ((tool) => boolean);
    permissionManager?: Pick<IToolPermissionManager, "isExecutionAllowed">;
    hitlManager?: Pick<IHumanInteractionManager, "requestApproval">;
    hitl?: {
        enabled?: boolean;
        requireApprovalForSideEffects?: boolean;
        autoApproveWhenNoManager?: boolean;
        defaultSideEffectsSeverity?: ActionSeverity;
        approvalTimeoutMs?: number;
    };
}

Properties

resolve: ((name) => undefined | ITool<any, any>)

The step's tool as registered right now.

Type declaration

    • (name): undefined | ITool<any, any>
    • Parameters

      • name: string

      Returns undefined | ITool<any, any>

isDisabled?: ((tool) => boolean)

Tools the host has switched off; a step naming one is refused.

Type declaration

    • (tool): boolean
    • Parameters

      Returns boolean

permissionManager?: Pick<IToolPermissionManager, "isExecutionAllowed">

When given, every step is checked with the caller's capabilities.

hitlManager?: Pick<IHumanInteractionManager, "requestApproval">

When given with hitl.enabled, a side-effecting step asks approval; a step that is itself a composition does not, its own steps do.

hitl?: {
    enabled?: boolean;
    requireApprovalForSideEffects?: boolean;
    autoApproveWhenNoManager?: boolean;
    defaultSideEffectsSeverity?: ActionSeverity;
    approvalTimeoutMs?: number;
}

Same meaning as ToolOrchestratorConfig.hitl.

Type declaration

  • Optional enabled?: boolean
  • Optional requireApprovalForSideEffects?: boolean
  • Optional autoApproveWhenNoManager?: boolean
  • Optional defaultSideEffectsSeverity?: ActionSeverity
  • Optional approvalTimeoutMs?: number