Configuration Types
Types for configuring Droid instances.
DroidConfig
Main configuration interface for the Droid class.
interface DroidConfig {
/** Working directory for CLI operations */
cwd?: string;
/** AI model to use */
model?: ModelId | string;
/** Level of autonomous decision-making */
autonomyLevel?: AutonomyLevel;
/** Reasoning intensity for the AI */
reasoningEffort?: ReasoningEffort;
/** Path to the Droid CLI binary */
droidPath?: string;
/** Maximum execution time in milliseconds */
timeout?: number;
}
Usage
import { Droid, MODELS } from '@activade/droid-sdk';
const config: DroidConfig = {
model: MODELS.CLAUDE_SONNET,
autonomyLevel: 'high',
reasoningEffort: 'medium',
cwd: '/path/to/project',
timeout: 300000,
droidPath: '/custom/bin/droid'
};
const droid = new Droid(config);
Defaults
| Property | Default Value |
|---|---|
cwd | process.cwd() |
model | (none) |
autonomyLevel | 'default' |
reasoningEffort | (none) |
droidPath | 'droid' |
timeout | 600000 (10 min) |
Constants
/** Default execution timeout in milliseconds (10 minutes) */
const DEFAULT_TIMEOUT = 600000;
/** Default CLI binary name */
const DEFAULT_DROID_PATH = 'droid';
Config Immutability
The config is frozen after construction:
const droid = new Droid({ model: MODELS.CLAUDE_SONNET });
// Read config
console.log(droid.config.model); // 'claude-sonnet-4-5-20250929'
// Config is readonly
droid.config.model = 'other'; // TypeScript error