n8n-nodes-claude-code-cli 1.5.0 → 1.7.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.
- package/dist/index.js +520 -2
- package/dist/index.js.map +3 -3
- package/dist/nodes/ClaudeCode/ClaudeCode.node.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/ClaudeCode.node.js +520 -2
- package/dist/nodes/ClaudeCode/ClaudeCode.node.js.map +3 -3
- package/dist/nodes/ClaudeCode/descriptions/agentsDescription.d.ts +3 -0
- package/dist/nodes/ClaudeCode/descriptions/agentsDescription.d.ts.map +1 -0
- package/dist/nodes/ClaudeCode/descriptions/index.d.ts +2 -0
- package/dist/nodes/ClaudeCode/descriptions/index.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/descriptions/mcpServersDescription.d.ts +3 -0
- package/dist/nodes/ClaudeCode/descriptions/mcpServersDescription.d.ts.map +1 -0
- package/dist/nodes/ClaudeCode/descriptions/optionsDescription.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/interfaces/ClaudeCodeTypes.d.ts +50 -0
- package/dist/nodes/ClaudeCode/interfaces/ClaudeCodeTypes.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/interfaces/index.d.ts +1 -1
- package/dist/nodes/ClaudeCode/interfaces/index.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/transport/K8sPersistentExecutor.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/transport/k8s/podSpecBuilder.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/utils/commandBuilder.d.ts.map +1 -1
- package/dist/nodes/ClaudeCode/utils/optionsBuilder.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -174003,6 +174003,284 @@ var modelDescription = [
|
|
|
174003
174003
|
}
|
|
174004
174004
|
];
|
|
174005
174005
|
|
|
174006
|
+
// nodes/ClaudeCode/descriptions/agentsDescription.ts
|
|
174007
|
+
var agentsDescription = [
|
|
174008
|
+
{
|
|
174009
|
+
displayName: "Subagents",
|
|
174010
|
+
name: "agents",
|
|
174011
|
+
type: "fixedCollection",
|
|
174012
|
+
typeOptions: {
|
|
174013
|
+
multipleValues: true,
|
|
174014
|
+
multipleValueButtonText: "Add Subagent"
|
|
174015
|
+
},
|
|
174016
|
+
default: { agentsList: [] },
|
|
174017
|
+
displayOptions: {
|
|
174018
|
+
show: {
|
|
174019
|
+
operation: ["executePrompt", "executeWithContext"]
|
|
174020
|
+
}
|
|
174021
|
+
},
|
|
174022
|
+
options: [
|
|
174023
|
+
{
|
|
174024
|
+
name: "agentsList",
|
|
174025
|
+
displayName: "Agents",
|
|
174026
|
+
values: [
|
|
174027
|
+
{
|
|
174028
|
+
displayName: "Agent Name",
|
|
174029
|
+
name: "name",
|
|
174030
|
+
type: "string",
|
|
174031
|
+
default: "",
|
|
174032
|
+
required: true,
|
|
174033
|
+
placeholder: "code-reviewer",
|
|
174034
|
+
description: "Unique identifier for this agent. Lowercase letters, numbers, and hyphens only (3-50 chars)."
|
|
174035
|
+
},
|
|
174036
|
+
{
|
|
174037
|
+
displayName: "Description",
|
|
174038
|
+
name: "description",
|
|
174039
|
+
type: "string",
|
|
174040
|
+
typeOptions: { rows: 2 },
|
|
174041
|
+
default: "",
|
|
174042
|
+
required: true,
|
|
174043
|
+
placeholder: "Expert code reviewer. Use proactively when code changes are made.",
|
|
174044
|
+
description: "When Claude should delegate to this agent."
|
|
174045
|
+
},
|
|
174046
|
+
{
|
|
174047
|
+
displayName: "System Prompt",
|
|
174048
|
+
name: "prompt",
|
|
174049
|
+
type: "string",
|
|
174050
|
+
typeOptions: { rows: 5 },
|
|
174051
|
+
default: "",
|
|
174052
|
+
required: true,
|
|
174053
|
+
placeholder: "You are a senior code reviewer. Focus on...",
|
|
174054
|
+
description: "System prompt governing this agent's behavior."
|
|
174055
|
+
},
|
|
174056
|
+
{
|
|
174057
|
+
displayName: "Model",
|
|
174058
|
+
name: "model",
|
|
174059
|
+
type: "options",
|
|
174060
|
+
options: [
|
|
174061
|
+
{
|
|
174062
|
+
name: "Inherit (Parent Model)",
|
|
174063
|
+
value: "inherit"
|
|
174064
|
+
},
|
|
174065
|
+
{ name: "Sonnet", value: "sonnet" },
|
|
174066
|
+
{ name: "Opus", value: "opus" },
|
|
174067
|
+
{ name: "Haiku", value: "haiku" }
|
|
174068
|
+
],
|
|
174069
|
+
default: "inherit",
|
|
174070
|
+
description: "Model to use for this agent."
|
|
174071
|
+
},
|
|
174072
|
+
{
|
|
174073
|
+
displayName: "Allowed Tools",
|
|
174074
|
+
name: "tools",
|
|
174075
|
+
type: "string",
|
|
174076
|
+
default: "",
|
|
174077
|
+
placeholder: "Read, Grep, Glob, Bash(git:*)",
|
|
174078
|
+
description: "Tools this agent can use (comma-separated). Leave empty to inherit all tools."
|
|
174079
|
+
},
|
|
174080
|
+
{
|
|
174081
|
+
displayName: "Disallowed Tools",
|
|
174082
|
+
name: "disallowedTools",
|
|
174083
|
+
type: "string",
|
|
174084
|
+
default: "",
|
|
174085
|
+
placeholder: "Write, Edit, Bash(rm:*)",
|
|
174086
|
+
description: "Tools this agent cannot use (comma-separated). Takes precedence over allowed tools."
|
|
174087
|
+
},
|
|
174088
|
+
{
|
|
174089
|
+
displayName: "Permission Mode",
|
|
174090
|
+
name: "permissionMode",
|
|
174091
|
+
type: "options",
|
|
174092
|
+
options: [
|
|
174093
|
+
{ name: "Default", value: "" },
|
|
174094
|
+
{ name: "Accept Edits", value: "acceptEdits" },
|
|
174095
|
+
{ name: "Plan (Read-Only)", value: "plan" },
|
|
174096
|
+
{ name: "Don't Ask", value: "dontAsk" },
|
|
174097
|
+
{
|
|
174098
|
+
name: "Bypass Permissions",
|
|
174099
|
+
value: "bypassPermissions"
|
|
174100
|
+
},
|
|
174101
|
+
{ name: "Delegate", value: "delegate" }
|
|
174102
|
+
],
|
|
174103
|
+
default: "",
|
|
174104
|
+
description: "Permission mode for this agent. Leave empty to use default."
|
|
174105
|
+
},
|
|
174106
|
+
{
|
|
174107
|
+
displayName: "Max Turns",
|
|
174108
|
+
name: "maxTurns",
|
|
174109
|
+
type: "number",
|
|
174110
|
+
default: 0,
|
|
174111
|
+
description: "Maximum agentic turns before stopping. 0 = unlimited."
|
|
174112
|
+
},
|
|
174113
|
+
{
|
|
174114
|
+
displayName: "Memory",
|
|
174115
|
+
name: "memory",
|
|
174116
|
+
type: "options",
|
|
174117
|
+
options: [
|
|
174118
|
+
{ name: "None", value: "" },
|
|
174119
|
+
{
|
|
174120
|
+
name: "User (Cross-Project)",
|
|
174121
|
+
value: "user"
|
|
174122
|
+
},
|
|
174123
|
+
{
|
|
174124
|
+
name: "Project (Shareable)",
|
|
174125
|
+
value: "project"
|
|
174126
|
+
},
|
|
174127
|
+
{
|
|
174128
|
+
name: "Local (Not Committed)",
|
|
174129
|
+
value: "local"
|
|
174130
|
+
}
|
|
174131
|
+
],
|
|
174132
|
+
default: "",
|
|
174133
|
+
description: "Memory persistence mode for this agent."
|
|
174134
|
+
}
|
|
174135
|
+
]
|
|
174136
|
+
}
|
|
174137
|
+
],
|
|
174138
|
+
description: "Define custom subagents that Claude can delegate to during execution. Useful for specialized workflows (reviewer, debugger, architect...)."
|
|
174139
|
+
}
|
|
174140
|
+
];
|
|
174141
|
+
|
|
174142
|
+
// nodes/ClaudeCode/descriptions/mcpServersDescription.ts
|
|
174143
|
+
var mcpServersDescription = [
|
|
174144
|
+
{
|
|
174145
|
+
displayName: "MCP Servers",
|
|
174146
|
+
name: "mcpServers",
|
|
174147
|
+
type: "fixedCollection",
|
|
174148
|
+
typeOptions: {
|
|
174149
|
+
multipleValues: true,
|
|
174150
|
+
multipleValueButtonText: "Add MCP Server"
|
|
174151
|
+
},
|
|
174152
|
+
default: { serversList: [] },
|
|
174153
|
+
displayOptions: {
|
|
174154
|
+
show: {
|
|
174155
|
+
operation: ["executePrompt", "executeWithContext"]
|
|
174156
|
+
}
|
|
174157
|
+
},
|
|
174158
|
+
options: [
|
|
174159
|
+
{
|
|
174160
|
+
name: "serversList",
|
|
174161
|
+
displayName: "Servers",
|
|
174162
|
+
values: [
|
|
174163
|
+
{
|
|
174164
|
+
displayName: "Server Name",
|
|
174165
|
+
name: "name",
|
|
174166
|
+
type: "string",
|
|
174167
|
+
default: "",
|
|
174168
|
+
required: true,
|
|
174169
|
+
placeholder: "slack",
|
|
174170
|
+
description: "Unique identifier for this MCP server."
|
|
174171
|
+
},
|
|
174172
|
+
{
|
|
174173
|
+
displayName: "Transport Type",
|
|
174174
|
+
name: "serverType",
|
|
174175
|
+
type: "options",
|
|
174176
|
+
options: [
|
|
174177
|
+
{ name: "Stdio", value: "stdio" },
|
|
174178
|
+
{ name: "HTTP", value: "http" }
|
|
174179
|
+
],
|
|
174180
|
+
default: "stdio",
|
|
174181
|
+
description: "Transport protocol for communicating with the MCP server."
|
|
174182
|
+
},
|
|
174183
|
+
{
|
|
174184
|
+
displayName: "Command",
|
|
174185
|
+
name: "command",
|
|
174186
|
+
type: "string",
|
|
174187
|
+
default: "",
|
|
174188
|
+
required: true,
|
|
174189
|
+
placeholder: "npx -y @modelcontextprotocol/server-slack",
|
|
174190
|
+
description: "Full command to launch the MCP server. Arguments after the executable are automatically extracted (e.g. 'npx -y @org/server --key val' becomes command='npx', args=['-y','@org/server','--key','val']).",
|
|
174191
|
+
displayOptions: {
|
|
174192
|
+
show: {
|
|
174193
|
+
serverType: ["stdio"]
|
|
174194
|
+
}
|
|
174195
|
+
}
|
|
174196
|
+
},
|
|
174197
|
+
{
|
|
174198
|
+
displayName: "Arguments",
|
|
174199
|
+
name: "args",
|
|
174200
|
+
type: "string",
|
|
174201
|
+
default: "",
|
|
174202
|
+
placeholder: "--port,3000,--verbose",
|
|
174203
|
+
description: "Comma-separated arguments to pass to the command.",
|
|
174204
|
+
displayOptions: {
|
|
174205
|
+
show: {
|
|
174206
|
+
serverType: ["stdio"]
|
|
174207
|
+
}
|
|
174208
|
+
}
|
|
174209
|
+
},
|
|
174210
|
+
{
|
|
174211
|
+
displayName: "Environment Variables",
|
|
174212
|
+
name: "env",
|
|
174213
|
+
type: "string",
|
|
174214
|
+
typeOptions: { rows: 2 },
|
|
174215
|
+
default: "",
|
|
174216
|
+
placeholder: '{"SLACK_TOKEN": "xoxb-..."}',
|
|
174217
|
+
description: "JSON object of environment variables for the server process.",
|
|
174218
|
+
displayOptions: {
|
|
174219
|
+
show: {
|
|
174220
|
+
serverType: ["stdio"]
|
|
174221
|
+
}
|
|
174222
|
+
}
|
|
174223
|
+
},
|
|
174224
|
+
{
|
|
174225
|
+
displayName: "URL",
|
|
174226
|
+
name: "url",
|
|
174227
|
+
type: "string",
|
|
174228
|
+
default: "",
|
|
174229
|
+
required: true,
|
|
174230
|
+
placeholder: "https://mcp.example.com/sse",
|
|
174231
|
+
description: "HTTP endpoint URL of the MCP server.",
|
|
174232
|
+
displayOptions: {
|
|
174233
|
+
show: {
|
|
174234
|
+
serverType: ["http"]
|
|
174235
|
+
}
|
|
174236
|
+
}
|
|
174237
|
+
},
|
|
174238
|
+
{
|
|
174239
|
+
displayName: "Headers",
|
|
174240
|
+
name: "headers",
|
|
174241
|
+
type: "string",
|
|
174242
|
+
typeOptions: { rows: 2 },
|
|
174243
|
+
default: "",
|
|
174244
|
+
placeholder: '{"Authorization": "Bearer ..."}',
|
|
174245
|
+
description: "JSON object of HTTP headers to send with requests.",
|
|
174246
|
+
displayOptions: {
|
|
174247
|
+
show: {
|
|
174248
|
+
serverType: ["http"]
|
|
174249
|
+
}
|
|
174250
|
+
}
|
|
174251
|
+
}
|
|
174252
|
+
]
|
|
174253
|
+
}
|
|
174254
|
+
],
|
|
174255
|
+
description: "Define MCP servers to inject into the Claude Code session. Servers provide external tools (Slack, GitHub, databases, etc.)."
|
|
174256
|
+
},
|
|
174257
|
+
{
|
|
174258
|
+
displayName: "MCP Config File Paths",
|
|
174259
|
+
name: "mcpConfigFilePaths",
|
|
174260
|
+
type: "string",
|
|
174261
|
+
default: "",
|
|
174262
|
+
placeholder: "/path/to/mcp-config.json, /path/to/another.json",
|
|
174263
|
+
description: "Comma-separated file paths to MCP configuration files. Each file is passed as a separate --mcp-config argument.",
|
|
174264
|
+
displayOptions: {
|
|
174265
|
+
show: {
|
|
174266
|
+
operation: ["executePrompt", "executeWithContext"]
|
|
174267
|
+
}
|
|
174268
|
+
}
|
|
174269
|
+
},
|
|
174270
|
+
{
|
|
174271
|
+
displayName: "MCP Strict Mode",
|
|
174272
|
+
name: "mcpStrictMode",
|
|
174273
|
+
type: "boolean",
|
|
174274
|
+
default: false,
|
|
174275
|
+
description: "Whether to enable strict MCP config mode. When enabled, Claude Code will fail if any MCP server cannot be started.",
|
|
174276
|
+
displayOptions: {
|
|
174277
|
+
show: {
|
|
174278
|
+
operation: ["executePrompt", "executeWithContext"]
|
|
174279
|
+
}
|
|
174280
|
+
}
|
|
174281
|
+
}
|
|
174282
|
+
];
|
|
174283
|
+
|
|
174006
174284
|
// nodes/ClaudeCode/descriptions/optionsDescription.ts
|
|
174007
174285
|
var optionsDescription = [
|
|
174008
174286
|
{
|
|
@@ -174057,6 +174335,74 @@ var optionsDescription = [
|
|
|
174057
174335
|
placeholder: "You are a helpful code reviewer...",
|
|
174058
174336
|
description: "Additional system prompt to append to Claude Code default system prompt"
|
|
174059
174337
|
},
|
|
174338
|
+
{
|
|
174339
|
+
displayName: "System Prompt File",
|
|
174340
|
+
name: "systemPromptFile",
|
|
174341
|
+
type: "string",
|
|
174342
|
+
default: "",
|
|
174343
|
+
placeholder: "/path/to/system-prompt.txt",
|
|
174344
|
+
description: "Path to a file containing additional system prompt text to append to Claude Code default system prompt. Use this instead of inline System Prompt for long or reusable prompts."
|
|
174345
|
+
},
|
|
174346
|
+
{
|
|
174347
|
+
displayName: "Verbose",
|
|
174348
|
+
name: "verbose",
|
|
174349
|
+
type: "boolean",
|
|
174350
|
+
default: false,
|
|
174351
|
+
description: "Enable verbose logging. Automatically enabled when Output Format is Stream JSON. Useful for debugging in JSON or Text output modes."
|
|
174352
|
+
},
|
|
174353
|
+
{
|
|
174354
|
+
displayName: "Max Budget (USD)",
|
|
174355
|
+
name: "maxBudgetUsd",
|
|
174356
|
+
type: "number",
|
|
174357
|
+
default: 0,
|
|
174358
|
+
description: "Maximum dollar amount to spend before stopping execution. 0 means unlimited. Critical for controlling costs in automated workflows."
|
|
174359
|
+
},
|
|
174360
|
+
{
|
|
174361
|
+
displayName: "JSON Schema",
|
|
174362
|
+
name: "jsonSchema",
|
|
174363
|
+
type: "string",
|
|
174364
|
+
typeOptions: {
|
|
174365
|
+
rows: 4
|
|
174366
|
+
},
|
|
174367
|
+
default: "",
|
|
174368
|
+
placeholder: '{"type":"object","properties":{"summary":{"type":"string"}}}',
|
|
174369
|
+
description: "JSON schema for validated structured output. Claude will return JSON matching this schema. Must be a valid JSON schema string."
|
|
174370
|
+
},
|
|
174371
|
+
{
|
|
174372
|
+
displayName: "Fallback Model",
|
|
174373
|
+
name: "fallbackModel",
|
|
174374
|
+
type: "string",
|
|
174375
|
+
default: "",
|
|
174376
|
+
placeholder: "claude-sonnet-4-20250514",
|
|
174377
|
+
description: "Fallback model to use when the primary model is overloaded or unavailable. Improves resilience in production workflows."
|
|
174378
|
+
},
|
|
174379
|
+
{
|
|
174380
|
+
displayName: "Extended Context (1M Tokens)",
|
|
174381
|
+
name: "extendedContext",
|
|
174382
|
+
type: "boolean",
|
|
174383
|
+
default: true,
|
|
174384
|
+
description: "Enable 1M token context window for analyzing very large codebases in a single pass. Only supported by Claude Opus 4.6, Sonnet 4.6, Sonnet 4.5, and Sonnet 4. Has no effect on other models."
|
|
174385
|
+
},
|
|
174386
|
+
{
|
|
174387
|
+
displayName: "Worktree Isolation",
|
|
174388
|
+
name: "worktreeEnabled",
|
|
174389
|
+
type: "boolean",
|
|
174390
|
+
default: false,
|
|
174391
|
+
description: "Run Claude Code in an isolated git worktree. Each execution works on a separate copy of the repository, preventing conflicts with the main workspace. The worktree is automatically cleaned up if no changes are made."
|
|
174392
|
+
},
|
|
174393
|
+
{
|
|
174394
|
+
displayName: "Worktree Name",
|
|
174395
|
+
name: "worktreeName",
|
|
174396
|
+
type: "string",
|
|
174397
|
+
default: "",
|
|
174398
|
+
placeholder: "feature-auth",
|
|
174399
|
+
description: "Optional name for the worktree. If empty, Claude Code auto-generates a unique name. The worktree is created at <repo>/.claude/worktrees/<name>/.",
|
|
174400
|
+
displayOptions: {
|
|
174401
|
+
show: {
|
|
174402
|
+
worktreeEnabled: [true]
|
|
174403
|
+
}
|
|
174404
|
+
}
|
|
174405
|
+
},
|
|
174060
174406
|
{
|
|
174061
174407
|
displayName: "Additional Arguments",
|
|
174062
174408
|
name: "additionalArgs",
|
|
@@ -174110,6 +174456,28 @@ function buildCommand(options, credentials) {
|
|
|
174110
174456
|
if (options.systemPrompt) {
|
|
174111
174457
|
args.push("--append-system-prompt", options.systemPrompt);
|
|
174112
174458
|
}
|
|
174459
|
+
if (options.systemPromptFile) {
|
|
174460
|
+
args.push("--append-system-prompt-file", options.systemPromptFile);
|
|
174461
|
+
}
|
|
174462
|
+
if (options.verbose && options.outputFormat !== "stream-json") {
|
|
174463
|
+
args.push("--verbose");
|
|
174464
|
+
}
|
|
174465
|
+
if (options.maxBudgetUsd && options.maxBudgetUsd > 0) {
|
|
174466
|
+
args.push("--max-budget-usd", String(options.maxBudgetUsd));
|
|
174467
|
+
}
|
|
174468
|
+
if (options.jsonSchema) {
|
|
174469
|
+
args.push("--json-schema", options.jsonSchema);
|
|
174470
|
+
}
|
|
174471
|
+
if (options.fallbackModel) {
|
|
174472
|
+
args.push("--fallback-model", options.fallbackModel);
|
|
174473
|
+
}
|
|
174474
|
+
if (options.worktree !== void 0) {
|
|
174475
|
+
if (options.worktree) {
|
|
174476
|
+
args.push("--worktree", options.worktree);
|
|
174477
|
+
} else {
|
|
174478
|
+
args.push("--worktree");
|
|
174479
|
+
}
|
|
174480
|
+
}
|
|
174113
174481
|
if (options.contextFiles && options.contextFiles.length > 0) {
|
|
174114
174482
|
const uniqueDirs = /* @__PURE__ */ new Set();
|
|
174115
174483
|
options.contextFiles.forEach((file) => {
|
|
@@ -174122,9 +174490,31 @@ function buildCommand(options, credentials) {
|
|
|
174122
174490
|
args.push("--add-dir", dir);
|
|
174123
174491
|
});
|
|
174124
174492
|
}
|
|
174493
|
+
if (options.agents && Object.keys(options.agents).length > 0) {
|
|
174494
|
+
args.push("--agents", JSON.stringify(options.agents));
|
|
174495
|
+
}
|
|
174496
|
+
if (options.mcpConfig) {
|
|
174497
|
+
if (options.mcpConfig.inlineServers && Object.keys(options.mcpConfig.inlineServers).length > 0) {
|
|
174498
|
+
args.push(
|
|
174499
|
+
"--mcp-config",
|
|
174500
|
+
JSON.stringify({ mcpServers: options.mcpConfig.inlineServers })
|
|
174501
|
+
);
|
|
174502
|
+
}
|
|
174503
|
+
if (options.mcpConfig.configFilePaths && options.mcpConfig.configFilePaths.length > 0) {
|
|
174504
|
+
for (const filePath of options.mcpConfig.configFilePaths) {
|
|
174505
|
+
args.push("--mcp-config", filePath);
|
|
174506
|
+
}
|
|
174507
|
+
}
|
|
174508
|
+
if (options.mcpConfig.strictMode) {
|
|
174509
|
+
args.push("--strict-mcp-config");
|
|
174510
|
+
}
|
|
174511
|
+
}
|
|
174125
174512
|
if (options.additionalArgs && options.additionalArgs.length > 0) {
|
|
174126
174513
|
args.push(...options.additionalArgs);
|
|
174127
174514
|
}
|
|
174515
|
+
if (options.extendedContext === false) {
|
|
174516
|
+
env.CLAUDE_CODE_DISABLE_1M_CONTEXT = "1";
|
|
174517
|
+
}
|
|
174128
174518
|
if ("envVars" in credentials && credentials.envVars) {
|
|
174129
174519
|
const envVarsString = credentials.envVars;
|
|
174130
174520
|
if (envVarsString && envVarsString !== "{}") {
|
|
@@ -174325,6 +174715,95 @@ function buildExecutionOptions(context, itemIndex, operation) {
|
|
|
174325
174715
|
"default"
|
|
174326
174716
|
);
|
|
174327
174717
|
const permissionMode = permissionModeRaw && permissionModeRaw !== "default" ? permissionModeRaw : void 0;
|
|
174718
|
+
const agentsData = context.getNodeParameter("agents", itemIndex, {
|
|
174719
|
+
agentsList: []
|
|
174720
|
+
});
|
|
174721
|
+
let agents;
|
|
174722
|
+
if (agentsData.agentsList && agentsData.agentsList.length > 0) {
|
|
174723
|
+
agents = {};
|
|
174724
|
+
for (const agent of agentsData.agentsList) {
|
|
174725
|
+
const def = {
|
|
174726
|
+
description: agent.description,
|
|
174727
|
+
prompt: agent.prompt
|
|
174728
|
+
};
|
|
174729
|
+
if (agent.tools) {
|
|
174730
|
+
def.tools = agent.tools.split(",").map((t) => t.trim()).filter(Boolean);
|
|
174731
|
+
}
|
|
174732
|
+
if (agent.disallowedTools) {
|
|
174733
|
+
def.disallowedTools = agent.disallowedTools.split(",").map((t) => t.trim()).filter(Boolean);
|
|
174734
|
+
}
|
|
174735
|
+
if (agent.model && agent.model !== "inherit") {
|
|
174736
|
+
def.model = agent.model;
|
|
174737
|
+
}
|
|
174738
|
+
if (agent.permissionMode) {
|
|
174739
|
+
def.permissionMode = agent.permissionMode;
|
|
174740
|
+
}
|
|
174741
|
+
if (agent.maxTurns && agent.maxTurns > 0) {
|
|
174742
|
+
def.maxTurns = agent.maxTurns;
|
|
174743
|
+
}
|
|
174744
|
+
if (agent.memory) {
|
|
174745
|
+
def.memory = agent.memory;
|
|
174746
|
+
}
|
|
174747
|
+
agents[agent.name] = def;
|
|
174748
|
+
}
|
|
174749
|
+
}
|
|
174750
|
+
const mcpServersData = context.getNodeParameter("mcpServers", itemIndex, {
|
|
174751
|
+
serversList: []
|
|
174752
|
+
});
|
|
174753
|
+
const mcpConfigFilePathsRaw = context.getNodeParameter(
|
|
174754
|
+
"mcpConfigFilePaths",
|
|
174755
|
+
itemIndex,
|
|
174756
|
+
""
|
|
174757
|
+
);
|
|
174758
|
+
const mcpStrictMode = context.getNodeParameter(
|
|
174759
|
+
"mcpStrictMode",
|
|
174760
|
+
itemIndex,
|
|
174761
|
+
false
|
|
174762
|
+
);
|
|
174763
|
+
let mcpConfig;
|
|
174764
|
+
const hasInlineServers = mcpServersData.serversList && mcpServersData.serversList.length > 0;
|
|
174765
|
+
const configFilePaths = mcpConfigFilePathsRaw ? mcpConfigFilePathsRaw.split(",").map((p) => p.trim()).filter(Boolean) : [];
|
|
174766
|
+
const hasConfigFiles = configFilePaths.length > 0;
|
|
174767
|
+
if (hasInlineServers || hasConfigFiles || mcpStrictMode) {
|
|
174768
|
+
mcpConfig = {};
|
|
174769
|
+
if (hasInlineServers) {
|
|
174770
|
+
mcpConfig.inlineServers = {};
|
|
174771
|
+
for (const server of mcpServersData.serversList) {
|
|
174772
|
+
let def;
|
|
174773
|
+
if (server.serverType === "http") {
|
|
174774
|
+
def = {
|
|
174775
|
+
type: "http",
|
|
174776
|
+
url: server.url
|
|
174777
|
+
};
|
|
174778
|
+
if (server.headers) {
|
|
174779
|
+
def.headers = JSON.parse(server.headers);
|
|
174780
|
+
}
|
|
174781
|
+
} else {
|
|
174782
|
+
const commandParts = server.command.split(/\s+/).filter(Boolean);
|
|
174783
|
+
const executable = commandParts[0];
|
|
174784
|
+
const commandArgs = commandParts.slice(1);
|
|
174785
|
+
const explicitArgs = server.args ? server.args.split(",").map((a) => a.trim()).filter(Boolean) : [];
|
|
174786
|
+
const allArgs = [...commandArgs, ...explicitArgs];
|
|
174787
|
+
def = {
|
|
174788
|
+
command: executable
|
|
174789
|
+
};
|
|
174790
|
+
if (allArgs.length > 0) {
|
|
174791
|
+
def.args = allArgs;
|
|
174792
|
+
}
|
|
174793
|
+
if (server.env) {
|
|
174794
|
+
def.env = JSON.parse(server.env);
|
|
174795
|
+
}
|
|
174796
|
+
}
|
|
174797
|
+
mcpConfig.inlineServers[server.name] = def;
|
|
174798
|
+
}
|
|
174799
|
+
}
|
|
174800
|
+
if (hasConfigFiles) {
|
|
174801
|
+
mcpConfig.configFilePaths = configFilePaths;
|
|
174802
|
+
}
|
|
174803
|
+
if (mcpStrictMode) {
|
|
174804
|
+
mcpConfig.strictMode = true;
|
|
174805
|
+
}
|
|
174806
|
+
}
|
|
174328
174807
|
return {
|
|
174329
174808
|
prompt,
|
|
174330
174809
|
workingDirectory: options.workingDirectory,
|
|
@@ -174337,7 +174816,16 @@ function buildExecutionOptions(context, itemIndex, operation) {
|
|
|
174337
174816
|
contextFiles,
|
|
174338
174817
|
additionalArgs: additionalArgs.length > 0 ? additionalArgs : void 0,
|
|
174339
174818
|
timeout: options.timeout || 300,
|
|
174340
|
-
systemPrompt: options.systemPrompt || void 0
|
|
174819
|
+
systemPrompt: options.systemPrompt || void 0,
|
|
174820
|
+
systemPromptFile: options.systemPromptFile || void 0,
|
|
174821
|
+
verbose: options.verbose || void 0,
|
|
174822
|
+
maxBudgetUsd: options.maxBudgetUsd || void 0,
|
|
174823
|
+
jsonSchema: options.jsonSchema || void 0,
|
|
174824
|
+
fallbackModel: options.fallbackModel || void 0,
|
|
174825
|
+
agents,
|
|
174826
|
+
mcpConfig,
|
|
174827
|
+
extendedContext: options.extendedContext !== false,
|
|
174828
|
+
worktree: options.worktreeEnabled ? options.worktreeName || "" : void 0
|
|
174341
174829
|
};
|
|
174342
174830
|
}
|
|
174343
174831
|
|
|
@@ -174949,6 +175437,12 @@ function buildEphemeralPodSpec(credentials, options, podName) {
|
|
|
174949
175437
|
const claudeArgs = buildClaudeArgs(options);
|
|
174950
175438
|
const envVars = buildEnvVars(credentials);
|
|
174951
175439
|
const limits = buildResourceLimits(credentials);
|
|
175440
|
+
if (options.extendedContext === false) {
|
|
175441
|
+
envVars.push({
|
|
175442
|
+
name: "CLAUDE_CODE_DISABLE_1M_CONTEXT",
|
|
175443
|
+
value: "1"
|
|
175444
|
+
});
|
|
175445
|
+
}
|
|
174952
175446
|
const credentialPrefix = buildCredentialInjectionPrefix(credentials);
|
|
174953
175447
|
const container = credentialPrefix ? {
|
|
174954
175448
|
name: "claude-code",
|
|
@@ -175081,6 +175575,25 @@ function buildClaudeArgs(options) {
|
|
|
175081
175575
|
args.push("--add-dir", dir);
|
|
175082
175576
|
});
|
|
175083
175577
|
}
|
|
175578
|
+
if (options.agents && Object.keys(options.agents).length > 0) {
|
|
175579
|
+
args.push("--agents", JSON.stringify(options.agents));
|
|
175580
|
+
}
|
|
175581
|
+
if (options.mcpConfig) {
|
|
175582
|
+
if (options.mcpConfig.inlineServers && Object.keys(options.mcpConfig.inlineServers).length > 0) {
|
|
175583
|
+
args.push(
|
|
175584
|
+
"--mcp-config",
|
|
175585
|
+
JSON.stringify({ mcpServers: options.mcpConfig.inlineServers })
|
|
175586
|
+
);
|
|
175587
|
+
}
|
|
175588
|
+
if (options.mcpConfig.configFilePaths && options.mcpConfig.configFilePaths.length > 0) {
|
|
175589
|
+
for (const filePath of options.mcpConfig.configFilePaths) {
|
|
175590
|
+
args.push("--mcp-config", filePath);
|
|
175591
|
+
}
|
|
175592
|
+
}
|
|
175593
|
+
if (options.mcpConfig.strictMode) {
|
|
175594
|
+
args.push("--strict-mcp-config");
|
|
175595
|
+
}
|
|
175596
|
+
}
|
|
175084
175597
|
if (options.additionalArgs && options.additionalArgs.length > 0) {
|
|
175085
175598
|
args.push(...options.additionalArgs);
|
|
175086
175599
|
}
|
|
@@ -175377,10 +175890,11 @@ var K8sPersistentExecutor = class {
|
|
|
175377
175890
|
const claudePath = this.credentials.claudePath || "claude";
|
|
175378
175891
|
const claudeArgs = buildClaudeArgs(options);
|
|
175379
175892
|
const workDir = options.workingDirectory || this.credentials.defaultWorkingDir || "/workspace";
|
|
175893
|
+
const envPrefix = options.extendedContext === false ? "export CLAUDE_CODE_DISABLE_1M_CONTEXT=1 && " : "";
|
|
175380
175894
|
const command = [
|
|
175381
175895
|
"sh",
|
|
175382
175896
|
"-c",
|
|
175383
|
-
|
|
175897
|
+
`${envPrefix}cd ${workDir} && ${claudePath} ${claudeArgs.map((a) => `'${a.replace(/'/g, "'\\''")}'`).join(" ")}`
|
|
175384
175898
|
];
|
|
175385
175899
|
return this.execInPod(clients, namespace, command).then(
|
|
175386
175900
|
({ stdout, stderr, exitCode }) => {
|
|
@@ -175525,6 +176039,10 @@ var ClaudeCode = class {
|
|
|
175525
176039
|
...toolPermissionsDescription,
|
|
175526
176040
|
// Model selection
|
|
175527
176041
|
...modelDescription,
|
|
176042
|
+
// Custom subagents
|
|
176043
|
+
...agentsDescription,
|
|
176044
|
+
// MCP servers
|
|
176045
|
+
...mcpServersDescription,
|
|
175528
176046
|
// Additional options
|
|
175529
176047
|
...optionsDescription
|
|
175530
176048
|
]
|