Expand description
The binding-side glue over segment: one implementation of
“transcript in, CompileRequest + audit trail out”, relayed by the
Node, Python and WASM bindings instead of copied into each.
The one place a binding turns a raw transcript into a
CompileRequest plus an auditable segmentation report.
compile_transcript is a one-call shortcut over compile_context: it
segments a raw agent-session transcript into turns (and, within a turn,
into code/log/body sub-segments) before compiling. The segmentation
itself lives in [super::segment]; what lives here is the glue around
it — the empty-transcript guard the MCP tool applies, the request
assembly, and the per-segment audit trail a caller inspects to see how
its transcript was cut before trusting the compiled result.
That glue was copied verbatim into velesdb-node and velesdb-wasm,
each doc comment pointing at the other as “mirrors the … binding’s own”
— two copies kept in step by hand. The Python binding could not be given
compile_transcript without becoming a third. It lives here instead, so
the three bindings relay one implementation and a fix reaches all of them
at once.
fragment_id is rendered as a decimal string, not a u64: it is a
64-bit content hash, routinely past 2^53, and a JS caller reading it as a
number would round it. Every binding publishes it that way already, and
so does the MCP tool — the string is the wire form, not a JS concession.
No path field: resolving one needs an ingest-roots allowlist, which is
MCP-server configuration. A binding caller reads the file itself and
passes the text.
Structs§
- Segment
Info - One entry of
SegmentationReport::segments: where a fragment came from in the original transcript. - Segmentation
Report - How a transcript was cut, returned alongside the compiled context so a caller can audit the cut before trusting the result.
- Transcript
Compile Input - A binding’s
compile_transcriptrequest: the MCP tool’s own fields minuspath(see the module docs).
Functions§
- build_
transcript_ compile_ request - Segment
input.transcriptand assemble theCompileRequesta binding then hands tocompile_context, plus theSegmentationReportit returns next to the compiled context.