()
| 841 | const nowIso = () => new Date().toISOString(); |
| 842 | |
| 843 | const makeTaskId = () => { |
| 844 | // Prefer UUID when available; otherwise fall back to a reasonably unique id. |
| 845 | const cryptoAny = globalThis.crypto as unknown as |
| 846 | | { randomUUID?: () => string } |
| 847 | | undefined; |
| 848 | return ( |
| 849 | cryptoAny?.randomUUID?.() ?? |
| 850 | `task_${Date.now()}_${Math.random().toString(16).slice(2)}` |
| 851 | ); |
| 852 | }; |
| 853 | |
| 854 | const emitTaskStatus = async (task: Task) => { |
| 855 | // Best-effort; task status notifications are optional. |
no outgoing calls
no test coverage detected