Skip to main content
Dotset CLI API Documentation / tollgate / TollgateConfig

Interface: TollgateConfig

Defined in: src/tollgate/policy/types.ts:299 Root configuration schema for Tollgate. This is the top-level configuration object parsed from tollgate.yaml.

Example

const config: TollgateConfig = {
  version: '1',
  defaults: { action: 'prompt', timeout: 60000 },
  servers: {
    postgres: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-postgres'] }
  },
  audit: { enabled: true, path: './audit.db' }
};

Properties

approval?

optional approval: {
  method?: "webhook" | "terminal";
  timeout?: number;
  url?: string;
};
Defined in: src/tollgate/policy/types.ts:315 Approval handler configuration

method?

optional method: "webhook" | "terminal";
Approval method: terminal prompt or webhook

timeout?

optional timeout: number;
Timeout for approval requests in milliseconds

url?

optional url: string;
Webhook URL for remote approvals

audit?

optional audit: {
  enabled?: boolean;
  path?: string;
};
Defined in: src/tollgate/policy/types.ts:325 Audit logging configuration

enabled?

optional enabled: boolean;
Enable audit logging

path?

optional path: string;
Path to audit database file

defaults?

optional defaults: {
  action?: PolicyAction;
  timeout?: number;
};
Defined in: src/tollgate/policy/types.ts:304 Global default settings

action?

optional action: PolicyAction;
Default action when no policy matches

timeout?

optional timeout: number;
Default approval timeout in milliseconds

resilience?

optional resilience: ResilienceConfig;
Defined in: src/tollgate/policy/types.ts:333 Resilience and failure handling configuration

servers?

optional servers: Record<string, ServerConfig>;
Defined in: src/tollgate/policy/types.ts:312 Server configurations keyed by server name

version

version: string;
Defined in: src/tollgate/policy/types.ts:301 Configuration schema version