@astrale-os/kernel-core 0.9.0-beta.44 → 0.9.0-beta.46

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.
@@ -76,6 +76,7 @@ export const KernelRootFunctions = Object.freeze([
76
76
  K.functions.uninstall,
77
77
  K.functions.journal,
78
78
  K.classes.Identity.static.methods.whois,
79
+ K.classes.Identity.static.methods.impersonate,
79
80
  K.classes.View.static.methods.resolve,
80
81
  ].sort((left, right) => (left.key < right.key ? -1 : left.key > right.key ? 1 : 0)));
81
82
  export { AuthorityOperationOrder, AuthorityOperations, operationOf } from '../authority/index.js';
@@ -0,0 +1,7 @@
1
+ export declare const impersonateInput: import("zod").ZodObject<{
2
+ audience: import("zod").ZodOptional<import("zod").ZodString>;
3
+ ttlSeconds: import("zod").ZodNumber;
4
+ grant: import("zod").ZodOptional<import("zod").ZodUnknown>;
5
+ identity: import("zod").ZodString;
6
+ }, import("zod/v4/core").$strict>;
7
+ export declare const impersonateOutput: import("zod").ZodString;
@@ -0,0 +1,4 @@
1
+ import { string } from 'zod';
2
+ import { mintInput, mintOutput } from './mint.js';
3
+ export const impersonateInput = mintInput.extend({ identity: string().min(1) });
4
+ export const impersonateOutput = mintOutput;
@@ -4,6 +4,7 @@ export { delegateInput, delegateOutput } from './delegate.js';
4
4
  export { installInput, installReceipt, type DomainRequest, type InstallInput, type InstallReceipt, } from './install.js';
5
5
  export { introspectInput } from './introspect.js';
6
6
  export { journalInput, journalOutput } from './journal.js';
7
+ export { impersonateInput, impersonateOutput } from './impersonate.js';
7
8
  export { mintInput, mintOutput } from './mint.js';
8
9
  export { mutateInput, mutateOutput } from './mutate.js';
9
10
  export { registerInput, registerOutput } from './register.js';
@@ -4,6 +4,7 @@ export { delegateInput, delegateOutput } from './delegate.js';
4
4
  export { installInput, installReceipt, } from './install.js';
5
5
  export { introspectInput } from './introspect.js';
6
6
  export { journalInput, journalOutput } from './journal.js';
7
+ export { impersonateInput, impersonateOutput } from './impersonate.js';
7
8
  export { mintInput, mintOutput } from './mint.js';
8
9
  export { mutateInput, mutateOutput } from './mutate.js';
9
10
  export { registerInput, registerOutput } from './register.js';
@@ -0,0 +1,10 @@
1
+ import { type builder } from '@astrale-os/kernel-dsl/v1';
2
+ export declare const Impersonate: builder.Method<builder.CallableProjection<{
3
+ audience?: string | undefined;
4
+ ttlSeconds: number;
5
+ grant?: unknown;
6
+ identity: string;
7
+ }, {
8
+ readonly mode: 'value';
9
+ readonly value: string;
10
+ }, "authorized", true, false>>;
@@ -0,0 +1,12 @@
1
+ import { method } from '@astrale-os/kernel-dsl/v1';
2
+ import { impersonateInput, impersonateOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
4
+ export const Impersonate = method({
5
+ description: 'Issue a Kernel credential bounded by the active target Identity authority.',
6
+ auth: 'authorized',
7
+ policy: usePolicy(() => Impersonate),
8
+ input: impersonateInput,
9
+ output: impersonateOutput,
10
+ static: true,
11
+ abstract: false,
12
+ });
@@ -379,29 +379,6 @@ export declare const Functions: Readonly<{
379
379
  };
380
380
  })[];
