()
| 161 | * marks a spawn/resume boundary. |
| 162 | */ |
| 163 | export function consumeInvokingRequestId(): |
| 164 | | { |
| 165 | invokingRequestId: string |
| 166 | invocationKind: 'spawn' | 'resume' | undefined |
| 167 | } |
| 168 | | undefined { |
| 169 | const context = getAgentContext() |
| 170 | if (!context?.invokingRequestId || context.invocationEmitted) { |
| 171 | return undefined |
| 172 | } |
| 173 | context.invocationEmitted = true |
| 174 | return { |
| 175 | invokingRequestId: context.invokingRequestId, |
| 176 | invocationKind: context.invocationKind, |
| 177 | } |
| 178 | } |
| 179 |
no test coverage detected