Documentation
¶
Overview ¶
Package delivery is a file the agent hands to the person on purpose (`harnessly deliver <path>`, the MCP tool deliver_file): what the platform records of it, how the record travels in the tool's result, and how it reads.
The record is a line of the tool's result, so the transcript keeps it: the feed finds it there (a card in the chat) and the pane's watcher finds it there (the file opens once), after a reload and after a restart alike. Files the agent only edits never make one: only the call that names the file does.
Index ¶
Constants ¶
const Host = "delivered.harnessly.invalid"
Host is the address a record is written under: it never resolves, it only says what the line is.
const ToolName = "deliver_file"
ToolName is the MCP tool that hands a file over, the same act as `harnessly deliver`.
Variables ¶
var PackDir = filepath.Join(os.TempDir(), "harnessly-delivered")
PackDir is where a folder handed over is packed; it lies under the machine's temporary folder, which the workspace's access lets out.
Functions ¶
func Describe ¶
Describe resolves a file under the access rules (the workspace's folders, no secrets, no links out of them), and reads its size and sha256. title is what the card is called ("" for the file's name).
A folder is handed over as one zip of it (named after the folder), written into PackDir by the same rules as a download of the folder: its secrets are left out.
Types ¶
type Info ¶
type Info struct {
// Path is the real, absolute path.
Path string
Name string
Title string
Mime string
Size int64
SHA256 string
}
Info is a delivered file.
type Tools ¶
type Tools struct {
Access *files.Access
Cwd string
// Handed is told of a file that was handed over (the runtime opens it in the chat's pane); nil for nothing.
Handed func(Info)
}
Tools is the delivery's MCP tool for one calling agent. Cwd is the folder of the agent's chat ("" when the runtime could not tell), which a relative path is taken from.