mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 08:13:37 +00:00
fix: pass sandbox configuration through ExecuteOptions
The sandbox configuration was set in createChatOptions() and createAutoModeOptions(), but was never passed to the ClaudeProvider. This caused the sandbox to never actually be enabled. Changes: - Add sandbox field to ExecuteOptions interface - Pass sandbox config from AgentService to provider - Pass sandbox config from AutoModeService to provider - Forward sandbox config in ClaudeProvider to SDK options Now the sandbox configuration from settings is properly used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,8 @@ export class ClaudeProvider extends BaseProvider {
|
||||
: {}),
|
||||
// Forward settingSources for CLAUDE.md file loading
|
||||
...(options.settingSources && { settingSources: options.settingSources }),
|
||||
// Forward sandbox configuration
|
||||
...(options.sandbox && { sandbox: options.sandbox }),
|
||||
};
|
||||
|
||||
console.log('[ClaudeProvider] SDK options prepared:', {
|
||||
|
||||
@@ -34,6 +34,7 @@ export interface ExecuteOptions {
|
||||
conversationHistory?: ConversationMessage[]; // Previous messages for context
|
||||
sdkSessionId?: string; // Claude SDK session ID for resuming conversations
|
||||
settingSources?: Array<'user' | 'project' | 'local'>; // Claude filesystem settings to load
|
||||
sandbox?: { enabled: boolean; autoAllowBashIfSandboxed?: boolean }; // Sandbox configuration
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -296,6 +296,7 @@ export class AgentService {
|
||||
abortController: session.abortController!,
|
||||
conversationHistory: conversationHistory.length > 0 ? conversationHistory : undefined,
|
||||
settingSources: sdkOptions.settingSources,
|
||||
sandbox: sdkOptions.sandbox, // Pass sandbox configuration
|
||||
sdkSessionId: session.sdkSessionId, // Pass SDK session ID for resuming
|
||||
};
|
||||
|
||||
|
||||
@@ -1153,6 +1153,7 @@ Format your response as a structured markdown document.`;
|
||||
allowedTools: sdkOptions.allowedTools as string[],
|
||||
abortController,
|
||||
settingSources: sdkOptions.settingSources,
|
||||
sandbox: sdkOptions.sandbox, // Pass sandbox configuration
|
||||
};
|
||||
|
||||
const stream = provider.executeQuery(options);
|
||||
@@ -1887,6 +1888,7 @@ This mock response was generated because AUTOMAKER_MOCK_AGENT=true was set.
|
||||
abortController,
|
||||
systemPrompt: sdkOptions.systemPrompt,
|
||||
settingSources: sdkOptions.settingSources,
|
||||
sandbox: sdkOptions.sandbox, // Pass sandbox configuration
|
||||
};
|
||||
|
||||
// Execute via provider
|
||||
|
||||
Reference in New Issue
Block a user