Add standalone worker process with authentication and runtime #190

Merged
rwachters merged 9 commits from add-gradle-worker-authentication-flow into change-mcp-tool-call-architecture 2026-04-11 16:05:00 +00:00
rwachters commented 2026-04-11 16:03:58 +00:00 (Migrated from github.com)

Description

This pull request introduces a standalone worker module designed for service processes, with the following features:

  • Process Initialization: Added WorkerMain as the main entry point and structured error handling via WorkerMainError.
  • Authentication:
    • Implemented robust certificate-based challenge-response authentication.
    • Added WorkerAuthManager for token management and ServiceTokenStore for caching tokens.
    • Included WorkerAuthApi for server interaction and ChallengeSigner for signing challenges.
  • Runtime and Configuration:
    • Developed WorkerRuntime for token lifecycle management, including refresh and cancellation.
    • Introduced WorkerRuntimeConfig and a loader for configuration management.
  • CLI Support: Added command-line argument parsing for configuration and execution mode overrides (e.g., --config, --once).
  • Testing and Documentation: Comprehensive unit tests were written for authentication processes, runtime behavior, and configuration loading. Basic usage documentation is included.

Checklist

  • Documentation has been updated as needed.
  • Unit tests have been added or updated to reflect changes.
  • Integration tests have been considered or implemented where necessary.
### Description This pull request introduces a standalone `worker` module designed for service processes, with the following features: - **Process Initialization**: Added `WorkerMain` as the main entry point and structured error handling via `WorkerMainError`. - **Authentication**: - Implemented robust certificate-based challenge-response authentication. - Added `WorkerAuthManager` for token management and `ServiceTokenStore` for caching tokens. - Included `WorkerAuthApi` for server interaction and `ChallengeSigner` for signing challenges. - **Runtime and Configuration**: - Developed `WorkerRuntime` for token lifecycle management, including refresh and cancellation. - Introduced `WorkerRuntimeConfig` and a loader for configuration management. - **CLI Support**: Added command-line argument parsing for configuration and execution mode overrides (e.g., `--config`, `--once`). - **Testing and Documentation**: Comprehensive unit tests were written for authentication processes, runtime behavior, and configuration loading. Basic usage documentation is included. --- ### Checklist - [ ] Documentation has been updated as needed. - [ ] Unit tests have been added or updated to reflect changes. - [ ] Integration tests have been considered or implemented where necessary.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Torvian.eu/chatbot!190
No description provided.