@xemahq/authorization-internal-api-client 0.3.3 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,14 +6,14 @@
6
6
  import type { AuthorizationCheckRequestDto, AuthorizationCheckResponseDtoDataEnvelope, GrantVersionResponseDtoDataEnvelope, PolicyCheckBatchRequestDto, PolicyCheckBatchResponseDtoDataEnvelope, PolicyCheckRequestDto, PolicyDecisionDtoDataEnvelope } from '../../models';
7
7
  export declare const getAuthorizationControllerCheckUrl: () => string;
8
8
  /**
9
- * Called by xema-capability-router on every invocation. Phase 3 returns `allowed=true` for any non-revoked grant matching `(subject, capability)`; `environment` is stored but not yet enforced. Phase 4 will enforce environment, resource-glob, rate-limit, and approval.
9
+ * Called by xema-capability-router on every invocation. The verdict is OpenFGA-authoritative and then narrowed, in order, by the delegation clamp, the agent reach tier, and the ENVIRONMENT reach ceiling (the environment runs last on purpose: it is the outer boundary, so it must see the tier's output — a `connected` tier extends a deny into an allow, and the environment may then take that away). `requiresApproval` denies with APPROVAL_REQUIRED. NOT enforced here: `rateLimit` (accepted on a grant, read by nothing) and `ExecutionEnvironment.allowedCapabilities` (an enumerated per-ref list, deliberately not wired for the built-ins — see `environment-reach-ceiling`; it is enforced only by app-function-broker, for org-custom environments).
10
10
  * @summary Runtime allow/deny decision for a (subject, capability) tuple
11
11
  */
12
12
  export declare const authorizationControllerCheck: (authorizationCheckRequestDto: AuthorizationCheckRequestDto, options?: RequestInit) => Promise<AuthorizationCheckResponseDtoDataEnvelope>;
13
13
  export declare const getAuthorizationControllerGrantVersionUrl: (orgId: string) => string;
14
14
  /**
15
15
  * A cheap read of the per-org grant-version counter — bumped on every grant/environment/membership change. Consumers (e.g. app-platform delegated-session verify) key a short-lived effective-capability cache by it so a revoked role takes effect at the next miss rather than at token expiry. Fail-closed: an unavailable version store surfaces as a 5xx so the caller denies.
16
- * @summary Current monotonic grant-version for an org (Wave 8.2)
16
+ * @summary Current durable monotonic grant-version for an org
17
17
  */
18
18
  export declare const authorizationControllerGrantVersion: (orgId: string, options?: RequestInit) => Promise<GrantVersionResponseDtoDataEnvelope>;
19
19
  export declare const getAuthorizationControllerPolicyCheckUrl: () => string;
@@ -7,7 +7,7 @@ const getAuthorizationControllerCheckUrl = () => {
7
7
  };
8
8
  exports.getAuthorizationControllerCheckUrl = getAuthorizationControllerCheckUrl;
9
9
  /**
10
- * Called by xema-capability-router on every invocation. Phase 3 returns `allowed=true` for any non-revoked grant matching `(subject, capability)`; `environment` is stored but not yet enforced. Phase 4 will enforce environment, resource-glob, rate-limit, and approval.
10
+ * Called by xema-capability-router on every invocation. The verdict is OpenFGA-authoritative and then narrowed, in order, by the delegation clamp, the agent reach tier, and the ENVIRONMENT reach ceiling (the environment runs last on purpose: it is the outer boundary, so it must see the tier's output — a `connected` tier extends a deny into an allow, and the environment may then take that away). `requiresApproval` denies with APPROVAL_REQUIRED. NOT enforced here: `rateLimit` (accepted on a grant, read by nothing) and `ExecutionEnvironment.allowedCapabilities` (an enumerated per-ref list, deliberately not wired for the built-ins — see `environment-reach-ceiling`; it is enforced only by app-function-broker, for org-custom environments).
11
11
  * @summary Runtime allow/deny decision for a (subject, capability) tuple
12
12
  */
