MCPcopy Index your code
hub / github.com/codeaashu/claude-code / reportState

Method reportState

src/cli/transports/ccrClient.ts:645–658  ·  view source on GitHub ↗

Report worker state to CCR via PUT /sessions/{id}/worker.

(state: SessionState, details?: RequiresActionDetails)

Source from the content-addressed store, hash-verified

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 {

Callers 11

wireTransportCallbacksFunction · 0.80
drainFlushGateFunction · 0.80
flushHistoryFunction · 0.80
teardownFunction · 0.80
writeMessagesFunction · 0.80
sendControlRequestFunction · 0.80
sendControlResponseFunction · 0.80
sendControlCancelRequestFunction · 0.80
sendResultFunction · 0.80
reportStateFunction · 0.80
constructorMethod · 0.80

Calls 1

enqueueMethod · 0.45

Tested by

no test coverage detected