Description
Expose a sandbox-local policy.local HTTP API that lets agents inspect current policy, read recent denials, read their own sandbox-local activity logs, run advisory validation, submit policy proposals, and poll proposal status.
Context
Parent: #1062
RFC artifact: https://github.com/NVIDIA/OpenShell/blob/feat/agent-driven-policy-management/rfc/0001-agent-driven-policy-management.md
This is part of the locked Agent-Driven Policy Management MVP. GitHub issues are the development source of truth; Linear is only a roadmap pointer.
This replaces the earlier openshell-policy CLI plan. The MVP should make the local API load-bearing; MCP/CLI wrappers can be added later if they prove useful.
API shape
Initial endpoints:
GET /v1/policy/current returns the current effective policy for this sandbox.
GET /v1/denials?last=N returns recent structured denial events for this sandbox.
GET /v1/logs?last=N returns sandbox-local activity/log events the agent is allowed to inspect.
POST /v1/prove runs an advisory static/prover check for a candidate operation set.
POST /v1/proposals accepts a JSON body with PolicyMergeOperation-shaped operations, intent/summary metadata, and optional denial/log evidence refs; the supervisor/local service bundles this into the gateway gRPC proposal path for human approval.
GET /v1/proposals/{id} returns proposal status, validation result, and rejection guidance.
Definition of Done
Description
Expose a sandbox-local
policy.localHTTP API that lets agents inspect current policy, read recent denials, read their own sandbox-local activity logs, run advisory validation, submit policy proposals, and poll proposal status.Context
Parent: #1062
RFC artifact: https://github.com/NVIDIA/OpenShell/blob/feat/agent-driven-policy-management/rfc/0001-agent-driven-policy-management.md
This is part of the locked Agent-Driven Policy Management MVP. GitHub issues are the development source of truth; Linear is only a roadmap pointer.
This replaces the earlier
openshell-policyCLI plan. The MVP should make the local API load-bearing; MCP/CLI wrappers can be added later if they prove useful.API shape
Initial endpoints:
GET /v1/policy/currentreturns the current effective policy for this sandbox.GET /v1/denials?last=Nreturns recent structured denial events for this sandbox.GET /v1/logs?last=Nreturns sandbox-local activity/log events the agent is allowed to inspect.POST /v1/proveruns an advisory static/prover check for a candidate operation set.POST /v1/proposalsaccepts a JSON body withPolicyMergeOperation-shaped operations, intent/summary metadata, and optional denial/log evidence refs; the supervisor/local service bundles this into the gateway gRPC proposal path for human approval.GET /v1/proposals/{id}returns proposal status, validation result, and rejection guidance.Definition of Done
policy.localresolves from inside the sandbox without requiring policy allow rules.PolicyMergeOperation-shaped JSON payloads instead of CLI flag strings.GetDraftPolicystate and surfaces rejection guidance.