internal/

directory
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT

Directories

Path Synopsis
app
Package app 装配 agent 端服务到 app.AgentApplication 接口。
Package app 装配 agent 端服务到 app.AgentApplication 接口。
cache/entitycache
Package entitycache 提供通用实体缓存抽象。
Package entitycache 提供通用实体缓存抽象。
cache/loaders
Package loaders 提供 entitycache.Loader 的具体实现(每实体一个文件)。
Package loaders 提供 entitycache.Loader 的具体实现(每实体一个文件)。
relay/affinity
Package affinity 实现 agent 本地的渠道缓存粘性:把 (用户, API token, 真实模型) 上次发生 缓存活动的上游 channel 记下来,供 plan 阶段优先选用。
Package affinity 实现 agent 本地的渠道缓存粘性:把 (用户, API token, 真实模型) 上次发生 缓存活动的上游 channel 记下来,供 plan 阶段优先选用。
relay/backend
Package backend defines the Backend contract and the Dispatcher that routes each Attempt to one of native / passthrough / legacy implementations based on Attempt.Mode.
Package backend defines the Backend contract and the Dispatcher that routes each Attempt to one of native / passthrough / legacy implementations based on Attempt.Mode.
relay/backend/common
Package common 提供 backend(native / passthrough)共用的工具。
Package common 提供 backend(native / passthrough)共用的工具。
relay/dataflow
Package dataflow 把 channel 内部、llmkit 编码前的公共 IR 请求处理 表达成一串独立的 Step,由 ChannelDataFlow 统一运行与描述。
Package dataflow 把 channel 内部、llmkit 编码前的公共 IR 请求处理 表达成一串独立的 Step,由 ChannelDataFlow 统一运行与描述。
relay/inflight
Package inflight 跟踪 agent 当前在途的 relay 请求,供看门狗告警与 master 远程诊断。
Package inflight 跟踪 agent 当前在途的 relay 请求,供看门狗告警与 master 远程诊断。
relay/modelview
Package modelview 计算"当前 caller 在 /v1/models 中应见的模型列表"。
Package modelview 计算"当前 caller 在 /v1/models 中应见的模型列表"。
relay/pipeline/ctxbuild
Package ctxbuild 是 relay pipeline 的 Phase 1:把 *gin.Context 装配成 state.RelayContext.Input 的请求级 immutable 输入。
Package ctxbuild 是 relay pipeline 的 Phase 1:把 *gin.Context 装配成 state.RelayContext.Input 的请求级 immutable 输入。
relay/pipeline/publish
Package publish 是 relay pipeline 的第 4 阶段(最末端):把累加好的 RelayContext 状态 一次性收成 protocol.UsageLogEntry 并经 EventBus 发布 usage.completed。
Package publish 是 relay pipeline 的第 4 阶段(最末端):把累加好的 RelayContext 状态 一次性收成 protocol.UsageLogEntry 并经 EventBus 发布 usage.completed。
relay/resilience
Package resilience 给单次 channel dispatch 套重试/熔断/超时。
Package resilience 给单次 channel dispatch 套重试/熔断/超时。
relay/script
Package script 实现管理员动态 goja 脚本的编译与执行。
Package script 实现管理员动态 goja 脚本的编译与执行。
relay/state
Package state 是 relay 子包之间共享的叶子包,承载跨包共享的数据结构、 pipeline phase 枚举、relay mode 枚举、Dispatcher 接口以及哨兵 error。
Package state 是 relay 子包之间共享的叶子包,承载跨包共享的数据结构、 pipeline phase 枚举、relay mode 枚举、Dispatcher 接口以及哨兵 error。
relay/transform
Package transform provides IR-level request transformers (system prompt injection, role mapping, thinking pass-through/strip) that the relay pipeline applies between inbound decode and outbound encode.
Package transform provides IR-level request transformers (system prompt injection, role mapping, thinking pass-through/strip) that the relay pipeline applies between inbound decode and outbound encode.
reporter
internal/agent/reporter/reporter.go
internal/agent/reporter/reporter.go
rpc
tracecapture
Package tracecapture provides bounded, side-effect-free trace capture leaves shared by Generic API and LLM request recorders.
Package tracecapture provides bounded, side-effect-free trace capture leaves shared by Generic API and LLM request recorders.
sse
api
internal/models/user_group.go
internal/models/user_group.go
pkg
apiattempt
Package apiattempt defines Generic API execution contracts independently from the existing LLM attempt contracts.
Package apiattempt defines Generic API execution contracts independently from the existing LLM attempt contracts.
app
byokcrypto
Package byokcrypto 提供 BYOK key 的 AES-256-GCM 加解密。
Package byokcrypto 提供 BYOK key 的 AES-256-GCM 加解密。
durhist
Package durhist 定义请求耗时直方图的档位与分位数插值。
Package durhist 定义请求耗时直方图的档位与分位数插值。
histutil
Package histutil 提供按 edges 参数化的直方图槽定位与分位数插值。
Package histutil 提供按 edges 参数化的直方图槽定位与分位数插值。
metrics
Package metrics 暴露 BYOK 相关 prometheus 指标。
Package metrics 暴露 BYOK 相关 prometheus 指标。
netaddr
internal/pkg/netaddr/master_target.go
internal/pkg/netaddr/master_target.go
pricing
Package pricing contains shared validation for persisted pricing facts.
Package pricing contains shared validation for persisted pricing facts.
protocol
internal/pkg/protocol/sync_routing.go
internal/pkg/protocol/sync_routing.go
safeint
Package safeint provides checked arithmetic for persisted non-negative counters and costs.
Package safeint provides checked arithmetic for persisted non-negative counters and costs.
tpshist
Package tpshist 定义生成速度(TPS, tokens/s)直方图档位;插值复用 histutil。
Package tpshist 定义生成速度(TPS, tokens/s)直方图档位;插值复用 histutil。
ttfthist
Package ttfthist 定义首 token 时延(TTFT)直方图档位;插值复用 histutil。
Package ttfthist 定义首 token 时延(TTFT)直方图档位;插值复用 histutil。
ws
Package settings 见 spec.go 顶部注释。
Package settings 见 spec.go 顶部注释。

Jump to

Keyboard shortcuts

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