Skip to content

@kjerneverk/execution 1.0.6 — core LLM execution types, tool definitions, and streaming chunk model

Choose a tag to compare

@tobrien tobrien released this 12 Feb 03:32
· 10 commits to working since this release
6a4c6c3

Main changes

This release focuses on formalizing the public TypeScript contract for the @kjerneverk/execution package: core request/response types, provider interfaces, tool-calling schemas, and a streaming event model. The goal is to make it easier for downstream packages to implement providers consistently without taking SDK dependencies.

Added / updated TypeScript API

Core conversation + request types

  • Added foundational types for representing LLM conversations:
    • Role, Model, PersonaRole, TokenizerEncoding
    • Message and ConversationMessage
  • Expanded the request shape:
    • Request now includes optional tools?: ToolDefinition[] for tool/function calling.
    • createRequest(model) is provided to construct a request object with addMessage(...).

Tool calling (provider-agnostic)

  • Added tool/function calling types intended to map cleanly across providers:
    • ToolCall
    • ToolParameterSchema (JSON-schema-like “object/properties/required” shape)
    • ToolDefinition (name, description, parameters)

Streaming model

  • Added a normalized streaming event model:
    • StreamChunkType: 'text' | 'tool_call_start' | 'tool_call_delta' | 'tool_call_end' | 'usage' | 'done'
    • StreamChunk with optional text, toolCall (delta-friendly), and usage payloads

Provider interface + execution options

  • Added provider-facing interfaces for consistent implementations:
    • ProviderResponse (including optional usage and toolCalls)
    • ExecutionOptions
    • Provider interface, including optional executeStream(...) and supportsModel(...)

Public exports

  • src/index.ts now re-exports the new/updated types plus createRequest, making them available via the package entrypoint import.

Impact

For users of the package

  • You can now rely on a stable, shared set of types to represent:
    • requests/messages
    • tool definitions + tool calls
    • streaming output
    • provider execution behavior and options

For provider implementers

  • The Provider interface and streaming chunk model provide a consistent contract for building provider adapters while keeping this package free of provider SDK dependencies.

Breaking changes

  • No breaking changes were detected in the diff for this release (changes are primarily additive: new types/interfaces and exports).

Notes

  • Package version is bumped to 1.0.6 in package.json.