SYMBOL INDEX (864 symbols across 129 files) FILE: src/agent/agent.ts constant DEFAULT_MODEL (line 19) | const DEFAULT_MODEL = 'gpt-5.4'; constant DEFAULT_MAX_ITERATIONS (line 20) | const DEFAULT_MAX_ITERATIONS = 10; constant MAX_OVERFLOW_RETRIES (line 21) | const MAX_OVERFLOW_RETRIES = 2; constant OVERFLOW_KEEP_TOOL_USES (line 22) | const OVERFLOW_KEEP_TOOL_USES = 3; class Agent (line 27) | class Agent { method constructor (line 37) | private constructor( method create (line 55) | static async create(config: AgentConfig = {}): Promise { method run (line 81) | async *run(query: string, inMemoryHistory?: InMemoryChatHistory): Asyn... method callModel (line 204) | private async callModel(prompt: string, useTools: boolean = true): Pro... method handleDirectResponse (line 217) | private async *handleDirectResponse( method manageContextThreshold (line 236) | private async *manageContextThreshold( method buildInitialPrompt (line 279) | private buildInitialPrompt( FILE: src/agent/channels.ts constant CLI_PROFILE (line 7) | const CLI_PROFILE: ChannelProfile = { constant WHATSAPP_PROFILE (line 45) | const WHATSAPP_PROFILE: ChannelProfile = { constant CHANNEL_PROFILES (line 70) | const CHANNEL_PROFILES: Record = { function getChannelProfile (line 76) | function getChannelProfile(channel?: string): ChannelProfile { FILE: src/agent/prompts.ts function getCurrentDate (line 19) | function getCurrentDate(): string { function loadSoulDocument (line 32) | async function loadSoulDocument(): Promise { function buildSkillsSection (line 54) | function buildSkillsSection(): string { function buildMemorySection (line 75) | function buildMemorySection(memoryFiles: string[]): string { constant DEFAULT_SYSTEM_PROMPT (line 105) | const DEFAULT_SYSTEM_PROMPT = `You are Dexter, a helpful AI assistant. type GroupContext (line 148) | type GroupContext = { function buildGroupSection (line 157) | function buildGroupSection(ctx: GroupContext): string { function buildSystemPrompt (line 192) | function buildSystemPrompt( function buildIterationPrompt (line 273) | function buildIterationPrompt( FILE: src/agent/run-context.ts type RunContext (line 7) | interface RunContext { function createRunContext (line 15) | function createRunContext(query: string): RunContext { FILE: src/agent/scratchpad.ts type ToolCallRecord (line 9) | interface ToolCallRecord { type ScratchpadEntry (line 15) | interface ScratchpadEntry { type ToolLimitConfig (line 29) | interface ToolLimitConfig { type ToolUsageStatus (line 39) | interface ToolUsageStatus { constant DEFAULT_LIMIT_CONFIG (line 50) | const DEFAULT_LIMIT_CONFIG: ToolLimitConfig = { class Scratchpad (line 66) | class Scratchpad { method constructor (line 79) | constructor(query: string, limitConfig?: Partial) { method addToolResult (line 103) | addToolResult( method canCallTool (line 126) | canCallTool(toolName: string, query?: string): { allowed: boolean; war... method recordToolCall (line 175) | recordToolCall(toolName: string, query?: string): void { method getToolUsageStatus (line 192) | getToolUsageStatus(): ToolUsageStatus[] { method formatToolUsageForPrompt (line 218) | formatToolUsageForPrompt(): string | null { method findSimilarQuery (line 240) | private findSimilarQuery(newQuery: string, previousQueries: string[]):... method tokenize (line 258) | private tokenize(query: string): Set { method calculateSimilarity (line 271) | private calculateSimilarity(set1: Set, set2: Set): num... method parseResultSafely (line 284) | private parseResultSafely(result: string): unknown { method addThinking (line 296) | addThinking(thought: string): void { method getToolResults (line 305) | getToolResults(): string { method clearOldestToolResults (line 339) | clearOldestToolResults(keepCount: number): number { method getActiveToolResultCount (line 370) | getActiveToolResultCount(): number { method getToolCallRecords (line 390) | getToolCallRecords(): ToolCallRecord[] { method stringifyResult (line 404) | private stringifyResult(result: unknown): string { method hasToolResults (line 414) | hasToolResults(): boolean { method hasExecutedSkill (line 422) | hasExecutedSkill(skillName: string): boolean { method append (line 431) | private append(entry: ScratchpadEntry): void { method parseLine (line 438) | private parseLine(line: string): ScratchpadEntry | null { method readEntries (line 454) | private readEntries(): ScratchpadEntry[] { FILE: src/agent/token-counter.ts class TokenCounter (line 6) | class TokenCounter { method add (line 12) | add(usage?: TokenUsage): void { method getUsage (line 22) | getUsage(): TokenUsage | undefined { method getTokensPerSecond (line 29) | getTokensPerSecond(elapsedMs: number): number | undefined { FILE: src/agent/tool-executor.ts type ToolExecutionEvent (line 16) | type ToolExecutionEvent = constant TOOLS_REQUIRING_APPROVAL (line 25) | const TOOLS_REQUIRING_APPROVAL = ['write_file', 'edit_file'] as const; class AgentToolExecutor (line 30) | class AgentToolExecutor { method constructor (line 33) | constructor( method executeAll (line 45) | async *executeAll( method executeSingle (line 63) | private async *executeSingle( method extractQueryFromArgs (line 153) | private extractQueryFromArgs(args: Record): string | ... method requiresApproval (line 165) | private requiresApproval(toolName: string): boolean { FILE: src/agent/types.ts type ChannelProfile (line 11) | interface ChannelProfile { type ApprovalDecision (line 34) | type ApprovalDecision = 'allow-once' | 'allow-session' | 'deny'; type AgentConfig (line 39) | interface AgentConfig { type Message (line 63) | interface Message { type ThinkingEvent (line 75) | interface ThinkingEvent { type ToolStartEvent (line 83) | interface ToolStartEvent { type ToolEndEvent (line 92) | interface ToolEndEvent { type ToolErrorEvent (line 103) | interface ToolErrorEvent { type ToolProgressEvent (line 112) | interface ToolProgressEvent { type ToolLimitEvent (line 121) | interface ToolLimitEvent { type ToolApprovalEvent (line 133) | interface ToolApprovalEvent { type ToolDeniedEvent (line 143) | interface ToolDeniedEvent { type ContextClearedEvent (line 152) | interface ContextClearedEvent { type MemoryRecalledEvent (line 163) | interface MemoryRecalledEvent { type MemoryFlushEvent (line 172) | interface MemoryFlushEvent { type TokenUsage (line 181) | interface TokenUsage { type DoneEvent (line 190) | interface DoneEvent { type AgentEvent (line 203) | type AgentEvent = type DisplayEvent (line 221) | interface DisplayEvent { FILE: src/cli.ts function truncateAtWord (line 29) | function truncateAtWord(str: string, maxLength: number): string { function summarizeToolResult (line 40) | function summarizeToolResult(tool: string, args: Record... function createScreen (line 68) | function createScreen( function renderHistory (line 90) | function renderHistory(chatLog: ChatLogComponent, history: AgentRunnerCo... function runCli (line 161) | async function runCli() { FILE: src/components/answer-box.ts class AnswerBoxComponent (line 5) | class AnswerBoxComponent extends Container { method constructor (line 9) | constructor(initialText = '') { method setText (line 17) | setText(text: string) { FILE: src/components/approval-prompt.ts function formatToolLabel (line 6) | function formatToolLabel(tool: string): string { class ApprovalPromptComponent (line 13) | class ApprovalPromptComponent extends Container { method constructor (line 17) | constructor(tool: string, args: Record) { FILE: src/components/chat-log.ts function formatDuration (line 8) | function formatDuration(ms: number): string { function truncateUrl (line 21) | function truncateUrl(url: string, maxLen = 45): string { function formatBrowserStep (line 31) | function formatBrowserStep(args: Record): string | null { type ToolDisplayComponent (line 52) | interface ToolDisplayComponent { class BrowserSessionComponent (line 61) | class BrowserSessionComponent extends Container implements ToolDisplayCo... method constructor (line 66) | constructor(_tui: TUI) { method setStep (line 73) | setStep(args: Record) { method setActive (line 80) | setActive(progressMessage?: string): void { method setComplete (line 87) | setComplete(summary: string, duration: number): void { method setError (line 94) | setError(error: string): void { method setLimitWarning (line 100) | setLimitWarning(warning?: string): void { method setApproval (line 106) | setApproval(decision: 'allow-once' | 'allow-session' | 'deny'): void { method setDenied (line 119) | setDenied(path: string, tool: string): void { method clearDetail (line 126) | private clearDetail() { class ChatLogComponent (line 134) | class ChatLogComponent extends Container { method constructor (line 142) | constructor(tui: TUI) { method clearAll (line 147) | clearAll() { method addQuery (line 156) | addQuery(query: string) { method resetToolGrouping (line 160) | resetToolGrouping() { method addInterrupted (line 165) | addInterrupted() { method startTool (line 169) | startTool(toolCallId: string, toolName: string, args: Record string> = { class DebugPanelComponent (line 12) | class DebugPanelComponent extends Container { method constructor (line 19) | constructor(maxLines = 8, show = true) { method dispose (line 32) | dispose() { method refresh (line 37) | private refresh() { FILE: src/components/intro.ts constant INTRO_WIDTH (line 6) | const INTRO_WIDTH = 50; class IntroComponent (line 8) | class IntroComponent extends Container { method constructor (line 11) | constructor(model: string) { method setModel (line 61) | setModel(model: string) { FILE: src/components/select-list.ts class VimSelectList (line 6) | class VimSelectList extends SelectList { method handleInput (line 7) | handleInput(keyData: string): void { class EmptyModelSelector (line 20) | class EmptyModelSelector extends Container { method constructor (line 23) | constructor(providerId: string, onCancel: () => void) { method handleInput (line 35) | handleInput(keyData: string): void { function createProviderSelector (line 43) | function createProviderSelector( function createModelSelector (line 57) | function createModelSelector( function createApprovalSelector (line 76) | function createApprovalSelector(onSelect: (decision: ApprovalDecision) =... function createApiKeyConfirmSelector (line 88) | function createApiKeyConfirmSelector(onConfirm: (wantsToSet: boolean) =>... class ApiKeyInputComponent (line 99) | class ApiKeyInputComponent { method constructor (line 105) | constructor(masked = false) { method invalidate (line 109) | invalidate() { method render (line 113) | render(width: number): string[] { method handleInput (line 125) | handleInput(keyData: string): void { method getValue (line 138) | getValue(): string { FILE: src/components/tool-event.ts function formatToolName (line 5) | function formatToolName(name: string): string { function truncateAtWord (line 14) | function truncateAtWord(str: string, maxLength: number): string { function formatArgs (line 25) | function formatArgs(tool: string, args: Record): string { function formatDuration (line 41) | function formatDuration(ms: number): string { function approvalLabel (line 48) | function approvalLabel(decision: ApprovalDecision): string { class ToolEventComponent (line 59) | class ToolEventComponent extends Container { method constructor (line 64) | constructor(_tui: unknown, tool: string, args: Record) { method setActive (line 72) | setActive(progressMessage?: string) { method setComplete (line 79) | setComplete(summary: string, duration: number) { method setError (line 90) | setError(error: string) { method setLimitWarning (line 97) | setLimitWarning(warning?: string) { method setDenied (line 107) | setDenied(path: string, tool: string) { method setApproval (line 115) | setApproval(decision: ApprovalDecision) { method clearDetail (line 123) | private clearDetail() { FILE: src/components/user-query.ts class UserQueryComponent (line 4) | class UserQueryComponent extends Container { method constructor (line 7) | constructor(query: string) { method setQuery (line 15) | setQuery(query: string) { FILE: src/components/working-indicator.ts class WorkingIndicatorComponent (line 6) | class WorkingIndicatorComponent extends Container { method constructor (line 13) | constructor(tui: TUI) { method setState (line 19) | setState(state: WorkingState) { method dispose (line 39) | dispose() { method renderIdle (line 43) | private renderIdle() { method renderBusy (line 47) | private renderBusy() { method ensureLoader (line 53) | private ensureLoader() { method stopLoader (line 67) | private stopLoader() { method updateMessage (line 75) | private updateMessage() { FILE: src/controllers/agent-runner.ts type ChangeListener (line 12) | type ChangeListener = () => void; type RunQueryResult (line 14) | interface RunQueryResult { class AgentRunnerController (line 18) | class AgentRunnerController { method constructor (line 30) | constructor( method history (line 40) | get history(): HistoryItem[] { method workingState (line 44) | get workingState(): WorkingState { method error (line 48) | get error(): string | null { method pendingApproval (line 52) | get pendingApproval(): { tool: string; args: Record }... method isProcessing (line 56) | get isProcessing(): boolean { method setError (line 62) | setError(error: string | null) { method respondToApproval (line 67) | respondToApproval(decision: ApprovalDecision) { method cancelExecution (line 80) | cancelExecution() { method runQuery (line 95) | async runQuery(query: string): Promise { method handleEvent (line 159) | private async handleEvent(event: AgentEvent) { method finishToolEvent (line 244) | private finishToolEvent(event: AgentEvent) { method pushEvent (line 254) | private pushEvent(displayEvent: DisplayEvent) { method updateLastItem (line 258) | private updateLastItem(updater: (item: HistoryItem) => HistoryItem) { method markLastProcessing (line 267) | private markLastProcessing(status: HistoryItemStatus) { method emitChange (line 275) | private emitChange() { FILE: src/controllers/input-history.ts type ChangeListener (line 3) | type ChangeListener = () => void; class InputHistoryController (line 5) | class InputHistoryController { method constructor (line 11) | constructor(onChange?: ChangeListener) { method init (line 15) | async init() { method setOnChange (line 21) | setOnChange(onChange?: ChangeListener) { method historyValue (line 25) | get historyValue(): string | null { method getMessages (line 29) | getMessages(): string[] { method navigateUp (line 33) | navigateUp() { method navigateDown (line 46) | navigateDown() { method resetNavigation (line 58) | resetNavigation() { method saveMessage (line 63) | async saveMessage(message: string) { method updateAgentResponse (line 69) | async updateAgentResponse(response: string) { method emitChange (line 73) | private emitChange() { FILE: src/controllers/model-selection.ts constant SELECTION_STATES (line 16) | const SELECTION_STATES = [ type SelectionState (line 24) | type SelectionState = (typeof SELECTION_STATES)[number]; type AppState (line 25) | type AppState = 'idle' | SelectionState; type ModelSelectionState (line 27) | interface ModelSelectionState { type ChangeListener (line 33) | type ChangeListener = () => void; class ModelSelectionController (line 35) | class ModelSelectionController { method constructor (line 46) | constructor(onError: (message: string) => void, onChange?: ChangeListe... method state (line 56) | get state(): ModelSelectionState { method provider (line 64) | get provider(): string { method model (line 68) | get model(): string { method inMemoryChatHistory (line 72) | get inMemoryChatHistory(): InMemoryChatHistory { method isInSelectionFlow (line 76) | isInSelectionFlow(): boolean { method startSelection (line 80) | startSelection() { method cancelSelection (line 85) | cancelSelection() { method handleProviderSelect (line 89) | async handleProviderSelect(providerId: string | null) { method handleModelSelect (line 117) | handleModelSelect(modelId: string | null) { method handleModelInputSubmit (line 142) | handleModelInputSubmit(modelName: string | null) { method handleApiKeyConfirm (line 163) | handleApiKeyConfirm(wantsToSet: boolean) { method handleApiKeySubmit (line 187) | handleApiKeySubmit(apiKey: string | null) { method completeModelSwitch (line 218) | private completeModelSwitch(newProvider: string, newModelId: string) { method resetPendingState (line 231) | private resetPendingState() { method emitChange (line 239) | private emitChange() { FILE: src/evals/components/eval-app.ts constant SHOW_STATS (line 8) | const SHOW_STATS = true; type EvalState (line 10) | interface EvalState { type EvalProgressEvent (line 22) | interface EvalProgressEvent { class EvalApp (line 33) | class EvalApp extends Container { method constructor (line 52) | constructor(tui: TUI, runEvaluation: () => AsyncGenerator(array: T[]): T[] { function target (line 143) | async function target(inputs: { question: string }): Promise<{ answer: s... function correctnessEvaluator (line 172) | async function correctnessEvaluator({ function createEvaluationRunner (line 217) | function createEvaluationRunner(sampleSize?: number) { function main (line 337) | async function main() { FILE: src/gateway/access-control.ts constant PAIRING_REPLY_HISTORY_GRACE_MS (line 7) | const PAIRING_REPLY_HISTORY_GRACE_MS = 30_000; type PairingRequest (line 9) | type PairingRequest = { type PairingStore (line 15) | type PairingStore = Record; function pairingPath (line 17) | function pairingPath(): string { function loadPairingStore (line 24) | function loadPairingStore(): PairingStore { function savePairingStore (line 36) | function savePairingStore(store: PairingStore): void { function createPairingCode (line 45) | function createPairingCode(): string { function recordPairingRequest (line 49) | function recordPairingRequest(phone: string): PairingRequest { function isAllowedPhone (line 66) | function isAllowedPhone(params: { function buildPairingReply (line 78) | function buildPairingReply(code: string, senderId: string): string { type InboundAccessControlResult (line 87) | type InboundAccessControlResult = { function checkInboundAccessControl (line 95) | async function checkInboundAccessControl(params: { FILE: src/gateway/agent-runner.ts type SessionState (line 7) | type SessionState = { function getSession (line 14) | function getSession(sessionKey: string, model: string): SessionState { type AgentRunRequest (line 27) | type AgentRunRequest = { function runAgentForMessage (line 40) | async function runAgentForMessage(req: AgentRunRequest): Promise { FILE: src/gateway/channels/manager.ts type RuntimeStore (line 3) | type RuntimeStore = { type ChannelManager (line 9) | type ChannelManager = { function createRuntimeStore (line 17) | function createRuntimeStore(): RuntimeStore { function createChannelManager (line 25) | function createChannelManager(params: { FILE: src/gateway/channels/types.ts type ChannelId (line 1) | type ChannelId = 'whatsapp'; type ChannelRuntimeSnapshot (line 3) | type ChannelRuntimeSnapshot = { type ChannelStartContext (line 12) | type ChannelStartContext = { type ChannelStopContext (line 20) | type ChannelStopContext = { type ChannelConfigAdapter (line 28) | type ChannelConfigAdapter = { type ChannelGatewayAdapter (line 35) | type ChannelGatewayAdapter = { type ChannelPlugin (line 40) | type ChannelPlugin = { FILE: src/gateway/channels/whatsapp/auth-store.ts function resolveCredsPath (line 5) | function resolveCredsPath(authDir: string): string { function resolveCredsBackupPath (line 9) | function resolveCredsBackupPath(authDir: string): string { function hasCredsSync (line 13) | function hasCredsSync(authDir: string): boolean { function readCredsJsonRaw (line 22) | function readCredsJsonRaw(filePath: string): string | null { function maybeRestoreCredsFromBackup (line 40) | function maybeRestoreCredsFromBackup(authDir: string): void { function backupCredsBeforeSave (line 68) | function backupCredsBeforeSave(authDir: string): void { function authExists (line 86) | async function authExists(authDir: string): Promise { function readSelfId (line 106) | function readSelfId(authDir: string): { e164: string | null; jid: string... function jidToE164 (line 123) | function jidToE164(jid: string): string | null { function logout (line 131) | async function logout(authDir: string): Promise { FILE: src/gateway/channels/whatsapp/dedupe.ts constant RECENT_MESSAGE_TTL_MS (line 1) | const RECENT_MESSAGE_TTL_MS = 20 * 60_000; constant RECENT_MESSAGE_MAX (line 2) | const RECENT_MESSAGE_MAX = 5000; type CacheEntry (line 4) | type CacheEntry = { function pruneExpired (line 12) | function pruneExpired(): void { function isRecentInboundMessage (line 42) | function isRecentInboundMessage(key: string): boolean { function resetInboundDedupe (line 57) | function resetInboundDedupe(): void { FILE: src/gateway/channels/whatsapp/error.ts function safeStringify (line 3) | function safeStringify(value: unknown, limit = 800): string { function extractBoomDetails (line 37) | function extractBoomDetails(err: unknown): { function formatError (line 72) | function formatError(err: unknown): string { FILE: src/gateway/channels/whatsapp/inbound.ts constant LOG_PATH (line 19) | const LOG_PATH = dexterPath('gateway-debug.log'); function debugLog (line 20) | function debugLog(msg: string) { function extractMentionedJids (line 24) | function extractMentionedJids(message: WAMessage): string[] { function extractText (line 42) | function extractText(message: WAMessage): string { function toPhoneFromJid (line 91) | function toPhoneFromJid(jid: string): string { function jidToE164 (line 98) | function jidToE164(jid?: string | null): string | null { function monitorWebInbox (line 106) | async function monitorWebInbox(params: { FILE: src/gateway/channels/whatsapp/lid.ts type LidLookup (line 8) | type LidLookup = { function resolveJidToPhoneJid (line 19) | async function resolveJidToPhoneJid( FILE: src/gateway/channels/whatsapp/logger.ts type PinoLikeLogger (line 1) | type PinoLikeLogger = { function createSilentLogger (line 12) | function createSilentLogger(): PinoLikeLogger { FILE: src/gateway/channels/whatsapp/login.ts type LoginResult (line 5) | type LoginResult = { function extractPhoneFromJid (line 9) | function extractPhoneFromJid(jid: string | undefined): string | null { function getErrorStatusCode (line 18) | function getErrorStatusCode(err: unknown): number | undefined { function loginWhatsApp (line 25) | async function loginWhatsApp(params: { authDir: string }): Promise; function createWaSocket (line 15) | async function createWaSocket(params: { function waitForWaConnection (line 63) | async function waitForWaConnection(sock: WaSocket): Promise { function getStatusCode (line 79) | function getStatusCode(error: unknown): number | undefined { function isLoggedOutReason (line 86) | function isLoggedOutReason(error: unknown): boolean { FILE: src/gateway/channels/whatsapp/types.ts type WhatsAppInboundMessage (line 3) | type WhatsAppInboundMessage = { type WhatsAppCloseReason (line 27) | type WhatsAppCloseReason = { FILE: src/gateway/config.ts constant DEFAULT_GATEWAY_PATH (line 7) | const DEFAULT_GATEWAY_PATH = dexterPath('gateway.json'); type GatewayConfig (line 85) | type GatewayConfig = { type WhatsAppAccountConfig (line 123) | type WhatsAppAccountConfig = { function getGatewayConfigPath (line 135) | function getGatewayConfigPath(overridePath?: string): string { function loadGatewayConfig (line 139) | function loadGatewayConfig(overridePath?: string): GatewayConfig { function saveGatewayConfig (line 179) | function saveGatewayConfig(config: GatewayConfig, overridePath?: string)... function listWhatsAppAccountIds (line 188) | function listWhatsAppAccountIds(cfg: GatewayConfig): string[] { function resolveWhatsAppAccount (line 194) | function resolveWhatsAppAccount( FILE: src/gateway/extension-points.ts constant GATEWAY_EXTENSION_POINTS (line 11) | const GATEWAY_EXTENSION_POINTS = [ FILE: src/gateway/gateway.ts constant LOG_PATH (line 28) | const LOG_PATH = dexterPath('gateway-debug.log'); function debugLog (line 29) | function debugLog(msg: string) { type GatewayService (line 33) | type GatewayService = { function elide (line 38) | function elide(text: string, maxLen: number): string { function handleInbound (line 43) | async function handleInbound(cfg: GatewayConfig, inbound: WhatsAppInboun... function startGateway (line 206) | async function startGateway(params: { configPath?: string } = {}): Promi... FILE: src/gateway/group/history-buffer.ts type GroupHistoryEntry (line 6) | type GroupHistoryEntry = { constant MAX_ENTRIES_PER_GROUP (line 13) | const MAX_ENTRIES_PER_GROUP = 50; constant MAX_GROUPS (line 14) | const MAX_GROUPS = 200; function recordGroupMessage (line 21) | function recordGroupMessage(groupId: string, entry: GroupHistoryEntry): ... function getAndClearGroupHistory (line 44) | function getAndClearGroupHistory(groupId: string): GroupHistoryEntry[] { function formatGroupHistoryContext (line 54) | function formatGroupHistoryContext(params: { FILE: src/gateway/group/member-tracker.ts function noteGroupMember (line 12) | function noteGroupMember(groupId: string, senderId: string, displayName?... function formatGroupMembersList (line 27) | function formatGroupMembersList(params: { FILE: src/gateway/group/mention-detection.ts function isBotMentioned (line 4) | function isBotMentioned(params: { FILE: src/gateway/heartbeat/prompt.ts constant HEARTBEAT_MD_PATH (line 5) | const HEARTBEAT_MD_PATH = dexterPath('HEARTBEAT.md'); constant DEFAULT_CHECKLIST (line 7) | const DEFAULT_CHECKLIST = `- Major index moves (S&P 500, NASDAQ, Dow) — ... function loadHeartbeatDocument (line 14) | async function loadHeartbeatDocument(): Promise { function isHeartbeatContentEmpty (line 26) | function isHeartbeatContentEmpty(content: string): boolean { function buildHeartbeatQuery (line 46) | async function buildHeartbeatQuery(): Promise { FILE: src/gateway/heartbeat/runner.ts constant LOG_PATH (line 12) | const LOG_PATH = dexterPath('gateway-debug.log'); function debugLog (line 14) | function debugLog(msg: string) { function isWithinActiveHours (line 22) | function isWithinActiveHours(activeHours?: { function findTargetSession (line 61) | function findTargetSession(): SessionEntry | null { type HeartbeatRunner (line 73) | type HeartbeatRunner = { function startHeartbeatRunner (line 82) | function startHeartbeatRunner(params: { configPath?: string }): Heartbea... FILE: src/gateway/heartbeat/suppression.ts constant HEARTBEAT_OK_TOKEN (line 1) | const HEARTBEAT_OK_TOKEN = 'HEARTBEAT_OK'; type SuppressionReason (line 3) | type SuppressionReason = 'ok-token' | 'empty' | 'duplicate' | 'none'; type SuppressionResult (line 5) | type SuppressionResult = { type SuppressionState (line 11) | type SuppressionState = { constant DUPLICATE_WINDOW_MS (line 16) | const DUPLICATE_WINDOW_MS = 24 * 60 * 60 * 1000; function stripOkToken (line 22) | function stripOkToken(text: string): string { function isJustOkToken (line 32) | function isJustOkToken(text: string): boolean { function evaluateSuppression (line 40) | function evaluateSuppression( FILE: src/gateway/index.ts constant SUPPRESSED_PREFIXES (line 16) | const SUPPRESSED_PREFIXES = [ constant E164_RE (line 33) | const E164_RE = /^\+\d{7,15}$/; function promptSetupMode (line 35) | async function promptSetupMode(cfg: GatewayConfig, linkedPhone: string):... function run (line 95) | async function run(): Promise { FILE: src/gateway/routing/resolve-route.ts type RoutePeer (line 3) | type RoutePeer = { type ResolvedRoute (line 8) | type ResolvedRoute = { constant DEFAULT_AGENT_ID (line 17) | const DEFAULT_AGENT_ID = 'default'; constant DEFAULT_ACCOUNT_ID (line 18) | const DEFAULT_ACCOUNT_ID = 'default'; function normalizeToken (line 20) | function normalizeToken(value: string | null | undefined): string { function buildSessionKey (line 24) | function buildSessionKey(params: { function resolveRoute (line 40) | function resolveRoute(input: { FILE: src/gateway/sessions/store.ts type SessionEntry (line 5) | type SessionEntry = { type SessionStore (line 15) | type SessionStore = Record; function resolveSessionStorePath (line 17) | function resolveSessionStorePath(agentId: string): string { function loadSessionStore (line 22) | function loadSessionStore(path: string): SessionStore { function saveSessionStore (line 33) | function saveSessionStore(path: string, store: SessionStore): void { function upsertSessionMeta (line 41) | function upsertSessionMeta(params: { FILE: src/gateway/types.ts type InboundContext (line 1) | type InboundContext = { FILE: src/gateway/utils.ts function normalizeE164 (line 1) | function normalizeE164(number: string): string { function isSelfChatMode (line 11) | function isSelfChatMode( function cleanMarkdownForWhatsApp (line 47) | function cleanMarkdownForWhatsApp(text: string): string { function toWhatsappJid (line 56) | function toWhatsappJid(input: string): string { FILE: src/memory/chunker.ts function lineCount (line 4) | function lineCount(text: string): number { function tokenToCharBudget (line 11) | function tokenToCharBudget(tokens: number): number { type Paragraph (line 16) | type Paragraph = { function splitIntoParagraphs (line 22) | function splitIntoParagraphs(text: string): Paragraph[] { function hashContent (line 58) | function hashContent(content: string): string { function chunkMemoryText (line 62) | function chunkMemoryText(params: { function buildSnippet (line 141) | function buildSnippet(content: string, maxChars = 700): string { function estimateChunkTokens (line 149) | function estimateChunkTokens(chunk: MemoryChunk): number { function countLinesInChunk (line 153) | function countLinesInChunk(chunk: MemoryChunk): number { FILE: src/memory/database.ts type SqliteQuery (line 10) | type SqliteQuery = { type SqliteDatabase (line 16) | type SqliteDatabase = { type ChunkRow (line 22) | type ChunkRow = { type CacheRow (line 32) | type CacheRow = { constant CREATE_SCHEMA_SQL (line 36) | const CREATE_SCHEMA_SQL = ` function toBlob (line 71) | function toBlob(vector: number[]): Uint8Array { function fromBlob (line 76) | function fromBlob(blob: Uint8Array): number[] { function sanitizeFts5Query (line 82) | function sanitizeFts5Query(query: string): string { function cosineSimilarity (line 93) | function cosineSimilarity(a: number[], b: number[]): number { class MemoryDatabase (line 112) | class MemoryDatabase { method constructor (line 113) | private constructor(private readonly db: SqliteDatabase) {} method create (line 115) | static async create(path: string): Promise { method openSqlite (line 123) | private static async openSqlite(path: string): Promise { method openBetterSqlite3 (line 134) | private static async openBetterSqlite3(path: string): Promise; function resolveProvider (line 13) | function resolveProvider(preferred: EmbeddingProviderId): ResolvedProvid... function embedInBatches (line 39) | async function embedInBatches( function createEmbeddingClient (line 52) | function createEmbeddingClient(params: { function embedSingleQuery (line 102) | async function embedSingleQuery( FILE: src/memory/flush.ts constant MEMORY_FLUSH_TOKEN (line 5) | const MEMORY_FLUSH_TOKEN = 'NO_MEMORY_TO_FLUSH'; constant MEMORY_FLUSH_PROMPT (line 7) | const MEMORY_FLUSH_PROMPT = ` function shouldRunMemoryFlush (line 17) | function shouldRunMemoryFlush(params: { function runMemoryFlush (line 29) | async function runMemoryFlush(params: { FILE: src/memory/index.ts constant DEFAULT_CONFIG (line 16) | const DEFAULT_CONFIG: MemoryRuntimeConfig = { type MemorySettings (line 30) | type MemorySettings = { function resolveConfig (line 37) | function resolveConfig(): MemoryRuntimeConfig { class MemoryManager (line 45) | class MemoryManager { method get (line 48) | static async get(): Promise { method constructor (line 62) | private constructor(private readonly config: MemoryRuntimeConfig) {} method initialize (line 64) | async initialize(): Promise { method isAvailable (line 101) | isAvailable(): boolean { method getUnavailableReason (line 105) | getUnavailableReason(): string | null { method sync (line 112) | async sync(options?: { force?: boolean }): Promise { method search (line 120) | async search(query: string, options?: MemorySearchOptions): Promise { method appendLongTermMemory (line 152) | async appendLongTermMemory(text: string): Promise { method appendDailyMemory (line 158) | async appendDailyMemory(text: string): Promise { method editMemory (line 164) | async editMemory(file: string, oldText: string, newText: string): Prom... method deleteMemory (line 174) | async deleteMemory(file: string, textToDelete: string): Promise { method listFiles (line 191) | async listFiles(): Promise { method loadSessionContext (line 196) | async loadSessionContext(): Promise { method resolveFileAlias (line 201) | private resolveFileAlias(file: string): string { method getTodayFileName (line 207) | private getTodayFileName(): string { FILE: src/memory/indexer.ts class MemoryIndexer (line 7) | class MemoryIndexer { method constructor (line 13) | constructor( method markDirty (line 24) | markDirty(): void { method isDirty (line 28) | isDirty(): boolean { method startWatching (line 32) | startWatching(): void { method stopWatching (line 47) | stopWatching(): void { method sync (line 56) | async sync(options?: { force?: boolean }): Promise { method performSync (line 74) | private async performSync(options?: { force?: boolean }): Promise { method readMemoryFile (line 38) | async readMemoryFile(path: string): Promise { method writeMemoryFile (line 47) | async writeMemoryFile(path: string, content: string): Promise { method appendMemoryFile (line 53) | async appendMemoryFile(path: string, content: string): Promise { method editInMemoryFile (line 59) | async editInMemoryFile(path: string, oldText: string, newText: string)... method deleteFromMemoryFile (line 69) | async deleteFromMemoryFile(path: string, textToDelete: string): Promis... method listMemoryFiles (line 79) | async listMemoryFiles(): Promise { method readLines (line 89) | async readLines(options: MemoryReadOptions): Promise { method loadSessionContext (line 105) | async loadSessionContext(maxTokens: number): Promise(fn: () => Promise, provider: string, maxA... type ModelOpts (line 53) | interface ModelOpts { type ModelFactory (line 57) | type ModelFactory = (name: string, opts: ModelOpts) => BaseChatModel; function getApiKey (line 59) | function getApiKey(envVar: string): string { constant MODEL_FACTORIES (line 68) | const MODEL_FACTORIES: Record = { function getChatModel (line 132) | function getChatModel( type CallLlmOptions (line 142) | interface CallLlmOptions { type LlmResult (line 150) | interface LlmResult { function extractUsage (line 155) | function extractUsage(result: unknown): TokenUsage | undefined { function buildAnthropicMessages (line 188) | function buildAnthropicMessages(systemPrompt: string, userPrompt: string) { function callLlm (line 203) | async function callLlm(prompt: string, options: CallLlmOptions = {}): Pr... FILE: src/providers.ts type ProviderDef (line 6) | interface ProviderDef { constant PROVIDERS (line 19) | const PROVIDERS: ProviderDef[] = [ function resolveProvider (line 82) | function resolveProvider(modelName: string): ProviderDef { function getProviderById (line 92) | function getProviderById(id: string): ProviderDef | undefined { FILE: src/skills/loader.ts function parseSkillFile (line 15) | function parseSkillFile(content: string, path: string, source: SkillSour... function loadSkillFromPath (line 43) | function loadSkillFromPath(path: string, source: SkillSource): Skill { function extractSkillMetadata (line 56) | function extractSkillMetadata(path: string, source: SkillSource): { name... FILE: src/skills/registry.ts constant SKILL_DIRECTORIES (line 15) | const SKILL_DIRECTORIES: { path: string; source: SkillSource }[] = [ function scanSkillDirectory (line 31) | function scanSkillDirectory(dirPath: string, source: SkillSource): Skill... function discoverSkills (line 62) | function discoverSkills(): SkillMetadata[] { function getSkill (line 86) | function getSkill(name: string): Skill | undefined { function buildSkillMetadataSection (line 107) | function buildSkillMetadataSection(): string { function clearSkillCache (line 122) | function clearSkillCache(): void { FILE: src/skills/types.ts type SkillSource (line 6) | type SkillSource = 'builtin' | 'user' | 'project'; type SkillMetadata (line 12) | interface SkillMetadata { type Skill (line 27) | interface Skill extends SkillMetadata { FILE: src/tools/browser/browser.ts type SnapshotForAIResult (line 14) | interface SnapshotForAIResult { type PageWithSnapshotForAI (line 19) | interface PageWithSnapshotForAI extends Page { constant BROWSER_DESCRIPTION (line 27) | const BROWSER_DESCRIPTION = ` function ensureBrowser (line 136) | async function ensureBrowser(): Promise { function closeBrowser (line 150) | async function closeBrowser(): Promise { function parseRefsFromSnapshot (line 163) | function parseRefsFromSnapshot(snapshot: string): Map = { constant DEFAULT_TIMEOUT_SECONDS (line 7) | const DEFAULT_TIMEOUT_SECONDS = 30; constant DEFAULT_CACHE_TTL_MINUTES (line 8) | const DEFAULT_CACHE_TTL_MINUTES = 15; constant DEFAULT_CACHE_MAX_ENTRIES (line 9) | const DEFAULT_CACHE_MAX_ENTRIES = 100; function resolveTimeoutSeconds (line 11) | function resolveTimeoutSeconds(value: unknown, fallback: number): number { function resolveCacheTtlMs (line 16) | function resolveCacheTtlMs(value: unknown, fallbackMinutes: number): num... function normalizeCacheKey (line 22) | function normalizeCacheKey(value: string): string { function readCache (line 26) | function readCache( function writeCache (line 41) | function writeCache( function withTimeout (line 63) | function withTimeout(signal: AbortSignal | undefined, timeoutMs: number)... function readResponseText (line 89) | async function readResponseText(res: Response): Promise { FILE: src/tools/fetch/external-content.ts constant SUSPICIOUS_PATTERNS (line 12) | const SUSPICIOUS_PATTERNS = [ function detectSuspiciousPatterns (line 30) | function detectSuspiciousPatterns(content: string): string[] { constant EXTERNAL_CONTENT_START (line 44) | const EXTERNAL_CONTENT_START = "<<>>"; constant EXTERNAL_CONTENT_END (line 45) | const EXTERNAL_CONTENT_END = "<<>>"; constant EXTERNAL_CONTENT_WARNING (line 50) | const EXTERNAL_CONTENT_WARNING = ` type ExternalContentSource (line 63) | type ExternalContentSource = constant EXTERNAL_SOURCE_LABELS (line 72) | const EXTERNAL_SOURCE_LABELS: Record = { constant FULLWIDTH_ASCII_OFFSET (line 82) | const FULLWIDTH_ASCII_OFFSET = 0xfee0; constant FULLWIDTH_LEFT_ANGLE (line 83) | const FULLWIDTH_LEFT_ANGLE = 0xff1c; constant FULLWIDTH_RIGHT_ANGLE (line 84) | const FULLWIDTH_RIGHT_ANGLE = 0xff1e; function foldMarkerChar (line 86) | function foldMarkerChar(char: string): string { function foldMarkerText (line 103) | function foldMarkerText(input: string): string { function replaceMarkers (line 107) | function replaceMarkers(content: string): string { type WrapExternalContentOptions (line 149) | type WrapExternalContentOptions = { function wrapExternalContent (line 163) | function wrapExternalContent(content: string, options: WrapExternalConte... function wrapWebContent (line 194) | function wrapWebContent( FILE: src/tools/fetch/web-fetch-utils.ts type ExtractMode (line 1) | type ExtractMode = "markdown" | "text"; function decodeEntities (line 3) | function decodeEntities(value: string): string { function stripTags (line 15) | function stripTags(value: string): string { function normalizeWhitespace (line 19) | function normalizeWhitespace(value: string): string { function htmlToMarkdown (line 28) | function htmlToMarkdown(html: string): { text: string; title?: string } { function markdownToText (line 59) | function markdownToText(markdown: string): string { function truncateText (line 73) | function truncateText( function extractReadableContent (line 83) | async function extractReadableContent(params: { FILE: src/tools/fetch/web-fetch.ts constant WEB_FETCH_DESCRIPTION (line 41) | const WEB_FETCH_DESCRIPTION = ` constant DEFAULT_FETCH_MAX_CHARS (line 90) | const DEFAULT_FETCH_MAX_CHARS = 20_000; constant DEFAULT_FETCH_MAX_REDIRECTS (line 91) | const DEFAULT_FETCH_MAX_REDIRECTS = 3; constant DEFAULT_ERROR_MAX_CHARS (line 92) | const DEFAULT_ERROR_MAX_CHARS = 4_000; constant DEFAULT_FETCH_USER_AGENT (line 93) | const DEFAULT_FETCH_USER_AGENT = constant FETCH_CACHE (line 100) | const FETCH_CACHE = new Map>>(); constant WEB_FETCH_WRAPPER_WITH_WARNING_OVERHEAD (line 106) | const WEB_FETCH_WRAPPER_WITH_WARNING_OVERHEAD = wrapWebContent("", "web_... constant WEB_FETCH_WRAPPER_NO_WARNING_OVERHEAD (line 107) | const WEB_FETCH_WRAPPER_NO_WARNING_OVERHEAD = wrapExternalContent("", { function wrapWebFetchContent (line 112) | function wrapWebFetchContent( function wrapWebFetchField (line 163) | function wrapWebFetchField(value: string | undefined): string | undefined { function normalizeContentType (line 174) | function normalizeContentType(value: string | null | undefined): string ... function looksLikeHtml (line 183) | function looksLikeHtml(value: string): boolean { function formatWebFetchErrorDetail (line 192) | function formatWebFetchErrorDetail(params: { function resolveMaxChars (line 212) | function resolveMaxChars(value: unknown, fallback: number, cap: number):... function isRedirectStatus (line 222) | function isRedirectStatus(status: number): boolean { function fetchWithRedirects (line 226) | async function fetchWithRedirects(params: { function runWebFetch (line 280) | async function runWebFetch(params: { FILE: src/tools/filesystem/edit-file.ts constant EDIT_FILE_DESCRIPTION (line 17) | const EDIT_FILE_DESCRIPTION = ` FILE: src/tools/filesystem/read-file.ts constant READ_FILE_DESCRIPTION (line 10) | const READ_FILE_DESCRIPTION = ` FILE: src/tools/filesystem/sandbox.ts function resolveSandboxPath (line 5) | function resolveSandboxPath(params: { filePath: string; cwd: string; roo... function assertSandboxPath (line 24) | async function assertSandboxPath(params: { function assertNoSymlink (line 35) | async function assertNoSymlink(relativePath: string, root: string): Prom... FILE: src/tools/filesystem/utils/edit-diff.ts function detectLineEnding (line 3) | function detectLineEnding(content: string): '\r\n' | '\n' { function normalizeToLF (line 11) | function normalizeToLF(text: string): string { function restoreLineEndings (line 15) | function restoreLineEndings(text: string, ending: '\r\n' | '\n'): string { function normalizeForFuzzyMatch (line 19) | function normalizeForFuzzyMatch(text: string): string { type FuzzyMatchResult (line 30) | interface FuzzyMatchResult { function fuzzyFindText (line 38) | function fuzzyFindText(content: string, oldText: string): FuzzyMatchResu... function stripBom (line 73) | function stripBom(content: string): { bom: string; text: string } { function generateDiffString (line 77) | function generateDiffString( FILE: src/tools/filesystem/utils/path-utils.ts constant UNICODE_SPACES (line 5) | const UNICODE_SPACES = /[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g; function normalizeUnicodeSpaces (line 7) | function normalizeUnicodeSpaces(str: string): string { function fileExists (line 11) | function fileExists(filePath: string): boolean { function normalizeAtPrefix (line 20) | function normalizeAtPrefix(filePath: string): string { function expandPath (line 24) | function expandPath(filePath: string): string { function resolveToCwd (line 35) | function resolveToCwd(filePath: string, cwd: string): string { function resolveReadPath (line 43) | function resolveReadPath(filePath: string, cwd: string): string { FILE: src/tools/filesystem/utils/truncate.ts constant DEFAULT_MAX_LINES (line 1) | const DEFAULT_MAX_LINES = 2000; constant DEFAULT_MAX_BYTES (line 2) | const DEFAULT_MAX_BYTES = 50 * 1024; type TruncationResult (line 4) | interface TruncationResult { type TruncationOptions (line 17) | interface TruncationOptions { function formatSize (line 22) | function formatSize(bytes: number): string { function truncateHead (line 32) | function truncateHead(content: string, options: TruncationOptions = {}):... FILE: src/tools/filesystem/write-file.ts constant WRITE_FILE_DESCRIPTION (line 8) | const WRITE_FILE_DESCRIPTION = ` FILE: src/tools/finance/api.ts constant BASE_URL (line 4) | const BASE_URL = 'https://api.financialdatasets.ai'; type ApiResponse (line 6) | interface ApiResponse { function stripFieldsDeep (line 15) | function stripFieldsDeep(value: unknown, fields: readonly string[]): unk... function getApiKey (line 43) | function getApiKey(): string { function executeRequest (line 50) | async function executeRequest( method get (line 92) | async get( method post (line 130) | async post( FILE: src/tools/finance/filings.ts type FilingItemType (line 7) | interface FilingItemType { type FilingItemTypes (line 13) | interface FilingItemTypes { function getFilingItemTypes (line 24) | async function getFilingItemTypes(): Promise { FILE: src/tools/finance/fundamentals.ts constant REDUNDANT_FINANCIAL_FIELDS (line 6) | const REDUNDANT_FINANCIAL_FIELDS = ['accession_number', 'currency', 'per... function createParams (line 47) | function createParams(input: z.infer [t.name, t])); function buildRouterPrompt (line 80) | function buildRouterPrompt(): string { function createGetFinancials (line 129) | function createGetFinancials(model: string): DynamicStructuredTool { FILE: src/tools/finance/get-market-data.ts constant GET_MARKET_DATA_DESCRIPTION (line 13) | const GET_MARKET_DATA_DESCRIPTION = ` function formatSubToolName (line 48) | function formatSubToolName(name: string): string { constant MARKET_DATA_TOOLS (line 59) | const MARKET_DATA_TOOLS: StructuredToolInterface[] = [ constant MARKET_DATA_TOOL_MAP (line 74) | const MARKET_DATA_TOOL_MAP = new Map(MARKET_DATA_TOOLS.map(t => [t.name,... function buildRouterPrompt (line 77) | function buildRouterPrompt(): string { function createGetMarketData (line 124) | function createGetMarketData(model: string): DynamicStructuredTool { FILE: src/tools/finance/insider_trades.ts constant REDUNDANT_INSIDER_FIELDS (line 6) | const REDUNDANT_INSIDER_FIELDS = ['issuer'] as const; FILE: src/tools/finance/key-ratios.ts constant REDUNDANT_FINANCIAL_FIELDS (line 6) | const REDUNDANT_FINANCIAL_FIELDS = ['accession_number', 'currency', 'per... FILE: src/tools/finance/read-filings.ts constant READ_FILINGS_DESCRIPTION (line 14) | const READ_FILINGS_DESCRIPTION = ` function escapeTemplateVars (line 43) | function escapeTemplateVars(str: string): string { type FilingPlan (line 65) | type FilingPlan = z.infer; constant STEP2_TOOLS (line 68) | const STEP2_TOOLS: StructuredToolInterface[] = [ constant STEP2_TOOL_MAP (line 74) | const STEP2_TOOL_MAP = new Map(STEP2_TOOLS.map(t => [t.name, t])); function buildPlanPrompt (line 76) | function buildPlanPrompt(): string { function buildStep2Prompt (line 103) | function buildStep2Prompt( function createReadFilings (line 162) | function createReadFilings(model: string): DynamicStructuredTool { FILE: src/tools/finance/screen-stocks.ts constant SCREEN_STOCKS_DESCRIPTION (line 13) | const SCREEN_STOCKS_DESCRIPTION = ` function getScreenerMetrics (line 41) | async function getScreenerMetrics(): Promise> { type ScreenerFilters (line 61) | type ScreenerFilters = z.infer; function escapeTemplateVars (line 64) | function escapeTemplateVars(str: string): string { function buildScreenerPrompt (line 68) | function buildScreenerPrompt(metrics: Record): string { function createScreenStocks (line 105) | function createScreenStocks(model: string): DynamicStructuredTool { FILE: src/tools/finance/segments.ts constant REDUNDANT_FINANCIAL_FIELDS (line 6) | const REDUNDANT_FINANCIAL_FIELDS = ['accession_number', 'currency', 'per... FILE: src/tools/finance/stock-price.ts constant STOCK_PRICE_DESCRIPTION (line 6) | const STOCK_PRICE_DESCRIPTION = ` FILE: src/tools/heartbeat/heartbeat-tool.ts constant HEARTBEAT_MD_PATH (line 7) | const HEARTBEAT_MD_PATH = dexterPath('HEARTBEAT.md'); constant HEARTBEAT_TOOL_DESCRIPTION (line 9) | const HEARTBEAT_TOOL_DESCRIPTION = ` FILE: src/tools/memory/memory-get.ts constant MEMORY_GET_DESCRIPTION (line 6) | const MEMORY_GET_DESCRIPTION = ` FILE: src/tools/memory/memory-search.ts constant MEMORY_SEARCH_DESCRIPTION (line 6) | const MEMORY_SEARCH_DESCRIPTION = ` FILE: src/tools/memory/memory-update.ts constant MEMORY_UPDATE_DESCRIPTION (line 6) | const MEMORY_UPDATE_DESCRIPTION = ` function resolveDisplayName (line 120) | function resolveDisplayName(file: string): string { FILE: src/tools/registry.ts type RegisteredTool (line 21) | interface RegisteredTool { function getToolRegistry (line 37) | function getToolRegistry(model: string): RegisteredTool[] { function getTools (line 155) | function getTools(model: string): StructuredToolInterface[] { function buildToolDescriptions (line 166) | function buildToolDescriptions(model: string): string { FILE: src/tools/search/exa.ts function getExaTool (line 11) | function getExaTool(): { invoke: (query: string) => Promise } { FILE: src/tools/search/index.ts constant WEB_SEARCH_DESCRIPTION (line 5) | const WEB_SEARCH_DESCRIPTION = ` FILE: src/tools/search/perplexity.ts constant PERPLEXITY_API_URL (line 6) | const PERPLEXITY_API_URL = 'https://api.perplexity.ai/chat/completions'; constant SONAR_MODEL (line 7) | const SONAR_MODEL = 'sonar'; type PerplexitySearchResult (line 9) | interface PerplexitySearchResult { type PerplexityCompletionResponse (line 16) | interface PerplexityCompletionResponse { function callPerplexity (line 24) | async function callPerplexity(query: string): Promise { function xApiGet (line 47) | async function xApiGet(url: string): Promise { function parseTweets (line 68) | function parseTweets(raw: RawXResponse): XTweet[] { function parseSince (line 104) | function parseSince(since: string): string | null { function searchTweets (line 121) | async function searchTweets( function getProfile (line 167) | async function getProfile( function getThread (line 189) | async function getThread(conversationId: string): Promise { constant X_SEARCH_DESCRIPTION (line 311) | const X_SEARCH_DESCRIPTION = ` FILE: src/tools/skill.ts constant SKILL_TOOL_DESCRIPTION (line 10) | const SKILL_TOOL_DESCRIPTION = ` FILE: src/tools/types.ts type ToolResult (line 1) | interface ToolResult { function formatToolResult (line 6) | function formatToolResult(data: unknown, sourceUrls?: string[]): string { function parseSearchResults (line 19) | function parseSearchResults(result: unknown): { parsed: unknown; urls: s... FILE: src/types.ts type WorkingState (line 3) | type WorkingState = type HistoryItemStatus (line 9) | type HistoryItemStatus = 'processing' | 'complete' | 'error' | 'interrup... type HistoryItem (line 11) | interface HistoryItem { FILE: src/utils/ai-message.ts function extractTextContent (line 6) | function extractTextContent(message: AIMessage): string { function hasToolCalls (line 24) | function hasToolCalls(message: AIMessage): boolean { FILE: src/utils/cache.test.ts constant TEST_CACHE_DIR (line 6) | const TEST_CACHE_DIR = '.dexter/cache'; FILE: src/utils/cache.ts type CacheEntry (line 24) | interface CacheEntry { constant CACHE_DIR (line 32) | const CACHE_DIR = dexterPath('cache'); function describeRequest (line 44) | function describeRequest( function buildCacheKey (line 66) | function buildCacheKey( function isValidCacheEntry (line 97) | function isValidCacheEntry(value: unknown): value is CacheEntry { function removeCacheFile (line 113) | function removeCacheFile(filepath: string): void { function readCache (line 129) | function readCache( function writeCache (line 167) | function writeCache( FILE: src/utils/config.ts constant SETTINGS_FILE (line 5) | const SETTINGS_FILE = dexterPath('settings.json'); constant MODEL_TO_PROVIDER_MAP (line 8) | const MODEL_TO_PROVIDER_MAP: Record = { constant DEPRECATED_MODEL_UPGRADES (line 16) | const DEPRECATED_MODEL_UPGRADES: Record = { type Config (line 20) | interface Config { function loadConfig (line 33) | function loadConfig(): Config { function saveConfig (line 54) | function saveConfig(config: Config): boolean { function migrateModelToProvider (line 71) | function migrateModelToProvider(config: Config): Config { function getSetting (line 91) | function getSetting(key: string, defaultValue: T): T { function setSetting (line 102) | function setSetting(key: string, value: unknown): boolean { FILE: src/utils/env.ts function getApiKeyNameForProvider (line 8) | function getApiKeyNameForProvider(providerId: string): string | undefined { function getProviderDisplayName (line 12) | function getProviderDisplayName(providerId: string): string { function checkApiKeyExistsForProvider (line 16) | function checkApiKeyExistsForProvider(providerId: string): boolean { function checkApiKeyExists (line 22) | function checkApiKeyExists(apiKeyName: string): boolean { function saveApiKeyToEnv (line 49) | function saveApiKeyToEnv(apiKeyName: string, apiKeyValue: string): boole... function saveApiKeyForProvider (line 97) | function saveApiKeyForProvider(providerId: string, apiKey: string): bool... FILE: src/utils/errors.ts type ApiErrorInfo (line 1) | interface ApiErrorInfo { type ErrorType (line 9) | type ErrorType = type ErrorPattern (line 18) | type ErrorPattern = RegExp | string; constant ERROR_PATTERNS (line 20) | const ERROR_PATTERNS = { constant CHINESE_CONTEXT_OVERFLOW (line 79) | const CHINESE_CONTEXT_OVERFLOW = ['上下文过长', '上下文超出', '超出最大上下文']; constant ERROR_PAYLOAD_PREFIX_RE (line 80) | const ERROR_PAYLOAD_PREFIX_RE = /^\[[\w\s]+\]\s*|^(?:error|api\s*error)[... constant HTTP_STATUS_PREFIX_RE (line 81) | const HTTP_STATUS_PREFIX_RE = /^(\d{3})\s+(.+)$/s; function parseApiErrorInfo (line 83) | function parseApiErrorInfo(raw?: string): ApiErrorInfo | null { function matchesPatterns (line 148) | function matchesPatterns(raw: string, patterns: readonly ErrorPattern[])... function isContextOverflowError (line 155) | function isContextOverflowError(raw?: string): boolean { function isRateLimitError (line 187) | function isRateLimitError(raw?: string): boolean { function isBillingError (line 191) | function isBillingError(raw?: string): boolean { function isAuthError (line 195) | function isAuthError(raw?: string): boolean { function isTimeoutError (line 199) | function isTimeoutError(raw?: string): boolean { function isOverloadedError (line 203) | function isOverloadedError(raw?: string): boolean { function classifyError (line 207) | function classifyError(raw?: string): ErrorType { function isNonRetryableError (line 220) | function isNonRetryableError(raw?: string): boolean { function formatUserFacingError (line 225) | function formatUserFacingError(raw: string, provider?: string): string { FILE: src/utils/history-context.ts constant HISTORY_CONTEXT_MARKER (line 1) | const HISTORY_CONTEXT_MARKER = '[Chat history for context]'; constant CURRENT_MESSAGE_MARKER (line 2) | const CURRENT_MESSAGE_MARKER = '[Current message - respond to this]'; constant DEFAULT_HISTORY_LIMIT (line 3) | const DEFAULT_HISTORY_LIMIT = 10; constant FULL_ANSWER_TURNS (line 4) | const FULL_ANSWER_TURNS = 3; type HistoryEntry (line 6) | interface HistoryEntry { function buildHistoryContext (line 11) | function buildHistoryContext(params: { FILE: src/utils/in-memory-chat-history.ts type Message (line 13) | interface Message { constant MESSAGE_SUMMARY_SYSTEM_PROMPT (line 30) | const MESSAGE_SUMMARY_SYSTEM_PROMPT = `You are a concise summarizer. Gen... constant MESSAGE_SELECTION_SYSTEM_PROMPT (line 36) | const MESSAGE_SELECTION_SYSTEM_PROMPT = `You are a relevance evaluator. ... class InMemoryChatHistory (line 43) | class InMemoryChatHistory { method constructor (line 49) | constructor(model: string = DEFAULT_MODEL, maxTurns: number = DEFAULT_... method hashQuery (line 57) | private hashQuery(query: string): string { method setModel (line 64) | setModel(model: string): void { method generateSummary (line 71) | private async generateSummary(query: string, answer: string): Promise<... method saveUserQuery (line 95) | saveUserQuery(query: string): void { method saveAnswer (line 111) | async saveAnswer(answer: string): Promise { method selectRelevantMessages (line 126) | async selectRelevantMessages(currentQuery: string): Promise { method formatForPlanning (line 180) | formatForPlanning(messages: Message[]): string { method formatForAnswerGeneration (line 193) | formatForAnswerGeneration(messages: Message[]): string { method getMessages (line 206) | getMessages(): Message[] { method getUserMessages (line 213) | getUserMessages(): string[] { method getRecentTurns (line 221) | getRecentTurns(limit: number = this.maxTurns): HistoryEntry[] { method hasMessages (line 246) | hasMessages(): boolean { method pruneLastTurn (line 254) | pruneLastTurn(): void { method clear (line 264) | clear(): void { FILE: src/utils/input-key-handlers.ts type CursorContext (line 14) | interface CursorContext { FILE: src/utils/logger.ts type LogLevel (line 1) | type LogLevel = 'debug' | 'info' | 'warn' | 'error'; type LogEntry (line 3) | interface LogEntry { type LogSubscriber (line 11) | type LogSubscriber = (logs: LogEntry[]) => void; class DebugLogger (line 13) | class DebugLogger { method emit (line 18) | private emit() { method add (line 22) | private add(level: LogLevel, message: string, data?: unknown) { method debug (line 37) | debug(message: string, data?: unknown) { method info (line 41) | info(message: string, data?: unknown) { method warn (line 45) | warn(message: string, data?: unknown) { method error (line 49) | error(message: string, data?: unknown) { method subscribe (line 53) | subscribe(fn: LogSubscriber): () => void { method clear (line 59) | clear() { FILE: src/utils/long-term-chat-history.ts type ConversationEntry (line 10) | interface ConversationEntry { type MessagesFile (line 17) | interface MessagesFile { constant MESSAGES_DIR (line 21) | const MESSAGES_DIR = 'messages'; constant MESSAGES_FILE (line 22) | const MESSAGES_FILE = 'chat_history.json'; class LongTermChatHistory (line 29) | class LongTermChatHistory { method constructor (line 34) | constructor(baseDir: string = process.cwd()) { method load (line 42) | async load(): Promise { method save (line 67) | private async save(): Promise { method addUserMessage (line 82) | async addUserMessage(message: string): Promise { method updateAgentResponse (line 103) | async updateAgentResponse(response: string): Promise { method getMessages (line 117) | getMessages(): ConversationEntry[] { method getMessageStrings (line 126) | getMessageStrings(): string[] { FILE: src/utils/markdown-table.ts constant BOX (line 11) | const BOX = { function isNumeric (line 28) | function isNumeric(value: string): boolean { function parseMarkdownTable (line 37) | function parseMarkdownTable(tableText: string): { headers: string[]; row... function renderBoxTable (line 90) | function renderBoxTable(headers: string[], rows: string[][]): string { function transformMarkdownTables (line 166) | function transformMarkdownTables(content: string): string { function transformBold (line 213) | function transformBold(content: string): string { function formatResponse (line 222) | function formatResponse(content: string): string { FILE: src/utils/model.ts type Model (line 3) | interface Model { type Provider (line 8) | interface Provider { constant PROVIDER_MODELS (line 14) | const PROVIDER_MODELS: Record = { constant PROVIDERS (line 38) | const PROVIDERS: Provider[] = PROVIDER_DEFS.map((provider) => ({ function getModelsForProvider (line 44) | function getModelsForProvider(providerId: string): Model[] { function getModelIdsForProvider (line 49) | function getModelIdsForProvider(providerId: string): string[] { function getDefaultModelForProvider (line 53) | function getDefaultModelForProvider(providerId: string): string | undefi... function getModelDisplayName (line 58) | function getModelDisplayName(modelId: string): string { FILE: src/utils/ollama.ts type OllamaModel (line 5) | interface OllamaModel { type OllamaTagsResponse (line 11) | interface OllamaTagsResponse { function getOllamaModels (line 18) | async function getOllamaModels(): Promise { FILE: src/utils/paths.ts constant DEXTER_DIR (line 3) | const DEXTER_DIR = '.dexter'; function getDexterDir (line 5) | function getDexterDir(): string { function dexterPath (line 9) | function dexterPath(...segments: string[]): string { FILE: src/utils/progress-channel.ts type ProgressChannel (line 8) | interface ProgressChannel { function createProgressChannel (line 28) | function createProgressChannel(): ProgressChannel { FILE: src/utils/text-navigation.ts function findPrevWordStart (line 5) | function findPrevWordStart(text: string, pos: number): number { function findNextWordEnd (line 19) | function findNextWordEnd(text: string, pos: number): number { function getLineAndColumn (line 37) | function getLineAndColumn(text: string, pos: number): { line: number; co... function getCursorPosition (line 50) | function getCursorPosition(text: string, line: number, column: number): ... function getLineStart (line 63) | function getLineStart(text: string, pos: number): number { function getLineEnd (line 71) | function getLineEnd(text: string, pos: number): number { function getLineCount (line 79) | function getLineCount(text: string): number { FILE: src/utils/thinking-verbs.ts constant THINKING_VERBS (line 1) | const THINKING_VERBS = [ function getRandomThinkingVerb (line 16) | function getRandomThinkingVerb(): string { FILE: src/utils/tokens.ts function estimateTokens (line 11) | function estimateTokens(text: string): number { constant TOKEN_BUDGET (line 19) | const TOKEN_BUDGET = 150_000; constant CONTEXT_THRESHOLD (line 30) | const CONTEXT_THRESHOLD = 100_000; constant KEEP_TOOL_USES (line 36) | const KEEP_TOOL_USES = 5; FILE: src/utils/tool-description.ts function getToolDescription (line 9) | function getToolDescription(toolName: string, args: Record