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

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.
Files changed (74) hide show
  1. package/dist/auth/authority/language/predicate.d.ts +2 -3
  2. package/dist/callable/index.d.ts +1 -1
  3. package/dist/callable/index.js +1 -1
  4. package/dist/callable/invocation/call.d.ts +13 -2
  5. package/dist/callable/invocation/call.js +40 -1
  6. package/dist/callable/invocation/index.d.ts +1 -1
  7. package/dist/callable/invocation/index.js +1 -1
  8. package/dist/graph/path/authoring/path.d.ts +2 -1
  9. package/dist/graph/path/authoring/path.js +7 -2
  10. package/dist/graph/path/language/model.d.ts +8 -3
  11. package/dist/graph/path/language/syntax.js +23 -8
  12. package/dist/schema/authority/operation-node.d.ts +2 -0
  13. package/dist/schema/authority/policy.d.ts +2 -0
  14. package/dist/schema/callables/function.d.ts +16 -6
  15. package/dist/schema/callables/function.js +1 -1
  16. package/dist/schema/callables/view.d.ts +4 -2
  17. package/dist/schema/definitions/class.d.ts +2 -0
  18. package/dist/schema/domain/domain.d.ts +283 -1268
  19. package/dist/schema/identity/identity.d.ts +21 -17
  20. package/dist/schema/kernel/projection/callables.js +2 -3
  21. package/dist/schema/kernel/projection/index.d.ts +1 -1
  22. package/dist/schema/kernel/projection/index.js +1 -1
  23. package/dist/schema/kernel/projection/keys.js +1 -2
  24. package/dist/schema/kernel/projection/path.js +2 -29
  25. package/dist/schema/kernel/projection/project.js +2 -3
  26. package/dist/schema/kernel/schema.d.ts +484 -1450
  27. package/dist/schema/kernel/schema.js +2 -4
  28. package/dist/schema/kernel/syscalls/contracts/admit.d.ts +5 -1
  29. package/dist/schema/kernel/syscalls/contracts/admit.js +9 -2
  30. package/dist/schema/kernel/syscalls/contracts/delegate.d.ts +1 -0
  31. package/dist/schema/kernel/syscalls/contracts/delegate.js +1 -0
  32. package/dist/schema/kernel/syscalls/declarations/admit.d.ts +6 -2
  33. package/dist/schema/kernel/syscalls/declarations/admit.js +1 -1
  34. package/dist/schema/kernel/syscalls/declarations/can.d.ts +1 -1
  35. package/dist/schema/kernel/syscalls/declarations/can.js +1 -1
  36. package/dist/schema/kernel/syscalls/declarations/delegate.d.ts +2 -1
  37. package/dist/schema/kernel/syscalls/declarations/delegate.js +2 -2
  38. package/dist/schema/kernel/syscalls/declarations/index.d.ts +44 -38
  39. package/dist/schema/kernel/syscalls/declarations/index.js +1 -0
  40. package/dist/schema/kernel/syscalls/declarations/install.d.ts +1 -1
  41. package/dist/schema/kernel/syscalls/declarations/install.js +2 -0
  42. package/dist/schema/kernel/syscalls/declarations/introspect.d.ts +1 -1
  43. package/dist/schema/kernel/syscalls/declarations/journal.d.ts +1 -1
  44. package/dist/schema/kernel/syscalls/declarations/journal.js +2 -0
  45. package/dist/schema/kernel/syscalls/declarations/mint.d.ts +1 -1
  46. package/dist/schema/kernel/syscalls/declarations/mint.js +1 -1
  47. package/dist/schema/kernel/syscalls/declarations/mutate.d.ts +24 -24
  48. package/dist/schema/kernel/syscalls/declarations/mutate.js +2 -0
  49. package/dist/schema/kernel/syscalls/declarations/query.d.ts +1 -1
  50. package/dist/schema/kernel/syscalls/declarations/query.js +2 -0
  51. package/dist/schema/kernel/syscalls/declarations/register.d.ts +1 -1
  52. package/dist/schema/kernel/syscalls/declarations/register.js +2 -0
  53. package/dist/schema/kernel/syscalls/declarations/uninstall.d.ts +1 -1
  54. package/dist/schema/kernel/syscalls/declarations/uninstall.js +2 -0
  55. package/dist/schema/kernel/syscalls/declarations/use-policy.d.ts +4 -0
  56. package/dist/schema/kernel/syscalls/declarations/use-policy.js +9 -0
  57. package/dist/schema/kernel/syscalls/declarations/view-resolve.d.ts +1 -1
  58. package/dist/schema/kernel/syscalls/declarations/view-resolve.js +3 -1
  59. package/dist/schema/kernel/syscalls/declarations/whoami.d.ts +1 -1
  60. package/dist/schema/kernel/syscalls/declarations/whoami.js +1 -1
  61. package/dist/schema/kernel/syscalls/declarations/whois.d.ts +1 -1
  62. package/dist/schema/kernel/syscalls/declarations/whois.js +3 -1
  63. package/dist/schema/kernel/syscalls/descriptors/function.d.ts +6 -2
  64. package/dist/schema/kernel/syscalls/descriptors/identity.d.ts +6 -5
  65. package/dist/schema/kernel/syscalls/descriptors/identity.js +1 -1
  66. package/dist/schema/kernel/syscalls/descriptors/view.d.ts +1 -1
  67. package/dist/schema/meta/descriptable.d.ts +2 -0
  68. package/dist/schema/meta/iconable.d.ts +2 -0
  69. package/dist/schema/meta/named.d.ts +2 -0
  70. package/dist/schema/meta/node.d.ts +2 -0
  71. package/dist/schema/meta/remotable.d.ts +2 -0
  72. package/dist/schema/meta/statused.d.ts +2 -0
  73. package/dist/schema/meta/timestamped.d.ts +2 -0
  74. package/package.json +2 -2
