@astrale-os/kernel-core 0.9.0-beta.60 → 0.9.0-beta.61
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/dist/auth/authority/admission/admission.js +2 -4
- package/dist/auth/authority/index.d.ts +1 -1
- package/dist/auth/authority/language/index.d.ts +1 -1
- package/dist/auth/authority/language/predicate.d.ts +5 -3
- package/dist/auth/authority/language/predicate.js +1 -1
- package/dist/auth/authority/normalization/normalize.js +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/schema/kernel/schema.d.ts +19 -19
- package/package.json +1 -1
|
@@ -61,13 +61,11 @@ function admit(input, path, locals, subjectBound, depth) {
|
|
|
61
61
|
};
|
|
62
62
|
case 'related': {
|
|
63
63
|
const hasRepeat = Object.hasOwn(value, 'repeat');
|
|
64
|
-
exact(value, hasRepeat
|
|
65
|
-
? ['classes', 'op', 'repeat', 'source', 'target']
|
|
66
|
-
: ['classes', 'op', 'source', 'target'], path);
|
|
64
|
+
exact(value, hasRepeat ? ['via', 'op', 'repeat', 'source', 'target'] : ['via', 'op', 'source', 'target'], path);
|
|
67
65
|
return {
|
|
68
66
|
op: 'related',
|
|
69
67
|
source: term(value.source, `${path}/source`, locals, subjectBound),
|
|
70
|
-
|
|
68
|
+
via: array(value.via, `${path}/via`, 1, limits.classesPerRelation).map((entry, index) => edgeClassRef(entry, `${path}/via/${index}`)),
|
|
71
69
|
target: term(value.target, `${path}/target`, locals, subjectBound),
|
|
72
70
|
...(hasRepeat ? { repeat: repeat(value.repeat, `${path}/repeat`) } : {}),
|
|
73
71
|
};
|
|
@@ -5,4 +5,4 @@ export { prepareGrantBody } from './prepare-grant-body.js';
|
|
|
5
5
|
export { limits } from './admission/index.js';
|
|
6
6
|
export { canonicalize } from './normalization/index.js';
|
|
7
7
|
export { AUTHORITY_PREDICATE_VERSION } from './language/index.js';
|
|
8
|
-
export type { AuthorityExpr, AuthorityPredicate, ClassRef, Input, LocalDeclaration, Operation, Repeat, Requirement, Term, } from './language/index.js';
|
|
8
|
+
export type { AuthorityExpr, AuthorityPredicate, ClassRef, ClosedEdgeExtent, Input, LocalDeclaration, Operation, Repeat, Requirement, Term, } from './language/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { AUTHORITY_PREDICATE_VERSION } from './predicate.js';
|
|
2
|
-
export type { AuthorityExpr, AuthorityPredicate, ClassRef, Input, LocalDeclaration, Operation, Repeat, Requirement, Term, } from './predicate.js';
|
|
2
|
+
export type { AuthorityExpr, AuthorityPredicate, ClassRef, ClosedEdgeExtent, Input, LocalDeclaration, Operation, Repeat, Requirement, Term, } from './predicate.js';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ClassRef, CoreRef, FunctionRef, PolicyRef, ViewRef, Key } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
2
2
|
import type { NodeId } from '../../../graph/node/index.js';
|
|
3
3
|
import type { Grant } from '../../grant/index.js';
|
|
4
|
-
export declare const AUTHORITY_PREDICATE_VERSION:
|
|
4
|
+
export declare const AUTHORITY_PREDICATE_VERSION: 10;
|
|
5
|
+
/** Concrete Edge Classes selected by Runtime closure, reused at every bounded hop. */
|
|
6
|
+
export type ClosedEdgeExtent = readonly [ClassRef, ...ClassRef[]];
|
|
5
7
|
export type Operation = 'create' | 'read' | 'traverse' | 'update' | 'delete';
|
|
6
8
|
export type Input = 'object' | 'source' | 'target';
|
|
7
9
|
export type { ClassRef } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
@@ -70,10 +72,10 @@ export type AuthorityExpr = {
|
|
|
70
72
|
readonly grant: Grant;
|
|
71
73
|
readonly where: AuthorityExpr;
|
|
72
74
|
} | {
|
|
73
|
-
/** One
|
|
75
|
+
/** One closed Edge extent, reused at every bounded hop. */
|
|
74
76
|
readonly op: 'related';
|
|
75
77
|
readonly source: Term;
|
|
76
|
-
readonly
|
|
78
|
+
readonly via: ClosedEdgeExtent;
|
|
77
79
|
readonly target: Term;
|
|
78
80
|
readonly repeat?: Repeat;
|
|
79
81
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AUTHORITY_PREDICATE_VERSION =
|
|
1
|
+
export const AUTHORITY_PREDICATE_VERSION = 10;
|
|
@@ -60,7 +60,7 @@ function normalize(expr, path, locals, subjectBound) {
|
|
|
60
60
|
return Object.freeze({
|
|
61
61
|
op: 'related',
|
|
62
62
|
source: normalizeTerm(expr.source),
|
|
63
|
-
|
|
63
|
+
via: normalizeClasses(expr.via),
|
|
64
64
|
target: normalizeTerm(expr.target),
|
|
65
65
|
...(expr.repeat === undefined ? {} : { repeat: Object.freeze({ ...expr.repeat }) }),
|
|
66
66
|
});
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { AuthValueError } from './error.js';
|
|
2
2
|
export type { Attestation } from './attestation/index.js';
|
|
3
|
-
export type { AuthorityExpr, AuthorityPredicate } from './authority/language/index.js';
|
|
3
|
+
export type { AuthorityExpr, AuthorityPredicate, ClosedEdgeExtent, } from './authority/language/index.js';
|
|
4
4
|
export type { ClaimConstraint } from './claims/index.js';
|
|
5
5
|
export type { AuthenticationEvidence, AuthenticationMethod, CredentialAudience, CredentialInput, MintedCredential, UnverifiedCredential, VerifiedCredential, } from './credential/index.js';
|
|
6
6
|
export type { AuthContext, Authenticated, CredentialContext } from './context/index.js';
|
|
@@ -9472,6 +9472,25 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9472
9472
|
};
|
|
9473
9473
|
readonly key: "kernel.astrale.ai:function.query";
|
|
9474
9474
|
readonly execution: undefined;
|
|
9475
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<import("@astrale-os/kernel-dsl/v1").BinaryInputProjection<{
|
|
9476
|
+
mediaType: string;
|
|
9477
|
+
}>, {
|
|
9478
|
+
readonly mode: 'value';
|
|
9479
|
+
readonly value: {
|
|
9480
|
+
receipt: string;
|
|
9481
|
+
ref: {
|
|
9482
|
+
digest: string;
|
|
9483
|
+
mediaType: string;
|
|
9484
|
+
size: number;
|
|
9485
|
+
};
|
|
9486
|
+
expiresAt: string;
|
|
9487
|
+
};
|
|
9488
|
+
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
9489
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"upload"> & {
|
|
9490
|
+
readonly origin: "kernel.astrale.ai";
|
|
9491
|
+
};
|
|
9492
|
+
readonly key: "kernel.astrale.ai:function.upload";
|
|
9493
|
+
readonly execution: undefined;
|
|
9475
9494
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
9476
9495
|
idempotencyKey: string;
|
|
9477
9496
|
identities: ({
|
|
@@ -9545,25 +9564,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9545
9564
|
};
|
|
9546
9565
|
readonly key: "kernel.astrale.ai:function.uninstall";
|
|
9547
9566
|
readonly execution: undefined;
|
|
9548
|
-
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<import("@astrale-os/kernel-dsl/v1").BinaryInputProjection<{
|
|
9549
|
-
mediaType: string;
|
|
9550
|
-
}>, {
|
|
9551
|
-
readonly mode: 'value';
|
|
9552
|
-
readonly value: {
|
|
9553
|
-
receipt: string;
|
|
9554
|
-
ref: {
|
|
9555
|
-
digest: string;
|
|
9556
|
-
mediaType: string;
|
|
9557
|
-
size: number;
|
|
9558
|
-
};
|
|
9559
|
-
expiresAt: string;
|
|
9560
|
-
};
|
|
9561
|
-
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
9562
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"upload"> & {
|
|
9563
|
-
readonly origin: "kernel.astrale.ai";
|
|
9564
|
-
};
|
|
9565
|
-
readonly key: "kernel.astrale.ai:function.upload";
|
|
9566
|
-
readonly execution: undefined;
|
|
9567
9567
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
9568
9568
|
audience?: string | undefined;
|
|
9569
9569
|
ttlSeconds: number;
|