Jesús Pérez a395bd972f
Some checks failed
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
mdBook Build & Deploy / Build mdBook (push) Has been cancelled
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
mdBook Build & Deploy / Documentation Quality Check (push) Has been cancelled
mdBook Build & Deploy / Deploy to GitHub Pages (push) Has been cancelled
mdBook Build & Deploy / Notification (push) Has been cancelled
chore: add cd/ci ops
2026-01-12 03:36:55 +00:00

1.8 KiB

Platform Values

Constants, limits, defaults, and enumeration values.

Value Files

Limits (limits.ncl)

Platform limits and constraints:

  • Port limits (1024-65535)
  • Connection limits per mode
  • Worker thread limits
  • Agent instance limits
  • Timeout limits
  • Pool size limits
  • Storage limits

Example:

let limits = import "values/limits.ncl" in
let max_workers = limits.workers.max  # 32

Defaults (defaults.ncl)

Default values applied to all modes:

  • Server defaults (host, port, workers)
  • Database defaults (URL, credentials)
  • Monitoring defaults (log level, metrics)
  • Security defaults (TLS disabled by default)
  • Storage defaults (paths, backup settings)

Example:

let defaults = import "values/defaults.ncl" in
let default_port = defaults.server.port  # 8080

Ranges (ranges.ncl)

Enumeration values and valid ranges:

  • Log levels: [trace, debug, info, warn, error]
  • Auth methods: [jwt, oauth2, mfa]
  • Storage backends: [filesystem, s3, azure]
  • Budget windows: [daily, weekly, monthly]
  • LLM providers: [claude, openai, gemini, ollama]
  • Deployment modes: [solo, multiuser, enterprise]
  • Protocol schemes: [ws, wss, http, https, file]

Example:

let ranges = import "values/ranges.ncl" in
let valid_modes = ranges.deployment_modes  # ["solo", "multiuser", "enterprise"]

Usage Pattern

let limits = import "values/limits.ncl" in
let defaults = import "values/defaults.ncl" in
let ranges = import "values/ranges.ncl" in

# Check against limits
assert port > limits.port.min && port < limits.port.max

# Use defaults
let config = {
  port = defaults.server.port,
  workers = 4,
}

# Validate enum
assert std.array.contains ranges.log_levels "info"

References

  • Parent: ../README.md
  • Constraints: ../constraints/README.md
  • Validators: ../validators/README.md