@prismshadow/penguin-library-session · library/session/src/ports.ts:24

SessionRuntimes

interface

The session runtime's view the services read and adopt through — the server's SessionManager satisfies this structurally. adopt puts a just-created Session's runtime into the active table; the reads back the list DTO's live fields (status, pending counts, the model handoff target) and noticeModelConfigEdit tells the runtime the Project's model config moved under a runtime it is about to build.

API

@Interface()
export abstract class SessionRuntimes {
  abstract adopt(row: SessionRow, session: RuntimeSession): void;
  abstract statusOf(sessionId: string): SessionStatus;
  abstract pendingApprovalCount(sessionId: string): number;
  abstract pendingFollowUpCount(sessionId: string): number;
  abstract backgroundTasksOf(sessionId: string): SessionBackgroundTasks | undefined;
  abstract pendingModel(sessionId: string): ModelRefDto | undefined;
  abstract noticeModelConfigEdit(projectId: string): Promise<void>;
}

Members (7)

adopt

adopt(row: SessionRow, session: RuntimeSession): void
@paramrowSessionRow
@paramsessionRuntimeSession
@returnsvoid

statusOf

statusOf(sessionId: string): SessionStatus
@paramsessionIdstring
@returnsSessionStatus

pendingApprovalCount

pendingApprovalCount(sessionId: string): number
@paramsessionIdstring
@returnsnumber

pendingFollowUpCount

pendingFollowUpCount(sessionId: string): number
@paramsessionIdstring
@returnsnumber

backgroundTasksOf

backgroundTasksOf(sessionId: string): SessionBackgroundTasks | undefined
@paramsessionIdstring
@returnsSessionBackgroundTasks | undefined

pendingModel

pendingModel(sessionId: string): ModelRefDto | undefined
@paramsessionIdstring
@returnsModelRefDto | undefined

noticeModelConfigEdit

noticeModelConfigEdit(projectId: string): Promise<void>
@paramprojectIdstring
@returnsPromise<void>