+ {
+ Type: "function",
+ Name: "shell",
+ Description: "Run a command with bash, as the user, in the working directory, with no input. Gives its output and error output, and its exit status when it fails.",
+ Parameters: objectSchema(map[string]any{
+ "command": stringSchema("The bash command."),
+ }),
+ Strict: true,
+ },
+ {
+ Type: "function",
+ Name: "read",
+ Description: "Read a text file.",
+ Parameters: objectSchema(map[string]any{
+ "path": stringSchema("The file, absolute or relative to the working directory."),
+ }),
+ Strict: true,
+ },
+ {
+ Type: "function",
+ Name: "write",
+ Description: "Write a text file whole, replacing it when it exists. Makes the missing directories.",
+ Parameters: objectSchema(map[string]any{
+ "path": stringSchema("The file, absolute or relative to the working directory."),
+ "text": stringSchema("The whole new content."),
+ }),
+ Strict: true,
+ },
+ {
+ Type: "function",
+ Name: "edit",
+ Description: "Replace the one occurrence of old in a text file with new.",
+ Parameters: objectSchema(map[string]any{
+ "path": stringSchema("The file, absolute or relative to the working directory."),
+ "old": stringSchema("The exact text to replace. It must occur once in the file."),
+ "new": stringSchema("The text that replaces old."),
+ }),
+ Strict: true,
+ },