@astrale-os/kernel-core 0.9.0-beta.63 → 0.9.0-beta.64
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.d.ts +2 -2
- package/dist/auth/authority/admission/admission.js +10 -8
- package/dist/auth/authority/admission/index.d.ts +1 -1
- package/dist/auth/authority/admission/index.js +1 -1
- package/dist/auth/authority/index.d.ts +7 -3
- package/dist/auth/authority/index.js +4 -2
- package/dist/auth/authority/language/index.d.ts +2 -0
- package/dist/auth/authority/language/index.js +1 -0
- package/dist/auth/authority/language/predicate.d.ts +10 -5
- package/dist/auth/authority/language/predicate.js +1 -1
- package/dist/auth/authority/language/program.d.ts +21 -0
- package/dist/auth/authority/language/program.js +2 -0
- package/dist/auth/authority/normalization/index.d.ts +1 -1
- package/dist/auth/authority/normalization/index.js +1 -1
- package/dist/auth/authority/normalization/normalize.d.ts +1 -1
- package/dist/auth/authority/normalization/normalize.js +4 -5
- package/dist/auth/authority/ownership.optimization.js +2 -2
- package/dist/auth/authority/prepare-binder-body.d.ts +4 -0
- package/dist/auth/authority/prepare-binder-body.js +31 -0
- package/dist/auth/authority/program.d.ts +28 -0
- package/dist/auth/authority/program.js +191 -0
- package/dist/auth/authority/semantics/class-authority.d.ts +8 -0
- package/dist/auth/authority/semantics/class-authority.js +26 -0
- package/dist/auth/authority/semantics/composition.d.ts +39 -0
- package/dist/auth/authority/semantics/composition.js +112 -0
- package/dist/auth/authority/semantics/failure.d.ts +21 -0
- package/dist/auth/authority/semantics/failure.js +10 -0
- package/dist/auth/authority/semantics/index.d.ts +11 -0
- package/dist/auth/authority/semantics/index.js +5 -0
- package/dist/auth/authority/semantics/interpret.d.ts +35 -0
- package/dist/auth/authority/semantics/interpret.js +215 -0
- package/dist/auth/authority/semantics/snapshot.d.ts +34 -0
- package/dist/auth/authority/semantics/terms.d.ts +20 -0
- package/dist/auth/authority/semantics/terms.js +96 -0
- package/dist/auth/authority/semantics/vocabulary.d.ts +19 -0
- package/dist/auth/authority/semantics/vocabulary.js +1 -0
- package/dist/auth/context/context.d.ts +4 -3
- package/dist/auth/expression/authoring/builder.d.ts +2 -11
- package/dist/auth/expression/authoring/builder.js +1 -45
- package/dist/auth/expression/authoring/index.d.ts +1 -1
- package/dist/auth/expression/authoring/index.js +1 -1
- package/dist/auth/expression/index.d.ts +1 -2
- package/dist/auth/expression/index.js +1 -2
- package/dist/auth/expression/language/identity-expression.d.ts +2 -22
- package/dist/auth/grant/index.d.ts +1 -1
- package/dist/auth/grant/index.js +1 -1
- package/dist/auth/grant/resolved/admission.d.ts +4 -3
- package/dist/auth/grant/resolved/admission.js +23 -13
- package/dist/auth/grant/resolved/grant.d.ts +1 -1
- package/dist/auth/grant/resolved/index.d.ts +1 -1
- package/dist/auth/grant/resolved/index.js +1 -1
- package/dist/auth/grant/unresolved/admission.d.ts +4 -1
- package/dist/auth/grant/unresolved/admission.js +27 -67
- package/dist/auth/grant/unresolved/limits.d.ts +2 -4
- package/dist/auth/grant/unresolved/limits.js +1 -5
- package/dist/auth/index.d.ts +1 -1
- package/dist/graph/graph/graph.d.ts +1 -5
- package/dist/graph/graph/graph.js +3 -27
- package/dist/graph/graph/index.d.ts +1 -3
- package/dist/graph/graph/index.js +1 -2
- package/dist/graph/query/index.d.ts +2 -0
- package/dist/graph/query/index.js +1 -0
- package/dist/graph/query/order/index.d.ts +46 -0
- package/dist/graph/query/order/index.js +59 -0
- package/dist/graph/query/reference/evaluate.js +24 -50
- package/dist/graph/reconcile/planning/canonical.d.ts +6 -0
- package/dist/graph/reconcile/planning/canonical.js +28 -0
- package/dist/graph/reconcile/planning/model.d.ts +4 -0
- package/dist/graph/reconcile/planning/plan.js +2 -1
- package/dist/schema/authority/vocabulary.d.ts +3 -0
- package/dist/schema/authority/vocabulary.js +25 -0
- package/dist/schema/identity/composition.d.ts +5 -0
- package/dist/schema/identity/composition.js +5 -0
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/kernel/schema.d.ts +140 -140
- package/dist/schema/kernel/syscalls/declarations/index.d.ts +31 -31
- package/dist/schema/kernel/syscalls/declarations/install.d.ts +8 -8
- package/dist/schema/kernel/syscalls/declarations/mutate.d.ts +23 -23
- package/package.json +2 -2
- package/dist/auth/authority/prepare-grant-body.d.ts +0 -4
- package/dist/auth/authority/prepare-grant-body.js +0 -27
- package/dist/auth/expression/normalization/canonicalize.d.ts +0 -7
- package/dist/auth/expression/normalization/canonicalize.js +0 -102
- package/dist/auth/expression/normalization/index.d.ts +0 -2
- package/dist/auth/expression/normalization/index.js +0 -2
- package/dist/auth/expression/normalization/raise-denials.d.ts +0 -3
- package/dist/auth/expression/normalization/raise-denials.js +0 -59
- package/dist/graph/graph/navigation/error.d.ts +0 -12
- package/dist/graph/graph/navigation/error.js +0 -20
- package/dist/graph/graph/navigation/index.d.ts +0 -2
- package/dist/graph/graph/navigation/index.js +0 -1
- package/dist/graph/graph/navigation/model.d.ts +0 -15
- package/dist/schema/kernel/projection/path.d.ts +0 -2
- package/dist/schema/kernel/projection/path.js +0 -113
- /package/dist/{graph/graph/navigation/model.js → auth/authority/semantics/snapshot.js} +0 -0
|
@@ -6,6 +6,7 @@ import { GraphData } from '../../graph/index.js';
|
|
|
6
6
|
import { NodeId as admitNodeId } from '../../node/index.js';
|
|
7
7
|
import { compareNodeIds } from '../../node/index.js';
|
|
8
8
|
import { encodeQueryAST, QueryASTDecodeError } from '../language/index.js';
|
|
9
|
+
import { compareQueryRank } from '../order/index.js';
|
|
9
10
|
import { decodeQueryResult } from '../result/index.js';
|
|
10
11
|
import { QueryReferenceError } from './error.js';
|
|
11
12
|
/** Independent backend-neutral executable Query V6 row algebra. */
|
|
@@ -273,9 +274,13 @@ function decodeWitness(input, path, context) {
|
|
|
273
274
|
}
|
|
274
275
|
function selectNodes(rows, select, size, after, admission, properties) {
|
|
275
276
|
const selected = new Map();
|
|
277
|
+
const ordered = orderedClasses(select.order, 'node', properties);
|
|
276
278
|
rows.forEach((row) => {
|
|
277
279
|
const node = boundNode(row, select.binding, '/select/binding');
|
|
278
|
-
|
|
280
|
+
// A value is read; an ordered reference reads a fact its order applies to before ranking it.
|
|
281
|
+
const needsRead = select.kind === 'graph' ||
|
|
282
|
+
(select.kind === 'nodes' && select.projection.kind === 'value') ||
|
|
283
|
+
ordered.has(node.class);
|
|
279
284
|
if (needsRead && !admission.readNode(node, '/select/binding'))
|
|
280
285
|
return;
|
|
281
286
|
selected.set(node.id, node);
|
|
@@ -305,6 +310,7 @@ function selectNodes(rows, select, size, after, admission, properties) {
|
|
|
305
310
|
}
|
|
306
311
|
function selectEdges(rows, select, size, after, context, admission, properties) {
|
|
307
312
|
const selected = new Map();
|
|
313
|
+
const ordered = orderedClasses(select.order, 'edge', properties);
|
|
308
314
|
rows.forEach((row) => {
|
|
309
315
|
const edge = boundEdge(row, select.binding, '/select/binding');
|
|
310
316
|
const source = requireNode(context, edge.source, '/select/binding');
|
|
@@ -319,7 +325,7 @@ function selectEdges(rows, select, size, after, context, admission, properties)
|
|
|
319
325
|
admission.readNode(source, '/select/binding') &&
|
|
320
326
|
admission.readNode(target, '/select/binding')
|
|
321
327
|
: select.kind === 'edges'
|
|
322
|
-
? (select.projection.edge === 'reference' ||
|
|
328
|
+
? ((select.projection.edge === 'reference' && !ordered.has(edge.class)) ||
|
|
323
329
|
admission.readEdge(edge, '/select/binding')) &&
|
|
324
330
|
(select.projection.source === 'reference' ||
|
|
325
331
|
admission.readNode(source, '/select/binding')) &&
|
|
@@ -362,12 +368,24 @@ function selectEdges(rows, select, size, after, context, admission, properties)
|
|
|
362
368
|
const next = last === undefined ? undefined : frontierOf(last, order, 'edge', properties);
|
|
363
369
|
return Object.freeze({ result, ...(next === undefined ? {} : { next }) });
|
|
364
370
|
}
|
|
371
|
+
/** The Classes a Property order applies to, whose facts are read before they are ranked. */
|
|
372
|
+
function orderedClasses(order, kind, properties) {
|
|
373
|
+
return order === undefined
|
|
374
|
+
? new Set()
|
|
375
|
+
: properties.close(order.property, kind, '/select/order/property');
|
|
376
|
+
}
|
|
365
377
|
function orderingComparator(order, kind, properties) {
|
|
366
|
-
|
|
378
|
+
const ordering = orderingOf(order, kind, properties);
|
|
379
|
+
return (left, right) => compareReferenceRank(rankOf(left, order, kind, properties), rankOf(right, order, kind, properties), order, ordering);
|
|
380
|
+
}
|
|
381
|
+
function orderingOf(order, kind, properties) {
|
|
382
|
+
return order === undefined
|
|
383
|
+
? undefined
|
|
384
|
+
: properties.ordering(order.property, kind, '/select/order/property');
|
|
367
385
|
}
|
|
368
386
|
function compareFrontier(frontier, fact, order, kind, properties) {
|
|
369
387
|
const admitted = decodeReferenceFrontier(frontier, order, kind, properties);
|
|
370
|
-
return compareReferenceRank(admitted, rankOf(fact, order, kind, properties), order);
|
|
388
|
+
return compareReferenceRank(admitted, rankOf(fact, order, kind, properties), order, orderingOf(order, kind, properties));
|
|
371
389
|
}
|
|
372
390
|
function frontierOf(fact, order, kind, properties) {
|
|
373
391
|
const rank = rankOf(fact, order, kind, properties);
|
|
@@ -413,36 +431,8 @@ function decodeReferenceFrontier(frontier, order, kind, properties) {
|
|
|
413
431
|
}
|
|
414
432
|
return Object.freeze({ bucket: 'ranked', value: frontier.value, identity });
|
|
415
433
|
}
|
|
416
|
-
function compareReferenceRank(left, right, order) {
|
|
417
|
-
|
|
418
|
-
return compareIdentity(left.identity, right.identity);
|
|
419
|
-
if (left.bucket !== right.bucket) {
|
|
420
|
-
return left.bucket === 'unranked'
|
|
421
|
-
? order.unranked === 'first'
|
|
422
|
-
? -1
|
|
423
|
-
: 1
|
|
424
|
-
: order.unranked === 'first'
|
|
425
|
-
? 1
|
|
426
|
-
: -1;
|
|
427
|
-
}
|
|
428
|
-
if (left.bucket === 'ranked' && right.bucket === 'ranked') {
|
|
429
|
-
const kind = typeof left.value === 'boolean'
|
|
430
|
-
? 'boolean'
|
|
431
|
-
: typeof left.value === 'number'
|
|
432
|
-
? 'number'
|
|
433
|
-
: 'string';
|
|
434
|
-
const compared = compareOrderingValue(left.value, right.value, kind);
|
|
435
|
-
if (compared !== 0)
|
|
436
|
-
return order.direction === 'asc' ? compared : -compared;
|
|
437
|
-
}
|
|
438
|
-
return compareIdentity(left.identity, right.identity);
|
|
439
|
-
}
|
|
440
|
-
function compareIdentity(left, right) {
|
|
441
|
-
if (typeof left === 'string' && typeof right === 'string')
|
|
442
|
-
return compareNodeIds(left, right);
|
|
443
|
-
if (typeof left !== 'string' && typeof right !== 'string')
|
|
444
|
-
return compareEdgeKeys(left, right);
|
|
445
|
-
invalid('/after/identity', 'Frontier identity kind disagrees with selection');
|
|
434
|
+
function compareReferenceRank(left, right, order, ordering) {
|
|
435
|
+
return compareQueryRank(left, right, order === undefined || ordering === undefined ? undefined : { ...order, kind: ordering });
|
|
446
436
|
}
|
|
447
437
|
function orderingValue(input, kind) {
|
|
448
438
|
if (kind === 'boolean')
|
|
@@ -451,22 +441,6 @@ function orderingValue(input, kind) {
|
|
|
451
441
|
return typeof input === 'number' && Number.isFinite(input);
|
|
452
442
|
return typeof input === 'string';
|
|
453
443
|
}
|
|
454
|
-
function compareOrderingValue(left, right, kind) {
|
|
455
|
-
if (kind === 'boolean')
|
|
456
|
-
return Number(left) - Number(right);
|
|
457
|
-
if (kind === 'number')
|
|
458
|
-
return left - right;
|
|
459
|
-
return compareUnicodeScalars(left, right);
|
|
460
|
-
}
|
|
461
|
-
function compareUnicodeScalars(left, right) {
|
|
462
|
-
const a = Array.from(left, (value) => value.codePointAt(0));
|
|
463
|
-
const b = Array.from(right, (value) => value.codePointAt(0));
|
|
464
|
-
for (let index = 0; index < Math.min(a.length, b.length); index += 1) {
|
|
465
|
-
if (a[index] !== b[index])
|
|
466
|
-
return a[index] - b[index];
|
|
467
|
-
}
|
|
468
|
-
return a.length - b.length;
|
|
469
|
-
}
|
|
470
444
|
function projectNode(node, shape) {
|
|
471
445
|
return shape === 'value'
|
|
472
446
|
? Object.freeze({ kind: 'value', value: node })
|
|
@@ -2,6 +2,12 @@ import { type ObservationRequirement } from '#graph/reconcile/evidence';
|
|
|
2
2
|
import type { Effect, PlanningBlocker, PlanningConflict, Premise, ReconciliationPlan } from './model.js';
|
|
3
3
|
export declare function canonicalRequirements(values: readonly ObservationRequirement[]): ObservationRequirement[];
|
|
4
4
|
export declare function canonicalPremises(values: readonly Premise[]): Premise[];
|
|
5
|
+
/**
|
|
6
|
+
* Distinct desired refs can name one target: an explicit NodeId and a binding whose
|
|
7
|
+
* correspondence observes that Node. Effects with one key and equal content collapse; effects with
|
|
8
|
+
* one key and different content contradict the desired state, which no transition can establish.
|
|
9
|
+
*/
|
|
10
|
+
export declare function contradictoryEffects(values: readonly Effect[]): PlanningConflict[];
|
|
5
11
|
export declare function canonicalEffects(values: readonly Effect[]): Effect[];
|
|
6
12
|
export declare function canonicalConflicts(values: readonly PlanningConflict[]): PlanningConflict[];
|
|
7
13
|
export declare function canonicalBlockers(values: readonly PlanningBlocker[]): PlanningBlocker[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as portable from '@astrale-os/kernel-dsl/value';
|
|
1
2
|
import { freezeRequirement, requirementKey, } from '#graph/reconcile/evidence';
|
|
2
3
|
import { encodeEdgeKey } from '../../edge/index.js';
|
|
3
4
|
export function canonicalRequirements(values) {
|
|
@@ -8,6 +9,30 @@ export function canonicalRequirements(values) {
|
|
|
8
9
|
export function canonicalPremises(values) {
|
|
9
10
|
return [...new Map(values.map((value) => [premiseKey(value), value])).values()].sort(comparePremises);
|
|
10
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Distinct desired refs can name one target: an explicit NodeId and a binding whose
|
|
14
|
+
* correspondence observes that Node. Effects with one key and equal content collapse; effects with
|
|
15
|
+
* one key and different content contradict the desired state, which no transition can establish.
|
|
16
|
+
*/
|
|
17
|
+
export function contradictoryEffects(values) {
|
|
18
|
+
const groups = new Map();
|
|
19
|
+
for (const value of values) {
|
|
20
|
+
const key = effectKey(value);
|
|
21
|
+
const group = groups.get(key) ?? new Map();
|
|
22
|
+
group.set(portable.json.serialize(value), value);
|
|
23
|
+
groups.set(key, group);
|
|
24
|
+
}
|
|
25
|
+
const conflicts = [];
|
|
26
|
+
for (const group of groups.values()) {
|
|
27
|
+
if (group.size < 2)
|
|
28
|
+
continue;
|
|
29
|
+
conflicts.push({
|
|
30
|
+
kind: 'desired-target-contradictory',
|
|
31
|
+
effects: [...group].sort(([left], [right]) => compare(left, right)).map(([, value]) => value),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return conflicts;
|
|
35
|
+
}
|
|
11
36
|
export function canonicalEffects(values) {
|
|
12
37
|
return [...new Map(values.map((value) => [effectKey(value), value])).values()].sort(compareEffects);
|
|
13
38
|
}
|
|
@@ -66,6 +91,9 @@ function freezeConflict(value) {
|
|
|
66
91
|
if (value.kind === 'correspondence-noninjective') {
|
|
67
92
|
return Object.freeze({ ...value, desired: Object.freeze([...value.desired]) });
|
|
68
93
|
}
|
|
94
|
+
if (value.kind === 'desired-target-contradictory') {
|
|
95
|
+
return Object.freeze({ ...value, effects: Object.freeze([...value.effects]) });
|
|
96
|
+
}
|
|
69
97
|
return Object.freeze({ ...value });
|
|
70
98
|
}
|
|
71
99
|
function compare(left, right) {
|
|
@@ -72,6 +72,10 @@ export type PlanningConflict = ReconcileConflict | CorrespondenceConflict | Obse
|
|
|
72
72
|
} | {
|
|
73
73
|
readonly kind: 'node-identity-absent';
|
|
74
74
|
readonly node: NodeId;
|
|
75
|
+
} | {
|
|
76
|
+
/** One effect target reached through aliasing refs with different desired content. */
|
|
77
|
+
readonly kind: 'desired-target-contradictory';
|
|
78
|
+
readonly effects: readonly Effect[];
|
|
75
79
|
};
|
|
76
80
|
export type PlanningBlocker = {
|
|
77
81
|
readonly kind: 'selection-unsatisfied';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fingerprint } from '../condition/index.js';
|
|
2
|
-
import { canonicalBlockers, canonicalConflicts, canonicalEffects, canonicalPremises, canonicalRequirements, createPlan, } from './canonical.js';
|
|
2
|
+
import { canonicalBlockers, canonicalConflicts, canonicalEffects, canonicalPremises, canonicalRequirements, contradictoryEffects, createPlan, } from './canonical.js';
|
|
3
3
|
import { createPlanningContext } from './context.js';
|
|
4
4
|
import { planEdge } from './edge.js';
|
|
5
5
|
import { planNode } from './node.js';
|
|
@@ -13,6 +13,7 @@ export function plan(input) {
|
|
|
13
13
|
planEdge(edge, context);
|
|
14
14
|
for (const selection of input.desired.selections)
|
|
15
15
|
planSelection(selection, context);
|
|
16
|
+
context.conflicts.push(...contradictoryEffects(context.effects));
|
|
16
17
|
if (context.conflicts.length > 0) {
|
|
17
18
|
return Object.freeze({
|
|
18
19
|
kind: 'conflict',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { K } from '../kernel/schema.js';
|
|
2
|
+
/** The Kernel instance of the authority vocabulary; Core Auth interprets authority through it. */
|
|
3
|
+
export const authorityVocabulary = Object.freeze({
|
|
4
|
+
identity: ref(K.classes.Identity.ref),
|
|
5
|
+
composition: Object.freeze({
|
|
6
|
+
extension: ref(K.classes.extends_with.ref),
|
|
7
|
+
constraint: ref(K.classes.constrained_by.ref),
|
|
8
|
+
exclusion: ref(K.classes.excluded_from.ref),
|
|
9
|
+
}),
|
|
10
|
+
capabilities: Object.freeze({
|
|
11
|
+
create: ref(K.classes.can_create.ref),
|
|
12
|
+
read: ref(K.classes.can_read.ref),
|
|
13
|
+
traverse: ref(K.classes.can_traverse.ref),
|
|
14
|
+
update: ref(K.classes.can_update.ref),
|
|
15
|
+
delete: ref(K.classes.can_delete.ref),
|
|
16
|
+
}),
|
|
17
|
+
instanceOf: ref(K.classes.instance_of.ref),
|
|
18
|
+
});
|
|
19
|
+
function ref(value) {
|
|
20
|
+
return Object.freeze({
|
|
21
|
+
origin: value.origin,
|
|
22
|
+
kind: 'class',
|
|
23
|
+
name: value.name,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { type builder } from '@astrale-os/kernel-dsl/v1';
|
|
2
|
+
/**
|
|
3
|
+
* One Identity-composition Edge Class. Each is `noSelf` and `acyclic` on its own; no constraint spans
|
|
4
|
+
* the three Classes, so stored data may hold a cycle that crosses them. Core authority decides every
|
|
5
|
+
* binder whose closure reaches such a cycle false, and no other (AUTH-AUTHORITY-DENOTATION).
|
|
6
|
+
*/
|
|
2
7
|
export declare function identityComposition(role: 'constraint' | 'excluded' | 'extension', description: string): builder.EdgeClass;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { edgeClass } from '@astrale-os/kernel-dsl/v1';
|
|
2
2
|
import { Edge } from '../meta/index.js';
|
|
3
3
|
import { Identity } from './identity.js';
|
|
4
|
+
/**
|
|
5
|
+
* One Identity-composition Edge Class. Each is `noSelf` and `acyclic` on its own; no constraint spans
|
|
6
|
+
* the three Classes, so stored data may hold a cycle that crosses them. Core authority decides every
|
|
7
|
+
* binder whose closure reaches such a cycle false, and no other (AUTH-AUTHORITY-DENOTATION).
|
|
8
|
+
*/
|
|
4
9
|
export function identityComposition(role, description) {
|
|
5
10
|
return edgeClass.directed({
|
|
6
11
|
abstract: false,
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export * as graph from './kernel/projection/index.js';
|
|
|
5
5
|
export * as introspection from './introspection/index.js';
|
|
6
6
|
export * as installation from './installation/index.js';
|
|
7
7
|
export { OperationCore } from './core/index.js';
|
|
8
|
+
export { authorityVocabulary } from './authority/vocabulary.js';
|
package/dist/schema/index.js
CHANGED
|
@@ -4,3 +4,4 @@ export * as graph from './kernel/projection/index.js';
|
|
|
4
4
|
export * as introspection from './introspection/index.js';
|
|
5
5
|
export * as installation from './installation/index.js';
|
|
6
6
|
export { OperationCore } from './core/index.js';
|
|
7
|
+
export { authorityVocabulary } from './authority/vocabulary.js';
|
|
@@ -8469,29 +8469,6 @@ declare const KernelDefinitions: {
|
|
|
8469
8469
|
};
|
|
8470
8470
|
})[];
|
|
8471
8471
|
operations: ({
|
|
8472
|
-
op: "edge.update";
|
|
8473
|
-
edge: {
|
|
8474
|
-
source: string;
|
|
8475
|
-
target: string;
|
|
8476
|
-
class: string;
|
|
8477
|
-
};
|
|
8478
|
-
slug: unknown;
|
|
8479
|
-
props?: {
|
|
8480
|
-
set: Record<string, unknown>;
|
|
8481
|
-
unset: string[];
|
|
8482
|
-
} | undefined;
|
|
8483
|
-
} | {
|
|
8484
|
-
op: "edge.update";
|
|
8485
|
-
edge: {
|
|
8486
|
-
source: string;
|
|
8487
|
-
target: string;
|
|
8488
|
-
class: string;
|
|
8489
|
-
};
|
|
8490
|
-
props: {
|
|
8491
|
-
set: Record<string, unknown>;
|
|
8492
|
-
unset: string[];
|
|
8493
|
-
};
|
|
8494
|
-
} | {
|
|
8495
8472
|
op: "node.create";
|
|
8496
8473
|
as: string;
|
|
8497
8474
|
class: string;
|
|
@@ -8519,6 +8496,29 @@ declare const KernelDefinitions: {
|
|
|
8519
8496
|
};
|
|
8520
8497
|
slug?: unknown;
|
|
8521
8498
|
props: Record<string, unknown>;
|
|
8499
|
+
} | {
|
|
8500
|
+
op: "edge.update";
|
|
8501
|
+
edge: {
|
|
8502
|
+
source: string;
|
|
8503
|
+
target: string;
|
|
8504
|
+
class: string;
|
|
8505
|
+
};
|
|
8506
|
+
slug: unknown;
|
|
8507
|
+
props?: {
|
|
8508
|
+
set: Record<string, unknown>;
|
|
8509
|
+
unset: string[];
|
|
8510
|
+
} | undefined;
|
|
8511
|
+
} | {
|
|
8512
|
+
op: "edge.update";
|
|
8513
|
+
edge: {
|
|
8514
|
+
source: string;
|
|
8515
|
+
target: string;
|
|
8516
|
+
class: string;
|
|
8517
|
+
};
|
|
8518
|
+
props: {
|
|
8519
|
+
set: Record<string, unknown>;
|
|
8520
|
+
unset: string[];
|
|
8521
|
+
};
|
|
8522
8522
|
} | {
|
|
8523
8523
|
op: "edge.delete";
|
|
8524
8524
|
edge: {
|
|
@@ -8563,6 +8563,14 @@ declare const KernelDefinitions: {
|
|
|
8563
8563
|
install: builder.Function<builder.CallableProjection<{
|
|
8564
8564
|
operation: string;
|
|
8565
8565
|
domains: ({
|
|
8566
|
+
publication: {
|
|
8567
|
+
url: string;
|
|
8568
|
+
token?: string | undefined;
|
|
8569
|
+
etag?: string | undefined;
|
|
8570
|
+
};
|
|
8571
|
+
revision?: string | undefined;
|
|
8572
|
+
currentRevision?: string | null | undefined;
|
|
8573
|
+
} | {
|
|
8566
8574
|
artifact: {
|
|
8567
8575
|
digest: string;
|
|
8568
8576
|
mediaType: string;
|
|
@@ -8584,14 +8592,6 @@ declare const KernelDefinitions: {
|
|
|
8584
8592
|
} | undefined;
|
|
8585
8593
|
revision?: string | undefined;
|
|
8586
8594
|
currentRevision?: string | null | undefined;
|
|
8587
|
-
} | {
|
|
8588
|
-
publication: {
|
|
8589
|
-
url: string;
|
|
8590
|
-
token?: string | undefined;
|
|
8591
|
-
etag?: string | undefined;
|
|
8592
|
-
};
|
|
8593
|
-
revision?: string | undefined;
|
|
8594
|
-
currentRevision?: string | null | undefined;
|
|
8595
8595
|
})[];
|
|
8596
8596
|
}, {
|
|
8597
8597
|
readonly mode: 'binary';
|
|
@@ -8966,20 +8966,36 @@ export declare const AuthorityRelations: Readonly<{
|
|
|
8966
8966
|
};
|
|
8967
8967
|
}>;
|
|
8968
8968
|
/** Exact authorized Kernel Functions for which pristine Root receives direct can_use authority. */
|
|
8969
|
-
export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
readonly
|
|
8969
|
+
export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-dsl/v1").ResolvedFunction<import("@astrale-os/kernel-dsl/v1").BinaryInputProjection<{
|
|
8970
|
+
mediaType: string;
|
|
8971
|
+
}>, {
|
|
8972
|
+
readonly mode: 'value';
|
|
8973
|
+
readonly value: {
|
|
8974
|
+
receipt: string;
|
|
8975
|
+
ref: {
|
|
8976
|
+
digest: string;
|
|
8977
|
+
mediaType: string;
|
|
8978
|
+
size: number;
|
|
8979
|
+
};
|
|
8980
|
+
expiresAt: string;
|
|
8981
|
+
};
|
|
8974
8982
|
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
8975
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"
|
|
8983
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"upload"> & {
|
|
8976
8984
|
readonly origin: "kernel.astrale.ai";
|
|
8977
8985
|
};
|
|
8978
|
-
readonly key: "kernel.astrale.ai:function.
|
|
8986
|
+
readonly key: "kernel.astrale.ai:function.upload";
|
|
8979
8987
|
readonly execution: undefined;
|
|
8980
8988
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
8981
8989
|
operation: string;
|
|
8982
8990
|
domains: ({
|
|
8991
|
+
publication: {
|
|
8992
|
+
url: string;
|
|
8993
|
+
token?: string | undefined;
|
|
8994
|
+
etag?: string | undefined;
|
|
8995
|
+
};
|
|
8996
|
+
revision?: string | undefined;
|
|
8997
|
+
currentRevision?: string | null | undefined;
|
|
8998
|
+
} | {
|
|
8983
8999
|
artifact: {
|
|
8984
9000
|
digest: string;
|
|
8985
9001
|
mediaType: string;
|
|
@@ -9001,14 +9017,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9001
9017
|
} | undefined;
|
|
9002
9018
|
revision?: string | undefined;
|
|
9003
9019
|
currentRevision?: string | null | undefined;
|
|
9004
|
-
} | {
|
|
9005
|
-
publication: {
|
|
9006
|
-
url: string;
|
|
9007
|
-
token?: string | undefined;
|
|
9008
|
-
etag?: string | undefined;
|
|
9009
|
-
};
|
|
9010
|
-
revision?: string | undefined;
|
|
9011
|
-
currentRevision?: string | null | undefined;
|
|
9012
9020
|
})[];
|
|
9013
9021
|
}, {
|
|
9014
9022
|
readonly mode: 'binary';
|
|
@@ -9018,39 +9026,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9018
9026
|
};
|
|
9019
9027
|
readonly key: "kernel.astrale.ai:function.install";
|
|
9020
9028
|
readonly execution: undefined;
|
|
9021
|
-
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
9022
|
-
invocation?: {
|
|
9023
|
-
source: string;
|
|
9024
|
-
id: string;
|
|
9025
|
-
} | undefined;
|
|
9026
|
-
topics?: {
|
|
9027
|
-
exact?: string[] | undefined;
|
|
9028
|
-
prefixes?: string[] | undefined;
|
|
9029
|
-
} | undefined;
|
|
9030
|
-
principal?: string | undefined;
|
|
9031
|
-
since?: string | undefined;
|
|
9032
|
-
until?: string | undefined;
|
|
9033
|
-
cursor?: string | undefined;
|
|
9034
|
-
limit?: number | undefined;
|
|
9035
|
-
}, {
|
|
9036
|
-
readonly mode: 'value';
|
|
9037
|
-
readonly value: {
|
|
9038
|
-
records: unknown[];
|
|
9039
|
-
frontier: {
|
|
9040
|
-
id: string;
|
|
9041
|
-
first?: number | undefined;
|
|
9042
|
-
committed: number;
|
|
9043
|
-
durable: number;
|
|
9044
|
-
};
|
|
9045
|
-
cursor?: string | undefined;
|
|
9046
|
-
gap?: unknown;
|
|
9047
|
-
};
|
|
9048
|
-
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
9049
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"journal"> & {
|
|
9050
|
-
readonly origin: "kernel.astrale.ai";
|
|
9051
|
-
};
|
|
9052
|
-
readonly key: "kernel.astrale.ai:function.journal";
|
|
9053
|
-
readonly execution: undefined;
|
|
9054
9029
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
9055
9030
|
ast: {
|
|
9056
9031
|
format: "astrale.graph.mutation";
|
|
@@ -9207,29 +9182,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9207
9182
|
};
|
|
9208
9183
|
})[];
|
|
9209
9184
|
operations: ({
|
|
9210
|
-
op: "edge.update";
|
|
9211
|
-
edge: {
|
|
9212
|
-
source: string;
|
|
9213
|
-
target: string;
|
|
9214
|
-
class: string;
|
|
9215
|
-
};
|
|
9216
|
-
slug: unknown;
|
|
9217
|
-
props?: {
|
|
9218
|
-
set: Record<string, unknown>;
|
|
9219
|
-
unset: string[];
|
|
9220
|
-
} | undefined;
|
|
9221
|
-
} | {
|
|
9222
|
-
op: "edge.update";
|
|
9223
|
-
edge: {
|
|
9224
|
-
source: string;
|
|
9225
|
-
target: string;
|
|
9226
|
-
class: string;
|
|
9227
|
-
};
|
|
9228
|
-
props: {
|
|
9229
|
-
set: Record<string, unknown>;
|
|
9230
|
-
unset: string[];
|
|
9231
|
-
};
|
|
9232
|
-
} | {
|
|
9233
9185
|
op: "node.create";
|
|
9234
9186
|
as: string;
|
|
9235
9187
|
class: string;
|
|
@@ -9257,6 +9209,29 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9257
9209
|
};
|
|
9258
9210
|
slug?: unknown;
|
|
9259
9211
|
props: Record<string, unknown>;
|
|
9212
|
+
} | {
|
|
9213
|
+
op: "edge.update";
|
|
9214
|
+
edge: {
|
|
9215
|
+
source: string;
|
|
9216
|
+
target: string;
|
|
9217
|
+
class: string;
|
|
9218
|
+
};
|
|
9219
|
+
slug: unknown;
|
|
9220
|
+
props?: {
|
|
9221
|
+
set: Record<string, unknown>;
|
|
9222
|
+
unset: string[];
|
|
9223
|
+
} | undefined;
|
|
9224
|
+
} | {
|
|
9225
|
+
op: "edge.update";
|
|
9226
|
+
edge: {
|
|
9227
|
+
source: string;
|
|
9228
|
+
target: string;
|
|
9229
|
+
class: string;
|
|
9230
|
+
};
|
|
9231
|
+
props: {
|
|
9232
|
+
set: Record<string, unknown>;
|
|
9233
|
+
unset: string[];
|
|
9234
|
+
};
|
|
9260
9235
|
} | {
|
|
9261
9236
|
op: "edge.delete";
|
|
9262
9237
|
edge: {
|
|
@@ -9509,6 +9484,17 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9509
9484
|
};
|
|
9510
9485
|
readonly key: "kernel.astrale.ai:function.query";
|
|
9511
9486
|
readonly execution: undefined;
|
|
9487
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
9488
|
+
node: string;
|
|
9489
|
+
property: string;
|
|
9490
|
+
}, {
|
|
9491
|
+
readonly mode: 'binary';
|
|
9492
|
+
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
9493
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"download"> & {
|
|
9494
|
+
readonly origin: "kernel.astrale.ai";
|
|
9495
|
+
};
|
|
9496
|
+
readonly key: "kernel.astrale.ai:function.download";
|
|
9497
|
+
readonly execution: undefined;
|
|
9512
9498
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
9513
9499
|
idempotencyKey: string;
|
|
9514
9500
|
identities: ({
|
|
@@ -9589,51 +9575,38 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9589
9575
|
};
|
|
9590
9576
|
readonly key: "kernel.astrale.ai:function.uninstall";
|
|
9591
9577
|
readonly execution: undefined;
|
|
9592
|
-
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<
|
|
9593
|
-
|
|
9594
|
-
|
|
9578
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
9579
|
+
invocation?: {
|
|
9580
|
+
source: string;
|
|
9581
|
+
id: string;
|
|
9582
|
+
} | undefined;
|
|
9583
|
+
topics?: {
|
|
9584
|
+
exact?: string[] | undefined;
|
|
9585
|
+
prefixes?: string[] | undefined;
|
|
9586
|
+
} | undefined;
|
|
9587
|
+
principal?: string | undefined;
|
|
9588
|
+
since?: string | undefined;
|
|
9589
|
+
until?: string | undefined;
|
|
9590
|
+
cursor?: string | undefined;
|
|
9591
|
+
limit?: number | undefined;
|
|
9592
|
+
}, {
|
|
9595
9593
|
readonly mode: 'value';
|
|
9596
9594
|
readonly value: {
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9595
|
+
records: unknown[];
|
|
9596
|
+
frontier: {
|
|
9597
|
+
id: string;
|
|
9598
|
+
first?: number | undefined;
|
|
9599
|
+
committed: number;
|
|
9600
|
+
durable: number;
|
|
9602
9601
|
};
|
|
9603
|
-
|
|
9602
|
+
cursor?: string | undefined;
|
|
9603
|
+
gap?: unknown;
|
|
9604
9604
|
};
|
|
9605
9605
|
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
9606
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"
|
|
9606
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"journal"> & {
|
|
9607
9607
|
readonly origin: "kernel.astrale.ai";
|
|
9608
9608
|
};
|
|
9609
|
-
readonly key: "kernel.astrale.ai:function.
|
|
9610
|
-
readonly execution: undefined;
|
|
9611
|
-
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
9612
|
-
iss: string;
|
|
9613
|
-
sub: string;
|
|
9614
|
-
}, {
|
|
9615
|
-
readonly mode: 'value';
|
|
9616
|
-
readonly value: {
|
|
9617
|
-
id: string;
|
|
9618
|
-
iss: string;
|
|
9619
|
-
sub: string;
|
|
9620
|
-
frozen: boolean;
|
|
9621
|
-
requiredClaims: ({
|
|
9622
|
-
claim: string;
|
|
9623
|
-
op: "contains";
|
|
9624
|
-
value: unknown;
|
|
9625
|
-
} | {
|
|
9626
|
-
claim: string;
|
|
9627
|
-
op: "eq";
|
|
9628
|
-
value: unknown;
|
|
9629
|
-
} | {
|
|
9630
|
-
claim: string;
|
|
9631
|
-
op: "exists";
|
|
9632
|
-
})[];
|
|
9633
|
-
} | null;
|
|
9634
|
-
}, 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.whois"> & {
|
|
9635
|
-
readonly name: "whois";
|
|
9636
|
-
readonly executable: true;
|
|
9609
|
+
readonly key: "kernel.astrale.ai:function.journal";
|
|
9637
9610
|
readonly execution: undefined;
|
|
9638
9611
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
9639
9612
|
audience?: string | undefined;
|
|
@@ -9690,6 +9663,33 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9690
9663
|
readonly name: "resolve";
|
|
9691
9664
|
readonly executable: true;
|
|
9692
9665
|
readonly execution: undefined;
|
|
9666
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
9667
|
+
iss: string;
|
|
9668
|
+
sub: string;
|
|
9669
|
+
}, {
|
|
9670
|
+
readonly mode: 'value';
|
|
9671
|
+
readonly value: {
|
|
9672
|
+
id: string;
|
|
9673
|
+
iss: string;
|
|
9674
|
+
sub: string;
|
|
9675
|
+
frozen: boolean;
|
|
9676
|
+
requiredClaims: ({
|
|
9677
|
+
claim: string;
|
|
9678
|
+
op: "contains";
|
|
9679
|
+
value: unknown;
|
|
9680
|
+
} | {
|
|
9681
|
+
claim: string;
|
|
9682
|
+
op: "eq";
|
|
9683
|
+
value: unknown;
|
|
9684
|
+
} | {
|
|
9685
|
+
claim: string;
|
|
9686
|
+
op: "exists";
|
|
9687
|
+
})[];
|
|
9688
|
+
} | null;
|
|
9689
|
+
}, 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.whois"> & {
|
|
9690
|
+
readonly name: "whois";
|
|
9691
|
+
readonly executable: true;
|
|
9692
|
+
readonly execution: undefined;
|
|
9693
9693
|
}))[];
|
|
9694
9694
|
export { AuthorityOperationOrder, AuthorityOperations, operationOf } from '../authority/index.js';
|
|
9695
9695
|
export type { AuthorityOperation, AuthorityRelation } from '../authority/index.js';
|