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

Scheduling

interface

Scheduling: the mechanism Scheduler implements.

API

@Interface()
export abstract class Scheduling {
  abstract readonly files: Opaque<"ScheduleFileCache">;
  abstract start(): Promise<void>;
  abstract stop(): void;
  abstract tickOnce(): Promise<void>;
  abstract reconcileAgent(projectId: string, agentId: string): Promise<void>;
  abstract listAgent(
      projectId: string,
      agentId: string,
    ): Promise<{ entries: ScheduleEntry[]; invalid: Array<{ name: string; error: string }> }>;
  abstract listProject(projectId: string): Promise<{
      entries: Array<ScheduleEntry & { agentId: string }>;
      invalid: Array<{ agentId: string; name: string; error: string }>;
    }>;
  abstract dropEntry(projectId: string, agentId: string, name: string): void;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use
@Moduleexported by
@Provideprovided by
@Useconsumed by (2)

Members (8)

files

readonly files: Opaque<"ScheduleFileCache">

The runtime's schedule-file cache (the server's ScheduleFileCache class, compared by name).

start

start(): Promise<void>
@returnsPromise<void>

stop

stop(): void
@returnsvoid

tickOnce

tickOnce(): Promise<void>
@returnsPromise<void>

reconcileAgent

reconcileAgent(projectId: string, agentId: string): Promise<void>
@paramprojectIdstring
@paramagentIdstring
@returnsPromise<void>

listAgent

listAgent(projectId: string, agentId: string): Promise<{ entries: ScheduleEntry[]; invalid: Array<{ name: string; error: string }> }>
@paramprojectIdstring
@paramagentIdstring
@returnsPromise<{ entries: ScheduleEntry[]; invalid: Array<{ name: string; error: string }> }>

listProject

listProject(projectId: string): Promise<{ entries: Array<ScheduleEntry & { agentId: string }>; invalid: Array<{ agentId: string; name: string; error: string }>; }>
@paramprojectIdstring
@returnsPromise<{ entries: Array<ScheduleEntry & { agentId: string }>; invalid: Array<{ agentId: string; name: string; error: string }>; }>

dropEntry

dropEntry(projectId: string, agentId: string, name: string): void
@paramprojectIdstring
@paramagentIdstring
@paramnamestring
@returnsvoid