Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HerSophia/TavernHeadless
/ functions
Functions
8,237 in github.com/HerSophia/TavernHeadless
⨍
Functions
8,237
◇
Types & classes
2,308
↓ 36 callers
Method
commit
(context: RuntimeJobCommitContext<TPayload, TPrepared>)
apps/api/src/services/runtime-job-types.ts:149
↓ 36 callers
Function
getOpenApiResponseExample
(operation: OpenApiOperation | undefined, statusCode: string)
apps/api/test/openapi.integration.test.ts:82
↓ 35 callers
Function
createStore
()
packages/core/src/memory/__tests__/memory-store.test.ts:124
↓ 35 callers
Method
enqueue
( envelope: RuntimeMutationEnvelope<TPayload>, options: MutationAsyncEnqueueOptions<TPayload>, )
apps/api/src/services/runtime-mutation-types.ts:127
↓ 35 callers
Method
error
(obj: unknown, message?: string)
apps/api/src/services/memory-worker.ts:17
↓ 35 callers
Function
makeDeps
(overrides: Partial<TurnOrchestratorDeps> = {})
packages/core/src/orchestration/__tests__/turn-orchestrator.test.ts:98
↓ 35 callers
Function
narratorNode
* NG2-7:Agent 承载节点「执行来源二选一」的 core 契约用例。 * * 覆盖(设计 §3.2 / §3.3 / §4.1): * - resolveNodeGraphAgentSource 推断表全分支(缺省 + 无 ref / presetRef / subgraphRef;
packages/core/src/node-graph/__tests__/agent-source.test.ts:22
↓ 34 callers
Method
append
* 追加一条信封到对应 run。无 `runId` 的信封被忽略(防御,RealtimeRunLog 已过滤)。 * 超过单 run 条数上限时 FIFO 淘汰最旧,minSeq 随之前移。
apps/api/src/realtime/run-log/run-event-buffer.ts:104
↓ 33 callers
Method
applyStagedMutationsForFloor
(input: { accountId: string; sessionId: string; branchId: string; floorId: string; committ
apps/api/src/session-state/session-state-service.ts:504
↓ 33 callers
Method
getDetail
(id: string, accountId: string)
apps/api/src/services/variables/variable-service.ts:312
↓ 33 callers
Function
jsonResponse
(body: unknown, status = 200)
packages/official-integration-kit/sdk/src/__tests__/remaining-resources.test.ts:7
↓ 33 callers
Function
listEntries
(app: FastifyInstance, wbId: string, query = "")
apps/api/test/worldbook-entries.test.ts:165
↓ 33 callers
Function
makeStdioInput
(overrides: Partial<CreateMcpServerInput> = {})
apps/api/src/mcp/__tests__/mcp-service.test.ts:35
↓ 33 callers
Function
toPromptAssetOperationRef
( kind: PromptAssetOperationKind, row: PromptAssetOperationRow, version?: PromptAssetVersionOperationRow
apps/api/src/services/prompt-asset-operation-log.ts:62
↓ 32 callers
Function
applyRegexScripts
( text: string, scripts: STRegexScript[], placement: number, context?: RegexContext, )
packages/adapters-sillytavern/src/regex/regex-engine.ts:224
↓ 32 callers
Function
assemblePrompt
( db: AppDb, accountId: string, session: SessionPromptInfo, chatHistory: ChatMessage[], userMessage:
apps/api/src/services/prompt-assembler.ts:765
↓ 32 callers
Function
buildMemoryRuntimeScopeKey
(scope: MemoryScope, scopeId: string)
apps/api/src/services/memory-runtime-job-definitions.ts:109
↓ 32 callers
Function
buildOperationLogAction
( domain: RuntimeGovernanceOperationDomain, action: string, )
apps/api/src/services/governance/operation-log-names.ts:76
↓ 32 callers
Function
define
(entry: NodeTypeRegistryEntry)
packages/core/src/node-graph/registry.ts:73
↓ 31 callers
Function
buildListMeta
(input: { total: number; limit: number; offset: number; sortBy: string; sortOrder: SortOrder; })
apps/api/src/lib/pagination.ts:18
↓ 31 callers
Function
makeContext
()
apps/api/src/tools/__tests__/node-graph-tool-provider.test.ts:89
↓ 30 callers
Method
getWindow
返回某个 run 的当前补发窗口
apps/api/src/realtime/run-log/run-log.ts:147
↓ 30 callers
Function
readPromptRuntimePolicySource
(value: unknown)
packages/official-integration-kit/sdk/src/resources/prompt-runtime.ts:2519
↓ 30 callers
Method
upsertConfig
( accountId: string, scope: LlmInstanceScope, scopeId: string, slot: LlmInstanceSlot, inpu
apps/api/src/services/llm-instance-service.ts:164
↓ 29 callers
Function
handleClientDataError
(error: unknown, reply: any)
apps/api/src/client-data/client-data-routes.ts:1573
↓ 29 callers
Function
makeHandler
( type: string, execute: NodeGraphNodeHandler["execute"], )
apps/api/src/services/node-graph-runtime/handlers/builtin.ts:99
↓ 29 callers
Function
makeScript
Helper to create a minimal regex script
packages/adapters-sillytavern/src/__tests__/regex-engine.test.ts:8
↓ 29 callers
Method
register
(handler: BackgroundAgentHandler)
apps/api/src/services/agent-runtime/background-agent-executor.ts:59
↓ 29 callers
Method
register
(handler: NodeGraphNodeHandler)
apps/api/src/services/node-graph-runtime/node-handler-registry.ts:104
↓ 28 callers
Method
add
( scope: VariableScope, scopeId: string, key: string, value: unknown, accountId?: string
packages/core/src/variables/__tests__/variable-resolver.test.ts:30
↓ 28 callers
Method
add
(floor: FloorEntity)
packages/core/src/floor/__tests__/floor-state-machine.test.ts:34
↓ 28 callers
Method
createError
(code: string, message: string, cause?: unknown, details?: unknown)
apps/api/src/services/chat/chat-service.ts:238
↓ 28 callers
Function
createTestApp
(overrides?: { config?: Partial<typeof clientDataConfig>; })
apps/api/src/client-data/__tests__/client-data-routes.test.ts:31
↓ 28 callers
Function
createUser
(app: FastifyInstance, name: string, description = "desc")
apps/api/test/users.integration.test.ts:38
↓ 28 callers
Function
makeFloor
(overrides: Partial<FloorEntity> = {})
packages/core/src/floor/__tests__/floor-state-machine.test.ts:11
↓ 28 callers
Method
stageCommitBoundValue
(input: { accountId: string; sessionId: string; branchId: string; sourceFloorId: string; n
apps/api/src/session-state/session-state-service.ts:88
↓ 27 callers
Function
hasField
(record: Record<string, unknown>, field: string)
packages/official-integration-kit/sdk/src/resources/backup-shared.ts:189
↓ 27 callers
Method
registerNamespace
(input: { accountId: string; sessionId: string; namespace: SessionStateNamespace; logicalOwner
apps/api/src/session-state/session-state-custom-namespace-service.ts:93
↓ 27 callers
Function
section
( name: string, messages: { role: 'system' | 'user' | 'assistant'; content: string; prunable?: boolean; pr
packages/core/src/prompt/__tests__/message-builder.test.ts:25
↓ 27 callers
Method
stop
停止监听事件
apps/api/src/ws/ws-bridge.ts:120
↓ 26 callers
Method
ensure
( tx: DbExecutor, ref: RuntimeScopeRef, now: number, )
apps/api/src/services/runtime-scope-state-repository.ts:44
↓ 26 callers
Method
findById
根据 ID 查找楼层
packages/core/src/ports/floor-repository.ts:10
↓ 26 callers
Function
makeToolPermissions
(overrides: Partial<ToolPermissions> = {})
packages/core/src/orchestration/__tests__/turn-orchestrator.test.ts:788
↓ 26 callers
Function
readString
(value: unknown)
apps/api/src/services/node-graph-runtime/handlers/handler-io.ts:12
↓ 26 callers
Function
record
(over: Partial<TemporaryConversationRecord> = {})
apps/studio/src/stores/graph-assistant.test.ts:62
↓ 26 callers
Function
requireAccountId
(context: ToolExecutionContext)
apps/api/src/tools/resource-tool-provider.ts:872
↓ 26 callers
Function
requireString
(value: unknown, fieldName: string)
apps/api/src/tools/node-graph-tool-provider.ts:743
↓ 26 callers
Method
sessionStateRepository
(executor: AppDb | DbExecutor)
apps/api/src/session-state/session-state-service.ts:1746
↓ 26 callers
Function
tavernData
(nodes: GraphFlowNode[], id: string)
apps/studio/src/modules/graph/canvas/map-document.test.ts:21
↓ 26 callers
Function
writeSse
(rawReply: ServerResponse, event: string, data: unknown)
apps/api/src/routes/chat/sse-writer.ts:3
↓ 25 callers
Function
createFloor
(args: { branchId?: string; floorNo: number; parentFloorId?: string; sessionId: string; st
apps/api/test/unified-vc-phase4.integration.test.ts:47
↓ 25 callers
Function
forEachSerial
( items: readonly T[], iteratee: (item: T, index: number) => MaybePromise<void>, )
packages/core/src/memory/memory-mutation-applier.ts:123
↓ 25 callers
Function
makeContext
(overrides: Partial<ToolExecutionContext> = {})
packages/core/src/tools/__tests__/tool-executor.test.ts:40
↓ 25 callers
Function
makePermissions
(overrides: Partial<ToolPermissions> = {})
packages/core/src/tools/__tests__/tool-executor.test.ts:51
↓ 25 callers
Function
makeSnapshot
( runId: string, floorId: string, sessionId: string, status: FloorRunStatus = 'running', )
apps/api/src/realtime/resume/__tests__/resume-coordinator.test.ts:52
↓ 25 callers
Function
readOptionalString
(value: unknown)
packages/official-integration-kit/sdk/src/stream/read-sse.ts:413
↓ 25 callers
Function
validateGraphDocument
(document: NodeGraphDocument)
apps/studio/src/modules/graph/validate/local-validation.ts:51
↓ 24 callers
Function
buildClientDataHeaders
( accountId?: AccountIdHint, callerOwner?: ClientDataCallerOwner, )
packages/official-integration-kit/sdk/src/resources/client-data.ts:344
↓ 24 callers
Function
buildMemoryEventContextPayload
(args: { scope: MemoryScope; scopeId: string; context?: MemoryScopeResolutionContext; floorId?: string
packages/core/src/memory/memory-mutation-applier.ts:234
↓ 24 callers
Function
buildToolCallView
(event:TempStreamToolEvent)
apps/studio/src/modules/graph/assistant/tool-call-view.ts:138
↓ 24 callers
Function
createMockSocket
()
apps/api/src/realtime/resume/__tests__/resume-coordinator.test.ts:22
↓ 24 callers
Function
createSession
(app: FastifyInstance, payload: Record<string, unknown> = {})
apps/api/test/sessions-extra.integration.test.ts:65
↓ 24 callers
Function
event
(overrides: Partial<TempStreamToolEvent> = {})
apps/studio/src/modules/graph/assistant/tool-call-view.test.ts:6
↓ 24 callers
Method
generate
非流式生成
packages/core/src/llm/types.ts:331
↓ 24 callers
Function
importPreset
(data: Record<string, unknown>, name = "Test Preset")
apps/api/test/preset-entries.test.ts:91
↓ 24 callers
Method
listTools
列出该提供者下所有可用工具
packages/core/src/tools/types.ts:429
↓ 24 callers
Function
makeGenOutput
(overrides: Partial<GenerationOutput> = {})
packages/core/src/orchestration/__tests__/turn-orchestrator.test.ts:42
↓ 24 callers
Function
makeProvider
(args: { tools: ToolDefinition[]; executeFn?: ToolProvider['executeTool']; id?: string; })
packages/core/src/tools/__tests__/tool-executor.test.ts:27
↓ 24 callers
Function
parseWorldBook
(json: unknown, name?: string)
packages/adapters-sillytavern/src/parsers/worldbook-parser.ts:248
↓ 24 callers
Method
prepareInjection
* 按预算查询并格式化记忆注入块。 * * 默认策略: * 1. 查询活跃记忆,按 importance 降序排列 * 2. 可选 balanced 模式:按类型顺序交错混排,支持每类型配额 * 3. 逐条累加 token,超过预算时停止 * 4. 将选中的条目格
packages/core/src/memory/memory-store.ts:151
↓ 24 callers
Method
regenerate
()
apps/api/test/llm-runtime-wiring.integration.test.ts:27
↓ 24 callers
Function
samplePreset
()
apps/studio/src/modules/graph/import/silly-tavern-preset.test.ts:14
↓ 24 callers
Function
tool
(index: number, executionId: string, sideEffectLevel: string | null)
packages/official-integration-kit/client-helpers/src/steps/step-retry.test.ts:11
↓ 24 callers
Function
verResponse
(over: Partial<NodeGraphVersionResponse> = {})
apps/studio/src/stores/graph-editor.test.ts:98
↓ 23 callers
Function
authHeaders
(token: string)
apps/api/test/mcp-account-scope.integration.test.ts:132
↓ 23 callers
Function
bearer
(token: string)
apps/api/test/auth.integration.test.ts:13
↓ 23 callers
Function
buildZodObjectSchema
( schema: SupportedJsonObjectSchema, options: BuildZodObjectSchemaOptions = {}, )
apps/api/src/routes/schemas/json-schema-zod.ts:114
↓ 23 callers
Function
createDomain
( app: BuildAppResult["app"], body: { owner_type: "application" | "plugin"; owner_id: stri
apps/api/src/client-data/__tests__/client-data-routes.test.ts:52
↓ 23 callers
Function
jsonResponse
(body: unknown, status = 200)
packages/official-integration-kit/sdk/src/__tests__/prompt-runtime-resource.test.ts:12
↓ 23 callers
Function
makeTestToolProvider
()
packages/core/src/orchestration/__tests__/turn-orchestrator.test.ts:760
↓ 23 callers
Function
makeTool
(overrides: Partial<ToolDefinition> = {})
packages/core/src/tools/__tests__/tool-executor.test.ts:15
↓ 23 callers
Function
mapStringArray
(value: unknown)
packages/official-integration-kit/sdk/src/resources/prompt-runtime.ts:2469
↓ 23 callers
Function
operationRequestIdFromRequest
(request: FastifyRequest)
apps/api/src/services/operation-log-service.ts:211
↓ 23 callers
Method
resolveLiveValue
(input: { accountId: string; sessionId: string; branchId: string; namespace: SessionStateNames
apps/api/src/session-state/session-state-service.ts:630
↓ 23 callers
Function
seedFloor
( database: DatabaseConnection, floor: { id: string; sessionId: string; floorNo: number; b
apps/api/src/session-state/__tests__/session-state-service.test.ts:1056
↓ 23 callers
Function
track
(resource: string, id: string)
apps/api/scripts/smoke/harness.ts:66
↓ 22 callers
Method
addObserver
(input: { actorAccountId: string; projectId: string; accountId: string; now?: number; })
apps/api/src/services/project-membership-service.ts:191
↓ 22 callers
Method
enqueue
(request: BackgroundJobRouteRequest)
apps/api/src/services/agent-runtime/agent-executor-router.ts:52
↓ 22 callers
Function
markDirty
标记改动并持久化草稿(所有编辑动作统一出口)。
apps/studio/src/stores/graph-editor.ts:361
↓ 22 callers
Function
operationActorFromRequest
(request: FastifyRequest)
apps/api/src/services/operation-log-service.ts:207
↓ 22 callers
Function
pushHistory
* 每次原子写操作前调用:把当前 `document` 深拷贝入 undo 栈并清空 redo 栈。 * 无文档时不入栈;超上限时从栈底截断。
apps/studio/src/stores/graph-editor.ts:379
↓ 22 callers
Method
put
(providerKey: string, snapshot: McpToolCatalogSnapshot)
apps/api/src/services/tooling/mcp/mcp-tool-catalog-snapshot-store.ts:14
↓ 22 callers
Function
readString
(value: unknown)
apps/studio/src/modules/graph/canvas/map-document.ts:212
↓ 22 callers
Method
render
* 同步渲染:使用预解析的变量 Map
packages/core/src/prompt/template-engine.ts:44
↓ 22 callers
Method
requireOwnedDomain
(accountId: string, domainId: string)
apps/api/src/client-data/client-data-service.ts:1095
↓ 22 callers
Function
setup
(reader?: FloorRunRecordReader)
apps/api/src/realtime/resume/__tests__/resume-coordinator.test.ts:90
↓ 21 callers
Function
addCleanup
(task: () => Promise<void>)
apps/api/scripts/smoke/harness.ts:71
↓ 21 callers
Function
authHeaders
(token: string)
apps/api/test/tools-isolation.integration.test.ts:111
↓ 21 callers
Method
create
创建记忆条目,返回含 ID 和时间戳的完整对象
packages/core/src/ports/memory-repository.ts:15
↓ 21 callers
Method
createDefinition
( input: CreateDefinitionInput, accountId: string, )
apps/api/src/services/tooling/tool-service.ts:217
← previous
next →
101–200 of 8,237, ranked by callers