@astrale-os/kernel-core 0.9.0-beta.64 → 0.9.0-beta.65

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.
@@ -2,6 +2,9 @@ export declare const delegateInput: import("zod").ZodObject<{
2
2
  principal: import("zod").ZodString;
3
3
  audience: import("zod").ZodString;
4
4
  ttlSeconds: import("zod").ZodNumber;
5
- attenuation: import("zod").ZodOptional<import("zod").ZodUnknown>;
5
+ attenuation: import("zod").ZodOptional<import("zod").ZodObject<{
6
+ kind: import("zod").ZodLiteral<"identity">;
7
+ self: import("zod").ZodLiteral<true>;
8
+ }, import("zod/v4/core").$strict>>;
6
9
  }, import("zod/v4/core").$strict>;
7
10
  export declare const delegateOutput: import("zod").ZodString;
@@ -1,10 +1,11 @@
1
- import { number, strictObject, string, unknown as unknownSchema } from 'zod';
1
+ import { number, strictObject, string } from 'zod';
2
+ import { selfAttenuation } from './legacy/delegate.js';
2
3
  const text = string().min(1);
3
4
  export const delegateInput = strictObject({
4
5
  principal: text,
5
6
  audience: text,
6
7
  ttlSeconds: number().int().min(1),
7
- /** Optional; absence means the self expression. */
8
- attenuation: unknownSchema().optional(),
8
+ /** @deprecated Ignored; admitted only as the self expression published Clients send. */
9
+ attenuation: selfAttenuation.optional(),
9
10
  });
10
11
  export const delegateOutput = text;
@@ -1,7 +1,6 @@
1
1
  export declare const impersonateInput: import("zod").ZodObject<{
2
2
  audience: import("zod").ZodOptional<import("zod").ZodString>;
3
3
  ttlSeconds: import("zod").ZodNumber;
4
- grant: import("zod").ZodOptional<import("zod").ZodUnknown>;
5
4
  identity: import("zod").ZodString;
6
5
  }, import("zod/v4/core").$strict>;
7
6
  export declare const impersonateOutput: import("zod").ZodString;
@@ -0,0 +1,5 @@
1
+ /** @deprecated The only `attenuation` value `Identity.delegate` still admits, and ignores. */
2
+ export declare const selfAttenuation: import("zod").ZodObject<{
3
+ kind: import("zod").ZodLiteral<"identity">;
4
+ self: import("zod").ZodLiteral<true>;
5
+ }, import("zod/v4/core").$strict>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `Identity.delegate` keeps admitting the one `attenuation` value published Clients send: the self
3
+ * expression `{ kind: 'identity', self: true }`. It names the caller the delegation preserves
4
+ * anyway, so it carries no meaning: the handler ignores it and issues exactly the credential the
5
+ * same input without the field yields. Every other value, `null` included, stays refused.
6
+ *
7
+ * @deprecated Omit `attenuation`; a delegation always preserves the authenticated caller (ADR-3).
8
+ *
9
+ * Short-term consumers: `@astrale-os/kernel-client` 0.6.0-beta.77 to beta.85, whose Domain token
10
+ * exchange always sends it (`client/session/exchange/exchange.ts`, `SELF_ATTENUATION`), so the
11
+ * Console, the GUI, the Admin upgrade executor and the CLI through 1.0.0-beta.126 (exchange and
12
+ * `astrale token`). The 1Pact Host runs Kernel 0.12.0-beta.117, which requires the field, so a
13
+ * Client that serves both Kernels sends it.
14
+ *
15
+ * Removal, in a separate breaking release, once every consumer runs a Client that omits the field
16
+ * and the 0.12.0-beta.117 consumer Host is retired: delete this file and the `attenuation` member
17
+ * of `../delegate.ts`, then make the self vectors of TEST-REJECTS-AUTHORITY-EXPRESSIONS-IN-ISSUANCE-INPUTS
18
+ * and of the SYS-6 dispatch test expect refusal again.
19
+ */
20
+ import { literal, strictObject } from 'zod';
21
+ /** @deprecated The only `attenuation` value `Identity.delegate` still admits, and ignores. */
22
+ export const selfAttenuation = strictObject({
23
+ kind: literal('identity'),
24
+ self: literal(true),
25
+ }).meta({ deprecated: true });
@@ -1,6 +1,5 @@
1
1
  export declare const mintInput: import("zod").ZodObject<{
2
2
  audience: import("zod").ZodOptional<import("zod").ZodString>;
3
3
  ttlSeconds: import("zod").ZodNumber;
4
- grant: import("zod").ZodOptional<import("zod").ZodUnknown>;
5
4
  }, import("zod/v4/core").$strict>;