@@ -6,7 +6,7 @@ import { Class, Extends, InstanceOf } from '../definitions/index.js';
6
6
  import { Domain as DomainClass, OfDomain } from '../domain/index.js';
7
7
  import { ConstrainedBy, ExcludedFrom, ExtendsWith, Identity } from '../identity/index.js';
8
8
  import { Descriptable, Edge, Iconable, Named, Node, Remotable, Statused, Timestamped, } from '../meta/index.js';
9
- import { Functions } from './syscalls/declarations/index.js';
9
+ import { Functions, CanUseSyscall } from './syscalls/declarations/index.js';
10
10
  const KernelDefinitions = {
11
11
  classes: {
12
12
  Descriptable,
@@ -42,7 +42,7 @@ const KernelDefinitions = {
42
42
  of_domain: OfDomain,
43
43
  view_for: ViewFor,
44
44
  },
45
- policies: {},
45
+ policies: { canUseSyscall: CanUseSyscall },
46
46
  functions: Functions,
47
47
  };
48
48
  const KernelCore = Object.freeze({
@@ -73,11 +73,9 @@ export const KernelRootFunctions = Object.freeze([
73
73
  K.functions.mutate,
74
74
  K.functions.register,
75
75
  K.functions.install,
76
- K.functions.introspect,
77
76
  K.functions.uninstall,
78
77
  K.functions.journal,
79
78
  K.classes.Identity.static.methods.whois,
80
- K.classes.Identity.static.methods.mint,
81
79
  K.classes.View.static.methods.resolve,
82
80
  ].sort((left, right) => (left.key < right.key ? -1 : left.key > right.key ? 1 : 0)));
83
81
  export { AuthorityOperationOrder, AuthorityOperations, operationOf } from '../authority/index.js';
@@ -1,6 +1,10 @@
1
1
  export declare const admitInput: import("zod").ZodObject<{
2
2
  call: import("zod").ZodObject<{
3
- target: import("zod").ZodString;
3
+ target: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
4
+ callable: import("zod").ZodString;
5
+ instance: import("zod").ZodOptional<import("zod").ZodString>;
6
+ revision: import("zod").ZodOptional<import("zod").ZodString>;
7
+ }, import("zod/v4/core").$strict>]>;
4
8
  input: import("zod").ZodUnknown;
5
9
  }, import("zod/v4/core").$strict>;
6
10
  credential: import("zod").ZodOptional<import("zod").ZodString>;
@@ -1,7 +1,14 @@
1
- import { strictObject, string, unknown as unknownSchema } from 'zod';
1
+ import { strictObject, string, union, unknown as unknownSchema } from 'zod';
2
2
  export const admitInput = strictObject({
3
3
  call: strictObject({
4
- target: string().min(1),
4
+ target: union([
5
+ string().min(1),
6
+ strictObject({
7
+ callable: string().min(1),
8
+ instance: string().min(1).optional(),
9
+ revision: string().min(1).optional(),
10
+ }),
11
+ ]),
5
12
  input: unknownSchema(),
6
13
  }),
7
14
  credential: string().optional(),
@@ -1,4 +1,5 @@
1
1
  export declare const delegateInput: import("zod").ZodObject<{
2
+ principal: import("zod").ZodString;
2
3
  audience: import("zod").ZodString;
3
4
  ttlSeconds: import("zod").ZodNumber;
4
5
  attenuation: import("zod").ZodUnknown;
@@ -1,6 +1,7 @@
1
1
  import { number, strictObject, string, unknown as unknownSchema } from 'zod';
2
2
  const text = string().min(1);
3
3
  export const delegateInput = strictObject({
4
+ principal: text,
4
5
  audience: text,
5
6
  ttlSeconds: number().int().min(1),
6
7
  attenuation: unknownSchema(),
@@ -1,7 +1,11 @@
1
1
  import { type builder } from '@astrale-os/kernel-dsl/v1';
2
2
  export declare const Admit: builder.Method<builder.CallableProjection<{
3
3
  call: {
4
- target: string;
4
+ target: string | {
5
+ callable: string;
6
+ instance?: string | undefined;
7
+ revision?: string | undefined;
8
+ };
5
9
  input: unknown;
6
10
  };
7
11
  credential?: string | undefined;
@@ -11,4 +15,4 @@ export declare const Admit: builder.Method<builder.CallableProjection<{
11
15
  callable: string;
12
16
  receiver?: string | undefined;
13
17
  };
14
- }, "authenticated", true, "sealed">>;
18
+ }, "authenticated", true, false>>;
@@ -6,5 +6,5 @@ export const Admit = method({
6
6
  input: admitInput,
7
7
  output: admitOutput,
8
8
  static: true,
9
- inheritance: 'sealed',
9
+ abstract: false,
10
10
  });
@@ -7,4 +7,4 @@ export declare const Can: builder.Method<builder.CallableProjection<{
7
7
  readonly value: {
8
8
  allowed: boolean;
9
9
  };
10
- }, "authenticated", true, "default">>;
10
+ }, "authenticated", true, false>>;
@@ -6,5 +6,5 @@ export const Can = method({
6
6
  input: canInput,
7
7
  output: canOutput,
8
8
  static: true,
9
- inheritance: 'default',
9
+ abstract: false,
10
10
  });
@@ -1,9 +1,10 @@
1
1
  import { type builder } from '@astrale-os/kernel-dsl/v1';
2
2
  export declare const Delegate: builder.Method<builder.CallableProjection<{
3
+ principal: string;
3
4
  audience: string;
4
5
  ttlSeconds: number;
5
6
  attenuation: unknown;
6
7
  }, {
7
8
  readonly mode: 'value';
8
9
  readonly value: string;
9
- }, "authenticated", false, "default">>;
10
+ }, "authenticated", true, false>>;
@@ -1,9 +1,9 @@
1
1
  import { method } from '@astrale-os/kernel-dsl/v1';
2
2
  import { delegateInput, delegateOutput } from '../contracts/index.js';
3
3
  export const Delegate = method({
4
- description: 'Issue one strictly attenuated credential from this authenticated Identity.',
4
+ description: 'Issue one strictly attenuated credential from the authenticated execution principal.',
5
5
  auth: 'authenticated',
6
6
  input: delegateInput,
7
7
  output: delegateOutput,
8
- inheritance: 'default',
8
+ static: true,
9
9
  });
@@ -222,7 +222,7 @@ export declare const Functions: Readonly<{
222
222
  next?: string | undefined;
223
223
  };
224
224
  };
225
- }, "authorized", false, "default">>;
225
+ }, "authorized", false, false>>;
226
226
  mutate: builder.Function<builder.CallableProjection<{
227
227
  ast: {
228
228
  format: "astrale.graph.mutation";
@@ -379,6 +379,29 @@ 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
+ } | {
382
405
  op: "node.create";
383
406
  as: string;
384
407
  class: string;
@@ -406,29 +429,6 @@ export declare const Functions: Readonly<{
406
429
  };
407
430
  slug?: unknown;
408
431
  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: {
@@ -447,7 +447,7 @@ export declare const Functions: Readonly<{
447
447
  readonly value: {
448
448
  createdNodes: Record<string, string>;
449
449
  };
450
- }, "authorized", false, "default">>;
450
+ }, "authorized", false, false>>;
451
451
  register: builder.Function<builder.CallableProjection<{
452
452
  idempotencyKey: string;
453
453
  identities: ({
@@ -469,7 +469,7 @@ export declare const Functions: Readonly<{
469
469
  sub: string;
470
470
  }[];
471
471
  };
472
- }, "authorized", false, "default">>;
472
+ }, "authorized", false, false>>;
473
473
  install: builder.Function<builder.CallableProjection<{
474
474
  operation: string;
475
475
  domains: ({
@@ -490,13 +490,13 @@ export declare const Functions: Readonly<{
490
490
  })[];
491
491
  }, {
492
492
  readonly mode: 'binary';
493
- }, "authorized", false, "default">>;
493
+ }, "authorized", false, false>>;
494
494
  introspect: builder.Function<builder.CallableProjection<{
495
495
  kind: "bundle" | "inspect";
496
496
  origin: string;
497
497
  }, {
498
498
  readonly mode: 'binary';
499
- }, "authenticated", false, "default">>;
499
+ }, "authenticated", false, false>>;
500
500
  uninstall: builder.Function<builder.CallableProjection<{
501
501
  operation: string;
502
502
  domains: string[];
@@ -537,7 +537,7 @@ export declare const Functions: Readonly<{
537
537
  } | undefined;
538
538
  }[];
539
539
  };
540
- }, "authorized", false, "default">>;
540
+ }, "authorized", false, false>>;
541
541
  journal: builder.Function<builder.CallableProjection<{
542
542
  invocation?: {
543
543
  source: string;
@@ -565,17 +565,18 @@ export declare const Functions: Readonly<{
565
565
  cursor?: string | undefined;
566
566
  gap?: unknown;
567
567
  };
568
- }, "authorized", false, "default">>;
568
+ }, "authorized", false, false>>;
569
569
  }>;
