@ruvnet/open-claude-code 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/package.json +27 -0
  2. package/src/agents/loader.mjs +89 -0
  3. package/src/agents/parser.mjs +98 -0
  4. package/src/agents/teams.mjs +123 -0
  5. package/src/auth/oauth.mjs +220 -0
  6. package/src/config/cli-args.mjs +139 -0
  7. package/src/config/env.mjs +261 -0
  8. package/src/config/settings.mjs +119 -0
  9. package/src/core/agent-loop.mjs +462 -0
  10. package/src/core/cache.mjs +105 -0
  11. package/src/core/checkpoints.mjs +141 -0
  12. package/src/core/context-manager.mjs +198 -0
  13. package/src/core/providers.mjs +219 -0
  14. package/src/core/rate-limiter.mjs +119 -0
  15. package/src/core/scheduler.mjs +173 -0
  16. package/src/core/session.mjs +143 -0
  17. package/src/core/streaming.mjs +182 -0
  18. package/src/core/system-prompt.mjs +135 -0
  19. package/src/hooks/engine.mjs +162 -0
  20. package/src/index.mjs +220 -0
  21. package/src/mcp/client.mjs +253 -0
  22. package/src/mcp/transport-shttp.mjs +130 -0
  23. package/src/mcp/transport-sse.mjs +131 -0
  24. package/src/mcp/transport-ws.mjs +134 -0
  25. package/src/permissions/checker.mjs +57 -0
  26. package/src/permissions/injection-check.mjs +60 -0
  27. package/src/permissions/path-check.mjs +102 -0
  28. package/src/permissions/prompt.mjs +73 -0
  29. package/src/permissions/sandbox.mjs +112 -0
  30. package/src/plugins/loader.mjs +138 -0
  31. package/src/skills/loader.mjs +147 -0
  32. package/src/skills/runner.mjs +55 -0
  33. package/src/telemetry/index.mjs +96 -0
  34. package/src/tools/agent.mjs +127 -0
  35. package/src/tools/ask-user.mjs +61 -0
  36. package/src/tools/bash.mjs +148 -0
  37. package/src/tools/cron-create.mjs +120 -0
  38. package/src/tools/cron-delete.mjs +49 -0
  39. package/src/tools/cron-list.mjs +37 -0
  40. package/src/tools/edit.mjs +82 -0
  41. package/src/tools/enter-worktree.mjs +69 -0
  42. package/src/tools/exit-worktree.mjs +57 -0
  43. package/src/tools/glob.mjs +117 -0
  44. package/src/tools/grep.mjs +127 -0
  45. package/src/tools/ls.mjs +58 -0
  46. package/src/tools/lsp.mjs +115 -0
  47. package/src/tools/multi-edit.mjs +94 -0
  48. package/src/tools/notebook-edit.mjs +96 -0
  49. package/src/tools/read-mcp-resource.mjs +57 -0
  50. package/src/tools/read.mjs +138 -0
  51. package/src/tools/registry.mjs +114 -0
  52. package/src/tools/remote-trigger.mjs +84 -0
  53. package/src/tools/send-message.mjs +64 -0
  54. package/src/tools/skill.mjs +52 -0
  55. package/src/tools/todo-write.mjs +68 -0
  56. package/src/tools/tool-search.mjs +77 -0
  57. package/src/tools/web-fetch.mjs +65 -0
  58. package/src/tools/web-search.mjs +89 -0
  59. package/src/tools/write.mjs +55 -0
  60. package/src/ui/commands.mjs +499 -0
  61. package/src/ui/ink-app.mjs +231 -0
  62. package/src/ui/repl.mjs +144 -0
  63. package/test/test.mjs +1857 -0
