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

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.
@@ -1,5 +1,4 @@
1
- import type { ClassRef, CoreRef, Key } from '@astrale-os/kernel-dsl/v1/addressing';
2
- import type { PolicyObjectRef } from '@astrale-os/kernel-dsl/v1/language';
1
+ import type { ClassRef, CoreRef, FunctionRef, PolicyRef, ViewRef, Key } from '@astrale-os/kernel-dsl/v1/addressing';
3
2
  import type { NodeId } from '../../../graph/node/index.js';
4
3
  import type { Grant } from '../../grant/index.js';
5
4
  export declare const AUTHORITY_PREDICATE_VERSION: 8;
@@ -23,7 +22,7 @@ export type Term = {
23
22
  readonly ref: CoreRef;
24
23
  } | {
25
24
  readonly kind: 'ref';
26
- readonly ref: PolicyObjectRef;
25
+ readonly ref: ClassRef | FunctionRef | PolicyRef | ViewRef | CoreRef;
27
26
  } | {
28
27
  readonly kind: 'local';
29
28
  readonly id: number;
@@ -1,6 +1,6 @@
1
1
  export { project } from './project.js';
2
2
  export { compile } from './compile.js';
3
- export { projectedCallables } from './callables.js';
3
+ export { projectedCallables, projectedMethodPath } from './callables.js';
4
4
  export { ProjectionError } from './diagnostics.js';
5
5
  export type { ProjectionErrorCode } from './diagnostics.js';
6
6
  export type { CoreProjection, Projection, ProjectionPart } from './types.js';
@@ -1,4 +1,4 @@
1
1
  export { project } from './project.js';
2
2
  export { compile } from './compile.js';
3
- export { projectedCallables } from './callables.js';
3
+ export { projectedCallables, projectedMethodPath } from './callables.js';
4
4
  export { ProjectionError } from './diagnostics.js';
@@ -212,14 +212,6 @@ declare const KernelDefinitions: {
212
212
  })[];
213
213
  };
214
214
  }, "authenticated", true, "default">>, "whoami", "self"> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
215
- policy: string;
216
- object: string;
217
- }, {
218
- readonly mode: 'value';
219
- readonly value: {
220
- allowed: boolean;
221
- };
222
- }, "authenticated", true, "default">>, "can", "self"> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
223
215
  iss: string;
224
216
  sub: string;
225
217
  }, {
@@ -243,6 +235,14 @@ declare const KernelDefinitions: {
243
235
  })[];
244
236
  } | null;
245
237
  }, "authorized", true, "default">>, "whois", "self"> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
238
+ policy: string;
239
+ object: string;
240
+ }, {
241
+ readonly mode: 'value';
242
+ readonly value: {
243
+ allowed: boolean;
244
+ };
245
+ }, "authenticated", true, "default">>, "can", "self"> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
246
246
  audience?: string | undefined;
247
247
  ttlSeconds: number;
248
248
  grant?: unknown;
@@ -668,14 +668,6 @@ declare const KernelDefinitions: {
668
668
  })[];
669
669
  };
670
670
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
671
- policy: string;
672
- object: string;
673
- }, {
674
- readonly mode: 'value';
675
- readonly value: {
676
- allowed: boolean;
677
- };
678
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
679
671
  iss: string;
680
672
  sub: string;
681
673
  }, {
@@ -699,6 +691,14 @@ declare const KernelDefinitions: {
699
691
  })[];
700
692
  } | null;
701
693
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
694
+ policy: string;
695
+ object: string;
696
+ }, {
697
+ readonly mode: 'value';
698
+ readonly value: {
699
+ allowed: boolean;
700
+ };
701
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
702
702
  audience?: string | undefined;
703
703
  ttlSeconds: number;
704
704
  grant?: unknown;
@@ -858,14 +858,6 @@ declare const KernelDefinitions: {
858
858
  })[];
859
859
  };
