* Ensure the daemon is configured and running. Idempotent — the underlying * `profile create --merge` and `daemon start` commands tolerate re-runs.
()
| 82 | * `profile create --merge` and `daemon start` commands tolerate re-runs. |
| 83 | */ |
| 84 | async start(): Promise<void> { |
| 85 | this.logger.info(`[hindsight] starting daemon for profile "${this.profile}"`); |
| 86 | |
| 87 | const env = this.buildEnv(); |
| 88 | await this.configureProfile(env); |
| 89 | await this.startDaemon(env); |
| 90 | await this.waitForReady(); |
| 91 | |
| 92 | this.logger.info(`[hindsight] daemon ready at ${this.baseUrl}`); |
| 93 | } |
| 94 | |
| 95 | /** Stop the daemon. Never throws — logs and resolves even on failure. */ |
| 96 | async stop(): Promise<void> { |