Skip to main content

RowValue

Enum RowValue 

Source
pub enum RowValue<'a> {
Show 15 variants MessageQueueContent { response_id: &'a str, agent_instance_hierarchy: &'a str, message_queue_content_id: i64, }, ToolResponse { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, tool_call_id: &'a str, }, AssistantResponseRefusal { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, text: &'a str, }, AssistantResponseReasoning { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, text: &'a str, }, AssistantResponseToolCalls { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, tool_call_index: u64, tool_call_id: &'a str, function_name: &'a str, arguments: &'a str, }, AssistantResponseContentText { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, text: &'a str, }, AssistantResponseContentImage { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, image_url: &'a ImageUrl, }, AssistantResponseContentAudio { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, input_audio: &'a InputAudio, }, AssistantResponseContentVideo { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, video_url: &'a VideoUrl, }, AssistantResponseContentFile { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, file: &'a File, }, ToolResponseContentText { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, text: &'a str, }, ToolResponseContentImage { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, image_url: &'a ImageUrl, }, ToolResponseContentAudio { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, input_audio: &'a InputAudio, }, ToolResponseContentVideo { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, video_url: &'a VideoUrl, }, ToolResponseContentFile { response_id: &'a str, agent_instance_hierarchy: &'a str, index: u64, part_index: u64, file: &'a File, },
}
Expand description

One streaming-content row to INSERT or UPDATE. Borrowed: every variant lifts string / media payloads from the owning chunk by reference. Every variant also carries the enclosing chunk’s agent_instance_hierarchy so the writer can populate objectiveai.messages.agent_instance_hierarchy and key the objectiveai.messages_queue downgrade against the right spawned agent.

Variants§

§

MessageQueueContent

Consumption signal: the API stamped this message_queue_contents.id onto the chunk’s request_message_ids field. The writer’s helper:

  1. resolves the row’s kind via SQL CASE against message_queue_contents.kind,
  2. UPDATE objectiveai.message_queue SET active=FALSE WHERE id = (SELECT message_queue_id FROM objectiveai.message_queue_contents WHERE id = $content_id) AND active=TRUE, and
  3. INSERT objectiveai.messages with "table" picked from the five message_queue_* enum values matching the kind and row_index = content_id, so the read path dispatches directly to the right per-kind table.

Multiple content_ids sharing one parent fire the flip once; the rest are no-ops via the AND active=TRUE guard.

Iterators yield these AHEAD of the per-message content rows so the log chronicles consumption before the body the agent produced.

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§message_queue_content_id: i64
§

ToolResponse

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§tool_call_id: &'a str
§

AssistantResponseRefusal

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§text: &'a str
§

AssistantResponseReasoning

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§text: &'a str
§

AssistantResponseToolCalls

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§tool_call_index: u64
§tool_call_id: &'a str
§function_name: &'a str
§arguments: &'a str
§

AssistantResponseContentText

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§text: &'a str
§

AssistantResponseContentImage

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§image_url: &'a ImageUrl
§

AssistantResponseContentAudio

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§input_audio: &'a InputAudio
§

AssistantResponseContentVideo

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§video_url: &'a VideoUrl
§

AssistantResponseContentFile

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§file: &'a File
§

ToolResponseContentText

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§text: &'a str
§

ToolResponseContentImage

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§image_url: &'a ImageUrl
§

ToolResponseContentAudio

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§input_audio: &'a InputAudio
§

ToolResponseContentVideo

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§video_url: &'a VideoUrl
§

ToolResponseContentFile

Fields

§response_id: &'a str
§agent_instance_hierarchy: &'a str
§index: u64
§part_index: u64
§file: &'a File

Implementations§

Source§

impl<'a> RowValue<'a>

Source

pub fn table(&self) -> RowTable

Source

pub fn message_table(&self) -> MessageTable

MessageTable for this row’s table. Streaming-content rows always have one — EXCEPT RowValue::ToolResponse, whose head row emits no messages event (it’s a tool_call_id lookup only). Callers MUST early-branch ToolResponse before calling this (write.rs::insert_value/update_value do), or the .expect() below panics.

Source

pub fn response_id(&self) -> &'a str

response_id borrowed from the immediately-enclosing agent-completion chunk’s id. Even for rows emitted under vector_completion_chunk_rows / function_execution_chunk_rows, the recursion bottoms out at an agent-completion chunk and uses that chunk’s id — never the outer vector/function wrapper’s id. This is what agents logs read all / read pending use as the per-block response_id boundary key.

Source

pub fn agent_instance_hierarchy(&self) -> &'a str

agent_instance_hierarchy borrowed from the enclosing agent-completion chunk. Every streaming-content row lives inside an agent completion, so this is always non-NULL.

Source

pub fn row_index(&self) -> i64

row_index column value for the postgres messages / messages_queue entry. Always populated for streaming-content rows.

Source

pub fn row_sub_index(&self) -> Option<i64>

row_sub_index column value: tool_call_index for tool-call rows, part_index for content-part rows, None for tool_response / assistant refusal / assistant reasoning (whose shape has no sub-index). The matching SQL column is nullable.

Source

pub fn key(&self) -> RowKey<'a>

The borrowed key that identifies this row’s slot in postgres. Hashable + Eq — used by the shadow map to find the previously stored body without any allocation. Two RowValues targeting the same row produce equal RowKeys.

Source

pub fn body_eq(&self, stored: &RowBody) -> bool

Field-by-field equality against a stored body. Returns true when this row would write a byte-identical body — the writer uses that signal to short-circuit the SQL.

Source

pub fn to_body(&self) -> RowBody

Build an owned RowBody for storing on Insert / Update. Only called on the cold path (when the shadow needs to remember a new value); the Skip path never allocates here.

Trait Implementations§

Source§

impl<'a> Clone for RowValue<'a>

Source§

fn clone(&self) -> RowValue<'a>

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<'a> Debug for RowValue<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for RowValue<'a>

§

impl<'a> RefUnwindSafe for RowValue<'a>

§

impl<'a> Send for RowValue<'a>

§

impl<'a> Sync for RowValue<'a>

§

impl<'a> Unpin for RowValue<'a>

§

impl<'a> UnsafeUnpin for RowValue<'a>

§

impl<'a> UnwindSafe for RowValue<'a>

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToAst for T

Source§

fn ast(self, begin: usize, end: usize) -> Spanned<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> TryClone for T
where T: Clone,

Source§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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