Expand description
Mirrors packages/agent/src/harness/tools/write.ts — the built-in write
AgentTool. Writes content to a file (creating parent dirs), serialized per
canonical path via the file-mutation-queue, with pre/post abort bracketing.
Invariant (plan §5.4): abort does NOT unblock the queue — the caller still
waits for its turn, then the closure observes the token and returns
Err(Aborted). The pre/post abort checks around write_file mirror the TS
if (signal?.aborted) throw lines.
Structs§
- Write
Input - Input for the write tool. Mirrors TS
WriteToolInput. - Write
Tool - The built-in
writetool. Holds the mutating env (for the queue + writes).
Functions§
- create_
write_ tool - Build the
writetool from a context. Requires a mutation-capable env. Mirrors TScreateWriteTool.