@xemahq/contracts 0.76.0 → 0.78.0
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.
- package/README.md +1 -1
- package/dist/.source-stamp.json +2 -2
- package/dist/authorization-module/index.d.ts +2 -0
- package/dist/authorization-module/index.d.ts.map +1 -1
- package/dist/authorization-module/index.js +2 -0
- package/dist/authorization-module/index.js.map +1 -1
- package/dist/authorization-module/lib/authorization-composition-error.d.ts +11 -0
- package/dist/authorization-module/lib/authorization-composition-error.d.ts.map +1 -1
- package/dist/authorization-module/lib/authorization-composition-error.js +16 -1
- package/dist/authorization-module/lib/authorization-composition-error.js.map +1 -1
- package/dist/authorization-module/lib/authorization-interface-requirements.d.ts +5 -1
- package/dist/authorization-module/lib/authorization-interface-requirements.d.ts.map +1 -1
- package/dist/authorization-module/lib/authorization-interface-requirements.js +1 -0
- package/dist/authorization-module/lib/authorization-interface-requirements.js.map +1 -1
- package/dist/authorization-module/lib/authorization-module-contribution.d.ts +24 -0
- package/dist/authorization-module/lib/authorization-module-contribution.d.ts.map +1 -1
- package/dist/authorization-module/lib/authorization-module-contribution.js +1 -0
- package/dist/authorization-module/lib/authorization-module-contribution.js.map +1 -1
- package/dist/authorization-module/lib/authorization-module-envelope.d.ts +11 -0
- package/dist/authorization-module/lib/authorization-module-envelope.d.ts.map +1 -1
- package/dist/authorization-module/lib/authorization-module-envelope.js +4 -0
- package/dist/authorization-module/lib/authorization-module-envelope.js.map +1 -1
- package/dist/authorization-module/lib/delegation-origination.d.ts +26 -0
- package/dist/authorization-module/lib/delegation-origination.d.ts.map +1 -0
- package/dist/authorization-module/lib/delegation-origination.js +43 -0
- package/dist/authorization-module/lib/delegation-origination.js.map +1 -0
- package/dist/authorization-module/lib/delegation-wildcard-ceiling.d.ts +6 -0
- package/dist/authorization-module/lib/delegation-wildcard-ceiling.d.ts.map +1 -0
- package/dist/authorization-module/lib/delegation-wildcard-ceiling.js +17 -0
- package/dist/authorization-module/lib/delegation-wildcard-ceiling.js.map +1 -0
- package/dist/authorization-module/lib/platform-authorization-modules.d.ts.map +1 -1
- package/dist/authorization-module/lib/platform-authorization-modules.js +10 -11
- package/dist/authorization-module/lib/platform-authorization-modules.js.map +1 -1
- package/dist/authorization-module/platform/xema_core.fga +76 -45
- package/dist/authorization-module/platform/xema_core.fga.yaml +522 -97
- package/dist/authorization-module/platform/xema_sharing.fga +48 -33
- package/dist/authorization-module/platform/xema_sharing.fga.yaml +555 -2
- package/dist/authorization-module/server/authorization-interface-conformance.d.ts +1 -0
- package/dist/authorization-module/server/authorization-interface-conformance.d.ts.map +1 -1
- package/dist/authorization-module/server/authorization-interface-conformance.js +13 -1
- package/dist/authorization-module/server/authorization-interface-conformance.js.map +1 -1
- package/dist/authorization-module/server/compose-authorization-base.d.ts +2 -0
- package/dist/authorization-module/server/compose-authorization-base.d.ts.map +1 -1
- package/dist/authorization-module/server/compose-authorization-base.js +15 -2
- package/dist/authorization-module/server/compose-authorization-base.js.map +1 -1
- package/dist/authorization-module/server/delegation-origination-conformance.d.ts +15 -0
- package/dist/authorization-module/server/delegation-origination-conformance.d.ts.map +1 -0
- package/dist/authorization-module/server/delegation-origination-conformance.js +92 -0
- package/dist/authorization-module/server/delegation-origination-conformance.js.map +1 -0
- package/dist/authorization-module/server/userset-subject-types.d.ts +3 -0
- package/dist/authorization-module/server/userset-subject-types.d.ts.map +1 -0
- package/dist/authorization-module/server/userset-subject-types.js +65 -0
- package/dist/authorization-module/server/userset-subject-types.js.map +1 -0
- package/dist/authzen/index.d.ts +1 -0
- package/dist/authzen/index.d.ts.map +1 -1
- package/dist/authzen/index.js +1 -0
- package/dist/authzen/index.js.map +1 -1
- package/dist/authzen/lib/durable-delegation-model.d.ts +33 -11
- package/dist/authzen/lib/durable-delegation-model.d.ts.map +1 -1
- package/dist/authzen/lib/durable-delegation-model.js +54 -16
- package/dist/authzen/lib/durable-delegation-model.js.map +1 -1
- package/dist/authzen/lib/xema-membership.d.ts +6 -0
- package/dist/authzen/lib/xema-membership.d.ts.map +1 -0
- package/dist/authzen/lib/xema-membership.js +16 -0
- package/dist/authzen/lib/xema-membership.js.map +1 -0
- package/dist/biome-dependency/lib/peer-seam-table.d.ts +1 -0
- package/dist/biome-dependency/lib/peer-seam-table.d.ts.map +1 -1
- package/dist/biome-dependency/lib/peer-seam-table.js +2 -1
- package/dist/biome-dependency/lib/peer-seam-table.js.map +1 -1
- package/dist/deployment/lib/resolved-deployment.d.ts +29 -4
- package/dist/deployment/lib/resolved-deployment.d.ts.map +1 -1
- package/dist/deployment/lib/resolved-deployment.js +57 -17
- package/dist/deployment/lib/resolved-deployment.js.map +1 -1
- package/dist/distribution/index.d.ts +5 -1
- package/dist/distribution/index.d.ts.map +1 -1
- package/dist/distribution/index.js +6 -0
- package/dist/distribution/index.js.map +1 -1
- package/dist/distribution/lib/authorization-lock.d.ts +16 -0
- package/dist/distribution/lib/authorization-lock.d.ts.map +1 -0
- package/dist/distribution/lib/authorization-lock.js +34 -0
- package/dist/distribution/lib/authorization-lock.js.map +1 -0
- package/dist/distribution/lib/customer-edition-definition.d.ts +10 -1
- package/dist/distribution/lib/customer-edition-definition.d.ts.map +1 -1
- package/dist/distribution/lib/customer-edition-definition.js +53 -2
- package/dist/distribution/lib/customer-edition-definition.js.map +1 -1
- package/dist/distribution/lib/delivered-biome.d.ts +2 -2
- package/dist/distribution/lib/delivered-biome.d.ts.map +1 -1
- package/dist/distribution/lib/delivered-biome.js.map +1 -1
- package/dist/distribution/lib/distribution-lock.d.ts +2 -1
- package/dist/distribution/lib/distribution-lock.d.ts.map +1 -1
- package/dist/distribution/lib/distribution-lock.js +24 -0
- package/dist/distribution/lib/distribution-lock.js.map +1 -1
- package/dist/distribution/lib/image-producer-evidence.d.ts +86 -14
- package/dist/distribution/lib/image-producer-evidence.d.ts.map +1 -1
- package/dist/distribution/lib/image-producer-evidence.js +72 -12
- package/dist/distribution/lib/image-producer-evidence.js.map +1 -1
- package/dist/distribution/lib/kernel-contract-authority.d.ts +1 -0
- package/dist/distribution/lib/kernel-contract-authority.d.ts.map +1 -1
- package/dist/distribution/lib/kernel-contract-authority.js +6 -2
- package/dist/distribution/lib/kernel-contract-authority.js.map +1 -1
- package/dist/distribution/lib/kernel-contract-source-paths.d.ts +1 -1
- package/dist/distribution/lib/kernel-contract-source-paths.d.ts.map +1 -1
- package/dist/distribution/lib/kernel-contract-source-paths.js +9 -0
- package/dist/distribution/lib/kernel-contract-source-paths.js.map +1 -1
- package/dist/distribution/lib/nexus-endpoint-specs.d.ts +2 -2
- package/dist/distribution/lib/nexus-endpoint-specs.d.ts.map +1 -1
- package/dist/distribution/lib/nexus-endpoint-specs.js.map +1 -1
- package/dist/distribution/lib/resolve-unsplit-deployment.d.ts +16 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.d.ts.map +1 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.js +48 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.js.map +1 -0
- package/dist/distribution/lib/runtime-image-source-index.d.ts +18 -1
- package/dist/distribution/lib/runtime-image-source-index.d.ts.map +1 -1
- package/dist/distribution/lib/runtime-image-source-index.js +38 -2
- package/dist/distribution/lib/runtime-image-source-index.js.map +1 -1
- package/dist/distribution/lib/verified-resolved-deployment.d.ts +12 -2
- package/dist/distribution/lib/verified-resolved-deployment.d.ts.map +1 -1
- package/dist/distribution/lib/verify-delivered-locks.d.ts +41 -0
- package/dist/distribution/lib/verify-delivered-locks.d.ts.map +1 -0
- package/dist/distribution/lib/verify-delivered-locks.js +76 -0
- package/dist/distribution/lib/verify-delivered-locks.js.map +1 -0
- package/dist/distribution/lib/verify-resolved-deployment.d.ts +27 -7
- package/dist/distribution/lib/verify-resolved-deployment.d.ts.map +1 -1
- package/dist/distribution/lib/verify-resolved-deployment.js +61 -4
- package/dist/distribution/lib/verify-resolved-deployment.js.map +1 -1
- package/dist/distribution/server/index.d.ts +8 -0
- package/dist/distribution/server/index.d.ts.map +1 -0
- package/dist/distribution/server/index.js +34 -0
- package/dist/distribution/server/index.js.map +1 -0
- package/dist/edition-protocol/edition-contract.schema.json +1 -1
- package/dist/edition-protocol/edition-protocol.json +1 -1
- package/dist/edition-protocol/lib/edition-protocol.d.ts +2 -1
- package/dist/edition-protocol/lib/edition-protocol.d.ts.map +1 -1
- package/dist/edition-protocol/lib/edition-protocol.js +4 -2
- package/dist/edition-protocol/lib/edition-protocol.js.map +1 -1
- package/dist/redis-key/index.d.ts +1 -0
- package/dist/redis-key/index.d.ts.map +1 -1
- package/dist/redis-key/index.js +1 -0
- package/dist/redis-key/index.js.map +1 -1
- package/dist/redis-key/lib/deployment-acl-policy.d.ts.map +1 -1
- package/dist/redis-key/lib/deployment-acl-policy.js +1 -0
- package/dist/redis-key/lib/deployment-acl-policy.js.map +1 -1
- package/dist/redis-key/lib/erasure-request.d.ts +6 -0
- package/dist/redis-key/lib/erasure-request.d.ts.map +1 -0
- package/dist/redis-key/lib/erasure-request.js +75 -0
- package/dist/redis-key/lib/erasure-request.js.map +1 -0
- package/dist/redis-key/lib/lease-acl-policy.d.ts.map +1 -1
- package/dist/redis-key/lib/lease-acl-policy.js +2 -0
- package/dist/redis-key/lib/lease-acl-policy.js.map +1 -1
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.d.ts +4 -1
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.d.ts.map +1 -1
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.js +80 -1
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.js.map +1 -1
- package/dist/service-registry/lib/on-behalf-descriptor.d.ts.map +1 -1
- package/dist/service-registry/lib/on-behalf-descriptor.js.map +1 -1
- package/dist/service-registry/lib/service-descriptor.d.ts +6 -0
- package/dist/service-registry/lib/service-descriptor.d.ts.map +1 -1
- package/dist/service-registry/lib/service-descriptor.js +16 -1
- package/dist/service-registry/lib/service-descriptor.js.map +1 -1
- package/package.json +5 -2
|
@@ -43,6 +43,16 @@ module xema_core
|
|
|
43
43
|
# originate a durable delegation whose authority OWNER is this subject?". It
|
|
44
44
|
# grants no capability, scope or holder. These are the zero-configuration
|
|
45
45
|
# defaults; a biome can never extend a platform type, so nothing widens them.
|
|
46
|
+
#
|
|
47
|
+
# Who may originate over an ANCHOR (`deriveDelegationOriginationChecks`,
|
|
48
|
+
# `@xemahq/contracts/authzen`, the one derivation every consumer uses):
|
|
49
|
+
# "Originating a delegation for an anchor requires `originate` on the anchor.
|
|
50
|
+
# When the anchor's `owner` is a USER, it ALSO requires `may_delegate_for` on
|
|
51
|
+
# that user for the initiator (by default `is_self`: the initiator IS the
|
|
52
|
+
# owner; a deployment may only tighten it). An org admin or a configurer cannot
|
|
53
|
+
# originate over a user-owned anchor. When the owner is the ORG, `originate`
|
|
54
|
+
# alone admits: the authority lent is the org's, the initiator only originates
|
|
55
|
+
# and is recorded as `authorisedBy`."
|
|
46
56
|
type user
|
|
47
57
|
relations
|
|
48
58
|
define is_self: [user]
|
|
@@ -54,10 +64,11 @@ type app
|
|
|
54
64
|
type external-subject
|
|
55
65
|
|
|
56
66
|
# An ORGANIZATION as a DELEGATOR — never a member of anything, never granted
|
|
57
|
-
# anything. It appears only as the OWNER of an org-owned session
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
67
|
+
# anything. It appears only as the OWNER of an org-owned session: no relation
|
|
68
|
+
# evaluates `owner` for a user, and acting in such a session is by the
|
|
69
|
+
# delegation it is bound to, checked by the service that owns it. Its
|
|
70
|
+
# MANAGEMENT follows the owning space: the org's admins, through the
|
|
71
|
+
# session's `owner_org` (see `xema_session`).
|
|
61
72
|
type organization
|
|
62
73
|
|
|
63
74
|
type org
|
|
@@ -86,13 +97,26 @@ type role
|
|
|
86
97
|
define parent: [org]
|
|
87
98
|
define assignee: [user, agent, service, app, team#member]
|
|
88
99
|
|
|
100
|
+
# A MEMBERSHIP is one INSTANCE of a user's membership of an org, and is what a
|
|
101
|
+
# human resource grant binds to (`membership#holder`), not the user and org.
|
|
102
|
+
# Identity gives a NEW membership id on every join. The holder tuple
|
|
103
|
+
# (`user:<u> holder membership:<o|m>`) is written on join and DELETED on leave;
|
|
104
|
+
# a role change keeps the id and writes nothing. So a grant bound to a
|
|
105
|
+
# membership ends with it and never revives on rejoin (a new id), while a
|
|
106
|
+
# demotion keeps it. The object id is the org-qualified `org|membershipId`, so
|
|
107
|
+
# org erasure enumerates it by org.
|
|
108
|
+
type membership
|
|
109
|
+
relations
|
|
110
|
+
define parent: [org]
|
|
111
|
+
define holder: [user]
|
|
112
|
+
|
|
89
113
|
type project
|
|
90
114
|
relations
|
|
91
115
|
define parent: [org, ${XEMA_PARENT_TYPES}]
|
|
92
|
-
define owner: [
|
|
93
|
-
define admin: [
|
|
94
|
-
define editor: [
|
|
95
|
-
define viewer: [
|
|
116
|
+
define owner: [membership#holder, agent, service]
|
|
117
|
+
define admin: [membership#holder, agent, team#member, role#assignee]
|
|
118
|
+
define editor: [membership#holder, agent, team#member, role#assignee]
|
|
119
|
+
define viewer: [membership#holder, agent, team#member, role#assignee, org#member]
|
|
96
120
|
define xema_admin: owner or admin or xema_admin from parent
|
|
97
121
|
define xema_write: editor or xema_admin or xema_write from parent
|
|
98
122
|
define xema_read: viewer or xema_write or xema_read from parent
|
|
@@ -102,28 +126,53 @@ type project
|
|
|
102
126
|
# the anchored object gains nothing — and it exists so the PDP's delegation
|
|
103
127
|
# scope walk (which follows `parent` AND `anchor`) keeps the session and its
|
|
104
128
|
# descendants inside the delegation's scope. An org-owned session writes
|
|
105
|
-
# `owner` (organization) and `anchor`, and no `parent` and no
|
|
129
|
+
# `owner` (organization), `owner_org` and `anchor`, and no `parent` and no
|
|
130
|
+
# `participant`.
|
|
131
|
+
#
|
|
132
|
+
# `parent` is the AUDIENCE the launcher stated (relation `parent`): its readers
|
|
133
|
+
# READ the session (`xema_read from parent`) and nothing more. It is never the
|
|
134
|
+
# owning space and never confers management.
|
|
135
|
+
#
|
|
136
|
+
# `owner_org` is the OWNING SPACE (owner rule 10-09: authority follows the
|
|
137
|
+
# owning space). It is written ONLY for an org-owned session, never for a
|
|
138
|
+
# user-owned one (a personal session gives org admins no implicit authority),
|
|
139
|
+
# and the org's admins MANAGE the session through it (`admin from owner_org`):
|
|
140
|
+
# read, write and administer, exactly what `owner` permits apart from acting.
|
|
141
|
+
# Sessions have no team owner, so the relation admits `org` only.
|
|
106
142
|
#
|
|
107
143
|
# `can_act` is the human turn/interrupt permission (editor/owner). Human
|
|
108
144
|
# session relations never confer workload execution authority; that requires
|
|
109
|
-
# the session's verified launch delegation. It derives NOTHING from `parent
|
|
145
|
+
# the session's verified launch delegation. It derives NOTHING from `parent`
|
|
146
|
+
# or `owner_org`: an org admin manages an org-owned session but never acts as
|
|
147
|
+
# it.
|
|
110
148
|
#
|
|
111
|
-
# Managing the session (`xema_write` / `xema_admin`) is the
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
#
|
|
115
|
-
# explicit governance capability; inherited manage does not exist.
|
|
149
|
+
# Managing the session (`xema_write` / `xema_admin`) is the owner, or the
|
|
150
|
+
# owning org's admins for an org-owned session. It derives NOTHING from
|
|
151
|
+
# `parent`: a parent reader, a parent writer or an org admin reaching it only
|
|
152
|
+
# through the parent READS the session; they neither act in it nor manage it.
|
|
116
153
|
# An `editor` is also a reader.
|
|
154
|
+
#
|
|
155
|
+
# `participant` and `editor` are org-scoped grants to a PERSON, so each admits
|
|
156
|
+
# `membership#holder` (the person's membership instance) in place of `user`:
|
|
157
|
+
# leaving ends the grant and a rejoin (a new membership id) never revives it; a
|
|
158
|
+
# demotion keeps the id and so the grant. An agent stays an agent.
|
|
159
|
+
#
|
|
160
|
+
# `owner` admits BOTH person subjects, and the writer picks by the session's
|
|
161
|
+
# OWNING SPACE: `user` ONLY for a PERSONAL session (its owning space is the
|
|
162
|
+
# user), so the ownership is the user's own and survives the user leaving any
|
|
163
|
+
# org; `membership#holder` for an org-scoped person grant, which goes inert on
|
|
164
|
+
# leave and never revives on rejoin, like `participant` and `editor`.
|
|
117
165
|
type xema_session
|
|
118
166
|
relations
|
|
119
167
|
define parent: [org, project, ${XEMA_PARENT_TYPES}]
|
|
120
168
|
define anchor: [org, project, ${XEMA_PARENT_TYPES}]
|
|
121
|
-
define owner: [user, agent, organization]
|
|
122
|
-
define participant: [
|
|
123
|
-
define editor: [
|
|
124
|
-
define
|
|
125
|
-
define
|
|
126
|
-
define
|
|
169
|
+
define owner: [user, membership#holder, agent, organization]
|
|
170
|
+
define participant: [membership#holder, agent]
|
|
171
|
+
define editor: [membership#holder, agent]
|
|
172
|
+
define owner_org: [org]
|
|
173
|
+
define xema_admin: owner or admin from owner_org
|
|
174
|
+
define xema_write: owner or admin from owner_org
|
|
175
|
+
define xema_read: owner or participant or editor or xema_read from parent or admin from owner_org
|
|
127
176
|
define can_read: xema_read
|
|
128
177
|
define can_write: xema_write
|
|
129
178
|
define can_act: owner or editor
|
|
@@ -131,34 +180,16 @@ type xema_session
|
|
|
131
180
|
type xema_artifact
|
|
132
181
|
relations
|
|
133
182
|
define parent: [org, project, xema_session, ${XEMA_PARENT_TYPES}]
|
|
134
|
-
define owner: [
|
|
183
|
+
define owner: [membership#holder, agent, service]
|
|
135
184
|
define can_delete: owner or xema_admin from parent
|
|
136
185
|
define can_write: owner or xema_write from parent
|
|
137
186
|
define can_read: owner or can_write or xema_read from parent
|
|
138
187
|
define xema_read: can_read
|
|
139
188
|
|
|
140
|
-
# ── Durable delegation:
|
|
141
|
-
#
|
|
142
|
-
# Generic plumbing, not a business noun. An integration INSTANCE (a
|
|
143
|
-
# connection's sync, a mailbox intake, a scheduled workflow) is the thing a
|
|
144
|
-
# durable delegation is created FOR; its owning service writes these facts:
|
|
145
|
-
#
|
|
146
|
-
# parent — the org it belongs to;
|
|
147
|
-
# active — `xema_integration:<o>|<id>#active@org:<o>`, present iff the
|
|
148
|
-
# integration is ACTIVE (removed BEFORE a disable commits);
|
|
149
|
-
# holder — the workload declared as its executor;
|
|
150
|
-
# bound_scope — each opaque scope (`xema_scope`) it is bound to;
|
|
151
|
-
# configurer — who may configure it, beside the org's administrators.
|
|
189
|
+
# ── Durable delegation: the opaque scopes a delegation anchor binds ───────
|
|
152
190
|
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
191
|
+
# Generic plumbing, not a business noun. A biome declares its own delegation
|
|
192
|
+
# ANCHOR type (implementing `xema.delegation-anchor`) and binds each opaque
|
|
193
|
+
# scope ref to it through `bound_scope: [xema_scope]`; this type is that
|
|
194
|
+
# subject.
|
|
155
195
|
type xema_scope
|
|
156
|
-
|
|
157
|
-
type xema_integration
|
|
158
|
-
relations
|
|
159
|
-
define parent: [org]
|
|
160
|
-
define active: [org]
|
|
161
|
-
define holder: [service]
|
|
162
|
-
define bound_scope: [xema_scope]
|
|
163
|
-
define configurer: [user, team#member]
|
|
164
|
-
define configure: configurer or admin from parent
|