description = "Interactive configuration for Orchestrator service (workflow engine and task scheduling)"
display_mode = "complete"
fallback_locale = "en-US"
name = "orchestrator_configuration"

# ============================================================================
# ORCHESTRATOR SERVICE FORM - COMPOSED FROM FRAGMENTS
# ============================================================================
# This form uses fragment composition pattern for modular configuration
# All fragments are located in ./fragments/ subdirectory
# ============================================================================

# DEPLOYMENT MODE SELECTION
# Determines service resources and feature set (solo/multiuser/cicd/enterprise)
[[items]]
description = "Select deployment mode and database backend"
includes = [
  "fragments/deployment/mode-selection.toml",
  "fragments/deployment/database-backend-selection.toml",
]
name = "deployment_mode_group"
title = "Deployment Configuration"
type = "group"

# WORKSPACE CONFIGURATION
# Workspace name, path, and multi-workspace mode
[[items]]
description = "Configure workspace context for this Orchestrator instance"
includes = ["fragments/workspace-section.toml"]
name = "workspace_group"
title = "Workspace Settings"
type = "group"

# SERVER CONFIGURATION
# HTTP server settings (host, port, workers, connections)
[[items]]
description = "Configure HTTP server for Orchestrator"
includes = ["fragments/server-section.toml"]
name = "server_group"
title = "Server Settings"
type = "group"

# DATABASE BACKEND CONFIGURATION
# Conditional sections based on selected backend
[[items]]
condition = "database_backend_selection == 'rocksdb'"
description = "Configure RocksDB backend"
includes = ["fragments/database-rocksdb-section.toml"]
name = "database_rocksdb_group"
title = "RocksDB Configuration"
type = "group"

[[items]]
condition = "database_backend_selection == 'surrealdb_embedded' || database_backend_selection == 'surrealdb_server'"
description = "Configure SurrealDB backend"
includes = ["fragments/database-surrealdb-section.toml"]
name = "database_surrealdb_group"
title = "SurrealDB Configuration"
type = "group"

[[items]]
condition = "database_backend_selection == 'postgresql'"
description = "Configure PostgreSQL backend"
includes = ["fragments/database-postgres-section.toml"]
name = "database_postgres_group"
title = "PostgreSQL Configuration"
type = "group"

# ORCHESTRATOR-SPECIFIC: STORAGE CONFIGURATION
# Storage backend, caching, compression, garbage collection
[[items]]
description = "Configure storage backend for workflow state and artifacts"
includes = ["fragments/orchestrator/storage-section.toml"]
name = "storage_group"
title = "Storage Configuration"
type = "group"

# ORCHESTRATOR-SPECIFIC: QUEUE CONFIGURATION
# Task queue, concurrency, retries, timeouts
[[items]]
description = "Configure task queue behavior and limits"
includes = ["fragments/orchestrator/queue-section.toml"]
name = "queue_group"
title = "Task Queue Configuration"
type = "group"

# ORCHESTRATOR-SPECIFIC: BATCH WORKFLOW CONFIGURATION
# Batch operations, parallel limits, checkpointing, rollback
[[items]]
description = "Configure batch workflow execution and recovery"
includes = ["fragments/orchestrator/batch-section.toml"]
name = "batch_group"
title = "Batch Workflow Configuration"
type = "group"

# ORCHESTRATOR-SPECIFIC: EXTENSIONS CONFIGURATION
# Extension auto-loading, OCI registry, discovery, sandboxing
[[items]]
description = "Configure extension management and auto-loading"
includes = ["fragments/orchestrator/extensions-section.toml"]
name = "extensions_group"
title = "Extensions Configuration"
type = "group"

# ORCHESTRATOR-SPECIFIC: PERFORMANCE CONFIGURATION
# CPU affinity, memory limits, profiling, caching, thread pools
[[items]]
description = "Configure advanced performance settings"
includes = ["fragments/orchestrator/performance-section.toml"]
name = "performance_group"
title = "Performance Configuration"
type = "group"

# MONITORING CONFIGURATION
# Metrics collection, health checks
[[items]]
description = "Configure metrics and health checks"
includes = ["fragments/monitoring-section.toml"]
name = "monitoring_group"
title = "Monitoring Configuration"
type = "group"

# LOGGING CONFIGURATION
# Log levels, formats, rotation
[[items]]
description = "Configure logging behavior and output"
includes = ["fragments/logging-section.toml"]
name = "logging_group"
title = "Logging Configuration"
type = "group"
