Skip to content

Conversation

Copy link

Copilot AI commented Dec 8, 2025

Adds /config endpoint to expose the agent's runtime configuration as JSON.

Changes

  • RestService routing: Added createConfigRoutings() method that serializes ConfigOptions map to JSON using nlohmann::json
  • Variant handling: Visitor pattern handles all ConfigOption types (bool, int, string, double, Seconds, Milliseconds, StringList) with compile-time exhaustiveness check
  • Test coverage: Added test verifying response format, status code, and presence of key configuration values

Usage

curl http://localhost:5000/config

Returns:

{
  "Port": 5000,
  "BufferSize": 17,
  "SchemaVersion": "2.6",
  "MaxAssets": 4,
  ...
}

String values are properly escaped via nlohmann::json to prevent injection attacks.

Original prompt

add a rest GET to fetch the agent config


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 6 commits December 8, 2025 20:34
Co-authored-by: robot-ranger <93950632+robot-ranger@users.noreply.github.com>
Co-authored-by: robot-ranger <93950632+robot-ranger@users.noreply.github.com>
Co-authored-by: robot-ranger <93950632+robot-ranger@users.noreply.github.com>
Co-authored-by: robot-ranger <93950632+robot-ranger@users.noreply.github.com>
… false

Co-authored-by: robot-ranger <93950632+robot-ranger@users.noreply.github.com>
Co-authored-by: robot-ranger <93950632+robot-ranger@users.noreply.github.com>
Copilot AI changed the title [WIP] Add REST GET to fetch agent config Add REST GET /config endpoint to fetch agent configuration Dec 8, 2025
Copilot AI requested a review from robot-ranger December 8, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants