Skip to content

Feat/content safety decision - #1196

Open
wujiaming-ai wants to merge 7 commits into
mainfrom
feat/content-safety-decision
Open

wujiaming-ai wants to merge 7 commits into
mainfrom
feat/content-safety-decision

Conversation

@wujiaming-ai

Copy link
Copy Markdown
Collaborator

No description provided.

wujiaming-ai and others added 7 commits November 2, 2026 14:37
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>

This branch has not been deployed

No deployments
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.

1 participant