381
381
  operations: ({
382
- op: "edge.update";
383
- edge: {
384
- source: string;
385
- target: string;
386
- class: string;
387
- };
388
- slug: unknown;
389
- props?: {
390
- set: Record<string, unknown>;
391
- unset: string[];
392
- } | undefined;
393
- } | {
394
- op: "edge.update";
395
- edge: {
396
- source: string;
397
- target: string;
398
- class: string;
399
- };
400
- props: {
401
- set: Record<string, unknown>;
402
- unset: string[];
403
- };
404
- } | {
405
382
  op: "node.create";
406
383
  as: string;
407
384
  class: string;
@@ -429,6 +406,29 @@ export declare const Functions: Readonly<{
429
406
  };
430
407
  slug?: unknown;
431
408
  props: Record<string, unknown>;
409
+ } | {
410
+ op: "edge.update";
411
+ edge: {
412
+ source: string;
413
+ target: string;
414
+ class: string;
415
+ };
416
+ slug: unknown;
417
+ props?: {
418
+ set: Record<string, unknown>;
419
+ unset: string[];
420
+ } | undefined;
421
+ } | {
422
+ op: "edge.update";
423
+ edge: {
424
+ source: string;
425
+ target: string;
426
+ class: string;
427
+ };
428
+ props: {
429
+ set: Record<string, unknown>;
430
+ unset: string[];
431
+ };
432
432
  } | {
433
433
  op: "edge.delete";
434
434
  edge: {
@@ -639,6 +639,15 @@ export declare const IdentityMethods: Readonly<{
639
639
  readonly mode: 'value';
640
640
  readonly value: string;
641
641
  }, "authenticated", true, false>>;
642
+ impersonate: builder.Method<builder.CallableProjection<{
643
+ audience?: string | undefined;
644
+ ttlSeconds: number;
645
+ grant?: unknown;
646
+ identity: string;
647
+ }, {
648
+ readonly mode: 'value';
649
+ readonly value: string;
650
+ }, "authorized", true, false>>;
642
651
  }>;
643
652
  export declare const FunctionMethods: Readonly<{
644
653
  admit: builder.Method<builder.CallableProjection<{
@@ -1,6 +1,7 @@
1
1
  import { Admit } from './admit.js';
2
2
  import { Can } from './can.js';
3
3
  import { Delegate } from './delegate.js';
4
+ import { Impersonate } from './impersonate.js';
4
5
  import { Install } from './install.js';
5
6
  import { Introspect } from './introspect.js';
6
7
  import { Journal } from './journal.js';
@@ -27,6 +28,7 @@ export const IdentityMethods = Object.freeze({
27
28
  whoami: Whoami,
28
29
  whois: Whois,
29
30
  mint: Mint,
31
+ impersonate: Impersonate,
30
32
  });
31
33
  export const FunctionMethods = Object.freeze({
32
34
  admit: Admit,
@@ -18,6 +18,7 @@ declare const Admit: import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
18
18
  };
19
19
  }, true, false, "authenticated", 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.Function.method.admit"> & {
20
20
  readonly name: "admit";
21
+ readonly executable: true;
21
22
  };
22
23
  export declare const admit: MethodSyscall<ClassRef<'Function'> & {
23
24
  readonly origin: 'kernel.astrale.ai';
@@ -12,6 +12,7 @@ export declare const delegate: import("./model.js").MethodSyscall<Readonly<{
12
12
  readonly value: string;
13
13
  }, true, false, "authenticated", 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.delegate"> & {
14
14
  readonly name: "delegate";
15
+ readonly executable: true;
15
16
  }>;
16
17
  export declare const can: import("./model.js").MethodSyscall<Readonly<{
17
18
  origin: 'kernel.astrale.ai';
@@ -27,6 +28,7 @@ export declare const can: import("./model.js").MethodSyscall<Readonly<{
27
28
  };
28
29
  }, true, false, "authenticated", 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.can"> & {
29
30
  readonly name: "can";
31
+ readonly executable: true;
30
32
  }>;
31
33
  export declare const whoami: import("./model.js").MethodSyscall<Readonly<{
32
34
  origin: 'kernel.astrale.ai';
@@ -54,6 +56,7 @@ export declare const whoami: import("./model.js").MethodSyscall<Readonly<{
54
56
  };
55
57
  }, true, false, "authenticated", 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.whoami"> & {
56
58
  readonly name: "whoami";
59
+ readonly executable: true;
57
60
  }>;
58
61
  export declare const whois: import("./model.js").MethodSyscall<Readonly<{
59
62
  origin: 'kernel.astrale.ai';
@@ -84,6 +87,23 @@ export declare const whois: import("./model.js").MethodSyscall<Readonly<{
84
87
  } | null;
85
88
  }, 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"> & {
86
89
  readonly name: "whois";
90
+ readonly executable: true;
91
+ }>;
92
+ export declare const impersonate: import("./model.js").MethodSyscall<Readonly<{
93
+ origin: 'kernel.astrale.ai';
94
+ kind: 'class';
95
+ name: 'Identity';
96
+ }>, "impersonate", import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
97
+ audience?: string | undefined;
98
+ ttlSeconds: number;
99
+ grant?: unknown;
100
+ identity: string;
101
+ }, {
102
+ readonly mode: 'value';
103
+ readonly value: string;
104
+ }, 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"> & {
105
+ readonly name: "impersonate";
106
+ readonly executable: true;
87
107
  }>;
