You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/builtin/builtin.go
+65Lines changed: 65 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ package builtin
3
3
import (
4
4
"context"
5
5
"encoding/json"
6
+
"errors"
6
7
"fmt"
7
8
"io"
8
9
"io/fs"
@@ -80,6 +81,13 @@ var tools = map[string]types.Tool{
80
81
"name", "The environment variable name to lookup"),
81
82
BuiltinFunc: SysGetenv,
82
83
},
84
+
"sys.download": {
85
+
Description: "Downloads a URL, saving the contents to disk at a given location",
86
+
Arguments: types.ObjectSchema(
87
+
"url", "The URL to download, either http or https.",
88
+
"location", "(optional) The on disk location to store the file. If no location is specified a temp location will be used. If the target file already exists it will not be overwritten and will fail."),
0 commit comments