570
570
  export declare const IdentityMethods: Readonly<{
571
571
  delegate: builder.Method<builder.CallableProjection<{
572
+ principal: string;
572
573
  audience: string;
573
574
  ttlSeconds: number;
574
575
  attenuation: unknown;
575
576
  }, {
576
577
  readonly mode: 'value';
577
578
  readonly value: string;
578
- }, "authenticated", false, "default">>;
579
+ }, "authenticated", true, false>>;
579
580
  can: builder.Method<builder.CallableProjection<{
580
581
  policy: string;
581
582
  object: string;
@@ -584,7 +585,7 @@ export declare const IdentityMethods: Readonly<{
584
585
  readonly value: {
585
586
  allowed: boolean;
586
587
  };
587
- }, "authenticated", true, "default">>;
588
+ }, "authenticated", true, false>>;
588
589
  whoami: builder.Method<builder.CallableProjection<Record<string, never>, {
589
590
  readonly mode: 'value';
590
591
  readonly value: {
@@ -605,7 +606,7 @@ export declare const IdentityMethods: Readonly<{
605
606
  op: "exists";
606
607
  })[];
607
608
  };
608
- }, "authenticated", true, "default">>;
609
+ }, "authenticated", true, false>>;
609
610
  whois: builder.Method<builder.CallableProjection<{
610
611
  iss: string;
611
612
  sub: string;
@@ -629,7 +630,7 @@ export declare const IdentityMethods: Readonly<{
629
630
  op: "exists";
630
631
  })[];
