Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JuliusBrussee/caveman
/ functions
Functions
12,853 in github.com/JuliusBrussee/caveman
⨍
Functions
12,853
◇
Types & classes
1,364
↳
Endpoints
5
↓ 4 callers
Function
transformOpencodeAgentFrontmatter
(content, { subagent = false } = {})
installer/lib/opencode-agent.js:62
↓ 4 callers
Function
truncate
truncate cuts text to at most n bytes on a rune boundary.
proxy/internal/cloudlink/link.go:1525
↓ 4 callers
Function
tsOrNow
(t time.Time)
proxy/internal/store/usage_import.go:506
↓ 4 callers
Function
ttlAsk
()
proxy/internal/cloudlink/cache_ttl_test.go:47
↓ 4 callers
Function
twoLayerReaderNote
twoLayerReaderNote teaches the max-level overlay convention: two interleaved text layers per image (dark-red then dark-blue), read red rows fully befo
engine/pixel/transform_anthropic.go:994
↓ 4 callers
Function
uidByName
(t *testing.T, snapshot string, name string)
browse/cdp_integration_test.go:226
↓ 4 callers
Function
unforwardedProviderHeaders
(api: string | undefined, provider: string, headers: unknown, published?: PublishedUpstreams)
packages/cli/src/provider-routing.ts:134
↓ 4 callers
Function
uniqueRequest
uniqueRequest is requestFor with its own session and segment content.
proxy/internal/middleware/hardening_test.go:27
↓ 4 callers
Function
usageLine
(id string, at time.Time, tokens int)
proxy/cmd/caveman-proxy/learn_wire_test.go:51
↓ 4 callers
Function
visit
(value, depth=0)
packages/middleware/python/caveman_middleware/_native.py:51
↓ 4 callers
Function
waitFor
(predicate, timeoutMs = 5000)
packages/cli/tests/wrap-restart.runtime.mjs:45
↓ 4 callers
Function
warm
warm gives a session a baseline the tripwire can measure against, with the lever recorded as active throughout.
proxy/internal/gateway/ledger_test.go:20
↓ 4 callers
Method
warm
warm sends one warm, signed in with routing on, one at a time. A warm engine ends a pause a slow, unreachable or failing Cloud caused.
proxy/internal/cloudlink/warm.go:99
↓ 4 callers
Method
warn
(message string, err error)
proxy/internal/middleware/runtime.go:705
↓ 4 callers
Method
wire
wire is the name a declared tool was given (history calls must use the same one, collision-renamed or not); an undeclared tool gets wireToolName.
proxy/internal/translate/responses.go:118
↓ 4 callers
Function
withCavemanOpenAI
(client:T,options:OpenAIOptions)
packages/middleware/typescript/src/openai.ts:67
↓ 4 callers
Method
with_usage
(self)
tests/test_eval_snapshot_contract.py:87
↓ 4 callers
Function
wrap
(rest: string[])
packages/cli/src/index.ts:5967
↓ 4 callers
Method
write
(w *bufio.Writer, resp rpcResponse)
mcp/server.go:233
↓ 4 callers
Function
writeJSON
(w http.ResponseWriter, body []byte)
proxy/internal/translate/translate.go:924
↓ 4 callers
Function
writeKeychainConfig
(t *testing.T, home, cloud string, extra map[string]any)
proxy/internal/cloudlink/link_test.go:1128
↓ 4 callers
Function
writeLearnSession
(t *testing.T, claudeRoot, repo, name string, lines ...string)
proxy/cmd/caveman-proxy/learn_wire_test.go:40
↓ 4 callers
Function
yamlQuote
(s: string)
packages/cli/src/index.ts:14463
↓ 4 callers
Function
yamlScalarAfterKey
(lines: string[], index: number)
packages/cli/src/index.ts:14601
↓ 4 callers
Function
zebraReaderNote
zebraReaderNote is the one-line reader instruction rendered into the page header when — and only when — the pages are inked with the zebra colour cycl
engine/pixel/transform_anthropic.go:983
↓ 3 callers
Method
#endSpan
(span: OTelSpanLike | null, operation: string, start: number, attributes: Attributes, error: string | null)
packages/sdk/typescript/src/middleware/runtime.ts:594
↓ 3 callers
Method
#startSpan
(operation: keyof typeof OTEL.spans)
packages/sdk/typescript/src/middleware/runtime.ts:589
↓ 3 callers
Method
AfterFunc
(time.Duration, func())
proxy/internal/gateway/cache_warm.go:76
↓ 3 callers
Function
Allowed
(model string)
engine/pixel/applicability.go:32
↓ 3 callers
Function
AllowedModelBases
()
engine/pixel/applicability.go:13
↓ 3 callers
Method
BedrockRegion
BedrockRegion resolves the source/signing region from trusted operator configuration. A provider-specific YAML value wins, followed by Caveman's expli
proxy/internal/config/config.go:507
↓ 3 callers
Method
BuildLearnSimulationFiltered
(cwd string, sources []string, sinceExpr string, sinkIDs []string, repoFilter string)
proxy/internal/store/learn_simulate.go:38
↓ 3 callers
Function
CachedPrefixComponents
CachedPrefixComponents splits a Messages request into what the provider's prompt cache keys on — system, tools, then every message, each with cache_co
proxy/providers/anthropic/content_compress.go:68
↓ 3 callers
Method
CapabilityManifest
CapabilityManifest returns canonical compact JSON. RegistrySHA256 hashes the ordered capabilities only, avoiding a self-referential digest.
engine/compressors/compressor.go:189
↓ 3 callers
Function
Certificates
Certificates parses every certificate in the PEM bundle at path. The bundle is parsed block by block instead of via CertPool.AppendCertsFromPEM, whic
shared/platform/cabundle/cabundle.go:51
↓ 3 callers
Function
ChatNative
ChatNative returns a chat body bound for a chat host's own API with the runtime's reasoning envelopes (and the reasoning text they came with) removed;
proxy/internal/translate/chat_in.go:587
↓ 3 callers
Method
CheckIntegrity
CheckIntegrity runs PRAGMA quick_check on a separate read-only connection, so the store's own connection keeps serving while the whole file is read. A
engine/ccr/store_integrity.go:106
↓ 3 callers
Method
CheckIntegrityOnce
CheckIntegrityOnce checks the store unless the same build already found it intact. A new release therefore checks an older store once, on its first st
engine/ccr/store_integrity.go:129
↓ 3 callers
Function
CompanionToolsWithOptions
CompanionToolsWithOptions builds the companion flat MCP toolset with explicit control over optional browser tools and `caveman_retrieve` (set IncludeR
mcp/codemode/companion.go:50
↓ 3 callers
Method
CompatCredential
CompatCredential returns the key of one named OpenAI-compatible upstream. The second result is false if no built-in entry and no configured entry has
proxy/internal/config/config.go:655
↓ 3 callers
Function
ComputeFrozenCount
ComputeFrozenCount returns the first mutable message index. It mirrors headroom's cache-control floor: the highest message index whose content block c
proxy/providers/anthropic/frozen.go:17
↓ 3 callers
Method
Config
Config is the listener's tls.Config: TLS 1.2 or later, and in TLS 1.2 only forward-secret AEAD suites (TLS 1.3 suites are all of that kind already).
proxy/internal/identity/tls.go:50
↓ 3 callers
Function
ContextWindowTokens
ContextWindowTokens returns the provider-declared context window from an exact provider+model catalog match. Regional rows must agree; missing, malfor
shared/platform/catalog/catalog.go:62
↓ 3 callers
Method
CreditOriginal
CreditOriginal counts identical content once inside an authenticated session scope, without storing it or merging document/source identities or grants
proxy/internal/store/middleware.go:389
↓ 3 callers
Function
DecodeBody
DecodeBody decodes a bounded side-copy of a provider body by its Content-Encoding (identity, gzip, deflate, zstd), both sides capped at limit; ok is f
proxy/providers/adapter.go:984
↓ 3 callers
Function
DefaultLearnJSONPath
(home string)
proxy/internal/store/report.go:27
↓ 3 callers
Function
DetectVolatile
DetectVolatile returns content-blind pattern kind and byte offset only. It never copies matching values into traces or errors.
shared/platform/cacheguard/cacheguard.go:173
↓ 3 callers
Function
DiscoverUserMCPConfigs
DiscoverUserMCPConfigs scans standard coding-agent MCP locations in precedence order (user-global first, project-local overrides user-global): 1. `<ho
mcp/codemode/stdio_upstream.go:504
↓ 3 callers
Method
ExpireBatch
ExpireBatch reclaims one batch of at most limit rows per kind, and reports how many rows it touched and whether any kind filled its batch.
proxy/internal/store/middleware.go:319
↓ 3 callers
Function
ExtractDedupComponents
ExtractDedupComponents computes the envelope-aware duplicate-read identity for a tool result block.
engine/harness_envelopes.go:242
↓ 3 callers
Function
ExtractFactSheetTokens
(text string)
engine/pixel/factsheet.go:58
↓ 3 callers
Function
Find
Find is the registry row for id.
proxy/internal/pool/pool.go:99
↓ 3 callers
Method
FindTaskDecision
(decisionID string)
engine/ccr/store_wasm.go:202
↓ 3 callers
Method
Flush
()
proxy/internal/translate/translate.go:436
↓ 3 callers
Method
IdleSnapshot
IdleSnapshot exposes lifecycle only; no session identifiers leave runtime.
proxy/internal/nativeruntime/runtime.go:579
↓ 3 callers
Method
ImportClaude
(root, sinceExpr string)
proxy/internal/store/usage_import.go:64
↓ 3 callers
Function
InspectStore
InspectStore reads path over a read-only connection and never creates it. check also runs PRAGMA quick_check, which reads the whole file.
engine/ccr/store_repair.go:78
↓ 3 callers
Function
IsBlocked
IsBlocked reports whether err (or anything it wraps, such as the *url.Error an http.Client returns) is a guard refusal rather than a network failure.
shared/platform/ssrf/ssrf.go:35
↓ 3 callers
Function
IsEnvelope
IsEnvelope reports whether blob uses versioned KMS envelope format.
shared/platform/kms/kms.go:154
↓ 3 callers
Function
IsReportProjectionOnlyOpportunity
IsReportProjectionOnlyOpportunity identifies observations admitted by the dedicated report API but excluded from Cave Plan, scoring, proposals, and ev
shared/platform/optimizers/optimizers.go:84
↓ 3 callers
Function
LoadKeyring
LoadKeyring parses base64 32-byte keys from inline (comma or newline separated) or, when inline is empty, from the file at path. Both empty means no e
proxy/internal/middleware/seal.go:41
↓ 3 callers
Function
MarkRawUsageIncomplete
MarkRawUsageIncomplete stamps RawUsage when a parser has just zeroed a typed counter because the stream ended without its terminal usage event. Witho
proxy/providers/adapter.go:1456
↓ 3 callers
Method
MultiPrincipal
MultiPrincipal reports that callers can be principals other than the operator.
proxy/internal/identity/identity.go:193
↓ 3 callers
Function
NewMiddleware
NewMiddleware builds the framework middleware runtime over state (SQLite or Postgres), resolving callers through ids. Its mode is middleware.mode, els
proxy/internal/standalone/middleware.go:31
↓ 3 callers
Function
NewSearchResult
NewSearchResult returns the line-oriented search-result compressor.
engine/compressors/searchresult.go:30
↓ 3 callers
Function
NewWithReceiptsAndUsage
(store *ccr.Store, receiptDir string, usage sessionusage.Reader)
proxy/internal/nativeruntime/runtime.go:179
↓ 3 callers
Method
Originals
Originals returns what the authority stores for each of digests.
proxy/internal/store/middleware.go:325
↓ 3 callers
Function
PrepareSQLitePathCanonical
PrepareSQLitePathCanonical secures path and returns the one canonical path callers must use for every subsequent open and sidecar check. Returning the
engine/ccr/store_sqlite.go:440
↓ 3 callers
Function
PricingMultiplier
PricingMultiplier returns a positive model/region pricing capability from an exact catalog row. A missing or malformed capability is unavailable; call
shared/platform/catalog/catalog.go:269
↓ 3 callers
Method
Prime
Prime warms the route path when the local runtime learns a session or a prompt is starting (native hooks) and nothing reached the gateway for warmQuie
proxy/internal/cloudlink/warm.go:54
↓ 3 callers
Function
ProjectGemini
ProjectGemini wraps the complete GenerateContentRequest so system instructions and function declarations are counted with the prompt.
proxy/providers/internal/counttokens/counttokens.go:122
↓ 3 callers
Function
ProviderUpstreams
buildAdapters makes the provider adapters. Anthropic, OpenAI, and Gemini always get their public default upstream, so a bare `caveman start` works. Be
proxy/internal/standalone/standalone.go:537
↓ 3 callers
Method
PurgeBatch
PurgeBatch deletes at most limit rows per kind of a revoked authority's content (choice payloads, originals with a body, credit-only originals, receip
proxy/internal/store/middleware.go:316
↓ 3 callers
Method
ReadMiddleware
ReadMiddleware runs fn on a consistent snapshot. Callers must recheck every decision under WithMiddleware before publishing it.
proxy/internal/store/middleware.go:246
↓ 3 callers
Method
RecentRequests
RecentRequests returns the N newest request rows. Empty stores return an empty array; no synthetic row is ever created to make a first-request check p
proxy/internal/store/store.go:1225
↓ 3 callers
Method
RecordAppliedFix
(plan LearnPlan, sinkID, fixKind, note string)
proxy/internal/store/learn_outcomes.go:56
↓ 3 callers
Function
Recover
Recover returns the exact original bytes for a handle minted by Shrink. It reads the same durable store Shrink wrote (CAVEMAN_CCR_DB / ~/.caveman/ccr.
shrink/shrink.go:147
↓ 3 callers
Method
Recover
Recover returns the byte-exact original for a recall hit's recovery handle.
mem/store.go:616
↓ 3 callers
Function
RefuseProductionDefaults
()
shared/platform/env/env.go:62
↓ 3 callers
Method
Register
Register adds a compressor, keyed by its content type. A later registration for the same type replaces the earlier one.
engine/compressors/compressor.go:74
↓ 3 callers
Method
Reload
Reload re-reads the files; unless force, only when one changed. Files that no longer load keep the previous configuration and return the error.
proxy/internal/identity/tls.go:58
↓ 3 callers
Function
RemoveConnectionHeaders
RemoveConnectionHeaders removes fields declared private to the inbound connection. Dropping Connection itself is insufficient: the next transport woul
proxy/providers/adapter.go:737
↓ 3 callers
Function
RemoveMatching
(home string, port int, token string)
proxy/internal/runstate/runstate.go:241
↓ 3 callers
Function
RenderDensePages
(text string, opts DensePagesOptions)
engine/pixel/render.go:826
↓ 3 callers
Method
Renew
(authority string, now, retention, maxRetention int64)
proxy/internal/store/middleware.go:306
↓ 3 callers
Function
ReportOnlyOpportunityContractFor
ReportOnlyOpportunityContractFor resolves the exact report projection contract. Unknown ids fail closed.
shared/platform/optimizers/optimizers.go:91
↓ 3 callers
Function
RequestAPIKey
RequestAPIKey resolves Google's equivalent API-key system parameters. The legacy x-api-key alias remains lower priority than the native header, but a
proxy/providers/gemini/gemini.go:23
↓ 3 callers
Function
ResolveDensityDraw
ResolveDensityDraw resolves a reader model + level to its drawable geometry, applying ResolveDensity's fail-closed model gating (an unrecognised model
engine/pixel/density.go:349
↓ 3 callers
Function
RestoreLineNumberedListing
RestoreLineNumberedListing puts the gutter back on a compressed listing. Compression removes lines, so output line N is not source line N. Renumberin
engine/compressors/code_listing.go:149
↓ 3 callers
Method
RetrieveMetadata
RetrieveMetadata returns optional compressor metadata stored beside a recovery handle. The raw Retrieve path remains byte-exact and never returns this
engine/engine.go:275
↓ 3 callers
Function
RetryOnBusy
RetryOnBusy runs fn, retrying while SQLite reports the database is locked (SQLITE_BUSY). Short-lived local processes can initialize the same database
engine/ccr/store_sqlite.go:242
↓ 3 callers
Function
RouteLabelMax
RouteLabelMax is the most bytes a label value may have; a longer one is left out, never cut (Cloud refuses a cut value). Codex's turn metadata is JSON
proxy/internal/gateway/route.go:281
↓ 3 callers
Method
Secret
Secret is a login's stored secret, read once per index change.
proxy/internal/pool/pool.go:179
↓ 3 callers
Method
SetLimit
SetLimit overrides the max bytes the scanner will buffer before reporting unknown usage. Used by adapters that read their own configured limit.
proxy/providers/adapter.go:889
↓ 3 callers
Method
SetLogger
SetLogger sets where the store reports maintenance: expired objects, consolidated maps and integrity damage. A nil logger silences it.
engine/ccr/store_integrity.go:29
↓ 3 callers
Function
ShouldStepDownTurnEffort
ShouldStepDownTurnEffort inspects the latest turn of an Anthropic Messages or OpenAI Chat/Responses request and returns true ONLY when: 1. The convers
proxy/providers/turneffort.go:123
↓ 3 callers
Function
SplitLineNumberedListing
SplitLineNumberedListing reports whether input is a line-numbered file listing. On success it returns the source text with gutters removed and the lin
engine/compressors/code_listing.go:37
↓ 3 callers
Function
StandaloneHTTPClient
StandaloneHTTPClient returns the upstream client used in standalone mode. The SSRF dial guard is ALWAYS on here (unlike the managed gateway, which onl
proxy/internal/standalone/standalone.go:595
↓ 3 callers
Function
StartHTTPUpstream
StartHTTPUpstream initializes a remote MCP Streamable HTTP server using the provided http.Client (defaults to an HTTP client with sane timeouts when n
mcp/codemode/http_upstream.go:51
↓ 3 callers
Function
StdDensityDraw
StdDensityDraw resolves a density level to its STANDARD-tier geometry, model- agnostic: the dev-tool render (`caveman-engine pixel render`) draws exac
engine/pixel/density.go:341
← previous
next →
1,701–1,800 of 12,853, ranked by callers