| 123 | rootDir: string; |
| 124 | provider: string; |
| 125 | modelId: string; |
| 126 | baseUrl?: string; |
| 127 | apiProtocol?: "openai-responses" | "openai-completions"; |
| 128 | reasoning?: boolean; |
| 129 | requestHeadersProvider?: RequestHeadersProvider; |
| 130 | hostRequestHeadersEnabled?: boolean; |
| 131 | lifecycleHandler: LifecycleHandler; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * PackAgent interface – platform-agnostic agent layer. |
| 136 | * Each adapter calls these methods; the agent handles session state internally. |
| 137 | */ |
| 138 | export interface IPackAgent { |
| 139 | /** Handle an incoming message with streaming events */ |
| 140 | handleMessage( |
| 141 | adapter: RuntimePlatform, |
| 142 | channelId: string, |
| 143 | text: string, |
| 144 | onEvent: (event: AgentEvent) => void, |
| 145 | attachments?: ChannelAttachment[], |
| 146 | ): Promise<HandleResult>; |
| 147 | |
| 148 | /** Handle a built-in bot command */ |
| 149 | handleCommand(command: BotCommand, channelId: string): Promise<CommandResult>; |
| 150 | |
| 151 | /** Abort the current run for a channel */ |
| 152 | abort(channelId: string): void; |
| 153 | |
| 154 | /** Check if a channel is currently running */ |
| 155 | isRunning(channelId: string): boolean; |
| 156 | |
| 157 | /** Dispose the session for a channel */ |
| 158 | dispose(channelId: string): void; |
| 159 | |
| 160 | /** Reserved: list all sessions */ |
| 161 | listSessions(): SessionInfo[]; |
| 162 | |
| 163 | /** Reserved: restore a historical session */ |
| 164 | restoreSession(sessionId: string): Promise<void>; |
no outgoing calls
no test coverage detected