MCPcopy Create free account

hub / github.com/Kevin7Qi/codex-collab / functions

Functions413 in github.com/Kevin7Qi/codex-collab

↓ 3 callersFunctiontryInterruptTurn
( client: AppServerClient, threadId: string, turnId: string, context?: string, )
src/turns.ts:43
↓ 3 callersFunctionwaitForExit
Wait for the process to exit within the given timeout. The timer is * cleared when the process wins the race — a leftover armed timer keeps *
src/client.ts:201
↓ 2 callersFunctionapplyUserConfig
(options: Options)
src/commands/shared.ts:545
↓ 2 callersFunctionbailOnCorruptThreads
* Move a corrupt threads file aside and return an Error explaining the situation. * The caller throws — silently returning an empty index on corrupti
src/threads.ts:88
↓ 2 callersFunctioncamelToSnake
(value: string)
src/guardian.ts:109
↓ 2 callersFunctionclearBrokerState
(stateDir: string)
src/broker.ts:114
↓ 2 callersFunctionconnectToExisting
(state: BrokerState | null)
src/broker.ts:460
↓ 2 callersFunctionconsumeInjectedRunId
()
src/commands/shared.ts:812
↓ 2 callersFunctioncreateDispatcher
( logPath: string, opts: Options, guardianDir?: string, )
src/commands/shared.ts:691
↓ 2 callersFunctioncreateMockClient
* Build a simple mock that auto-fires turn/completed after the start method. * Used for tests that only care about the completion result, not the eve
src/turns.test.ts:121
↓ 2 callersFunctioncreateRpcEndpoint
(opts: RpcEndpointOptions)
src/rpc.ts:182
↓ 2 callersFunctiondrainRemaining
()
src/commands/follow.ts:275
↓ 2 callersFunctionexecuteTurn
* Shared turn lifecycle: register handlers, send the start request, * wait for completion, collect results, and clean up. * * Notification bufferin
src/turns.ts:153
↓ 2 callersFunctionexitsWithin
(proc: Subprocess, timeoutMs: number)
src/broker-server.test.ts:448
↓ 2 callersFunctionfallbackToDirect
(reason: string)
src/broker.ts:518
↓ 2 callersFunctionfinish
(rec: RunRecord)
src/commands/follow.ts:285
↓ 2 callersMethodflushOutput
Write accumulated agent output to the log (called before final flush).
src/events.ts:244
↓ 2 callersFunctionfollowRun
Render one run from its logOffset until it reaches a terminal state * (replay + live tail). Prints the header and the final status line.
src/commands/follow.ts:241
↓ 2 callersFunctionformatAge
(unixTimestamp: number)
src/commands/shared.ts:1065
↓ 2 callersMethodgetAccumulatedOutput
()
src/events.ts:212
↓ 2 callersFunctiongetApprovalHandler
(policy: ApprovalPolicy, approvalsDir: string, ctx?: ApprovalHandlerContext)
src/commands/shared.ts:629
↓ 2 callersFunctiongetHome
()
src/config.ts:10
↓ 2 callersFunctiongrandchildAlive
kill(pid, 0) succeeds for zombies: an orphaned grandchild stays STAT=Z * until PID 1 reaps it, which never happens promptly in containers with a *
src/client.test.ts:528
↓ 2 callersFunctionhandleApproveOrDecline
( decision: "accept" | "decline", args: string[], )
src/commands/approve.ts:50
↓ 2 callersMethodhandleError
(params: ErrorNotificationParams)
src/events.ts:206
↓ 2 callersFunctionhandleShutdownSignal
(exitCode: number)
src/cli.ts:28
↓ 2 callersFunctionisSet
(key: string)
src/commands/shared.ts:767
↓ 2 callersFunctionkillDetachedRunner
(pid: number)
src/commands/run.ts:47
↓ 2 callersFunctionlistTemplates
()
src/config.ts:297
↓ 2 callersFunctionloadTemplateRaw
Load the raw template content (including frontmatter).
src/config.ts:266
↓ 2 callersFunctionloadTemplateWithMeta
(name: string, promptsDir?: string)
src/config.ts:261
↓ 2 callersFunctionloadUserConfig
()
src/commands/shared.ts:513
↓ 2 callersFunctionlogFileOf
(r: RunRecord)
src/commands/follow.ts:177
↓ 2 callersFunctionlogPollError
(e: unknown)
src/turns.ts:583
↓ 2 callersFunctionmakeRelease
(fd: number, lockPath: string)
src/lock.ts:81
↓ 2 callersMethodmarkClosed
Mark the endpoint intentionally closed: reject pending requests with * "Client is closed"-style reasons and stop accepting writes. Idempotent.
src/rpc.ts:166
↓ 2 callersFunctionmarkGuardianDenialOverridden
(guardianDir: string, reviewId: string)
src/guardian.ts:85
↓ 2 callersFunctionmarkerSaysSkip
* Read the marker and decide what migrateGlobalState should do next. * Returns true if migration is already at the current schema (caller should * s
src/threads.ts:646
↓ 2 callersFunctionnotifyUnexpectedClose
(reason: string)
src/broker-client.ts:75
↓ 2 callersMethodpollForDecision
(id: string, timeoutMs: number, signal?: AbortSignal)
src/approvals.ts:141
↓ 2 callersFunctionprintVersion
()
src/cli.ts:89
↓ 2 callersFunctionreadNewBytes
Read bytes [offset, min(size, maxOffset)) from the log. Returns the new * offset and the raw bytes (decoded by the caller's streaming decoder, so *
src/commands/follow.ts:45
↓ 2 callersFunctionreadPidFile
(pidsDir: string, shortId: string)
src/commands/shared.ts:1240
↓ 2 callersFunctionreasoningItem
(id: string = "r1")
src/commands/peek.test.ts:17
↓ 2 callersFunctionreleaseOwnershipIfStillOurs
()
src/broker-server.ts:192
↓ 2 callersFunctionremoveLegacyGlobalThread
( cwd: string, threadId: string, globalDataDir?: string, )
src/threads.ts:895
↓ 2 callersFunctionremoveRunsForThread
(stateDir: string, shortId: string)
src/threads.ts:435
↓ 2 callersFunctionrenderDim
(text: string, color: boolean)
src/commands/follow.ts:393
↓ 2 callersFunctionresolveDefaults
(client: AppServerClient, opts: Options)
src/commands/shared.ts:762
↓ 2 callersFunctionresolveLogTarget
Resolve a positional ID arg to its shortId, or die.
src/commands/threads.ts:281
↓ 2 callersFunctionresolveThreadIdOrDie
(stateDir: string, id: string)
src/commands/shared.ts:220
↓ 2 callersFunctionrouteNotification
(method: string, params: unknown)
src/turns.ts:238
↓ 2 callersFunctionrunningRecordWithPending
(ws: WorkspacePaths, runId: string)
src/commands/shared.test.ts:1687
↓ 2 callersFunctionsafeCloseClient
Best-effort close that swallows + logs errors. Cleanup runs on every * exit path; a failed close is not actionable for the caller.
src/commands/shared.ts:647
↓ 2 callersFunctionsafeStringify
JSON.stringify that never throws (circular refs) and bounds entry size — * used for logging unstable payloads whose shape we don't control.
src/events.ts:277
↓ 2 callersFunctionsaveSession
()
src/broker.ts:439
↓ 2 callersFunctionseedSeenRuns
(stateDir: string, pidsDir: string, exceptRunId?: string)
src/commands/follow.ts:223
↓ 2 callersFunctionsetActiveReviewThreadId
(id: string | undefined)
src/commands/shared.ts:612
↓ 2 callersFunctionshellQuote
(value: string)
src/approvals.ts:31
↓ 2 callersFunctionshow
(chunkBytes: Buffer)
src/commands/follow.ts:263
↓ 2 callersFunctionsleep
(ms: number)
src/commands/follow.ts:37
↓ 2 callersFunctiontargetsUs
A signal file is targeting THIS run iff its content is empty (legacy * caller — startup check already vetted freshness), our PID, or the * wil
src/turns.ts:566
↓ 2 callersFunctiontryBreakStaleLock
Break the lock iff it is older than the stale threshold. Rename-to- * tombstone guarantees a single winner; losers see ENOENT and just retry.
src/lock.ts:65
↓ 2 callersFunctiontryOpen
Open the lock file exclusively. Returns the fd, or null when it exists. * Unexpected filesystem errors propagate.
src/lock.ts:45
↓ 2 callersFunctionupdateThreadMeta
( stateDir: string, threadId: string, patch: ThreadMetaPatch, )
src/threads.ts:206
↓ 2 callersFunctionuserText
(item: UserMessageItem)
src/commands/peek.ts:67
↓ 2 callersFunctionwrapBrokerBusy
(e: unknown)
src/broker.ts:32
↓ 2 callersFunctionwritePidFile
(pidsDir: string, shortId: string)
src/commands/shared.ts:1214
↓ 2 callersMethodwriteRequestFile
(id: string, data: unknown)
src/approvals.ts:132
↓ 2 callersFunctionwriteThreadsFileAt
Atomic write of a threads file at an explicit path. Used by saveThreadIndex * and by legacy-global-file maintenance in the migration code below.
src/threads.ts:104
↓ 1 callersFunctionacquireLock
* Acquire an advisory file lock on `filePath + ".lock"` (see src/lock.ts for * the acquisition/stale-break semantics). Returns a release function.
src/threads.ts:24
↓ 1 callersFunctionacquireLockAsync
(lockPath: string, opts?: LockOptions)
src/lock.ts:131
↓ 1 callersFunctionacquireLockSync
(lockPath: string, opts?: LockOptions)
src/lock.ts:114
↓ 1 callersFunctionbelongsToActiveTurn
( p: { threadId: string; turnId: string }, expectedTurnId: string, )
src/turns.ts:224
↓ 1 callersFunctionbuildStreamTargets
( method: string, params: Record<string, unknown> | undefined, result: Record<string, unknown>, )
src/broker-server.ts:82
↓ 1 callersFunctionclose
()
src/broker-client.ts:93
↓ 1 callersFunctionclose
()
src/client.ts:211
↓ 1 callersFunctioncreateKillSignalAwaiter
* Create a promise that rejects with KillSignalError when a kill signal file * appears for the given thread. Polls the filesystem at the given interv
src/turns.ts:554
↓ 1 callersFunctioncreateTurnCompletionAwaiter
* Create a turn/completed awaiter that buffers events from the moment it's * created. Call waitFor(turnId) after the request to resolve with the matc
src/turns.ts:640
↓ 1 callersFunctiondetachRun
* Hand the turn to a detached runner and return once it's actually running. * * The child is this same CLI re-executed without `--detach`, in its ow
src/commands/run.ts:83
↓ 1 callersFunctiondiscoverThreads
(client: AppServerClient, ws: WorkspacePaths, cwd: string)
src/commands/threads.ts:79
↓ 1 callersFunctiondispatch
(msg: JsonRpcMessage)
src/rpc.ts:227
↓ 1 callersMethoddispatch
(msg: Record<string, unknown>)
src/broker-server.test.ts:348
↓ 1 callersFunctiondone
()
src/broker-client.ts:101
↓ 1 callersFunctionensureConnection
(cwd: string, streaming = false)
src/broker.ts:417
↓ 1 callersFunctionextractCommand
(args: string[])
src/cli.ts:222
↓ 1 callersFunctionfail
(reason: string)
src/rpc.ts:216
↓ 1 callersMethodfeed
(chunk: string)
src/render.ts:33
↓ 1 callersFunctionfetchAllPages
( client: AppServerClient, method: string, baseParams?: Record<string, unknown>, )
src/commands/shared.ts:708
↓ 1 callersFunctionfindApprovalRequest
(currentPath: string, approvalId: string)
src/commands/approve.ts:23
↓ 1 callersFunctionfindGuardianDenial
Resolve a denial ID against the current workspace first, then across all * workspaces — mirroring findApprovalRequest, because the override hint is
src/commands/approve.ts:88
↓ 1 callersFunctionhandleGuardianOverride
( stateDir: string, guardianDir: string, idOrPrefix: string | undefined, )
src/commands/approve.ts:113
↓ 1 callersFunctionisError
(msg: JsonRpcMessage)
src/rpc.ts:96
↓ 1 callersFunctionisEsrch
(err: unknown)
src/process.ts:109
↓ 1 callersFunctionisNotification
(msg: JsonRpcMessage)
src/rpc.ts:106
↓ 1 callersFunctionisPidAlive
True iff a process with the given PID exists (EPERM counts as alive).
src/turns.ts:499
↓ 1 callersFunctionisRequest
(msg: JsonRpcMessage)
src/rpc.ts:101
↓ 1 callersFunctionisResponse
(msg: JsonRpcMessage)
src/rpc.ts:91
↓ 1 callersFunctionlaterThan
True iff run `a` comes after run `b` (startedAt, runId tiebreak).
src/commands/follow.ts:154
↓ 1 callersMethodlogLine
Log-only sink for out-of-band lines that already reached the console by * another path (e.g. approval prompts, which must stay visible even under
src/events.ts:125
← previousnext →201–300 of 413, ranked by callers