@astrale-os/kernel-core 0.9.0-beta.60 → 0.9.0-beta.62

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.
@@ -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
- classes: array(value.classes, `${path}/classes`, 1, limits.classesPerRelation).map((entry, index) => edgeClassRef(entry, `${path}/classes/${index}`)),
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: 9;
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 concrete Class relation extent, reused at every bounded hop. */
75
+ /** One closed Edge extent, reused at every bounded hop. */
74
76
  readonly op: 'related';
75
77
  readonly source: Term;
76
- readonly classes: readonly [ClassRef, ...ClassRef[]];
78
+ readonly via: ClosedEdgeExtent;
77
79
  readonly target: Term;
78
80
  readonly repeat?: Repeat;
79
81
  } | {
@@ -1 +1 @@
1
- export const AUTHORITY_PREDICATE_VERSION = 9;
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
- classes: normalizeClasses(expr.classes),
63
+ via: normalizeClasses(expr.via),
64
64
  target: normalizeTerm(expr.target),
65
65
  ...(expr.repeat === undefined ? {} : { repeat: Object.freeze({ ...expr.repeat }) }),
66
66
  });
@@ -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';
@@ -1,15 +1,13 @@
1
- import type { Key, Revision } from '@astrale-os/kernel-dsl/v1/addressing';
1
+ import type { Key } from '@astrale-os/kernel-dsl/v1/addressing';
2
2
  import type { Value } from '@astrale-os/kernel-dsl/value';
3
3
  import { type NodePath } from '@astrale-os/kernel-core/path';
4
4
  /**
5
5
  * One declaration, optionally bound to an instance and to the caller's expectation of it: the
6
- * declaring Domain revision, or the fingerprint of the callable meaning it compiled against.
6
+ * fingerprint of the callable meaning it compiled against.
7
7
  */
8
8
  export type Target = {
9
9
  readonly callable: Key.Callable;
10
10
  readonly instance?: NodePath;
11
- /** @deprecated Pin the callable meaning with `fingerprint`; revision pinning will be removed. */
12
- readonly revision?: Revision;
13
11
  readonly fingerprint?: `sha256:${string}`;
14
12
  };
15
13
  /** Capture a structured invocation target at a representation boundary. */
@@ -1,21 +1,16 @@
1
1
  import { Path } from '@astrale-os/kernel-core/path';
2
- import { callableAddress, patterns } from '@astrale-os/kernel-dsl/v1/addressing';
2
+ import { callableAddress } from '@astrale-os/kernel-dsl/v1/addressing';
3
3
  const FINGERPRINT_PATTERN = /^sha256:[0-9a-f]{64}$/u;
4
4
  /** Capture a structured invocation target at a representation boundary. */
