pub struct HandoffDocument {
pub current_task: String,
pub key_decisions: Vec<String>,
pub context_files: Vec<ContextFile>,
pub errors_fixes: Vec<String>,
pub pending_work: Vec<String>,
pub recovery_hints: Vec<String>,
pub skills: Vec<String>,
pub attachments: Vec<KeptAttachment>,
}Expand description
The handoff schema aither ships: the task, decisions, errors, pending work and recovery hints, plus the files and skills to restore.
Fields§
§current_task: StringWhat the user asked for, and how far it has got.
key_decisions: Vec<String>Decisions, constraints and patterns that must survive.
context_files: Vec<ContextFile>File ranges the next turns need in view, restored verbatim on apply.
errors_fixes: Vec<String>Errors encountered and how they were resolved.
pending_work: Vec<String>Remaining work, in order, starting with the next action.
recovery_hints: Vec<String>Where the rest of the state can be recovered from.
skills: Vec<String>Session skills whose instructions the next turns need in view, chosen from the catalog the instruction lists.
attachments: Vec<KeptAttachment>Attachments of user messages the next turns must see again, by their id in the catalog the instruction lists; every other attachment below the fork is stripped on apply.
Trait Implementations§
Source§impl Clone for HandoffDocument
impl Clone for HandoffDocument
Source§impl Debug for HandoffDocument
impl Debug for HandoffDocument
Source§impl Default for HandoffDocument
impl Default for HandoffDocument
Source§impl<'de> Deserialize<'de> for HandoffDocument
impl<'de> Deserialize<'de> for HandoffDocument
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for HandoffDocument
Source§impl HandoffSchema for HandoffDocument
impl HandoffSchema for HandoffDocument
Source§fn instruction(prompt: &HandoffPrompt<'_>) -> String
fn instruction(prompt: &HandoffPrompt<'_>) -> String
Asks for every field, offering the skill catalog by name.
§Panics
Panics if the bundled instruction template cannot be rendered, which is a build-time error in the template rather than a runtime condition.
Source§fn retry(reason: &str) -> String
fn retry(reason: &str) -> String
Quotes reason and restates the keys.
§Panics
Panics if the bundled retry template cannot be rendered.
Source§fn validate(&self) -> Result<(), InvalidHandoff>
fn validate(&self) -> Result<(), InvalidHandoff>
Rejects an empty current_task: a handoff without it tells the next
instance nothing about what it is supposed to be doing, and is worse
than no handoff at all.
Source§fn render(&self, file_index: &[String]) -> String
fn render(&self, file_index: &[String]) -> String
Renders the document as Markdown, one section per field.
§Panics
Panics if the bundled handoff template cannot be rendered.
Source§fn into_restoration(self) -> Restoration
fn into_restoration(self) -> Restoration
Source§impl JsonSchema for HandoffDocument
impl JsonSchema for HandoffDocument
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for HandoffDocument
impl PartialEq for HandoffDocument
Source§impl Serialize for HandoffDocument
impl Serialize for HandoffDocument
impl StructuralPartialEq for HandoffDocument
Auto Trait Implementations§
impl Forget for HandoffDocument
impl Freeze for HandoffDocument
impl Move for HandoffDocument
impl RefUnwindSafe for HandoffDocument
impl Send for HandoffDocument
impl Sync for HandoffDocument
impl Unpin for HandoffDocument
impl UnsafeUnpin for HandoffDocument
impl UnwindSafe for HandoffDocument
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.