| 5427 | } |
| 5428 | |
| 5429 | private readModel( |
| 5430 | projectionCache: RuntimeReadModelProjectionCache = this.deps.store, |
| 5431 | ): RuntimeReadModel { |
| 5432 | if (!this.deps.runStore || !this.deps.runtimeEventStore) { |
| 5433 | throw new Error('RuntimeReadModel requires AgentRunStore and RuntimeEventStore'); |
| 5434 | } |
| 5435 | return new RuntimeReadModel({ |
| 5436 | runStore: this.deps.runStore, |
| 5437 | runtimeEventStore: this.deps.runtimeEventStore, |
| 5438 | projectionCache, |
| 5439 | ...(this.deps.canonicalPermissionOutcomes |
| 5440 | ? { canonicalPermissionOutcomes: this.deps.canonicalPermissionOutcomes } |
| 5441 | : {}), |
| 5442 | }); |
| 5443 | } |
| 5444 | |
| 5445 | private async repairMissingTerminalFactOnce(sessionId: string, runId: string): Promise<boolean> { |
| 5446 | return ( |