Skip to main content

SessionContextV1

Struct SessionContextV1 

Source
pub struct SessionContextV1 {
Show 15 fields pub grant_id: SessionGrantId, pub grant_revision: HarnessRevision, pub actor_run: CallerRunV1, pub task: Option<RedactedTaskV1>, pub sibling_runs: Vec<RedactedRunV1>, pub read_permissions: HarnessReadPermissionsV1, pub monitoring_visibility: HarnessMonitoringVisibilityV1, pub child_task_count: u64, pub child_task_subtree_depth: u64, pub task_create: bool, pub task_mutate: bool, pub allowed_tool_ids: Vec<String>, pub history_message_count: Option<u64>, pub completed_turn_count: Option<u64>, pub total_tokens: Option<u64>,
}

Fields§

§grant_id: SessionGrantId§grant_revision: HarnessRevision§actor_run: CallerRunV1§task: Option<RedactedTaskV1>

The calling run’s own task, redacted the same way as TaskGet – present only when the grant’s task scope makes it visible (mirrors actor_run.task_id).

§sibling_runs: Vec<RedactedRunV1>

Every OTHER run recorded against task (“what previous sessions did on it”), redacted the same way as RunGet. Gated solely by task being visible – independent of the grant’s runs read scope, which governs the general run-browsing tools instead. Always empty when task is None; never includes runs of another task.

§read_permissions: HarnessReadPermissionsV1§monitoring_visibility: HarnessMonitoringVisibilityV1§child_task_count: u64

Observation, not a budget: the number of tasks parented directly under the calling run’s own task right now (HarnessEngine::task_child_count), 0 if it has no children. Unconditional – computed from actor_run’s own task the same way the retired maximum_child_count wire field it replaces was (independent of whether task above is redacted to None). That retired field stated a cap that was validated for range but compared against no actual child count anywhere in the service – a session could read a limit here and still create children past it. The owner’s ruling: do not cap a session’s children, detect them. Nothing in this wire enforces an upper bound on this count.

§child_task_subtree_depth: u64

Observation, not a budget: the depth of the deepest chain of tasks parented (transitively) under the calling run’s own task right now (HarnessEngine::task_subtree_depth) – 0 if it has no children, 1 if it has children but no grandchildren, and so on. Unconditional in the same sense as child_task_count above. Replaces the retired maximum_child_depth wire field for the same reason child_task_ count replaces maximum_child_count (see that field’s doc comment). Nothing in this wire enforces an upper bound on this depth.

§task_create: bool

D5, Slice D: mirrors grant.task_permissions.create – gates g4a_task_create in allowed_tool_ids.

§task_mutate: bool

D5, Slice D: mirrors grant.task_permissions.mutate – gates g4a_task_move in allowed_tool_ids.

§allowed_tool_ids: Vec<String>§history_message_count: Option<u64>§completed_turn_count: Option<u64>§total_tokens: Option<u64>

Implementations§

Trait Implementations§

Source§

impl Clone for SessionContextV1

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SessionContextV1

Source§

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

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

impl<'de> Deserialize<'de> for SessionContextV1

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 Eq for SessionContextV1

Source§

impl PartialEq for SessionContextV1

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SessionContextV1

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
Source§

impl StructuralPartialEq for SessionContextV1

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.