13
13
  const authorizationControllerCheck = async (authorizationCheckRequestDto, options) => {
@@ -25,7 +25,7 @@ const getAuthorizationControllerGrantVersionUrl = (orgId) => {
25
25
  exports.getAuthorizationControllerGrantVersionUrl = getAuthorizationControllerGrantVersionUrl;
26
26
  /**
27
27
  * A cheap read of the per-org grant-version counter — bumped on every grant/environment/membership change. Consumers (e.g. app-platform delegated-session verify) key a short-lived effective-capability cache by it so a revoked role takes effect at the next miss rather than at token expiry. Fail-closed: an unavailable version store surfaces as a 5xx so the caller denies.
28
- * @summary Current monotonic grant-version for an org (Wave 8.2)
28
+ * @summary Current durable monotonic grant-version for an org
29
29
  */
30
30
  const authorizationControllerGrantVersion = async (orgId, options) => {
31
31
  return (0, custom_fetch_1.customFetch)((0, exports.getAuthorizationControllerGrantVersionUrl)(orgId), {
@@ -3,7 +3,7 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
- import type { AddResourceShareDto, ListVisibleResourcesDto, RegisterResourceOwnershipDto, RemoveResourceShareDto, ResourceOwnershipDtoDataEnvelope, ResourceOwnershipReadDtoDataEnvelope, VisibleResourcesDtoDataEnvelope } from '../../models';
6
+ import type { AddResourceShareDto, ListVisibleResourcesDto, RegisterResourceOwnershipDto, RemoveResourceShareDto, ReplaceResourceOwnershipDto, ResourceOwnershipDtoDataEnvelope, ResourceOwnershipReadDtoDataEnvelope, VisibleResourcesDtoDataEnvelope } from '../../models';
7
7
  export declare const getResourcesControllerRegisterUrl: () => string;
8
8
  /**
9
9
  * Writes the ownership rows + OpenFGA tuples so the PDP ANDs the verb verdict with instance ownership. Idempotent (upsert + ignore-duplicate tuples). Org scope is forced from the caller context.
@@ -22,6 +22,12 @@ export declare const getResourcesControllerGetOwnershipUrl: (type: string, id: s
22
22
  * @summary Read a resource instance’s current visibility + subjects
23
23
  */
24
24
  export declare const resourcesControllerGetOwnership: (type: string, id: string, options?: RequestInit) => Promise<ResourceOwnershipReadDtoDataEnvelope>;
25
+ export declare const getResourcesControllerReplaceOwnershipUrl: (type: string, id: string) => string;
26
+ /**
27
+ * The whole post-state: after this call the instance’s registered subjects are EXACTLY `owners` ∪ `explicitShares`, and a subject named by neither loses its authority row AND its `shared_with` tuple. This is the ONLY surface that can express a revocation as part of a set write — `resource.register` upserts what it is handed and never touches a subject outside that list, so re-registering with a subject removed reports 200 and leaves both its row and its tuple live. Removals delete the tuple BEFORE the row (a crash between them leaves the subject WITHOUT access); additions write the row before the tuple. Serialised per instance by an advisory lock, so two concurrent replaces cannot interleave into a mixed set. Idempotent. Refuses (409 `RESOURCE_SUBJECT_IS_OWNER`) when a currently-registered OWNER is absent from the new `owners` list — dropping or demoting an owner is `resource.deregister`. Org scope is forced from the caller context.
28
+ * @summary REPLACE a resource instance’s ownership set
29
+ */
30
+ export declare const resourcesControllerReplaceOwnership: (type: string, id: string, replaceResourceOwnershipDto: ReplaceResourceOwnershipDto, options?: RequestInit) => Promise<ResourceOwnershipDtoDataEnvelope>;
25
31
  export declare const getResourcesControllerDeregisterUrl: (type: string, id: string) => string;
26
32
  /**
27
33
  * Idempotent — a no-op when the instance was never registered.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resourcesControllerRemoveShare = exports.getResourcesControllerRemoveShareUrl = exports.resourcesControllerAddShare = exports.getResourcesControllerAddShareUrl = exports.resourcesControllerDeregister = exports.getResourcesControllerDeregisterUrl = exports.resourcesControllerGetOwnership = exports.getResourcesControllerGetOwnershipUrl = exports.resourcesControllerListVisible = exports.getResourcesControllerListVisibleUrl = exports.resourcesControllerRegister = exports.getResourcesControllerRegisterUrl = void 0;
3
+ exports.resourcesControllerRemoveShare = exports.getResourcesControllerRemoveShareUrl = exports.resourcesControllerAddShare = exports.getResourcesControllerAddShareUrl = exports.resourcesControllerDeregister = exports.getResourcesControllerDeregisterUrl = exports.resourcesControllerReplaceOwnership = exports.getResourcesControllerReplaceOwnershipUrl = exports.resourcesControllerGetOwnership = exports.getResourcesControllerGetOwnershipUrl = exports.resourcesControllerListVisible = exports.getResourcesControllerListVisibleUrl = exports.resourcesControllerRegister = exports.getResourcesControllerRegisterUrl = void 0;
4
4
  const custom_fetch_1 = require("../../custom-fetch");
5
5
  const getResourcesControllerRegisterUrl = () => {
6
6
  return `/resources`;
@@ -51,6 +51,23 @@ const resourcesControllerGetOwnership = async (type, id, options) => {
51
51
  });
52
52
  };
53
53
  exports.resourcesControllerGetOwnership = resourcesControllerGetOwnership;
54
+ const getResourcesControllerReplaceOwnershipUrl = (type, id) => {
55
+ return `/resources/${type}/${id}`;
56
+ };
57
+ exports.getResourcesControllerReplaceOwnershipUrl = getResourcesControllerReplaceOwnershipUrl;
58
+ /**
59
+ * The whole post-state: after this call the instance’s registered subjects are EXACTLY `owners` ∪ `explicitShares`, and a subject named by neither loses its authority row AND its `shared_with` tuple. This is the ONLY surface that can express a revocation as part of a set write — `resource.register` upserts what it is handed and never touches a subject outside that list, so re-registering with a subject removed reports 200 and leaves both its row and its tuple live. Removals delete the tuple BEFORE the row (a crash between them leaves the subject WITHOUT access); additions write the row before the tuple. Serialised per instance by an advisory lock, so two concurrent replaces cannot interleave into a mixed set. Idempotent. Refuses (409 `RESOURCE_SUBJECT_IS_OWNER`) when a currently-registered OWNER is absent from the new `owners` list — dropping or demoting an owner is `resource.deregister`. Org scope is forced from the caller context.
60
+ * @summary REPLACE a resource instance’s ownership set
61
+ */
62
+ const resourcesControllerReplaceOwnership = async (type, id, replaceResourceOwnershipDto, options) => {
63
+ return (0, custom_fetch_1.customFetch)((0, exports.getResourcesControllerReplaceOwnershipUrl)(type, id), {
64
+ ...options,
65
+ method: 'PUT',
66
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
67
+ body: JSON.stringify(replaceResourceOwnershipDto)
68
+ });
69
+ };
70
+ exports.resourcesControllerReplaceOwnership = resourcesControllerReplaceOwnership;
54
71
  const getResourcesControllerDeregisterUrl = (type, id) => {
55
72
  return `/resources/${type}/${id}`;
56
73
  };
@@ -3,10 +3,8 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
- export type BiomeTrustTier = typeof BiomeTrustTier[keyof typeof BiomeTrustTier];
7
- export declare const BiomeTrustTier: {
6
+ export type BiomeExecutionTrustTier = typeof BiomeExecutionTrustTier[keyof typeof BiomeExecutionTrustTier];
7
+ export declare const BiomeExecutionTrustTier: {
8
8
  readonly official: "official";
9
9
  readonly verified: "verified";
10
- readonly community: "community";
11
- readonly untrusted: "untrusted";
12
10
  };
@@ -5,10 +5,8 @@
5
5
  * OpenAPI spec version: 0.1.1
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.BiomeTrustTier = void 0;
9
- exports.BiomeTrustTier = {
8
+ exports.BiomeExecutionTrustTier = void 0;
9
+ exports.BiomeExecutionTrustTier = {
10
10
  official: 'official',
11
11
  verified: 'verified',
12
- community: 'community',
13
- untrusted: 'untrusted',
14
12
  };
@@ -6,6 +6,7 @@
6
6
  import type { CreateExecutionEnvironmentDtoAllowedCapabilitiesItem } from './createExecutionEnvironmentDtoAllowedCapabilitiesItem.js';
7
7
  import type { CreateExecutionEnvironmentDtoApprovalRulesItem } from './createExecutionEnvironmentDtoApprovalRulesItem.js';
8
8
  import type { CreateExecutionEnvironmentDtoRuntimeLimits } from './createExecutionEnvironmentDtoRuntimeLimits.js';
9
+ import type { DataClassification } from './dataClassification.js';
9
10
  import type { ExecutionEnvironmentKind } from './executionEnvironmentKind.js';
10
11
  export interface CreateExecutionEnvironmentDto {
11
12
  /** Owning organization. Scopes the custom environment to the tenant. */
@@ -21,4 +22,6 @@ export interface CreateExecutionEnvironmentDto {
21
22
  approvalRules?: CreateExecutionEnvironmentDtoApprovalRulesItem[];
22
23
  /** Runtime limits (`RuntimeLimits`). Defaults to `{}`. */
23
24
  runtimeLimits?: CreateExecutionEnvironmentDtoRuntimeLimits;
25
+ /** The environment's DATA ceiling: the most restrictive `DataClassification` an invocation may carry and still run here. The PDP compares it against `join(space floor, resource tag)` and DENIES when it is exceeded. `regulated` (the top of the rank) admits everything and is the default, so the ceiling refuses nothing until it is lowered. Defaults to `regulated`. */
26
+ maxDataClassification?: DataClassification;
24
27
  }
@@ -10,6 +10,7 @@ export type CredentialPrecedenceSource = typeof CredentialPrecedenceSource[keyof
10
10
  export declare const CredentialPrecedenceSource: {
11
11
  readonly explicit: "explicit";
12
12
  readonly capability_default: "capability_default";
13
+ readonly user_default: "user_default";
13
14
  readonly project_default: "project_default";
14
15
  readonly org_default: "org_default";
15
16
  readonly platform_default: "platform_default";
@@ -9,6 +9,7 @@ exports.CredentialPrecedenceSource = void 0;
9
9
  exports.CredentialPrecedenceSource = {
10
10
  explicit: 'explicit',
11
11
  capability_default: 'capability_default',
12
+ user_default: 'user_default',
12
13
  project_default: 'project_default',
13
14
  org_default: 'org_default',
14
15
  platform_default: 'platform_default',
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ /**
7
+ * WHICH row set `maxDataClassification`: the kernel-seeded global row (`platform-built-in`), this org's override of it (`org-override`), or an org-custom environment's own column (`org-custom-environment`). An override that the installation ceiling already swallowed reads as `platform-built-in`, because it is deciding nothing.
8
+ */
9
+ export type EnvironmentCeilingSource = typeof EnvironmentCeilingSource[keyof typeof EnvironmentCeilingSource];
10
+ export declare const EnvironmentCeilingSource: {
11
+ readonly 'platform-built-in': "platform-built-in";
12
+ readonly 'org-override': "org-override";
13
+ readonly 'org-custom-environment': "org-custom-environment";
14
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * Authorization API
5
+ * OpenAPI spec version: 0.1.1
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.EnvironmentCeilingSource = void 0;
9
+ exports.EnvironmentCeilingSource = {
10
+ 'platform-built-in': 'platform-built-in',
11
+ 'org-override': 'org-override',
12
+ 'org-custom-environment': 'org-custom-environment',
13
+ };
@@ -3,6 +3,8 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
+ import type { DataClassification } from './dataClassification.js';
7
+ import type { EnvironmentCeilingSource } from './environmentCeilingSource.js';
6
8
  import type { ExecutionEnvironmentKind } from './executionEnvironmentKind.js';
7
9
  import type { ExecutionEnvironmentResponseDtoAllowedCapabilitiesItem } from './executionEnvironmentResponseDtoAllowedCapabilitiesItem.js';
8
10
  import type { ExecutionEnvironmentResponseDtoApprovalRulesItem } from './executionEnvironmentResponseDtoApprovalRulesItem.js';
@@ -30,6 +32,12 @@ export interface ExecutionEnvironmentResponseDto {
30
32
  approvalRules: ExecutionEnvironmentResponseDtoApprovalRulesItem[];
31
33
  /** Runtime limits (`RuntimeLimits` from the kernel contracts). */
32
34
  runtimeLimits: ExecutionEnvironmentResponseDtoRuntimeLimits;
35
+ /** The environment's DATA ceiling: the most restrictive `DataClassification` an invocation may carry and still run here. The PDP compares it against `join(space floor, resource tag)` and DENIES when it is exceeded. `regulated` (the top of the rank) admits everything and is the default, so the ceiling refuses nothing until it is lowered. */
36
+ maxDataClassification: DataClassification;
37
+ /** The INSTALLATION-wide ceiling for this environment, before any organisation override. Equal to `maxDataClassification` whenever no override is in force. Present so a screen can say "your org lowered this" rather than showing one number and leaving the reader to guess who set it. */
38
+ platformMaxDataClassification: DataClassification;
39
+ /** WHICH row set `maxDataClassification`: the kernel-seeded global row (`platform-built-in`), this org's override of it (`org-override`), or an org-custom environment's own column (`org-custom-environment`). An override that the installation ceiling already swallowed reads as `platform-built-in`, because it is deciding nothing. */
40
+ dataCeilingSource: EnvironmentCeilingSource;
33
41
  createdAt: string;
34
42
  updatedAt: string;
35
43
  }
@@ -6,6 +6,6 @@
6
6
  export interface GrantVersionResponseDto {
7
7
  /** Organization the version belongs to. */
8
8
  orgId: string;
9
- /** Monotonic grant version for this org, folding in changes to org-independent (global) grants. `0` means no relevant grant change has been recorded yet (a valid baseline, not an error). Compare only against a previous value for the SAME org. */
9
+ /** Durable monotonic grant version for this org, folding in changes to org-independent (global) grants. It is an opaque comparison token, not a count: the baseline is a large offset rather than `0`. Compare only against a previous value for the SAME org. */
10
10
  grantVersion: number;
11
11
  }
@@ -12,8 +12,8 @@ export * from './authorizationDecisionCode';
12
12
  export * from './authorizationReasonDto';
13
13
  export * from './authorizationSuggestionDto';
14
14
  export * from './authorizationSuggestionKind';
15
+ export * from './biomeExecutionTrustTier';
15
16
  export * from './biomePermissionProfile';
16
- export * from './biomeTrustTier';
17
17
  export * from './callerKind';
18
18
  export * from './capabilityGrantDto';
19
19
  export * from './capabilityGrantDtoDataEnvelope';
@@ -38,6 +38,7 @@ export * from './dataClassification';
38
38
  export * from './dataResidency';
39
39
  export * from './describeObjectsResponseDto';
40
40
  export * from './describeObjectsResponseDtoDataEnvelope';
41
+ export * from './environmentCeilingSource';
41
42
  export * from './environmentsControllerFindBySlugParams';
42
43
  export * from './environmentsControllerListParams';
43
44
  export * from './environmentsControllerRemoveParams';
@@ -75,6 +76,7 @@ export * from './policyCheckBatchRequestDto';
75
76
  export * from './policyCheckBatchResponseDto';
76
77
  export * from './policyCheckBatchResponseDtoDataEnvelope';
77
78
  export * from './policyCheckRequestDto';
79
+ export * from './policyCheckRequestDtoAperture';
78
80
  export * from './policyConstraintsDto';
79
81
  export * from './policyDecisionDto';
80
82
  export * from './policyDecisionDtoDataEnvelope';
@@ -97,6 +99,7 @@ export * from './provisionedCapabilityDto';
97
99
  export * from './registerResourceOwnershipDto';
98
100
  export * from './relationshipsControllerListParams';
99
101
  export * from './removeResourceShareDto';
102
+ export * from './replaceResourceOwnershipDto';
100
103
  export * from './resourceManagedBy';
101
104
  export * from './resourceOwnershipDto';
102
105
  export * from './resourceOwnershipDtoDataEnvelope';
@@ -29,8 +29,8 @@ __exportStar(require("./authorizationDecisionCode"), exports);
29
29
  __exportStar(require("./authorizationReasonDto"), exports);
30
30
  __exportStar(require("./authorizationSuggestionDto"), exports);
31
31
  __exportStar(require("./authorizationSuggestionKind"), exports);
32
+ __exportStar(require("./biomeExecutionTrustTier"), exports);
32
33
  __exportStar(require("./biomePermissionProfile"), exports);
33
- __exportStar(require("./biomeTrustTier"), exports);
34
34
  __exportStar(require("./callerKind"), exports);
35
35
  __exportStar(require("./capabilityGrantDto"), exports);
36
36
  __exportStar(require("./capabilityGrantDtoDataEnvelope"), exports);
@@ -55,6 +55,7 @@ __exportStar(require("./dataClassification"), exports);
55
55
  __exportStar(require("./dataResidency"), exports);
56
56
  __exportStar(require("./describeObjectsResponseDto"), exports);
57
57
  __exportStar(require("./describeObjectsResponseDtoDataEnvelope"), exports);
58
+ __exportStar(require("./environmentCeilingSource"), exports);
58
59
  __exportStar(require("./environmentsControllerFindBySlugParams"), exports);
59
60
  __exportStar(require("./environmentsControllerListParams"), exports);
60
61
  __exportStar(require("./environmentsControllerRemoveParams"), exports);
@@ -92,6 +93,7 @@ __exportStar(require("./policyCheckBatchRequestDto"), exports);
92
93
  __exportStar(require("./policyCheckBatchResponseDto"), exports);
93
94
  __exportStar(require("./policyCheckBatchResponseDtoDataEnvelope"), exports);
94
95
  __exportStar(require("./policyCheckRequestDto"), exports);
96
+ __exportStar(require("./policyCheckRequestDtoAperture"), exports);
95
97
  __exportStar(require("./policyConstraintsDto"), exports);
96
98
  __exportStar(require("./policyDecisionDto"), exports);
97
99
  __exportStar(require("./policyDecisionDtoDataEnvelope"), exports);
@@ -114,6 +116,7 @@ __exportStar(require("./provisionedCapabilityDto"), exports);
114
116
  __exportStar(require("./registerResourceOwnershipDto"), exports);
115
117
  __exportStar(require("./relationshipsControllerListParams"), exports);
116
118
  __exportStar(require("./removeResourceShareDto"), exports);
119
+ __exportStar(require("./replaceResourceOwnershipDto"), exports);
117
120
  __exportStar(require("./resourceManagedBy"), exports);
118
121
  __exportStar(require("./resourceOwnershipDto"), exports);
119
122
  __exportStar(require("./resourceOwnershipDtoDataEnvelope"), exports);
@@ -3,10 +3,10 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
- import type { BiomeTrustTier } from './biomeTrustTier.js';
6
+ import type { BiomeExecutionTrustTier } from './biomeExecutionTrustTier.js';
7
7
  export interface PolicyBiomeDto {
8
8
  id: string;
9
9
  version: string;
10
- trustTier: BiomeTrustTier;
10
+ trustTier: BiomeExecutionTrustTier;
11
11
  signatureVerified: boolean;
12
12
  }
@@ -8,6 +8,7 @@ import type { PolicyActingForDto } from './policyActingForDto.js';
8
8
  import type { PolicyBiomeDto } from './policyBiomeDto.js';
9
9
  import type { PolicyCallerDto } from './policyCallerDto.js';
10
10
  import type { PolicyCapabilityDto } from './policyCapabilityDto.js';
11
+ import type { PolicyCheckRequestDtoAperture } from './policyCheckRequestDtoAperture.js';
11
12
  import type { PolicyConstraintsDto } from './policyConstraintsDto.js';
12
13
  import type { PolicyEnvironmentDto } from './policyEnvironmentDto.js';
13
14
  import type { PolicyResourceDto } from './policyResourceDto.js';
@@ -32,4 +33,6 @@ export interface PolicyCheckRequestDto {
32
33
  reachTier?: AgentReachTier;
33
34
  /** Role the acting subject holds in the originating agent session. Precedence `owner > editor > viewer`. Absent for non-session invocations (workflow steps, service calls). */
34
35
  participantRole?: SessionParticipantRole;
36
+ /** The acting agent's capability aperture (kernel `CapabilityAperture`): `{ kind: "unrestricted" }` or `{ kind: "armed", refs: string[] }`. Enforced at the capability-router funnel, carried here for the audit trail. */
37
+ aperture?: PolicyCheckRequestDtoAperture;
35
38
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ /**
7
+ * The acting agent's capability aperture (kernel `CapabilityAperture`): `{ kind: "unrestricted" }` or `{ kind: "armed", refs: string[] }`. Enforced at the capability-router funnel, carried here for the audit trail.
8
+ */
9
+ export type PolicyCheckRequestDtoAperture = {
10
+ [key: string]: unknown;
11
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * Authorization API
5
+ * OpenAPI spec version: 0.1.1
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,5 +7,6 @@ import type { DataClassification } from './dataClassification.js';
7
7
  export interface PolicyResourceDto {
8
8
  /** Canonical kernel resource-instance ref `resource:<type>:<id>` naming the instance this invocation targets. Build it with `composeResourceRef(type, id)` from `@xemahq/kernel-contracts/resource`. The server resolves it with `parseResourceRef` and answers `400 RESOURCE_REF_MALFORMED` for any other shape — a bare `<type>:<id>` and an `xema://…` path are BOTH rejected. Omit the whole `resource` block for a verb-only check; do not send a placeholder. */
9
9
  ref: string;
10
- classification: DataClassification;
10
+ /** The classification the target resource carries. OMIT IT when the producer has none to declare — the effective classification is then the Space floor alone, and the request still gets the resource-ownership clamp. Omitting the whole `resource` block is NOT the same thing: that downgrades the call to a verb-only check and discards the ownership clamp. Never send a placeholder value. */
11
+ classification?: DataClassification;
11
12
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ import type { ResourceSubjectRefDto } from './resourceSubjectRefDto.js';
7
+ import type { ResourceVisibilityPattern } from './resourceVisibilityPattern.js';
8
+ export interface ReplaceResourceOwnershipDto {
9
+ /** Instance visibility pattern. The PDP ANDs the verb verdict with the ownership check resolved per this pattern. */
10
+ visibility: ResourceVisibilityPattern;
11
+ /** Subjects that OWN the instance (full visibility). */
12
+ owners: ResourceSubjectRefDto[];
13
+ /** Subjects explicitly granted visibility (shared-with). */
14
+ explicitShares?: ResourceSubjectRefDto[];
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,7 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
+ import type { DataClassification } from './dataClassification.js';
6
7
  import type { UpdateExecutionEnvironmentDtoAllowedCapabilitiesItem } from './updateExecutionEnvironmentDtoAllowedCapabilitiesItem.js';
7
8
  import type { UpdateExecutionEnvironmentDtoApprovalRulesItem } from './updateExecutionEnvironmentDtoApprovalRulesItem.js';
8
9
  import type { UpdateExecutionEnvironmentDtoRuntimeLimits } from './updateExecutionEnvironmentDtoRuntimeLimits.js';
@@ -14,4 +15,6 @@ export interface UpdateExecutionEnvironmentDto {
14
15
  approvalRules?: UpdateExecutionEnvironmentDtoApprovalRulesItem[];
15
16
  /** Runtime limits (`RuntimeLimits`). */
16
17
  runtimeLimits?: UpdateExecutionEnvironmentDtoRuntimeLimits;
18
+ /** The environment's DATA ceiling: the most restrictive `DataClassification` an invocation may carry and still run here. The PDP compares it against `join(space floor, resource tag)` and DENIES when it is exceeded. `regulated` (the top of the rank) admits everything and is the default, so the ceiling refuses nothing until it is lowered. Lowering it is what ARMS the control for this environment. */
19
+ maxDataClassification?: DataClassification;
17
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/authorization-internal-api-client",
3
- "version": "0.3.3",
3
+ "version": "0.3.10",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -19,7 +19,7 @@
19
19
  "service": "authorization-api",
20
20
  "biome": "authorization",
21
21
  "target": "server",
22
- "generator": "@xemahq/api-client-generator@0.12.0",
22
+ "generator": "@xemahq/api-client-generator@0.13.0",
23
23
  "source": "openapi.internal.json"
24
24
  },
25
25
  "license": "LicenseRef-Xema-BSL-1.1",