Skip to main content

DraftPackage

Struct DraftPackage 

Source
pub struct DraftPackage {
Show 28 fields pub package_version: String, pub package_id: Uuid, pub created_at: DateTime<Utc>, pub goal: Goal, pub iteration: Iteration, pub agent_identity: AgentIdentity, pub summary: Summary, pub plan: Plan, pub changes: Changes, pub risk: Risk, pub provenance: Provenance, pub review_requests: ReviewRequests, pub signatures: Signatures, pub status: DraftStatus, pub verification_warnings: Vec<VerificationWarning>, pub validation_log: Vec<ValidationEntry>, pub display_id: Option<String>, pub tag: Option<String>, pub vcs_status: Option<VcsTrackingInfo>, pub parent_draft_id: Option<Uuid>, pub pending_approvals: Vec<ApprovalRecord>, pub supervisor_review: Option<SupervisorReview>, pub ignored_artifacts: Vec<IgnoredArtifact>, pub baseline_artifacts: Vec<String>, pub agent_decision_log: Vec<DecisionLogEntry>, pub goal_shortref: Option<String>, pub draft_seq: u32, pub plan_phase: Option<String>,
}
Expand description

The Draft Package — a complete, reviewable milestone deliverable.

This is the central artifact of Trusted Autonomy. Every goal iteration produces one of these for human review.

Fields§

§package_version: String§package_id: Uuid§created_at: DateTime<Utc>§goal: Goal§iteration: Iteration§agent_identity: AgentIdentity§summary: Summary§plan: Plan§changes: Changes§risk: Risk§provenance: Provenance§review_requests: ReviewRequests§signatures: Signatures§status: DraftStatus

Tracks the review status (not in the JSON schema — internal state).

§verification_warnings: Vec<VerificationWarning>

Verification warnings from pre-draft verification gate (v0.10.8). Populated when [verify] on_failure = "warn" and a command fails.

§validation_log: Vec<ValidationEntry>

Hard evidence that required checks passed/failed (v0.13.17). Each entry records the outcome of one required_check command. Non-zero exit_code blocks ta draft approve unless –override is passed.

§display_id: Option<String>

Human-friendly display ID derived from the goal ID (v0.10.11). Format: <goal-id-prefix>-NN (e.g., 511e0465-01). Falls back to package_id short prefix for legacy drafts.

§tag: Option<String>

Human-friendly goal tag inherited from the parent GoalRun (v0.11.2.3). The primary display identifier in all draft listing contexts.

§vcs_status: Option<VcsTrackingInfo>

VCS tracking information populated during commit/push/open_review (v0.11.2.3). Tracks the PR lifecycle after apply.

§parent_draft_id: Option<Uuid>

Parent draft ID for follow-up goals (v0.12.2.1). When set, this draft is a follow-up to the parent draft. Used for chain display (ta draft view combined impact) and chain apply (ta draft apply --chain).

§pending_approvals: Vec<ApprovalRecord>

Accumulated reviewer approvals for multi-party governance (v0.14.2). Empty for single-approver workflows (legacy / require_approvals = 1). Grows as each reviewer calls ta draft approve --as <identity>. When pending_approvals.len() >= require_approvals the draft transitions to DraftStatus::Approved.

§supervisor_review: Option<SupervisorReview>

AI supervisor review embedded after agent exit (v0.13.17.4). Present when supervisor is enabled; None when disabled or skipped.

§ignored_artifacts: Vec<IgnoredArtifact>

Gitignored artifacts encountered during apply –submit (v0.13.17.5). Populated by the VCS adapter when git add would fail on ignored paths. Known-safe artifacts (.mcp.json, *.local.toml, .ta/ runtime files) are recorded here but silently dropped from the commit. Unexpected-ignored artifacts are highlighted in ta draft view.

§baseline_artifacts: Vec<String>

Artifact URIs inherited from the parent draft (v0.14.3.5).

Populated when building a follow-up draft. Contains all resource_uri values from the parent draft’s artifact list at build time. During ta draft apply, files in this list that are unchanged in staging (staging hash == source hash) are skipped — they were already settled by the parent apply and staging just has an older copy.

This prevents “follow-up staging drift”: applying a follow-up draft from staging that predates the parent commit would otherwise revert files (PLAN.md, USAGE.md, shared source) that the parent apply had already updated.

§agent_decision_log: Vec<DecisionLogEntry>

Agent-authored decision log (v0.14.7).

Populated from .ta-decisions.json written by the agent during its run. Records non-obvious implementation choices with alternatives and rationale. Distinct from plan.decision_log which is extracted from change_summary.json. Shown as the “Agent Decision Log” section in ta draft view.

§goal_shortref: Option<String>

Goal shortref inherited from the parent GoalRun (v0.14.7.3).

First 8 lowercase hex characters of goal.goal_id. Populated at ta draft build time. Used to display drafts as <goal_shortref>/<draft_seq> across all CLI surfaces (list, view, PR title, audit log). Allows grep 2159d87e audit.jsonl to find all entries for a goal.

§draft_seq: u32

Sequence number for this draft within its goal (v0.14.7.3).

First draft for a goal is 1, second is 2, etc. Combined with goal_shortref to produce the <shortref>/<seq> display identifier (e.g., 2159d87e/1). Defaults to 0 for legacy drafts without this field.

§plan_phase: Option<String>

Plan phase ID linked to this draft (v0.15.15.2).

Populated from GoalRun.plan_phase at ta draft build time. Shown prominently in ta draft view (below the draft title) and as a column in ta draft list. Empty for goals not linked to a plan phase.

Trait Implementations§

Source§

impl Clone for DraftPackage

Source§

fn clone(&self) -> DraftPackage

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DraftPackage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DraftPackage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for DraftPackage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,