(
eventName:
| 'run:created'
| 'run:started'
| 'run:updated'
| 'run:completed'
| 'run:errored'
| 'run:cancelled',
payload: RunLifecycleEvent,
)
| 1189 | ) |
| 1190 | |
| 1191 | const recordRunEvent = ( |
| 1192 | eventName: |
| 1193 | | 'run:created' |
| 1194 | | 'run:started' |
| 1195 | | 'run:updated' |
| 1196 | | 'run:completed' |
| 1197 | | 'run:errored' |
| 1198 | | 'run:cancelled', |
| 1199 | payload: RunLifecycleEvent, |
| 1200 | ) => { |
| 1201 | setState( |
| 1202 | 'hooks', |
| 1203 | produce((hooks: HookRegistryState) => { |
| 1204 | applyHookEvent(hooks, eventName, payload) |
| 1205 | }), |
| 1206 | ) |
| 1207 | } |
| 1208 | |
| 1209 | cleanupFns.push( |
| 1210 | aiEventClient.on('run:created', (e) => { |
no test coverage detected