Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cloudflare/agentic-inbox
/ functions
Functions
217 in github.com/cloudflare/agentic-inbox
⨍
Functions
217
◇
Types & classes
47
↓ 16 callers
Method
getEmail
(id: string)
workers/durableObject/index.ts:439
↓ 15 callers
Function
getMailboxStub
( env: Env, mailboxId: string, )
workers/lib/email-helpers.ts:23
↓ 12 callers
Function
mcpText
Wrap a plain result object into MCP content format.
workers/mcp/index.ts:27
↓ 11 callers
Method
createEmail
( folder: string, email: EmailData, attachments: AttachmentData[], )
workers/durableObject/index.ts:821
↓ 11 callers
Function
get
(url: string, opts?: { params?: Record<string, string>; responseType?: string; signal?: AbortSignal })
app/services/api.ts:60
↓ 9 callers
Function
defineTool
(def: { description: string; parameters: z.ZodType<any>; execute: (...args: any[]) => Promise<any>; })
workers/agent/index.ts:37
↓ 8 callers
Function
post
(url: string, body?: unknown, opts?: { signal?: AbortSignal })
app/services/api.ts:69
↓ 8 callers
Function
splitEmailList
(value?: string | null)
app/lib/utils.ts:39
↓ 7 callers
Function
stripHtmlToText
(html: string)
workers/lib/email-helpers.ts:182
↓ 7 callers
Function
txn
* Wrap SQL in a transaction so multi-statement migrations are atomic. * * Without this, a migration like `1_initial_setup` (CREATE + INSERT + * CRE
workers/durableObject/migrations.ts:77
↓ 6 callers
Method
deleteEmail
(id: string)
workers/durableObject/index.ts:537
↓ 6 callers
Function
escapeHtml
(text: string)
app/lib/utils.ts:122
↓ 6 callers
Function
mcpResult
* Wrap a result that may contain an `error` field into MCP format, * automatically setting isError when appropriate.
workers/mcp/index.ts:47
↓ 6 callers
Function
toEmailListValue
(addresses: string[])
app/lib/utils.ts:49
↓ 6 callers
Function
useInvalidateEmailData
Invalidate both the email list and folder counts after any email mutation.
app/queries/emails.ts:97
↓ 6 callers
Function
verifyDraft
(ai: Ai, body: string)
workers/lib/ai.ts:122
↓ 5 callers
Method
checkSendRateLimit
* Check if the mailbox has exceeded the send rate limit. * Limits: 20 emails per hour, 100 per day per mailbox. * Returns null if under limit, or
workers/durableObject/index.ts:793
↓ 5 callers
Function
generateMessageId
(fromDomain: string)
workers/lib/email-helpers.ts:85
↓ 5 callers
Function
sendEmail
( binding: SendEmail, params: SendEmailParams, )
workers/email-sender.ts:40
↓ 5 callers
Function
useMailbox
(mailboxId: string | undefined)
app/queries/mailboxes.ts:17
↓ 4 callers
Function
boolQuery
(c: AppContext, key: string)
workers/index.ts:60
↓ 4 callers
Function
escapeHtml
(text: string)
workers/lib/email-helpers.ts:156
↓ 4 callers
Method
getEmails
(options: GetEmailsOptions = {})
workers/durableObject/index.ts:114
↓ 4 callers
Function
hasUnread
(email: Email)
app/routes/email-list.tsx:234
↓ 4 callers
Function
intQuery
(c: AppContext, key: string)
workers/index.ts:53
↓ 4 callers
Function
request
( url: string, options: RequestInit = {}, )
app/services/api.ts:21
↓ 4 callers
Function
safeParse
Parse safely — returns null on invalid dates instead of NaN-date.
shared/dates.ts:14
↓ 4 callers
Function
textToHtml
(text: string)
workers/lib/email-helpers.ts:171
↓ 3 callers
Function
buildThreadingHeaders
( originalMsgId: string, references: string[], )
workers/lib/email-helpers.ts:121
↓ 3 callers
Function
del
(url: string)
app/services/api.ts:84
↓ 3 callers
Function
getPrefixedSubject
(subject: string, prefix: "Re" | "Fwd")
app/hooks/useComposeForm.ts:55
↓ 3 callers
Function
handleSend
()
app/components/AgentPanel.tsx:324
↓ 3 callers
Function
highlightTerms
(text: string, query: string)
app/routes/search-results.tsx:16
↓ 3 callers
Method
markThreadRead
(threadId: string)
workers/durableObject/index.ts:529
↓ 3 callers
Method
moveEmail
(id: string, folderId: string)
workers/durableObject/index.ts:634
↓ 3 callers
Function
put
(url: string, body?: unknown)
app/services/api.ts:77
↓ 3 callers
Method
searchEmails
(options: SearchFilterOptions & { page?: number; limit?: number })
workers/durableObject/index.ts:697
↓ 3 callers
Function
storeAttachments
( bucket: Env["BUCKET"], emailId: string, attachments?: { content: string; filename: string; type: st
workers/lib/attachments.ts:24
↓ 3 callers
Function
stripHtml
(html: string)
app/lib/utils.ts:77
↓ 3 callers
Method
updateEmail
( id: string, { read, starred }: { read?: boolean; starred?: boolean }, )
workers/durableObject/index.ts:504
↓ 3 callers
Function
useDeleteEmail
()
app/queries/emails.ts:207
↓ 3 callers
Function
useFolders
(mailboxId: string | undefined)
app/queries/folders.ts:10
↓ 3 callers
Function
useUpdateEmail
()
app/queries/emails.ts:119
↓ 3 callers
Function
validateSender
( to: string | string[], from: string | { email: string; name: string }, mailboxId: string, )
workers/lib/email-helpers.ts:53
↓ 2 callers
Method
#buildSearchConditions
* Build WHERE conditions and params for search queries. * Shared between searchEmails and countSearchResults.
workers/durableObject/index.ts:658
↓ 2 callers
Function
appendUniqueAddress
( addresses: string[], seen: Set<string>, address: string, exclude?: string, )
app/hooks/useComposeForm.ts:21
↓ 2 callers
Function
buildQuotedReplyBlock
( dateStr: string | undefined, sender: string, body: string, )
app/lib/utils.ts:154
↓ 2 callers
Function
buildQuotedReplyBlock
(original: { date?: string; sender?: string; body?: string; })
workers/lib/email-helpers.ts:201
↓ 2 callers
Function
buildReferencesChain
(original: EmailFull)
workers/lib/email-helpers.ts:99
↓ 2 callers
Function
createEmailTools
(env: Env, mailboxId: string)
workers/agent/index.ts:110
↓ 2 callers
Method
createFolder
(id: string, name: string, is_deletable: number = 1)
workers/durableObject/index.ts:589
↓ 2 callers
Method
deleteFolder
(id: string)
workers/durableObject/index.ts:615
↓ 2 callers
Function
extractMsgId
(s: string)
workers/index.ts:383
↓ 2 callers
Function
formatBytes
(bytes: number, decimals = 1)
app/lib/utils.ts:27
↓ 2 callers
Function
formatDetailDate
(dateStr: string)
shared/dates.ts:58
↓ 2 callers
Function
formatListDate
(dateStr: string)
shared/dates.ts:30
↓ 2 callers
Method
getFolders
()
workers/durableObject/index.ts:575
↓ 2 callers
Function
getSnippetText
( snippet?: string | null, maxLength = 100, )
app/lib/utils.ts:98
↓ 2 callers
Function
getSystemPrompt
* Fetch the custom system prompt for a mailbox from its R2 settings. * Falls back to DEFAULT_SYSTEM_PROMPT if none is configured.
workers/agent/index.ts:94
↓ 2 callers
Method
getThreadEmails
* Fetch all emails in a thread with full bodies and attachments in * two queries (one for emails, one for attachments) instead of * N+1 individual
workers/durableObject/index.ts:467
↓ 2 callers
Function
getToolNameFromPart
(part: UIMessage["parts"][number])
app/components/AgentPanel.tsx:100
↓ 2 callers
Function
handleEditDraft
(draftMsg?: Email)
app/components/EmailPanel.tsx:94
↓ 2 callers
Function
handleRowClick
(email: Email)
app/routes/search-results.tsx:67
↓ 2 callers
Function
handleRowClick
(email: Email)
app/routes/email-list.tsx:241
↓ 2 callers
Function
handleSendDraft
(draftMsg?: Email)
app/components/EmailPanel.tsx:109
↓ 2 callers
Function
isPromptInjection
(ai: Ai, bodyHtml: string | null | undefined)
workers/lib/ai.ts:24
↓ 2 callers
Function
listMailboxes
( bucket: R2Bucket, )
workers/lib/email-helpers.ts:37
↓ 2 callers
Function
makeQueryClient
()
app/root.tsx:28
↓ 2 callers
Function
normalizeDate
* Normalize a date string to ISO format. Accepts YYYY-MM-DD or various * Date-parseable strings.
app/lib/search-parser.ts:117
↓ 2 callers
Function
normalizeWhitespace
(s: string)
workers/lib/ai.ts:191
↓ 2 callers
Function
resolveOriginalEmail
( stub: DurableObjectStub<MailboxDO>, email: EmailFull, )
workers/lib/email-helpers.ts:139
↓ 2 callers
Function
rewriteInlineImages
( body: string, mailboxId: string, emailId: string, attachments?: { id: string; content_id?: string | null
app/lib/utils.ts:178
↓ 2 callers
Function
toolDraftEmail
( env: Env, mailboxId: string, params: { to: string; subject: string; body: string; isPlainText?: b
workers/lib/tools.ts:198
↓ 2 callers
Function
toolDraftReply
( env: Env, mailboxId: string, params: { originalEmailId: string; to: string; subject: string; body
workers/lib/tools.ts:119
↓ 2 callers
Function
toolGetEmail
( env: Env, mailboxId: string, emailId: string, )
workers/lib/tools.ts:71
↓ 2 callers
Function
toolGetThread
( env: Env, mailboxId: string, threadId: string, )
workers/lib/tools.ts:84
↓ 2 callers
Function
toolListEmails
( env: Env, mailboxId: string, params: { folder: string; limit: number; page: number }, )
workers/lib/tools.ts:54
↓ 2 callers
Function
toolMarkEmailRead
( env: Env, mailboxId: string, emailId: string, read: boolean, )
workers/lib/tools.ts:330
↓ 2 callers
Function
toolMoveEmail
( env: Env, mailboxId: string, emailId: string, folderId: string, )
workers/lib/tools.ts:343
↓ 2 callers
Function
toolSearchEmails
( env: Env, mailboxId: string, params: { query: string; folder?: string }, )
workers/lib/tools.ts:95
↓ 2 callers
Method
updateFolder
(id: string, name: string)
workers/durableObject/index.ts:605
↓ 2 callers
Function
useComposeForm
(mailboxId?: string, _folder?: string)
app/hooks/useComposeForm.ts:165
↓ 2 callers
Function
useReplyToEmail
()
app/queries/emails.ts:255
↓ 2 callers
Function
useSendEmail
()
app/queries/emails.ts:107
↓ 1 callers
Function
applyMigrations
( sql: SqlStorage, migrations: Migration[], storage?: DurableObjectStorage, )
workers/durableObject/migrations.ts:17
↓ 1 callers
Function
buildForwardBody
( original: NonNullable<ReturnType<typeof useUIStore.getState>["composeOptions"]["originalEmail"]>, sigBlock
app/hooks/useComposeForm.ts:62
↓ 1 callers
Function
buildInitialComposeFields
( composeOptions: ReturnType<typeof useUIStore.getState>["composeOptions"], mailboxEmail: string | undefined
app/hooks/useComposeForm.ts:107
↓ 1 callers
Function
buildReplyAllFields
( original: NonNullable<ReturnType<typeof useUIStore.getState>["composeOptions"]["originalEmail"]>, selfAddr
app/hooks/useComposeForm.ts:73
↓ 1 callers
Function
clearSearch
()
app/components/Header.tsx:36
↓ 1 callers
Method
countEmails
* Count total emails matching the given filters (for pagination).
workers/durableObject/index.ts:182
↓ 1 callers
Method
countSearchResults
* Count total search results matching the given filters (for pagination).
workers/durableObject/index.ts:728
↓ 1 callers
Method
countThreadedEmails
* Count threaded conversations in a folder (for pagination). * Returns the number of conversation groups, not individual emails.
workers/durableObject/index.ts:392
↓ 1 callers
Function
decodeHtmlEntities
(text: string)
app/lib/utils.ts:81
↓ 1 callers
Function
downloadFile
(url: string, filename: string)
app/lib/utils.ts:211
↓ 1 callers
Method
findThreadBySubject
(subject: string, senderAddress?: string)
workers/durableObject/index.ts:742
↓ 1 callers
Function
folderDisplayName
(name: string | null | undefined)
app/routes/search-results.tsx:68
↓ 1 callers
Function
formatParticipants
(email: Email)
app/routes/email-list.tsx:259
↓ 1 callers
Function
formatShortDate
(dateStr: string)
shared/dates.ts:75
↓ 1 callers
Function
getAccessUrls
(teamDomain: string)
workers/app.ts:31
↓ 1 callers
Method
getAttachment
(id: string)
workers/durableObject/index.ts:563
next →
1–100 of 217, ranked by callers