()
| 955 | } |
| 956 | |
| 957 | private requireMainAgent(): Agent { |
| 958 | const agent = this.getReadyAgent('main'); |
| 959 | if (agent === undefined) { |
| 960 | throw new KimiError(ErrorCodes.AGENT_NOT_FOUND, 'Main agent was not found'); |
| 961 | } |
| 962 | return agent; |
| 963 | } |
| 964 | |
| 965 | private async triggerSessionStart(source: 'startup' | 'resume'): Promise<void> { |
| 966 | await this.hookEngine.trigger('SessionStart', { |
no test coverage detected