internal

package
v1.261022.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MPL-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScriptAssets embed.FS
View Source
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.
tui
Package tui provides interactive terminal prompts for the tingly-box CLI.
Package tui provides interactive terminal prompts for the tingly-box CLI.
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.
ops
sse
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.
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.
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.
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.
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/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 gives it model access through 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 gives it model access through 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.
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.

Jump to

Keyboard shortcuts

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