Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/canwhite/Krebs
/ functions
Functions
345 in github.com/canwhite/Krebs
⨍
Functions
345
◇
Types & classes
122
↓ 1 callers
Method
withLock
(fn: () => Promise<T>)
tools/lua-runtime.ts:27
Function
App
()
frontend/chat.tsx:144
Function
abortAgent
( parentSessionId: string, agentId: string )
server/services/subagent/agent-manager.ts:172
Method
addJob
* Add a scheduled job
server/services/subagent/scheduler.ts:33
Function
areAllDone
(records: Map<string, { status: string }>)
server/services/subagent/group-join.ts:177
Function
bm25Search
( index: SearchIndex, queryTokens: string[], excludeSessionId: string, topK: number = 5 )
server/services/session-history/bm25.ts:88
Function
calculateBoundary
* 计算压缩边界(基于 index) * @param messages AgentMessage[] - 完整消息数组 * @param latestAnchor 上次 collapse 的 SummaryAnchor(如果有)
server/services/compact/contextCollapse.ts:56
Method
canCheckDrift
* Check if drift detection is possible
server/services/goal-constraint/engine.ts:144
Method
cancel
* Cancel waiting
server/services/subagent/group-join.ts:137
Function
charNgram
(text: string, min = 2, max = 4)
server/services/goal-constraint/embedding.ts:125
Function
checkDiskSpace
()
server/services/session-manager/session-cleaner.ts:293
Method
checkTokenThresholds
* Check if any token threshold has been reached
server/services/goal-constraint/engine.ts:26
Function
cleanupAgents
(parentSessionId: string)
server/services/subagent/agent-manager.ts:267
Method
clear
()
server/services/subagent/session-cache.ts:27
Method
clear
* Clear all memories
server/services/subagent/memory.ts:68
Function
clearChat
()
frontend/chat.tsx:657
Function
clearRegistry
()
tools/lua-tools-registry.ts:71
Method
clearSession
* Clear all data for a session (for testing or cleanup)
server/services/goal-constraint/storage.ts:167
Function
clearSkillCache
()
server/services/subagent/skill-loader.ts:215
Function
clearSkillCacheForDir
(agentDir: string)
server/services/subagent/skill-loader.ts:222
Function
clearSubagentMemory
(sessionId: string)
server/services/subagent/memory.ts:183
Function
close
(ws: any)
server/index.ts:334
Method
close
* 关闭日志流
lib/logger.ts:80
Function
consolidate
( messages: AgentMessage[], ctx: ExtensionContext, api: ExtensionAPI )
server/services/memory/engine.ts:95
Method
consolidate
( messages: AgentMessage[], ctx: ExtensionContext, api: ExtensionAPI )
server/services/memory/engine.ts:86
Method
constructor
(name?: string)
lib/logger.ts:39
Method
constructor
( private ws: any, private logger: { log: (msg: string) => void }, private state: SharedState, )
server/event-subscription.ts:22
Method
constructor
( private ws: any, private logger: { log: (msg: string) => void }, )
server/event-subscription.ts:122
Method
constructor
( private ws: any, private logger: { log: (msg: string) => void }, private state: SharedState,
server/event-subscription.ts:164
Method
constructor
(parentSessionId: string, options: GroupJoinOptions)
server/services/subagent/group-join.ts:22
Method
constructor
(parentSessionId: string)
server/services/subagent/fleet-view.ts:17
Method
constructor
(parentCwd: string)
server/services/subagent/worktree.ts:17
Method
constructor
( parentSessionId: string, executeFn: (task: string, options?: AgentOptions) => Promise<string> )
server/services/subagent/scheduler.ts:22
Method
constructor
(session: AgentSession, parentMemoryKey: string)
server/services/subagent/memory.ts:19
Method
constructor
( private sessionId: string, private ctx: ExtensionContext )
server/services/goal-constraint/engine.ts:18
Method
constructor
()
server/services/session-manager/lru-session-manager.ts:37
Function
createAgent
( parentSessionId: string, task: string, type: string, cwd: string, options?: AgentOptions, ctx?:
server/services/subagent/agent-manager.ts:50
Function
createContextCollapser
(config: Partial<ContextCollapseConfig> = {})
server/services/compact/contextCollapse.ts:38
Function
createFleetView
(parentSessionId: string)
server/services/subagent/fleet-view.ts:81
Function
createMemoryConsolidationEngine
()
server/services/memory/engine.ts:93
Function
createMicroCompact
(config: Partial<MicroCompactConfig> = {})
server/services/compact/microCompact.ts:22
Function
createProjection
* 创建投影(在内存中,不修改底层)
server/services/compact/contextCollapse.ts:88
Function
createRuntimeFactory
( options )
server/session-service.ts:68
Function
createWorktreeManager
(cwd: string)
server/services/subagent/worktree.ts:207
Method
detectDrift
* Detect drift in recent messages
server/services/goal-constraint/engine.ts:64
Function
emergencyCleanup
(count: number = 5)
server/services/session-manager/session-cleaner.ts:241
Function
emit
(event: string, data: any, ctx: any)
test/self-verification.test.ts:141
Function
execute
( script: string, params?: Record<string, unknown> )
tools/lua-runtime.ts:144
Function
execute
( _toolCallId: string, params: { command: string }, signal: AbortSignal | undefined, o
server/sandbox/tools/bash.ts:70
Function
extensionsOverride
(base: any)
server/agent-runner.ts:37
Function
extractAssistantContent
* Extract content from an assistant message
server/services/session-manager/session-cleaner.ts:38
Function
extractAssistantContent
( filePath: string, maxChars: number = 1000 )
server/services/session-history/storage.ts:44
Method
extractKeywords
* Extract keywords from text (top 20, stopword filtered)
server/services/goal-constraint/semantic.ts:14
Function
extractMemoryContent
(messages: AgentMessage[])
server/services/subagent/memory.ts:134
Function
findToolResultsToPrune
* 扫描并返回需要 truncate 的 tool results
server/services/compact/microCompact.ts:49
Method
generateCorrectionMessage
* Generate correction message for drifted conversation
server/services/goal-constraint/engine.ts:119
Method
generateGoalSummary
* Generate goal summary (LLM preferred, fallback to heuristics)
server/services/goal-constraint/engine.ts:44
Function
generateSummary
* 生成摘要(调 LLM)
server/services/compact/contextCollapse.ts:116
Function
getAgentByName
( cwd: string, name: string )
server/services/subagent/custom-agents.ts:169
Function
getAgentResult
( parentSessionId: string, agentId: string )
server/services/subagent/agent-manager.ts:121
Method
getAll
* Get all memory entries
server/services/subagent/memory.ts:39
Method
getAllGoalSummaries
* Get all goal summaries for a session
server/services/goal-constraint/storage.ts:111
Function
getAllLuaTools
()
tools/lua-tools-registry.ts:57
Function
getConfig
()
server/services/compact/microCompact.ts:125
Function
getConfig
()
server/services/compact/contextCollapse.ts:181
Method
getContextString
* Get memories formatted for context injection
server/services/subagent/memory.ts:46
Method
getGoalSummaryForThreshold
* Get goal summary for a specific threshold in a session
server/services/goal-constraint/storage.ts:92
Method
getLatestGoalSummary
* Get the latest goal summary for a session
server/services/goal-constraint/storage.ts:73
Method
getLatestSummary
* Get the latest goal summary
server/services/goal-constraint/engine.ts:137
Function
getLatestSummaryAnchor
(entries: any[])
server/services/compact/contextCollapse.ts:202
Method
getNextRun
* Get next run time for a job
server/services/subagent/scheduler.ts:91
Method
getPendingCount
* Get pending count
server/services/subagent/group-join.ts:154
Method
getResults
* Get current results
server/services/subagent/group-join.ts:147
Method
getSessionIds
* Get all session IDs
server/services/session-manager/lru-session-manager.ts:112
Function
getSkillByName
( agentDir: string, cwd: string, name: string )
server/services/subagent/skill-loader.ts:185
Function
getSkillByName
(name: string)
skills/index.ts:99
Function
getSkillNames
()
skills/index.ts:106
Function
getSubagentMemory
( session: AgentSession, parentMemoryKey: string = "default" )
server/services/subagent/memory.ts:124
Method
getThresholdStatus
* Get threshold hit status for a session
server/services/goal-constraint/storage.ts:138
Function
getWorktreeBranch
(cwd: string)
server/services/subagent/worktree.ts:232
Function
handle
(ws: WebSocket, message: { type: "switch_session"; sessionId: string })
server/handlers/SwitchSessionHandler.ts:17
Function
handle
(ws: WebSocket, message: { type: "prompt"; message: string })
server/handlers/PromptHandler.ts:15
Method
handle
(ws: WebSocket, message: { type: "switch_session"; sessionId: string })
server/handlers/SwitchSessionHandler.ts:12
Function
handleClickOutside
(event: MouseEvent)
frontend/chat.tsx:589
Function
handleFocus
()
frontend/chat.tsx:531
Function
handleKeyDown
(e: any)
frontend/chat.tsx:646
Function
handleMessage
(ws: WebSocket, rawMessage: string | Buffer)
server/ws-router.ts:25
Function
handleScroll
()
frontend/chat.tsx:552
Function
handleStopClick
()
frontend/chat.tsx:636
Function
hasChinese
(text: string)
server/services/goal-constraint/embedding.ts:118
Method
hasSession
* Check if session exists
server/services/session-manager/lru-session-manager.ts:105
Method
hasThresholdBeenHit
* Check if a specific threshold has been hit
server/services/goal-constraint/storage.ts:156
Function
initialize
()
tools/lua-runtime.ts:76
Method
isDebugEnabled
()
lib/logger.ts:27
Method
isDebugEnabled
* 检查是否启用 DEBUG 模式
lib/logger.ts:91
Function
isFileDeleting
(filePath: string)
server/services/session-manager/session-cleaner.ts:57
Function
isReady
()
tools/lua-runtime.ts:140
Function
isValidCron
(expression: string)
server/services/subagent/scheduler.ts:346
Function
isWorktree
(cwd: string)
server/services/subagent/worktree.ts:214
Method
keywordMatchRate
* Calculate keyword match rate between message tokens and goal keywords
server/services/goal-constraint/semantic.ts:34
← previous
next →
201–300 of 345, ranked by callers