()
| 453 | } |
| 454 | |
| 455 | emitSnapshot(): void { |
| 456 | if (!this.prepareForEmit()) { |
| 457 | return |
| 458 | } |
| 459 | emitAIDevtoolsEvent('hook:state-snapshot', { |
| 460 | ...this.createEnvelope('hook:state-snapshot'), |
| 461 | ...this.createMetadataPayload(), |
| 462 | // Wire envelope uses Record<string, unknown>; widen the typed snapshot |
| 463 | // here so the typed-snapshot constraint above can stay narrow. |
| 464 | // eslint-disable-next-line no-restricted-syntax -- TSnapshot extends object is structurally compatible but TS can't see the missing index signature |
| 465 | state: this.options.getSnapshot() as unknown as Record<string, unknown>, |
| 466 | }) |
| 467 | } |
| 468 | |
| 469 | emitToolsRegistered(): void { |
| 470 | if (!this.prepareForEmit()) { |
no test coverage detected