@prismshadow/penguin-server · packages/server/src/runtime/organization/deps.ts:192

OrgRuns

interface

What company mode needs of the session runtime — declared at the consumer (Go style).

API

@Interface()
export abstract class OrgRuns {
  abstract statusOf(sessionId: string): SessionStatus;
  abstract startTask(
      sessionId: string,
      input: AmspRecord[],
      opts?: { queueIfBusy?: boolean },
    ): Promise<{ sessionId: string; queued?: boolean }>;
  abstract invalidateAgentRuntimes(projectId: string, agentId: string): void;
  abstract onModelChanged(
      listener: (sessionId: string, model: { provider: string; modelId: string }) => void,
    ): () => void;
}

Contract Topology

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

Members (4)

statusOf

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

startTask

startTask(sessionId: string, input: AmspRecord[], opts?: { queueIfBusy?: boolean }): Promise<{ sessionId: string; queued?: boolean }>
@paramsessionIdstring
@paraminputAmspRecord[]
@paramopts?{ queueIfBusy?: boolean }
@returnsPromise<{ sessionId: string; queued?: boolean }>

invalidateAgentRuntimes

invalidateAgentRuntimes(projectId: string, agentId: string): void

The runtime eviction a plugin update performs (the same one the plugins route does).

@paramprojectIdstring
@paramagentIdstring
@returnsvoid

onModelChanged

onModelChanged(listener: (sessionId: string, model: { provider: string; modelId: string }) => void): () => void

Subscribes to a Session's model moving (an in-session switch); returns the unsubscribe.

@paramlistener(sessionId: string, model: { provider: string; modelId: string }) => void
@returns() => void