Skip to content

v0.4.0

Choose a tag to compare

@bluesky585 bluesky585 released this 15 Sep 02:41
· 37 commits to main since this release
f434f03

Python source, and a TypeScript client for the HTTP API.

-chunker code no longer parses Go only. Python is cut on its top-level declarations by a line scanner that tracks bracket depth, comments, and string literals; a doc comment or decorator stays with the declaration it belongs to, and anything the scanner is unsure about stays in the piece it is in rather than risking a cut through the middle of a statement. Go keeps its standard library parser, so a declaration's span is still exact. -lang go|python names the language when the caller knows it and empty detects it; a name nibble cannot cut is an error rather than a silent fallback to token windows. markdown now reads each fence's info string, so a ```python block is cut by Python rules instead of being parsed as Go — that string was already parsed and then thrown away.

ts/ adds a thin TypeScript client for the HTTP API. It is thin on purpose: the chunkers stay Go, so nothing there reimplements splitting, and adding a chunker to the library gives the client that chunker for free. Node 23.6.0+ runs the .ts files directly by stripping types, so there is no build step and no npm package. One thing worth knowing first: a chunk's start and end are rune offsets while JavaScript indexes UTF-16 code units, so text.slice(start, end) is wrong for text holding an astral character.

No API removal: codechunker.New takes its options variadically, so New(tok, size) still compiles.

go get github.com/bluesky585/nibble@v0.4.0
go install github.com/bluesky585/nibble/cmd/nibble@v0.4.0
go install github.com/bluesky585/nibble/cmd/nibble-api@v0.4.0

Still not a production RAG platform. Hashing embeddings are bag-of-words, the JSONL store is scanned linearly, the HTTP index is in-process only, and the default tokenizer still counts runes.