deer-flow/docs
Miracle778 5a699e24a1
feat(guardrails): expose authenticated runtime context in GuardrailRequest (#3665)
* docs: guardrail runtime attribution spec

* docs: guardrail request attribution implementation plan

* feat(guardrails): add runtime user context and attribution fields to GuardrailRequest

Extend GuardrailRequest with optional runtime attribution fields so that
pluggable GuardrailProviders can access authenticated user context and
tool-call-level attribution:

- Gateway injects user_role, oauth_provider, oauth_id into runtime context
  alongside the existing user_id (server-authenticated only, client spoofing
  prevented)
- GuardrailRequest gains: user_id, user_role, oauth_provider, oauth_id,
  run_id, tool_call_id (all optional, backward compatible)
- GuardrailMiddleware reads these from ToolCallRequest.runtime.context
- thread_id now actually populated from context (was always None before)
- Tests: 15 new/expanded tests covering Gateway injection, runtime context
  reading, partial/missing fields, and client spoofing prevention
- Docs: new Runtime Attribution section in GUARDRAILS.md with provider
  example and YAML policy illustration

* fix(guardrails): propagate attribution to subagents

* fix(guardrails): complete subagent attribution propagation

---------

Co-authored-by: Miracle778 <miracle778@no-reply.com>
2026-06-21 16:08:25 +08:00
..
agents feat(skill): strengthen maintainer orchestrator review workflow (#3606) 2026-06-16 23:33:09 +08:00
plans feat(tracing): add optional Langfuse support (#1717) 2026-04-02 13:06:10 +08:00
pr-evidence Implement skill self-evolution and skill_manage flow (#1874) 2026-04-06 22:07:11 +08:00
superpowers feat(guardrails): expose authenticated runtime context in GuardrailRequest (#3665) 2026-06-21 16:08:25 +08:00
CODE_CHANGE_SUMMARY_BY_FILE.md docs: clean gateway runtime transition remnants (#3334) 2026-06-02 10:03:28 +08:00
SKILL_NAME_CONFLICT_FIX.md refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00