---
url: >-
  https://adk.nht.io/api/batteries/orchestration/approval/functions/computeAuthoritySet.md
---

# Function: computeAuthoritySet()

```ts
function computeAuthoritySet(
  view: RawPlanView,
  alreadyLive?: (claim: AuthorityClaim) => boolean,
): AuthorityClaim[];
```

Defined in: [src/batteries/orchestration/approval.ts:93](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/approval.ts#L93)

Computes the canonical authority set for a frozen plan.

The set is the union of every reachable `call` node's claims, de-duplicated to exact triples and
sorted lexicographically by `capability`, then `scope`, then `verb`. Reachability is from the
entry node(s) via [reachableFrom](../../../../@nhtio/adk/batteries/orchestration/plan/functions/reachableFrom.md); a claim living on an unreachable node is excluded,
because the operator must see exactly what can actually run. Because the result is ordered and
de-duplicated, comparing two plans' sets is a plain set comparison with no expansion step.

## Parameters

| Parameter      | Type                                                                                                                          | Description                                                                  |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `view`         | [`RawPlanView`](../../../../@nhtio/adk/batteries/orchestration/types/interfaces/RawPlanView.md)                               | The frozen plan to summarise.                                                |
| `alreadyLive?` | (`claim`: [`AuthorityClaim`](../../../../@nhtio/adk/batteries/orchestration/types/interfaces/AuthorityClaim.md)) => `boolean` | Optional predicate; a claim it returns `true` for is omitted (already live). |

## Returns

[`AuthorityClaim`](../../../../@nhtio/adk/batteries/orchestration/types/interfaces/AuthorityClaim.md)\[]

The sorted, de-duplicated, reachable-only authority claims.

## Remarks

The set is DERIVED as that union, so "every reachable call's claims are in the result" can never
fail and is not a meaningful check. The two non-vacuous gates are freeze-time reachability (a
separate work package) and [approvePlan's](approvePlan.md) set-equality check.

The optional `alreadyLive` predicate is the redundant-request short-circuit: a consumer whose
authority layer reports a claim already live can pass it so only the claims still needing a gate
are reported. It only shapes what THIS function returns for display/ask purposes; it does not
weaken [approvePlan's](approvePlan.md) gate, which always compares the full reachable set.
