pub struct RequestParams {
pub ops: String,
pub presentation: Option<String>,
pub presentation_per_op: Option<Vec<Option<String>>>,
pub save_to: Option<String>,
pub format: Option<String>,
pub format_per_op: Option<Vec<Option<String>>>,
pub request_id: Option<u64>,
}Expand description
Input for request — a DSL string (function-call or JSON form) plus
optional presentation controls (presentation and presentation_per_op).
Fields§
§ops: StringOne or more operations as a function-call DSL or JSON-form string.
Examples:
gtd.next()gtd.assign(title="ship", priority="p1")create(kind="entity", name="A") | link(source_id=$prev.id, target_id="b", relation="extends")[create(kind="entity", entity_kind="concept", name="A"), create(kind="entity", entity_kind="concept", name="B")][{"tool":"gtd.next","args":{}}, {"tool":"gtd.complete","args":{"id":"abc"}}]
Max 100 operations per batch.
presentation: Option<String>Presentation mode for the response.
"agent"(default): token-efficient — short UUIDs, compact timestamps, empty fields dropped."verbose": full canonical shape, no transformation."human": delegated to CLI layer (same as verbose at runtime level).
When omitted, defaults to "agent".
presentation_per_op: Option<Vec<Option<String>>>Per-operation presentation overrides.
When provided, entries override presentation per op by index.
null entries fall back to the batch-level presentation.
When omitted, all ops use presentation.
save_to: Option<String>File path for result sink.
When set, the full results are written as JSONL to this path and the
caller receives a self-describing manifest instead of the raw results:
{path, rows, per_column_null_counts, schema_fingerprint, checksum}.
The manifest lets agents detect bulk-export corruption (e.g. 10 000 null rows) in one call rather than after a downstream judgment fleet has graded blind. Parent directories are created if absent.
The resolved destination MUST stay within the allowed export root
(default ~/.khive/exports, overridable via KHIVE_SAVE_TO_ROOT).
Relative paths are joined under the root; absolute paths are accepted
only if they resolve inside it. Paths containing .. traversal
components and symlinked destinations are rejected.
When omitted, results are returned inline (default behaviour).
format: Option<String>Output serialization format for all ops in this request (ADR-078).
"json"(default): compact, lossless JSON."auto": shape-aware — markdown table for homogeneous record arrays, flat key-value block for single records, compact-JSON fallback."table": force markdown-table renderer regardless of shape.
Overrides KHIVE_OUTPUT_FORMAT and the TOML default_output_format.
When omitted, the server’s resolved default (env → toml → builtin json) is used.
format_per_op: Option<Vec<Option<String>>>Per-operation output format overrides (ADR-078).
When provided, entries override format per op by index.
null entries fall back to the batch-level format.
When omitted, all ops use format.
request_id: Option<u64>Caller-supplied correlation id (khive#948), forwarded unchanged onto
the daemon request frame and echoed back on the response so a
benchmark harness can join its own pre-send sample to the server-side
audit row for this request. Purely a correlation label — it never
changes how a request is dispatched. When omitted, the request
carries no id and its audit row has no request_id key.
Trait Implementations§
Source§impl Debug for RequestParams
impl Debug for RequestParams
Source§impl Default for RequestParams
impl Default for RequestParams
Source§fn default() -> RequestParams
fn default() -> RequestParams
Source§impl<'de> Deserialize<'de> for RequestParams
impl<'de> Deserialize<'de> for RequestParams
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 RequestParams
impl JsonSchema for RequestParams
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 moreAuto Trait Implementations§
impl Freeze for RequestParams
impl RefUnwindSafe for RequestParams
impl Send for RequestParams
impl Sync for RequestParams
impl Unpin for RequestParams
impl UnsafeUnpin for RequestParams
impl UnwindSafe for RequestParams
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