Documentation
¶
Overview ¶
Package agentdiff builds the post-run "what did the agent change?" git diff for `tasks -p`. It is the Go counterpart of lib/tasks/agent_diff.rb, and it is separate from the CLI for the same reason: the decision — which files to diff, and how to handle a relocated memory sidecar — can then be exercised against a real sandbox repo without driving an actual agent.
The memory sidecar (agent-memory.md) normally sits beside tasks.jsonl, so it is diffed right alongside the task files. But TASKS_MEMORY or the config `memory` key can put it outside the task-data repo's work tree, where `git -C data_dir diff` cannot see it. In that case it is dropped from the diff and, when it exists (so the agent could have edited it), flagged with a one-line notice rather than silently omitted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
DataDir string
Org string
Archive string
Memory string
// Color forces ANSI colour in the captured diff. Callers pass "is stdout a
// terminal", so an interactive run stays coloured and a piped one stays
// plain — the diff is captured before it is printed, so git cannot decide
// this for itself.
Color bool
// Stderr is where git's own diagnostics go. Ruby's backticks inherit stderr,
// so a git that complains does so on the CLI's stderr; nil discards.
Stderr io.Writer
}
Request is one computation's inputs.