860
860
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
861
- policy: string;
862
- object: string;
863
- }, {
864
- readonly mode: 'value';
865
- readonly value: {
866
- allowed: boolean;
867
- };
868
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
869
861
  iss: string;
870
862
  sub: string;
871
863
  }, {
@@ -889,6 +881,14 @@ declare const KernelDefinitions: {
889
881
  })[];
890
882
  } | null;
891
883
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
884
+ policy: string;
885
+ object: string;
886
+ }, {
887
+ readonly mode: 'value';
888
+ readonly value: {
889
+ allowed: boolean;
890
+ };
891
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
892
892
  audience?: string | undefined;
893
893
  ttlSeconds: number;
894
894
  grant?: unknown;
@@ -1048,14 +1048,6 @@ declare const KernelDefinitions: {
1048
1048
  })[];
1049
1049
  };
1050
1050
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1051
- policy: string;
1052
- object: string;
1053
- }, {
1054
- readonly mode: 'value';
1055
- readonly value: {
1056
- allowed: boolean;
1057
- };
1058
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1059
1051
  iss: string;
1060
1052
  sub: string;
1061
1053
  }, {
@@ -1079,6 +1071,14 @@ declare const KernelDefinitions: {
1079
1071
  })[];
1080
1072
  } | null;
1081
1073
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1074
+ policy: string;
1075
+ object: string;
1076
+ }, {
1077
+ readonly mode: 'value';
1078
+ readonly value: {
1079
+ allowed: boolean;
1080
+ };
1081
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1082
1082
  audience?: string | undefined;
1083
1083
  ttlSeconds: number;
1084
1084
  grant?: unknown;
@@ -1238,14 +1238,6 @@ declare const KernelDefinitions: {
1238
1238
  })[];
1239
1239
  };
1240
1240
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1241
- policy: string;
1242
- object: string;
1243
- }, {
1244
- readonly mode: 'value';
1245
- readonly value: {
1246
- allowed: boolean;
1247
- };
1248
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1249
1241
  iss: string;
1250
1242
  sub: string;
1251
1243
  }, {
@@ -1269,6 +1261,14 @@ declare const KernelDefinitions: {
1269
1261
  })[];
1270
1262
  } | null;
1271
1263
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1264
+ policy: string;
1265
+ object: string;
1266
+ }, {
1267
+ readonly mode: 'value';
1268
+ readonly value: {
1269
+ allowed: boolean;
1270
+ };
1271
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1272
1272
  audience?: string | undefined;
1273
1273
  ttlSeconds: number;
1274
1274
  grant?: unknown;
@@ -1435,14 +1435,6 @@ declare const KernelDefinitions: {
1435
1435
  })[];
1436
1436
  };
1437
1437
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1438
- policy: string;
1439
- object: string;
1440
- }, {
1441
- readonly mode: 'value';
1442
- readonly value: {
1443
- allowed: boolean;
1444
- };
1445
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1446
1438
  iss: string;
1447
1439
  sub: string;
1448
1440
  }, {
@@ -1466,6 +1458,14 @@ declare const KernelDefinitions: {
1466
1458
  })[];
1467
1459
  } | null;
1468
1460
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1461
+ policy: string;
1462
+ object: string;
1463
+ }, {
1464
+ readonly mode: 'value';
1465
+ readonly value: {
1466
+ allowed: boolean;
1467
+ };
1468
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1469
1469
  audience?: string | undefined;
1470
1470
  ttlSeconds: number;
1471
1471
  grant?: unknown;
@@ -1645,14 +1645,6 @@ declare const KernelDefinitions: {
1645
1645
  })[];
1646
1646
  };
1647
1647
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1648
- policy: string;
1649
- object: string;
1650
- }, {
1651
- readonly mode: 'value';
1652
- readonly value: {
1653
- allowed: boolean;
1654
- };
1655
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1656
1648
  iss: string;
1657
1649
  sub: string;
1658
1650
  }, {
@@ -1676,6 +1668,14 @@ declare const KernelDefinitions: {
1676
1668
  })[];
