pub struct SubmitQuery {
pub ok: Option<bool>,
pub verdict: Option<String>,
}Expand description
POST /v1/worker/submit. Bearer = encoded CapToken. Body = raw text/octet.
Simplification-axis endpoint for SubAgents. Removes the JSON construction,
duplicated task_id, and JSON-escape burden of /v1/worker/result — the
worker completes a POST with just token + raw body. Origin: the recent clean-up
of the SubAgent contract drift (fewer IDs to pass around, multi-line escape
accidents eliminated).
GH #42 @file: sentinel: workers whose result body is too large to
re-emit inline (multi-KB structured output) may Write the payload to
a file under their task’s work_dir and submit the body
@file:<abs-path> instead — see [resolve_file_sentinel].
Non-sentinel bodies pass through unchanged. The step must opt in via
allow_file_submit: true (GH #43, default-deny — see
[FILE_SENTINEL_ALLOW_KEY]).
submit_format: "json" opt-in: a step whose meta channel declares
[SUBMIT_FORMAT_KEY] as "json" gets its final body parsed into a
structured Value before it is folded into the flow ctx, so a
downstream fanout / branch can address fields inside it. Applied
after sentinel resolution (so the two combine), declared-strict
(unparseable → 422), default-deny for every undeclared step — see
[resolve_submit_value].
Behavior:
task_idis auto-looked-up server-side from the token (already bound to theCapToken).- Body raw bytes go as-is into
Value::Stringforsubmit_output+post_result(unless the step declaredsubmit_format: "json", above). ok=truefixed (= the submit endpoint is success-path only). For the error path, use/v1/worker/resultwith an explicitok=false.
Fields§
§ok: Option<bool>Optional. ok=false signals failure (= DispatchOutcome::Blocked, caught
by the flow.ir Try path). Unspecified (None) is treated as ok=true
(= normal success).
verdict: Option<String>GH #76 HTTP wire: opt-in verdict tier selector. When absent, ok alone
drives the tier (pre-#76 byte-for-byte behavior:
ok=true|absent → Pass, ok=false → Blocked). When present, must
be one of "pass", "blocked", "skip" — anything else returns
400. verdict=skip requires ok to be absent or true: an
explicit verdict=skip&ok=false is a conflicting signal and also
returns 400. verdict=pass / verdict=blocked semantics match
the corresponding ok boolean; a verdict=pass&ok=false or
verdict=blocked&ok=true combination is also a conflict → 400.
Trait Implementations§
Source§impl Debug for SubmitQuery
impl Debug for SubmitQuery
Source§impl Default for SubmitQuery
impl Default for SubmitQuery
Source§fn default() -> SubmitQuery
fn default() -> SubmitQuery
Source§impl<'de> Deserialize<'de> for SubmitQuery
impl<'de> Deserialize<'de> for SubmitQuery
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>,
Auto Trait Implementations§
impl Freeze for SubmitQuery
impl RefUnwindSafe for SubmitQuery
impl Send for SubmitQuery
impl Sync for SubmitQuery
impl Unpin for SubmitQuery
impl UnsafeUnpin for SubmitQuery
impl UnwindSafe for SubmitQuery
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
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