Documentation
¶
Index ¶
- Constants
- func CheckAndConfirm(input io.Reader, output io.Writer, interactive bool, policy *Policy, ...) error
- func CheckAndConfirmWithMessages(input io.Reader, output io.Writer, interactive bool, policy *Policy, ...) error
- func IsInteractive(input io.Reader) bool
- func PolicyFilePath(configDir string) string
- func SavePolicy(configDir string, policy *Policy) error
- func SkipConfirmFromEnvironment() bool
- type Action
- type CheckResult
- type CommandInfo
- type Messages
- type Policy
- type Rule
Constants ¶
View Source
const ( PolicyFileName = "safety-policy.json" EnvPolicyEnabled = "VOLCENGINE_SAFETY_POLICY_ENABLED" EnvPolicyRules = "VOLCENGINE_SAFETY_POLICY_RULES" EnvSkipConfirm = "VOLCENGINE_SAFETY_SKIP_CONFIRM" )
View Source
const ConfirmationNeededMessage = "" /* 494-byte string literal not displayed */
ConfirmationNeededMessage is shared by the default and localized CLI/MCP errors.
View Source
const MCPApprovalDescription = "" /* 232-byte string literal not displayed */
MCPApprovalDescription describes the same approval flow for tool discovery, before a confirmation error exists. It is guidance, not a one-use token.
Variables ¶
This section is empty.
Functions ¶
func CheckAndConfirm ¶
func IsInteractive ¶
func PolicyFilePath ¶
func SavePolicy ¶
func SkipConfirmFromEnvironment ¶
func SkipConfirmFromEnvironment() bool
Types ¶
type CheckResult ¶
type CommandInfo ¶
type Policy ¶
func DefaultPolicy ¶
func DefaultPolicy() *Policy
func LoadEffectivePolicy ¶
func LoadPolicy ¶
func (*Policy) Check ¶
func (p *Policy) Check(command CommandInfo) CheckResult
Click to show internal directories.
Click to hide internal directories.