1677
1669
  } | null;
1678
1670
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1671
+ policy: string;
1672
+ object: string;
1673
+ }, {
1674
+ readonly mode: 'value';
1675
+ readonly value: {
1676
+ allowed: boolean;
1677
+ };
1678
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1679
1679
  audience?: string | undefined;
1680
1680
  ttlSeconds: number;
1681
1681
  grant?: unknown;
@@ -1683,14 +1683,29 @@ declare const KernelDefinitions: {
1683
1683
  readonly mode: 'value';
1684
1684
  readonly value: string;
1685
1685
  }, "authenticated", true, "default">>, "mint", unknown>>> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1686
- policy: string;
1687
- object: string;
1686
+ iss: string;
1687
+ sub: string;
1688
1688
  }, {
1689
1689
  readonly mode: 'value';
1690
1690
  readonly value: {
1691
- allowed: boolean;
1692
- };
1693
- }, "authenticated", true, "default">>, "can", builder.ClassOwnerProjection<"node", {
1691
+ id: string;
1692
+ iss: string;
1693
+ sub: string;
1694
+ frozen: boolean;
1695
+ requiredClaims: ({
1696
+ claim: string;
1697
+ op: "contains";
1698
+ value: unknown;
1699
+ } | {
1700
+ claim: string;
1701
+ op: "eq";
1702
+ value: unknown;
1703
+ } | {
1704
+ claim: string;
1705
+ op: "exists";
1706
+ })[];
1707
+ } | null;
1708
+ }, "authorized", true, "default">>, "whois", builder.ClassOwnerProjection<"node", {
1694
1709
  readonly abstract: true;
1695
1710
  readonly depth: 1;
1696
1711
  readonly properties: {
@@ -1843,14 +1858,6 @@ declare const KernelDefinitions: {
1843
1858
  })[];
1844
1859
  };
1845
1860
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1846
- policy: string;
1847
- object: string;
1848
- }, {
1849
- readonly mode: 'value';
1850
- readonly value: {
1851
- allowed: boolean;
1852
- };
1853
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1854
1861
  iss: string;
1855
1862
  sub: string;
1856
1863
  }, {
@@ -1874,6 +1881,14 @@ declare const KernelDefinitions: {
1874
1881
  })[];
1875
1882
  } | null;
1876
1883
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1884
+ policy: string;
1885
+ object: string;
1886
+ }, {
1887
+ readonly mode: 'value';
1888
+ readonly value: {
1889
+ allowed: boolean;
1890
+ };
1891
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1877
1892
  audience?: string | undefined;
1878
1893
  ttlSeconds: number;
1879
1894
  grant?: unknown;
@@ -1881,29 +1896,14 @@ declare const KernelDefinitions: {
1881
1896
  readonly mode: 'value';
1882
1897
  readonly value: string;
1883
1898
  }, "authenticated", true, "default">>, "mint", unknown>>> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
1884
- iss: string;
1885
- sub: string;
1899
+ policy: string;
1900
+ object: string;
1886
1901
  }, {
1887
1902
  readonly mode: 'value';
1888
1903
  readonly value: {
1889
- id: string;
1890
- iss: string;
1891
- sub: string;
1892
- frozen: boolean;
1893
- requiredClaims: ({
1894
- claim: string;
1895
- op: "contains";
1896
- value: unknown;
1897
- } | {
1898
- claim: string;
1899
- op: "eq";
1900
- value: unknown;
1901
- } | {
1902
- claim: string;
1903
- op: "exists";
1904
- })[];
1905
- } | null;
1906
- }, "authorized", true, "default">>, "whois", builder.ClassOwnerProjection<"node", {
1904
+ allowed: boolean;
1905
+ };
1906
+ }, "authenticated", true, "default">>, "can", builder.ClassOwnerProjection<"node", {
1907
1907
  readonly abstract: true;
1908
1908
  readonly depth: 1;
1909
1909
  readonly properties: {
@@ -2056,14 +2056,6 @@ declare const KernelDefinitions: {
2056
2056
  })[];
2057
2057
  };
