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

AgentTaskSessions

interface

Opens the conversation a task runs in (the server's SessionServiceIface.createSession subset; the assembly binds it).

API

@Interface()
export abstract class AgentTaskSessions {
  abstract createSession(args: {
      projectId: string;
      agentId: string;
      modelId?: string;
      provider?: string;
      workspace?: string;
      thinkingLevel?: ThinkingLevelName;
      approvalMode?: ApprovalMode;
      /** The composer's sandbox picks; omitted halves take the server's settings. */
      sandbox?: Partial<SessionSandbox>;
      /** Whether the creator is an administrator (may loosen past the settings). Default false. */
      isAdmin?: boolean;
      /** What kind of conversation this is, recorded in the Session's session_meta; absent means `user`, a person's conversation. */
      source?: SessionSource;
      /** Creating-client hint stored on the index row; the organization runtime and the Agent API are the only callers that pass "org" and "api". */
      client?: "web" | "cli" | "org" | "api" | "workbench";
    }): Promise<SessionInfo>;
}

Contract Topology

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

Members (1)

createSession

createSession(args: { projectId: string; agentId: string; modelId?: string; provider?: string; workspace?: string; thinkingLevel?: ThinkingLevelName; approvalMode?: ApprovalMode; sandbox?: Partial<SessionSandbox>; isAdmin?: boolean; source?: SessionSource; client?: "web" | "cli" | "org" | "api" | "workbench"; }): Promise<SessionInfo>
@paramargs{ projectId: string; agentId: string; modelId?: string; provider?: string; workspace?: string; thinkingLevel?: ThinkingLevelName; approvalMode?: ApprovalMode; sandbox?: Partial<SessionSandbox>; isAdmin?: boolean; source?: SessionSource; client?: "web" | "cli" | "org" | "api" | "workbench"; }
@returnsPromise<SessionInfo>