Report worker state to CCR via PUT /sessions/{id}/worker.
(state: SessionState, details?: RequiresActionDetails)
| 643 | |
| 644 | /** Report worker state to CCR via PUT /sessions/{id}/worker. */ |
| 645 | reportState(state: SessionState, details?: RequiresActionDetails): void { |
| 646 | if (state === this.currentState && !details) return |
| 647 | this.currentState = state |
| 648 | this.workerState.enqueue({ |
| 649 | worker_status: state, |
| 650 | requires_action_details: details |
| 651 | ? { |
| 652 | tool_name: details.tool_name, |
| 653 | action_description: details.action_description, |
| 654 | request_id: details.request_id, |
| 655 | } |
| 656 | : null, |
| 657 | }) |
| 658 | } |
| 659 | |
| 660 | /** Report external metadata to CCR via PUT /worker. */ |
| 661 | reportMetadata(metadata: Record<string, unknown>): void { |
no test coverage detected