Documentation
¶
Overview ¶
Package fileedittool implements the Edit tool — targeted string replacement in files. Mirrors src/tools/FileEditTool/FileEditTool.ts.
Core contract (from TS source + decoded binary):
- old_string must appear exactly once in the file (or replace_all=true)
- old_string == new_string is rejected
- old_string == "" creates a new file with new_string as content
- Quote normalization: curly quotes in file match straight quotes from model
- Atomic write: temp file + rename, preserves permissions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
FilePath string `json:"file_path"`
OldString string `json:"old_string"`
NewString string `json:"new_string"`
ReplaceAll bool `json:"replace_all,omitempty"`
}
Input is the typed view of the JSON input.
type Tool ¶
type Tool struct{}
Tool implements the Edit tool.
func (*Tool) Description ¶
func (*Tool) InputSchema ¶
func (*Tool) InputSchema() json.RawMessage
func (*Tool) IsConcurrencySafe ¶
func (*Tool) IsConcurrencySafe(json.RawMessage) bool
func (*Tool) IsReadOnly ¶
func (*Tool) IsReadOnly(json.RawMessage) bool
Click to show internal directories.
Click to hide internal directories.