MCPcopy Create free account

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

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

↓ 7 callersMethodScore
(mem domain.MemoryWithScore, now time.Time)
internal/service/recall.go:49
↓ 7 callersMethodStop
Stop halts the background decay worker, cancelling any in-flight pass so shutdown is not held for the remainder of a long tick.
internal/service/decay.go:255
↓ 7 callersFunctionTierReason
(confidence float64)
internal/domain/tier.go:96
↓ 7 callersFunctionguardPanic
guardPanic runs fn and converts a panic into an error log. Background workers iterate every tenant's data; without this, one corrupt row or malformed
internal/service/worker.go:12
↓ 7 callersFunctionintF
(desc string)
mcp/tools.go:437
↓ 7 callersFunctionnewResponse
(id json.RawMessage, result interface{})
mcp/jsonrpc.go:39
↓ 7 callersFunctionsameUUIDPtr
sameUUIDPtr treats two NULLs as equal but a NULL never equal to a value, so two distinct anonymous sessions (both anchor NULL, different session IDs)
internal/service/memory.go:121
↓ 7 callersMethodscanEpisodes
scanEpisodes is a helper to scan multiple episode rows
internal/store/episode.go:552
↓ 7 callersFunctionsetupFeedbackTest
()
internal/service/feedback_test.go:11
↓ 6 callersMethodBatchDecay
BatchDecay applies decay to all memories for an agent
internal/service/decay.go:433
↓ 6 callersFunctionComputeCalibration
ComputeCalibration is the pure, testable core: bin samples by predicted confidence and compute calibration metrics.
internal/service/calibration.go:36
↓ 6 callersMethodCreateEdge
(ctx context.Context, edge *GraphEdge)
internal/domain/graph.go:166
↓ 6 callersFunctionDefaultDecayRate
(b MemoryBinding)
internal/domain/memory.go:112
↓ 6 callersFunctionDefaultEngineSettings
DefaultEngineSettings mirrors the engine's built-in constants. Keep in sync with service/decay.go and service/confidence.go defaults.
internal/domain/settings.go:61
↓ 6 callersMethodEnforceOnCreate
(ctx context.Context, m *domain.Memory)
internal/service/memory.go:74
↓ 6 callersMethodExtract
(ctx context.Context, conversation []Message)
internal/domain/stores.go:225
↓ 6 callersMethodFindByTriggerSimilarity
Similarity search
internal/domain/stores.go:306
↓ 6 callersMethodHandler
Handler returns an http.Handler that mounts the HTTP transport.
mcp/transports/http.go:26
↓ 6 callersMethodLinkDerivedMemory
(ctx context.Context, episodeID uuid.UUID, memoryID uuid.UUID, memoryType string)
internal/domain/stores.go:276
↓ 6 callersFunctionNewConsolidationService
NewConsolidationService creates a new consolidation service.
internal/service/consolidation.go:90
↓ 6 callersFunctionNewEmbeddingDetector
()
internal/service/contradiction/embedding_detector.go:59
↓ 6 callersFunctionNewHTTPServer
NewHTTPServer creates an HTTPServer wrapping the given MCP server.
mcp/transports/http.go:21
↓ 6 callersFunctionValidEntityType
(e string)
internal/domain/graph.go:84
↓ 6 callersFunctionWithTx
WithTx runs fn inside a single transaction, committing on success and rolling back on any error or panic (the deferred Rollback is a no-op after Commi
internal/store/dbtx.go:22
↓ 6 callersFunctionassertError
(t *testing.T, result *mcp.CallToolResult)
mcp/mcp_test.go:148
↓ 6 callersFunctionclampF
(v, lo, hi, fallback float64)
internal/domain/settings.go:72
↓ 6 callersFunctionfmt
(n: number)
console/src/pages/Billing.tsx:53
↓ 6 callersFunctionhashToken
(raw string)
internal/service/auth.go:60
↓ 6 callersFunctionnewErrorResponse
(id json.RawMessage, code int, msg string)
mcp/jsonrpc.go:43
↓ 6 callersFunctionokHandler
()
internal/api/middleware/quota_test.go:63
↓ 6 callersFunctionprintPhase
(num, title string)
examples/02_memory_evolution_demo/main.go:294
↓ 6 callersMethodscoreTimeMatch
scoreTimeMatch scores time preference matching.
internal/service/schema.go:459
↓ 6 callersFunctionsnapshotMemoriesForRemoval
snapshotMemoriesForRemoval writes one mutation_log row per memory matching whereSQL inside tx, BEFORE the caller removes/archives those rows, so the a
internal/store/memory.go:122
↓ 6 callersFunctionwithTenant
withTenant injects an auth context carrying the given tenant, matching what SessionOrAPIKey sets up in production.
internal/api/middleware/quota_test.go:58
↓ 6 callersFunctionwrite
(w http.ResponseWriter, status int, body interface{})
mcp/mcp_test.go:89
↓ 5 callersMethodActorType
ActorType reports how the caller authenticated, for tamper-evident audit attribution: "user" for a logged-in console session, "api_key" for a programm
internal/domain/tenant.go:64
↓ 5 callersMethodArchive
(ctx context.Context, id uuid.UUID)
internal/domain/stores.go:128
↓ 5 callersFunctionClassifyHeuristic
ClassifyHeuristic classifies memory content type via keyword patterns. No external API calls. Handles ~85% of cases correctly. Falls back to Fact. Th
internal/service/contradiction/classify.go:14
↓ 5 callersMethodConsolidate
Consolidate runs the full consolidation pipeline for an agent.
internal/service/consolidation.go:232
↓ 5 callersMethodCreate
(ctx context.Context, m *domain.Memory)
internal/service/memory.go:275
↓ 5 callersFunctionEnforceMemoryQuota
EnforceMemoryQuota blocks memory writes once the org hits its monthly cap and, on a successful write, increments the counter. When enabled is false (n
internal/api/middleware/quota.go:47
↓ 5 callersMethodGetAnchor
(ctx context.Context, id, tenantID uuid.UUID)
internal/store/entity.go:72
↓ 5 callersMethodGetByAgentID
(ctx context.Context, agentID uuid.UUID)
internal/domain/stores.go:240
↓ 5 callersMethodListDistinctAgentIDs
Decay methods
internal/domain/stores.go:126
↓ 5 callersFunctionNewHybridRecallService
( memoryStore domain.MemoryStore, graphStore domain.GraphStore, entityStore domain.EntityStore, embeddingC
internal/service/hybrid_recall.go:21
↓ 5 callersMethodRecall
(ctx context.Context, req domain.HybridRecallRequest)
internal/service/hybrid_recall.go:65
↓ 5 callersMethodSetMutationLogStore
(store domain.MutationLogStore)
internal/service/learning.go:64
↓ 5 callersMethodSetNeedsReview
(ctx context.Context, id uuid.UUID, needsReview bool)
internal/service/decay.go:224
↓ 5 callersMethodStart
Start begins the background decay worker
internal/service/decay.go:228
↓ 5 callersFunctionValidFeedbackType
(t string)
internal/domain/feedback.go:20
↓ 5 callersFunctionValidProvenance
(p string)
internal/domain/memory.go:63
↓ 5 callersFunctionValidRelationType
(r string)
internal/domain/graph.go:23
↓ 5 callersFunctionadminMutation
adminMutation builds an audit row for an operator action. ContentHash is the hash of the memory's content at the time of the action.
internal/service/admin.go:36
↓ 5 callersFunctionblendSalience
blendSalience folds the evidence (confidence) and currency (freshness) axes into a base relevance score
internal/service/hybrid_recall.go:53
↓ 5 callersFunctionclampLimit
clampLimit applies the upper bound only — callers keep their own defaults and lower-bound handling, so wrapping an existing parse is behavior-preservi
internal/api/handlers/response.go:31
↓ 5 callersFunctionenumF
(desc string, vals ...string)
mcp/tools.go:443
↓ 5 callersFunctionmapMemoryErr
(err error)
internal/service/admin.go:54
↓ 5 callersMethodmergeActivations
mergeActivations merges two activation lists, combining duplicates.
internal/service/working_memory.go:588
↓ 5 callersFunctionnewMockEpisodeStoreForConsolidation
()
internal/service/consolidation_test.go:196
↓ 5 callersFunctionnewMockMemoryStoreForConsolidation
()
internal/service/consolidation_test.go:24
↓ 5 callersFunctionnewMockProcedureStoreForConsolidation
()
internal/service/consolidation_test.go:330
↓ 5 callersFunctionnewMockSchemaStoreForConsolidation
()
internal/service/consolidation_test.go:406
↓ 5 callersFunctionpause
()
examples/02_memory_evolution_demo/main.go:305
↓ 5 callersFunctionpost
HTTP
examples/02_memory_evolution_demo/main.go:249
↓ 5 callersFunctionsameScopeCandidates
(candidates []domain.MemoryWithScore, m *domain.Memory)
internal/service/memory.go:108
↓ 5 callersFunctionsample
(conf float64, correct bool)
internal/service/calibration_test.go:10
↓ 5 callersMethodscoreContextMatch
scoreContextMatch scores how well contexts match.
internal/service/schema.go:436
↓ 5 callersFunctionstoreMemory
(content, memType string, confidence float64)
examples/01_learning_agent/main.go:117
↓ 5 callersMethodwriteServiceErr
(w http.ResponseWriter, err error)
internal/api/handlers/admin.go:193
↓ 4 callersMethodAddResource
AddResource registers an MCP resource with its URI template.
mcp/server.go:119
↓ 4 callersMethodApplyDecay
(memory *domain.Memory)
internal/service/confidence.go:145
↓ 4 callersMethodCheckTension
( ctx context.Context, existingText, incomingText string, existingEmb, incomingEmb []float32, )
internal/service/contradiction/embedding_detector.go:63
↓ 4 callersMethodCheckTension
( ctx context.Context, existingText, incomingText string, existingEmb, incomingEmb []float32, )
internal/service/contradiction/detector.go:21
↓ 4 callersMethodComputeLearningStats
(ctx context.Context, agentID uuid.UUID, periodStart, periodEnd time.Time)
internal/service/learning.go:306
↓ 4 callersFunctionCookieSecure
CookieSecure controls the Secure flag on the session cookie. Defaults to true (secure-by-default) so a forgotten env var in production never ships the
internal/config/config.go:237
↓ 4 callersMethodCountByAgentAndType
(ctx context.Context, agentID uuid.UUID, memType MemoryType)
internal/domain/stores.go:103
↓ 4 callersMethodGetByTimeRange
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID, start, end time.Time)
internal/domain/stores.go:268
↓ 4 callersMethodGetByTokenHash
(ctx context.Context, tokenHash string)
internal/domain/auth.go:75
↓ 4 callersMethodGetNeighbors
(ctx context.Context, memoryID uuid.UUID, direction string, relationTypes []RelationType)
internal/domain/graph.go:169
↓ 4 callersMethodGetSession
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID)
internal/domain/stores.go:350
↓ 4 callersFunctionHashAPIKey
HashAPIKey returns the SHA-256 hex digest of the given key.
internal/api/middleware/auth.go:190
↓ 4 callersMethodLearnFromOutcome
LearnFromOutcome extracts procedures from successful episodes.
internal/service/procedural.go:72
↓ 4 callersFunctionNewMemoryService
(ms domain.MemoryStore, as domain.AgentStore, ec domain.EmbeddingClient, lc domain.LLMClient, logger *zap.Logg
internal/service/memory.go:153
↓ 4 callersMethodRecordAccess
Access tracking
internal/domain/stores.go:285
↓ 4 callersMethodRecordOutcome
RecordOutcome records the outcome of an episode and propagates effects to used memories. All episode and memory lookups are scoped to tenantID so call
internal/service/learning.go:178
↓ 4 callersMethodRecordProcedureOutcome
RecordProcedureOutcome records the success/failure of using a procedure.
internal/service/procedural.go:233
↓ 4 callersFunctionRegisterTools
RegisterTools registers all Engram MCP tools on the server.
mcp/tools.go:13
↓ 4 callersMethodSetLearningStatsStore
(store domain.LearningStatsStore)
internal/service/learning.go:68
↓ 4 callersMethodSetSubscription
SetSubscription updates plan + status + subscription id from a Razorpay event.
internal/domain/billing.go:87
↓ 4 callersFunctionStdioRW
StdioRW is the testable core of Stdio — same protocol, explicit reader/writer.
mcp/transports/stdio.go:21
↓ 4 callersMethodUpdateConsolidationStatus
(ctx context.Context, id uuid.UUID, status ConsolidationStatus)
internal/domain/stores.go:275
↓ 4 callersFunctionValidContradictionType
(c string)
internal/domain/stores.go:163
↓ 4 callersFunctionValidOutcomeType
(s string)
internal/domain/episode.go:37
↓ 4 callersMethodVerifyAndParse
VerifyAndParse checks the X-Razorpay-Signature header against the configured webhook secret, then decodes the event. It fails closed: without a config
internal/billing/razorpay.go:243
↓ 4 callersMethodVerifyPaymentSignature
---- Client-side payment verification ---- VerifyPaymentSignature checks the signature returned by the Checkout modal's success handler. For subscript
internal/billing/razorpay.go:211
↓ 4 callersFunctiondisplayContent
(content?: string)
console/src/format.ts:36
↓ 4 callersFunctionmockEmb
mockEmb returns a synthetic embedding biased toward the given dimension. Two embeddings with different bias dimensions will have low cosine similarity
internal/service/contradiction/embedding_detector_test.go:13
↓ 4 callersFunctionnewMockEntityStore
()
internal/service/hybrid_recall_test.go:99
↓ 4 callersFunctionnewMockGraphStore
()
internal/service/hybrid_recall_test.go:15
↓ 4 callersFunctionpad
(n: number)
console/src/pages/TimeMachine.tsx:11
← previousnext →101–200 of 2,051, ranked by callers