631
632
  } | null;
632
- }, "authorized", true, "default">>;
633
+ }, "authorized", true, false>>;
633
634
  mint: builder.Method<builder.CallableProjection<{
634
635
  audience?: string | undefined;
635
636
  ttlSeconds: number;
@@ -637,12 +638,16 @@ export declare const IdentityMethods: Readonly<{
637
638
  }, {
638
639
  readonly mode: 'value';
639
640
  readonly value: string;
640
- }, "authenticated", true, "default">>;
641
+ }, "authenticated", true, false>>;
641
642
  }>;
642
643
  export declare const FunctionMethods: Readonly<{
643
644
  admit: builder.Method<builder.CallableProjection<{
644
645
  call: {
645
- target: string;
646
+ target: string | {
647
+ callable: string;
648
+ instance?: string | undefined;
649
+ revision?: string | undefined;
650
+ };
646
651
  input: unknown;
647
652
  };
648
653
  credential?: string | undefined;
@@ -652,7 +657,7 @@ export declare const FunctionMethods: Readonly<{
652
657
  callable: string;
653
658
  receiver?: string | undefined;
654
659
  };
655
- }, "authenticated", true, "sealed">>;
660
+ }, "authenticated", true, false>>;
656
661
  }>;
657
662
  export declare const ViewMethods: Readonly<{
658
663
  resolve: builder.Method<builder.CallableProjection<{
@@ -687,5 +692,6 @@ export declare const ViewMethods: Readonly<{
687
692
  revision: string;
688
693
  }[];
689
694
  };
690
- }, "authorized", true, "sealed">>;
695
+ }, "authorized", true, false>>;
691
696
  }>;
