@astrale-os/kernel-core 0.9.0-beta.61 → 0.9.0-beta.63
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 +2 -4
- package/dist/callable/invocation/call.js +3 -9
- package/dist/schema/callables/function.d.ts +0 -2
- package/dist/schema/introspection/language.d.ts +2 -0
- package/dist/schema/kernel/schema.d.ts +75 -31
- package/dist/schema/kernel/syscalls/contracts/admit.d.ts +0 -1
- package/dist/schema/kernel/syscalls/contracts/admit.js +0 -2
- package/dist/schema/kernel/syscalls/contracts/install.d.ts +86 -7
- package/dist/schema/kernel/syscalls/contracts/install.js +6 -3
- package/dist/schema/kernel/syscalls/contracts/installation.d.ts +30 -0
- package/dist/schema/kernel/syscalls/contracts/installation.js +9 -0
- package/dist/schema/kernel/syscalls/contracts/introspect.d.ts +5 -2
- package/dist/schema/kernel/syscalls/contracts/introspect.js +9 -5
- package/dist/schema/kernel/syscalls/contracts/legacy/install.d.ts +22 -0
- package/dist/schema/kernel/syscalls/contracts/legacy/install.js +31 -0
- package/dist/schema/kernel/syscalls/contracts/uninstall.d.ts +10 -0
- package/dist/schema/kernel/syscalls/declarations/admit.d.ts +0 -1
- package/dist/schema/kernel/syscalls/declarations/index.d.ts +24 -1
- package/dist/schema/kernel/syscalls/declarations/install.d.ts +15 -0
- package/dist/schema/kernel/syscalls/declarations/introspect.d.ts +2 -0
- package/dist/schema/kernel/syscalls/declarations/uninstall.d.ts +7 -0
- package/dist/schema/kernel/syscalls/descriptors/function.d.ts +0 -1
- package/dist/schema/kernel/syscalls/descriptors/results/view-resolution.d.ts +7 -0
- package/package.json +2 -2
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import type { Key
|
|
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
|
-
*
|
|
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
|
|
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', '
|
|
10
|
-
throw new TypeError('Invocation Target must contain only callable, instance
|
|
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;
|
|
@@ -8571,6 +8569,21 @@ declare const KernelDefinitions: {
|
|
|
8571
8569
|
size: number;
|
|
8572
8570
|
};
|
|
8573
8571
|
currentRevision?: string | null | undefined;
|
|
8572
|
+
} | {
|
|
8573
|
+
release: {
|
|
8574
|
+
url: string;
|
|
8575
|
+
token?: string | undefined;
|
|
8576
|
+
digest?: string | undefined;
|
|
8577
|
+
};
|
|
8578
|
+
consent?: {
|
|
8579
|
+
issuer: {
|
|
8580
|
+
from: string;
|
|
8581
|
+
to: string;
|
|
8582
|
+
};
|
|
8583
|
+
previous?: "drain" | "revoke" | undefined;
|
|
8584
|
+
} | undefined;
|
|
8585
|
+
revision?: string | undefined;
|
|
8586
|
+
currentRevision?: string | null | undefined;
|
|
8574
8587
|
} | {
|
|
8575
8588
|
publication: {
|
|
8576
8589
|
url: string;
|
|
@@ -8586,6 +8599,8 @@ declare const KernelDefinitions: {
|
|
|
8586
8599
|
introspect: builder.Function<builder.CallableProjection<{
|
|
8587
8600
|
kind: "bundle" | "dependencies" | "inspect";
|
|
8588
8601
|
origin: string;
|
|
8602
|
+
} | {
|
|
8603
|
+
kind: "installed";
|
|
8589
8604
|
}, {
|
|
8590
8605
|
readonly mode: 'binary';
|
|
8591
8606
|
}, "authenticated", false, false, undefined>>;
|
|
@@ -8614,6 +8629,13 @@ declare const KernelDefinitions: {
|
|
|
8614
8629
|
revision: string;
|
|
8615
8630
|
generation: string;
|
|
8616
8631
|
} | null;
|
|
8632
|
+
consent?: {
|
|
8633
|
+
issuer: {
|
|
8634
|
+
from: string;
|
|
8635
|
+
to: string;
|
|
8636
|
+
};
|
|
8637
|
+
previous: "drain" | "revoke";
|
|
8638
|
+
} | undefined;
|
|
8617
8639
|
};
|
|
8618
8640
|
phase: "converge" | "cutover";
|
|
8619
8641
|
state: "committed";
|
|
@@ -8964,6 +8986,21 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
8964
8986
|
size: number;
|
|
8965
8987
|
};
|
|
8966
8988
|
currentRevision?: string | null | undefined;
|
|
8989
|
+
} | {
|
|
8990
|
+
release: {
|
|
8991
|
+
url: string;
|
|
8992
|
+
token?: string | undefined;
|
|
8993
|
+
digest?: string | undefined;
|
|
8994
|
+
};
|
|
8995
|
+
consent?: {
|
|
8996
|
+
issuer: {
|
|
8997
|
+
from: string;
|
|
8998
|
+
to: string;
|
|
8999
|
+
};
|
|
9000
|
+
previous?: "drain" | "revoke" | undefined;
|
|
9001
|
+
} | undefined;
|
|
9002
|
+
revision?: string | undefined;
|
|
9003
|
+
currentRevision?: string | null | undefined;
|
|
8967
9004
|
} | {
|
|
8968
9005
|
publication: {
|
|
8969
9006
|
url: string;
|
|
@@ -9472,25 +9509,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9472
9509
|
};
|
|
9473
9510
|
readonly key: "kernel.astrale.ai:function.query";
|
|
9474
9511
|
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;
|
|
9494
9512
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
|
|
9495
9513
|
idempotencyKey: string;
|
|
9496
9514
|
identities: ({
|
|
@@ -9543,6 +9561,13 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9543
9561
|
revision: string;
|
|
9544
9562
|
generation: string;
|
|
9545
9563
|
} | null;
|
|
9564
|
+
consent?: {
|
|
9565
|
+
issuer: {
|
|
9566
|
+
from: string;
|
|
9567
|
+
to: string;
|
|
9568
|
+
};
|
|
9569
|
+
previous: "drain" | "revoke";
|
|
9570
|
+
} | undefined;
|
|
9546
9571
|
};
|
|
9547
9572
|
phase: "converge" | "cutover";
|
|
9548
9573
|
state: "committed";
|
|
@@ -9564,17 +9589,24 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9564
9589
|
};
|
|
9565
9590
|
readonly key: "kernel.astrale.ai:function.uninstall";
|
|
9566
9591
|
readonly execution: undefined;
|
|
9567
|
-
}) | (import("@astrale-os/kernel-dsl/v1").
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
grant?: unknown;
|
|
9571
|
-
identity: string;
|
|
9572
|
-
}, {
|
|
9592
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<import("@astrale-os/kernel-dsl/v1").BinaryInputProjection<{
|
|
9593
|
+
mediaType: string;
|
|
9594
|
+
}>, {
|
|
9573
9595
|
readonly mode: 'value';
|
|
9574
|
-
readonly value:
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9596
|
+
readonly value: {
|
|
9597
|
+
receipt: string;
|
|
9598
|
+
ref: {
|
|
9599
|
+
digest: string;
|
|
9600
|
+
mediaType: string;
|
|
9601
|
+
size: number;
|
|
9602
|
+
};
|
|
9603
|
+
expiresAt: string;
|
|
9604
|
+
};
|
|
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<"upload"> & {
|
|
9607
|
+
readonly origin: "kernel.astrale.ai";
|
|
9608
|
+
};
|
|
9609
|
+
readonly key: "kernel.astrale.ai:function.upload";
|
|
9578
9610
|
readonly execution: undefined;
|
|
9579
9611
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
9580
9612
|
iss: string;
|
|
@@ -9603,6 +9635,18 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
|
|
|
9603
9635
|
readonly name: "whois";
|
|
9604
9636
|
readonly executable: true;
|
|
9605
9637
|
readonly execution: undefined;
|
|
9638
|
+
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
9639
|
+
audience?: string | undefined;
|
|
9640
|
+
ttlSeconds: number;
|
|
9641
|
+
grant?: unknown;
|
|
9642
|
+
identity: string;
|
|
9643
|
+
}, {
|
|
9644
|
+
readonly mode: 'value';
|
|
9645
|
+
readonly value: string;
|
|
9646
|
+
}, 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"> & {
|
|
9647
|
+
readonly name: "impersonate";
|
|
9648
|
+
readonly executable: true;
|
|
9649
|
+
readonly execution: undefined;
|
|
9606
9650
|
}) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
|
|
9607
9651
|
target: string;
|
|
9608
9652
|
}, {
|
|
@@ -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
|
]),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OperationId } from '../../../installation/operation-id.js';
|
|
2
|
+
import type { PublicationRequest } from './legacy/install.js';
|
|
2
3
|
export declare const domainRequest: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
3
4
|
artifact: import("zod").ZodObject<{
|
|
4
5
|
digest: import("zod").ZodString;
|
|
@@ -6,6 +7,24 @@ export declare const domainRequest: import("zod").ZodUnion<readonly [import("zod
|
|
|
6
7
|
size: import("zod").ZodNumber;
|
|
7
8
|
}, import("zod/v4/core").$strict>;
|
|
8
9
|
currentRevision: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
10
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
11
|
+
release: import("zod").ZodObject<{
|
|
12
|
+
url: import("zod").ZodString;
|
|
13
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
digest: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
+
}, import("zod/v4/core").$strict>;
|
|
16
|
+
consent: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
17
|
+
issuer: import("zod").ZodObject<{
|
|
18
|
+
from: import("zod").ZodString;
|
|
19
|
+
to: import("zod").ZodString;
|
|
20
|
+
}, import("zod/v4/core").$strict>;
|
|
21
|
+
previous: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
22
|
+
drain: "drain";
|
|
23
|
+
revoke: "revoke";
|
|
24
|
+
}>>;
|
|
25
|
+
}, import("zod/v4/core").$strict>>;
|
|
26
|
+
revision: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
currentRevision: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
9
28
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
10
29
|
publication: import("zod").ZodObject<{
|
|
11
30
|
url: import("zod").ZodString;
|
|
@@ -24,6 +43,24 @@ export declare const installInput: import("zod").ZodObject<{
|
|
|
24
43
|
size: import("zod").ZodNumber;
|
|
25
44
|
}, import("zod/v4/core").$strict>;
|
|
26
45
|
currentRevision: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
46
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
47
|
+
release: import("zod").ZodObject<{
|
|
48
|
+
url: import("zod").ZodString;
|
|
49
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
50
|
+
digest: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
}, import("zod/v4/core").$strict>;
|
|
52
|
+
consent: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
53
|
+
issuer: import("zod").ZodObject<{
|
|
54
|
+
from: import("zod").ZodString;
|
|
55
|
+
to: import("zod").ZodString;
|
|
56
|
+
}, import("zod/v4/core").$strict>;
|
|
57
|
+
previous: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
58
|
+
drain: "drain";
|
|
59
|
+
revoke: "revoke";
|
|
60
|
+
}>>;
|
|
61
|
+
}, import("zod/v4/core").$strict>>;
|
|
62
|
+
revision: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
currentRevision: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
27
64
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
28
65
|
publication: import("zod").ZodObject<{
|
|
29
66
|
url: import("zod").ZodString;
|
|
@@ -51,6 +88,16 @@ export declare const installReceipt: import("zod").ZodObject<{
|
|
|
51
88
|
revision: import("zod").ZodString;
|
|
52
89
|
generation: import("zod").ZodString;
|
|
53
90
|
}, import("zod/v4/core").$strict>>;
|
|
91
|
+
consent: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
92
|
+
issuer: import("zod").ZodObject<{
|
|
93
|
+
from: import("zod").ZodString;
|
|
94
|
+
to: import("zod").ZodString;
|
|
95
|
+
}, import("zod/v4/core").$strict>;
|
|
96
|
+
previous: import("zod").ZodEnum<{
|
|
97
|
+
drain: "drain";
|
|
98
|
+
revoke: "revoke";
|
|
99
|
+
}>;
|
|
100
|
+
}, import("zod/v4/core").$strict>>;
|
|
54
101
|
}, import("zod/v4/core").$strict>;
|
|
55
102
|
phase: import("zod").ZodEnum<{
|
|
56
103
|
converge: "converge";
|
|
@@ -71,6 +118,7 @@ export declare const installReceipt: import("zod").ZodObject<{
|
|
|
71
118
|
}, import("zod/v4/core").$strict>;
|
|
72
119
|
type NonEmpty<Value> = readonly [Value, ...Value[]];
|
|
73
120
|
export type InstallationDigest = `sha256:${string}`;
|
|
121
|
+
export type ReleaseDigest = InstallationDigest;
|
|
74
122
|
export interface ArtifactRef {
|
|
75
123
|
readonly digest: InstallationDigest;
|
|
76
124
|
readonly mediaType: string;
|
|
@@ -87,12 +135,35 @@ export interface DomainGeneration {
|
|
|
87
135
|
readonly revision: string;
|
|
88
136
|
readonly generation: InstallationDigest;
|
|
89
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* The operator's consent to replace the issuer an installation runs under (D7): a compare-and-swap
|
|
140
|
+
* of the exact installed issuer `from` for the exact issuer `to` the source serves.
|
|
141
|
+
*/
|
|
142
|
+
export interface IssuerConsent {
|
|
143
|
+
readonly issuer: {
|
|
144
|
+
readonly from: string;
|
|
145
|
+
readonly to: string;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* What the replaced issuer keeps: `drain` (default) accepts it for a bounded time after the
|
|
149
|
+
* activation, then only for the steps of its durable runs; `revoke` cuts it at the activation.
|
|
150
|
+
*/
|
|
151
|
+
readonly previous?: 'drain' | 'revoke';
|
|
152
|
+
}
|
|
90
153
|
export interface TransitionIntent {
|
|
91
154
|
readonly transition: string;
|
|
92
155
|
readonly operation: OperationId;
|
|
93
156
|
readonly origin: string;
|
|
94
157
|
readonly previous: DomainGeneration | null;
|
|
95
158
|
readonly generation: DomainGeneration | null;
|
|
159
|
+
/** Present only on a replacement that changed its issuer under consent. */
|
|
160
|
+
readonly consent?: {
|
|
161
|
+
readonly issuer: {
|
|
162
|
+
readonly from: string;
|
|
163
|
+
readonly to: string;
|
|
164
|
+
};
|
|
165
|
+
readonly previous: 'drain' | 'revoke';
|
|
166
|
+
};
|
|
96
167
|
}
|
|
97
168
|
export interface ReadinessReceipt {
|
|
98
169
|
readonly generation: InstallationDigest;
|
|
@@ -105,18 +176,26 @@ export interface TransitionReceipt {
|
|
|
105
176
|
readonly state: 'committed';
|
|
106
177
|
readonly readiness?: ReadinessReceipt;
|
|
107
178
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
readonly
|
|
111
|
-
} | {
|
|
112
|
-
readonly publication: {
|
|
179
|
+
/** Installs the document served by the URL, preferring release.json over domain.json. */
|
|
180
|
+
export interface ReleaseRequest {
|
|
181
|
+
readonly release: {
|
|
113
182
|
readonly url: string;
|
|
114
183
|
readonly token?: string;
|
|
115
|
-
|
|
184
|
+
/** Requires an exact release digest. Omit to accept any served document, including a legacy Publication. */
|
|
185
|
+
readonly digest?: ReleaseDigest;
|
|
116
186
|
};
|
|
187
|
+
/**
|
|
188
|
+
* Required when the source serves another issuer than the installed one, refused otherwise:
|
|
189
|
+
* `from` must be the installed issuer and `to` the served one, neither the Kernel issuer.
|
|
190
|
+
*/
|
|
191
|
+
readonly consent?: IssuerConsent;
|
|
117
192
|
readonly revision?: string;
|
|
118
193
|
readonly currentRevision?: string | null;
|
|
119
|
-
}
|
|
194
|
+
}
|
|
195
|
+
export type DomainRequest = {
|
|
196
|
+
readonly artifact: ArtifactRef;
|
|
197
|
+
readonly currentRevision?: string | null;
|
|
198
|
+
} | ReleaseRequest | PublicationRequest;
|
|
120
199
|
export interface InstallInput {
|
|
121
200
|
readonly operation: OperationId;
|
|
122
201
|
readonly domains: NonEmpty<DomainRequest>;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { array, strictObject, union } from 'zod';
|
|
2
|
-
import { artifactRef, installationText, operationIdSchema, transitionReceipt, } from './installation.js';
|
|
2
|
+
import { artifactRef, installationDigest, installationText, issuerConsent, operationIdSchema, transitionReceipt, } from './installation.js';
|
|
3
|
+
import { publicationRequest } from './legacy/install.js';
|
|
3
4
|
export const domainRequest = union([
|
|
4
5
|
strictObject({
|
|
5
6
|
artifact: artifactRef,
|
|
6
7
|
currentRevision: installationText.nullable().optional(),
|
|
7
8
|
}),
|
|
8
9
|
strictObject({
|
|
9
|
-
|
|
10
|
+
release: strictObject({
|
|
10
11
|
url: installationText,
|
|
11
12
|
token: installationText.optional(),
|
|
12
|
-
|
|
13
|
+
digest: installationDigest.optional(),
|
|
13
14
|
}),
|
|
15
|
+
consent: issuerConsent.optional(),
|
|
14
16
|
revision: installationText.optional(),
|
|
15
17
|
currentRevision: installationText.nullable().optional(),
|
|
16
18
|
}),
|
|
19
|
+
publicationRequest,
|
|
17
20
|
]);
|
|
18
21
|
export const installInput = strictObject({
|
|
19
22
|
operation: operationIdSchema,
|
|
@@ -18,6 +18,16 @@ export declare const domainGeneration: import("zod").ZodObject<{
|
|
|
18
18
|
revision: import("zod").ZodString;
|
|
19
19
|
generation: import("zod").ZodString;
|
|
20
20
|
}, import("zod/v4/core").$strict>;
|
|
21
|
+
export declare const issuerConsent: import("zod").ZodObject<{
|
|
22
|
+
issuer: import("zod").ZodObject<{
|
|
23
|
+
from: import("zod").ZodString;
|
|
24
|
+
to: import("zod").ZodString;
|
|
25
|
+
}, import("zod/v4/core").$strict>;
|
|
26
|
+
previous: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
27
|
+
drain: "drain";
|
|
28
|
+
revoke: "revoke";
|
|
29
|
+
}>>;
|
|
30
|
+
}, import("zod/v4/core").$strict>;
|
|
21
31
|
export declare const transitionIntent: import("zod").ZodObject<{
|
|
22
32
|
transition: import("zod").ZodString;
|
|
23
33
|
operation: import("zod").ZodString;
|
|
@@ -32,6 +42,16 @@ export declare const transitionIntent: import("zod").ZodObject<{
|
|
|
32
42
|
revision: import("zod").ZodString;
|
|
33
43
|
generation: import("zod").ZodString;
|
|
34
44
|
}, import("zod/v4/core").$strict>>;
|
|
45
|
+
consent: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
46
|
+
issuer: import("zod").ZodObject<{
|
|
47
|
+
from: import("zod").ZodString;
|
|
48
|
+
to: import("zod").ZodString;
|
|
49
|
+
}, import("zod/v4/core").$strict>;
|
|
50
|
+
previous: import("zod").ZodEnum<{
|
|
51
|
+
drain: "drain";
|
|
52
|
+
revoke: "revoke";
|
|
53
|
+
}>;
|
|
54
|
+
}, import("zod/v4/core").$strict>>;
|
|
35
55
|
}, import("zod/v4/core").$strict>;
|
|
36
56
|
export declare const readinessReceipt: import("zod").ZodObject<{
|
|
37
57
|
generation: import("zod").ZodString;
|
|
@@ -58,6 +78,16 @@ export declare const transitionReceipt: import("zod").ZodObject<{
|
|
|
58
78
|
revision: import("zod").ZodString;
|
|
59
79
|
generation: import("zod").ZodString;
|
|
60
80
|
}, import("zod/v4/core").$strict>>;
|
|
81
|
+
consent: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
82
|
+
issuer: import("zod").ZodObject<{
|
|
83
|
+
from: import("zod").ZodString;
|
|
84
|
+
to: import("zod").ZodString;
|
|
85
|
+
}, import("zod/v4/core").$strict>;
|
|
86
|
+
previous: import("zod").ZodEnum<{
|
|
87
|
+
drain: "drain";
|
|
88
|
+
revoke: "revoke";
|
|
89
|
+
}>;
|
|
90
|
+
}, import("zod/v4/core").$strict>>;
|
|
61
91
|
}, import("zod/v4/core").$strict>;
|
|
62
92
|
phase: import("zod").ZodEnum<{
|
|
63
93
|
converge: "converge";
|
|
@@ -20,12 +20,21 @@ export const domainGeneration = strictObject({
|
|
|
20
20
|
revision: installationText,
|
|
21
21
|
generation: installationDigest,
|
|
22
22
|
});
|
|
23
|
+
const consentIssuers = strictObject({ from: installationText, to: installationText });
|
|
24
|
+
export const issuerConsent = strictObject({
|
|
25
|
+
issuer: consentIssuers,
|
|
26
|
+
previous: enumeration(['drain', 'revoke']).optional(),
|
|
27
|
+
});
|
|
23
28
|
export const transitionIntent = strictObject({
|
|
24
29
|
transition: installationText,
|
|
25
30
|
operation: operationIdSchema,
|
|
26
31
|
origin: installationText,
|
|
27
32
|
previous: domainGeneration.nullable(),
|
|
28
33
|
generation: domainGeneration.nullable(),
|
|
34
|
+
consent: strictObject({
|
|
35
|
+
issuer: consentIssuers,
|
|
36
|
+
previous: enumeration(['drain', 'revoke']),
|
|
37
|
+
}).optional(),
|
|
29
38
|
});
|
|
30
39
|
export const readinessReceipt = strictObject({
|
|
31
40
|
generation: installationDigest,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/** One ready Domain by origin, or the installed listing, which names no origin. */
|
|
2
|
+
export declare const introspectInput: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
2
3
|
kind: import("zod").ZodEnum<{
|
|
3
4
|
bundle: "bundle";
|
|
4
5
|
dependencies: "dependencies";
|
|
5
6
|
inspect: "inspect";
|
|
6
7
|
}>;
|
|
7
8
|
origin: import("zod").ZodString;
|
|
8
|
-
}, import("zod/v4/core").$strict
|
|
9
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
10
|
+
kind: import("zod").ZodLiteral<"installed">;
|
|
11
|
+
}, import("zod/v4/core").$strict>]>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { enum as enumeration, strictObject, string } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { enum as enumeration, literal, strictObject, string, union } from 'zod';
|
|
2
|
+
/** One ready Domain by origin, or the installed listing, which names no origin. */
|
|
3
|
+
export const introspectInput = union([
|
|
4
|
+
strictObject({
|
|
5
|
+
kind: enumeration(['inspect', 'bundle', 'dependencies']),
|
|
6
|
+
origin: string().min(1),
|
|
7
|
+
}),
|
|
8
|
+
strictObject({ kind: literal('installed') }),
|
|
9
|
+
]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { InstallationDigest } from '../install.js';
|
|
2
|
+
/** @deprecated Successor: the `release` request of `../install.ts`. */
|
|
3
|
+
export declare const publicationRequest: import("zod").ZodObject<{
|
|
4
|
+
publication: import("zod").ZodObject<{
|
|
5
|
+
url: import("zod").ZodString;
|
|
6
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
+
etag: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
+
}, import("zod/v4/core").$strict>;
|
|
9
|
+
revision: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
+
currentRevision: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
11
|
+
}, import("zod/v4/core").$strict>;
|
|
12
|
+
/** @deprecated Use `ReleaseRequest` to guard the release digest. */
|
|
13
|
+
export interface PublicationRequest {
|
|
14
|
+
readonly publication: {
|
|
15
|
+
readonly url: string;
|
|
16
|
+
readonly token?: string;
|
|
17
|
+
/** ETag of the v3 document the source serves: its own, or the projection of a v4 release. */
|
|
18
|
+
readonly etag?: InstallationDigest;
|
|
19
|
+
};
|
|
20
|
+
readonly revision?: string;
|
|
21
|
+
readonly currentRevision?: string | null;
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `publication` Domain request of `schema.install` keeps its v3 meaning: `etag` guards the
|
|
3
|
+
* ETag of the v3 document the source serves, including the frozen projection of a v4 release.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated Use the `release` request of `../install.ts`, whose `digest` is the release digest.
|
|
6
|
+
*
|
|
7
|
+
* Short-term consumers: the Admin instance gateway and the CLI until they send `release`, the SDK
|
|
8
|
+
* e2e controller, and this repository's own callers (`__e2e__`, `host/e2e`,
|
|
9
|
+
* `host/qualification/falkor`) and tests. The 1Pact Host runs its own Kernel .117 and does not
|
|
10
|
+
* depend on this module.
|
|
11
|
+
*
|
|
12
|
+
* Removal, in a separate breaking release, once the Admin gateway and the CLI send `release` to
|
|
13
|
+
* every Kernel that accepts it and the SDK e2e controller has moved: move this repository's callers
|
|
14
|
+
* and tests first, then delete this folder, the `publication` branch of `domainRequest`, Runtime
|
|
15
|
+
* `PublicationDomainInput` with the `publication` branch of `installDomain`,
|
|
16
|
+
* `DesiredInstallation.targetEtag`, `InstallRoot.targetEtag` and
|
|
17
|
+
* `CUTOVER_PUBLICATION_ETAG_CONFLICT`. The legacy fingerprint keys stay frozen: retained operations
|
|
18
|
+
* store their digests.
|
|
19
|
+
*/
|
|
20
|
+
import { strictObject } from 'zod';
|
|
21
|
+
import { installationText } from '../installation.js';
|
|
22
|
+
/** @deprecated Successor: the `release` request of `../install.ts`. */
|
|
23
|
+
export const publicationRequest = strictObject({
|
|
24
|
+
publication: strictObject({
|
|
25
|
+
url: installationText,
|
|
26
|
+
token: installationText.optional(),
|
|
27
|
+
etag: installationText.optional(),
|
|
28
|
+
}),
|
|
29
|
+
revision: installationText.optional(),
|
|
30
|
+
currentRevision: installationText.nullable().optional(),
|
|
31
|
+
});
|
|
@@ -24,6 +24,16 @@ export declare const uninstallOutput: import("zod").ZodObject<{
|
|
|
24
24
|
revision: import("zod").ZodString;
|
|
25
25
|
generation: import("zod").ZodString;
|
|
26
26
|
}, import("zod/v4/core").$strict>>;
|
|
27
|
+
consent: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
28
|
+
issuer: import("zod").ZodObject<{
|
|
29
|
+
from: import("zod").ZodString;
|
|
30
|
+
to: import("zod").ZodString;
|
|
31
|
+
}, import("zod/v4/core").$strict>;
|
|
32
|
+
previous: import("zod").ZodEnum<{
|
|
33
|
+
drain: "drain";
|
|
34
|
+
revoke: "revoke";
|
|
35
|
+
}>;
|
|
36
|
+
}, import("zod/v4/core").$strict>>;
|
|
27
37
|
}, import("zod/v4/core").$strict>;
|
|
28
38
|
phase: import("zod").ZodEnum<{
|
|
29
39
|
converge: "converge";
|
|
@@ -499,6 +499,21 @@ export declare const Functions: Readonly<{
|
|
|
499
499
|
size: number;
|
|
500
500
|
};
|
|
501
501
|
currentRevision?: string | null | undefined;
|
|
502
|
+
} | {
|
|
503
|
+
release: {
|
|
504
|
+
url: string;
|
|
505
|
+
token?: string | undefined;
|
|
506
|
+
digest?: string | undefined;
|
|
507
|
+
};
|
|
508
|
+
consent?: {
|
|
509
|
+
issuer: {
|
|
510
|
+
from: string;
|
|
511
|
+
to: string;
|
|
512
|
+
};
|
|
513
|
+
previous?: "drain" | "revoke" | undefined;
|
|
514
|
+
} | undefined;
|
|
515
|
+
revision?: string | undefined;
|
|
516
|
+
currentRevision?: string | null | undefined;
|
|
502
517
|
} | {
|
|
503
518
|
publication: {
|
|
504
519
|
url: string;
|
|
@@ -514,6 +529,8 @@ export declare const Functions: Readonly<{
|
|
|
514
529
|
introspect: builder.Function<builder.CallableProjection<{
|
|
515
530
|
kind: "bundle" | "dependencies" | "inspect";
|
|
516
531
|
origin: string;
|
|
532
|
+
} | {
|
|
533
|
+
kind: "installed";
|
|
517
534
|
}, {
|
|
518
535
|
readonly mode: 'binary';
|
|
519
536
|
}, "authenticated", false, false, undefined>>;
|
|
@@ -542,6 +559,13 @@ export declare const Functions: Readonly<{
|
|
|
542
559
|
revision: string;
|
|
543
560
|
generation: string;
|
|
544
561
|
} | null;
|
|
562
|
+
consent?: {
|
|
563
|
+
issuer: {
|
|
564
|
+
from: string;
|
|
565
|
+
to: string;
|
|
566
|
+
};
|
|
567
|
+
previous: "drain" | "revoke";
|
|
568
|
+
} | undefined;
|
|
545
569
|
};
|
|
546
570
|
phase: "converge" | "cutover";
|
|
547
571
|
state: "committed";
|
|
@@ -684,7 +708,6 @@ export declare const FunctionMethods: Readonly<{
|
|
|
684
708
|
target: string | {
|
|
685
709
|
callable: string;
|
|
686
710
|
instance?: string | undefined;
|
|
687
|
-
revision?: string | undefined;
|
|
688
711
|
fingerprint?: string | undefined;
|
|
689
712
|
};
|
|
690
713
|
input: unknown;
|
|
@@ -8,6 +8,21 @@ export declare const Install: builder.Function<builder.CallableProjection<{
|
|
|
8
8
|
size: number;
|
|
9
9
|
};
|
|
10
10
|
currentRevision?: string | null | undefined;
|
|
11
|
+
} | {
|
|
12
|
+
release: {
|
|
13
|
+
url: string;
|
|
14
|
+
token?: string | undefined;
|
|
15
|
+
digest?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
consent?: {
|
|
18
|
+
issuer: {
|
|
19
|
+
from: string;
|
|
20
|
+
to: string;
|
|
21
|
+
};
|
|
22
|
+
previous?: "drain" | "revoke" | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
revision?: string | undefined;
|
|
25
|
+
currentRevision?: string | null | undefined;
|
|
11
26
|
} | {
|
|
12
27
|
publication: {
|
|
13
28
|
url: string;
|
|
@@ -2,6 +2,8 @@ import { type builder } from '@astrale-os/kernel-dsl/v1';
|
|
|
2
2
|
export declare const Introspect: builder.Function<builder.CallableProjection<{
|
|
3
3
|
kind: "bundle" | "dependencies" | "inspect";
|
|
4
4
|
origin: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: "installed";
|
|
5
7
|
}, {
|
|
6
8
|
readonly mode: 'binary';
|
|
7
9
|
}, "authenticated", false, false, undefined>>;
|
|
@@ -24,6 +24,13 @@ export declare const Uninstall: builder.Function<builder.CallableProjection<{
|
|
|
24
24
|
revision: string;
|
|
25
25
|
generation: string;
|
|
26
26
|
} | null;
|
|
27
|
+
consent?: {
|
|
28
|
+
issuer: {
|
|
29
|
+
from: string;
|
|
30
|
+
to: string;
|
|
31
|
+
};
|
|
32
|
+
previous: "drain" | "revoke";
|
|
33
|
+
} | undefined;
|
|
27
34
|
};
|
|
28
35
|
phase: "converge" | "cutover";
|
|
29
36
|
state: "committed";
|
|
@@ -11,6 +11,13 @@ export interface ResolvedView {
|
|
|
11
11
|
readonly iframe?: IframeRequirements;
|
|
12
12
|
readonly host?: ViewHostRequirements;
|
|
13
13
|
readonly issuer: IssuerId;
|
|
14
|
+
/**
|
|
15
|
+
* ETag of the v3 Publication that pins the View's Domain: its own for a legacy pin, the
|
|
16
|
+
* frozen projection's for a `DomainRelease` v4 pin.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Successor: `ResolvedView.release`, emitted by the breaking release (AM-1) as
|
|
19
|
+
* the release digest.
|
|
20
|
+
*/
|
|
14
21
|
readonly etag: `sha256:${string}`;
|
|
15
22
|
readonly revision: Revision;
|
|
16
23
|
}
|
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.63",
|
|
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.45",
|
|
164
164
|
"@noble/hashes": "2.3.0",
|
|
165
165
|
"@types/json-schema": "^7.0.15",
|
|
166
166
|
"dequal": "2.0.3"
|