Documentation
¶
Overview ¶
Package proxyapp re-exports the handful of internal symbols a host needs to build its own context-guru proxy binary.
WHY THIS EXISTS. cmd/context-guru-proxy is this module's own composition root, and it imports four internal/ packages: buildinfo, cheapmodel, logging and modelinfo. Go forbids importing an internal/ package from another module, so a deployment that needs the standard proxy PLUS its own routes — an enterprise build with SSO, a bespoke activation surface, a private landing page — cannot reuse that root. It has to copy it, and then it owns a 1300-line fork of somebody else's file for ever.
That is what this package removes. It is a FACADE, deliberately: aliases and thin wrappers over the existing internal packages, adding no behaviour and moving no code. Nothing internal is relocated, so all ~70 files that import those packages today are untouched and no existing deployment changes at all.
WHY A FACADE RATHER THAN PROMOTING THE PACKAGES. Moving internal/modelinfo (38 importers) and internal/cheapmodel (22) out of internal/ would churn ~70 files across the tree and publish their entire surface as API this project then has to keep stable. The composition root uses THIRTEEN symbols. Exporting those thirteen is a promise worth making; exporting three whole packages by accident is not.
WHAT THIS IS NOT. It is not a plugin system and it does not run the proxy for you. A host still writes its own main(), and proxy.Options remains the contract. This only unblocks the parts a root cannot reach today.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExactWindow ¶
ExactWindow reports a model's window and whether the answer is exact rather than inferred. The distinction matters: a fraction-of-window trigger computed from a guessed window is a guess.
func SetupLogging ¶
func SetupLogging() string
SetupLogging configures the process logger from the environment (CG_LOG_LEVEL, CG_LOG_FILE) and returns a one-line description of what it did, for the startup log.
It never fails the process: a log file that cannot be opened degrades to stderr with a warning, because refusing to boot over an observability sink would make logging less safe than not having it.
func Version ¶
func Version() string
Build identity, as set by the Makefile's -ldflags. A host that wants its own stamp sets its own variables and ignores these; these are what this module's own build records.
Read as functions rather than re-exported as variables, because a var alias would let a host overwrite the value another part of the process already reported.
Types ¶
type AnthropicCheapModel ¶
type AnthropicCheapModel = cheapmodel.Anthropic
AnthropicCheapModel calls an Anthropic-dialect endpoint.
type OpenAICheapModel ¶
type OpenAICheapModel = cheapmodel.OpenAI
OpenAICheapModel calls an OpenAI-dialect endpoint.