2058
2058
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2059
- policy: string;
2060
- object: string;
2061
- }, {
2062
- readonly mode: 'value';
2063
- readonly value: {
2064
- allowed: boolean;
2065
- };
2066
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2067
2059
  iss: string;
2068
2060
  sub: string;
2069
2061
  }, {
@@ -2087,6 +2079,14 @@ declare const KernelDefinitions: {
2087
2079
  })[];
2088
2080
  } | null;
2089
2081
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2082
+ policy: string;
2083
+ object: string;
2084
+ }, {
2085
+ readonly mode: 'value';
2086
+ readonly value: {
2087
+ allowed: boolean;
2088
+ };
2089
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2090
2090
  audience?: string | undefined;
2091
2091
  ttlSeconds: number;
2092
2092
  grant?: unknown;
@@ -2253,14 +2253,6 @@ declare const KernelDefinitions: {
2253
2253
  })[];
2254
2254
  };
2255
2255
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2256
- policy: string;
2257
- object: string;
2258
- }, {
2259
- readonly mode: 'value';
2260
- readonly value: {
2261
- allowed: boolean;
2262
- };
2263
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2264
2256
  iss: string;
2265
2257
  sub: string;
2266
2258
  }, {
@@ -2284,6 +2276,14 @@ declare const KernelDefinitions: {
2284
2276
  })[];
2285
2277
  } | null;
2286
2278
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2279
+ policy: string;
2280
+ object: string;
2281
+ }, {
2282
+ readonly mode: 'value';
2283
+ readonly value: {
2284
+ allowed: boolean;
2285
+ };
2286
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2287
2287
  audience?: string | undefined;
2288
2288
  ttlSeconds: number;
2289
2289
  grant?: unknown;
@@ -2473,14 +2473,6 @@ declare const KernelDefinitions: {
2473
2473
  })[];
2474
2474
  };
2475
2475
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2476
- policy: string;
2477
- object: string;
2478
- }, {
2479
- readonly mode: 'value';
2480
- readonly value: {
2481
- allowed: boolean;
2482
- };
2483
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2484
2476
  iss: string;
2485
2477
  sub: string;
2486
2478
  }, {
@@ -2504,6 +2496,14 @@ declare const KernelDefinitions: {
2504
2496
  })[];
2505
2497
  } | null;
2506
2498
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2499
+ policy: string;
2500
+ object: string;
2501
+ }, {
2502
+ readonly mode: 'value';
2503
+ readonly value: {
2504
+ allowed: boolean;
2505
+ };
2506
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2507
2507
  audience?: string | undefined;
2508
2508
  ttlSeconds: number;
2509
2509
  grant?: unknown;
@@ -2663,14 +2663,6 @@ declare const KernelDefinitions: {
2663
2663
  })[];
2664
2664
  };
2665
2665
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2666
- policy: string;
2667
- object: string;
2668
- }, {
2669
- readonly mode: 'value';
2670
- readonly value: {
2671
- allowed: boolean;
2672
- };
2673
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2674
2666
  iss: string;
2675
2667
  sub: string;
2676
2668
  }, {
@@ -2694,6 +2686,14 @@ declare const KernelDefinitions: {
2694
2686
  })[];
2695
2687
  } | null;
2696
2688
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2689
+ policy: string;
2690
+ object: string;
2691
+ }, {
2692
+ readonly mode: 'value';
2693
+ readonly value: {
2694
+ allowed: boolean;
2695
+ };
2696
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2697
2697
  audience?: string | undefined;
2698
2698
  ttlSeconds: number;
2699
2699
  grant?: unknown;
@@ -2853,14 +2853,6 @@ declare const KernelDefinitions: {
2853
2853
  })[];
2854
2854
  };
