Skip to content

v0.6.2

Choose a tag to compare

@simonsmh simonsmh released this 20 Oct 14:22
· 11 commits to main since this release

Fixes

  • Flat Context prompt and tools kept when the transcript has no system message (#38, fixes #37): hosts like omp 18.12.x export the pi-ai transcript toolkit yet still pass a flat Context with top-level systemPrompt / tools. resolveRequestContext took the transcript path purely on helper presence, replayed no system message, and shipped tools: [] — the model answered with DSML text markup and every turn ended empty. The resolver now treats the leading system message as the proof of a folded transcript and falls back to the flat fields when it is absent.
  • Tool-call identity preserved by ID, invalid arguments rejected (#39): streamed tool calls are now keyed by their explicit id (the index is only a continuation hint). Previously, two calls reusing one index were merged into a single state and the survivor was published with {} arguments — a silent wrong-tool execution risk. Argument fragments are scanned incrementally for the root-object boundary, the whole batch is validated before any toolcall_end is published, and malformed, non-object, or trailing-garbage arguments now fail the turn loudly instead of degrading to {}. finish_reason: "length" is preserved and the stream reader is released in a finally on all paths.

Validation

  • lint ✅ · typecheck ✅ · 362/362 tests ✅ (311 prior + 2 regression tests for #37 + 49 tool-call identity cases C01–C15) · build ✅ · published via the tag-triggered release workflow (npm provenance)