Feat/rai guardrails#21
Open
patel-lyzr wants to merge 2 commits into
Open
Conversation
… policies) End-to-end policy enforcement through Lyzr SRS, working under bypassPermissions: - engine-claude-agent-sdk: register a PreToolUse hook when a policy is active so enforcement fires even under --dangerously-skip-permissions (canUseTool is skipped there); the hook routes to onPermissionRequest -> SrsPolicyDecider. - protocol: add EngineContext.policyActive. - harness-server: set policyActive = !!session.policyDecider. - sdk: forward `policy` in the createSession body + ComputerAgentOptions.policy (was silently dropped). - computeragent-server: forward `policy` on /run (previously only /sandboxes). - agentos-server: real SRS reverse-proxy for /policies + /opa-policies (was a 503 stub), Mongo-backed per-agent policy binding (agent_policies), and srsPolicyForAgent attaching the bound policy to sandbox/run bodies. - docker-compose: SRS_BASE_URL/SRS_API_KEY for agentos (reaches SRS over host.docker.internal), otel-collector env. Verified live: OPA (Rego; regex 169.254.0.0/16 + IMDS/SSRF block) and Cedar both deny tool calls; selective allow/deny; toggle; non-policy agents unaffected; metadata-service access blocked. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/agentos-server/src/routes/chat.ts
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.
Summary
Type of change
Verification
pnpm -r buildcleanpnpm -r typecheckcleanpnpm -r testclean (note any flaky tests in the comment)runConformanceSuite()passes (paste report below)Versioning
pnpm changesetwas run for any change to a published packageNotes for the reviewer