697
+ export { CanUseSyscall } from './use-policy.js';
@@ -34,3 +34,4 @@ export const FunctionMethods = Object.freeze({
34
34
  export const ViewMethods = Object.freeze({
35
35
  resolve: ViewResolve,
36
36
  });
37
+ export { CanUseSyscall } from './use-policy.js';
@@ -19,4 +19,4 @@ export declare const Install: builder.Function<builder.CallableProjection<{
19
19
  })[];
20
20
  }, {
21
21
  readonly mode: 'binary';
22
- }, "authorized", false, "default">>;
22
+ }, "authorized", false, false>>;
@@ -1,8 +1,10 @@
1
1
  import { func, output } from '@astrale-os/kernel-dsl/v1';
2
2
  import { installInput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const Install = func({
4
5
  description: 'Authorize and atomically converge a non-empty set of exact ready Domain generations.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => Install),
6
8
  input: installInput,
7
9
  output: output.binary(),
8
10
  });
@@ -4,4 +4,4 @@ export declare const Introspect: builder.Function<builder.CallableProjection<{
4
4
  origin: string;
5
5
  }, {
6
6
  readonly mode: 'binary';
7
- }, "authenticated", false, "default">>;
7
+ }, "authenticated", false, false>>;
@@ -26,4 +26,4 @@ export declare const Journal: builder.Function<builder.CallableProjection<{
26
26
  cursor?: string | undefined;
27
27
  gap?: unknown;
28
28
  };
29
- }, "authorized", false, "default">>;
29
+ }, "authorized", false, false>>;
@@ -1,8 +1,10 @@
1
1
  import { func } from '@astrale-os/kernel-dsl/v1';
2
2
  import { journalInput, journalOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const Journal = func({
4
5
  description: 'Read one authorized page of semantic operations from the kernel journal.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => Journal),
6
8
  input: journalInput,
7
9
  output: journalOutput,
8
10
  });
@@ -6,4 +6,4 @@ export declare const Mint: builder.Method<builder.CallableProjection<{
6
6
  }, {
7
7
  readonly mode: 'value';
8
8
  readonly value: string;
9
- }, "authenticated", true, "default">>;
9
+ }, "authenticated", true, false>>;
@@ -6,5 +6,5 @@ export const Mint = method({
6
6
  input: mintInput,
7
7
  output: mintOutput,
8
8
  static: true,
9
- inheritance: 'default',
9
+ abstract: false,
10
10
  });
