返回 DeepSeek-Reasonix
write_access.go
根目录 / internal / tool / write_access.go
1 package tool
2
3 import "encoding/json"
4
5 // WriteAccessDeclaration is the host-local write-directory request a tool
6 // exposes from its structured arguments. It is not part of the provider
7 // protocol.
8 type WriteAccessDeclaration struct {
9 Directories []string
10 Justification string
11 // RequestedPreset is a stable, tool-declared per-call escalation request.
12 // The host remains authoritative and may reject it before execution.
13 RequestedPreset string
14 DenialID string
15 }
16
17 // WriteAccessDeclarer is implemented by built-in tools that can name the local
18 // directories a call needs to write. MCP and custom tools do not implement it.
19 type WriteAccessDeclarer interface {
20 DeclareWriteAccess(args json.RawMessage) (WriteAccessDeclaration, error)
21 }
22
22 lines GO