MCPcopy Create free account

hub / github.com/JuliusBrussee/caveman / functions

Functions7,561 in github.com/JuliusBrussee/caveman

↓ 11 callersFunctionEncrypt
Encrypt seals plaintext with AES-256-GCM and a fresh random nonce, returning nonce(12) || ciphertext+tag as raw bytes.
shared/platform/secretbox/secretbox.go:53
↓ 11 callersFunctionFactSheetText
(source string, maxChars int)
engine/pixel/factsheet.go:268
↓ 11 callersFunctionHashPayload
HashPayload returns the lowercase hex SHA-256 of a request body, as required for the X-Amz-Content-Sha256 header and the canonical request.
shared/platform/awssig/awssig.go:119
↓ 11 callersFunctionNewNamed
NewNamed builds a dedicated OpenAI-compatible upstream mounted at compat/<name>/. The provider enum intentionally stays openai_compatible so usage/cos
proxy/providers/openaicompat/openaicompat.go:183
↓ 11 callersFunctionNewTabular
NewTabular returns the deterministic CSV, TSV, and Markdown-table compressor.
engine/compressors/tabular.go:67
↓ 11 callersFunctionRenderTextToPNGsWithCharLimit
(text string, cols, maxCharsPerImage int, style RenderStyle, maxHeightPx int, slotText string)
engine/pixel/render.go:639
↓ 11 callersMethodRewrite
Rewrite condenses req.StepBytes, or explains why it did not. Gate 1 (invocation) skips the API call entirely when the step is at or under θ tokens. G
rewriter/rewriter.go:160
↓ 11 callersFunctionTransformGemini
TransformGemini rewrites a Gemini generateContent body (contents[].parts[], systemInstruction). err != nil OR info.ImageCount == 0 means the caller MU
engine/pixel/transform_gemini.go:101
↓ 11 callersMethodUsage
()
proxy/providers/adapter.go:693
↓ 11 callersMethodcall
(ctx context.Context, region, keyID, operation string, input, output any)
shared/platform/kms/kms.go:346
↓ 11 callersFunctioncandidate
(provider, model string, price cost.Price, caps map[string]any)
proxy/routing/routing_test.go:572
↓ 11 callersFunctioncommandUsage
(suffix: string)
packages/cli/src/index.ts:349
↓ 11 callersFunctionenabled
()
proxy/providers/anthropic/cache_breakpoints_test.go:12
↓ 11 callersFunctionestimateTokens
estimateTokens is the project's inferred token heuristic (bytes/4), matching the usage importer's roughJSONSize/4 convention. Conservative, determinis
proxy/internal/store/config_scan.go:60
↓ 11 callersFunctionfakeDoer
(t *testing.T, status int, payload string, calls *[]recordedCall)
rewriter/rewriter_test.go:23
↓ 11 callersMethodflush
flush blocks until every record queued before the call has been written. It exists so tests can assert against the files; the request path never calls
proxy/internal/gateway/capture.go:198
↓ 11 callersFunctionget
(path: string)
packages/cli/src/index.ts:14139
↓ 11 callersFunctionisRecord
(value: unknown)
packages/agent/src/runtime.ts:3654
↓ 11 callersFunctionmustJSONBytes
(t *testing.T, v any)
engine/pixel/transform_anthropic_test.go:457
↓ 11 callersFunctionnewPrefixStableServer
(comp Compressor, cache PrefixCache, rt *captureTransport)
proxy/internal/gateway/prefix_stability_test.go:156
↓ 11 callersFunctionnewTestApp
(t *testing.T, base string)
shared/platform/githubapp/githubapp_test.go:49
↓ 11 callersFunctionpredictPath
predictPath builds a native Vertex prediction path under the /vertex prefix.
proxy/providers/vertex/vertex_test.go:22
↓ 11 callersFunctionprefixStableTransport
(turns int)
proxy/internal/gateway/prefix_stability_test.go:170
↓ 11 callersFunctionreadCaptures
readCaptures reads every capture in dir, sorted by seq, and verifies each stored body against the hash the file itself recorded. A capture that cannot
proxy/internal/gateway/capture_test.go:25
↓ 11 callersFunctionresolveGoBin
(name: string, envVar: string)
packages/cli/src/index.ts:1848
↓ 11 callersFunctionretroUsageLine
(messageID string)
proxy/internal/store/learn_retro_test.go:342
↓ 10 callersMethodBuildLearnPlan
BuildLearnPlan is the front-door analyzer: scan config + real history, compute the detectors, the Cave Score, rank by tokens/day, and persist sinks. R
proxy/internal/store/learn.go:84
↓ 10 callersMethodLeverAllowed
LeverAllowed reports whether a lever may run for this session. An empty session id, a nil ledger, and an unknown session all allow it — the tripwire o
proxy/internal/gateway/ledger.go:107
↓ 10 callersFunctionList
List returns every catalog entry so callers can serve the real, complete model catalog — provider/model/capabilities — instead of a hardcoded subset.
shared/platform/catalog/catalog.go:195
↓ 10 callersMethodName
()
proxy/providers/adapter.go:305
↓ 10 callersMethodObserve
Observe records one completed call against a session and evaluates the harm tripwire. active is the set of levers that ran on THIS request; the return
proxy/internal/gateway/ledger.go:153
↓ 10 callersFunctionTransformOpenAI
(body []byte, opts TransformOptions)
engine/pixel/transform_openai.go:43
↓ 10 callersFunctionValidateURL
ValidateURL resolves raw to a URL, validates the scheme/port constraints, and checks every IP the hostname resolves to against the SSRF block lists. I
shared/platform/ssrf/ssrf.go:140
↓ 10 callersFunction_signed_payload
(bundle: str = BUNDLE)
packages/sdk/python/tests/test_runtime_policy.py:99
↓ 10 callersFunctionargFlag
(args []string, name, fallback string)
proxy/cmd/caveman-proxy/main.go:805
↓ 10 callersFunctionbigStep
bigStep is comfortably over the default θ so the invocation gate opens.
rewriter/rewriter_test.go:72
↓ 10 callersFunctionblockString
(block map[string]any, key string)
engine/pixel/transform_anthropic.go:1386
↓ 10 callersFunctioncaveFetch
* Shared bounded transport for every SDK request. * * The explicit abort race is intentional: callers still settle on deadline when * a custom fetc
packages/sdk/typescript/src/index.ts:1978
↓ 10 callersFunctiondetect_file_type
Classify a file as 'natural_language', 'code', 'config', or 'unknown'. Returns: One of: 'natural_language', 'code', 'config', 'unknown'
skills/caveman-compress/scripts/detect.py:72
↓ 10 callersFunctionfirstString
(values ...any)
proxy/internal/store/usage_import.go:531
↓ 10 callersFunctionisolatedCliEnv
(extra = {})
packages/cli/tests/_cli.mjs:10
↓ 10 callersFunctionmarkedTurnConversation
markedTurnConversation builds the Claude Code request shape for a conversation of n user turns: every user turn carries a cache_control breakpoint (Cl
proxy/internal/gateway/prefix_stability_test.go:128
↓ 10 callersFunctionnewEngine
(t *testing.T)
engine/engine_test.go:31
↓ 10 callersFunctionnewSubscriptionCompressServer
(comp Compressor, rt *captureTransport, cfg Config)
proxy/internal/gateway/subscription_live_zone_test.go:33
↓ 10 callersFunctionplanCacheBreakpoints
(data []byte, payg bool)
proxy/providers/anthropic/breakpoint_plan.go:67
↓ 10 callersFunctionprintJSON
(v any)
proxy/cmd/caveman-proxy/main.go:842
↓ 10 callersFunctionread
(t *testing.T, name string)
shared/platform/importers/importers_test.go:16
↓ 10 callersFunctionreasoningPolicy
(flag, gate bool)
proxy/providers/openai/reasoning_effort_test.go:9
↓ 10 callersMethodrecord
record prices the request from the catalog and writes one truthful row to the sink. Standalone savings are always labeled "inferred".
proxy/internal/gateway/proxy.go:1132
↓ 10 callersMethodsearch
Search the full catalog via the gateway's ``/sdk/v1/tool-search`` endpoint. Returns a :class:`ToolSearchResult` with the reduced tool list
packages/sdk/python/caveman_cloud/core.py:1350
↓ 10 callersFunctiontestSession
(t *testing.T)
browse/session_test.go:61
↓ 10 callersMethodtool
(self, name: str, options: dict[str, Any], fn: Callable[[], Any])
packages/sdk/python/caveman_cloud/core.py:1107
↓ 9 callersFunctionAtlasRank
AtlasRank binary-searches the sorted codepoint table; -1 when absent.
engine/pixel/atlas.go:110
↓ 9 callersFunctionCandidatePoolHash
(candidates []Candidate)
proxy/routing/routing.go:725
↓ 9 callersFunctionCandidateTraceKey
CandidateTraceKey preserves the v2 provider:model key for model-only actions and adds explicit effort for v3 actions. It is human-readable telemetry;
proxy/routing/routing.go:699
↓ 9 callersFunctionDefaultScenario
DefaultScenario returns 128-turn agent workload used by golden benchmark.
cacheengine/cachebench/types.go:57
↓ 9 callersFunctionError
Error wraps an error's message through String redaction and returns a new string safe for inclusion in logs or HTTP error responses. The original err
shared/platform/redact/redact.go:322
↓ 9 callersMethodInspect
(input Input)
shared/platform/cacheguard/cacheguard.go:85
↓ 9 callersFunctionIsProduction
IsProduction reports whether CAVE_ENV selects the managed production posture. Empty and unknown values remain local; only the canonical value (folded
shared/platform/runtimeenv/runtimeenv.go:15
↓ 9 callersFunctionManagedConfig
ManagedConfig returns a Config with ManagedMode enabled and no allowlist.
shared/platform/ssrf/ssrf.go:126
↓ 9 callersMethodName
Name identifies the counting basis (e.g. the encoding name) for display and cross-surface parity.
engine/tokens/tokens.go:24
↓ 9 callersFunctionNew
(baseURL string)
proxy/providers/openaicompat/openaicompat.go:17
↓ 9 callersFunctionNew
New validates configuration and returns immutable client.
shared/platform/kms/kms.go:75
↓ 9 callersFunctionNewServer
NewServer builds a server over the given ordered tool set. log must write to stderr (never stdout); if nil, logging is discarded. The server name is r
mcp/server.go:74
↓ 9 callersFunctionNewTOON
NewTOON returns the lossless TOON re-encoder. It is reached only by forcing Options.Type = "toon"; Detect never routes to it.
engine/compressors/toon.go:11
↓ 9 callersFunctionPriceForRegion
PriceForRegion returns only an exact provider+model+region catalog row. It is the runtime billing lookup for region-sensitive Bedrock and Vertex calls
shared/platform/catalog/catalog.go:79
↓ 9 callersFunctionReflow
(text string)
engine/pixel/render.go:122
↓ 9 callersMethodRememberReplacement
RememberReplacement durably records original→replacement and returns the AUTHORITATIVE bytes for that original — the caller must forward what comes ba
proxy/internal/gateway/server.go:172
↓ 9 callersMethodServe
Serve runs the JSON-RPC loop until in reaches EOF. Framing is line-delimited (the MCP stdio contract): one JSON message per line, each response one co
mcp/server.go:114
↓ 9 callersMethodString
()
cacheengine/cmd/cache-replay/main.go:37
↓ 9 callersMethodSummary
Summary returns aggregate spend across all recorded requests. The savings basis is "inferred" whenever any row carries a non-`verified` basis, which i
proxy/internal/store/store.go:675
↓ 9 callersMethod_file_with
(self, dirpath: Path, text: str)
tests/test_compress_safety.py:26
↓ 9 callersFunctionasMap
(v any)
proxy/internal/store/usage_import.go:524
↓ 9 callersFunctionatomicWriteFile
(path: string, bytes: Buffer, mode = 0o600)
packages/cli/src/index.ts:5837
↓ 9 callersFunctioncandidateText
(value: unknown)
packages/graders/src/index.ts:947
↓ 9 callersFunctionclaudeCodeConversation
claudeCodeConversation is a multi-turn Claude Code shaped request: a stable system field, static tools, cache_control breakpoints planted mid-conversa
proxy/internal/gateway/subscription_live_zone_test.go:61
↓ 9 callersFunctioncontainsString
(values []string, target string)
cacheengine/native_test.go:748
↓ 9 callersFunctiondecodeObject
(t *testing.T, body []byte)
cacheengine/native_test.go:31
↓ 9 callersFunctiondecodeToolText
(t *testing.T, tr mcp.ToolResult, out any)
browse/session_test.go:402
↓ 9 callersFunctionechoUpstream
(t *testing.T, got *string)
proxy/internal/gateway/compress_test.go:284
↓ 9 callersFunctionemitCommandRunOnce
(exitClass: TelemetryExitClass, errorClass?: TelemetryErrorClass)
packages/cli/src/index.ts:684
↓ 9 callersFunctionenabled
()
proxy/providers/openai/cache_key_test.go:13
↓ 9 callersFunctionensure
(condition: bool, message: str)
tests/verify_repo.py:28
↓ 9 callersFunctionexpandTilde
(p: string)
packages/cli/src/index.ts:10765
↓ 9 callersMethodexport
* POST buffered spans to standard OTLP/HTTP `{baseURL}/v1/traces`. * Returns ExportTraceServiceResponse JSON. No-op when nothing is buffered.
packages/sdk/typescript/src/index.ts:2224
↓ 9 callersFunctionfinite
(value float64)
proxy/routing/routing.go:554
↓ 9 callersFunctionfrontierDialCandidate
(model string, expectedCost, qualityLCB float64, latencyMS int)
proxy/routing/routing_test.go:421
↓ 9 callersFunctionfrontierDialFeatures
()
proxy/routing/routing_test.go:410
↓ 9 callersFunctiongatewayFindObjectField
(body []byte, obj gatewayJSONSpan, field string)
proxy/internal/gateway/retrieve_tool.go:142
↓ 9 callersMethodlookupTarget
(uid string)
browse/session.go:347
↓ 9 callersFunctionnewBodyCapture
newBodyCapture returns nil when capture is off, so the hot path costs one nil check. A directory that cannot be created disables capture rather than f
proxy/internal/gateway/capture.go:80
↓ 9 callersFunctionnewCompressTestServer
(t *testing.T, upstream string, sink TelemetrySink, comp Compressor)
proxy/internal/gateway/compress_test.go:103
↓ 9 callersFunctionobservedOpenAIRecords
(count int, quality bool)
cacheengine/cachebench/cachebench_test.go:442
↓ 9 callersFunctionopen
()
mem/cmd/cavemem/main.go:89
↓ 9 callersFunctionreadMcpServerMarker
(agent: string, serverName: string)
packages/cli/src/index.ts:2280
↓ 9 callersFunctionshould_compress
Return True if the file is natural language and should be compressed.
skills/caveman-compress/scripts/detect.py:118
↓ 9 callersFunctionsleep
(ms: number)
packages/cli/src/index.ts:8207
↓ 9 callersFunctionsummarizeElided
summarizeElided renders the facts that hold across every unit of one elided run, or "" when there are none, extraction found no structure, or the summ
engine/compressors/invariants.go:180
↓ 9 callersFunctiontlsClientConfig
tlsClientConfig builds the ClickHouse TLS configuration from the environment, or (nil, nil) when no CLICKHOUSE_TLS_* knob is set — in which case calle
shared/platform/chhttp/chhttp.go:119
↓ 9 callersFunctiontoolCatalogRequest
(live string)
proxy/internal/gateway/toolschema_strip_test.go:36
← previousnext →201–300 of 7,561, ranked by callers