2855
2855
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2856
- policy: string;
2857
- object: string;
2858
- }, {
2859
- readonly mode: 'value';
2860
- readonly value: {
2861
- allowed: boolean;
2862
- };
2863
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2864
2856
  iss: string;
2865
2857
  sub: string;
2866
2858
  }, {
@@ -2884,6 +2876,14 @@ declare const KernelDefinitions: {
2884
2876
  })[];
2885
2877
  } | null;
2886
2878
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2879
+ policy: string;
2880
+ object: string;
2881
+ }, {
2882
+ readonly mode: 'value';
2883
+ readonly value: {
2884
+ allowed: boolean;
2885
+ };
2886
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
2887
2887
  audience?: string | undefined;
2888
2888
  ttlSeconds: number;
2889
2889
  grant?: unknown;
@@ -3043,14 +3043,6 @@ declare const KernelDefinitions: {
3043
3043
  })[];
3044
3044
  };
3045
3045
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3046
- policy: string;
3047
- object: string;
3048
- }, {
3049
- readonly mode: 'value';
3050
- readonly value: {
3051
- allowed: boolean;
3052
- };
3053
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3054
3046
  iss: string;
3055
3047
  sub: string;
3056
3048
  }, {
@@ -3074,6 +3066,14 @@ declare const KernelDefinitions: {
3074
3066
  })[];
3075
3067
  } | null;
3076
3068
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3069
+ policy: string;
3070
+ object: string;
3071
+ }, {
3072
+ readonly mode: 'value';
3073
+ readonly value: {
3074
+ allowed: boolean;
3075
+ };
3076
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3077
3077
  audience?: string | undefined;
3078
3078
  ttlSeconds: number;
3079
3079
  grant?: unknown;
@@ -3241,14 +3241,6 @@ declare const KernelDefinitions: {
3241
3241
  })[];
3242
3242
  };
3243
3243
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3244
- policy: string;
3245
- object: string;
3246
- }, {
3247
- readonly mode: 'value';
3248
- readonly value: {
3249
- allowed: boolean;
3250
- };
3251
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3252
3244
  iss: string;
3253
3245
  sub: string;
3254
3246
  }, {
@@ -3272,6 +3264,14 @@ declare const KernelDefinitions: {
3272
3264
  })[];
3273
3265
  } | null;
3274
3266
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3267
+ policy: string;
3268
+ object: string;
3269
+ }, {
3270
+ readonly mode: 'value';
3271
+ readonly value: {
3272
+ allowed: boolean;
3273
+ };
3274
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3275
3275
  audience?: string | undefined;
3276
3276
  ttlSeconds: number;
3277
3277
  grant?: unknown;
@@ -3452,14 +3452,6 @@ declare const KernelDefinitions: {
3452
3452
  })[];
3453
3453
  };
3454
3454
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3455
- policy: string;
3456
- object: string;
3457
- }, {
3458
- readonly mode: 'value';
3459
- readonly value: {
3460
- allowed: boolean;
3461
- };
3462
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3463
3455
  iss: string;
3464
3456
  sub: string;
3465
3457
  }, {
@@ -3483,6 +3475,14 @@ declare const KernelDefinitions: {
3483
3475
  })[];
3484
3476
  } | null;
