(ledger, taskId)
| 88 | } |
| 89 | |
| 90 | function _recentlySpawned(ledger, taskId) { |
| 91 | const entry = ledger.spawned && ledger.spawned[taskId]; |
| 92 | if (!entry || typeof entry !== 'object') return false; |
| 93 | const ts = Number(entry.at) || 0; |
| 94 | return Date.now() - ts < SPAWN_COOLDOWN_MS; |
| 95 | } |
| 96 | |
| 97 | function _clipQuestion(q) { |
| 98 | const s = String(q || '').trim(); |