Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/cosmicstack-labs/mercury-agent
/ functions
Functions
707 in github.com/cosmicstack-labs/mercury-agent
⨍
Functions
707
◇
Types & classes
115
↓ 110 callers
Method
get
(type: ChannelType)
src/channels/registry.ts:25
↓ 104 callers
Method
replace
(text: string)
src/soul/identity.ts:142
↓ 77 callers
Method
send
(content: string, targetId?: string, elapsedMs?: number)
src/channels/base.ts:9
↓ 29 callers
Method
remember
( candidates: UserMemoryCandidate[], source: UserMemoryRecord['source'] = 'conversation', )
src/memory/user-memory.ts:216
↓ 28 callers
Function
getEnv
(key: string, fallback: string = '')
src/utils/config.ts:111
↓ 25 callers
Function
getMercuryHome
()
src/utils/config.ts:15
↓ 24 callers
Function
saveConfig
(config: MercuryConfig)
src/utils/config.ts:232
↓ 23 callers
Function
loadConfig
()
src/utils/config.ts:222
↓ 19 callers
Function
ask
(prompt: string)
src/index.ts:92
↓ 18 callers
Method
transition
(to: AgentState)
src/core/lifecycle.ts:27
↓ 17 callers
Method
getCwd
()
src/capabilities/registry.ts:95
↓ 15 callers
Method
getSummary
()
src/memory/user-memory.ts:97
↓ 14 callers
Method
add
(fact: Omit<LongTermFact, 'id' | 'timestamp'>)
src/memory/store.ts:118
↓ 14 callers
Method
clear
(conversationId: string)
src/memory/store.ts:86
↓ 14 callers
Function
formatTelegramUser
(user: { userId: number; username?: string; firstName?: string; })
src/index.ts:444
↓ 14 callers
Method
sendDirectMessage
(chatId: number, content: string)
src/channels/telegram.ts:1013
↓ 13 callers
Method
handleChatCommand
(content: string, channelType: string, channelId: string)
src/core/agent.ts:1236
↓ 13 callers
Function
renderLayout
(c: Context, title: string, body: string)
src/web/pages/layout.ts:24
↓ 12 callers
Function
createStore
()
src/memory/user-memory.test.ts:13
↓ 12 callers
Method
getStatusText
()
src/utils/tokens.ts:102
↓ 12 callers
Method
init
()
src/memory/second-brain-db.ts:103
↓ 12 callers
Function
memoryHealthScore
(row: MemoryRow)
src/memory/user-memory.ts:761
↓ 11 callers
Method
broadcast
(event: ChatEvent)
src/channels/web.ts:77
↓ 11 callers
Method
close
()
src/types/sql-js.d.ts:1
↓ 11 callers
Function
ensureMemory
()
src/web/api/brain.ts:16
↓ 11 callers
Function
renderInline
(tokens: any[] | undefined)
src/utils/markdown.ts:95
↓ 11 callers
Function
trimFirst
(s: string)
src/utils/tool-label.ts:125
↓ 10 callers
Function
clamp
(value: number, min: number, max: number)
src/memory/user-memory.ts:829
↓ 10 callers
Method
exec
(sql: string, params?: any[])
src/types/sql-js.d.ts:1
↓ 10 callers
Function
getDaemonStatus
()
src/cli/daemon.ts:40
↓ 10 callers
Method
getRecent
(count: number = 20)
src/memory/store.ts:176
↓ 10 callers
Method
sanitizeCount
(value: unknown)
src/utils/tokens.ts:170
↓ 9 callers
Function
getEnvBool
(key: string, fallback: boolean)
src/utils/config.ts:120
↓ 9 callers
Function
getMemoryDir
()
src/utils/config.ts:19
↓ 9 callers
Method
getMeta
(key: string)
src/memory/second-brain-db.ts:702
↓ 9 callers
Function
mdToTelegram
(text: string)
src/utils/markdown.ts:185
↓ 9 callers
Function
normalize
(input: string)
src/memory/user-memory.ts:809
↓ 9 callers
Method
resolveTargetChatIds
(targetId?: string)
src/channels/telegram.ts:852
↓ 8 callers
Function
approveTelegramPendingRequest
( config: MercuryConfig, userId: number, role: 'admin' | 'member' = 'member', )
src/utils/config.ts:358
↓ 8 callers
Method
checkFsAccess
(path: string, mode: 'read' | 'write')
src/capabilities/permissions.ts:255
↓ 8 callers
Function
getTelegramApprovedUsers
(config: MercuryConfig)
src/utils/config.ts:289
↓ 8 callers
Method
isLearningPaused
()
src/memory/user-memory.ts:261
↓ 8 callers
Method
search
(query: string, limit: number = 5)
src/memory/store.ts:128
↓ 8 callers
Method
toRecord
(row: MemoryRow)
src/memory/user-memory.ts:574
↓ 7 callers
Function
addTelegramPendingRequest
( config: MercuryConfig, request: Omit<TelegramPendingRequest, 'requestedAt'> & { requestedAt?: string },
src/utils/config.ts:337
↓ 7 callers
Function
buildModelCatalog
( provider: ProviderName, models: string[], currentModel?: string, )
src/utils/provider-models.ts:172
↓ 7 callers
Function
clearTelegramAccess
(config: MercuryConfig)
src/utils/config.ts:449
↓ 7 callers
Function
commandExists
(cmd)
scripts/check-native-deps.js:53
↓ 7 callers
Function
configure
(existingConfig?: MercuryConfig)
src/index.ts:528
↓ 7 callers
Function
getDefaultConfig
()
src/utils/config.ts:127
↓ 7 callers
Function
getTelegramAccessSummary
(config: MercuryConfig)
src/utils/config.ts:331
↓ 7 callers
Function
githubRequest
(path: string, options: GitHubRequestOptions = {})
src/utils/github.ts:26
↓ 7 callers
Function
hasTelegramAdmins
(config: MercuryConfig)
src/utils/config.ts:327
↓ 7 callers
Function
hr
()
src/index.ts:57
↓ 7 callers
Function
loadWebAuth
()
src/web/auth.ts:31
↓ 7 callers
Function
maskKey
(key: string)
src/index.ts:102
↓ 7 callers
Function
restartDaemonIfRunning
(message?: string)
src/index.ts:472
↓ 7 callers
Method
stripHtml
(html: string)
src/channels/telegram.ts:936
↓ 6 callers
Function
check
(label, fn)
scripts/verify-package.cjs:12
↓ 6 callers
Method
consolidate
()
src/memory/user-memory.ts:269
↓ 6 callers
Method
escapeHtml
(text: string)
src/channels/telegram.ts:911
↓ 6 callers
Function
findTelegramPendingRequest
(config: MercuryConfig, userId: number)
src/utils/config.ts:316
↓ 6 callers
Function
getProviderLabel
(name: ProviderName)
src/index.ts:123
↓ 6 callers
Function
isSetupComplete
()
src/utils/config.ts:240
↓ 6 callers
Function
logPath
()
src/cli/daemon.ts:15
↓ 6 callers
Method
persistSchedules
()
src/core/scheduler.ts:215
↓ 6 callers
Function
pidPath
()
src/cli/daemon.ts:11
↓ 6 callers
Method
reset
()
src/core/agent.ts:233
↓ 6 callers
Method
resetIfNewDay
()
src/utils/tokens.ts:109
↓ 6 callers
Method
sendStepDone
(toolName: string, result: unknown, targetId?: string)
src/channels/web.ts:219
↓ 6 callers
Method
sendToolFeedback
(toolName: string, args: Record<string, unknown>, targetId?: string)
src/channels/web.ts:204
↓ 6 callers
Method
update
(row: Partial<MemoryRow> & { id: string })
src/memory/second-brain-db.ts:258
↓ 5 callers
Method
discover
()
src/skills/loader.ts:38
↓ 5 callers
Method
endOutput
()
src/channels/cli.ts:330
↓ 5 callers
Function
escapeHtml
(text: string)
src/utils/markdown.ts:181
↓ 5 callers
Method
getById
(id: string)
src/memory/second-brain-db.ts:287
↓ 5 callers
Function
getEnvNum
(key: string, fallback: number)
src/utils/config.ts:115
↓ 5 callers
Method
getManifest
(id: string)
src/core/scheduler.ts:173
↓ 5 callers
Method
getManifests
()
src/core/scheduler.ts:169
↓ 5 callers
Function
getSessionCookieName
()
src/web/auth.ts:145
↓ 5 callers
Method
handleBudgetCommand
(subcommand: string, channelType: string, channelId: string)
src/core/agent.ts:1206
↓ 5 callers
Function
parseSkillMd
(content: string)
src/skills/loader.ts:11
↓ 5 callers
Method
persist
()
src/utils/tokens.ts:120
↓ 5 callers
Function
promptApiKeyWithModelSelection
( config: MercuryConfig, provider: ProviderName, providerLabel: string, prompt: string, isReconfig:
src/index.ts:320
↓ 5 callers
Method
save
(manifest?: PermissionsManifest)
src/capabilities/permissions.ts:232
↓ 5 callers
Method
setMeta
(key: string, value: string)
src/memory/second-brain-db.ts:697
↓ 4 callers
Method
addTempScope
(path: string, read: boolean, write: boolean)
src/capabilities/permissions.ts:423
↓ 4 callers
Function
approveTelegramPendingRequestByPairingCode
( config: MercuryConfig, pairingCode: string, )
src/utils/config.ts:391
↓ 4 callers
Function
autoDaemonize
()
src/index.ts:838
↓ 4 callers
Method
getActiveSummary
()
src/memory/user-memory.ts:112
↓ 4 callers
Method
getChatCommandContext
()
src/capabilities/registry.ts:82
↓ 4 callers
Function
getTelegramPendingRequests
(config: MercuryConfig)
src/utils/config.ts:304
↓ 4 callers
Method
getToolNames
()
src/capabilities/registry.ts:195
↓ 4 callers
Function
isBetterSqlite3Available
()
src/memory/second-brain-db.ts:31
↓ 4 callers
Method
load
()
src/soul/identity.ts:126
↓ 4 callers
Method
loadOrInit
(filename: string, template: string)
src/soul/identity.ts:178
↓ 4 callers
Function
overlapScore
(a: string, b: string)
src/memory/user-memory.ts:813
↓ 4 callers
Method
recordUsage
(entry: Omit<TokenLogEntry, 'timestamp'>)
src/utils/tokens.ts:82
↓ 4 callers
Function
rejectTelegramPendingRequest
(config: MercuryConfig, userId: number)
src/utils/config.ts:401
↓ 4 callers
Method
removeTask
(id: string)
src/core/scheduler.ts:155
next →
1–100 of 707, ranked by callers