Repository navigation
Feat/content safety decision - #1196
Open
wujiaming-ai wants to merge 11 commits into
Open
wujiaming-ai wants to merge 11 commits into
wujiaming-ai wants to merge 11 commits into
Conversation
Add an opt-in content safety plugin that audits content at the model and tool lifecycle checkpoints through the System One decision API. The default provider remains none and nothing is mounted automatically. - strict tool.content_safety configuration with Ark connection defaults - strict decision response arbitration and on_error policy - streaming partial suppression with final aggregated audit - audited SkillToolset load/resource/script/list/search tools - LLM Shield adapter and real-ADK E2E coverage Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Exercise the real Ark System One endpoint through the production plugin path when VEADK_CONTENT_SAFETY_LIVE=1 and a key are supplied. Normal test runs skip it so no CI job calls the production service by accident. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Rename ContentSafetyPlugin to DecisionPlugin to match the reviewed architecture, remove the skill pre-audit adapter from this change, and use StateBuilder.build_after_model for model-output auditing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Only derive the System One endpoint from a known Ark HTTPS base. Require an explicit decision.api_key for custom endpoints so Ark credentials are never silently sent to another provider. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ADK may attach hidden reasoning as Part(thought=True). Auditing that text caused benign final answers to be blocked after the model had already produced safe visible output. Filter hidden thought parts from after_model state and preserve them when replacing visible event text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The legacy LLM Shield module constructs a plugin at import time, so a config-only llm_shield_app_id was read too late and startup failed unless TOOL_LLM_SHIELD_APP_ID was already exported. Set the env inside the lock before importing, and restore it even when the import raises. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Move the Decision API protocol into veadk.decision with typed request and response models. content_safety now adapts its question configuration at the boundary and consumes the typed response, keeping the dependency one-way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Prevent non-Ark credentials from being reused for an explicit Ark decision endpoint. Audit visible text in mixed text/function-call events, run legacy LLM Shield callbacks outside the event loop, load .env before applying decision overrides, reject plaintext remote endpoints, and store API keys as SecretStr. Add regression coverage for each fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mount the content-safety plugin from VeADK Runner and AgentKit when `tool.content_safety` is present, so callers no longer have to load the config, build the plugin, and wire it into App manually. - Agent gains an optional `content_safety` field (None/False/True/dict/config) and a `content_safety_plugins` property for manually built ADK Apps. - `load_content_safety_config_if_present()` treats missing files or blocks as disabled while still failing fast on invalid configuration. - Plugin resolution deduplicates by name and keeps explicitly supplied plugins. - Runner now supports app-only construction while injecting plugins. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
wujiaming-ai
force-pushed
the
feat/content-safety-decision
branch
from
November 3, 2026 06:51
3e0e8bf to
4dbf6cf
Compare
- merge five built-in questions for provider=decision - allow per-name overrides and appends, add use_default_questions - fix question type to noul and reject user-supplied type Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
No description provided.