Skip to main content

SessionView

Struct SessionView 

Source
pub struct SessionView {
Show 28 fields pub account: Option<String>, pub actor: Option<String>, pub agent: Option<String>, pub children: Option<i32>, pub created_at: Option<String>, pub cwd: Option<String>, pub ended_at: Option<String>, pub events: Option<i32>, pub host: Option<String>, pub id: Option<String>, pub last_event: Option<Box<LastEventView>>, pub org: Option<String>, pub parent_session_id: Option<String>, pub progress: Option<Box<SessionProgress>>, pub project: Option<String>, pub provider: Option<String>, pub published: Option<bool>, pub repo: Option<String>, pub room: Option<String>, pub root_session_id: Option<String>, pub started_at: Option<String>, pub status: Option<String>, pub target: Option<String>, pub task_run_id: Option<String>, pub task_workflow_id: Option<String>, pub terminal: Option<String>, pub title: Option<String>, pub updated_at: Option<String>,
}

Fields§

§account: Option<String>

Account is which subscription or API account under that provider served it. Together with Provider it is what a login revoke matches on to stop the sessions a withdrawn account was paying for.

§actor: Option<String>

Actor is WHO this session belongs to, as "org/sub" — the same identity a run is billed under. A register that names none takes the calling principal. It is what scopes a login revoke, so a session with the wrong actor is a session the right person cannot stop.

§agent: Option<String>

Agent is the label the surface running this session calls itself by ("hanzo-dev"), up to 128 characters. Required at register. It is free text, not a reference: it need not name a defined agent, and nothing resolves it.

§children: Option<i32>

Children is the DIRECT fan-out — how many sessions name this one as parent — and not the size of the subtree. Read the tree for that.

§created_at: Option<String>

CreatedAt is when the row was written, same format. Every path that opens a session stamps it and StartedAt from one clock reading, so the two are equal on every session this surface has ever produced.

§cwd: Option<String>

Cwd is the directory the session is working in NOW, not the one it started in: a linked shell moves around, and a card showing where hanzo link was run answers "which work is this" with something that was true once.

§ended_at: Option<String>

EndedAt is when it reached done or error, same format. Empty while it is still running or paused, which is how absence reads here: not over yet.

§events: Option<i32>

Events is how many turns the session’s log holds, counted at read time. It is the whole log, however few of them RecentEvents carries.

§host: Option<String>

Execution context (mission-control): the machine/repo/cwd a card shows and the run-target a session is dispatched to. Omitted when a surface didn’t report it.

§id: Option<String>

ID is the session’s handle, minted here as "sess_" + 32 hex characters. Every later read, patch, event append and control command is addressed with it, and a caller cannot choose it.

§last_event: Option<Box<LastEventView>>

LastEvent is the compact latest-activity line for the list projection (nil in register/patch/tree responses; set by list + detail). It lets a swipe card show a live one-line preview without fetching full detail.

§org: Option<String>

Org is the caller’s OWN tenant, echoed so a client can build the public build URL (/builds/:org/:project) without a second call or a guess. It is never another tenant’s — every read is org-scoped before it gets here.

§parent_session_id: Option<String>

ParentSessionID is the session that spawned this one, making this a subagent of it. Empty means this session is a root — a flow of its own. A parent always belongs to the same org, so a tree never crosses a tenant.

§progress: Option<Box<SessionProgress>>

Progress is how far along this run is — a share of its goal, a phase, and a line saying what it is doing. Always present, so a board never branches on whether it is there; phase says "unknown" when nothing has estimated it. It is a MODEL ESTIMATE wherever estimated is true, and the row’s own word where it is false. See progress.go.

§project: Option<String>

The readable build: the product this session built and whether its story is public (provenance.go).

§provider: Option<String>

Provider is the linked AI account’s provider (claude | codex | hanzo | …) that served this run. Empty when the surface did not say.

§published: Option<bool>

Published is the author’s decision to let anyone read this session’s story at the public build route. It only ever widens READ access to a session that already exists and grants nothing else; false, an unpublished session is invisible there no matter who asks. It cannot be true without a Project, because that route is keyed on (org, project).

§repo: Option<String>

Repo is the code the session is working on, as the surface reported it. It is truth the SURFACE states, so it is a label rather than something resolved here.

§room: Option<String>

Room is the collaborative room this run was started in (HIP-0523), empty when it came from anywhere else — a CLI, a schedule, an API call. It is what lets a workspace view show the runs of one room beside its messages.

§root_session_id: Option<String>

RootSessionID is the top of this session’s tree, inherited from the parent and shared by every node in one flow. A root session’s own id, when it has no parent. It is the key one indexed read pulls a whole flow by, and what ?root= narrows a list or a stream to.

§started_at: Option<String>

StartedAt is when the session opened, RFC 3339 in UTC to the second.

§status: Option<String>

Status is one of exactly four: running, paused, done, error. running and paused are LIVE; done and error are TERMINAL and monotonic — once a session reaches one it can never go back, because reopening a finished run would fabricate liveness. A control command never moves it: the surface running the agent reports the new status, and until it does the command is only recorded.

§target: Option<String>

Target is the registered run-target this session is dispatched to — a machine the org claimed, resolved same-org when it was set, so it can never point at another tenant’s computer. Empty means the session names no machine.

§task_run_id: Option<String>

TaskRunID is that workflow’s particular run. A workflow is the definition and a run is one execution of it, which is why both are carried.

§task_workflow_id: Option<String>

TaskWorkflowID is the hanzoai/tasks durable workflow that actually EXECUTES this session — this registry is the view, control and stream layer over it. Set, a control command is FORWARDED to that engine; empty, the running surface polls for commands instead, which is every session today.

§terminal: Option<String>

Terminal is where this session can be WATCHED — the URL the machine published for its live terminal. Omitted when it publishes none.

§title: Option<String>

Title is the human line a card shows ("ship the landing page"), up to 512 characters. Free text, and the one field a surface may rewrite as the work turns out to be something else.

§updated_at: Option<String>

UpdatedAt is the session’s last-activity clock, same format. It moves on a write to the row — a status, a title, a re-dispatch — AND on every appended turn, because the append bumps it in the same transaction. The list is ordered on CreatedAt, so this is the field that says whether a session is still saying anything.

Implementations§

Trait Implementations§

Source§

impl Clone for SessionView

Source§

fn clone(&self) -> SessionView

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 SessionView

Source§

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

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

impl Default for SessionView

Source§

fn default() -> SessionView

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SessionView

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 PartialEq for SessionView

Source§

fn eq(&self, other: &SessionView) -> 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 SessionView

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 SessionView

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> 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: Sized + 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: Sized + 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> 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, <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