feat(runtime): add hot-reloadable guardrails and model diagnostics

Introduce a runtime settings layer that hydrates persisted config at startup
and reapplies aliases, payload rules, cache behavior, CLI compatibility,
usage tuning, and related switches when settings change or SQLite updates.

Replace the legacy prompt injection middleware path with a guardrail
registry that supports prompt injection detection, PII masking, disabled
guardrail overrides, and post-call response handling across the chat
pipeline.

Add a metadata registry for model catalog and alias resolution so catalog
endpoints return enriched capabilities plus diagnostic headers and typed
alias errors instead of ad hoc responses.

Convert unsupported built-in web_search tools into an OmniRoute fallback
tool, execute them through builtin skills, and preserve Responses API
function call output with sanitized usage fields.

Centralize provider header fingerprints for GitHub, Cursor, Qwen, Qoder,
Kiro, and Antigravity, and migrate management passwords from env or
plaintext storage into persisted bcrypt hashes during startup and login.
This commit is contained in:
diegosouzapw 2026-04-17 11:56:52 -03:00
parent dc6d9e2e4b
commit 4ae488b25b
61 changed files with 4838 additions and 696 deletions

View file

@ -63,6 +63,9 @@ test("GithubExecutor.buildHeaders prefers Copilot token and sets GitHub-specific
assert.equal(headers.Authorization, "Bearer copilot-token");
assert.equal(headers.Accept, "text/event-stream");
assert.equal(headers["editor-version"], "vscode/1.110.0");
assert.equal(headers["editor-plugin-version"], "copilot-chat/0.38.0");
assert.equal(headers["user-agent"], "GitHubCopilotChat/0.38.0");
assert.equal(headers["x-github-api-version"], "2025-04-01");
assert.equal(headers["openai-intent"], "conversation-panel");
assert.ok(headers["x-request-id"]);