Expand description
khive-request — transport-agnostic DSL parser for verb-dispatch requests.
Re-exports§
pub use atomic::check_atomic_admissible;pub use atomic::AtomicRejection;
Modules§
- atomic
- ADR-099 migration step 2 — parse-time rejection of atomic-inadmissible verbs.
Structs§
- Parsed
Op - A single parsed operation: tool name plus named argument bag.
- Parsed
Request - Result of parsing a
requestinput: a list of ops and their execution mode.
Enums§
- ArgValue
- An argument value in a
ParsedOp: concrete JSON, a$prevpath ref, or a nested container. - DslError
- Parser error — surfaced as
invalid_paramsat the MCP boundary. - Execution
Mode - Execution mode:
Single(one op),Parallel([...]), orChain(op | op).
Constants§
- MAX_OPS
- Hard cap on operations per request.
- MAX_
OPS_ INPUT_ LEN - Hard cap on the byte length of a raw
opsinput string, checked before any parsing begins. A cheap O(1) first line of defense against pathological input; does not by itself bound container-nesting depth (seeNESTING_DEPTH_LIMIT), since a compact payload can still pack tens of thousands of nesting levels into a few KiB. - NESTING_
DEPTH_ LIMIT - Hard cap on container-nesting depth (
[/{) tracked through the DSL parser, the JSON-form pre-pass scan, and (by construction, sinceArgValue::ArrayandArgValue::Objectare only ever built inside the depth-guarded parser functions) any$prevreference nested inside array/object literals. - RESERVED_
ENVELOPE_ ARGS - Names reserved at the request-envelope level; rejected if they appear inside verb args.
Functions§
- parse_
request - Parse a request input string into a single op or a batch.
- value_
nesting_ within_ limit - Iteratively check container-nesting depth of a runtime
Value, returningfalseonce nesting exceedsmax_depth. - write_
keys_ for_ op_ pub - Extract substrate-prefixed write-conflict keys from one op for parallel-batch preflight.