3485
3477
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3478
+ policy: string;
3479
+ object: string;
3480
+ }, {
3481
+ readonly mode: 'value';
3482
+ readonly value: {
3483
+ allowed: boolean;
3484
+ };
3485
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3486
3486
  audience?: string | undefined;
3487
3487
  ttlSeconds: number;
3488
3488
  grant?: unknown;
@@ -3490,14 +3490,29 @@ declare const KernelDefinitions: {
3490
3490
  readonly mode: 'value';
3491
3491
  readonly value: string;
3492
3492
  }, "authenticated", true, "default">>, "mint", unknown>>> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3493
- policy: string;
3494
- object: string;
3493
+ iss: string;
3494
+ sub: string;
3495
3495
  }, {
3496
3496
  readonly mode: 'value';
3497
3497
  readonly value: {
3498
- allowed: boolean;
3499
- };
3500
- }, "authenticated", true, "default">>, "can", builder.ClassOwnerProjection<"node", {
3498
+ id: string;
3499
+ iss: string;
3500
+ sub: string;
3501
+ frozen: boolean;
3502
+ requiredClaims: ({
3503
+ claim: string;
3504
+ op: "contains";
3505
+ value: unknown;
3506
+ } | {
3507
+ claim: string;
3508
+ op: "eq";
3509
+ value: unknown;
3510
+ } | {
3511
+ claim: string;
3512
+ op: "exists";
3513
+ })[];
3514
+ } | null;
3515
+ }, "authorized", true, "default">>, "whois", builder.ClassOwnerProjection<"node", {
3501
3516
  readonly abstract: true;
3502
3517
  readonly depth: 1;
3503
3518
  readonly properties: {
@@ -3650,14 +3665,6 @@ declare const KernelDefinitions: {
3650
3665
  })[];
3651
3666
  };
3652
3667
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3653
- policy: string;
3654
- object: string;
3655
- }, {
3656
- readonly mode: 'value';
3657
- readonly value: {
3658
- allowed: boolean;
3659
- };
3660
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3661
3668
  iss: string;
3662
3669
  sub: string;
3663
3670
  }, {
@@ -3681,6 +3688,14 @@ declare const KernelDefinitions: {
3681
3688
  })[];
3682
3689
  } | null;
3683
3690
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3691
+ policy: string;
3692
+ object: string;
3693
+ }, {
3694
+ readonly mode: 'value';
3695
+ readonly value: {
3696
+ allowed: boolean;
3697
+ };
3698
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3684
3699
  audience?: string | undefined;
3685
3700
  ttlSeconds: number;
3686
3701
  grant?: unknown;
@@ -3688,29 +3703,14 @@ declare const KernelDefinitions: {
3688
3703
  readonly mode: 'value';
3689
3704
  readonly value: string;
3690
3705
  }, "authenticated", true, "default">>, "mint", unknown>>> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3691
- iss: string;
3692
- sub: string;
3706
+ policy: string;
3707
+ object: string;
3693
3708
  }, {
3694
3709
  readonly mode: 'value';
3695
3710
  readonly value: {
3696
- id: string;
3697
- iss: string;
3698
- sub: string;
3699
- frozen: boolean;
3700
- requiredClaims: ({
3701
- claim: string;
3702
- op: "contains";
3703
- value: unknown;
3704
- } | {
3705
- claim: string;
3706
- op: "eq";
3707
- value: unknown;
3708
- } | {
3709
- claim: string;
3710
- op: "exists";
3711
- })[];
3712
- } | null;
3713
- }, "authorized", true, "default">>, "whois", builder.ClassOwnerProjection<"node", {
3711
+ allowed: boolean;
3712
+ };
3713
+ }, "authenticated", true, "default">>, "can", builder.ClassOwnerProjection<"node", {
3714
3714
  readonly abstract: true;
3715
3715
  readonly depth: 1;
3716
3716
  readonly properties: {
@@ -3863,14 +3863,6 @@ declare const KernelDefinitions: {
3863
3863
  })[];
3864
3864
  };
3865
3865
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3866
- policy: string;
3867
- object: string;
3868
- }, {
3869
- readonly mode: 'value';
3870
- readonly value: {
3871
- allowed: boolean;
3872
- };
3873
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3874
3866
  iss: string;
3875
3867
  sub: string;
3876
3868
  }, {
@@ -3894,6 +3886,14 @@ declare const KernelDefinitions: {
3894
3886
  })[];
3895
3887
  } | null;
3896
3888
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3889
+ policy: string;
3890
+ object: string;
3891
+ }, {
3892
+ readonly mode: 'value';
3893
+ readonly value: {
3894
+ allowed: boolean;
3895
+ };
3896
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
3897
3897
  audience?: string | undefined;
3898
3898
  ttlSeconds: number;
3899
3899
  grant?: unknown;
@@ -4060,14 +4060,6 @@ declare const KernelDefinitions: {
4060
4060
  })[];
