()
| 124 | * caller reaches here. |
| 125 | */ |
| 126 | export function isBriefEnabled(): boolean { |
| 127 | // Top-level feature() guard is load-bearing for DCE: Bun can constant-fold |
| 128 | // the ternary to `false` in external builds and then dead-code the BriefTool |
| 129 | // object. Composing isBriefEntitled() alone (which has its own guard) is |
| 130 | // semantically equivalent but defeats constant-folding across the boundary. |
| 131 | return feature('KAIROS') || feature('KAIROS_BRIEF') |
| 132 | ? (getKairosActive() || getUserMsgOptIn()) && isBriefEntitled() |
| 133 | : false |
| 134 | } |
| 135 | |
| 136 | export const BriefTool = buildTool({ |
| 137 | name: BRIEF_TOOL_NAME, |
no test coverage detected