@astrale-os/kernel-protocol 0.5.0-beta.27 → 0.5.0-beta.29
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/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,35 @@
|
|
|
24
24
|
* the first supported V2 release is a coordinated `1.0.0`, not a compatible continuation of the
|
|
25
25
|
current `0.x` line; package and wire versions remain independent as specified in
|
|
26
26
|
[the protocol architecture](./.spec/architecture.md)
|
|
27
|
+
## [0.5.0-beta.29](https://github.com/astrale-os/kernel/compare/kernel-protocol-v0.5.0-beta.28...kernel-protocol-v0.5.0-beta.29) (2026-08-30)
|
|
28
|
+
|
|
29
|
+
### ⚠ BREAKING CHANGES
|
|
30
|
+
|
|
31
|
+
* **publication:** capability requirements use `authority` instead of `admin`; the legacy key is rejected
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* **publication:** name authority requirements explicitly ([#560](https://github.com/astrale-os/kernel/issues/560))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
* The following workspace dependencies were updated
|
|
42
|
+
* dependencies
|
|
43
|
+
* @astrale-os/kernel-core bumped to 0.9.0-beta.28
|
|
44
|
+
* @astrale-os/kernel-dsl bumped to 0.2.0-beta.21
|
|
45
|
+
|
|
46
|
+
## [0.5.0-beta.28](https://github.com/astrale-os/kernel/compare/kernel-protocol-v0.5.0-beta.27...kernel-protocol-v0.5.0-beta.28) (2026-08-30)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Dependencies
|
|
50
|
+
|
|
51
|
+
* The following workspace dependencies were updated
|
|
52
|
+
* dependencies
|
|
53
|
+
* @astrale-os/kernel-core bumped to 0.9.0-beta.27
|
|
54
|
+
* @astrale-os/kernel-dsl bumped to 0.2.0-beta.20
|
|
55
|
+
|
|
27
56
|
## [0.5.0-beta.27](https://github.com/astrale-os/kernel/compare/kernel-protocol-v0.5.0-beta.26...kernel-protocol-v0.5.0-beta.27) (2026-08-29)
|
|
28
57
|
|
|
29
58
|
|
|
@@ -10,7 +10,7 @@ export { PublicationError, type PublicationErrorCode } from './error.js';
|
|
|
10
10
|
export * as delivery from './delivery/index.js';
|
|
11
11
|
export type { Authentication as DeliveryAuthentication, Endpoint as DeliveryEndpoint, } from './delivery-endpoint.js';
|
|
12
12
|
export type { Manifest } from './manifest.js';
|
|
13
|
-
export { ClassOperationOrder, admitRequirements, validateRequirements, type
|
|
13
|
+
export { ClassOperationOrder, admitRequirements, validateRequirements, type CapabilityAuthorityRequirements, type CapabilityRequirements, type ClassCapabilityRequirement, type ClassOperation, type NonEmpty, type PublicationRequirements, } from './requirements.js';
|
|
14
14
|
export { acceptReference, compareReference, compareReferences, matchesReference, reference, type PublicationRef, type PublicationReferenceRelation, } from './reference.js';
|
|
15
15
|
export type { BodyPick, CredentialSource, HttpMethod, HttpRoute, HttpRouteDeclaration, RouteBody, RouteHeaders, SingleCredentialSource, } from './route.js';
|
|
16
16
|
export type { Schema } from './schema.js';
|
|
@@ -8,14 +8,14 @@ export interface ClassCapabilityRequirement {
|
|
|
8
8
|
readonly class: ClassRef;
|
|
9
9
|
readonly operations: NonEmpty<ClassOperation>;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface CapabilityAuthorityRequirements {
|
|
12
12
|
readonly grant?: NonEmpty<AuthorityOperation>;
|
|
13
13
|
readonly revoke?: NonEmpty<AuthorityOperation>;
|
|
14
14
|
}
|
|
15
15
|
export interface CapabilityRequirements {
|
|
16
16
|
readonly functions?: NonEmpty<SemanticKey.Callable>;
|
|
17
17
|
readonly classes?: NonEmpty<ClassCapabilityRequirement>;
|
|
18
|
-
readonly
|
|
18
|
+
readonly authority?: CapabilityAuthorityRequirements;
|
|
19
19
|
}
|
|
20
20
|
export interface PublicationRequirements {
|
|
21
21
|
readonly capabilities: CapabilityRequirements;
|
|
@@ -15,7 +15,7 @@ export function admitRequirements(input) {
|
|
|
15
15
|
const requirements = record(input, 'PUBLICATION_INVALID', 'Publication requirements are invalid.');
|
|
16
16
|
exact(requirements, ['capabilities'], 'PUBLICATION_INVALID');
|
|
17
17
|
const capabilities = record(requirements.capabilities, 'PUBLICATION_INVALID', 'Publication capability requirements are invalid.');
|
|
18
|
-
exact(capabilities, ['
|
|
18
|
+
exact(capabilities, ['authority', 'classes', 'functions'], 'PUBLICATION_INVALID');
|
|
19
19
|
const functions = capabilities.functions === undefined
|
|
20
20
|
? undefined
|
|
21
21
|
: nonEmpty(capabilities.functions, 'Function capability requirements').map(admitCallable);
|
|
@@ -30,7 +30,9 @@ export function admitRequirements(input) {
|
|
|
30
30
|
unique(classes.map((entry) => classKey(entry.class)), 'PUBLICATION_INVALID', 'Class capability requirement');
|
|
31
31
|
canonical(classes, (left, right) => compare(classKey(left.class), classKey(right.class)), 'Class capability requirements');
|
|
32
32
|
}
|
|
33
|
-
const
|
|
33
|
+
const authority = capabilities.authority === undefined
|
|
34
|
+
? undefined
|
|
35
|
+
: admitAuthorityRequirements(capabilities.authority);
|
|
34
36
|
return deepFreeze({
|
|
35
37
|
capabilities: {
|
|
36
38
|
...(functions === undefined
|
|
@@ -39,7 +41,7 @@ export function admitRequirements(input) {
|
|
|
39
41
|
...(classes === undefined
|
|
40
42
|
? {}
|
|
41
43
|
: { classes: Object.freeze(classes) }),
|
|
42
|
-
...(
|
|
44
|
+
...(authority === undefined ? {} : { authority }),
|
|
43
45
|
},
|
|
44
46
|
});
|
|
45
47
|
}
|
|
@@ -101,14 +103,14 @@ function admitClassRequirement(input) {
|
|
|
101
103
|
operations: Object.freeze(operations),
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
|
-
function
|
|
105
|
-
const
|
|
106
|
-
exact(
|
|
107
|
-
if (
|
|
108
|
-
fail('PUBLICATION_INVALID', '
|
|
106
|
+
function admitAuthorityRequirements(input) {
|
|
107
|
+
const authority = record(input, 'PUBLICATION_INVALID', 'Authority capability requirements are invalid.');
|
|
108
|
+
exact(authority, ['grant', 'revoke'], 'PUBLICATION_INVALID');
|
|
109
|
+
if (authority.grant === undefined && authority.revoke === undefined) {
|
|
110
|
+
fail('PUBLICATION_INVALID', 'Authority capability requirements cannot be empty.');
|
|
109
111
|
}
|
|
110
|
-
const grant = admitAuthorityOperations(
|
|
111
|
-
const revoke = admitAuthorityOperations(
|
|
112
|
+
const grant = admitAuthorityOperations(authority.grant, 'grant');
|
|
113
|
+
const revoke = admitAuthorityOperations(authority.revoke, 'revoke');
|
|
112
114
|
return Object.freeze({
|
|
113
115
|
...(grant === undefined ? {} : { grant }),
|
|
114
116
|
...(revoke === undefined ? {} : { revoke }),
|
|
@@ -117,9 +119,9 @@ function admitAdminRequirements(input) {
|
|
|
117
119
|
function admitAuthorityOperations(input, kind) {
|
|
118
120
|
if (input === undefined)
|
|
119
121
|
return undefined;
|
|
120
|
-
const values = nonEmpty(input, `
|
|
121
|
-
unique(values, 'PUBLICATION_INVALID', `
|
|
122
|
-
canonical(values, ordered(AuthorityOperationOrder), `
|
|
122
|
+
const values = nonEmpty(input, `Authority ${kind} operations`).map((entry) => admitOperation(entry, AuthorityOperationOrder, `Authority ${kind} operation`));
|
|
123
|
+
unique(values, 'PUBLICATION_INVALID', `authority ${kind} operation`);
|
|
124
|
+
canonical(values, ordered(AuthorityOperationOrder), `Authority ${kind} operations`);
|
|
123
125
|
return Object.freeze(values);
|
|
124
126
|
}
|
|
125
127
|
function admitClassRef(input) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/kernel-protocol",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.29",
|
|
4
4
|
"description": "Portable Astrale invocation, publication, installation, routing, and issuer protocols",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -133,8 +133,8 @@
|
|
|
133
133
|
"access": "public"
|
|
134
134
|
},
|
|
135
135
|
"dependencies": {
|
|
136
|
-
"@astrale-os/kernel-core": "0.9.0-beta.
|
|
137
|
-
"@astrale-os/kernel-dsl": "0.2.0-beta.
|
|
136
|
+
"@astrale-os/kernel-core": "0.9.0-beta.28",
|
|
137
|
+
"@astrale-os/kernel-dsl": "0.2.0-beta.21",
|
|
138
138
|
"@noble/hashes": "2.3.0"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|