(id: string)
| 527 | } |
| 528 | |
| 529 | async ensureAgentResumed(id: string): Promise<Agent> { |
| 530 | const entry = this.agents.get(id); |
| 531 | if (entry !== undefined) return (await this.resolveAgentEntry(entry)).agent; |
| 532 | if (this.metadata.agents[id] === undefined) { |
| 533 | throw new KimiError(ErrorCodes.AGENT_NOT_FOUND, `Agent "${id}" was not found`); |
| 534 | } |
| 535 | return (await this.resumeAgent(id)).agent; |
| 536 | } |
| 537 | |
| 538 | /** |
| 539 | * Applies a profile's derived config — cwd, system prompt, active tools — to |
no test coverage detected