(
command: string,
args?: string,
options?: CommandOptions
)
| 156 | } |
| 157 | |
| 158 | async command( |
| 159 | command: string, |
| 160 | args?: string, |
| 161 | options?: CommandOptions |
| 162 | ): Promise<SessionCommandResponse> { |
| 163 | const sessionId = this.requireSession(); |
| 164 | if (options?.messageId) { |
| 165 | this.validateMessageId(options.messageId); |
| 166 | } |
| 167 | |
| 168 | return this.call<SessionCommandResponse>('POST', `/session/${sessionId}/command`, { |
| 169 | command, |
| 170 | arguments: args ?? '', |
| 171 | messageID: options?.messageId, |
| 172 | agent: options?.agent, |
| 173 | model: options?.model, |
| 174 | }); |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Respond to a permission request. |
no test coverage detected