docs: correct API & config reference to match source#91
Merged
Conversation
Use the bare agent_endpoint host and remove the deprecated manual AgentConfig/guard_agent()/lifespan wiring; the SecurityMiddleware drives the agent lifecycle. Adding the /api/v1 suffix or a second agent caused silent telemetry loss.
…T37) A missing guard-agent package previously fell through to the misleading "configuration is invalid / Check agent_api_key" message. Try the import first so a missing package logs "pip install guard-agent", and only read to_agent_config() after a successful import, where a None result now unambiguously means a genuine missing-key/config error (logged at ERROR).
Fix runtime inaccuracies from a cross-repo docs audit: real SecurityConfig field names/defaults, async signatures (extract_client_ip, cloud refresh), enforce_https (not enable_https), IPBanManager/RedisManager signatures, detection-exclusion field names, Pydantic v2 serialization, and the nav orphan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runtime-grounded documentation accuracy pass (part of the cross-repo clarity/integrity remediation).
Fixes inaccuracies that would break a copy-pasting user or silently no-op under Pydantic
extra='ignore':SecurityConfigfield names/defaults;enforce_https(notenable_https); correct detection-exclusion field names.extract_client_ip(async,agent_handler), cloudrefresh,setup_custom_logging.IPBanManager.ban_ipreasonparam,RedisManagerint | Nonereturns, keyword-only middleware config.Docs-only; every claim verified against
guard_core/guardsource.