pub struct TaskContract {
pub schema_version: String,
pub id: Uuid,
pub goal: String,
pub claim_scope: ClaimScope,
pub constraints: Vec<String>,
pub criteria: Vec<Criterion>,
pub created_at: DateTime<Utc>,
pub confirmed: bool,
}Expand description
A user-visible contract that defines when a task may be called complete.
Fields§
§schema_version: StringSchema version for forward-compatible persistence.
id: UuidStable contract identifier.
goal: StringUser goal in plain language.
claim_scope: ClaimScopeMaximum claim a successful evaluation may make.
constraints: Vec<String>Hard constraints that remain pinned during context compaction.
criteria: Vec<Criterion>Acceptance criteria evaluated by the runtime.
created_at: DateTime<Utc>Creation timestamp.
confirmed: boolWhether a human explicitly confirmed the contract.
Implementations§
Source§impl TaskContract
impl TaskContract
Sourcepub fn new(goal: impl Into<String>, criteria: Vec<Criterion>) -> Self
pub fn new(goal: impl Into<String>, criteria: Vec<Criterion>) -> Self
Creates an unconfirmed, task-scoped contract.
Sourcepub fn automatic(goal: impl Into<String>) -> Self
pub fn automatic(goal: impl Into<String>) -> Self
Creates the deliberately modest contract used by --auto-contract.
This contract is permanently runtime-scoped. Its criterion proves that the provider loop terminated without a runtime error; it cannot make a task-correctness claim.
Sourcepub fn validate(&self) -> Result<(), ProofError>
pub fn validate(&self) -> Result<(), ProofError>
Validates identifiers, claim scope, and evidence requirements before execution.
Trait Implementations§
Source§impl Clone for TaskContract
impl Clone for TaskContract
Source§fn clone(&self) -> TaskContract
fn clone(&self) -> TaskContract
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more