kit

module
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 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 authgate holds framework-agnostic building blocks shared by every deepwork auth gate (the standalone terminal's net/http authWrap, the standalone teamworkbench gin gate, and deepwork-pro's gin middleware).
Package authgate holds framework-agnostic building blocks shared by every deepwork auth gate (the standalone terminal's net/http authWrap, the standalone teamworkbench gin gate, and deepwork-pro's gin middleware).
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 transcript is the cross-repo SSOT for the agent-session transcript domain: one domain model (Transcript/Turn/Block), one Source port with an ACL adapter per runtime (claude jsonl / codex jsonl / deepwork-native jsonl), one aggregator, and the touched-files domain service (ExtractTouched).
Package transcript is the cross-repo SSOT for the agent-session transcript domain: one domain model (Transcript/Turn/Block), one Source port with an ACL adapter per runtime (claude jsonl / codex jsonl / deepwork-native jsonl), one aggregator, and the touched-files domain service (ExtractTouched).
Named-tunnel mode: a persistent Cloudflare *named* tunnel bound to a user-supplied hostname (e.g.
Named-tunnel mode: a persistent Cloudflare *named* tunnel bound to a user-supplied hostname (e.g.
Package usage — claude_quota.go: real claude.ai subscription quota from the statusLine hook drop file.
Package usage — claude_quota.go: real claude.ai subscription quota from the statusLine hook drop file.
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