MCPcopy Create free account

hub / github.com/Harshitk-cp/engram / functions

Functions2,051 in github.com/Harshitk-cp/engram

↓ 2 callersMethodHasScope
HasScope reports whether the auth context includes the requested scope. Keys with admin scope implicitly satisfy any scope check.
internal/domain/tenant.go:73
↓ 2 callersFunctionLLMProvider
LLMProvider returns the configured LLM provider. Defaults to "openai" if not set. Valid values: openai, anthropic, gemini, cerebras, mock
internal/config/config.go:83
↓ 2 callersMethodListByTenantID
(ctx context.Context, tenantID uuid.UUID, limit, offset int)
internal/domain/stores.go:33
↓ 2 callersMethodListByUser
(ctx context.Context, userID uuid.UUID)
internal/domain/auth.go:70
↓ 2 callersFunctionLogit
(p float64)
internal/service/confidence.go:21
↓ 2 callersFunctionNewApp
(db *pgxpool.Pool, logger *zap.Logger)
internal/api/router.go:43
↓ 2 callersFunctionNewCompatibleClient
NewCompatibleClient builds a client for an OpenAI-compatible embeddings API. baseURL is the server root (e.g. http://localhost:11434/v1); "/embeddings
internal/embedding/compatible.go:34
↓ 2 callersFunctionNewEpisodeService
( es domain.EpisodeStore, as domain.AgentStore, ec domain.EmbeddingClient, lc domain.LLMClient, logger *z
internal/service/episode.go:41
↓ 2 callersFunctionNewFeedbackService
(fs domain.FeedbackStore, ms domain.MemoryStore, as domain.AgentStore)
internal/service/feedback.go:28
↓ 2 callersFunctionNewMetacognitiveService
NewMetacognitiveService creates a new metacognitive service.
internal/service/metacognitive.go:108
↓ 2 callersFunctionNewPolicyService
(ps domain.PolicyStore, ms domain.MemoryStore, as domain.AgentStore, lc domain.LLMClient, ec domain.EmbeddingC
internal/service/policy.go:29
↓ 2 callersFunctionNewProceduralService
NewProceduralService creates a new procedural service.
internal/service/procedural.go:43
↓ 2 callersFunctionNewSchemaService
NewSchemaService creates a new schema service.
internal/service/schema.go:49
↓ 2 callersMethodOAuthLogin
OAuthLogin links/creates a user from a social identity and starts a session. SECURITY INVARIANT: `email` MUST be provider-verified (the caller passes
internal/service/auth.go:130
↓ 2 callersFunctionOpenAIAPIKey
()
internal/config/config.go:64
↓ 2 callersMethodPlanForPlanID
PlanForPlanID reverse-maps a Razorpay plan id to a plan tier. Returns ("", false) when the plan id is unknown.
internal/billing/razorpay.go:196
↓ 2 callersFunctionRazorpayKeyID
---- Billing / managed cloud (Razorpay) ---- RazorpayKeyID is the public Razorpay API key id (also handed to the browser to open the Checkout modal).
internal/config/config.go:279
↓ 2 callersFunctionRazorpayKeySecret
RazorpayKeySecret is the Razorpay API key secret used for server-side API calls and payment-signature verification.
internal/config/config.go:283
↓ 2 callersFunctionRazorpayWebhookSecret
RazorpayWebhookSecret verifies the signature on incoming Razorpay webhook events.
internal/config/config.go:286
↓ 2 callersMethodRecordOutcome
RecordOutcome records the outcome of an episode.
internal/service/episode.go:360
↓ 2 callersMethodRecordUse
Effectiveness tracking
internal/domain/stores.go:309
↓ 2 callersMethodRedactContent
(ctx context.Context, id uuid.UUID, tombstone string)
internal/domain/stores.go:121
↓ 2 callersMethodReflect
Reflect performs a full metacognitive reflection for an agent.
internal/service/metacognitive.go:553
↓ 2 callersMethodReflectOnStrategy
ReflectOnStrategy evaluates how well the agent's strategies are working.
internal/service/metacognitive.go:404
↓ 2 callersMethodReleaseQuarantine
ReleaseQuarantine promotes a quarantined trace into active memory by recomputing its real binding from the ids it carries, and records the release in
internal/service/memory.go:548
↓ 2 callersMethodReleaseQuarantine
(ctx context.Context, id, tenantID uuid.UUID, newBinding MemoryBinding)
internal/domain/stores.go:132
↓ 2 callersMethodRestore
(ctx context.Context, id uuid.UUID, tenantID uuid.UUID)
internal/domain/stores.go:129
↓ 2 callersMethodRoundTrip
(req *http.Request)
internal/api/inprocess.go:27
↓ 2 callersMethodRunAll
RunAll runs the tuner for all agents that have feedback.
internal/service/tuner.go:99
↓ 2 callersMethodSelfServe
SelfServe reports whether a plan can be purchased via Razorpay Checkout. Free is the default (no purchase) and Enterprise is sales-assisted (set manua
internal/domain/billing.go:60
↓ 2 callersFunctionServerPort
()
internal/config/config.go:52
↓ 2 callersMethodSetDecayService
(cd *DecayService)
internal/service/consolidation.go:121
↓ 2 callersMethodSetSettingsStore
SetSettingsStore wires per-tenant settings so the Provenance Firewall can consult the tenant's quarantine policy. When nil, only an explicit per-write
internal/service/memory.go:202
↓ 2 callersFunctionSetupToken
SetupToken returns ENGRAM_SETUP_TOKEN. If empty, POST /v1/setup is disabled.
internal/config/config.go:151
↓ 2 callersFunctionSigmoid
(x float64)
internal/service/confidence.go:26
↓ 2 callersMethodStop
Stop halts the background consolidation worker, cancelling any in-flight pass so shutdown is not held for the remainder of a long tick.
internal/service/consolidation.go:158
↓ 2 callersMethodUpdateActiveTenant
(ctx context.Context, sessionID, tenantID uuid.UUID)
internal/domain/auth.go:76
↓ 2 callersMethodUpdateLastUsed
UpdateLastUsed is called asynchronously on every authenticated request.
internal/domain/stores.go:26
↓ 2 callersMethodUpdateOutcome
Outcome
internal/domain/stores.go:288
↓ 2 callersMethodUpdateSession
(ctx context.Context, s *WorkingMemorySession)
internal/domain/stores.go:352
↓ 2 callersMethodactiveTenantFor
activeTenantFor returns the user's first org (or provisions one if none).
internal/service/auth.go:288
↓ 2 callersMethodapplyDecayWrite
applyDecayWrite persists a memory's decay (archive or confidence update) and its audit row atomically when a unit of work is wired, falling back to no
internal/service/decay.go:182
↓ 2 callersMethodapplySubscription
applySubscription reconciles an org's plan from a subscription event. On cancellation/completion (canceled == true) the org drops to the free tier.
internal/api/handlers/billing.go:321
↓ 2 callersFunctionapproxEqual
(a, b, tolerance float32)
internal/service/learning_test.go:395
↓ 2 callersMethodassembleContext
assembleContext creates a formatted context string for LLM injection.
internal/service/working_memory.go:687
↓ 2 callersFunctionbuildMasterKey
--- Helpers ---
internal/api/handlers/setup.go:212
↓ 2 callersMethodbuildScorer
buildScorer creates a RecallScorer with per-agent policy weights if available.
internal/service/memory.go:833
↓ 2 callersMethodcalculateCompetition
calculateCompetition measures how much competing beliefs suppress this one
internal/service/decay.go:407
↓ 2 callersFunctioncalculateDecayStatus
(confidence float32)
internal/api/handlers/memory.go:405
↓ 2 callersFunctionclampConfidence
(p float64)
internal/service/confidence.go:37
↓ 2 callersFunctionclampCurrency
(v float32)
internal/service/memory_test.go:175
↓ 2 callersMethodclusterMemories
clusterMemories groups memories by embedding similarity.
internal/service/consolidation.go:748
↓ 2 callersMethodcompete
compete selects the top memories for limited working memory slots.
internal/service/working_memory.go:623
↓ 2 callersMethodcomputeProcedureScore
computeProcedureScore calculates the combined ranking score for a procedure.
internal/service/procedural.go:275
↓ 2 callersFunctioncontradictionZoneEmb
contradictionZoneEmb returns two normalised unit vectors with cosine similarity ~0.71. They share a strong component on dim-0 but diverge on dims 1 an
internal/service/contradiction/embedding_detector_test.go:26
↓ 2 callersFunctiondateTime
(iso?: string)
console/src/format.ts:28
↓ 2 callersFunctiondelta
(m: Mutation)
console/src/pages/Timeline.tsx:26
↓ 2 callersMethodeffFor
effFor resolves the effective decay parameters for a tenant, falling back to service defaults when no settings store is wired or on error.
internal/service/decay.go:136
↓ 2 callersFunctionenvDurationSecs
envDurationSecs reads an env var holding a number of seconds, falling back to defSecs. A value of 0 is honored (e.g. "no max lifetime").
internal/config/config.go:25
↓ 2 callersFunctionenvInt32
envInt32 reads a positive int32 env var, falling back to def.
internal/config/config.go:14
↓ 2 callersFunctionextractTimeOfDay
extractTimeOfDay returns the time of day category for a given time.
internal/service/episode.go:388
↓ 2 callersMethodfilterByTier
(memories []domain.MemoryWithScore, includeTiers []domain.MemoryTier)
internal/service/memory.go:745
↓ 2 callersMethodfindCompetitors
findCompetitors finds memories that compete for the same "slot"
internal/service/decay.go:371
↓ 2 callersFunctionfloatArg
(args map[string]interface{}, key string, defaultVal float64)
mcp/tools.go:418
↓ 2 callersFunctionformatMemories
─── Helpers ───────────────────────────────────────────────────────────────────
mcp/tools.go:391
↓ 2 callersFunctiongenerateRawKey
generateRawKey returns a key with the given prefix: e.g. "mk_<64 hex chars>".
internal/api/handlers/setup.go:228
↓ 2 callersMethodincrement
increment performs an atomic upsert into the current month's row. The column name is fixed by the caller (never user input), so interpolation is safe.
internal/store/billing.go:109
↓ 2 callersFunctioninitials
(name: string)
console/src/format.ts:8
↓ 2 callersFunctioninsertMutationLog
insertMutationLog writes one audit row against any DBTX (pool or tx), so deletion/archive paths can log atomically inside their own transaction.
internal/store/learning.go:34
↓ 2 callersFunctionisLoopbackHost
(hostport string)
mcp/transports/guard.go:53
↓ 2 callersFunctionlivenessHandler
metricsHandler serves runtime metrics. It defaults to the Prometheus text exposition format (so Prometheus/Grafana/k8s can scrape `/metrics` natively)
internal/api/router.go:560
↓ 2 callersFunctionmin
(a, b int)
internal/service/conversation.go:273
↓ 2 callersFunctionnewMockProcedureStore
()
internal/service/procedural_test.go:18
↓ 2 callersFunctionnewMockSchemaStore
()
internal/service/schema_test.go:19
↓ 2 callersFunctionnewResponseWriter
(w http.ResponseWriter)
internal/api/middleware/logging.go:17
↓ 2 callersMethodok
()
internal/api/middleware/quota.go:23
↓ 2 callersFunctiononUpgrade
(plan: string)
console/src/pages/Billing.tsx:136
↓ 2 callersFunctionpolicyKey
(agentID uuid.UUID, memType domain.MemoryType)
internal/service/policy_test.go:21
↓ 2 callersFunctionpost
HTTP
examples/01_learning_agent/main.go:136
↓ 2 callersFunctionprintHeader
UI
examples/02_memory_evolution_demo/main.go:287
↓ 2 callersFunctionprintHeader
UI
examples/03_benchmark_mistake_reduction/main.go:225
↓ 2 callersFunctionproviderConf
(provider string)
internal/api/handlers/oauth.go:23
↓ 2 callersFunctionrecallMemories
(query string, topK int)
examples/01_learning_agent/main.go:126
↓ 2 callersFunctionrecallMemories
(query string, topK int, minConf float64)
examples/02_memory_evolution_demo/main.go:216
↓ 2 callersFunctionrecordOutcome
(episodeID, outcome, description string)
examples/03_benchmark_mistake_reduction/main.go:193
↓ 2 callersMethodredirectURI
(provider string)
internal/api/handlers/oauth.go:49
↓ 2 callersFunctionreject
(id: string)
console/src/pages/Quarantine.tsx:29
↓ 2 callersFunctionresolve
(keepId: string, demoteId: string)
console/src/pages/Contradictions.tsx:15
↓ 2 callersMethodresolveAnchor
(ctx context.Context, tenantID uuid.UUID, anchorID, externalID string)
internal/api/handlers/memory.go:169
↓ 2 callersMethodrunExtraction
(ctx context.Context, req *domain.ConversationIngestRequest, userMemID uuid.UUID)
internal/service/conversation.go:104
↓ 2 callersMethodrunStatsTick
(baseCtx context.Context)
internal/service/learning.go:115
↓ 2 callersMethodscanAssociations
(rows pgx.Rows)
internal/store/working_memory.go:398
↓ 2 callersMethodscanProcedures
(rows pgx.Rows)
internal/store/procedure.go:302
↓ 2 callersFunctionscanSession
(row pgx.Row)
internal/store/session.go:25
↓ 2 callersMethodscanUser
(row pgx.Row)
internal/store/auth.go:40
↓ 2 callersFunctionscoreMarkers
scoreMarkers returns a score in [0, 1] based on how many markers are present.
internal/service/contradiction/embedding_detector.go:117
↓ 2 callersFunctionserveNetwork
serveNetwork starts an HTTP listener for the sse/http transports.
cmd/engram-mcp/main.go:94
↓ 2 callersFunctiontenantFromEvent
tenantFromEvent resolves the org owning a webhook's subscription via the notes[tenant_id] we set at checkout. Returns uuid.Nil when absent/malformed.
internal/api/handlers/billing.go:308
↓ 2 callersFunctiontoLocalInput
(d: Date)
console/src/pages/TimeMachine.tsx:10
↓ 2 callersFunctiontoPolicyResponse
(p domain.Policy)
internal/api/handlers/policy.go:47
← previousnext →301–400 of 2,051, ranked by callers