kit

module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT

README

kit

Shared Go infrastructure library for Brightman AI projects.

Packages

Package Description
obs Module-scoped structured logger with ring buffer
log JSON structured logging with caller info
metrics Lightweight counter/histogram/gauge registry
contextx Goroutine-level trace context (TraceID, SessionID)
broadcast Generic typed event broadcaster
ensure Development-time assertions
llm/ssekit SSE stream reader and writer
llm/toolcall Incremental tool call reassembly
llm/event Unified streaming event model
llm/stream Multi-provider LLM stream decoders (Claude, OpenAI-compatible)

Installation

go get github.com/brightman-ai/kit

Usage

import (
    "github.com/brightman-ai/kit/log"
    "github.com/brightman-ai/kit/obs"
    "github.com/brightman-ai/kit/metrics"
)

See guide/ for detailed documentation.

License

MIT

Directories

Path Synopsis
Package broadcast provides a generic fan-out event distributor.
Package broadcast provides a generic fan-out event distributor.
Package contextx provides goroutine-local context for tracing and logging.
Package contextx provides goroutine-local context for tracing and logging.
Package ensure provides assertion utilities for development.
Package ensure provides assertion utilities for development.
llm
Package llm defines a minimal, OpenAI-compatible chat port: the message, option, provider and streaming shapes an application needs to talk to a chat LLM, with no concrete client or transport bundled in.
Package llm defines a minimal, OpenAI-compatible chat port: the message, option, provider and streaming shapes an application needs to talk to a chat LLM, with no concrete client or transport bundled in.
event
Package event defines the unified event model for LLM streaming in deepwork.
Package event defines the unified event model for LLM streaming in deepwork.
ssekit
Package ssekit provides production-grade Server-Sent Events (SSE) writer and reader.
Package ssekit provides production-grade Server-Sent Events (SSE) writer and reader.
stream
Package llmstream contains provider stream decoders and transport lifecycle helpers for the unified LLM event model.
Package llmstream contains provider stream decoders and transport lifecycle helpers for the unified LLM event model.
toolcall
Package toolcall provides LLM tool call argument reassembly from streaming chunks.
Package toolcall provides LLM tool call argument reassembly from streaming chunks.
Package log provides error code definitions for structured logging.
Package log provides error code definitions for structured logging.
Package metrics provides application metrics collection.
Package metrics provides application metrics collection.
Package obs provides observability primitives for the deepwork application.
Package obs provides observability primitives for the deepwork application.
SSOT & update mechanism ────────────────────────
SSOT & update mechanism ────────────────────────
Package tunnel manages a Cloudflare quick-tunnel (cloudflared) process: it lazily downloads the cloudflared binary, starts/stops a quick tunnel exposing an arbitrary local addr, and reports download progress + the public URL.
Package tunnel manages a Cloudflare quick-tunnel (cloudflared) process: it lazily downloads the cloudflared binary, starts/stops a quick tunnel exposing an arbitrary local addr, and reports download progress + the public URL.
Package webserve centralizes the production HTTP-serving conventions shared by the deepwork web services — the standalone terminal (net/http) and the pro host (Gin): the standard security-header set and content-hash-aware cache headers for Vite SPA builds.
Package webserve centralizes the production HTTP-serving conventions shared by the deepwork web services — the standalone terminal (net/http) and the pro host (Gin): the standard security-header set and content-hash-aware cache headers for Vite SPA builds.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL