internal/

directory
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT

Directories

Path Synopsis
pkg
buildinfo
Package buildinfo exposes immutable identity compiled into a Chatz binary.
Package buildinfo exposes immutable identity compiled into a Chatz binary.
config
Package config loads chatz's configuration from environment variables via gonfiguration.
Package config loads chatz's configuration from environment variables via gonfiguration.
core/auth
Package auth is chatz's authentication domain: password hashing (bcrypt), server-side opaque session tokens (only the SHA-256 hash is stored; the raw token lives in the client's HttpOnly cookie), first-run admin bootstrap, and optional single-user passwordless auto-login.
Package auth is chatz's authentication domain: password hashing (bcrypt), server-side opaque session tokens (only the SHA-256 hash is stored; the raw token lives in the client's HttpOnly cookie), first-run admin bootstrap, and optional single-user passwordless auto-login.
core/chat
Package chat adapts elelem's provider-neutral agent loop to chatz SSE.
Package chat adapts elelem's provider-neutral agent loop to chatz SSE.
core/chats
Package chats is the chat business-logic layer: it owns the chat + message repositories and the model registry, and drives a turn end-to-end (demo interception, model resolution, the agentic turn loop, SSE streaming, and persistence).
Package chats is the chat business-logic layer: it owns the chat + message repositories and the model registry, and drives a turn end-to-end (demo interception, model resolution, the agentic turn loop, SSE streaming, and persistence).
core/chats/fixedresponses
Package fixedresponses maps exact demo prompts to fixed assistant turns embedded at build time.
Package fixedresponses maps exact demo prompts to fixed assistant turns embedded at build time.
core/chats/prompts
Package prompts holds generated, embedded LLM system-prompt fragments for the chat turn loop.
Package prompts holds generated, embedded LLM system-prompt fragments for the chat turn loop.
db
Package db opens the selected persistent store, runs its embedded migrations, and wires the generated gorm/gen repositories' default query.
Package db opens the selected persistent store, runs its embedded migrations, and wires the generated gorm/gen repositories' default query.
db/migrations
Package migrations embeds the SQL migration files into the binary so the binary is self-contained (no directory to mount).
Package migrations embeds the SQL migration files into the binary so the binary is self-contained (no directory to mount).
db/models
Package models holds the plain Go structs that gorm/gen generates type-safe repositories from.
Package models holds the plain Go structs that gorm/gen generates type-safe repositories from.
heartbeat
Package heartbeat is a tiny idle-heartbeat helper for long blocking calls (an LLM stream between deltas, a single MCP tool call) that otherwise produce zero log output while waiting.
Package heartbeat is a tiny idle-heartbeat helper for long blocking calls (an LLM stream between deltas, a single MCP tool call) that otherwise produce zero log output while waiting.
http/api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
http/server
Package server implements chatz's generated StrictServerInterface on echo: session-cookie auth, model discovery, MCP management, and streaming chat.
Package server implements chatz's generated StrictServerInterface on echo: session-cookie auth, model discovery, MCP management, and streaming chat.
logging
Package logging holds process-boot logging hardening that sits on top of slogconf's default handler: secret redaction (this file) and the gitignored chatz.log file sink (filesink.go).
Package logging holds process-boot logging hardening that sits on top of slogconf's default handler: secret redaction (this file) and the gitignored chatz.log file sink (filesink.go).
mcp
Package mcp connects chatz to MCP servers (stdio + http) and imports their configuration.
Package mcp connects chatz to MCP servers (stdio + http) and imports their configuration.
metrics
Package metrics owns chatz's Prometheus registry and the per-subsystem metric vectors.
Package metrics owns chatz's Prometheus registry and the per-subsystem metric vectors.
operations
Package operations provides small operator-facing snapshots assembled from Chatz's already-running collaborators.
Package operations provides small operator-facing snapshots assembled from Chatz's already-running collaborators.
secrets
Package secrets provides authenticated encryption (AES-256-GCM) for secret values stored at rest — MCP HTTP headers and stdio env vars.
Package secrets provides authenticated encryption (AES-256-GCM) for secret values stored at rest — MCP HTTP headers and stdio env vars.
services/http-server
Package httpserver is the servicepack service that runs chatz's HTTP API.
Package httpserver is the servicepack service that runs chatz's HTTP API.
tiktoken
Package tiktoken wraps the embedded tiktoken-go BPE codec so text can be split into model tokens with no runtime network fetch — the o200k_base vocabulary is compiled into the binary.
Package tiktoken wraps the embedded tiktoken-go BPE codec so text can be split into model tokens with no runtime network fetch — the o200k_base vocabulary is compiled into the binary.
upstreams
Package upstreams discovers models across the configured OpenAI-compatible endpoints and routes a chosen model id back to the client that serves it.
Package upstreams discovers models across the configured OpenAI-compatible endpoints and routes a chosen model id back to the client that serves it.
usage
Package usage decorates an elelem.Driver so every call emits LLM metrics and best-effort persists one llm_usage row.
Package usage decorates an elelem.Driver so every call emits LLM metrics and best-effort persists one llm_usage row.
webassets
Package webassets embeds the built SvelteKit static SPA so the single Go binary serves both the API and the UI.
Package webassets embeds the built SvelteKit static SPA so the single Go binary serves both the API and the UI.

Jump to

Keyboard shortcuts

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