Skip to content

Commit ef947ed

Browse files
committed
docs(exec): clarify getAllowAlwaysUnavailableReason semantics
1 parent 8c87cdb commit ef947ed

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/infra/exec-approvals.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,13 @@ export function resolveExecApprovalUnavailableDecisions(params?: {
18351835
return OPTIONAL_EXEC_APPROVAL_DECISIONS.filter((decision) => !allowed.has(decision));
18361836
}
18371837

1838-
/** Returns the user-facing reason why Allow Always is not available, or null if it is. */
1838+
/**
1839+
* Returns the user-facing reason why Allow Always is not available.
1840+
*
1841+
* When ask=always → policy requires every-time approval.
1842+
* When allowAlwaysPersistenceKind=one-shot → command cannot be saved.
1843+
* Otherwise safe-defaults to the policy message. (#97069)
1844+
*/
18391845
export function getAllowAlwaysUnavailableReason(params?: {
18401846
ask?: string | null;
18411847
allowAlwaysPersistenceKind?: "one-shot" | null;

0 commit comments

Comments
 (0)