88
108
  export declare const mint: import("./model.js").MethodSyscall<Readonly<{
89
109
  origin: 'kernel.astrale.ai';
@@ -98,4 +118,5 @@ export declare const mint: import("./model.js").MethodSyscall<Readonly<{
98
118
  readonly value: string;
99
119
  }, true, false, "authenticated", 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.mint"> & {
100
120
  readonly name: "mint";
121
+ readonly executable: true;
101
122
  }>;
@@ -5,4 +5,5 @@ export const delegate = methodSyscall(references.delegate, K.classes.Identity.st
5
5
  export const can = methodSyscall(references.can, K.classes.Identity.static.methods.can);
6
6
  export const whoami = methodSyscall(references.whoami, K.classes.Identity.static.methods.whoami);
7
7
  export const whois = methodSyscall(references.whois, K.classes.Identity.static.methods.whois);
8
+ export const impersonate = methodSyscall(references.impersonate, K.classes.Identity.static.methods.impersonate);
8
9
  export const mint = methodSyscall(references.mint, K.classes.Identity.static.methods.mint);
@@ -37,6 +37,7 @@ export declare const resolve: import("./model.js").MethodSyscall<Readonly<{
37
37
  };
38
38
  }, 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"> & {
39
39
  readonly name: "resolve";
40
+ readonly executable: true;
40
41
  }>;
41
42
  export type { ResolvedView, ViewResolution as Resolution };
42
43
  export declare const acceptResolution: typeof acceptViewResolution;
@@ -43,3 +43,12 @@ export declare const mint: Readonly<{
43
43
  }>;
44
44
  name: "mint";
45
45
  }>;
46
+ export declare const impersonate: Readonly<{
47
+ kind: 'method';
48
+ owner: Readonly<{
49
+ origin: 'kernel.astrale.ai';
50
+ kind: 'class';
51
+ name: 'Identity';
52
+ }>;
53
+ name: "impersonate";
54
+ }>;
@@ -9,3 +9,4 @@ export const can = methodRef('can');
9
9
  export const whoami = methodRef('whoami');
10
10
  export const whois = methodRef('whois');
11
11
  export const mint = methodRef('mint');
12
+ export const impersonate = methodRef('impersonate');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-core",
3
- "version": "0.9.0-beta.44",
3
+ "version": "0.9.0-beta.46",
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.32",
163
+ "@astrale-os/kernel-dsl": "0.2.0-beta.33",
164
164
  "@noble/hashes": "2.3.0",
165
165
  "@types/json-schema": "^7.0.15",
166
166
  "dequal": "2.0.3"