@@ -155,29 +155,6 @@ export declare const Mutate: builder.Function<builder.CallableProjection<{
155
155
  };
156
156
  })[];
157
157
  operations: ({
158
- op: "edge.update";
159
- edge: {
160
- source: string;
161
- target: string;
162
- class: string;
163
- };
164
- slug: unknown;
165
- props?: {
166
- set: Record<string, unknown>;
167
- unset: string[];
168
- } | undefined;
169
- } | {
170
- op: "edge.update";
171
- edge: {
172
- source: string;
173
- target: string;
174
- class: string;
175
- };
176
- props: {
177
- set: Record<string, unknown>;
178
- unset: string[];
179
- };
180
- } | {
181
158
  op: "node.create";
182
159
  as: string;
183
160
  class: string;
@@ -205,6 +182,29 @@ export declare const Mutate: builder.Function<builder.CallableProjection<{
205
182
  };
206
183
  slug?: unknown;
207
184
  props: Record<string, unknown>;
185
+ } | {
186
+ op: "edge.update";
187
+ edge: {
188
+ source: string;
189
+ target: string;
190
+ class: string;
191
+ };
192
+ slug: unknown;
193
+ props?: {
194
+ set: Record<string, unknown>;
195
+ unset: string[];
196
+ } | undefined;
197
+ } | {
198
+ op: "edge.update";
199
+ edge: {
200
+ source: string;
201
+ target: string;
202
+ class: string;
203
+ };
204
+ props: {
205
+ set: Record<string, unknown>;
206
+ unset: string[];
207
+ };
208
208
  } | {
209
209
  op: "edge.delete";
210
210
  edge: {
@@ -223,4 +223,4 @@ export declare const Mutate: builder.Function<builder.CallableProjection<{
223
223
  readonly value: {
224
224
  createdNodes: Record<string, string>;
225
225
  };
226
- }, "authorized", false, "default">>;
226
+ }, "authorized", false, false>>;
@@ -1,8 +1,10 @@
1
1
  import { func } from '@astrale-os/kernel-dsl/v1';
2
2
  import { mutateInput, mutateOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const Mutate = func({
4
5
  description: 'Validate, authorize, and commit one atomic graph mutation.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => Mutate),
6
8
  input: mutateInput,
7
9
  output: mutateOutput,
8
10
  });
@@ -221,4 +221,4 @@ export declare const Query: builder.Function<builder.CallableProjection<{
221
221
  next?: string | undefined;
222
222
  };
223
223
  };
224
- }, "authorized", false, "default">>;
224
+ }, "authorized", false, false>>;
@@ -1,8 +1,10 @@
1
1
  import { func } from '@astrale-os/kernel-dsl/v1';
2
2
  import { queryInput, queryOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const Query = func({
4
5
  description: 'Execute one finite authorized graph query.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => Query),
6
8
  input: queryInput,
7
9
  output: queryOutput,
8
10
  });
@@ -20,4 +20,4 @@ export declare const Register: builder.Function<builder.CallableProjection<{
20
20
  sub: string;
21
21
  }[];
22
22
  };
23
- }, "authorized", false, "default">>;
23
+ }, "authorized", false, false>>;
@@ -1,8 +1,10 @@
1
1
  import { func } from '@astrale-os/kernel-dsl/v1';
2
2
  import { registerInput, registerOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const Register = func({
4
5
  description: 'Atomically establish credential-evidenced, write-once Authentication on existing Identity-bearing Nodes.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => Register),
6
8
  input: registerInput,
7
9
  output: registerOutput,
8
10
  });
@@ -39,4 +39,4 @@ export declare const Uninstall: builder.Function<builder.CallableProjection<{
39
39
  } | undefined;
40
40
  }[];
41
41
  };
42
- }, "authorized", false, "default">>;
42
+ }, "authorized", false, false>>;
@@ -1,8 +1,10 @@
1
1
  import { func } from '@astrale-os/kernel-dsl/v1';
