Directories
¶
| Path | Synopsis |
|---|---|
|
repogen
command
Command repogen generates the type-safe gorm/gen repositories from the models in internal/pkg/db/models.
|
Command repogen generates the type-safe gorm/gen repositories from the models in internal/pkg/db/models. |
|
internal
|
|
|
pkg/buildinfo
Package buildinfo exposes immutable identity compiled into a Chatz binary.
|
Package buildinfo exposes immutable identity compiled into a Chatz binary. |
|
pkg/config
Package config loads chatz's configuration from environment variables via gonfiguration.
|
Package config loads chatz's configuration from environment variables via gonfiguration. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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). |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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). |
|
pkg/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. |
|
pkg/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. |
|
pkg/http/api
Package api provides primitives to interact with the openapi HTTP API.
|
Package api provides primitives to interact with the openapi HTTP API. |
|
pkg/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. |
|
pkg/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). |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg/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. |
|
pkg
|
|
|
http/api/client
Package client provides primitives to interact with the openapi HTTP API.
|
Package client provides primitives to interact with the openapi HTTP API. |
|
rebound
Package rebound retries context-aware operations with bounded exponential backoff.
|
Package rebound retries context-aware operations with bounded exponential backoff. |
|
tests
|
|
|
testinfra
Package testinfra brings up the real external dependencies chatz uses (a real Postgres via testcontainers-go) for integration tests.
|
Package testinfra brings up the real external dependencies chatz uses (a real Postgres via testcontainers-go) for integration tests. |
Click to show internal directories.
Click to hide internal directories.