MCPcopy Create free account
hub / github.com/tiann/hapi / keepAlive

Method keepAlive

cli/src/api/apiSession.ts:568–586  ·  view source on GitHub ↗
(
        thinking: boolean,
        mode: 'local' | 'remote',
        runtime?: {
            permissionMode?: SessionPermissionMode
            model?: SessionModel
            modelReasoningEffort?: string | null
            effort?: string | null
            collaborationMode?: SessionCollaborationMode
        }
    )

Source from the content-addressed store, hash-verified

566 }
567
568 keepAlive(
569 thinking: boolean,
570 mode: 'local' | 'remote',
571 runtime?: {
572 permissionMode?: SessionPermissionMode
573 model?: SessionModel
574 modelReasoningEffort?: string | null
575 effort?: string | null
576 collaborationMode?: SessionCollaborationMode
577 }
578 ): void {
579 this.socket.volatile.emit('session-alive', {
580 sid: this.sessionId,
581 time: Date.now(),
582 thinking,
583 mode,
584 ...(runtime ?? {})
585 })
586 }
587
588 emitMessagesConsumed(localIds: string[], options?: { clearQueuedThinkingGrace?: boolean }): void {
589 if (localIds.length === 0) return

Callers 3

constructorMethod · 0.80
AgentSessionBaseClass · 0.80
syncKeepAliveFunction · 0.80

Calls 1

emitMethod · 0.45

Tested by

no test coverage detected