6
5
  export declare const mintOutput: import("zod").ZodString;
@@ -1,8 +1,7 @@
1
- import { number, strictObject, string, unknown as unknownSchema } from 'zod';
1
+ import { number, strictObject, string } from 'zod';
2
2
  const text = string().min(1);
3
3
  export const mintInput = strictObject({
4
4
  audience: text.optional(),
5
5
  ttlSeconds: number().int().min(1),
6
- grant: unknownSchema().optional(),
7
6
  });
8
7
  export const mintOutput = text;
@@ -3,7 +3,10 @@ export declare const Delegate: builder.Method<builder.CallableProjection<{
3
3
  principal: string;
4
4
  audience: string;
5
5
  ttlSeconds: number;
6
- attenuation?: unknown;
6
+ attenuation?: {
7
+ kind: "identity";
8
+ self: true;
9
+ } | undefined;
7
10
  }, {
8
11
  readonly mode: 'value';
9
12
  readonly value: string;
@@ -2,7 +2,6 @@ import { type builder } from '@astrale-os/kernel-dsl/v1';
2
2
  export declare const Impersonate: builder.Method<builder.CallableProjection<{
3
3
  audience?: string | undefined;
4
4
  ttlSeconds: number;
5
- grant?: unknown;
6
5
  identity: string;
7
6
  }, {
8
7
  readonly mode: 'value';
@@ -616,7 +616,10 @@ export declare const IdentityMethods: Readonly<{
616
616
  principal: string;
617
617
  audience: string;
618
618
  ttlSeconds: number;
619
- attenuation?: unknown;
619
+ attenuation?: {
620
+ kind: "identity";
621
+ self: true;
622
+ } | undefined;
620
623
  }, {
621
624
  readonly mode: 'value';
622
625
  readonly value: string;
@@ -687,7 +690,6 @@ export declare const IdentityMethods: Readonly<{
687
690
  mint: builder.Method<builder.CallableProjection<{
688
691
  audience?: string | undefined;
689
692
  ttlSeconds: number;
690
- grant?: unknown;
691
693
  }, {
692
694
  readonly mode: 'value';
693
695
  readonly value: string;
@@ -695,7 +697,6 @@ export declare const IdentityMethods: Readonly<{
695
697
  impersonate: builder.Method<builder.CallableProjection<{
696
698
  audience?: string | undefined;
697
699
  ttlSeconds: number;
698
- grant?: unknown;
699
700
  identity: string;
700
701
  }, {
701
702
  readonly mode: 'value';
@@ -2,7 +2,6 @@ import { type builder } from '@astrale-os/kernel-dsl/v1';
2
2
  export declare const Mint: builder.Method<builder.CallableProjection<{
3
3
  audience?: string | undefined;
4
4
  ttlSeconds: number;
5
- grant?: unknown;
6
5
  }, {
7
6
  readonly mode: 'value';
8
7
  readonly value: string;
@@ -6,7 +6,10 @@ export declare const delegate: import("./model.js").MethodSyscall<Readonly<{
6
6
  principal: string;
7
7
  audience: string;
8
8
  ttlSeconds: number;
9
- attenuation?: unknown;
9
+ attenuation?: {
10
+ kind: "identity";
11
+ self: true;
12
+ } | undefined;
10
13
  }, {
11
14
  readonly mode: 'value';
12
15
  readonly value: string;
@@ -109,7 +112,6 @@ export declare const impersonate: import("./model.js").MethodSyscall<Readonly<{
109
112
  }>, "impersonate", import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
110
113
  audience?: string | undefined;
111
114
  ttlSeconds: number;
112
- grant?: unknown;
113
115
  identity: string;
114
116
  }, {
115
117
  readonly mode: 'value';
@@ -126,7 +128,6 @@ export declare const mint: import("./model.js").MethodSyscall<Readonly<{
126
128
  }>, "mint", import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
127
129
  audience?: string | undefined;
128
130
  ttlSeconds: number;
129
- grant?: unknown;
130
131
  }, {
131
132
  readonly mode: 'value';
132
133
  readonly value: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-core",
3
- "version": "0.9.0-beta.64",
3
+ "version": "0.9.0-beta.65",
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.46",
163
+ "@astrale-os/kernel-dsl": "0.2.0-beta.47",
164
164
  "@noble/hashes": "2.3.0",
165
165
  "@types/json-schema": "^7.0.15",
166
166
  "dequal": "2.0.3"