@astrale-os/kernel-core 0.9.0-beta.45 → 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,
@@ -89,6 +89,22 @@ export declare const whois: import("./model.js").MethodSyscall<Readonly<{
89
89
  readonly name: "whois";
90
90
  readonly executable: true;
91
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;
107
+ }>;
92
108
  export declare const mint: import("./model.js").MethodSyscall<Readonly<{
93
109
  origin: 'kernel.astrale.ai';
94
110
  kind: 'class';
@@ -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);
@@ -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.45",
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": {