Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ScriptAssets embed.FS
var WebDistAssets embed.FS
WebDistAssets is the web UI build (`pnpm build`, copied in by `task web:dist` / the wails build:frontend task). Served by the gateway on its port and by the desktop window's asset server (gui/wails3/app.go) alike: the page picks its host bridge at runtime, so there is one build for both.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package advisortest provides shared helpers for building advisor MCP source configurations in tests.
|
Package advisortest provides shared helpers for building advisor MCP source configurations in tests. |
|
claude_model_catalog.go is the per-vendor model capability catalog: what each model can do, declared once per model family, independent of which provider serves it.
|
claude_model_catalog.go is the per-vendor model capability catalog: what each model can do, declared once per model family, independent of which provider serves it. |
|
readiness
Package readiness answers "can the server I just launched actually be reached yet?" for every entry point that starts one (start, restart, open, the TUI).
|
Package readiness answers "can the server I just launched actually be reached yet?" for every entry point that starts one (start, restart, open, the TUI). |
|
tui
Package tui provides interactive terminal prompts for the tingly-box CLI.
|
Package tui provides interactive terminal prompts for the tingly-box CLI. |
|
Package decision identifies and converts supported decision wire formats and resolves known provider endpoints.
|
Package decision identifies and converts supported decision wire formats and resolves known provider endpoints. |
|
Package limits implements the state behind routing limits: live in-flight counters per upstream account/service, sliding usage windows, and the all-or-nothing permits that tie both to a request's lifetime.
|
Package limits implements the state behind routing limits: live in-flight counters per upstream account/service, sliding usage windows, and the all-or-nothing permits that tie both to a request's lifetime. |
|
mcp
|
|
|
Package middleware provides the Gin middleware used by the tingly-box server: HTTP access logging, CORS, authentication, response compression, per-route rate limiting, and IO-deadline management for streaming routes.
|
Package middleware provides the Gin middleware used by the tingly-box server: HTTP access logging, CORS, authentication, response compression, per-route rate limiting, and IO-deadline management for streaming routes. |
|
Package obs provides a unified observability layer for Go applications, integrating structured logging, metrics, and distributed tracing via OpenTelemetry.
|
Package obs provides a unified observability layer for Go applications, integrating structured logging, metrics, and distributed tracing via OpenTelemetry. |
|
Package otel wires OpenTelemetry metrics and traces for LLM requests.
|
Package otel wires OpenTelemetry metrics and traces for LLM requests. |
|
exporter
Package exporter provides the OTLP exporters used by pkg/otel.
|
Package exporter provides the OTLP exporters used by pkg/otel. |
|
tracker
Package tracker records LLM token usage and request duration as OpenTelemetry metrics following the GenAI semantic conventions (https://github.com/open-telemetry/semantic-conventions-genai):
|
Package tracker records LLM token usage and request duration as OpenTelemetry metrics following the GenAI semantic conventions (https://github.com/open-telemetry/semantic-conventions-genai): |
|
Package probe contains the decoupled, server-independent half of the probe subsystem: request types, result/data types, in-memory cache, the E2E and Lightweight strategies, and pure helpers.
|
Package probe contains the decoupled, server-independent half of the probe subsystem: request types, result/data types, in-memory cache, the E2E and Lightweight strategies, and pure helpers. |
|
Package protocol provides backward compatibility aliases to the public protocol package.
|
Package protocol provides backward compatibility aliases to the public protocol package. |
|
assembler/streamemit
Package streamemit provides a decoupled emission layer on top of the Anthropic stream assemblers in internal/protocol/assembler.
|
Package streamemit provides a decoupled emission layer on top of the Anthropic stream assemblers in internal/protocol/assembler. |
|
ids
Package ids mints the identifiers tingly-box puts on protocol objects it synthesizes on behalf of an upstream that speaks a different protocol: Responses API response and output item ids, Anthropic message ids, and a tool call id when the upstream omitted one.
|
Package ids mints the identifiers tingly-box puts on protocol objects it synthesizes on behalf of an upstream that speaks a different protocol: Responses API response and output item ids, Anthropic message ids, and a tool call id when the upstream omitted one. |
|
metaid
Package metaid parses and builds the identifier Anthropic clients put in metadata.user_id.
|
Package metaid parses and builds the identifier Anthropic clients put in metadata.user_id. |
|
stage
Package stage defines transport-independent protocol endpoints, ordered same-protocol stages, and the bidirectional bridges between protocols.
|
Package stage defines transport-independent protocol endpoints, ordered same-protocol stages, and the bidirectional bridges between protocols. |
|
stage/anthropicbridge
Package anthropicbridge adapts Anthropic Beta calls to OpenAI Chat and OpenAI Responses while keeping the outward response in Anthropic Beta.
|
Package anthropicbridge adapts Anthropic Beta calls to OpenAI Chat and OpenAI Responses while keeping the outward response in Anthropic Beta. |
|
stage/openaibridge
Package openaibridge adapts OpenAI calls to a target provider protocol while keeping the outward response in the exact OpenAI source protocol.
|
Package openaibridge adapts OpenAI calls to a target provider protocol while keeping the outward response in the exact OpenAI source protocol. |
|
stage/responsesbridge
Package responsesbridge adapts OpenAI Responses calls to provider protocols while keeping the outward response in the Responses source protocol.
|
Package responsesbridge adapts OpenAI Responses calls to provider protocols while keeping the outward response in the Responses source protocol. |
|
stage/sdkstream
Package sdkstream presents a Protocol Stage EventStream as the SDK stream types the existing client writers consume, so the client-facing output of a Stage pipeline goes through exactly the code that writes it today.
|
Package sdkstream presents a Protocol Stage EventStream as the SDK stream types the existing client writers consume, so the client-facing output of a Stage pipeline goes through exactly the code that writes it today. |
|
stage/toolround
Package toolround is the Tool Round Stage: the single decision point for every tool call a model makes, on the Anthropic Beta protocol.
|
Package toolround is the Tool Round Stage: the single decision point for every tool call a model makes, on the Anthropic Beta protocol. |
|
stage/upstream
Package upstream provides the terminal Protocol Stage endpoints: one per chain protocol, each forwarding a native request to the selected provider through the existing internal/forwarding functions.
|
Package upstream provides the terminal Protocol Stage endpoints: one per chain protocol, each forwarding a native request to the selected provider through the existing internal/forwarding functions. |
|
stream
Package stream — prime.go
|
Package stream — prime.go |
|
thinking
Package thinking holds the canonical thinking-effort ladder shared across the gateway.
|
Package thinking holds the canonical thinking-effort ladder shared across the gateway. |
|
toolnamespace
Package toolnamespace bridges Responses API `namespace` tools to protocols that only know flat function tools (OpenAI Chat, Anthropic).
|
Package toolnamespace bridges Responses API `namespace` tools to protocols that only know flat function tools (OpenAI Chat, Anthropic). |
|
usage
Package usage centralizes token extraction and normalization logic for all supported provider protocols.
|
Package usage centralizes token extraction and normalization logic for all supported provider protocols. |
|
Package aimodel hosts the AI Model API surface split out of internal/server: the LLM gateway routes (/tingly/:scenario/...) covering OpenAI/Anthropic compatible chat/completions/responses/messages/embeddings/images, MCP tool handling during model requests, protocol dispatch/transform/passthrough, failover/load-balance dispatch, guardrails runtime evaluation, and usage/token tracking.
|
Package aimodel hosts the AI Model API surface split out of internal/server: the LLM gateway routes (/tingly/:scenario/...) covering OpenAI/Anthropic compatible chat/completions/responses/messages/embeddings/images, MCP tool handling during model requests, protocol dispatch/transform/passthrough, failover/load-balance dispatch, guardrails runtime evaluation, and usage/token tracking. |
|
recordingtest
Package recordingtest provides shared test helpers for exercising internal/recording's AttachRecorderHooks/ProtocolRecorder wiring through the production *protocolserver.ProtocolHandler entry points.
|
Package recordingtest provides shared test helpers for exercising internal/recording's AttachRecorderHooks/ProtocolRecorder wiring through the production *protocolserver.ProtocolHandler entry points. |
|
Package protocoltest provides a framework for end-to-end validation of the model gateway's protocol transformation layer.
|
Package protocoltest provides a framework for end-to-end validation of the model gateway's protocol transformation layer. |
|
Package remotehost is the host↔remote glue layer.
|
Package remotehost is the host↔remote glue layer. |
|
routingtest
Package routingtest holds the routing fixtures that tests outside package routing share (routing_test's pipeline benchmarks, internal/servertest).
|
Package routingtest holds the routing fixtures that tests outside package routing share (routing_test's pipeline benchmarks, internal/servertest). |
|
module
Package module defines the contract every HTTP module under internal/server/module implements, so the host server mounts all of them the same way instead of through per-module RegisterRoutes signatures.
|
Package module defines the contract every HTTP module under internal/server/module implements, so the host server mounts all of them the same way instead of through per-module RegisterRoutes signatures. |
|
module/apierr
Package apierr provides the shared JSON error-response writers for module HTTP handlers, so packages that must avoid importing internal/server can depend on error-response formatting without reintroducing that cycle.
|
Package apierr provides the shared JSON error-response writers for module HTTP handlers, so packages that must avoid importing internal/server can depend on error-response formatting without reintroducing that cycle. |
|
module/bind
Package bind holds the request-binding helper shared by module handlers.
|
Package bind holds the request-binding helper shared by module handlers. |
|
module/debug
Package debug exposes runtime memory diagnostics for a running instance: a memstats snapshot and a pprof heap profile.
|
Package debug exposes runtime memory diagnostics for a running instance: a memstats snapshot and a pprof heap profile. |
|
module/imagegen
Package imagegen exposes control-plane HTTP endpoints for the image generation scenario — separate from the OpenAI-compatible gateway routes under /tingly/imagegen, which only ever see requests/responses, never the local filesystem.
|
Package imagegen exposes control-plane HTTP endpoints for the image generation scenario — separate from the OpenAI-compatible gateway routes under /tingly/imagegen, which only ever see requests/responses, never the local filesystem. |
|
module/imbot
wechat_qr.go implements the Weixin QR-login HTTP session flow.
|
wechat_qr.go implements the Weixin QR-login HTTP session flow. |
|
module/info
Package versioncheck provides version lookup against the npm registry (with npmmirror as a China-mirror fallback) and semver-style comparison.
|
Package versioncheck provides version lookup against the npm registry (with npmmirror as a China-mirror fallback) and semver-style comparison. |
|
module/limits
Package limits exposes the live state of account concurrency / usage limits (see .design/routing-limits.md) so the UI can show who is busy right now.
|
Package limits exposes the live state of account concurrency / usage limits (see .design/routing-limits.md) so the UI can show who is busy right now. |
|
module/notify
Package notify — bot interaction API.
|
Package notify — bot interaction API. |
|
module/paginate
Package paginate parses the limit/offset query parameters shared by list endpoints.
|
Package paginate parses the limit/offset query parameters shared by list endpoints. |
|
module/projects
Package projects mounts Projects (the projects/ module, see .design/projects.md) in Tingly Box: a Host that points its Claude Code sessions at the gateway, and the routes behind the "projects" feature flag.
|
Package projects mounts Projects (the projects/ module, see .design/projects.md) in Tingly Box: a Host that points its Claude Code sessions at the gateway, and the routes behind the "projects" feature flag. |
|
module/provider
Package provider handles CRUD and model-management HTTP endpoints for AI provider configurations.
|
Package provider handles CRUD and model-management HTTP endpoints for AI provider configurations. |
|
module/sharing
Package apitoken implements CRUD HTTP endpoints for shared API tokens.
|
Package apitoken implements CRUD HTTP endpoints for shared API tokens. |
|
module/shortcut
Package shortcut exposes the /api/v1/shortcut HTTP endpoints that let the frontend create (or check for) the desktop / start-menu shortcut the CLI's `tingly-box shortcut` command already writes.
|
Package shortcut exposes the /api/v1/shortcut HTTP endpoints that let the frontend create (or check for) the desktop / start-menu shortcut the CLI's `tingly-box shortcut` command already writes. |
|
module/uiprefs
Package uiprefs serves the UI-only preference store (config.UIPrefs): small per-instance settings the frontend keeps server-side so a browser tab and the desktop window see the same state.
|
Package uiprefs serves the UI-only preference store (config.UIPrefs): small per-instance settings the frontend keeps server-side so a browser tab and the desktop window see the same state. |
|
module/virtualmodel
Package virtualmodel exposes management endpoints for the in-process virtual-model providers.
|
Package virtualmodel exposes management endpoints for the in-process virtual-model providers. |
|
Package shortcut creates desktop / start-menu shortcuts that launch Tingly Box with a double-click.
|
Package shortcut creates desktop / start-menu shortcuts that launch Tingly Box with a double-click. |
|
Package usecase holds application logic shared across every caller surface (CLI, TUI, Web handler, future GUI) for a given domain — Rule, Provider, Agent, Profile.
|
Package usecase holds application logic shared across every caller surface (CLI, TUI, Web handler, future GUI) for a given domain — Rule, Provider, Agent, Profile. |
|
vision
|
|
|
imagegen
Package imagegen provides vendor adapters for the text-to-image surfaces that do NOT speak the OpenAI /images/generations contract.
|
Package imagegen provides vendor adapters for the text-to-image surfaces that do NOT speak the OpenAI /images/generations contract. |
|
visionproxy
Package vision holds the vision-channel vocabulary and the canonical probe image fixture shared by the probe subsystem, the protocol test harness (internal/protocoltest content_shapes), and future vision health checks.
|
Package vision holds the vision-channel vocabulary and the canonical probe image fixture shared by the probe subsystem, the protocol test harness (internal/protocoltest content_shapes), and future vision health checks. |
|
Package webtools is the single home for the builtin web-tool backends (DeepSeek, Serper, Keenable, Jina): backend selection, readiness, tool schemas and text rendering.
|
Package webtools is the single home for the builtin web-tool backends (DeepSeek, Serper, Keenable, Jina): backend selection, readiness, tool schemas and text rendering. |
|
deepseek
Package deepseek implements DeepSeek's read-only web APIs.
|
Package deepseek implements DeepSeek's read-only web APIs. |
|
jina
Package jina implements the Jina Reader web-fetch backend.
|
Package jina implements the Jina Reader web-fetch backend. |
|
keenable
Package keenable implements the Keenable web-search backend (https://docs.keenable.ai/api-reference/search).
|
Package keenable implements the Keenable web-search backend (https://docs.keenable.ai/api-reference/search). |
|
serper
Package serper implements the Serper web-search backend.
|
Package serper implements the Serper web-search backend. |
|
worker
|
|
|
quotawindow
Package quotawindow sends one tiny model request per hour to every enabled OAuth provider.
|
Package quotawindow sends one tiny model request per hour to every enabled OAuth provider. |