agent_sdk_toolkit/workspace/anchor.rs
1//! Concrete workspace tool helpers layered over core tool/effect contracts. Use these
2//! modules for bounded read, search, edit, write, and format-aware extraction
3//! behavior under a host-selected workspace policy. Reads search local files;
4//! edit/write helpers may mutate files only through explicit executor calls. This
5//! file contains the anchor portion of that contract.
6//!
7use serde::{Deserialize, Serialize};
8
9#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
10/// Workspace hash line anchor request or result value.
11/// Creating the value does not touch the filesystem; workspace executors document read, write, edit, or search effects.
12pub struct HashLineAnchor {
13 /// Line used by this record or request.
14 pub line: usize,
15 /// Deterministic before hash used for stale checks, package evidence, or
16 /// replay comparisons.
17 pub before_hash: String,
18}