5
5
  export function Target(input) {
6
6
  if (input === null ||
7
7
  typeof input !== 'object' ||
8
8
  Array.isArray(input) ||
9
- Reflect.ownKeys(input).some((field) => !['callable', 'instance', 'revision', 'fingerprint'].includes(String(field)))) {
10
- throw new TypeError('Invocation Target must contain only callable, instance, revision and fingerprint.');
9
+ Reflect.ownKeys(input).some((field) => !['callable', 'instance', 'fingerprint'].includes(String(field)))) {
10
+ throw new TypeError('Invocation Target must contain only callable, instance and fingerprint.');
11
11
  }
12
12
  const callable = input.callable;
13
13
  const coordinate = callableAddress(callable);
14
- const revision = input.revision;
15
- if (revision !== undefined &&
16
- (typeof revision !== 'string' || !patterns.revision.test(revision))) {
17
- throw new TypeError('Invocation Target revision is invalid.');
18
- }
19
14
  const fingerprint = input.fingerprint;
20
15
  if (fingerprint !== undefined &&
21
16
  (typeof fingerprint !== 'string' || !FINGERPRINT_PATTERN.test(fingerprint))) {
@@ -30,7 +25,6 @@ export function Target(input) {
30
25
  return Object.freeze({
31
26
  callable,
32
27
  ...(instance === undefined ? {} : { instance: instance.raw }),
33
- ...(revision === undefined ? {} : { revision }),
34
28
  ...(fingerprint === undefined ? {} : { fingerprint }),
35
29
  });
36
30
  }
@@ -2529,7 +2529,6 @@ export declare const Function: builder.NodeClass<{
2529
2529
  target: string | {
2530
2530
  callable: string;
2531
2531
  instance?: string | undefined;
2532
- revision?: string | undefined;
2533
2532
  fingerprint?: string | undefined;
2534
2533
  };
2535
2534
  input: unknown;
@@ -3489,7 +3488,6 @@ export declare const Function: builder.NodeClass<{
3489
3488
  target: string | {
3490
3489
  callable: string;
3491
3490
  instance?: string | undefined;
3492
- revision?: string | undefined;
3493
3491
  fingerprint?: string | undefined;
3494
3492
  };
3495
3493
  input: unknown;
@@ -6684,7 +6684,6 @@ declare const KernelDefinitions: {
6684
6684
  target: string | {
6685
6685
  callable: string;
6686
6686
  instance?: string | undefined;
6687
- revision?: string | undefined;
6688
6687
  fingerprint?: string | undefined;
6689
6688
  };
6690
6689
  input: unknown;
@@ -7644,7 +7643,6 @@ declare const KernelDefinitions: {
7644
7643
  target: string | {
7645
7644
  callable: string;
7646
7645
  instance?: string | undefined;
7647
- revision?: string | undefined;
7648
7646
  fingerprint?: string | undefined;
7649
7647
  };
7650
7648
  input: unknown;
@@ -8944,16 +8942,24 @@ export declare const AuthorityRelations: Readonly<{
8944
8942
  };
8945
8943
  }>;
8946
8944
  /** Exact authorized Kernel Functions for which pristine Root receives direct can_use authority. */
8947
- export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
8948
- node: string;
8949
- property: string;
8950
- }, {
8951
- readonly mode: 'binary';
8945
+ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-dsl/v1").ResolvedFunction<import("@astrale-os/kernel-dsl/v1").BinaryInputProjection<{
8946
+ mediaType: string;
8947
+ }>, {
8948
+ readonly mode: 'value';
8949
+ readonly value: {
8950
+ receipt: string;
8951
+ ref: {
8952
+ digest: string;
8953
+ mediaType: string;
8954
+ size: number;
8955
+ };
8956
+ expiresAt: string;
8957
+ };
8952
8958
  }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
8953
- readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"download"> & {
8959
+ readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"upload"> & {
8954
8960
  readonly origin: "kernel.astrale.ai";
8955
8961
  };
8956
- readonly key: "kernel.astrale.ai:function.download";
8962
+ readonly key: "kernel.astrale.ai:function.upload";
8957
8963
  readonly execution: undefined;
8958
8964
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
8959
8965
  operation: string;
@@ -8981,39 +8987,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
8981
8987
  };
8982
8988
  readonly key: "kernel.astrale.ai:function.install";
8983
8989
  readonly execution: undefined;
8984
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
8985
- invocation?: {
8986
- source: string;
8987
- id: string;
8988
- } | undefined;
8989
- topics?: {
8990
- exact?: string[] | undefined;
8991
- prefixes?: string[] | undefined;
8992
- } | undefined;
8993
- principal?: string | undefined;
8994
- since?: string | undefined;
8995
- until?: string | undefined;
8996
- cursor?: string | undefined;
8997
- limit?: number | undefined;
8998
- }, {
8999
- readonly mode: 'value';
9000
- readonly value: {
9001
- records: unknown[];
9002
- frontier: {
9003
- id: string;
9004
- first?: number | undefined;
9005
- committed: number;
9006
- durable: number;
9007
- };
9008
- cursor?: string | undefined;
9009
- gap?: unknown;
9010
- };
9011
- }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
9012
- readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"journal"> & {
9013
- readonly origin: "kernel.astrale.ai";
9014
- };
9015
- readonly key: "kernel.astrale.ai:function.journal";
9016
- readonly execution: undefined;
9017
8990
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
9018
8991
  ast: {
9019
8992
  format: "astrale.graph.mutation";
@@ -9472,6 +9445,17 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
9472
9445
  };
9473
9446
  readonly key: "kernel.astrale.ai:function.query";
9474
9447
  readonly execution: undefined;
9448
+ }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
9449
+ node: string;
9450
+ property: string;
9451
+ }, {
9452
+ readonly mode: 'binary';
9453
+ }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
9454
+ readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"download"> & {
9455
+ readonly origin: "kernel.astrale.ai";
9456
+ };
9457
+ readonly key: "kernel.astrale.ai:function.download";
9458
+ readonly execution: undefined;
9475
9459
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
9476
9460
  idempotencyKey: string;
9477
9461
  identities: ({
@@ -9545,36 +9529,38 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
9545
9529
  };
9546
9530
  readonly key: "kernel.astrale.ai:function.uninstall";
9547
9531
  readonly execution: undefined;
9548
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<import("@astrale-os/kernel-dsl/v1").BinaryInputProjection<{
9549
- mediaType: string;
9550
- }>, {
9532
+ }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
9533
+ invocation?: {
9534
+ source: string;
9535
+ id: string;
9536
+ } | undefined;
9537
+ topics?: {
9538
+ exact?: string[] | undefined;
9539
+ prefixes?: string[] | undefined;
9540
+ } | undefined;
9541
+ principal?: string | undefined;
9542
+ since?: string | undefined;
9543
+ until?: string | undefined;
9544
+ cursor?: string | undefined;
9545
+ limit?: number | undefined;
9546
+ }, {
9551
9547
  readonly mode: 'value';
9552
9548
  readonly value: {
9553
- receipt: string;
9554
- ref: {
9555
- digest: string;
9556
- mediaType: string;
9557
- size: number;
9549
+ records: unknown[];
9550
+ frontier: {
9551
+ id: string;
9552
+ first?: number | undefined;
9553
+ committed: number;
9554
+ durable: number;
9558
9555
  };
9559
- expiresAt: string;
9556
+ cursor?: string | undefined;
9557
+ gap?: unknown;
9560
9558
  };
9561
9559
  }, "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"> & {
9560
+ readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"journal"> & {
9563
9561
  readonly origin: "kernel.astrale.ai";
9564
9562
  };
9565
- readonly key: "kernel.astrale.ai:function.upload";
9566
- readonly execution: undefined;
9567
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
9568
- audience?: string | undefined;
9569
- ttlSeconds: number;
9570
- grant?: unknown;
9571
- identity: string;
9572
- }, {
9573
- readonly mode: 'value';
9574
- readonly value: string;
9575
- }, true, false, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.impersonate"> & {
9576
- readonly name: "impersonate";
9577
- readonly executable: true;
9563
+ readonly key: "kernel.astrale.ai:function.journal";
9578
9564
  readonly execution: undefined;
9579
9565
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
9580
9566
  iss: string;
@@ -9646,6 +9632,18 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
9646
9632
  readonly name: "resolve";
9647
9633
  readonly executable: true;
9648
9634
  readonly execution: undefined;
9635
+ }) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
9636
+ audience?: string | undefined;
9637
+ ttlSeconds: number;
9638
+ grant?: unknown;
9639
+ identity: string;
9640
+ }, {
9641
+ readonly mode: 'value';
9642
+ readonly value: string;
9643
+ }, true, false, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.impersonate"> & {
9644
+ readonly name: "impersonate";
9645
+ readonly executable: true;
9646
+ readonly execution: undefined;
9649
9647
  }))[];