4061
4061
  };
4062
4062
  }, "authenticated", true, "default">>, "whoami", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
4063
- policy: string;
4064
- object: string;
4065
- }, {
4066
- readonly mode: 'value';
4067
- readonly value: {
4068
- allowed: boolean;
4069
- };
4070
- }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
4071
4063
  iss: string;
4072
4064
  sub: string;
4073
4065
  }, {
@@ -4091,6 +4083,14 @@ declare const KernelDefinitions: {
4091
4083
  })[];
4092
4084
  } | null;
4093
4085
  }, "authorized", true, "default">>, "whois", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
4086
+ policy: string;
4087
+ object: string;
4088
+ }, {
4089
+ readonly mode: 'value';
4090
+ readonly value: {
4091
+ allowed: boolean;
4092
+ };
4093
+ }, "authenticated", true, "default">>, "can", unknown> | builder.AuthoredMethodProjection<builder.Method<builder.CallableProjection<{
4094
4094
  audience?: string | undefined;
4095
4095
  ttlSeconds: number;
4096
4096
  grant?: unknown;
@@ -4523,7 +4523,9 @@ declare const KernelDefinitions: {
4523
4523
  readonly effectiveProperties: never;
4524
4524
  }>;
4525
4525
  };
4526
- readonly policies: {};
4526
+ readonly policies: {
4527
+ readonly canUseSyscall: builder.Policy;
4528
+ };
4527
4529
  readonly functions: Readonly<{
4528
4530
  query: builder.Function<builder.CallableProjection<{
4529
4531
  ast: {
@@ -5916,16 +5918,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
5916
5918
  readonly origin: "kernel.astrale.ai";
5917
5919
  };
5918
5920
  readonly key: "kernel.astrale.ai:function.install";
5919
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
5920
- kind: "bundle" | "inspect";
5921
- origin: string;
5922
- }, {
5923
- readonly mode: 'binary';
5924
- }, "authenticated", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
5925
- readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"introspect"> & {
5926
- readonly origin: "kernel.astrale.ai";
5927
- };
5928
- readonly key: "kernel.astrale.ai:function.introspect";
5929
5921
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
5930
5922
  operation: string;
5931
5923
  domains: string[];
@@ -6030,15 +6022,6 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
6030
6022
  };
6031
6023
  }, true, "sealed", "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"> & {
6032
6024
  readonly name: "resolve";
6033
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
6034
- audience?: string | undefined;
6035
- ttlSeconds: number;
6036
- grant?: unknown;
6037
- }, {
6038
- readonly mode: 'value';
6039
- readonly value: string;
6040
- }, true, "default", "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"> & {
6041
- readonly name: "mint";
6042
6025
  }))[];
6043
6026
  export { AuthorityOperationOrder, AuthorityOperations, operationOf } from '../authority/index.js';
6044
6027
  export type { AuthorityOperation, AuthorityRelation } from '../authority/index.js';
@@ -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';
@@ -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: {
@@ -689,3 +689,4 @@ export declare const ViewMethods: Readonly<{
689
689
  };
690
690
  }, "authorized", true, "sealed">>;
691
691
  }>;
692
+ 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';
@@ -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
  });
@@ -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
  });
@@ -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: {
@@ -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
  });
@@ -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
  });
@@ -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
  });
@@ -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
+ }
@@ -1,8 +1,10 @@
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,
@@ -1,8 +1,10 @@
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-core",
3
- "version": "0.9.0-beta.42",
3
+ "version": "0.9.0-beta.43",
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.30",
163
+ "@astrale-os/kernel-dsl": "0.2.0-beta.31",
164
164
  "@noble/hashes": "2.3.0",
165
165
  "@types/json-schema": "^7.0.15",
166
166
  "dequal": "2.0.3"