@sirmrmarty/n8n-nodes-tmux-orchestrator
Version:
n8n nodes for orchestrating Claude AI agents through tmux sessions
329 lines (325 loc) • 12.9 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TmuxOrchestratorApi = void 0;
class TmuxOrchestratorApi {
constructor() {
this.name = 'tmuxOrchestratorApi';
this.displayName = 'Tmux Orchestrator Configuration';
this.documentationUrl = 'https://github.com/sirmrmarty/n8n-nodes-tmux-claudecode';
this.properties = [
{
displayName: 'Configuration Name',
name: 'configName',
type: 'string',
default: 'Default',
description: 'Name for this configuration',
},
{
displayName: 'Use External Scripts',
name: 'useExternalScripts',
type: 'boolean',
default: false,
description: 'Use external scripts instead of bundled ones',
},
{
displayName: 'External Scripts Directory',
name: 'scriptsDirectory',
type: 'string',
default: '',
displayOptions: {
show: {
useExternalScripts: [true],
},
},
description: 'Directory containing external tmux orchestrator scripts (leave empty to use bundled scripts)',
},
{
displayName: 'Project Base Path',
name: 'projectBasePath',
type: 'string',
default: '~/Coding',
description: 'Base directory for projects',
},
{
displayName: 'Claude Command',
name: 'claudeCommand',
type: 'string',
default: 'claude',
description: 'Command to start Claude agents',
},
{
displayName: 'Claude Code Mode',
name: 'claudeCodeMode',
type: 'options',
options: [
{
name: 'Development Mode',
value: 'development',
},
{
name: 'Full Stack Mode',
value: 'fullstack',
},
],
default: 'development',
description: 'Operating mode for Claude Code instance',
},
{
displayName: 'Agent Startup Delay',
name: 'agentStartupDelay',
type: 'number',
default: 5000,
description: 'Milliseconds to wait for agent to start',
},
{
displayName: 'Max Windows Per Session',
name: 'maxWindowsPerSession',
type: 'number',
default: 10,
description: 'Maximum windows allowed per tmux session',
},
{
displayName: 'Enable Safety Mode',
name: 'enableSafetyMode',
type: 'boolean',
default: false,
description: 'Require confirmation for potentially destructive operations',
},
{
displayName: 'Log Directory',
name: 'logDirectory',
type: 'string',
default: '/var/log/n8n/tmux-orchestrator',
description: 'Directory for storing agent logs',
},
{
displayName: 'Git Auto-Commit',
name: 'gitAutoCommit',
type: 'boolean',
default: true,
description: 'Enable automatic git commits every 30 minutes',
},
{
displayName: 'Git Commit Interval',
name: 'gitCommitInterval',
type: 'number',
default: 30,
description: 'Minutes between automatic git commits',
},
{
displayName: 'Claude Code Configuration',
name: 'claudeCodeConfig',
type: 'json',
default: JSON.stringify({
development: {
briefing: 'You are Claude Code in development mode. Focus on implementation, testing, and code quality.',
tools: ['git', 'npm', 'python', 'jest', 'pytest'],
commitFrequency: 30,
},
fullstack: {
briefing: 'You are Claude Code in full stack mode. Handle all aspects: development, testing, deployment, and project management.',
tools: ['git', 'npm', 'python', 'jest', 'pytest', 'docker', 'github-cli'],
commitFrequency: 30,
},
}, null, 2),
description: 'Configuration templates for Claude Code operating modes',
},
{
displayName: 'Monitor Health Check Interval',
name: 'monitorHealthCheckInterval',
type: 'number',
default: 300,
description: 'Seconds between health checks',
},
{
displayName: 'Issue Detection Keywords',
name: 'issueDetectionKeywords',
type: 'string',
default: 'error,failed,exception,blocked,stuck,waiting,timeout,permission denied',
description: 'Comma-separated keywords for detecting Claude Code issues',
},
{
displayName: 'Enable Webhooks',
name: 'enableWebhooks',
type: 'boolean',
default: false,
description: 'Enable webhook notifications for agent events',
},
{
displayName: 'Webhook URL',
name: 'webhookUrl',
type: 'string',
default: '',
displayOptions: {
show: {
enableWebhooks: [true],
},
},
description: 'URL for webhook notifications',
},
{
displayName: 'Slack Integration',
name: 'slackIntegration',
type: 'boolean',
default: false,
description: 'Enable Slack notifications',
},
{
displayName: 'Slack Webhook URL',
name: 'slackWebhookUrl',
type: 'string',
default: '',
displayOptions: {
show: {
slackIntegration: [true],
},
},
description: 'Slack webhook URL for notifications',
},
{
displayName: 'Git Worktree Configuration',
name: 'worktreeConfig',
type: 'collection',
default: {},
description: 'Configure git worktree support for projects',
options: [
{
displayName: 'Use Git Worktree',
name: 'useGitWorktree',
type: 'boolean',
default: false,
description: 'Create git worktrees for projects instead of regular repos',
},
{
displayName: 'Main Branch',
name: 'mainBranch',
type: 'string',
default: 'main',
description: 'Name of the main branch to create worktrees from',
},
{
displayName: 'Worktree Base Path',
name: 'worktreeBasePath',
type: 'string',
default: '~/worktrees',
description: 'Base directory for git worktrees',
},
{
displayName: 'Parent Repository Path',
name: 'parentRepoPath',
type: 'string',
default: '',
description: 'Path to parent repository for worktrees',
},
],
},
{
displayName: 'Subagent Configuration',
name: 'subagentConfig',
type: 'collection',
default: {},
description: 'Configure available subagents for Claude Code',
options: [
{
displayName: 'Enable All Subagents',
name: 'enableAllSubagents',
type: 'boolean',
default: true,
description: 'Enable all available Claude Code subagents',
},
{
displayName: 'Custom Subagents',
name: 'customSubagents',
type: 'string',
default: '',
displayOptions: {
show: {
enableAllSubagents: [false],
},
},
description: 'Comma-separated list of specific subagents to enable (e.g. developer,qa-expert,code-reviewer)',
},
],
},
{
displayName: 'MCP Server Configuration',
name: 'mcpServers',
type: 'json',
default: JSON.stringify({
filesystem: {
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-filesystem', '/home'],
},
github: {
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-github'],
env: {
GITHUB_TOKEN: 'your-github-token',
},
},
}, null, 2),
description: 'MCP server configuration for agent tools',
},
{
displayName: 'Claude Command Options',
name: 'claudeCommandOptions',
type: 'string',
default: '',
description: 'Additional command-line options for claude (e.g. --model claude-3-opus-20240229)',
},
{
displayName: 'GitHub Configuration',
name: 'githubConfig',
type: 'collection',
default: {},
description: 'Configure GitHub integration for pull requests',
options: [
{
displayName: 'GitHub Token',
name: 'githubToken',
type: 'string',
typeOptions: {
password: true,
},
default: '',
description: 'GitHub personal access token for API operations',
},
{
displayName: 'Default Repository',
name: 'defaultRepository',
type: 'string',
default: '',
description: 'Default GitHub repository (format: owner/repo)',
},
{
displayName: 'Auto-create PR',
name: 'autoCreatePR',
type: 'boolean',
default: false,
description: 'Automatically create PR when project is completed',
},
{
displayName: 'PR Template',
name: 'prTemplate',
type: 'string',
typeOptions: {
rows: 10,
},
default: `## Summary
{project_description}
## Changes
- {changes_summary}
## Test Plan
- {test_summary}
## QA Status
- {qa_status}
🤖 Generated with Claude Code Tmux Orchestrator`,
description: 'Template for pull request descriptions',
},
],
},
];
}
}
exports.TmuxOrchestratorApi = TmuxOrchestratorApi;
//# sourceMappingURL=TmuxOrchestratorApi.credentials.js.map