/** * Denial taxonomy for `enforce()` (PRD Appendix B). * * Every denied `EnforceResult` carries a `reasonCode` and, where one applies, * a `subReason`. `reason` stays a human-readable sentence; code against * `reasonCode`. The codes are stable, low-cardinality strings suitable for * metric labels and audit records, identical to the Python SDK's. */ export declare const DenialReason: { /** The grant's purpose matches none of the tool's `allowed_purposes`, or it has none. */ readonly PURPOSE_NOT_ALLOWED: 'purpose_not_allowed'; /** No scope in the grant covers the connector or tool. */ readonly TOOL_NOT_GRANTED: 'tool_not_granted'; /** A scope covers the connector but at a lower permission level. */ readonly PERMISSION_INSUFFICIENT: 'permission_insufficient'; /** A call cap, cost-unit budget or amount cap would be exceeded, or cannot be evaluated. */ readonly CAP_EXCEEDED: 'cap_exceeded'; /** The tool declares `requires_decision` and no decision grant was given. */ readonly DECISION_REQUIRED: 'decision_required'; /** A decision grant was given but is not valid for this action. */ readonly DECISION_INVALID: 'decision_invalid'; /** The grant has been revoked. */ readonly GRANT_REVOKED: 'grant_revoked'; /** The grant's data region does not permit this call. */ readonly REGION_MISMATCH: 'region_mismatch'; /** No manifest is loaded for the connector, or it does not declare the tool. */ readonly MANIFEST_UNKNOWN_TOOL: 'manifest_unknown_tool'; /** The grant token failed verification. Not part of Appendix B, which assumes a verified grant. */ readonly TOKEN_INVALID: 'token_invalid'; }; export type DenialReason = (typeof DenialReason)[keyof typeof DenialReason]; /** Sub-reasons for `manifest_unknown_tool`. */ export declare const ManifestSubReason: { readonly UNKNOWN_CONNECTOR: 'unknown_connector'; readonly UNKNOWN_TOOL: 'unknown_tool'; readonly INVALID_DECLARATION: 'invalid_declaration'; }; /** Sub-reasons for `cap_exceeded`. */ export declare const CapSubReason: { /** `amount` is above a `capped:N` scope. */ readonly AMOUNT_CAP: 'amount_cap'; /** * A `capped:N` scope covers the connector and the call gave no `amount` (or the * wrapper has no amount extractor). `details` carries `limit`. In caps mode * `warn` the call is allowed and this is reported in `wouldDeny`. */ readonly AMOUNT_MISSING: 'amount_missing'; /** `amount` is not a finite number, or a wrapper's amount extractor threw. */ readonly INVALID_AMOUNT: 'invalid_amount'; /** A `capped:N` scope carries a malformed cap. */ readonly MALFORMED_CAP: 'malformed_cap'; /** The tool declares caps or cost units and they cannot be metered: no meter, or its backend is unavailable. */ readonly METER_UNAVAILABLE: 'meter_unavailable'; /** * A call cap or cost-unit budget would be exceeded (error code E1008). `details` * carries `code`, `limit`, `window`, `used`, `requested`, `scope` and `kind`. */ readonly LIMIT_REACHED: 'limit_reached'; /** A per-case cap applies and no `caseId` was given. */ readonly CASE_REQUIRED: 'case_required'; readonly INVALID_CASE_ID: 'invalid_case_id'; /** `costComponents` names a unit the tool does not declare. */ readonly INVALID_COST_COMPONENT: 'invalid_cost_component'; }; /** Sub-reasons for `purpose_not_allowed`. */ export declare const PurposeSubReason: { /** The grant carries no purpose. */ readonly MISSING: 'missing'; /** The grant's purpose matches none of the tool's patterns. */ readonly NOT_MATCHED: 'not_matched'; /** The grant's purpose is malformed or not in the purpose vocabulary. */ readonly UNKNOWN_PURPOSE: 'unknown_purpose'; }; /** Sub-reasons for `tool_not_granted`. */ export declare const ToolSubReason: { /** The grant's tools entry for the connector does not list the tool. */ readonly NOT_IN_AUTHORIZATION_DETAILS: 'not_in_authorization_details'; /** * Every scope the grant holds for the connector names a tool, and none names this * one (`toolQualifiedScopes: true`). `details` carries `tool_scopes`. */ readonly TOOL_SCOPE_MISSING: 'tool_scope_missing'; }; /** * Sub-reasons for `grant_revoked` (PRD G-6). A call is denied both when the * grant is known to be revoked and when the client cannot tell: an SDK that * has lost the revocation feed must not keep authorising calls. */ export declare const RevocationSubReason: { /** The auth service says this grant or token is revoked. */ readonly REVOKED: 'revoked'; /** The grant is suspended: revoked reversibly, pending a decision. */ readonly SUSPENDED: 'suspended'; /** A grant above this one in the delegation chain is revoked or suspended. */ readonly PARENT_REVOKED: 'parent_revoked'; /** The revocation feed has not heard from the auth service inside its staleness bound. */ readonly FEED_STALE: 'feed_stale'; /** The deployment does not serve the revocation feed, or it is not ready. */ readonly FEED_UNAVAILABLE: 'feed_unavailable'; /** An online revocation check could not be completed. */ readonly STATUS_UNAVAILABLE: 'status_unavailable'; }; export type RevocationSubReason = (typeof RevocationSubReason)[keyof typeof RevocationSubReason]; /** Sub-reasons for `token_invalid`. */ export declare const TokenSubReason: { /** The `authorization_details` claim cannot be read unambiguously. */ readonly MALFORMED_AUTHORIZATION_DETAILS: 'malformed_authorization_details'; /** * The token carries `aud` and the client has no expected audience, so it cannot * tell whether the token is meant for it. `details` carries `token_audience`. */ readonly AUDIENCE_UNCONFIGURED: 'audience_unconfigured'; /** * The token's `aud` does not contain the expected audience, or the token has no * `aud`. `details` carries `expected_audience` and `token_audience`. */ readonly AUDIENCE_MISMATCH: 'audience_mismatch'; }; /** Sub-reasons for `region_mismatch`. */ export declare const RegionSubReason: { /** * The grant's tools entry for the connector names a data region and the client * has no expected region, so it cannot tell whether it may process the data. * `details` carries `token_data_region`. */ readonly REGION_UNCONFIGURED: 'region_unconfigured'; /** * The grant's data region for the connector is not the expected region. * `details` carries `expected_data_region` and `token_data_region`. */ readonly REGION_MISMATCH: 'region_mismatch'; }; /** * Sub-reasons for `decision_required` and `decision_invalid` (PRD G-3; * `spec/decision-grant.md`). The first four are PRD Appendix B's; the auth * service and the Python SDK use the same values. */ export declare const DecisionSubReason: { /** The grant approves a different action (tool, decision, subject, amount or connector). */ readonly ACTION_MISMATCH: 'action_mismatch'; /** The grant is past its expiry. */ readonly EXPIRED: 'expired'; /** The grant has already been used. */ readonly CONSUMED: 'consumed'; /** Both grants of a four-eyes decision name the same approver. */ readonly SAME_APPROVER: 'same_approver'; /** The case changed (new case version) after the decision was approved. */ readonly CASE_CHANGED: 'case_changed'; /** The grant approves an action on another case. */ readonly WRONG_CASE: 'wrong_case'; /** * The decision was requested for another agent or grant, or the caller did * not say which agent and grant it acts for (auth service only). */ readonly WRONG_AGENT: 'wrong_agent'; /** The approver's authentication was not step-up (auth service only). */ readonly STEP_UP_REQUIRED: 'step_up_required'; /** The decision request was cancelled and its grants revoked. */ readonly REVOKED: 'revoked'; /** The issuer does not know the grant, or it belongs to another developer. */ readonly UNKNOWN_GRANT: 'unknown_grant'; /** The grant, or the action to compare it with, cannot be read. */ readonly MALFORMED: 'malformed'; /** The decision needs two approvals and fewer were presented. */ readonly FOUR_EYES_INCOMPLETE: 'four_eyes_incomplete'; /** The grant could not be consumed at the issuer (network, server or configuration). */ readonly CONSUME_UNAVAILABLE: 'consume_unavailable'; /** No decision grant was presented (reported as `decision_required`). */ readonly ABSENT: 'absent'; }; export type DecisionSubReason = (typeof DecisionSubReason)[keyof typeof DecisionSubReason]; //# sourceMappingURL=denials.d.ts.map