9650
9648
  export { AuthorityOperationOrder, AuthorityOperations, operationOf } from '../authority/index.js';
9651
9649
  export type { AuthorityOperation, AuthorityRelation } from '../authority/index.js';
@@ -3,7 +3,6 @@ export declare const admitInput: import("zod").ZodObject<{
3
3
  target: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
4
4
  callable: import("zod").ZodString;
5
5
  instance: import("zod").ZodOptional<import("zod").ZodString>;
6
- revision: import("zod").ZodOptional<import("zod").ZodString>;
7
6
  fingerprint: import("zod").ZodOptional<import("zod").ZodString>;
8
7
  }, import("zod/v4/core").$strict>]>;
9
8
  input: import("zod").ZodUnknown;
@@ -6,8 +6,6 @@ export const admitInput = strictObject({
6
6
  strictObject({
7
7
  callable: string().min(1),
8
8
  instance: string().min(1).optional(),
9
- // Deprecated revision pin, retained until every client pins by fingerprint.
10
- revision: string().min(1).optional(),
11
9
  fingerprint: string().min(1).optional(),
12
10
  }),
13
11
  ]),
@@ -4,7 +4,6 @@ export declare const Admit: builder.Method<builder.CallableProjection<{
4
4
  target: string | {
5
5
  callable: string;
6
6
  instance?: string | undefined;
7
- revision?: string | undefined;
8
7
  fingerprint?: string | undefined;
9
8
  };
10
9
  input: unknown;
@@ -684,7 +684,6 @@ export declare const FunctionMethods: Readonly<{
684
684
  target: string | {
685
685
  callable: string;
686
686
  instance?: string | undefined;
687
- revision?: string | undefined;
688
687
  fingerprint?: string | undefined;
689
688
  };
690
689
  input: unknown;
@@ -5,7 +5,6 @@ declare const Admit: import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
5
5
  target: string | {
6
6
  callable: string;
7
7
  instance?: string | undefined;
8
- revision?: string | undefined;
9
8
  fingerprint?: string | undefined;
10
9
  };
11
10
  input: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-core",
3
- "version": "0.9.0-beta.60",
3
+ "version": "0.9.0-beta.62",
4
4
  "description": "Astrale Kernel Core - Types, Invariants, and Pure Logic",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -160,7 +160,7 @@
160
160
  "access": "public"
161
161
  },
162
162
  "dependencies": {
163
- "@astrale-os/kernel-dsl": "0.2.0-beta.43",
163
+ "@astrale-os/kernel-dsl": "0.2.0-beta.44",
164
164
  "@noble/hashes": "2.3.0",
165
165
  "@types/json-schema": "^7.0.15",
166
166
  "dequal": "2.0.3"