@@ -0,0 +1,261 @@
1
+ /**
2
+ * Environment Variables — support for Claude Code env vars.
3
+ *
4
+ * Reads and normalizes the ~50 most important environment variables
5
+ * that control Claude Code behavior.
6
+ */
7
+
8
+ /**
9
+ * All supported environment variables with defaults and descriptions.
10
+ */
11
+ export const ENV_SCHEMA = {
12
+ // API Configuration
13
+ ANTHROPIC_API_KEY: { type: 'string', description: 'Anthropic API key' },
14
+ ANTHROPIC_BASE_URL: { type: 'string', default: 'https://api.anthropic.com', description: 'Anthropic API base URL' },
15
+ ANTHROPIC_MODEL: { type: 'string', description: 'Override default model' },
16
+ OPENAI_API_KEY: { type: 'string', description: 'OpenAI API key for compatible models' },
17
+ OPENAI_BASE_URL: { type: 'string', default: 'https://api.openai.com/v1', description: 'OpenAI-compatible base URL' },
18
+ GOOGLE_API_KEY: { type: 'string', description: 'Google AI API key' },
19
+ GEMINI_API_KEY: { type: 'string', description: 'Alias for GOOGLE_API_KEY' },
20
+
21
+ // Model Configuration
22
+ CLAUDE_CODE_MAX_OUTPUT_TOKENS: { type: 'number', default: 16384, description: 'Max output tokens' },
23
+ CLAUDE_CODE_SUBAGENT_MODEL: { type: 'string', description: 'Model for subagents' },
24
+ CLAUDE_CODE_EFFORT_LEVEL: { type: 'string', default: 'normal', description: 'Effort level (low/normal/high)' },
25
+
26
+ // Behavior Flags
27
+ CLAUDE_CODE_BRIEF: { type: 'boolean', default: false, description: 'Brief output mode' },
28
+ CLAUDE_CODE_DISABLE_CRON: { type: 'boolean', default: false, description: 'Disable cron tasks' },
29
+ CLAUDE_CODE_ENABLE_TASKS: { type: 'boolean', default: false, description: 'Enable task system' },
30
+ CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: { type: 'boolean', default: false, description: 'Enable agent teams' },
31
+ CLAUDE_CODE_DEBUG: { type: 'boolean', default: false, description: 'Debug mode' },
32
+ CLAUDE_CODE_DISABLE_TELEMETRY: { type: 'boolean', default: false, description: 'Disable telemetry' },
33
+
34
+ // Permission and Security
35
+ CLAUDE_CODE_PERMISSION_MODE: { type: 'string', default: 'default', description: 'Permission mode' },
36
+ CLAUDE_CODE_SANDBOX: { type: 'boolean', default: true, description: 'Enable sandbox' },
37
+
38
+ // Context and Memory
39
+ CLAUDE_CODE_MAX_CONTEXT_TOKENS: { type: 'number', default: 180000, description: 'Max context window tokens' },
40
+ CLAUDE_CODE_AUTO_COMPACT: { type: 'boolean', default: true, description: 'Auto-compact context' },
41
+
42
+ // UI and Display
43
+ SHOW_THINKING: { type: 'boolean', default: false, description: 'Show thinking blocks' },
44
+ SHOW_TOOL_RESULTS: { type: 'boolean', default: false, description: 'Show tool results in REPL' },
45
+ NO_COLOR: { type: 'boolean', default: false, description: 'Disable colored output' },
46
+ TERM: { type: 'string', description: 'Terminal type' },
47
+
48
+ // MCP
49
+ MCP_DEBUG: { type: 'boolean', default: false, description: 'MCP debug logging' },
50
+
51
+ // Remote
52
+ REMOTE_AGENT_URL: { type: 'string', description: 'Remote agent endpoint' },
53
+ REMOTE_AGENT_TOKEN: { type: 'string', description: 'Remote agent auth token' },
54
+
55
+ // Search
56
+ BRAVE_API_KEY: { type: 'string', description: 'Brave Search API key' },
57
+ SEARXNG_URL: { type: 'string', description: 'SearXNG instance URL' },
58
+
59
+ // Networking
60
+ HTTP_PROXY: { type: 'string', description: 'HTTP proxy URL' },
61
+ HTTPS_PROXY: { type: 'string', description: 'HTTPS proxy URL' },
62
+ NO_PROXY: { type: 'string', description: 'No-proxy list' },
63
+
64
+ // Agent Identity
65
+ AGENT_ID: { type: 'string', default: 'main', description: 'Agent identifier for teams' },
66
+
67
+ // Feature Flags
68
+ CLAUDE_CODE_THINKING: { type: 'boolean', default: false, description: 'Enable extended thinking' },
69
+ CLAUDE_CODE_THINKING_BUDGET: { type: 'number', default: 10000, description: 'Thinking token budget' },
70
+ CLAUDE_CODE_STREAMING: { type: 'boolean', default: true, description: 'Enable streaming' },
71
+
72
+ // Paths
73
+ CLAUDE_CONFIG_DIR: { type: 'string', description: 'Custom config directory' },
74
+ CLAUDE_CACHE_DIR: { type: 'string', description: 'Custom cache directory' },
75
+
76
+ // Extended: OAuth & Auth
77
+ CLAUDE_OAUTH_CLIENT_ID: { type: 'string', description: 'OAuth client ID' },
78
+ CLAUDE_OAUTH_REDIRECT_URI: { type: 'string', default: 'http://localhost:9876/callback', description: 'OAuth redirect URI' },
79
+ ANTHROPIC_AUTH_TOKEN: { type: 'string', description: 'Anthropic auth token (OAuth)' },
80
+
81
+ // Extended: Sandbox & Security
82
+ CLAUDE_CODE_SANDBOX_PLATFORM: { type: 'string', description: 'Override sandbox platform (linux/darwin)' },
83
+ CLAUDE_CODE_INJECTION_CHECK: { type: 'boolean', default: true, description: 'Enable command injection checks' },
84
+ CLAUDE_CODE_PATH_CHECK: { type: 'boolean', default: true, description: 'Enable file path validation' },
85
+
86
+ // Extended: Rate Limiting
87
+ CLAUDE_CODE_MAX_RETRIES: { type: 'number', default: 5, description: 'Max API retries on 429/529' },
88
+ CLAUDE_CODE_RETRY_BASE_DELAY: { type: 'number', default: 1000, description: 'Base retry delay in ms' },
89
+ CLAUDE_CODE_RETRY_MAX_DELAY: { type: 'number', default: 60000, description: 'Max retry delay in ms' },
90
+
91
+ // Extended: Agent Teams
92
+ CLAUDE_CODE_TEAM_SIZE: { type: 'number', default: 5, description: 'Max team size for multi-agent' },
93
+ CLAUDE_CODE_TEAM_BROADCAST: { type: 'boolean', default: false, description: 'Broadcast messages to all teammates' },
94
+
95
+ // Extended: Providers
96
+ AWS_ACCESS_KEY_ID: { type: 'string', description: 'AWS access key for Bedrock' },
97
+ AWS_SECRET_ACCESS_KEY: { type: 'string', description: 'AWS secret key for Bedrock' },
98
+ AWS_REGION: { type: 'string', default: 'us-east-1', description: 'AWS region for Bedrock' },
99
+ GOOGLE_APPLICATION_CREDENTIALS: { type: 'string', description: 'GCP service account credentials path' },
100
+ VERTEX_PROJECT: { type: 'string', description: 'GCP project for Vertex AI' },
101
+ VERTEX_REGION: { type: 'string', default: 'us-central1', description: 'GCP region for Vertex AI' },
102
+
103
+ // Extended: Cron & Scheduling
104
+ CLAUDE_CODE_CRON_INTERVAL: { type: 'number', default: 60000, description: 'Cron check interval in ms' },
105
+ CLAUDE_CODE_SCHEDULED_TASKS_FILE: { type: 'string', description: 'Path to scheduled tasks JSON' },
106
+
107
+ // Extended: Plugins
108
+ CLAUDE_CODE_PLUGIN_DIR: { type: 'string', description: 'Custom plugin directory' },
109
+ CLAUDE_CODE_DISABLE_PLUGINS: { type: 'boolean', default: false, description: 'Disable all plugins' },
110
+
111
+ // Extended: Session
112
+ CLAUDE_CODE_SESSION_TTL: { type: 'number', default: 86400000, description: 'Session TTL in ms (default 24h)' },
113
+ CLAUDE_CODE_AUTO_SAVE: { type: 'boolean', default: true, description: 'Auto-save sessions' },
114
+
115
+ // Extended: Logging
116
+ CLAUDE_CODE_LOG_LEVEL: { type: 'string', default: 'info', description: 'Log level (debug/info/warn/error)' },
117
+ CLAUDE_CODE_LOG_FILE: { type: 'string', description: 'Log file path' },
118
+
119
+ // Extended: Hooks
120
+ CLAUDE_CODE_HOOK_TIMEOUT: { type: 'number', default: 10000, description: 'Hook execution timeout in ms' },
121
+ CLAUDE_CODE_HOOK_FAIL_OPEN: { type: 'boolean', default: true, description: 'Allow on hook failure' },
122
+
123
+ // Extended: Context
124
+ CLAUDE_CODE_COMPACT_THRESHOLD: { type: 'number', default: 0.8, description: 'Context compaction threshold (0-1)' },
125
+ CLAUDE_CODE_MAX_MESSAGES: { type: 'number', default: 200, description: 'Max messages in context' },
126
+
127
+ // Extended: Cache
128
+ CLAUDE_CODE_PROMPT_CACHE: { type: 'boolean', default: true, description: 'Enable prompt caching' },
129
+ CLAUDE_CODE_CACHE_TTL: { type: 'number', default: 300000, description: 'Cache TTL in ms (default 5min)' },
130
+
131
+ // Extended: Output
132
+ CLAUDE_CODE_MAX_LINES: { type: 'number', default: 200, description: 'Max output lines for tools' },
133
+ CLAUDE_CODE_TRUNCATE: { type: 'boolean', default: true, description: 'Truncate long outputs' },
134
+ CLAUDE_CODE_JSON_OUTPUT: { type: 'boolean', default: false, description: 'Output JSON instead of text' },
135
+
136
+ // Extended: Git
137
+ CLAUDE_CODE_GIT_ENABLED: { type: 'boolean', default: true, description: 'Enable git operations' },
138
+ CLAUDE_CODE_GIT_AUTO_COMMIT: { type: 'boolean', default: false, description: 'Auto-commit changes' },
139
+
140
+ // Extended: Editor
141
+ EDITOR: { type: 'string', description: 'Default text editor' },
142
+ VISUAL: { type: 'string', description: 'Default visual editor' },
143
+
144
+ // Extended: Language
145
+ LANG: { type: 'string', description: 'System locale' },
146
+ LC_ALL: { type: 'string', description: 'Locale override' },
147
+
148
+ // Extended: CI/CD
149
+ CI: { type: 'boolean', default: false, description: 'Running in CI environment' },
150
+ GITHUB_ACTIONS: { type: 'boolean', default: false, description: 'Running in GitHub Actions' },
151
+ GITLAB_CI: { type: 'boolean', default: false, description: 'Running in GitLab CI' },
152
+
153
+ // Extended: Container
154
+ CONTAINER: { type: 'boolean', default: false, description: 'Running in container' },
155
+ DOCKER: { type: 'boolean', default: false, description: 'Running in Docker' },
156
+ CODESPACE_NAME: { type: 'string', description: 'GitHub Codespace name' },
157
+
158
+ // Extended: Notification
159
+ CLAUDE_CODE_NOTIFY: { type: 'boolean', default: false, description: 'Enable desktop notifications' },
160
+ CLAUDE_CODE_WEBHOOK_URL: { type: 'string', description: 'Webhook URL for notifications' },
161
+
162
+ // Extended: Experimental
163
+ CLAUDE_CODE_EXPERIMENTAL_MCP: { type: 'boolean', default: false, description: 'Enable experimental MCP features' },
164
+ CLAUDE_CODE_EXPERIMENTAL_TOOLS: { type: 'boolean', default: false, description: 'Enable experimental tools' },
165
+ CLAUDE_CODE_EXPERIMENTAL_VISION: { type: 'boolean', default: false, description: 'Enable vision/image support' },
166
+ CLAUDE_CODE_EXPERIMENTAL_MEMORY: { type: 'boolean', default: false, description: 'Enable persistent memory' },
167
+
168
+ // Extended: Worktree
169
+ CLAUDE_CODE_WORKTREE_DIR: { type: 'string', description: 'Default worktree base directory' },
170
+ CLAUDE_CODE_AUTO_WORKTREE: { type: 'boolean', default: false, description: 'Auto-create worktrees for branches' },
171
+
172
+ // Extended: Notebook
173
+ CLAUDE_CODE_NOTEBOOK_KERNEL: { type: 'string', default: 'python3', description: 'Default Jupyter kernel' },
174
+
175
+ // Extended: LSP
176
+ CLAUDE_CODE_LSP_ENABLED: { type: 'boolean', default: false, description: 'Enable LSP integration' },
177
+ CLAUDE_CODE_LSP_PORT: { type: 'number', default: 0, description: 'LSP server port (0 = auto)' },
178
+
179
+ // Extended: Timeouts
180
+ CLAUDE_CODE_TOOL_TIMEOUT: { type: 'number', default: 120000, description: 'Tool execution timeout in ms' },
181
+ CLAUDE_CODE_API_TIMEOUT: { type: 'number', default: 300000, description: 'API call timeout in ms' },
182
+ CLAUDE_CODE_MCP_TIMEOUT: { type: 'number', default: 30000, description: 'MCP operation timeout in ms' },
183
+
184
+ // Extended: Permissions (additional)
185
+ CLAUDE_CODE_ALLOWED_TOOLS: { type: 'string', description: 'Comma-separated list of allowed tools' },
186
+ CLAUDE_CODE_DISALLOWED_TOOLS: { type: 'string', description: 'Comma-separated list of disallowed tools' },
187
+
188
+ // Extended: Telemetry (additional)
189
+ CLAUDE_CODE_TELEMETRY_ENDPOINT: { type: 'string', description: 'Custom telemetry endpoint URL' },
190
+ CLAUDE_CODE_SENTRY_DSN: { type: 'string', description: 'Sentry DSN for error reporting' },
191
+ };
192
+
193
+ /**
194
+ * Read and normalize all environment variables.
195
+ * @returns {object} normalized env config
196
+ */
197
+ export function readEnv() {
198
+ const env = {};
199
+
200
+ for (const [key, schema] of Object.entries(ENV_SCHEMA)) {
201
+ const raw = process.env[key];
202
+ if (raw === undefined) {
203
+ if (schema.default !== undefined) {
204
+ env[key] = schema.default;
205
+ }
206
+ continue;
207
+ }
208
+
209
+ switch (schema.type) {
210
+ case 'boolean':
211
+ env[key] = raw === '1' || raw === 'true' || raw === 'yes';
212
+ break;
213
+ case 'number':
214
+ env[key] = parseInt(raw, 10);
215
+ if (isNaN(env[key])) env[key] = schema.default;
216
+ break;
217
+ default:
218
+ env[key] = raw;
219
+ }
220
+ }
221
+
222
+ return env;
223
+ }
224
+
225
+ /**
226
+ * Get a specific env var with type coercion.
227
+ * @param {string} key
228
+ * @param {*} [defaultValue]
229
+ */
230
+ export function getEnv(key, defaultValue) {
231
+ const schema = ENV_SCHEMA[key];
232
+ const raw = process.env[key];
233
+
234
+ if (raw === undefined) return defaultValue ?? schema?.default;
235
+
236
+ if (schema?.type === 'boolean') return raw === '1' || raw === 'true';
237
+ if (schema?.type === 'number') {
238
+ const n = parseInt(raw, 10);
239
+ return isNaN(n) ? defaultValue : n;
240
+ }
241
+ return raw;
242
+ }
243
+
244
+ /**
245
+ * List all supported env vars with their current values.
246
+ */
247
+ export function listEnvVars() {
248
+ const result = [];
249
+ for (const [key, schema] of Object.entries(ENV_SCHEMA)) {
250
+ const value = process.env[key];
251
+ result.push({
252
+ key,
253
+ type: schema.type,
254
+ value: value || undefined,
255
+ default: schema.default,
256
+ description: schema.description,
257
+ isSet: value !== undefined,
258
+ });
259
+ }
260
+ return result;
261
+ }
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Settings chain — user/project/local/managed (from decompiled source).
3
+ *
4
+ * Supports all 76 properties from Claude Code's settings schema.
5
+ * Five-layer hierarchy: user > project > local > managed > feature flags.
6
+ */
7
+ import fs from 'fs';
8
+ import path from 'path';
9
+ import os from 'os';
10
+
11
+ /**
12
+ * Full settings schema with defaults.
13
+ */
14
+ export const SETTINGS_SCHEMA = {
15
+ permissions: {
16
+ defaultMode: 'default',
17
+ allowRules: [],
18
+ denyRules: [],
19
+ allowedTools: [],
20
+ deniedTools: [],
21
+ sandbox: true,
22
+ sandboxAllowPaths: [],
23
+ },
24
+ hooks: {
25
+ PreToolUse: [],
26
+ PostToolUse: [],
27
+ PreToolUseFailure: [],
28
+ PostToolUseFailure: [],
29
+ Notification: [],
30
+ Stop: [],
31
+ SessionStart: [],
32
+ },
33
+ model: 'claude-sonnet-4-6',
34
+ subagentModel: null,
35
+ fastModel: 'claude-haiku-4-5',
36
+ fastMode: false,
37
+ alwaysThinkingEnabled: false,
38
+ autoCompactEnabled: true,
39
+ fileCheckpointingEnabled: true,
40
+ promptSuggestionEnabled: true,
41
+ briefMode: false,
42
+ maxContextTokens: 180000,
43
+ maxOutputTokens: 16384,
44
+ maxTokens: 16384,
45
+ thinkingBudget: 10000,
46
+ compactThreshold: 0.8,
47
+ stream: true,
48
+ mcpServers: {},
49
+ theme: 'auto',
50
+ showThinking: false,
51
+ showToolResults: false,
52
+ showTokenUsage: true,
53
+ vimMode: false,
54
+ terminalBell: false,
55
+ telemetryEnabled: false,
56
+ debugMode: false,
57
+ enableTeams: false,
58
+ agentId: null,
59
+ cronEnabled: true,
60
+ featureFlags: {},
61
+ };
62
+
63
+ export async function loadSettings() {
64
+ const chain = [
65
+ path.join(os.homedir(), '.claude', 'settings.json'),
66
+ path.join(process.cwd(), '.claude', 'settings.json'),
67
+ path.join(process.cwd(), '.claude', 'settings.local.json'),
68
+ ];
69
+
70
+ let merged = deepClone(SETTINGS_SCHEMA);
71
+
72
+ for (const file of chain) {
73
+ try {
74
+ const data = JSON.parse(fs.readFileSync(file, 'utf-8'));
75
+ merged = deepMerge(merged, data);
76
+ } catch {
77
+ // File not found or invalid
78
+ }
79
+ }
80
+
81
+ applyEnvOverrides(merged);
82
+ return merged;
83
+ }
84
+
85
+ function deepClone(obj) {
86
+ return JSON.parse(JSON.stringify(obj));
87
+ }
88
+
89
+ function deepMerge(target, source) {
90
+ const result = { ...target };
91
+ for (const [key, value] of Object.entries(source)) {
92
+ if (value && typeof value === 'object' && !Array.isArray(value) && typeof result[key] === 'object' && !Array.isArray(result[key])) {
93
+ result[key] = deepMerge(result[key] || {}, value);
94
+ } else {
95
+ result[key] = value;
96
+ }
97
+ }
98
+ return result;
99
+ }
100
+
101
+ function applyEnvOverrides(settings) {
102
+ if (process.env.ANTHROPIC_MODEL) settings.model = process.env.ANTHROPIC_MODEL;
103
+ if (process.env.CLAUDE_CODE_SUBAGENT_MODEL) settings.subagentModel = process.env.CLAUDE_CODE_SUBAGENT_MODEL;
104
+ if (process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS) {
105
+ const n = parseInt(process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS, 10);
106
+ if (!isNaN(n)) { settings.maxOutputTokens = n; settings.maxTokens = n; }
107
+ }
108
+ if (process.env.CLAUDE_CODE_MAX_CONTEXT_TOKENS) {
109
+ const n = parseInt(process.env.CLAUDE_CODE_MAX_CONTEXT_TOKENS, 10);
110
+ if (!isNaN(n)) settings.maxContextTokens = n;
111
+ }
112
+ if (process.env.CLAUDE_CODE_BRIEF === '1') settings.briefMode = true;
113
+ if (process.env.CLAUDE_CODE_DEBUG === '1') settings.debugMode = true;
114
+ if (process.env.CLAUDE_CODE_PERMISSION_MODE) settings.permissions.defaultMode = process.env.CLAUDE_CODE_PERMISSION_MODE;
115
+ if (process.env.CLAUDE_CODE_STREAMING === '0') settings.stream = false;
116
+ if (process.env.CLAUDE_CODE_THINKING === '1') settings.alwaysThinkingEnabled = true;
117
+ if (process.env.CLAUDE_CODE_DISABLE_CRON === '1') settings.cronEnabled = false;
118
+ if (process.env.CLAUDE_CODE_ENABLE_TASKS === '1') settings.enableTeams = true;
119
+ }