(
eventType:
| 'hook:registered'
| 'hook:updated'
| 'hook:unregistered'
| 'hook:state-snapshot'
| 'tools:registered'
| AIDevtoolsRunEventType,
visibility: AIDevtoolsEventVisibility = 'client-state',
context: { runId?: string } = {},
)
| 656 | } |
| 657 | |
| 658 | private createEnvelope( |
| 659 | eventType: |
| 660 | | 'hook:registered' |
| 661 | | 'hook:updated' |
| 662 | | 'hook:unregistered' |
| 663 | | 'hook:state-snapshot' |
| 664 | | 'tools:registered' |
| 665 | | AIDevtoolsRunEventType, |
| 666 | visibility: AIDevtoolsEventVisibility = 'client-state', |
| 667 | context: { runId?: string } = {}, |
| 668 | ) { |
| 669 | return createAIDevtoolsEventEnvelope({ |
| 670 | eventType, |
| 671 | source: 'client', |
| 672 | visibility, |
| 673 | clientId: this.options.clientId, |
| 674 | hookId: this.options.hookId, |
| 675 | correlationId: this.bridgeId, |
| 676 | ...(this.options.threadId ? { threadId: this.options.threadId } : {}), |
| 677 | ...(context.runId ? { runId: context.runId } : {}), |
| 678 | timestamp: Date.now(), |
| 679 | }) |
| 680 | } |
| 681 | |
| 682 | private createMetadataPayload() { |
| 683 | return { |
no test coverage detected