policy

command
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

Policy Example

This example shows the default policy boundary between model-requested tool calls and tool execution.

The read-only tool runs because explicit read permission is allowed by default. The first write tool call is denied before its body runs because write is denied by default. The final write call succeeds because the run passes RunRequest.AllowedPermissions and a typed RunRequest.PolicyContext.

Run it with:

go run ./examples/policy

Expected output:

read allowed
write denied
write allowed

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL