Compare commits

...

2 Commits

Author SHA1 Message Date
Jesús Pérez
0a6fc4acad
chore: lint update 2026-01-12 05:08:40 +00:00
Jesús Pérez
8c73edb0b9
chore: update toml files for lint 2026-01-12 05:07:30 +00:00
38 changed files with 1686 additions and 1673 deletions

View File

@ -5,12 +5,13 @@ TypeDialog enables interactive form-based configuration from Nickel schemas.
## Status ## Status
- **TypeDialog Binary**: Not yet installed (planned: `typedialog` command) - **TypeDialog Binary**: Not yet installed (planned: `typedialog` command)
- **Alternative**: FormInquire (Jinja2 templates + interactive forms) - **ACTIVE** - **TypeDialog Forms**: Created and ready (setup wizard, auth login, MFA enrollment)
- **Plan**: Full TypeDialog migration when available - **Bash Wrappers**: Implemented to handle TTY input properly
- **ForminQuire**: DEPRECATED - Archived to `.coder/archive/forminquire/`
## Directory Structure ## Directory Structure
``` ```plaintext
.typedialog/ .typedialog/
└── provisioning/platform/ └── provisioning/platform/
├── README.md # This file ├── README.md # This file
@ -24,7 +25,7 @@ TypeDialog enables interactive form-based configuration from Nickel schemas.
│ └── platform/schemas/ → ../../../schemas/platform/schemas/ │ └── platform/schemas/ → ../../../schemas/platform/schemas/
└── constraints/ # Validation constraints └── constraints/ # Validation constraints
└── constraints.toml # Shared validation rules └── constraints.toml # Shared validation rules
``` ```text
## How TypeDialog Would Work ## How TypeDialog Would Work
@ -34,7 +35,7 @@ TypeDialog enables interactive form-based configuration from Nickel schemas.
# Auto-generate form from Nickel schema # Auto-generate form from Nickel schema
typedialog generate-form --schema orchestrator.ncl \ typedialog generate-form --schema orchestrator.ncl \
--output forms/orchestrator.form.toml --output forms/orchestrator.form.toml
``` ```text
### 2. Interactive Configuration ### 2. Interactive Configuration
@ -42,7 +43,7 @@ typedialog generate-form --schema orchestrator.ncl \
# Run interactive form # Run interactive form
typedialog run-form --form forms/orchestrator.form.toml \ typedialog run-form --form forms/orchestrator.form.toml \
--output orchestrator-configured.ncl --output orchestrator-configured.ncl
``` ```text
### 3. Validation ### 3. Validation
@ -50,28 +51,38 @@ typedialog run-form --form forms/orchestrator.form.toml \
# Validate user input against schema # Validate user input against schema
typedialog validate --form forms/orchestrator.form.toml \ typedialog validate --form forms/orchestrator.form.toml \
--data user-config.ncl --data user-config.ncl
``` ```text
## Current Alternative: FormInquire ## Current Status: TypeDialog Forms Ready
While TypeDialog is not yet available, FormInquire provides form-based configuration: TypeDialog forms have been created and are ready to use:
**Location**: `provisioning/core/forminquire/` **Form Locations**:
- Setup wizard: `provisioning/.typedialog/core/forms/setup-wizard.toml`
- Auth login: `provisioning/.typedialog/core/forms/auth-login.toml`
- MFA enrollment: `provisioning/.typedialog/core/forms/mfa-enroll.toml`
**How it works**: **Bash Wrappers** (TTY-safe, handle input properly):
1. Define form in Jinja2 template (`.form.j2`) - `provisioning/core/shlib/setup-wizard-tty.sh`
2. Use `nu_plugin_tera` to render templates - `provisioning/core/shlib/auth-login-tty.sh`
3. Collect user input via FormInquire CLI - `provisioning/core/shlib/mfa-enroll-tty.sh`
4. Process results with Nushell scripts
**Usage Pattern**:
1. Bash wrapper calls TypeDialog (handles TTY input)
2. TypeDialog generates Nickel config file
3. Nushell scripts read the generated config (no input issues)
**Example**: **Example**:
```nushell
# Load Jinja2 template and show form
let form_data = forminquire load provisioning/core/forminquire/templates/orchestrator.form.j2
# Process user input ```bash
let config = process_form_input $form_data # Run TypeDialog setup wizard
``` ./provisioning/core/shlib/setup-wizard-tty.sh
# Nushell reads the generated config
let config = (open provisioning/.typedialog/core/generated/setup-wizard-result.json | from json)
```text
**Note**: ForminQuire (Jinja2-based forms) has been archived to `provisioning/.coder/archive/forminquire/` and is no longer in use.
## Integration Plan (When TypeDialog Available) ## Integration Plan (When TypeDialog Available)
@ -80,7 +91,7 @@ let config = process_form_input $form_data
```bash ```bash
cargo install --path /Users/Akasha/Development/typedialog cargo install --path /Users/Akasha/Development/typedialog
typedialog --version typedialog --version
``` ```text
### Step 2: Generate Forms from Schemas ### Step 2: Generate Forms from Schemas
@ -92,7 +103,7 @@ for schema in provisioning/schemas/platform/schemas/*.ncl; do
--schema $schema \ --schema $schema \
--output provisioning/platform/.typedialog/forms/${service}.form.toml --output provisioning/platform/.typedialog/forms/${service}.form.toml
done done
``` ```text
### Step 3: Create Setup Wizard ### Step 3: Create Setup Wizard
@ -102,7 +113,7 @@ provisioning setup-platform \
--mode solo|multiuser|enterprise \ --mode solo|multiuser|enterprise \
--provider docker|kubernetes \ --provider docker|kubernetes \
--interactive # Uses TypeDialog forms --interactive # Uses TypeDialog forms
``` ```text
### Step 4: Update Platform Setup Script ### Step 4: Update Platform Setup Script
@ -110,19 +121,18 @@ provisioning setup-platform \
# provisioning/platform/scripts/setup-platform-config.sh # provisioning/platform/scripts/setup-platform-config.sh
if command -v typedialog &> /dev/null; then if command -v typedialog &> /dev/null; then
# TypeDialog is installed # TypeDialog is installed - use bash wrapper for proper TTY handling
typedialog run-form \ ./provisioning/core/shlib/setup-wizard-tty.sh
--form .typedialog/forms/orchestrator.form.toml \
--output config/runtime/orchestrator.ncl
# Export to TOML # Read generated JSON config
nickel export --format toml config/runtime/orchestrator.ncl \ # Nushell scripts can now read the config without input issues
> config/runtime/generated/orchestrator.solo.toml
else else
# Fallback to FormInquire # Fallback to basic prompts
forminquire setup-wizard echo "TypeDialog not available. Using basic interactive prompts..."
# Nushell wizard with basic input prompts
nu -c "use provisioning/core/nulib/lib_provisioning/setup/wizard.nu *; run-setup-wizard"
fi fi
``` ```text
## Form Definition Example ## Form Definition Example
@ -164,7 +174,7 @@ label = "Logging Level"
options = ["debug", "info", "warning", "error"] options = ["debug", "info", "warning", "error"]
default = "info" default = "info"
required = false required = false
``` ```text
## Validation Constraints ## Validation Constraints
@ -184,11 +194,11 @@ replicas = "range(1, 10)"
[nginx] [nginx]
worker_processes = "range(1, 32)" worker_processes = "range(1, 32)"
worker_connections = "range(1, 65536)" worker_connections = "range(1, 65536)"
``` ```text
## Workflow: Setup to Deployment ## Workflow: Setup to Deployment
``` ```plaintext
1. User runs setup command 1. User runs setup command
2. TypeDialog displays form 2. TypeDialog displays form
@ -202,7 +212,7 @@ worker_connections = "range(1, 65536)"
6. Service reads TOML config 6. Service reads TOML config
7. Service starts with configured values 7. Service starts with configured values
``` ```text
## Benefits of TypeDialog Integration ## Benefits of TypeDialog Integration
@ -211,7 +221,8 @@ worker_connections = "range(1, 65536)"
- ✅ **Progressive disclosure** - Show advanced options only when needed - ✅ **Progressive disclosure** - Show advanced options only when needed
- ✅ **Consistent UX** - Same forms across platforms (CLI, Web, TUI) - ✅ **Consistent UX** - Same forms across platforms (CLI, Web, TUI)
- ✅ **Auto-generated** - Forms stay in sync with schemas automatically - ✅ **Auto-generated** - Forms stay in sync with schemas automatically
- ✅ **Fallback support** - FormInquire as alternative if TypeDialog unavailable - ✅ **TTY handling** - Bash wrappers solve Nushell input stack issues
- ✅ **Graceful fallback** - Falls back to basic prompts if TypeDialog unavailable
## Testing TypeDialog Forms ## Testing TypeDialog Forms
@ -228,27 +239,36 @@ typedialog run-form \
typedialog generate-sample \ typedialog generate-sample \
--form provisioning/platform/.typedialog/forms/orchestrator.form.toml \ --form provisioning/platform/.typedialog/forms/orchestrator.form.toml \
--output /tmp/orchestrator-sample.ncl --output /tmp/orchestrator-sample.ncl
``` ```text
## Migration Path ## Migration Path
### Phase A: Current (FormInquire) ### Phase A: Legacy (DEPRECATED)
``` ```plaintext
FormInquire (Jinja2) → Nushell processing → TOML config FormInquire (Jinja2) → Nushell processing → TOML config
``` Status: ARCHIVED to .coder/archive/forminquire/
```text
### Phase B: TypeDialog Available ### Phase B: Current Implementation
``` ```plaintext
TypeDialog (Schema-driven) → Nickel config → TOML export Bash wrapper → TypeDialog (TTY input) → Nickel config → JSON export → Nushell reads JSON
``` Status: IMPLEMENTED with forms ready
```text
### Phase C: Unified (Future) ### Phase C: TypeDialog Binary Available (Future)
``` ```plaintext
TypeDialog binary installed → Full nickel-roundtrip workflow → Auto-sync with schemas
Status: PLANNED - awaiting TypeDialog binary release
```text
### Phase D: Unified (Future)
```plaintext
ConfigLoader discovers config → Service reads → TypeDialog updates UI ConfigLoader discovers config → Service reads → TypeDialog updates UI
``` ```text
## Integration with Infrastructure Schemas ## Integration with Infrastructure Schemas
@ -271,11 +291,11 @@ TypeDialog forms work seamlessly with infrastructure schemas:
- Tools: docker-compose config, kubectl apply --dry-run, nginx -t, promtool check - Tools: docker-compose config, kubectl apply --dry-run, nginx -t, promtool check
- Examples: `examples-solo-deployment.ncl`, `examples-enterprise-deployment.ncl` - Examples: `examples-solo-deployment.ncl`, `examples-enterprise-deployment.ncl`
**4. Interactive Setup with Forms** (ready for TypeDialog) **4. Interactive Setup with Forms** (TypeDialog ready)
- Script: `provisioning/platform/scripts/setup-with-forms.sh` - Script: `provisioning/platform/scripts/setup-with-forms.sh`
- Auto-detects TypeDialog, falls back to FormInquire - Bash wrappers: `provisioning/core/shlib/*-tty.sh` (handle TTY input)
- Supports batch or single-service configuration - Forms ready: setup-wizard, auth-login, mfa-enroll
- Auto-generates forms from schemas (when TypeDialog available) - Fallback: Basic Nushell prompts if TypeDialog unavailable
### Current Status: Full Infrastructure Support ### Current Status: Full Infrastructure Support
@ -285,7 +305,7 @@ TypeDialog forms work seamlessly with infrastructure schemas:
| **Examples** | ✅ Complete | 2 deployment examples (solo, enterprise) | | **Examples** | ✅ Complete | 2 deployment examples (solo, enterprise) |
| **Generation Script** | ✅ Complete | Auto-generates configs for all modes | | **Generation Script** | ✅ Complete | Auto-generates configs for all modes |
| **Validation Script** | ✅ Complete | Validates Docker, K8s, Nginx, Prometheus | | **Validation Script** | ✅ Complete | Validates Docker, K8s, Nginx, Prometheus |
| **Setup Wizard** | ✅ Complete | Interactive config + FormInquire active | | **Setup Wizard** | ✅ Complete | TypeDialog forms + bash wrappers ready |
| **TypeDialog Integration** | ⏳ Pending | Structure ready, awaiting binary | | **TypeDialog Integration** | ⏳ Pending | Structure ready, awaiting binary |
### Validated Examples ### Validated Examples
@ -321,7 +341,7 @@ jq '.docker_compose_services | keys' /tmp/solo.json
# Compare resource allocation (solo vs enterprise) # Compare resource allocation (solo vs enterprise)
jq '.docker_compose_services.orchestrator.deploy.resources.limits' /tmp/solo.json jq '.docker_compose_services.orchestrator.deploy.resources.limits' /tmp/solo.json
jq '.docker_compose_services.orchestrator.deploy.resources.limits' /tmp/enterprise.json jq '.docker_compose_services.orchestrator.deploy.resources.limits' /tmp/enterprise.json
``` ```text
## Next Steps ## Next Steps
@ -330,11 +350,11 @@ jq '.docker_compose_services.orchestrator.deploy.resources.limits' /tmp/enterpri
- Validate with format-specific tools - Validate with format-specific tools
- Use interactive setup wizard for configuration - Use interactive setup wizard for configuration
2. **When TypeDialog becomes available**: 2. **When TypeDialog binary becomes available**:
- Install TypeDialog binary - Install TypeDialog binary
- Run form generation script from infrastructure schemas - Forms already created and ready to use
- Update setup script to use TypeDialog exclusively - Bash wrappers handle TTY input (no Nushell stack issues)
- Deprecate FormInquire (keep as fallback) - Full nickel-roundtrip workflow will be enabled
3. **Production Deployment**: 3. **Production Deployment**:
- Use validated infrastructure configs - Use validated infrastructure configs
@ -343,8 +363,9 @@ jq '.docker_compose_services.orchestrator.deploy.resources.limits' /tmp/enterpri
--- ---
**Version**: 1.1.0 (Infrastructure Integration Added) **Version**: 1.2.0 (TypeDialog Forms + Bash Wrappers)
**Status**: Ready for Infrastructure Generation; Awaiting TypeDialog Binary **Status**: TypeDialog forms ready with bash wrappers; Awaiting TypeDialog Binary
**Last Updated**: 2025-01-06 **Last Updated**: 2025-01-09
**Current Alternatives**: FormInquire (active), automation scripts (complete) **ForminQuire Status**: DEPRECATED - Archived to .coder/archive/forminquire/
**Fallback**: Basic Nushell prompts if TypeDialog unavailable
**Tested**: Infrastructure examples (solo + enterprise) validated **Tested**: Infrastructure examples (solo + enterprise) validated

View File

@ -2,27 +2,27 @@
# Defines validation rules for form fields generated from Nickel schemas # Defines validation rules for form fields generated from Nickel schemas
[orchestrator] [orchestrator]
port = "range(1, 65535)" cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)"
db_pool_size = "range(1, 100)" db_pool_size = "range(1, 100)"
log_level = ["debug", "info", "warning", "error"] log_level = ["debug", "info", "warning", "error"]
mode = ["solo", "multiuser", "enterprise", "cicd"]
cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)"
memory = "pattern(^[0-9]+[MG]B$)" memory = "pattern(^[0-9]+[MG]B$)"
mode = ["solo", "multiuser", "enterprise", "cicd"]
port = "range(1, 65535)"
replicas = "range(1, 10)" replicas = "range(1, 10)"
[control-center] [control-center]
log_level = ["debug", "info", "warning", "error"]
port = "range(1, 65535)" port = "range(1, 65535)"
replicas = "range(1, 10)" replicas = "range(1, 10)"
log_level = ["debug", "info", "warning", "error"]
[vault-service] [vault-service]
port = "range(1, 65535)"
cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)" cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)"
memory = "pattern(^[0-9]+[MG]B$)" memory = "pattern(^[0-9]+[MG]B$)"
port = "range(1, 65535)"
[rag] [rag]
port = "range(1, 65535)"
max_concurrent_requests = "range(1, 100)" max_concurrent_requests = "range(1, 100)"
port = "range(1, 65535)"
timeout_seconds = "range(1, 3600)" timeout_seconds = "range(1, 3600)"
[extension-registry] [extension-registry]
@ -30,32 +30,32 @@ port = "range(1, 65535)"
storage_path = "pattern(^/[a-zA-Z0-9/_-]+$)" storage_path = "pattern(^/[a-zA-Z0-9/_-]+$)"
[mcp-server] [mcp-server]
port = "range(1, 65535)"
max_connections = "range(1, 1000)" max_connections = "range(1, 1000)"
port = "range(1, 65535)"
[provisioning-daemon] [provisioning-daemon]
port = "range(1, 65535)"
max_workers = "range(1, 100)" max_workers = "range(1, 100)"
port = "range(1, 65535)"
[ai-service] [ai-service]
port = "range(1, 65535)"
model_timeout_seconds = "range(1, 3600)"
max_retries = "range(0, 10)" max_retries = "range(0, 10)"
model_timeout_seconds = "range(1, 3600)"
port = "range(1, 65535)"
[nginx] [nginx]
worker_processes = "range(1, 32)"
worker_connections = "range(1, 65536)"
client_max_body_size = "pattern(^[0-9]+[MG]B$)" client_max_body_size = "pattern(^[0-9]+[MG]B$)"
worker_connections = "range(1, 65536)"
worker_processes = "range(1, 32)"
[prometheus] [prometheus]
scrape_interval = "pattern(^[0-9]+[smh]$)"
evaluation_interval = "pattern(^[0-9]+[smh]$)" evaluation_interval = "pattern(^[0-9]+[smh]$)"
retention = "pattern(^[0-9]+[dhw]$)" retention = "pattern(^[0-9]+[dhw]$)"
scrape_interval = "pattern(^[0-9]+[smh]$)"
[kubernetes] [kubernetes]
replicas = "range(1, 100)"
cpu = "pattern(^[0-9]+m$|^[0-9]+(\\.[0-9]+)?$)" cpu = "pattern(^[0-9]+m$|^[0-9]+(\\.[0-9]+)?$)"
memory = "pattern(^[0-9]+Mi$|^[0-9]+Gi$)" memory = "pattern(^[0-9]+Mi$|^[0-9]+Gi$)"
replicas = "range(1, 100)"
[docker-compose] [docker-compose]
cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)" cpus = "pattern(^[0-9]+(\\.[0-9]+)?$)"

View File

@ -1,6 +1,5 @@
[workspace] [workspace]
resolver = "2"
members = [ members = [
"crates/platform-config", "crates/platform-config",
"crates/service-clients", "crates/service-clients",
@ -15,31 +14,32 @@ members = [
"crates/mcp-server", "crates/mcp-server",
"crates/provisioning-daemon", "crates/provisioning-daemon",
] ]
resolver = "2"
[workspace.package] [workspace.package]
version = "0.1.0"
edition = "2021"
authors = ["Jesus Perez <jesus@librecloud.online>"] authors = ["Jesus Perez <jesus@librecloud.online>"]
edition = "2021"
license = "MIT" license = "MIT"
repository = "https://github.com/jesusperezlorenzo/provisioning" repository = "https://github.com/jesusperezlorenzo/provisioning"
version = "0.1.0"
[workspace.dependencies] [workspace.dependencies]
# ============================================================================ # ============================================================================
# SHARED ASYNC RUNTIME AND CORE LIBRARIES # SHARED ASYNC RUNTIME AND CORE LIBRARIES
# ============================================================================ # ============================================================================
async-trait = "0.1"
futures = "0.3"
tokio = { version = "1.49", features = ["full"] } tokio = { version = "1.49", features = ["full"] }
tokio-util = "0.7" tokio-util = "0.7"
futures = "0.3"
async-trait = "0.1"
# ============================================================================ # ============================================================================
# SERIALIZATION AND DATA HANDLING # SERIALIZATION AND DATA HANDLING
# ============================================================================ # ============================================================================
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
toml = "0.9" toml = "0.9"
uuid = { version = "1.19", features = ["v4", "serde"] } uuid = { version = "1.19", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
# ============================================================================ # ============================================================================
# ERROR HANDLING # ERROR HANDLING
@ -52,17 +52,23 @@ thiserror = "2.0"
# ============================================================================ # ============================================================================
log = "0.4" log = "0.4"
tracing = "0.1" tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2" tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# ============================================================================ # ============================================================================
# WEB SERVER AND NETWORKING # WEB SERVER AND NETWORKING
# ============================================================================ # ============================================================================
axum = { version = "0.8", features = ["ws", "macros"] } axum = { version = "0.8", features = ["ws", "macros"] }
tower = { version = "0.5", features = ["full"] }
tower-http = { version = "0.6", features = ["cors", "trace", "fs", "compression-gzip", "timeout"] }
hyper = "1.8" hyper = "1.8"
reqwest = { version = "0.13", features = ["json", "rustls"], default-features = false } reqwest = { version = "0.13", features = ["json", "rustls"], default-features = false }
tower = { version = "0.5", features = ["full"] }
tower-http = { version = "0.6", features = [
"cors",
"trace",
"fs",
"compression-gzip",
"timeout",
] }
# ============================================================================ # ============================================================================
# CLI AND CONFIGURATION # CLI AND CONFIGURATION
@ -73,31 +79,31 @@ config = "0.15"
# ============================================================================ # ============================================================================
# DATABASE AND STORAGE # DATABASE AND STORAGE
# ============================================================================ # ============================================================================
surrealdb = { version = "2.4", features = ["kv-mem", "protocol-ws", "protocol-http"] }
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite", "chrono", "uuid"] } sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite", "chrono", "uuid"] }
surrealdb = { version = "2.4", features = ["kv-mem", "protocol-ws", "protocol-http"] }
# ============================================================================ # ============================================================================
# SECURITY AND CRYPTOGRAPHY # SECURITY AND CRYPTOGRAPHY
# ============================================================================ # ============================================================================
ring = "0.17" aes-gcm = "0.10"
jsonwebtoken = { version = "10.2", features = ["rust_crypto"] }
argon2 = "0.5" argon2 = "0.5"
base64 = "0.22" base64 = "0.22"
rand = { version = "0.9", features = ["std_rng", "os_rng"] }
aes-gcm = "0.10"
sha2 = "0.10"
hmac = "0.12" hmac = "0.12"
jsonwebtoken = { version = "10.2", features = ["rust_crypto"] }
rand = { version = "0.9", features = ["std_rng", "os_rng"] }
ring = "0.17"
sha2 = "0.10"
# AWS SDK for KMS # AWS SDK for KMS
aws-sdk-kms = "1"
aws-config = "1" aws-config = "1"
aws-credential-types = "1" aws-credential-types = "1"
aws-sdk-kms = "1"
# ============================================================================ # ============================================================================
# VALIDATION AND REGEX # VALIDATION AND REGEX
# ============================================================================ # ============================================================================
validator = { version = "0.20", features = ["derive"] }
regex = "1.12" regex = "1.12"
validator = { version = "0.20", features = ["derive"] }
# ============================================================================ # ============================================================================
# GRAPH ALGORITHMS AND UTILITIES # GRAPH ALGORITHMS AND UTILITIES
@ -112,8 +118,8 @@ petgraph = "0.8"
dirs = "6.0" dirs = "6.0"
# Filesystem operations # Filesystem operations
walkdir = "2.5"
notify = "8.2" notify = "8.2"
walkdir = "2.5"
# Statistics and templates # Statistics and templates
statistics = "0.4" statistics = "0.4"
@ -154,11 +160,11 @@ image = { version = "0.25", default-features = false, features = ["png"] }
qrcode = "0.14" qrcode = "0.14"
# Authentication # Authentication
hex = "0.4"
lazy_static = "1.5"
totp-rs = { version = "5.7", features = ["qr"] } totp-rs = { version = "5.7", features = ["qr"] }
webauthn-rs = "0.5" webauthn-rs = "0.5"
webauthn-rs-proto = "0.5" webauthn-rs-proto = "0.5"
hex = "0.4"
lazy_static = "1.5"
# Additional serialization # Additional serialization
serde-wasm-bindgen = "0.6" serde-wasm-bindgen = "0.6"
@ -166,18 +172,18 @@ serde-wasm-bindgen = "0.6"
# Gloo utilities (for WASM) # Gloo utilities (for WASM)
gloo-net = { version = "0.6", features = ["http", "websocket"] } gloo-net = { version = "0.6", features = ["http", "websocket"] }
gloo-storage = "0.3" gloo-storage = "0.3"
gloo-utils = { version = "0.2", features = ["serde"] }
gloo-timers = "0.3" gloo-timers = "0.3"
gloo-utils = { version = "0.2", features = ["serde"] }
# Plotting and canvas # Plotting and canvas
plotters = "0.3" plotters = "0.3"
plotters-canvas = "0.3" plotters-canvas = "0.3"
# WASM utilities # WASM utilities
wasm-bindgen-futures = "0.4" console_error_panic_hook = "0.1"
js-sys = "0.3" js-sys = "0.3"
tracing-wasm = "0.2" tracing-wasm = "0.2"
console_error_panic_hook = "0.1" wasm-bindgen-futures = "0.4"
# Random number generation # Random number generation
getrandom = { version = "0.3" } getrandom = { version = "0.3" }
@ -185,30 +191,30 @@ getrandom = { version = "0.3" }
# ============================================================================ # ============================================================================
# TUI (Terminal User Interface) # TUI (Terminal User Interface)
# ============================================================================ # ============================================================================
ratatui = { version = "0.30", features = ["all-widgets", "serde"] }
crossterm = "0.29" crossterm = "0.29"
ratatui = { version = "0.30", features = ["all-widgets", "serde"] }
# ============================================================================ # ============================================================================
# WASM AND FRONTEND DEPENDENCIES (for control-center-ui) # WASM AND FRONTEND DEPENDENCIES (for control-center-ui)
# ============================================================================ # ============================================================================
wasm-bindgen = "0.2"
leptos = { version = "0.8", features = ["csr"] } leptos = { version = "0.8", features = ["csr"] }
leptos_meta = { version = "0.8", features = ["default"] } leptos_meta = { version = "0.8", features = ["default"] }
leptos_router = { version = "0.8" } leptos_router = { version = "0.8" }
wasm-bindgen = "0.2"
# ============================================================================ # ============================================================================
# DEVELOPMENT AND TESTING DEPENDENCIES # DEVELOPMENT AND TESTING DEPENDENCIES
# ============================================================================ # ============================================================================
tokio-test = "0.4"
tempfile = "3.24"
criterion = { version = "0.8", features = ["html_reports"] }
assert_matches = "1.5" assert_matches = "1.5"
criterion = { version = "0.8", features = ["html_reports"] }
mockito = "1" mockito = "1"
tempfile = "3.24"
tokio-test = "0.4"
# Additional caching and binary discovery # Additional caching and binary discovery
lru = "0.16" lru = "0.16"
which = "8"
parking_lot = "0.12" parking_lot = "0.12"
which = "8"
yaml-rust = "0.4" yaml-rust = "0.4"
# ============================================================================ # ============================================================================
@ -238,30 +244,30 @@ description = "Provisioning Platform - Rust workspace for cloud infrastructure a
# Profile configurations shared across all workspace members # Profile configurations shared across all workspace members
[profile.dev] [profile.dev]
opt-level = 0 codegen-units = 256
debug = true debug = true
debug-assertions = true debug-assertions = true
overflow-checks = true
lto = false
panic = 'unwind'
incremental = true incremental = true
codegen-units = 256 lto = false
opt-level = 0
overflow-checks = true
panic = 'unwind'
[profile.release] [profile.release]
opt-level = 3
lto = true
codegen-units = 1 codegen-units = 1
lto = true
opt-level = 3
panic = "abort" panic = "abort"
strip = "debuginfo" strip = "debuginfo"
# Fast release profile for development # Fast release profile for development
[profile.dev-release] [profile.dev-release]
inherits = "release"
opt-level = 2
lto = "thin"
debug = true debug = true
inherits = "release"
lto = "thin"
opt-level = 2
# Profile for benchmarks # Profile for benchmarks
[profile.bench] [profile.bench]
inherits = "release"
debug = true debug = true
inherits = "release"

View File

@ -7,16 +7,7 @@ provider = "openai"
[rag.ingestion] [rag.ingestion]
auto_ingest = true auto_ingest = true
chunk_size = 2048 chunk_size = 2048
doc_types = [ doc_types = ["md", "txt", "toml", "ncl", "rs", "nu", "yaml", "json"]
"md",
"txt",
"toml",
"ncl",
"rs",
"nu",
"yaml",
"json",
]
overlap = 200 overlap = 200
watch_files = true watch_files = true

View File

@ -7,14 +7,7 @@ provider = "openai"
[rag.ingestion] [rag.ingestion]
auto_ingest = true auto_ingest = true
chunk_size = 1024 chunk_size = 1024
doc_types = [ doc_types = ["md", "txt", "toml", "ncl", "rs", "nu"]
"md",
"txt",
"toml",
"ncl",
"rs",
"nu",
]
overlap = 100 overlap = 100
watch_files = true watch_files = true

View File

@ -7,11 +7,7 @@ provider = "local"
[rag.ingestion] [rag.ingestion]
auto_ingest = true auto_ingest = true
chunk_size = 512 chunk_size = 512
doc_types = [ doc_types = ["md", "txt", "toml"]
"md",
"txt",
"toml",
]
overlap = 50 overlap = 50
[rag.llm] [rag.llm]

View File

@ -1,15 +1,15 @@
[package] [package]
name = "ai-service"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
description = "HTTP service for AI capabilities including RAG, MCP tool invocation, and knowledge graph operations" description = "HTTP service for AI capabilities including RAG, MCP tool invocation, and knowledge graph operations"
edition.workspace = true
name = "ai-service"
version.workspace = true
[dependencies] [dependencies]
# Workspace dependencies # Workspace dependencies
tokio = { workspace = true, features = ["full"] }
futures = { workspace = true }
async-trait = { workspace = true } async-trait = { workspace = true }
futures = { workspace = true }
tokio = { workspace = true, features = ["full"] }
# Web server and API # Web server and API
axum = { workspace = true } axum = { workspace = true }
@ -33,8 +33,8 @@ tracing = { workspace = true }
tracing-subscriber = { workspace = true } tracing-subscriber = { workspace = true }
# UUID and time # UUID and time
uuid = { workspace = true, features = ["v4", "serde"] }
chrono = { workspace = true, features = ["serde"] } chrono = { workspace = true, features = ["serde"] }
uuid = { workspace = true, features = ["v4", "serde"] }
# CLI # CLI
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
@ -49,8 +49,8 @@ provisioning-mcp-server = { path = "../mcp-server" }
petgraph = { workspace = true } petgraph = { workspace = true }
[dev-dependencies] [dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true } tempfile = { workspace = true }
tokio-test = { workspace = true }
# Library target # Library target
[lib] [lib]

View File

@ -1,14 +1,14 @@
[package] [package]
name = "control-center-ui"
version.workspace = true
edition.workspace = true
description = "Control Center UI - Leptos CSR App for Cloud Infrastructure Management"
authors = ["Control Center Team"] authors = ["Control Center Team"]
autobins = false # Disable auto-detection of binary targets autobins = false # Disable auto-detection of binary targets
description = "Control Center UI - Leptos CSR App for Cloud Infrastructure Management"
edition.workspace = true
name = "control-center-ui"
version.workspace = true
[lib] [lib]
name = "control_center_ui"
crate-type = ["cdylib"] crate-type = ["cdylib"]
name = "control_center_ui"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
@ -17,25 +17,25 @@ path = "src/main.rs"
# ============================================================================ # ============================================================================
# Serialization # Serialization
chrono = { workspace = true, features = ["wasm-bindgen"] }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
uuid = { workspace = true, features = ["js"] } uuid = { workspace = true, features = ["js"] }
chrono = { workspace = true, features = ["wasm-bindgen"] }
# Error handling and async # Error handling and async
thiserror = { workspace = true }
futures = { workspace = true } futures = { workspace = true }
thiserror = { workspace = true }
# Logging and debugging # Logging and debugging
tracing = { workspace = true } tracing = { workspace = true }
# Security and cryptography # Security and cryptography
base64 = { workspace = true }
regex = { workspace = true }
rand = { workspace = true }
sha2 = { workspace = true }
hmac = { workspace = true }
aes-gcm = { workspace = true, features = ["aes", "std"] } aes-gcm = { workspace = true, features = ["aes", "std"] }
base64 = { workspace = true }
hmac = { workspace = true }
rand = { workspace = true }
regex = { workspace = true }
sha2 = { workspace = true }
# ============================================================================ # ============================================================================
# WASM-SPECIFIC DEPENDENCIES # WASM-SPECIFIC DEPENDENCIES
@ -61,30 +61,30 @@ icondata = { workspace = true }
leptos_icons = { workspace = true } leptos_icons = { workspace = true }
# Authentication and cryptography # Authentication and cryptography
qrcode = { workspace = true }
image = { workspace = true } image = { workspace = true }
qrcode = { workspace = true }
totp-rs = { workspace = true } totp-rs = { workspace = true }
# Serialization utilities # Serialization utilities
serde-wasm-bindgen = { workspace = true } serde-wasm-bindgen = { workspace = true }
# Logging for WASM # Logging for WASM
tracing-wasm = { workspace = true }
console_error_panic_hook = { workspace = true } console_error_panic_hook = { workspace = true }
tracing-wasm = { workspace = true }
# HTTP client and networking # HTTP client and networking
gloo-net = { workspace = true } gloo-net = { workspace = true }
gloo-storage = { workspace = true } gloo-storage = { workspace = true }
gloo-utils = { workspace = true }
gloo-timers = { workspace = true } gloo-timers = { workspace = true }
gloo-utils = { workspace = true }
# Chart.js bindings and canvas utilities # Chart.js bindings and canvas utilities
plotters = { workspace = true } plotters = { workspace = true }
plotters-canvas = { workspace = true } plotters-canvas = { workspace = true }
# WASM utilities # WASM utilities
wasm-bindgen-futures = { workspace = true }
js-sys = { workspace = true } js-sys = { workspace = true }
wasm-bindgen-futures = { workspace = true }
# Random number generation (WASM-specific override with js feature) # Random number generation (WASM-specific override with js feature)
getrandom = { version = "0.3.4", features = ["wasm_js"] } getrandom = { version = "0.3.4", features = ["wasm_js"] }

View File

@ -1,17 +1,17 @@
[build] [build]
target = "index.html"
dist = "dist" dist = "dist"
minify = "on_release"
filehash = true filehash = true
minify = "on_release"
target = "index.html"
[watch] [watch]
watch = ["src", "style", "assets"]
ignore = ["dist", "target"] ignore = ["dist", "target"]
watch = ["src", "style", "assets"]
[serve] [serve]
address = "127.0.0.1" address = "127.0.0.1"
port = 3000
open = false open = false
port = 3000
# Proxy API calls to the Rust orchestrator # Proxy API calls to the Rust orchestrator
[[serve.proxy]] [[serve.proxy]]
backend = "http://127.0.0.1:8080/" backend = "http://127.0.0.1:8080/"
@ -19,8 +19,8 @@ rewrite = "/api/{tail}"
ws = true ws = true
[clean] [clean]
dist = "dist"
cargo = true cargo = true
dist = "dist"
# Release mode optimizations are already set in main [build] section above # Release mode optimizations are already set in main [build] section above

View File

@ -1,9 +1,9 @@
[package] [package]
name = "control-center"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
description = "Control center service with JWT authentication, user management, and real-time WebSocket events" description = "Control center service with JWT authentication, user management, and real-time WebSocket events"
edition.workspace = true
name = "control-center"
version.workspace = true
[dependencies] [dependencies]
# ============================================================================ # ============================================================================
@ -11,42 +11,42 @@ description = "Control center service with JWT authentication, user management,
# ============================================================================ # ============================================================================
# Core async runtime # Core async runtime
tokio = { workspace = true }
futures = { workspace = true }
async-trait = { workspace = true } async-trait = { workspace = true }
futures = { workspace = true }
tokio = { workspace = true }
# Web server and API # Web server and API
axum = { workspace = true } axum = { workspace = true }
hyper = { workspace = true }
tower = { workspace = true } tower = { workspace = true }
tower-http = { workspace = true } tower-http = { workspace = true }
hyper = { workspace = true }
# Serialization and data # Serialization and data
chrono = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
toml = { workspace = true } toml = { workspace = true }
uuid = { workspace = true } uuid = { workspace = true }
chrono = { workspace = true }
# Database # Database
surrealdb = { workspace = true }
sqlx = { workspace = true } sqlx = { workspace = true }
surrealdb = { workspace = true }
# Configuration and CLI # Configuration and CLI
clap = { workspace = true } clap = { workspace = true }
config = { workspace = true } config = { workspace = true }
# Error handling # Error handling
thiserror = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
thiserror = { workspace = true }
# Logging # Logging
tracing = { workspace = true } tracing = { workspace = true }
tracing-subscriber = { workspace = true } tracing-subscriber = { workspace = true }
# Validation # Validation
validator = { workspace = true }
regex = { workspace = true } regex = { workspace = true }
validator = { workspace = true }
# HTTP client for external services # HTTP client for external services
reqwest = { workspace = true } reqwest = { workspace = true }
@ -58,15 +58,15 @@ service-clients = { path = "../service-clients" }
platform-config = { path = "../platform-config" } platform-config = { path = "../platform-config" }
# Security and cryptography # Security and cryptography
ring = { workspace = true } aes-gcm = { workspace = true }
jsonwebtoken = { workspace = true }
argon2 = { workspace = true } argon2 = { workspace = true }
base64 = { workspace = true } base64 = { workspace = true }
rand = { workspace = true }
aes-gcm = { workspace = true }
sha2 = { workspace = true }
hmac = { workspace = true }
getrandom = { workspace = true } getrandom = { workspace = true }
hmac = { workspace = true }
jsonwebtoken = { workspace = true }
rand = { workspace = true }
ring = { workspace = true }
sha2 = { workspace = true }
# ============================================================================ # ============================================================================
# ADDITIONAL WORKSPACE DEPENDENCIES # ADDITIONAL WORKSPACE DEPENDENCIES
@ -76,11 +76,11 @@ getrandom = { workspace = true }
dirs = { workspace = true } dirs = { workspace = true }
# Security and cryptography # Security and cryptography
rsa = { workspace = true }
hkdf = { workspace = true }
zeroize = { workspace = true }
constant_time_eq = { workspace = true } constant_time_eq = { workspace = true }
hkdf = { workspace = true }
rsa = { workspace = true }
subtle = { workspace = true } subtle = { workspace = true }
zeroize = { workspace = true }
# Tower services # Tower services
tower-service = { workspace = true } tower-service = { workspace = true }
@ -103,18 +103,18 @@ cron = { workspace = true }
tokio-cron-scheduler = { workspace = true } tokio-cron-scheduler = { workspace = true }
# MFA Authentication # MFA Authentication
hex = { workspace = true }
image = { workspace = true }
lazy_static = { workspace = true }
qrcode = { workspace = true }
totp-rs = { workspace = true } totp-rs = { workspace = true }
webauthn-rs = { workspace = true } webauthn-rs = { workspace = true }
webauthn-rs-proto = { workspace = true } webauthn-rs-proto = { workspace = true }
qrcode = { workspace = true }
image = { workspace = true }
hex = { workspace = true }
lazy_static = { workspace = true }
[dev-dependencies] [dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true }
assert_matches = { workspace = true } assert_matches = { workspace = true }
tempfile = { workspace = true }
tokio-test = { workspace = true }
# ============================================================================ # ============================================================================
# FEATURES - Module Organization for Coupling Reduction # FEATURES - Module Organization for Coupling Reduction

View File

@ -1,19 +1,18 @@
[server] [server]
host = "127.0.0.1" host = "127.0.0.1"
port = 8080
keep_alive = 75 keep_alive = 75
max_connections = 1000 max_connections = 1000
port = 8080
[database] [database]
url = "rocksdb://data/control-center.db"
namespace = "control_center"
database = "main" database = "main"
namespace = "control_center"
url = "rocksdb://data/control-center.db"
[jwt] [jwt]
issuer = "control-center"
audience = "control-center-api"
access_token_expiration_hours = 1 access_token_expiration_hours = 1
refresh_token_expiration_hours = 168 audience = "control-center-api"
issuer = "control-center"
private_key_pem = """ private_key_pem = """
-----BEGIN RSA PRIVATE KEY----- -----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA82On7Xk5jycsV4NCOij0510ssy/3S1Pqj+UjGS1R3+tyHX57 MIIEpAIBAAKCAQEA82On7Xk5jycsV4NCOij0510ssy/3S1Pqj+UjGS1R3+tyHX57
@ -53,30 +52,19 @@ I4cJE9oDcuOkyYZEWf2H5xAcidksaDNxabYRGS5IqT25obMElEZZDvj9X60S8UHu
I3Tm+2kc69fo64/S53y3yNr6Ed05PVewiQIDAQAB I3Tm+2kc69fo64/S53y3yNr6Ed05PVewiQIDAQAB
-----END RSA PUBLIC KEY----- -----END RSA PUBLIC KEY-----
""" """
refresh_token_expiration_hours = 168
[rate_limiting] [rate_limiting]
max_requests = 100
window_seconds = 60
per_ip = true
global = false global = false
max_requests = 100
per_ip = true
window_seconds = 60
[cors] [cors]
allow_credentials = true
allowed_headers = ["content-type", "authorization", "accept", "x-requested-with", "x-session-id"]
allowed_methods = ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
allowed_origins = ["http://localhost:3000"] allowed_origins = ["http://localhost:3000"]
allowed_methods = [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"OPTIONS",
]
allowed_headers = [
"content-type",
"authorization",
"accept",
"x-requested-with",
"x-session-id",
]
expose_headers = [ expose_headers = [
"x-total-count", "x-total-count",
"x-rate-limit-remaining", "x-rate-limit-remaining",
@ -84,20 +72,19 @@ expose_headers = [
"x-rate-limit-reset", "x-rate-limit-reset",
] ]
max_age = 86400 max_age = 86400
allow_credentials = true
[security] [security]
session_cleanup_interval_minutes = 60
max_sessions_per_user = 5
password_min_length = 8
password_require_special_chars = false
password_require_numbers = false
password_require_uppercase = false
failed_login_lockout_attempts = 5 failed_login_lockout_attempts = 5
failed_login_lockout_duration_minutes = 15 failed_login_lockout_duration_minutes = 15
max_sessions_per_user = 5
password_min_length = 8
password_require_numbers = false
password_require_special_chars = false
password_require_uppercase = false
session_cleanup_interval_minutes = 60
[logging] [logging]
level = "info"
format = "json" format = "json"
level = "info"
max_file_size = "100MB" max_file_size = "100MB"
max_files = 10 max_files = 10

View File

@ -1,22 +1,22 @@
[package] [package]
name = "provisioning-detector"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
edition.workspace = true
license.workspace = true license.workspace = true
name = "provisioning-detector"
repository.workspace = true repository.workspace = true
version.workspace = true
[dependencies] [dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json.workspace = true
toml.workspace = true
tokio.workspace = true
anyhow.workspace = true anyhow.workspace = true
thiserror.workspace = true
regex.workspace = true
walkdir.workspace = true
chrono.workspace = true chrono.workspace = true
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
regex.workspace = true
serde = { version = "1.0", features = ["derive"] }
serde_json.workspace = true
thiserror.workspace = true
tokio.workspace = true
toml.workspace = true
walkdir.workspace = true
[dev-dependencies] [dev-dependencies]
tempfile.workspace = true tempfile.workspace = true

View File

@ -1,15 +1,15 @@
[package] [package]
name = "extension-registry"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
description = "OCI-compliant extension registry proxy for managing provisioning system extensions and artifacts" description = "OCI-compliant extension registry proxy for managing provisioning system extensions and artifacts"
edition.workspace = true
name = "extension-registry"
version.workspace = true
[dependencies] [dependencies]
# Workspace dependencies # Workspace dependencies
tokio = { workspace = true, features = ["full"] }
futures = { workspace = true }
async-trait = { workspace = true } async-trait = { workspace = true }
futures = { workspace = true }
tokio = { workspace = true, features = ["full"] }
# Web server and API # Web server and API
axum = { workspace = true } axum = { workspace = true }
@ -32,8 +32,8 @@ tracing = { workspace = true }
tracing-subscriber = { workspace = true } tracing-subscriber = { workspace = true }
# UUID and time # UUID and time
uuid = { workspace = true, features = ["v4", "serde"] }
chrono = { workspace = true, features = ["serde"] } chrono = { workspace = true, features = ["serde"] }
uuid = { workspace = true, features = ["v4", "serde"] }
# CLI # CLI
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
@ -42,8 +42,8 @@ clap = { workspace = true, features = ["derive"] }
reqwest = { workspace = true } reqwest = { workspace = true }
# Cryptography for digest validation # Cryptography for digest validation
sha2 = { workspace = true }
hex = { workspace = true } hex = { workspace = true }
sha2 = { workspace = true }
# URL parsing # URL parsing
url = { workspace = true } url = { workspace = true }
@ -61,10 +61,10 @@ parking_lot = { workspace = true }
toml = { workspace = true } toml = { workspace = true }
[dev-dependencies] [dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true }
hyper = { workspace = true }
http-body-util = "0.1" http-body-util = "0.1"
hyper = { workspace = true }
tempfile = { workspace = true }
tokio-test = { workspace = true }
# Library target # Library target
[lib] [lib]

View File

@ -1,31 +1,31 @@
# Extension Registry Configuration Example # Extension Registry Configuration Example
[server] [server]
enable_compression = true
enable_cors = true
host = "0.0.0.0" host = "0.0.0.0"
port = 8082 port = 8082
workers = 4 workers = 4
enable_cors = true
enable_compression = true
# Gitea backend configuration # Gitea backend configuration
[gitea] [gitea]
url = "https://gitea.example.com"
organization = "provisioning-extensions" organization = "provisioning-extensions"
token_path = "/path/to/gitea-token.txt"
timeout_seconds = 30 timeout_seconds = 30
token_path = "/path/to/gitea-token.txt"
url = "https://gitea.example.com"
verify_ssl = true verify_ssl = true
# OCI registry configuration # OCI registry configuration
[oci] [oci]
registry = "registry.example.com"
namespace = "provisioning"
auth_token_path = "/path/to/oci-token.txt" auth_token_path = "/path/to/oci-token.txt"
namespace = "provisioning"
registry = "registry.example.com"
timeout_seconds = 30 timeout_seconds = 30
verify_ssl = true verify_ssl = true
# Cache configuration # Cache configuration
[cache] [cache]
capacity = 1000 capacity = 1000
ttl_seconds = 300
enable_metadata_cache = true
enable_list_cache = true enable_list_cache = true
enable_metadata_cache = true
ttl_seconds = 300

View File

@ -1,13 +1,13 @@
[package] [package]
name = "provisioning-mcp-server"
version.workspace = true
edition.workspace = true
authors = ["Jesús Pérez Lorenzo <jpl@jesusperez.pro>"] authors = ["Jesús Pérez Lorenzo <jpl@jesusperez.pro>"]
description = "Rust-native MCP server for Infrastructure Automation system"
repository.workspace = true
license.workspace = true
keywords = ["mcp", "rust", "infrastructure", "provisioning", "ai"]
categories = ["command-line-utilities", "development-tools"] categories = ["command-line-utilities", "development-tools"]
description = "Rust-native MCP server for Infrastructure Automation system"
edition.workspace = true
keywords = ["mcp", "rust", "infrastructure", "provisioning", "ai"]
license.workspace = true
name = "provisioning-mcp-server"
repository.workspace = true
version.workspace = true
[dependencies] [dependencies]
# ============================================================================ # ============================================================================
@ -75,13 +75,13 @@ serde_yaml = "0.9"
dirs = { workspace = true } dirs = { workspace = true }
[dev-dependencies] [dev-dependencies]
tokio-test = { workspace = true }
criterion = { workspace = true, features = ["html_reports"] } criterion = { workspace = true, features = ["html_reports"] }
tempfile = { workspace = true } tempfile = { workspace = true }
tokio-test = { workspace = true }
[features] [features]
default = []
debug = ["tracing-subscriber/json"] debug = ["tracing-subscriber/json"]
default = []
[[bin]] [[bin]]
name = "provisioning-mcp-server" name = "provisioning-mcp-server"
@ -97,5 +97,5 @@ name = "provisioning_mcp_server"
path = "src/lib.rs" path = "src/lib.rs"
[[bench]] [[bench]]
name = "performance"
harness = false harness = false
name = "performance"

View File

@ -2,41 +2,36 @@
[env] [env]
# Test environment variables # Test environment variables
RUST_TEST_THREADS = "1"
RUST_BACKTRACE = { value = "1", condition = { env-not-set = ["CI"] } } RUST_BACKTRACE = { value = "1", condition = { env-not-set = ["CI"] } }
RUST_LOG = { value = "debug", condition = { env-not-set = ["CI"] } } RUST_LOG = { value = "debug", condition = { env-not-set = ["CI"] } }
RUST_TEST_THREADS = "1"
[alias] [alias]
# Test aliases for convenience # Test aliases for convenience
test-all = "test --all-features" test-all = "test --all-features"
test-factory = "test --test factory_tests"
test-fs = "test --lib --bin orchestrator" test-fs = "test --lib --bin orchestrator"
test-surrealdb = "test --features surrealdb"
test-integration = "test --test storage_integration" test-integration = "test --test storage_integration"
test-migration = "test --test migration_tests" test-migration = "test --test migration_tests"
test-factory = "test --test factory_tests" test-surrealdb = "test --features surrealdb"
test-unit = "test --lib" test-unit = "test --lib"
# Benchmark aliases # Benchmark aliases
bench-all = "bench --all-features" bench-all = "bench --all-features"
bench-storage = "bench --bench storage_benchmarks"
bench-migration = "bench --bench migration_benchmarks"
bench-fs = "bench --bench storage_benchmarks -- filesystem" bench-fs = "bench --bench storage_benchmarks -- filesystem"
bench-migration = "bench --bench migration_benchmarks"
bench-storage = "bench --bench storage_benchmarks"
bench-surrealdb = "bench --features surrealdb --bench storage_benchmarks -- surrealdb" bench-surrealdb = "bench --features surrealdb --bench storage_benchmarks -- surrealdb"
# Coverage and documentation # Coverage and documentation
test-coverage = "tarpaulin --all-features --out html"
doc-test = "test --doc --all-features" doc-test = "test --doc --all-features"
test-coverage = "tarpaulin --all-features --out html"
[target.'cfg(test)'] [target.'cfg(test)']
rustflags = [ rustflags = ["-C", "instrument-coverage"]
"-C", "instrument-coverage"
]
[build] [build]
# Enable additional lints for testing builds # Enable additional lints for testing builds
# Note: unused-crate-dependencies disabled for library crate due to false positives # Note: unused-crate-dependencies disabled for library crate due to false positives
# with dependencies used in submodules but not lib.rs root # with dependencies used in submodules but not lib.rs root
rustflags = [ rustflags = ["-W", "unused-extern-crates", "-W", "rust-2021-compatibility"]
"-W", "unused-extern-crates",
"-W", "rust-2021-compatibility"
]

View File

@ -1,23 +1,30 @@
[package] [package]
name = "provisioning-orchestrator"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
description = "Cloud-native infrastructure orchestrator with Nushell integration" description = "Cloud-native infrastructure orchestrator with Nushell integration"
edition.workspace = true
name = "provisioning-orchestrator"
version.workspace = true
[dependencies] [dependencies]
# ============================================================================ # ============================================================================
# WORKSPACE DEPENDENCIES - Core async runtime and traits # WORKSPACE DEPENDENCIES - Core async runtime and traits
# ============================================================================ # ============================================================================
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "process", "io-util", "time", "fs"] }
futures = { workspace = true }
async-trait = { workspace = true } async-trait = { workspace = true }
futures = { workspace = true }
tokio = { workspace = true, features = [
"rt",
"rt-multi-thread",
"process",
"io-util",
"time",
"fs",
] }
# Serialization and data handling # Serialization and data handling
chrono = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
toml = { workspace = true } toml = { workspace = true }
chrono = { workspace = true }
uuid = { workspace = true } uuid = { workspace = true }
# Error handling # Error handling
@ -65,10 +72,10 @@ base64 = "0.22"
jsonwebtoken = { workspace = true } jsonwebtoken = { workspace = true }
# Cryptography for token validation # Cryptography for token validation
sha2 = { workspace = true }
rsa = { workspace = true }
rand = { workspace = true }
getrandom = { workspace = true } getrandom = { workspace = true }
rand = { workspace = true }
rsa = { workspace = true }
sha2 = { workspace = true }
# SSH key management # SSH key management
ed25519-dalek = "2.1" ed25519-dalek = "2.1"
@ -139,13 +146,23 @@ surrealdb = ["dep:surrealdb"]
default = ["core", "audit", "compliance", "platform", "ssh", "workflow", "http-api"] default = ["core", "audit", "compliance", "platform", "ssh", "workflow", "http-api"]
# Full: All features enabled (development and testing) # Full: All features enabled (development and testing)
all = ["core", "audit", "compliance", "platform", "ssh", "workflow", "testing", "http-api", "surrealdb"] all = [
"core",
"audit",
"compliance",
"platform",
"ssh",
"workflow",
"testing",
"http-api",
"surrealdb",
]
[dev-dependencies] [dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true }
assert_matches = { workspace = true } assert_matches = { workspace = true }
criterion = { workspace = true, features = ["html_reports", "async_tokio"] } criterion = { workspace = true, features = ["html_reports", "async_tokio"] }
tempfile = { workspace = true }
tokio-test = { workspace = true }
tower = { workspace = true, features = ["util"] } tower = { workspace = true, features = ["util"] }
# Library target for tests and external use # Library target for tests and external use
@ -160,9 +177,9 @@ path = "src/main.rs"
required-features = ["all"] required-features = ["all"]
[[bench]] [[bench]]
name = "storage_benchmarks"
harness = false harness = false
name = "storage_benchmarks"
[[bench]] [[bench]]
name = "migration_benchmarks"
harness = false harness = false
name = "migration_benchmarks"

View File

@ -1,19 +1,19 @@
[package] [package]
name = "platform-config"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
edition.workspace = true
license.workspace = true license.workspace = true
name = "platform-config"
repository.workspace = true repository.workspace = true
version.workspace = true
[dependencies] [dependencies]
anyhow = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
toml = { workspace = true }
anyhow = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true } tokio = { workspace = true }
toml = { workspace = true }
tracing = { workspace = true }
[dev-dependencies] [dev-dependencies]
tempfile = { workspace = true } tempfile = { workspace = true }

View File

@ -1,10 +1,10 @@
[package] [package]
name = "provisioning-daemon"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
edition.workspace = true
license.workspace = true license.workspace = true
name = "provisioning-daemon"
repository.workspace = true repository.workspace = true
version.workspace = true
[dependencies] [dependencies]
# Core daemon library from prov-ecosystem # Core daemon library from prov-ecosystem
@ -25,8 +25,8 @@ toml = { workspace = true }
platform-config = { path = "../platform-config" } platform-config = { path = "../platform-config" }
# Error handling # Error handling
thiserror = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
thiserror = { workspace = true }
# Logging # Logging
tracing = { workspace = true } tracing = { workspace = true }
@ -36,6 +36,6 @@ tracing-subscriber = { workspace = true }
clap = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] }
# Utilities # Utilities
uuid = { workspace = true }
chrono = { workspace = true } chrono = { workspace = true }
dirs = { workspace = true } dirs = { workspace = true }
uuid = { workspace = true }

View File

@ -1,23 +1,30 @@
[package] [package]
name = "provisioning-rag"
version.workspace = true
edition.workspace = true
authors.workspace = true authors.workspace = true
description = "RAG system for provisioning platform with Rig framework and SurrealDB" description = "RAG system for provisioning platform with Rig framework and SurrealDB"
edition.workspace = true
name = "provisioning-rag"
version.workspace = true
[dependencies] [dependencies]
# ============================================================================ # ============================================================================
# WORKSPACE DEPENDENCIES - Core async runtime and traits # WORKSPACE DEPENDENCIES - Core async runtime and traits
# ============================================================================ # ============================================================================
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "process", "io-util", "time", "fs"] }
futures = { workspace = true }
async-trait = { workspace = true } async-trait = { workspace = true }
futures = { workspace = true }
tokio = { workspace = true, features = [
"rt",
"rt-multi-thread",
"process",
"io-util",
"time",
"fs",
] }
# Serialization and data handling # Serialization and data handling
chrono = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
toml = { workspace = true } toml = { workspace = true }
chrono = { workspace = true }
uuid = { workspace = true } uuid = { workspace = true }
# Error handling # Error handling
@ -34,10 +41,10 @@ reqwest = { workspace = true }
# REST API Framework (Phase 8) # REST API Framework (Phase 8)
# ============================================================================ # ============================================================================
axum = { workspace = true } axum = { workspace = true }
http = "1"
hyper = { workspace = true, features = ["full"] }
tower = { workspace = true } tower = { workspace = true }
tower-http = { workspace = true, features = ["cors", "trace"] } tower-http = { workspace = true, features = ["cors", "trace"] }
hyper = { workspace = true, features = ["full"] }
http = "1"
# Database # Database
surrealdb = { workspace = true } surrealdb = { workspace = true }
@ -47,8 +54,8 @@ rig-core = { workspace = true }
rig-surrealdb = { workspace = true } rig-surrealdb = { workspace = true }
# Filesystem and path operations # Filesystem and path operations
walkdir = { workspace = true }
dirs = { workspace = true } dirs = { workspace = true }
walkdir = { workspace = true }
# Configuration # Configuration
config = { workspace = true } config = { workspace = true }
@ -76,14 +83,14 @@ clap = { workspace = true, features = ["derive", "env"] }
tracing-subscriber = { workspace = true } tracing-subscriber = { workspace = true }
[dev-dependencies] [dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true }
assert_matches = { workspace = true } assert_matches = { workspace = true }
criterion = { workspace = true, features = ["html_reports", "async_tokio"] } criterion = { workspace = true, features = ["html_reports", "async_tokio"] }
tempfile = { workspace = true }
tokio-test = { workspace = true }
[[bench]] [[bench]]
name = "phase8_benchmarks"
harness = false harness = false
name = "phase8_benchmarks"
# Library target # Library target
[lib] [lib]
@ -98,5 +105,5 @@ required-features = ["cli"]
# Features # Features
[features] [features]
default = []
cli = [] cli = []
default = []

View File

@ -1,24 +1,24 @@
[package] [package]
name = "service-clients"
version = { workspace = true }
edition = { workspace = true }
authors = { workspace = true } authors = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
description = "HTTP service client wrappers for provisioning platform services" description = "HTTP service client wrappers for provisioning platform services"
edition = { workspace = true }
license = { workspace = true }
name = "service-clients"
repository = { workspace = true }
version = { workspace = true }
[dependencies] [dependencies]
async-trait = { workspace = true }
log = { workspace = true }
reqwest = { workspace = true } reqwest = { workspace = true }
tokio = { workspace = true, features = ["full"] }
serde = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true } serde_json = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
log = { workspace = true } tokio = { workspace = true, features = ["full"] }
async-trait = { workspace = true }
# Service types (optional - only if not using generic types) # Service types (optional - only if not using generic types)
machines = { path = "../../../../submodules/prov-ecosystem/crates/machines" } machines = { path = "../../../../submodules/prov-ecosystem/crates/machines" }
[dev-dependencies] [dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true } tempfile = { workspace = true }
tokio-test = { workspace = true }

View File

@ -1,9 +1,9 @@
[package] [package]
name = "vault-service"
version = "0.2.0"
edition = "2021"
authors = ["Provisioning Team"] authors = ["Provisioning Team"]
description = "Vault Service for Provisioning Platform with secrets and key management (Age dev, Cosmian KMS prod, RustyVault self-hosted)" description = "Vault Service for Provisioning Platform with secrets and key management (Age dev, Cosmian KMS prod, RustyVault self-hosted)"
edition = "2021"
name = "vault-service"
version = "0.2.0"
[dependencies] [dependencies]
# Async runtime # Async runtime
@ -33,8 +33,8 @@ base64 = { workspace = true }
rand = { workspace = true } rand = { workspace = true }
# Error handling # Error handling
thiserror = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
thiserror = { workspace = true }
# Logging # Logging
tracing = { workspace = true } tracing = { workspace = true }
@ -51,8 +51,8 @@ secretumvault = { workspace = true }
[dev-dependencies] [dev-dependencies]
mockito = { workspace = true } mockito = { workspace = true }
tokio-test = { workspace = true }
tempfile = { workspace = true } tempfile = { workspace = true }
tokio-test = { workspace = true }
[[bin]] [[bin]]
name = "vault-service" name = "vault-service"