@prismshadow/penguin-library-agent · library/agent/src/ports.ts:122

AgentTaskRunner

interface

The runtime's task runner, as starting a person's task needs it (the server's Sessions satisfies it structurally; the assembly binds it).

API

@Interface()
export abstract class AgentTaskRunner {
  abstract startTask(
      sessionId: string,
      input: AmspRecord[],
      opts?: {
        queueIfBusy?: boolean;
        interrupt?: boolean;
        steerIfBusy?: boolean;
        recall?: RecallStore;
        promptHooks?: readonly string[];
        /**
         * The signed-in person sending it: the driver of the run it starts — now, or when it leaves
         * the queue (RuntimeEntry.runDriver). Absent for everything nobody signed in sent: the local
         * API token, schedules without a creator, the Agent API, company mode, the bridge.
         */
        driver?: string;
      },
    ): Promise<{ sessionId: string; queued: boolean; steered?: boolean }>;
  abstract statusOf(sessionId: string): SessionStatus;
  abstract pendingApprovalCount(sessionId: string): number;
}

Contract Topology

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

Members (3)

startTask

startTask(sessionId: string, input: AmspRecord[], opts?: { queueIfBusy?: boolean; interrupt?: boolean; steerIfBusy?: boolean; recall?: RecallStore; promptHooks?: readonly string[]; driver?: string; }): Promise<{ sessionId: string; queued: boolean; steered?: boolean }>
@paramsessionIdstring
@paraminputAmspRecord[]
@paramopts?{ queueIfBusy?: boolean; interrupt?: boolean; steerIfBusy?: boolean; recall?: RecallStore; promptHooks?: readonly string[]; driver?: string; }
@returnsPromise<{ sessionId: string; queued: boolean; steered?: boolean }>

statusOf

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

pendingApprovalCount

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