pub struct ProjectionKey {
pub task_id: String,
pub run_id: Option<String>,
pub step: Option<String>,
pub path: Option<String>,
}Expand description
Addressing for one projection target. ID axis (task_id / run_id) +
Name axis (step) + Path axis (path) — the one addressing type both
FileProjectionAdapter and the future McpQueryAdapter (ST2) accept.
Fields§
§task_id: StringTask identity (StepId’s Display string form, the same shape
AgentContextView.task_id uses).
run_id: Option<String>Run identity. None means “the latest run”.
step: Option<String>Step / agent name — the key directly under ctx.data this
projection narrows to. None means “the whole ctx”.
path: Option<String>Field path within the step’s value, $.a.b dot-path form (the
leading $. is optional). None means “the whole step value”.
Implementations§
Source§impl ProjectionKey
impl ProjectionKey
Sourcepub fn resolve<'a>(&self, ctx_data: &'a Value) -> Option<&'a Value>
pub fn resolve<'a>(&self, ctx_data: &'a Value) -> Option<&'a Value>
Pure narrowing helper: resolves self against ctx_data, first by
step (a direct key lookup) then by path (a .-separated walk of
nested object fields, or — GH #36 ST2 — RFC 9535-style bracket
notation for keys containing a literal ., e.g.
$.parts["plan.md"]). Returns None if any segment is absent, or
if a [-containing path is malformed — this is a pure lookup,
not a fallible parse (an unparseable path simply yields no match
rather than an error, matching the Option-returning contract
callers expect from a resolve step).
Bracket syntax is kept in lockstep with flow-ir-core::read_path
(mlua-flow-ir 0.1.2)’s parse_path_segments: bracket segments
["name"] (double-quoted, no escaping — a literal " inside a
name cannot be represented) may be chained directly
($.a["x"]["y"]) or combined with .-separated plain segments in
either order ($.a["x"].b, $["x.y"].inner). A path containing
no [ takes the original dot-split code path unchanged — no
behavioural change for existing callers.
Trait Implementations§
Source§impl Clone for ProjectionKey
impl Clone for ProjectionKey
Source§fn clone(&self) -> ProjectionKey
fn clone(&self) -> ProjectionKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectionKey
impl Debug for ProjectionKey
Source§impl<'de> Deserialize<'de> for ProjectionKey
impl<'de> Deserialize<'de> for ProjectionKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ProjectionKey
impl JsonSchema for ProjectionKey
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ProjectionKey
impl PartialEq for ProjectionKey
Source§impl Serialize for ProjectionKey
impl Serialize for ProjectionKey
impl StructuralPartialEq for ProjectionKey
Auto Trait Implementations§
impl Freeze for ProjectionKey
impl RefUnwindSafe for ProjectionKey
impl Send for ProjectionKey
impl Sync for ProjectionKey
impl Unpin for ProjectionKey
impl UnsafeUnpin for ProjectionKey
impl UnwindSafe for ProjectionKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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