@astrale-os/kernel-core 0.9.0-beta.49 → 0.9.0-beta.50
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/callable/invocation/call.d.ts +6 -1
- package/dist/callable/invocation/call.js +9 -2
- package/dist/schema/callables/function.d.ts +2 -0
- package/dist/schema/introspection/language.d.ts +3 -0
- package/dist/schema/kernel/schema.d.ts +322 -320
- package/dist/schema/kernel/syscalls/contracts/admit.d.ts +1 -0
- package/dist/schema/kernel/syscalls/contracts/admit.js +2 -0
- package/dist/schema/kernel/syscalls/contracts/introspect.d.ts +1 -0
- package/dist/schema/kernel/syscalls/contracts/introspect.js +1 -1
- package/dist/schema/kernel/syscalls/declarations/admit.d.ts +1 -0
- package/dist/schema/kernel/syscalls/declarations/index.d.ts +2 -1
- package/dist/schema/kernel/syscalls/declarations/introspect.d.ts +1 -1
- package/dist/schema/kernel/syscalls/descriptors/function.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { Key, Revision } 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
|
+
* 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.
|
|
7
|
+
*/
|
|
5
8
|
export type Target = {
|
|
6
9
|
readonly callable: Key.Callable;
|
|
7
10
|
readonly instance?: NodePath;
|
|
11
|
+
/** @deprecated Pin the callable meaning with `fingerprint`; revision pinning will be removed. */
|
|
8
12
|
readonly revision?: Revision;
|
|
13
|
+
readonly fingerprint?: `sha256:${string}`;
|
|
9
14
|
};
|
|
10
15
|
/** Capture a structured invocation target at a representation boundary. */
|
|
11
16
|
export declare function Target(input: Target): Target;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Path } from '@astrale-os/kernel-core/path';
|
|
2
2
|
import { callableAddress, patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
3
|
+
const FINGERPRINT_PATTERN = /^sha256:[0-9a-f]{64}$/u;
|
|
3
4
|
/** Capture a structured invocation target at a representation boundary. */
|
|
4
5
|
export function Target(input) {
|
|
5
6
|
if (input === null ||
|
|
6
7
|
typeof input !== 'object' ||
|
|
7
8
|
Array.isArray(input) ||
|
|
8
|
-
Reflect.ownKeys(input).some((field) => !['callable', 'instance', 'revision'].includes(String(field)))) {
|
|
9
|
-
throw new TypeError('Invocation Target must contain only callable, instance and
|
|
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.');
|
|
10
11
|
}
|
|
11
12
|
const callable = input.callable;
|
|
12
13
|
const coordinate = callableAddress(callable);
|
|
@@ -15,6 +16,11 @@ export function Target(input) {
|
|
|
15
16
|
(typeof revision !== 'string' || !patterns.revision.test(revision))) {
|
|
16
17
|
throw new TypeError('Invocation Target revision is invalid.');
|
|
17
18
|
}
|
|
19
|
+
const fingerprint = input.fingerprint;
|
|
20
|
+
if (fingerprint !== undefined &&
|
|
21
|
+
(typeof fingerprint !== 'string' || !FINGERPRINT_PATTERN.test(fingerprint))) {
|
|
22
|
+
throw new TypeError('Invocation Target fingerprint is invalid.');
|
|
23
|
+
}
|
|
18
24
|
const suppliedInstance = input.instance;
|
|
19
25
|
const instance = suppliedInstance === undefined ? undefined : Path.parse(suppliedInstance);
|
|
20
26
|
if (instance !== undefined &&
|
|
@@ -25,6 +31,7 @@ export function Target(input) {
|
|
|
25
31
|
callable,
|
|
26
32
|
...(instance === undefined ? {} : { instance: instance.raw }),
|
|
27
33
|
...(revision === undefined ? {} : { revision }),
|
|
34
|
+
...(fingerprint === undefined ? {} : { fingerprint }),
|
|
28
35
|
});
|
|
29
36
|
}
|
|
30
37
|
/** Project an admitted target to its canonical graph path without discarding the original Call. */
|
|
@@ -33,6 +33,7 @@ export declare const Function: builder.NodeClass<{
|
|
|
33
33
|
callable: string;
|
|
34
34
|
instance?: string | undefined;
|
|
35
35
|
revision?: string | undefined;
|
|
36
|
+
fingerprint?: string | undefined;
|
|
36
37
|
};
|
|
37
38
|
input: unknown;
|
|
38
39
|
};
|
|
@@ -62,6 +63,7 @@ export declare const Function: builder.NodeClass<{
|
|
|
62
63
|
callable: string;
|
|
63
64
|
instance?: string | undefined;
|
|
64
65
|
revision?: string | undefined;
|
|
66
|
+
fingerprint?: string | undefined;
|
|
65
67
|
};
|
|
66
68
|
input: unknown;
|
|
67
69
|
};
|
|
@@ -3632,6 +3632,7 @@ declare const KernelDefinitions: {
|
|
|
3632
3632
|
callable: string;
|
|
3633
3633
|
instance?: string | undefined;
|
|
3634
3634
|
revision?: string | undefined;
|
|
3635
|
+
fingerprint?: string | undefined;
|
|
3635
3636
|
};
|
|
3636
3637
|
input: unknown;
|
|
3637
3638
|
};
|
|
@@ -3661,6 +3662,7 @@ declare const KernelDefinitions: {
|
|
|
3661
3662
|
callable: string;
|
|
3662
3663
|
instance?: string | undefined;
|
|
3663
3664
|
revision?: string | undefined;
|
|
3665
|
+
fingerprint?: string | undefined;
|
|
3664
3666
|
};
|
|
3665
3667
|
input: unknown;
|
|
3666
3668
|
};
|
|
@@ -4548,7 +4550,7 @@ declare const KernelDefinitions: {
|
|
|
4548
4550
|
readonly mode: 'binary';
|
|
4549
4551
|
}, "authorized", false, false>>;
|
|
4550
4552
|
introspect: builder.Function<builder.CallableProjection<{
|
|
4551
|
-
kind: "bundle" | "inspect";
|
|
4553
|
+
kind: "bundle" | "dependencies" | "inspect";
|
|
4552
4554
|
origin: string;
|
|
4553
4555
|
}, {
|
|
4554
4556
|
readonly mode: 'binary';
|
|
@@ -4909,6 +4911,31 @@ export declare const AuthorityRelations: Readonly<{
|
|
|
4909
4911
|
}>;
|
|
4910
4912
|
/** Exact authorized Kernel Functions for which pristine Root receives direct can_use authority. */
|
|
4911
4913
|
export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
4914
|
+
operation: string;
|
|
4915
|
+
domains: ({
|
|
4916
|
+
artifact: {
|
|
4917
|
+
digest: string;
|
|
4918
|
+
mediaType: string;
|
|
4919
|
+
size: number;
|
|
4920
|
+
};
|
|
4921
|
+
currentRevision?: string | null | undefined;
|
|
4922
|
+
} | {
|
|
4923
|
+
publication: {
|
|
4924
|
+
url: string;
|
|
4925
|
+
token?: string | undefined;
|
|
4926
|
+
etag?: string | undefined;
|
|
4927
|
+
};
|
|
4928
|
+
revision?: string | undefined;
|
|
4929
|
+
currentRevision?: string | null | undefined;
|
|
4930
|
+
})[];
|
|
4931
|
+
}, {
|
|
4932
|
+
readonly mode: 'binary';
|
|
4933
|
+
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
4934
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"install"> & {
|
|
4935
|
+
readonly origin: "kernel.astrale.ai";
|
|
4936
|
+
};
|
|
4937
|
+
readonly key: "kernel.astrale.ai:function.install";
|
|
4938
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
4912
4939
|
invocation?: {
|
|
4913
4940
|
source: string;
|
|
4914
4941
|
id: string;
|
|
@@ -4940,259 +4967,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
4940
4967
|
readonly origin: "kernel.astrale.ai";
|
|
4941
4968
|
};
|
|
4942
4969
|
readonly key: "kernel.astrale.ai:function.journal";
|
|
4943
|
-
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
4944
|
-
idempotencyKey: string;
|
|
4945
|
-
identities: ({
|
|
4946
|
-
id: string;
|
|
4947
|
-
mode: "external";
|
|
4948
|
-
credential: string;
|
|
4949
|
-
} | {
|
|
4950
|
-
id: string;
|
|
4951
|
-
mode: "self";
|
|
4952
|
-
publicKey: unknown;
|
|
4953
|
-
credential: string;
|
|
4954
|
-
})[];
|
|
4955
|
-
}, {
|
|
4956
|
-
readonly mode: 'value';
|
|
4957
|
-
readonly value: {
|
|
4958
|
-
identities: {
|
|
4959
|
-
id: string;
|
|
4960
|
-
iss: string;
|
|
4961
|
-
sub: string;
|
|
4962
|
-
}[];
|
|
4963
|
-
};
|
|
4964
|
-
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
4965
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"register"> & {
|
|
4966
|
-
readonly origin: "kernel.astrale.ai";
|
|
4967
|
-
};
|
|
4968
|
-
readonly key: "kernel.astrale.ai:function.register";
|
|
4969
|
-
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
4970
|
-
ast: {
|
|
4971
|
-
format: "astrale.graph.query";
|
|
4972
|
-
version: "v6";
|
|
4973
|
-
source: {
|
|
4974
|
-
kind: "node";
|
|
4975
|
-
terms: ({
|
|
4976
|
-
kind: "path";
|
|
4977
|
-
path: string;
|
|
4978
|
-
} | {
|
|
4979
|
-
kind: "class";
|
|
4980
|
-
class: {
|
|
4981
|
-
origin: string;
|
|
4982
|
-
kind: "class";
|
|
4983
|
-
name: string;
|
|
4984
|
-
};
|
|
4985
|
-
})[];
|
|
4986
|
-
binding: string;
|
|
4987
|
-
} | {
|
|
4988
|
-
kind: "edge";
|
|
4989
|
-
terms: {
|
|
4990
|
-
kind: "class";
|
|
4991
|
-
class: {
|
|
4992
|
-
origin: string;
|
|
4993
|
-
kind: "class";
|
|
4994
|
-
name: string;
|
|
4995
|
-
};
|
|
4996
|
-
}[];
|
|
4997
|
-
bindings: {
|
|
4998
|
-
source: string;
|
|
4999
|
-
edge: string;
|
|
5000
|
-
target: string;
|
|
5001
|
-
};
|
|
5002
|
-
};
|
|
5003
|
-
steps: ({
|
|
5004
|
-
op: "filter";
|
|
5005
|
-
binding: string;
|
|
5006
|
-
predicate: {
|
|
5007
|
-
kind: "class.satisfies";
|
|
5008
|
-
class: {
|
|
5009
|
-
origin: string;
|
|
5010
|
-
kind: "class";
|
|
5011
|
-
name: string;
|
|
5012
|
-
};
|
|
5013
|
-
} | {
|
|
5014
|
-
kind: "class.equal";
|
|
5015
|
-
class: {
|
|
5016
|
-
origin: string;
|
|
5017
|
-
kind: "class";
|
|
5018
|
-
name: string;
|
|
5019
|
-
};
|
|
5020
|
-
} | {
|
|
5021
|
-
kind: "property.equal";
|
|
5022
|
-
property: string;
|
|
5023
|
-
value: unknown;
|
|
5024
|
-
} | {
|
|
5025
|
-
kind: "property.present";
|
|
5026
|
-
property: string;
|
|
5027
|
-
} | {
|
|
5028
|
-
kind: "identity.equal";
|
|
5029
|
-
identity: string | {
|
|
5030
|
-
source: string;
|
|
5031
|
-
target: string;
|
|
5032
|
-
class: string;
|
|
5033
|
-
};
|
|
5034
|
-
};
|
|
5035
|
-
} | {
|
|
5036
|
-
op: "expand";
|
|
5037
|
-
from: string;
|
|
5038
|
-
via: {
|
|
5039
|
-
origin: string;
|
|
5040
|
-
kind: "class";
|
|
5041
|
-
name: string;
|
|
5042
|
-
}[];
|
|
5043
|
-
direction: "incident" | "incoming" | "outgoing";
|
|
5044
|
-
bindings: {
|
|
5045
|
-
edge: string;
|
|
5046
|
-
node: string;
|
|
5047
|
-
};
|
|
5048
|
-
})[];
|
|
5049
|
-
select: {
|
|
5050
|
-
kind: "graph";
|
|
5051
|
-
binding: string;
|
|
5052
|
-
order?: {
|
|
5053
|
-
property: string;
|
|
5054
|
-
direction: "asc" | "desc";
|
|
5055
|
-
unranked: "first" | "last";
|
|
5056
|
-
} | undefined;
|
|
5057
|
-
} | {
|
|
5058
|
-
kind: "nodes";
|
|
5059
|
-
binding: string;
|
|
5060
|
-
projection: {
|
|
5061
|
-
kind: "reference" | "value";
|
|
5062
|
-
};
|
|
5063
|
-
order?: {
|
|
5064
|
-
property: string;
|
|
5065
|
-
direction: "asc" | "desc";
|
|
5066
|
-
unranked: "first" | "last";
|
|
5067
|
-
} | undefined;
|
|
5068
|
-
} | {
|
|
5069
|
-
kind: "edges";
|
|
5070
|
-
binding: string;
|
|
5071
|
-
projection: {
|
|
5072
|
-
edge: "reference" | "value";
|
|
5073
|
-
source: "reference" | "value";
|
|
5074
|
-
target: "reference" | "value";
|
|
5075
|
-
};
|
|
5076
|
-
order?: {
|
|
5077
|
-
property: string;
|
|
5078
|
-
direction: "asc" | "desc";
|
|
5079
|
-
unranked: "first" | "last";
|
|
5080
|
-
} | undefined;
|
|
5081
|
-
};
|
|
5082
|
-
};
|
|
5083
|
-
expected?: {
|
|
5084
|
-
origin: string;
|
|
5085
|
-
revision: string;
|
|
5086
|
-
}[] | undefined;
|
|
5087
|
-
page: {
|
|
5088
|
-
size: number;
|
|
5089
|
-
after?: string | undefined;
|
|
5090
|
-
};
|
|
5091
|
-
}, {
|
|
5092
|
-
readonly mode: 'value';
|
|
5093
|
-
readonly value: {
|
|
5094
|
-
result: {
|
|
5095
|
-
kind: "graph";
|
|
5096
|
-
graph: {
|
|
5097
|
-
nodes: {
|
|
5098
|
-
id: string;
|
|
5099
|
-
class: string;
|
|
5100
|
-
props: Record<string, unknown>;
|
|
5101
|
-
}[];
|
|
5102
|
-
edges: {
|
|
5103
|
-
source: string;
|
|
5104
|
-
target: string;
|
|
5105
|
-
class: string;
|
|
5106
|
-
slug?: import("../../graph/edge/index.js").EdgeSlug | undefined;
|
|
5107
|
-
props: Record<string, unknown>;
|
|
5108
|
-
}[];
|
|
5109
|
-
};
|
|
5110
|
-
selection: {
|
|
5111
|
-
kind: "node";
|
|
5112
|
-
ids: string[];
|
|
5113
|
-
} | {
|
|
5114
|
-
kind: "edge";
|
|
5115
|
-
keys: {
|
|
5116
|
-
source: string;
|
|
5117
|
-
target: string;
|
|
5118
|
-
class: string;
|
|
5119
|
-
}[];
|
|
5120
|
-
};
|
|
5121
|
-
} | {
|
|
5122
|
-
kind: "nodes";
|
|
5123
|
-
nodes: ({
|
|
5124
|
-
kind: "reference";
|
|
5125
|
-
value: {
|
|
5126
|
-
id: string;
|
|
5127
|
-
class: string;
|
|
5128
|
-
};
|
|
5129
|
-
} | {
|
|
5130
|
-
kind: "value";
|
|
5131
|
-
value: {
|
|
5132
|
-
id: string;
|
|
5133
|
-
class: string;
|
|
5134
|
-
props: Record<string, unknown>;
|
|
5135
|
-
};
|
|
5136
|
-
})[];
|
|
5137
|
-
} | {
|
|
5138
|
-
kind: "edges";
|
|
5139
|
-
edges: {
|
|
5140
|
-
edge: {
|
|
5141
|
-
kind: "reference";
|
|
5142
|
-
value: {
|
|
5143
|
-
source: string;
|
|
5144
|
-
target: string;
|
|
5145
|
-
class: string;
|
|
5146
|
-
};
|
|
5147
|
-
} | {
|
|
5148
|
-
kind: "value";
|
|
5149
|
-
value: {
|
|
5150
|
-
source: string;
|
|
5151
|
-
target: string;
|
|
5152
|
-
class: string;
|
|
5153
|
-
slug?: import("../../graph/edge/index.js").EdgeSlug | undefined;
|
|
5154
|
-
props: Record<string, unknown>;
|
|
5155
|
-
};
|
|
5156
|
-
};
|
|
5157
|
-
source: {
|
|
5158
|
-
kind: "reference";
|
|
5159
|
-
value: {
|
|
5160
|
-
id: string;
|
|
5161
|
-
class: string;
|
|
5162
|
-
};
|
|
5163
|
-
} | {
|
|
5164
|
-
kind: "value";
|
|
5165
|
-
value: {
|
|
5166
|
-
id: string;
|
|
5167
|
-
class: string;
|
|
5168
|
-
props: Record<string, unknown>;
|
|
5169
|
-
};
|
|
5170
|
-
};
|
|
5171
|
-
target: {
|
|
5172
|
-
kind: "reference";
|
|
5173
|
-
value: {
|
|
5174
|
-
id: string;
|
|
5175
|
-
class: string;
|
|
5176
|
-
};
|
|
5177
|
-
} | {
|
|
5178
|
-
kind: "value";
|
|
5179
|
-
value: {
|
|
5180
|
-
id: string;
|
|
5181
|
-
class: string;
|
|
5182
|
-
props: Record<string, unknown>;
|
|
5183
|
-
};
|
|
5184
|
-
};
|
|
5185
|
-
}[];
|
|
5186
|
-
};
|
|
5187
|
-
page: {
|
|
5188
|
-
next?: string | undefined;
|
|
5189
|
-
};
|
|
5190
|
-
};
|
|
5191
|
-
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
5192
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"query"> & {
|
|
5193
|
-
readonly origin: "kernel.astrale.ai";
|
|
5194
|
-
};
|
|
5195
|
-
readonly key: "kernel.astrale.ai:function.query";
|
|
5196
4970
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
5197
4971
|
ast: {
|
|
5198
4972
|
format: "astrale.graph.mutation";
|
|
@@ -5383,70 +5157,298 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
5383
5157
|
target: string;
|
|
5384
5158
|
class: string;
|
|
5385
5159
|
};
|
|
5386
|
-
slug: unknown;
|
|
5387
|
-
props?: {
|
|
5388
|
-
set: Record<string, unknown>;
|
|
5389
|
-
unset: string[];
|
|
5390
|
-
} | undefined;
|
|
5160
|
+
slug: unknown;
|
|
5161
|
+
props?: {
|
|
5162
|
+
set: Record<string, unknown>;
|
|
5163
|
+
unset: string[];
|
|
5164
|
+
} | undefined;
|
|
5165
|
+
} | {
|
|
5166
|
+
op: "edge.update";
|
|
5167
|
+
edge: {
|
|
5168
|
+
source: string;
|
|
5169
|
+
target: string;
|
|
5170
|
+
class: string;
|
|
5171
|
+
};
|
|
5172
|
+
props: {
|
|
5173
|
+
set: Record<string, unknown>;
|
|
5174
|
+
unset: string[];
|
|
5175
|
+
};
|
|
5176
|
+
} | {
|
|
5177
|
+
op: "edge.delete";
|
|
5178
|
+
edge: {
|
|
5179
|
+
source: string;
|
|
5180
|
+
target: string;
|
|
5181
|
+
class: string;
|
|
5182
|
+
};
|
|
5183
|
+
})[];
|
|
5184
|
+
};
|
|
5185
|
+
expected?: {
|
|
5186
|
+
origin: string;
|
|
5187
|
+
revision: string;
|
|
5188
|
+
}[] | undefined;
|
|
5189
|
+
}, {
|
|
5190
|
+
readonly mode: 'value';
|
|
5191
|
+
readonly value: {
|
|
5192
|
+
createdNodes: Record<string, string>;
|
|
5193
|
+
};
|
|
5194
|
+
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
5195
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"mutate"> & {
|
|
5196
|
+
readonly origin: "kernel.astrale.ai";
|
|
5197
|
+
};
|
|
5198
|
+
readonly key: "kernel.astrale.ai:function.mutate";
|
|
5199
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
5200
|
+
ast: {
|
|
5201
|
+
format: "astrale.graph.query";
|
|
5202
|
+
version: "v6";
|
|
5203
|
+
source: {
|
|
5204
|
+
kind: "node";
|
|
5205
|
+
terms: ({
|
|
5206
|
+
kind: "path";
|
|
5207
|
+
path: string;
|
|
5208
|
+
} | {
|
|
5209
|
+
kind: "class";
|
|
5210
|
+
class: {
|
|
5211
|
+
origin: string;
|
|
5212
|
+
kind: "class";
|
|
5213
|
+
name: string;
|
|
5214
|
+
};
|
|
5215
|
+
})[];
|
|
5216
|
+
binding: string;
|
|
5217
|
+
} | {
|
|
5218
|
+
kind: "edge";
|
|
5219
|
+
terms: {
|
|
5220
|
+
kind: "class";
|
|
5221
|
+
class: {
|
|
5222
|
+
origin: string;
|
|
5223
|
+
kind: "class";
|
|
5224
|
+
name: string;
|
|
5225
|
+
};
|
|
5226
|
+
}[];
|
|
5227
|
+
bindings: {
|
|
5228
|
+
source: string;
|
|
5229
|
+
edge: string;
|
|
5230
|
+
target: string;
|
|
5231
|
+
};
|
|
5232
|
+
};
|
|
5233
|
+
steps: ({
|
|
5234
|
+
op: "filter";
|
|
5235
|
+
binding: string;
|
|
5236
|
+
predicate: {
|
|
5237
|
+
kind: "class.satisfies";
|
|
5238
|
+
class: {
|
|
5239
|
+
origin: string;
|
|
5240
|
+
kind: "class";
|
|
5241
|
+
name: string;
|
|
5242
|
+
};
|
|
5243
|
+
} | {
|
|
5244
|
+
kind: "class.equal";
|
|
5245
|
+
class: {
|
|
5246
|
+
origin: string;
|
|
5247
|
+
kind: "class";
|
|
5248
|
+
name: string;
|
|
5249
|
+
};
|
|
5250
|
+
} | {
|
|
5251
|
+
kind: "property.equal";
|
|
5252
|
+
property: string;
|
|
5253
|
+
value: unknown;
|
|
5254
|
+
} | {
|
|
5255
|
+
kind: "property.present";
|
|
5256
|
+
property: string;
|
|
5257
|
+
} | {
|
|
5258
|
+
kind: "identity.equal";
|
|
5259
|
+
identity: string | {
|
|
5260
|
+
source: string;
|
|
5261
|
+
target: string;
|
|
5262
|
+
class: string;
|
|
5263
|
+
};
|
|
5264
|
+
};
|
|
5391
5265
|
} | {
|
|
5392
|
-
op: "
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5266
|
+
op: "expand";
|
|
5267
|
+
from: string;
|
|
5268
|
+
via: {
|
|
5269
|
+
origin: string;
|
|
5270
|
+
kind: "class";
|
|
5271
|
+
name: string;
|
|
5272
|
+
}[];
|
|
5273
|
+
direction: "incident" | "incoming" | "outgoing";
|
|
5274
|
+
bindings: {
|
|
5275
|
+
edge: string;
|
|
5276
|
+
node: string;
|
|
5397
5277
|
};
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5278
|
+
})[];
|
|
5279
|
+
select: {
|
|
5280
|
+
kind: "graph";
|
|
5281
|
+
binding: string;
|
|
5282
|
+
order?: {
|
|
5283
|
+
property: string;
|
|
5284
|
+
direction: "asc" | "desc";
|
|
5285
|
+
unranked: "first" | "last";
|
|
5286
|
+
} | undefined;
|
|
5287
|
+
} | {
|
|
5288
|
+
kind: "nodes";
|
|
5289
|
+
binding: string;
|
|
5290
|
+
projection: {
|
|
5291
|
+
kind: "reference" | "value";
|
|
5401
5292
|
};
|
|
5293
|
+
order?: {
|
|
5294
|
+
property: string;
|
|
5295
|
+
direction: "asc" | "desc";
|
|
5296
|
+
unranked: "first" | "last";
|
|
5297
|
+
} | undefined;
|
|
5402
5298
|
} | {
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5299
|
+
kind: "edges";
|
|
5300
|
+
binding: string;
|
|
5301
|
+
projection: {
|
|
5302
|
+
edge: "reference" | "value";
|
|
5303
|
+
source: "reference" | "value";
|
|
5304
|
+
target: "reference" | "value";
|
|
5408
5305
|
};
|
|
5409
|
-
|
|
5306
|
+
order?: {
|
|
5307
|
+
property: string;
|
|
5308
|
+
direction: "asc" | "desc";
|
|
5309
|
+
unranked: "first" | "last";
|
|
5310
|
+
} | undefined;
|
|
5311
|
+
};
|
|
5410
5312
|
};
|
|
5411
5313
|
expected?: {
|
|
5412
5314
|
origin: string;
|
|
5413
5315
|
revision: string;
|
|
5414
5316
|
}[] | undefined;
|
|
5317
|
+
page: {
|
|
5318
|
+
size: number;
|
|
5319
|
+
after?: string | undefined;
|
|
5320
|
+
};
|
|
5415
5321
|
}, {
|
|
5416
5322
|
readonly mode: 'value';
|
|
5417
5323
|
readonly value: {
|
|
5418
|
-
|
|
5324
|
+
result: {
|
|
5325
|
+
kind: "graph";
|
|
5326
|
+
graph: {
|
|
5327
|
+
nodes: {
|
|
5328
|
+
id: string;
|
|
5329
|
+
class: string;
|
|
5330
|
+
props: Record<string, unknown>;
|
|
5331
|
+
}[];
|
|
5332
|
+
edges: {
|
|
5333
|
+
source: string;
|
|
5334
|
+
target: string;
|
|
5335
|
+
class: string;
|
|
5336
|
+
slug?: import("../../graph/edge/index.js").EdgeSlug | undefined;
|
|
5337
|
+
props: Record<string, unknown>;
|
|
5338
|
+
}[];
|
|
5339
|
+
};
|
|
5340
|
+
selection: {
|
|
5341
|
+
kind: "node";
|
|
5342
|
+
ids: string[];
|
|
5343
|
+
} | {
|
|
5344
|
+
kind: "edge";
|
|
5345
|
+
keys: {
|
|
5346
|
+
source: string;
|
|
5347
|
+
target: string;
|
|
5348
|
+
class: string;
|
|
5349
|
+
}[];
|
|
5350
|
+
};
|
|
5351
|
+
} | {
|
|
5352
|
+
kind: "nodes";
|
|
5353
|
+
nodes: ({
|
|
5354
|
+
kind: "reference";
|
|
5355
|
+
value: {
|
|
5356
|
+
id: string;
|
|
5357
|
+
class: string;
|
|
5358
|
+
};
|
|
5359
|
+
} | {
|
|
5360
|
+
kind: "value";
|
|
5361
|
+
value: {
|
|
5362
|
+
id: string;
|
|
5363
|
+
class: string;
|
|
5364
|
+
props: Record<string, unknown>;
|
|
5365
|
+
};
|
|
5366
|
+
})[];
|
|
5367
|
+
} | {
|
|
5368
|
+
kind: "edges";
|
|
5369
|
+
edges: {
|
|
5370
|
+
edge: {
|
|
5371
|
+
kind: "reference";
|
|
5372
|
+
value: {
|
|
5373
|
+
source: string;
|
|
5374
|
+
target: string;
|
|
5375
|
+
class: string;
|
|
5376
|
+
};
|
|
5377
|
+
} | {
|
|
5378
|
+
kind: "value";
|
|
5379
|
+
value: {
|
|
5380
|
+
source: string;
|
|
5381
|
+
target: string;
|
|
5382
|
+
class: string;
|
|
5383
|
+
slug?: import("../../graph/edge/index.js").EdgeSlug | undefined;
|
|
5384
|
+
props: Record<string, unknown>;
|
|
5385
|
+
};
|
|
5386
|
+
};
|
|
5387
|
+
source: {
|
|
5388
|
+
kind: "reference";
|
|
5389
|
+
value: {
|
|
5390
|
+
id: string;
|
|
5391
|
+
class: string;
|
|
5392
|
+
};
|
|
5393
|
+
} | {
|
|
5394
|
+
kind: "value";
|
|
5395
|
+
value: {
|
|
5396
|
+
id: string;
|
|
5397
|
+
class: string;
|
|
5398
|
+
props: Record<string, unknown>;
|
|
5399
|
+
};
|
|
5400
|
+
};
|
|
5401
|
+
target: {
|
|
5402
|
+
kind: "reference";
|
|
5403
|
+
value: {
|
|
5404
|
+
id: string;
|
|
5405
|
+
class: string;
|
|
5406
|
+
};
|
|
5407
|
+
} | {
|
|
5408
|
+
kind: "value";
|
|
5409
|
+
value: {
|
|
5410
|
+
id: string;
|
|
5411
|
+
class: string;
|
|
5412
|
+
props: Record<string, unknown>;
|
|
5413
|
+
};
|
|
5414
|
+
};
|
|
5415
|
+
}[];
|
|
5416
|
+
};
|
|
5417
|
+
page: {
|
|
5418
|
+
next?: string | undefined;
|
|
5419
|
+
};
|
|
5419
5420
|
};
|
|
5420
5421
|
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
5421
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"
|
|
5422
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"query"> & {
|
|
5422
5423
|
readonly origin: "kernel.astrale.ai";
|
|
5423
5424
|
};
|
|
5424
|
-
readonly key: "kernel.astrale.ai:function.
|
|
5425
|
+
readonly key: "kernel.astrale.ai:function.query";
|
|
5425
5426
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
size: number;
|
|
5432
|
-
};
|
|
5433
|
-
currentRevision?: string | null | undefined;
|
|
5427
|
+
idempotencyKey: string;
|
|
5428
|
+
identities: ({
|
|
5429
|
+
id: string;
|
|
5430
|
+
mode: "external";
|
|
5431
|
+
credential: string;
|
|
5434
5432
|
} | {
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
};
|
|
5440
|
-
revision?: string | undefined;
|
|
5441
|
-
currentRevision?: string | null | undefined;
|
|
5433
|
+
id: string;
|
|
5434
|
+
mode: "self";
|
|
5435
|
+
publicKey: unknown;
|
|
5436
|
+
credential: string;
|
|
5442
5437
|
})[];
|
|
5443
5438
|
}, {
|
|
5444
|
-
readonly mode: '
|
|
5439
|
+
readonly mode: 'value';
|
|
5440
|
+
readonly value: {
|
|
5441
|
+
identities: {
|
|
5442
|
+
id: string;
|
|
5443
|
+
iss: string;
|
|
5444
|
+
sub: string;
|
|
5445
|
+
}[];
|
|
5446
|
+
};
|
|
5445
5447
|
}, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
|
|
5446
|
-
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"
|
|
5448
|
+
readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"register"> & {
|
|
5447
5449
|
readonly origin: "kernel.astrale.ai";
|
|
5448
5450
|
};
|
|
5449
|
-
readonly key: "kernel.astrale.ai:function.
|
|
5451
|
+
readonly key: "kernel.astrale.ai:function.register";
|
|
5450
5452
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
5451
5453
|
operation: string;
|
|
5452
5454
|
domains: string[];
|
|
@@ -5503,32 +5505,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
5503
5505
|
}, 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"> & {
|
|
5504
5506
|
readonly name: "impersonate";
|
|
5505
5507
|
readonly executable: true;
|
|
5506
|
-
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
5507
|
-
iss: string;
|
|
5508
|
-
sub: string;
|
|
5509
|
-
}, {
|
|
5510
|
-
readonly mode: 'value';
|
|
5511
|
-
readonly value: {
|
|
5512
|
-
id: string;
|
|
5513
|
-
iss: string;
|
|
5514
|
-
sub: string;
|
|
5515
|
-
frozen: boolean;
|
|
5516
|
-
requiredClaims: ({
|
|
5517
|
-
claim: string;
|
|
5518
|
-
op: "contains";
|
|
5519
|
-
value: unknown;
|
|
5520
|
-
} | {
|
|
5521
|
-
claim: string;
|
|
5522
|
-
op: "eq";
|
|
5523
|
-
value: unknown;
|
|
5524
|
-
} | {
|
|
5525
|
-
claim: string;
|
|
5526
|
-
op: "exists";
|
|
5527
|
-
})[];
|
|
5528
|
-
} | null;
|
|
5529
|
-
}, 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"> & {
|
|
5530
|
-
readonly name: "whois";
|
|
5531
|
-
readonly executable: true;
|
|
5532
5508
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
5533
5509
|
target: string;
|
|
5534
5510
|
}, {
|
|
@@ -5571,6 +5547,32 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
5571
5547
|
}, 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.View.method.resolve"> & {
|
|
5572
5548
|
readonly name: "resolve";
|
|
5573
5549
|
readonly executable: true;
|
|
5550
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
5551
|
+
iss: string;
|
|
5552
|
+
sub: string;
|
|
5553
|
+
}, {
|
|
5554
|
+
readonly mode: 'value';
|
|
5555
|
+
readonly value: {
|
|
5556
|
+
id: string;
|
|
5557
|
+
iss: string;
|
|
5558
|
+
sub: string;
|
|
5559
|
+
frozen: boolean;
|
|
5560
|
+
requiredClaims: ({
|
|
5561
|
+
claim: string;
|
|
5562
|
+
op: "contains";
|
|
5563
|
+
value: unknown;
|
|
5564
|
+
} | {
|
|
5565
|
+
claim: string;
|
|
5566
|
+
op: "eq";
|
|
5567
|
+
value: unknown;
|
|
5568
|
+
} | {
|
|
5569
|
+
claim: string;
|
|
5570
|
+
op: "exists";
|
|
5571
|
+
})[];
|
|
5572
|
+
} | null;
|
|
5573
|
+
}, 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"> & {
|
|
5574
|
+
readonly name: "whois";
|
|
5575
|
+
readonly executable: true;
|
|
5574
5576
|
}))[];
|
|
5575
5577
|
export { AuthorityOperationOrder, AuthorityOperations, operationOf } from '../authority/index.js';
|
|
5576
5578
|
export type { AuthorityOperation, AuthorityRelation } from '../authority/index.js';
|
|
@@ -4,6 +4,7 @@ export declare const admitInput: import("zod").ZodObject<{
|
|
|
4
4
|
callable: import("zod").ZodString;
|
|
5
5
|
instance: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
6
|
revision: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
+
fingerprint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
8
|
}, import("zod/v4/core").$strict>]>;
|
|
8
9
|
input: import("zod").ZodUnknown;
|
|
9
10
|
}, import("zod/v4/core").$strict>;
|
|
@@ -6,7 +6,9 @@ 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.
|
|
9
10
|
revision: string().min(1).optional(),
|
|
11
|
+
fingerprint: string().min(1).optional(),
|
|
10
12
|
}),
|
|
11
13
|
]),
|
|
12
14
|
input: unknownSchema(),
|
|
@@ -492,7 +492,7 @@ export declare const Functions: Readonly<{
|
|
|
492
492
|
readonly mode: 'binary';
|
|
493
493
|
}, "authorized", false, false>>;
|
|
494
494
|
introspect: builder.Function<builder.CallableProjection<{
|
|
495
|
-
kind: "bundle" | "inspect";
|
|
495
|
+
kind: "bundle" | "dependencies" | "inspect";
|
|
496
496
|
origin: string;
|
|
497
497
|
}, {
|
|
498
498
|
readonly mode: 'binary';
|
|
@@ -656,6 +656,7 @@ export declare const FunctionMethods: Readonly<{
|
|
|
656
656
|
callable: string;
|
|
657
657
|
instance?: string | undefined;
|
|
658
658
|
revision?: string | undefined;
|
|
659
|
+
fingerprint?: string | undefined;
|
|
659
660
|
};
|
|
660
661
|
input: unknown;
|
|
661
662
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/kernel-core",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.50",
|
|
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.
|
|
163
|
+
"@astrale-os/kernel-dsl": "0.2.0-beta.35",
|
|
164
164
|
"@noble/hashes": "2.3.0",
|
|
165
165
|
"@types/json-schema": "^7.0.15",
|
|
166
166
|
"dequal": "2.0.3"
|