2
2
  import { uninstallInput, uninstallOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const Uninstall = func({
4
5
  description: 'Durably uninstall one Domain installation epoch and return its terminal receipt.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => Uninstall),
6
8
  input: uninstallInput,
7
9
  output: uninstallOutput,
8
10
  });
@@ -0,0 +1,4 @@
1
+ import { type builder } from '@astrale-os/kernel-dsl/v1';
2
+ /** Explicit capability admission chosen by protected Kernel callables. */
3
+ export declare const CanUseSyscall: builder.Policy;
4
+ export declare function usePolicy(callable: () => builder.Function | builder.Method): builder.CallablePolicyBuilder;
@@ -0,0 +1,9 @@
1
+ import { policy } from '@astrale-os/kernel-dsl/v1';
2
+ import { CanUse } from '../../../authority/index.js';
3
+ /** Explicit capability admission chosen by protected Kernel callables. */
4
+ export const CanUseSyscall = policy({
5
+ match: ({ edge, subject, object }) => edge({ source: subject, class: () => CanUse, target: object }),
6
+ });
7
+ export function usePolicy(callable) {
8
+ return ({ check, ref }) => check(CanUseSyscall, ref(callable));
9
+ }
@@ -31,4 +31,4 @@ export declare const ViewResolve: builder.Method<builder.CallableProjection<{
31
31
  revision: string;
32
32
  }[];
33
33
  };
34
- }, "authorized", true, "sealed">>;
34
+ }, "authorized", true, false>>;
@@ -1,10 +1,12 @@
1
1
  import { method } from '@astrale-os/kernel-dsl/v1';
2
2
  import { viewResolveInput, viewResolveOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const ViewResolve = method({
4
5
  description: 'Resolve the installed View declarations applicable to one authorized graph target.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => ViewResolve),
6
8
  input: viewResolveInput,
7
9
  output: viewResolveOutput,
8
10
  static: true,
9
- inheritance: 'sealed',
11
+ abstract: false,
10
12
  });
@@ -19,4 +19,4 @@ export declare const Whoami: builder.Method<builder.CallableProjection<Record<st
19
19
  op: "exists";
20
20
  })[];
21
21
  };
22
- }, "authenticated", true, "default">>;
22
+ }, "authenticated", true, false>>;
@@ -6,5 +6,5 @@ export const Whoami = method({
6
6
  input: whoamiInput,
7
7
  output: whoamiOutput,
8
8
  static: true,
9
- inheritance: 'default',
9
+ abstract: false,
10
10
  });
@@ -22,4 +22,4 @@ export declare const Whois: builder.Method<builder.CallableProjection<{
22
22
  op: "exists";
23
23
  })[];
24
24
  } | null;
25
- }, "authorized", true, "default">>;
25
+ }, "authorized", true, false>>;
@@ -1,10 +1,12 @@
1
1
  import { method } from '@astrale-os/kernel-dsl/v1';
2
2
  import { whoisInput, whoisOutput } from '../contracts/index.js';
3
+ import { usePolicy } from './use-policy.js';
3
4
  export const Whois = method({
4
5
  description: 'Resolve one issuer-and-subject Identity.',
5
6
  auth: 'authorized',
7
+ policy: usePolicy(() => Whois),
6
8
  input: whoisInput,
7
9
  output: whoisOutput,
8
10
  static: true,
9
- inheritance: 'default',
11
+ abstract: false,
10
12
  });
@@ -2,7 +2,11 @@ import type { ClassRef } from '@astrale-os/kernel-dsl/v1';
2
2
  import { type MethodSyscall } from './model.js';
3
3
  declare const Admit: import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
4
4
  call: {
5
- target: string;
5
+ target: string | {
6
+ callable: string;
7
+ instance?: string | undefined;
8
+ revision?: string | undefined;
9
+ };
6
10
  input: unknown;
7
11
  };
8
12
  credential?: string | undefined;
@@ -12,7 +16,7 @@ declare const Admit: import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
12
16
  callable: string;
13
17
  receiver?: string | undefined;
14
18
  };
15
- }, true, "sealed", "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"> & {
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"> & {
16
20
  readonly name: "admit";
17
21
  };
18
22
  export declare const admit: MethodSyscall<ClassRef<'Function'> & {