Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Kevin7Qi/codex-collab
/ functions
Functions
413 in github.com/Kevin7Qi/codex-collab
⨍
Functions
413
◇
Types & classes
90
↓ 3 callers
Function
tryInterruptTurn
( client: AppServerClient, threadId: string, turnId: string, context?: string, )
src/turns.ts:43
↓ 3 callers
Function
waitForExit
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 callers
Function
applyUserConfig
(options: Options)
src/commands/shared.ts:545
↓ 2 callers
Function
bailOnCorruptThreads
* 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 callers
Function
camelToSnake
(value: string)
src/guardian.ts:109
↓ 2 callers
Function
clearBrokerState
(stateDir: string)
src/broker.ts:114
↓ 2 callers
Function
connectToExisting
(state: BrokerState | null)
src/broker.ts:460
↓ 2 callers
Function
consumeInjectedRunId
()
src/commands/shared.ts:812
↓ 2 callers
Function
createDispatcher
( logPath: string, opts: Options, guardianDir?: string, )
src/commands/shared.ts:691
↓ 2 callers
Function
createMockClient
* 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 callers
Function
createRpcEndpoint
(opts: RpcEndpointOptions)
src/rpc.ts:182
↓ 2 callers
Function
drainRemaining
()
src/commands/follow.ts:275
↓ 2 callers
Function
executeTurn
* Shared turn lifecycle: register handlers, send the start request, * wait for completion, collect results, and clean up. * * Notification bufferin
src/turns.ts:153
↓ 2 callers
Function
exitsWithin
(proc: Subprocess, timeoutMs: number)
src/broker-server.test.ts:448
↓ 2 callers
Function
fallbackToDirect
(reason: string)
src/broker.ts:518
↓ 2 callers
Function
finish
(rec: RunRecord)
src/commands/follow.ts:285
↓ 2 callers
Method
flushOutput
Write accumulated agent output to the log (called before final flush).
src/events.ts:244
↓ 2 callers
Function
followRun
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 callers
Function
formatAge
(unixTimestamp: number)
src/commands/shared.ts:1065
↓ 2 callers
Method
getAccumulatedOutput
()
src/events.ts:212
↓ 2 callers
Function
getApprovalHandler
(policy: ApprovalPolicy, approvalsDir: string, ctx?: ApprovalHandlerContext)
src/commands/shared.ts:629
↓ 2 callers
Function
getHome
()
src/config.ts:10
↓ 2 callers
Function
grandchildAlive
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 callers
Function
handleApproveOrDecline
( decision: "accept" | "decline", args: string[], )
src/commands/approve.ts:50
↓ 2 callers
Method
handleError
(params: ErrorNotificationParams)
src/events.ts:206
↓ 2 callers
Function
handleShutdownSignal
(exitCode: number)
src/cli.ts:28
↓ 2 callers
Function
isSet
(key: string)
src/commands/shared.ts:767
↓ 2 callers
Function
killDetachedRunner
(pid: number)
src/commands/run.ts:47
↓ 2 callers
Function
listTemplates
()
src/config.ts:297
↓ 2 callers
Function
loadTemplateRaw
Load the raw template content (including frontmatter).
src/config.ts:266
↓ 2 callers
Function
loadTemplateWithMeta
(name: string, promptsDir?: string)
src/config.ts:261
↓ 2 callers
Function
loadUserConfig
()
src/commands/shared.ts:513
↓ 2 callers
Function
logFileOf
(r: RunRecord)
src/commands/follow.ts:177
↓ 2 callers
Function
logPollError
(e: unknown)
src/turns.ts:583
↓ 2 callers
Function
makeRelease
(fd: number, lockPath: string)
src/lock.ts:81
↓ 2 callers
Method
markClosed
Mark the endpoint intentionally closed: reject pending requests with * "Client is closed"-style reasons and stop accepting writes. Idempotent.
src/rpc.ts:166
↓ 2 callers
Function
markGuardianDenialOverridden
(guardianDir: string, reviewId: string)
src/guardian.ts:85
↓ 2 callers
Function
markerSaysSkip
* 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 callers
Function
notifyUnexpectedClose
(reason: string)
src/broker-client.ts:75
↓ 2 callers
Method
pollForDecision
(id: string, timeoutMs: number, signal?: AbortSignal)
src/approvals.ts:141
↓ 2 callers
Function
printVersion
()
src/cli.ts:89
↓ 2 callers
Function
readNewBytes
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 callers
Function
readPidFile
(pidsDir: string, shortId: string)
src/commands/shared.ts:1240
↓ 2 callers
Function
reasoningItem
(id: string = "r1")
src/commands/peek.test.ts:17
↓ 2 callers
Function
releaseOwnershipIfStillOurs
()
src/broker-server.ts:192
↓ 2 callers
Function
removeLegacyGlobalThread
( cwd: string, threadId: string, globalDataDir?: string, )
src/threads.ts:895
↓ 2 callers
Function
removeRunsForThread
(stateDir: string, shortId: string)
src/threads.ts:435
↓ 2 callers
Function
renderDim
(text: string, color: boolean)
src/commands/follow.ts:393
↓ 2 callers
Function
resolveDefaults
(client: AppServerClient, opts: Options)
src/commands/shared.ts:762
↓ 2 callers
Function
resolveLogTarget
Resolve a positional ID arg to its shortId, or die.
src/commands/threads.ts:281
↓ 2 callers
Function
resolveThreadIdOrDie
(stateDir: string, id: string)
src/commands/shared.ts:220
↓ 2 callers
Function
routeNotification
(method: string, params: unknown)
src/turns.ts:238
↓ 2 callers
Function
runningRecordWithPending
(ws: WorkspacePaths, runId: string)
src/commands/shared.test.ts:1687
↓ 2 callers
Function
safeCloseClient
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 callers
Function
safeStringify
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 callers
Function
saveSession
()
src/broker.ts:439
↓ 2 callers
Function
seedSeenRuns
(stateDir: string, pidsDir: string, exceptRunId?: string)
src/commands/follow.ts:223
↓ 2 callers
Function
setActiveReviewThreadId
(id: string | undefined)
src/commands/shared.ts:612
↓ 2 callers
Function
shellQuote
(value: string)
src/approvals.ts:31
↓ 2 callers
Function
show
(chunkBytes: Buffer)
src/commands/follow.ts:263
↓ 2 callers
Function
sleep
(ms: number)
src/commands/follow.ts:37
↓ 2 callers
Function
targetsUs
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 callers
Function
tryBreakStaleLock
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 callers
Function
tryOpen
Open the lock file exclusively. Returns the fd, or null when it exists. * Unexpected filesystem errors propagate.
src/lock.ts:45
↓ 2 callers
Function
updateThreadMeta
( stateDir: string, threadId: string, patch: ThreadMetaPatch, )
src/threads.ts:206
↓ 2 callers
Function
userText
(item: UserMessageItem)
src/commands/peek.ts:67
↓ 2 callers
Function
wrapBrokerBusy
(e: unknown)
src/broker.ts:32
↓ 2 callers
Function
writePidFile
(pidsDir: string, shortId: string)
src/commands/shared.ts:1214
↓ 2 callers
Method
writeRequestFile
(id: string, data: unknown)
src/approvals.ts:132
↓ 2 callers
Function
writeThreadsFileAt
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 callers
Function
acquireLock
* 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 callers
Function
acquireLockAsync
(lockPath: string, opts?: LockOptions)
src/lock.ts:131
↓ 1 callers
Function
acquireLockSync
(lockPath: string, opts?: LockOptions)
src/lock.ts:114
↓ 1 callers
Function
belongsToActiveTurn
( p: { threadId: string; turnId: string }, expectedTurnId: string, )
src/turns.ts:224
↓ 1 callers
Function
buildStreamTargets
( method: string, params: Record<string, unknown> | undefined, result: Record<string, unknown>, )
src/broker-server.ts:82
↓ 1 callers
Function
close
()
src/broker-client.ts:93
↓ 1 callers
Function
close
()
src/client.ts:211
↓ 1 callers
Function
createKillSignalAwaiter
* 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 callers
Function
createTurnCompletionAwaiter
* 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 callers
Function
detachRun
* 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 callers
Function
discoverThreads
(client: AppServerClient, ws: WorkspacePaths, cwd: string)
src/commands/threads.ts:79
↓ 1 callers
Function
dispatch
(msg: JsonRpcMessage)
src/rpc.ts:227
↓ 1 callers
Method
dispatch
(msg: Record<string, unknown>)
src/broker-server.test.ts:348
↓ 1 callers
Function
done
()
src/broker-client.ts:101
↓ 1 callers
Function
ensureConnection
(cwd: string, streaming = false)
src/broker.ts:417
↓ 1 callers
Function
extractCommand
(args: string[])
src/cli.ts:222
↓ 1 callers
Function
fail
(reason: string)
src/rpc.ts:216
↓ 1 callers
Method
feed
(chunk: string)
src/render.ts:33
↓ 1 callers
Function
fetchAllPages
( client: AppServerClient, method: string, baseParams?: Record<string, unknown>, )
src/commands/shared.ts:708
↓ 1 callers
Function
findApprovalRequest
(currentPath: string, approvalId: string)
src/commands/approve.ts:23
↓ 1 callers
Function
findGuardianDenial
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 callers
Function
handleGuardianOverride
( stateDir: string, guardianDir: string, idOrPrefix: string | undefined, )
src/commands/approve.ts:113
↓ 1 callers
Function
isError
(msg: JsonRpcMessage)
src/rpc.ts:96
↓ 1 callers
Function
isEsrch
(err: unknown)
src/process.ts:109
↓ 1 callers
Function
isNotification
(msg: JsonRpcMessage)
src/rpc.ts:106
↓ 1 callers
Function
isPidAlive
True iff a process with the given PID exists (EPERM counts as alive).
src/turns.ts:499
↓ 1 callers
Function
isRequest
(msg: JsonRpcMessage)
src/rpc.ts:101
↓ 1 callers
Function
isResponse
(msg: JsonRpcMessage)
src/rpc.ts:91
↓ 1 callers
Function
laterThan
True iff run `a` comes after run `b` (startedAt, runId tiebreak).
src/commands/follow.ts:154
↓ 1 callers
Method
logLine
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
← previous
next →
201–300 of 413, ranked by callers