Files
blackroad-operating-system/operator_engine
Alexa Amundson a5266fb72a chore: bump pydantic-settings from 2.1.0 to 2.13.1 (#193)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings)
from 2.1.0 to 2.13.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic-settings/releases">pydantic-settings's
releases</a>.</em></p>
<blockquote>
<h2>v2.13.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: Deterministic alias selection when using validate_by_name by <a
href="https://github.com/chbndrhnns"><code>@​chbndrhnns</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/707">pydantic/pydantic-settings#707</a></li>
<li>add deep merge functionality to config file sources by <a
href="https://github.com/pmeier"><code>@​pmeier</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/698">pydantic/pydantic-settings#698</a></li>
<li>Add support for AWS Secrets Manager VersionId parameter by <a
href="https://github.com/jcyamacho"><code>@​jcyamacho</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/708">pydantic/pydantic-settings#708</a></li>
<li>bugfix: Return <code>None</code> for inaccessible GCP Secret Manager
secrets by <a
href="https://github.com/zaphod72"><code>@​zaphod72</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/712">pydantic/pydantic-settings#712</a></li>
<li>Bugfix for cli_kebab_case=&quot;all&quot; and CliImplicitFlag[bool]
by <a href="https://github.com/Digity101"><code>@​Digity101</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/702">pydantic/pydantic-settings#702</a></li>
<li>Unpack type alisases when looking for <code>NoDecode</code> by <a
href="https://github.com/tselepakis"><code>@​tselepakis</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/695">pydantic/pydantic-settings#695</a></li>
<li>CliToggleFlag and CliDualFlag by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/717">pydantic/pydantic-settings#717</a></li>
<li>Fix for CLI duplicate enum field values. by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/722">pydantic/pydantic-settings#722</a></li>
<li>fixed load nested config from env by <a
href="https://github.com/Sube-py"><code>@​Sube-py</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/723">pydantic/pydantic-settings#723</a></li>
<li>Add non-Path files support (for example Traversable) and open files
using Path.open method by <a
href="https://github.com/mahenzon"><code>@​mahenzon</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/724">pydantic/pydantic-settings#724</a></li>
<li>add one more traversable test by <a
href="https://github.com/mahenzon"><code>@​mahenzon</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/725">pydantic/pydantic-settings#725</a></li>
<li>CLI fix fox external list args. by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/727">pydantic/pydantic-settings#727</a></li>
<li>fix: handle case-insensitive retrieval in
GoogleSecretManagerSettingsSource by <a
href="https://github.com/ezwiefel"><code>@​ezwiefel</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/730">pydantic/pydantic-settings#730</a></li>
<li>CLI test fixes for help text formatting. by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/735">pydantic/pydantic-settings#735</a></li>
<li>Avoid conflicts with the <code>NAME</code> environment variable in
WSL by <a href="https://github.com/kzrnm"><code>@​kzrnm</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/747">pydantic/pydantic-settings#747</a></li>
<li>fix: When restoring init kwargs, use deterministic order by <a
href="https://github.com/chbndrhnns"><code>@​chbndrhnns</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/746">pydantic/pydantic-settings#746</a></li>
<li>Add env_prefix_target by <a
href="https://github.com/kzrnm"><code>@​kzrnm</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/749">pydantic/pydantic-settings#749</a></li>
<li>Remove <code>(default: …)</code> in the help message for
<code>CliToggleFlag</code> by <a
href="https://github.com/kzrnm"><code>@​kzrnm</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/740">pydantic/pydantic-settings#740</a></li>
<li>Add support for CLI serialize styles. by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/755">pydantic/pydantic-settings#755</a></li>
<li>Add support for overriding default help on CLI internal parser. by
<a href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/758">pydantic/pydantic-settings#758</a></li>
<li>CLI format_help method support by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/759">pydantic/pydantic-settings#759</a></li>
<li>feat(gcp): support SecretVersion annotation for per-field secret
versioning by <a
href="https://github.com/ezwiefel"><code>@​ezwiefel</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/763">pydantic/pydantic-settings#763</a></li>
<li>Allow <code>snake_case_conversion</code> with
<code>env_prefix</code> for Azure Key Vault source by <a
href="https://github.com/cstarkers"><code>@​cstarkers</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/762">pydantic/pydantic-settings#762</a></li>
<li>fix: Only override preferred_key when no value was found by <a
href="https://github.com/chbndrhnns"><code>@​chbndrhnns</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/767">pydantic/pydantic-settings#767</a></li>
<li>Update deps by <a
href="https://github.com/hramezani"><code>@​hramezani</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/768">pydantic/pydantic-settings#768</a></li>
<li>CLI coerce numeric types. by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/769">pydantic/pydantic-settings#769</a></li>
<li>CLI Union Discriminator Choices in Help by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/764">pydantic/pydantic-settings#764</a></li>
<li>Add nested path support for yaml_config_section (fixes <a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/772">#772</a>)
by <a
href="https://github.com/hugo-romero-mm"><code>@​hugo-romero-mm</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/773">pydantic/pydantic-settings#773</a></li>
<li>Prepare release 2.13.0 by <a
href="https://github.com/hramezani"><code>@​hramezani</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/777">pydantic/pydantic-settings#777</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/pmeier"><code>@​pmeier</code></a> made
their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/698">pydantic/pydantic-settings#698</a></li>
<li><a href="https://github.com/jcyamacho"><code>@​jcyamacho</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/708">pydantic/pydantic-settings#708</a></li>
<li><a href="https://github.com/zaphod72"><code>@​zaphod72</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/712">pydantic/pydantic-settings#712</a></li>
<li><a href="https://github.com/Digity101"><code>@​Digity101</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/702">pydantic/pydantic-settings#702</a></li>
<li><a href="https://github.com/Sube-py"><code>@​Sube-py</code></a> made
their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/723">pydantic/pydantic-settings#723</a></li>
<li><a href="https://github.com/mahenzon"><code>@​mahenzon</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/724">pydantic/pydantic-settings#724</a></li>
<li><a href="https://github.com/kzrnm"><code>@​kzrnm</code></a> made
their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/747">pydantic/pydantic-settings#747</a></li>
<li><a href="https://github.com/cstarkers"><code>@​cstarkers</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/762">pydantic/pydantic-settings#762</a></li>
<li><a
href="https://github.com/hugo-romero-mm"><code>@​hugo-romero-mm</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/773">pydantic/pydantic-settings#773</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic-settings/compare/v2.12.0...v2.13.0">https://github.com/pydantic/pydantic-settings/compare/v2.12.0...v2.13.0</a></p>
<h2>v2.12.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Support for enum kebab case. by <a
href="https://github.com/kschwab"><code>@​kschwab</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/686">pydantic/pydantic-settings#686</a></li>
<li>Apply source order: init &gt; env &gt; dotenv &gt; secrets &gt;
defaults and pres… by <a
href="https://github.com/chbndrhnns"><code>@​chbndrhnns</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/688">pydantic/pydantic-settings#688</a></li>
<li>Add NestedSecretsSettings source by <a
href="https://github.com/makukha"><code>@​makukha</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic-settings/pull/690">pydantic/pydantic-settings#690</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e87d12df0f"><code>e87d12d</code></a>
v2.13.1 (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/790">#790</a>)</li>
<li><a
href="acf8c14f5e"><code>acf8c14</code></a>
Fix JSON decoding for parameterized PEP 695 type aliases (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/780">#780</a>)</li>
<li><a
href="58b236a364"><code>58b236a</code></a>
Fix AttributeError with nested env vars for dict fields (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/785">#785</a>)
(<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/786">#786</a>)</li>
<li><a
href="4933f06402"><code>4933f06</code></a>
Fix CLI parsing error for set field types since 2.13.0 (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/787">#787</a>)
(<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/788">#788</a>)</li>
<li><a
href="bd0ebe6215"><code>bd0ebe6</code></a>
Fix RecursionError with self-referential models in CliApp (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/783">#783</a>)</li>
<li><a
href="eb7840e9f5"><code>eb7840e</code></a>
Fix regression for bool fields since 2.13.0 (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/784">#784</a>)</li>
<li><a
href="198e71cf0c"><code>198e71c</code></a>
Prepare release 2.13.0 (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/777">#777</a>)</li>
<li><a
href="de71e84057"><code>de71e84</code></a>
Add nested path support for yaml_config_section (fixes <a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/772">#772</a>)
(<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/773">#773</a>)</li>
<li><a
href="0f8f951b89"><code>0f8f951</code></a>
CLI Union Discriminator Choices in Help (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/764">#764</a>)</li>
<li><a
href="ce9804c462"><code>ce9804c</code></a>
CLI coerce numeric types. (<a
href="https://redirect.github.com/pydantic/pydantic-settings/issues/769">#769</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pydantic/pydantic-settings/compare/v2.1.0...v2.13.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pydantic-settings&package-manager=pip&previous-version=2.1.0&new-version=2.13.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2026-03-15 20:28:07 -05:00
..

BlackRoad Operator Engine

Version: 0.1.0 Status: Phase 2 Scaffold

Overview

The Operator Engine is BlackRoad OS's workflow orchestration and job scheduling system. It manages scheduled tasks, agent execution, and background jobs across the entire BlackRoad ecosystem.

Features

  • Job Registry: In-memory job storage and management
  • Scheduler: Simple interval-based job scheduler
  • HTTP API: Optional FastAPI server for remote job management
  • Extensible: Designed to integrate with Celery, RQ, or APScheduler in production

Architecture

operator_engine/
├── __init__.py          # Package exports
├── config.py            # Configuration settings
├── jobs.py              # Job models and registry
├── scheduler.py         # Scheduler implementation
├── server.py            # Optional HTTP server
├── tests/               # Test suite
│   ├── test_jobs.py
│   └── test_scheduler.py
└── README.md            # This file

Quick Start

As a Library

from operator_engine import Job, JobStatus, Scheduler, job_registry

# Create a job
job = Job(
    name="Daily Backup",
    schedule="0 0 * * *",  # Cron-style schedule
    metadata={"category": "maintenance"}
)

# Add to registry
job_registry.add_job(job)

# Execute immediately
scheduler = Scheduler()
result = await scheduler.execute_job(job.id)

print(f"Job {result.name} completed with status {result.status}")

As a Service

# Run the HTTP server
python -m operator_engine.server

# Server runs on http://localhost:8001
# API docs at http://localhost:8001/docs

API Endpoints

  • GET /health - Health check
  • GET /jobs - List all jobs
  • GET /jobs/{job_id} - Get specific job
  • POST /jobs/{job_id}/execute - Execute job immediately
  • GET /scheduler/status - Get scheduler status

Example Jobs

The Operator Engine comes with 3 example jobs:

  1. Health Check Monitor - Runs every 5 minutes
  2. Agent Sync - Runs every hour
  3. Blockchain Ledger Sync - Runs daily at midnight

Running Tests

# Install pytest if not already installed
pip install pytest pytest-asyncio

# Run tests
python -m pytest operator_engine/tests/ -v

# With coverage
python -m pytest operator_engine/tests/ --cov=operator_engine --cov-report=html

Configuration

The Operator Engine uses environment variables for configuration:

# Core settings
APP_NAME="BlackRoad Operator Engine"
APP_VERSION="0.1.0"
ENVIRONMENT="development"

# Scheduler settings
SCHEDULER_INTERVAL_SECONDS=60
MAX_CONCURRENT_JOBS=5
JOB_TIMEOUT_SECONDS=300

# Database (shared with main backend)
DATABASE_URL="postgresql+asyncpg://user:pass@host:5432/db"
REDIS_URL="redis://localhost:6379/0"

# Logging
LOG_LEVEL="INFO"

Integration with BlackRoad OS

The Operator Engine integrates with:

  • Backend API (/api/jobs) - Job management endpoints
  • Prism Console - Job monitoring UI
  • Agent Library - Scheduled agent execution
  • RoadChain - Ledger sync jobs
  • Vault - Compliance audit jobs

Phase 2 Roadmap

Current implementation is a minimal scaffold. Production roadmap includes:

  • Persistent job storage (PostgreSQL)
  • Distributed scheduling (Celery/RQ)
  • Job dependencies and workflows
  • Real-time job monitoring (WebSocket)
  • Retry logic and error handling
  • Job prioritization and queuing
  • Integration with agent execution framework
  • Metrics and observability (Prometheus)

How to Run Locally

# Option 1: As a library (import in Python)
python
>>> from operator_engine import scheduler
>>> status = scheduler.get_status()
>>> print(status)

# Option 2: As a standalone service
python -m operator_engine.server

# Visit http://localhost:8001/docs for API documentation

Development

# Install dependencies
pip install fastapi uvicorn pydantic-settings

# Run tests
pytest operator_engine/tests/

# Start server in dev mode
python -m operator_engine.server

License

Part of BlackRoad Operating System - MIT License


Next Steps: Integrate with main backend, add persistent storage, implement distributed scheduling.