exposure

package
v1.40.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 2 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

Overview

Package exposure holds qmax-code's traffic taxonomy — the category constants and the Classify function that maps a (host, path) pair to an exposure category for the Exposure Receipt.

It is deliberately agent-specific. The shared receipt schema (github.com/Quality-Max/qmax-receipt) treats Entry.Category as a free-form string and never enumerates categories; each agent supplies its own. The qmax CLI has its own taxonomy (test-plan / behavioral-snapshot / …); this is qmax-code's, which is dominated by LLM inference and QualityMax cloud API traffic rather than crawl/test artifacts.

Path templatization is shared, so Classify delegates to receipt.Templatize.

Index

Constants

View Source
const (
	CatLLMPrompt     = "llm-prompt"     // outbound inference request carrying a prompt
	CatLLMCompletion = "llm-completion" // reserved: response-side LLM accounting
	CatCloudAPI      = "cloud-api"      // QualityMax cloud REST API (projects, scripts, integrations)
	CatMCPTraffic    = "mcp-traffic"    // outbound MCP-over-HTTP egress
	CatTelemetry     = "telemetry"      // opt-in error-reporting envelope
	CatVNCControl    = "vnc-control"    // noVNC WebSocket handshake/control channel
	CatControl       = "control"        // metadata only: auth check, login poll, health/reachability probes
	CatUncategorized = "uncategorized"  // unknown host/path — flagged so it can't hide
)

Category constants — qmax-code's taxonomy (QUA-1316).

The receipt records one Entry per *outbound* request, so LLM traffic is classified from the prompt side: a request to an inference endpoint carries the prompt (CatLLMPrompt), and the model's answer comes back as that entry's response bytes. CatLLMCompletion is reserved for any future response-side accounting (and keeps the taxonomy symmetric with how humans describe LLM traffic); Classify does not emit it today. Outbound MCP-over-HTTP clients explicitly apply CatMCPTraffic because the URL alone does not identify the protocol reliably.

Variables

This section is empty.

Functions

func Classify

func Classify(host, path string) string

Classify maps a (host, path) pair to an exposure category. It takes plain strings so this package never imports net/http. path should be the raw URL path; classification is done against the templatized form.

LLM inference endpoints are matched by path shape (not host) so both the hosted providers (Anthropic /v1/messages, Cerebras /chat/completions) and a local or remote Ollama endpoint (/v1/chat/completions) land in CatLLMPrompt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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