feat: files up to 512 MB as streams, a code editor with highlighting and find/replace, media preview, hex editing; touch selection in the terminal (0.0.7)
This commit is contained in:
1 parent
3e46116a9b
commit
e1f5595afc
14 files changed
+1178
-94
No files matched your search
@@ -85,6 +85,8 @@ const (
|
||||
TaskFSZip = "fs.zip" // zip selected paths (native archive/zip)
|
||||
TaskFSMove = "fs.move" // move/rename
|
||||
TaskFSDownload = "fs.download" // read a whole file (larger cap) for browser download
|
||||
TaskFSUpload = "fs.upload" // write a file from a stream the agent fetches (0.0.7+)
|
||||
TaskFSGet = "fs.get" // send a file as a stream the agent posts (0.0.7+)
|
||||
|
||||
TaskSysUpdate = "sys.update" // download the latest agent binary and restart
|
||||
TaskSysUsers = "sys.users" // report the agent's user and the login-capable users
|
||||
@@ -97,6 +99,19 @@ const (
|
||||
// file be edited only when it fits, so that a save never cuts it short.
|
||||
const FSReadCap = 5 * 1024 * 1024
|
||||
|
||||
// FSFileCap bounds a file sent either way as a stream (TaskFSUpload,
|
||||
// TaskFSGet).
|
||||
const FSFileCap = 512 << 20
|
||||
|
||||
// FSStreamArgs are the arguments of TaskFSUpload and TaskFSGet: the file, and
|
||||
// the stream on the server that carries its bytes (GET it for an upload, POST
|
||||
// to it for a download). Size is the upload's length, -1 when not known.
|
||||
type FSStreamArgs struct {
|
||||
Path string `json:"path"`
|
||||
Stream string `json:"stream"`
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
|
||||
// TaskEnvelope is what the agent fetches for a task id.
|
||||
type TaskEnvelope struct {
|
||||
Type string `json:"type"`
|
||||
|
||||
Reference in new issue
Block a user