(
predicate: (event: StreamEvent) => boolean,
timeoutMs: number
)
| 491 | ): Promise<SessionSnapshot> { |
| 492 | return trpcCall<SessionSnapshot>( |
| 493 | config, |
| 494 | 'getSession', |
| 495 | { cloudAgentSessionId }, |
| 496 | { method: 'GET', signal } |
| 497 | ); |
| 498 | } |
| 499 | |
| 500 | export type SendMessageResult = { |
| 501 | executionId?: string; |
| 502 | messageId: string; |
| 503 | delivery: 'sent' | 'queued'; |
| 504 | }; |
| 505 | |
| 506 | /** |
| 507 | * Send a slash-command turn. The unified `send` schema accepts prompts and |
| 508 | * attachments only, so a command turn goes through `sendMessageV2` with the |
| 509 | * discriminated command payload; after the C1 cutover that endpoint resolves |
| 510 | * the `workspace_*` session to the new plane, where the DO stores a command |
| 511 | * intent and the wrapper runs it (for `compact`, a real summarization). |
| 512 | */ |
| 513 | export async function sendCommand( |
| 514 | config: DriverConfig, |
| 515 | args: { |
| 516 | cloudAgentSessionId: string; |
no test coverage detected