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

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.
@@ -46,6 +46,13 @@ export declare const View: builder.NodeClass<{
46
46
  sandbox?: string[] | undefined;
47
47
  allow?: string[] | undefined;
48
48
  } | undefined;
49
+ host?: {
50
+ navigation: {
51
+ external: {
52
+ origins: string[];
53
+ };
54
+ };
55
+ } | undefined;
49
56
  issuer: string;
50
57
  etag: string;
51
58
  revision: string;
@@ -91,6 +98,13 @@ export declare const View: builder.NodeClass<{
91
98
  sandbox?: string[] | undefined;
92
99
  allow?: string[] | undefined;
93
100
  } | undefined;
101
+ host?: {
102
+ navigation: {
103
+ external: {
104
+ origins: string[];
105
+ };
106
+ };
107
+ } | undefined;
94
108
  issuer: string;
95
109
  etag: string;
96
110
  revision: string;
@@ -3786,6 +3786,13 @@ declare const KernelDefinitions: {
3786
3786
  sandbox?: string[] | undefined;
3787
3787
  allow?: string[] | undefined;
3788
3788
  } | undefined;
3789
+ host?: {
3790
+ navigation: {
3791
+ external: {
3792
+ origins: string[];
3793
+ };
3794
+ };
3795
+ } | undefined;
3789
3796
  issuer: string;
3790
3797
  etag: string;
3791
3798
  revision: string;
@@ -3831,6 +3838,13 @@ declare const KernelDefinitions: {
3831
3838
  sandbox?: string[] | undefined;
3832
3839
  allow?: string[] | undefined;
3833
3840
  } | undefined;
3841
+ host?: {
3842
+ navigation: {
3843
+ external: {
3844
+ origins: string[];
3845
+ };
3846
+ };
3847
+ } | undefined;
3834
3848
  issuer: string;
3835
3849
  etag: string;
3836
3850
  revision: string;
@@ -4421,29 +4435,6 @@ declare const KernelDefinitions: {
4421
4435
  };
4422
4436
  })[];
4423
4437
  operations: ({
4424
- op: "edge.update";
4425
- edge: {
4426
- source: string;
4427
- target: string;
4428
- class: string;
4429
- };
4430
- slug: unknown;
4431
- props?: {
4432
- set: Record<string, unknown>;
4433
- unset: string[];
4434
- } | undefined;
4435
- } | {
4436
- op: "edge.update";
4437
- edge: {
4438
- source: string;
4439
- target: string;
4440
- class: string;
4441
- };
4442
- props: {
4443
- set: Record<string, unknown>;
4444
- unset: string[];
4445
- };
4446
- } | {
4447
4438
  op: "node.create";
4448
4439
  as: string;
4449
4440
  class: string;
@@ -4471,6 +4462,29 @@ declare const KernelDefinitions: {
4471
4462
  };
4472
4463
  slug?: unknown;
4473
4464
  props: Record<string, unknown>;
4465
+ } | {
4466
+ op: "edge.update";
4467
+ edge: {
4468
+ source: string;
4469
+ target: string;
4470
+ class: string;
4471
+ };
4472
+ slug: unknown;
4473
+ props?: {
4474
+ set: Record<string, unknown>;
4475
+ unset: string[];
4476
+ } | undefined;
4477
+ } | {
4478
+ op: "edge.update";
4479
+ edge: {
4480
+ source: string;
4481
+ target: string;
4482
+ class: string;
4483
+ };
4484
+ props: {
4485
+ set: Record<string, unknown>;
4486
+ unset: string[];
4487
+ };
4474
4488
  } | {
4475
4489
  op: "edge.delete";
4476
4490
  edge: {
@@ -4895,31 +4909,6 @@ export declare const AuthorityRelations: Readonly<{
4895
4909
  }>;
4896
4910
  /** Exact authorized Kernel Functions for which pristine Root receives direct can_use authority. */
4897
4911
  export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
4898
- operation: string;
4899
- domains: ({
4900
- artifact: {
4901
- digest: string;
4902
- mediaType: string;
4903
- size: number;
4904
- };
4905
- currentRevision?: string | null | undefined;
4906
- } | {
4907
- publication: {
4908
- url: string;
4909
- token?: string | undefined;
4910
- etag?: string | undefined;
4911
- };
4912
- revision?: string | undefined;
4913
- currentRevision?: string | null | undefined;
4914
- })[];
4915
- }, {
4916
- readonly mode: 'binary';
4917
- }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
4918
- readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"install"> & {
4919
- readonly origin: "kernel.astrale.ai";
4920
- };
4921
- readonly key: "kernel.astrale.ai:function.install";
4922
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
4923
4912
  invocation?: {
4924
4913
  source: string;
4925
4914
  id: string;
@@ -4951,322 +4940,119 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
4951
4940
  readonly origin: "kernel.astrale.ai";
4952
4941
  };
4953
4942
  readonly key: "kernel.astrale.ai:function.journal";
4943
+ }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
4944
+ idempotencyKey: string;
4945
+ identities: ({
4946
+ id: string;
4947
+ mode: "external";
4948
+ credential: string;
4949
+ } | {
4950
+ id: string;
4951
+ mode: "self";
4952
+ publicKey: unknown;
4953
+ credential: string;
4954
+ })[];
4955
+ }, {
4956
+ readonly mode: 'value';
4957
+ readonly value: {
4958
+ identities: {
4959
+ id: string;
4960
+ iss: string;
4961
+ sub: string;
4962
+ }[];
4963
+ };
4964
+ }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
4965
+ readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"register"> & {
4966
+ readonly origin: "kernel.astrale.ai";
4967
+ };
4968
+ readonly key: "kernel.astrale.ai:function.register";
4954
4969
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
4955
4970
  ast: {
4956
- format: "astrale.graph.mutation";
4957
- version: "v3";
4958
- preconditions: ({
4971
+ format: "astrale.graph.query";
4972
+ version: "v6";
4973
+ source: {
4959
4974
  kind: "node";
4960
- node: string;
4961
- class: string;
4962
- props?: {
4963
- equals: Record<string, unknown>;
4964
- absent?: string[] | undefined;
4975
+ terms: ({
4976
+ kind: "path";
4977
+ path: string;
4965
4978
  } | {
4966
- absent: string[];
4967
- } | undefined;
4979
+ kind: "class";
4980
+ class: {
4981
+ origin: string;
4982
+ kind: "class";
4983
+ name: string;
4984
+ };
4985
+ })[];
4986
+ binding: string;
4968
4987
  } | {
4969
4988
  kind: "edge";
4970
- edge: {
4989
+ terms: {
4990
+ kind: "class";
4991
+ class: {
4992
+ origin: string;
4993
+ kind: "class";
4994
+ name: string;
4995
+ };
4996
+ }[];
4997
+ bindings: {
4971
4998
  source: string;
4999
+ edge: string;
4972
5000
  target: string;
4973
- class: string;
4974
5001
  };
4975
- slug?: unknown;
4976
- props?: {
4977
- equals: Record<string, unknown>;
4978
- absent?: string[] | undefined;
5002
+ };
5003
+ steps: ({
5004
+ op: "filter";
5005
+ binding: string;
5006
+ predicate: {
5007
+ kind: "class.satisfies";
5008
+ class: {
5009
+ origin: string;
5010
+ kind: "class";
5011
+ name: string;
5012
+ };
4979
5013
  } | {
4980
- absent: string[];
4981
- } | undefined;
4982
- } | {
4983
- kind: "query";
4984
- query: {
4985
- format: "astrale.graph.query";
4986
- version: "v6";
4987
- source: {
4988
- kind: "node";
4989
- terms: ({
4990
- kind: "path";
4991
- path: string;
4992
- } | {
4993
- kind: "class";
4994
- class: {
4995
- origin: string;
4996
- kind: "class";
4997
- name: string;
4998
- };
4999
- })[];
5000
- binding: string;
5001
- } | {
5002
- kind: "edge";
5003
- terms: {
5004
- kind: "class";
5005
- class: {
5006
- origin: string;
5007
- kind: "class";
5008
- name: string;
5009
- };
5010
- }[];
5011
- bindings: {
5012
- source: string;
5013
- edge: string;
5014
- target: string;
5015
- };
5016
- };
5017
- steps: ({
5018
- op: "filter";
5019
- binding: string;
5020
- predicate: {
5021
- kind: "class.satisfies";
5022
- class: {
5023
- origin: string;
5024
- kind: "class";
5025
- name: string;
5026
- };
5027
- } | {
5028
- kind: "class.equal";
5029
- class: {
5030
- origin: string;
5031
- kind: "class";
5032
- name: string;
5033
- };
5034
- } | {
5035
- kind: "property.equal";
5036
- property: string;
5037
- value: unknown;
5038
- } | {
5039
- kind: "property.present";
5040
- property: string;
5041
- } | {
5042
- kind: "identity.equal";
5043
- identity: string | {
5044
- source: string;
5045
- target: string;
5046
- class: string;
5047
- };
5048
- };
5049
- } | {
5050
- op: "expand";
5051
- from: string;
5052
- via: {
5053
- origin: string;
5054
- kind: "class";
5055
- name: string;
5056
- }[];
5057
- direction: "incident" | "incoming" | "outgoing";
5058
- bindings: {
5059
- edge: string;
5060
- node: string;
5061
- };
5062
- })[];
5063
- select: {
5064
- kind: "graph";
5065
- binding: string;
5066
- order?: {
5067
- property: string;
5068
- direction: "asc" | "desc";
5069
- unranked: "first" | "last";
5070
- } | undefined;
5071
- } | {
5072
- kind: "nodes";
5073
- binding: string;
5074
- projection: {
5075
- kind: "reference" | "value";
5076
- };
5077
- order?: {
5078
- property: string;
5079
- direction: "asc" | "desc";
5080
- unranked: "first" | "last";
5081
- } | undefined;
5082
- } | {
5083
- kind: "edges";
5084
- binding: string;
5085
- projection: {
5086
- edge: "reference" | "value";
5087
- source: "reference" | "value";
5088
- target: "reference" | "value";
5089
- };
5090
- order?: {
5091
- property: string;
5092
- direction: "asc" | "desc";
5093
- unranked: "first" | "last";
5094
- } | undefined;
5095
- };
5096
- };
5097
- equals: {
5098
- kind: "node";
5099
- ids: string[];
5100
- } | {
5101
- kind: "edge";
5102
- keys: {
5103
- source: string;
5104
- target: string;
5105
- class: string;
5106
- }[];
5107
- };
5108
- })[];
5109
- operations: ({
5110
- op: "edge.update";
5111
- edge: {
5112
- source: string;
5113
- target: string;
5114
- class: string;
5115
- };
5116
- slug: unknown;
5117
- props?: {
5118
- set: Record<string, unknown>;
5119
- unset: string[];
5120
- } | undefined;
5121
- } | {
5122
- op: "edge.update";
5123
- edge: {
5124
- source: string;
5125
- target: string;
5126
- class: string;
5127
- };
5128
- props: {
5129
- set: Record<string, unknown>;
5130
- unset: string[];
5131
- };
5132
- } | {
5133
- op: "node.create";
5134
- as: string;
5135
- class: string;
5136
- props: Record<string, unknown>;
5137
- } | {
5138
- op: "node.update";
5139
- node: string;
5140
- class: string;
5141
- props: {
5142
- set: Record<string, unknown>;
5143
- unset: string[];
5144
- };
5145
- } | {
5146
- op: "node.delete";
5147
- node: string;
5148
- class: string;
5149
- } | {
5150
- op: "edge.create";
5151
- class: string;
5152
- source: string | {
5153
- created: string;
5154
- };
5155
- target: string | {
5156
- created: string;
5157
- };
5158
- slug?: unknown;
5159
- props: Record<string, unknown>;
5160
- } | {
5161
- op: "edge.delete";
5162
- edge: {
5163
- source: string;
5164
- target: string;
5165
- class: string;
5166
- };
5167
- })[];
5168
- };
5169
- expected?: {
5170
- origin: string;
5171
- revision: string;
5172
- }[] | undefined;
5173
- }, {
5174
- readonly mode: 'value';
5175
- readonly value: {
5176
- createdNodes: Record<string, string>;
5177
- };
5178
- }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
5179
- readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"mutate"> & {
5180
- readonly origin: "kernel.astrale.ai";
5181
- };
5182
- readonly key: "kernel.astrale.ai:function.mutate";
5183
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
5184
- ast: {
5185
- format: "astrale.graph.query";
5186
- version: "v6";
5187
- source: {
5188
- kind: "node";
5189
- terms: ({
5190
- kind: "path";
5191
- path: string;
5192
- } | {
5193
- kind: "class";
5194
- class: {
5195
- origin: string;
5196
- kind: "class";
5197
- name: string;
5198
- };
5199
- })[];
5200
- binding: string;
5201
- } | {
5202
- kind: "edge";
5203
- terms: {
5204
- kind: "class";
5205
- class: {
5206
- origin: string;
5207
- kind: "class";
5208
- name: string;
5209
- };
5210
- }[];
5211
- bindings: {
5212
- source: string;
5213
- edge: string;
5214
- target: string;
5215
- };
5216
- };
5217
- steps: ({
5218
- op: "filter";
5219
- binding: string;
5220
- predicate: {
5221
- kind: "class.satisfies";
5222
- class: {
5223
- origin: string;
5224
- kind: "class";
5225
- name: string;
5226
- };
5227
- } | {
5228
- kind: "class.equal";
5229
- class: {
5230
- origin: string;
5231
- kind: "class";
5232
- name: string;
5233
- };
5234
- } | {
5235
- kind: "property.equal";
5236
- property: string;
5237
- value: unknown;
5238
- } | {
5239
- kind: "property.present";
5240
- property: string;
5241
- } | {
5242
- kind: "identity.equal";
5243
- identity: string | {
5244
- source: string;
5245
- target: string;
5246
- class: string;
5247
- };
5248
- };
5249
- } | {
5250
- op: "expand";
5251
- from: string;
5252
- via: {
5253
- origin: string;
5254
- kind: "class";
5255
- name: string;
5256
- }[];
5257
- direction: "incident" | "incoming" | "outgoing";
5258
- bindings: {
5259
- edge: string;
5260
- node: string;
5261
- };
5262
- })[];
5263
- select: {
5264
- kind: "graph";
5265
- binding: string;
5266
- order?: {
5267
- property: string;
5268
- direction: "asc" | "desc";
5269
- unranked: "first" | "last";
5014
+ kind: "class.equal";
5015
+ class: {
5016
+ origin: string;
5017
+ kind: "class";
5018
+ name: string;
5019
+ };
5020
+ } | {
5021
+ kind: "property.equal";
5022
+ property: string;
5023
+ value: unknown;
5024
+ } | {
5025
+ kind: "property.present";
5026
+ property: string;
5027
+ } | {
5028
+ kind: "identity.equal";
5029
+ identity: string | {
5030
+ source: string;
5031
+ target: string;
5032
+ class: string;
5033
+ };
5034
+ };
5035
+ } | {
5036
+ op: "expand";
5037
+ from: string;
5038
+ via: {
5039
+ origin: string;
5040
+ kind: "class";
5041
+ name: string;
5042
+ }[];
5043
+ direction: "incident" | "incoming" | "outgoing";
5044
+ bindings: {
5045
+ edge: string;
5046
+ node: string;
5047
+ };
5048
+ })[];
5049
+ select: {
5050
+ kind: "graph";
5051
+ binding: string;
5052
+ order?: {
5053
+ property: string;
5054
+ direction: "asc" | "desc";
5055
+ unranked: "first" | "last";
5270
5056
  } | undefined;
5271
5057
  } | {
5272
5058
  kind: "nodes";
@@ -5408,33 +5194,261 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
5408
5194
  };
5409
5195
  readonly key: "kernel.astrale.ai:function.query";
5410
5196
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
5411
- idempotencyKey: string;
5412
- identities: ({
5413
- id: string;
5414
- mode: "external";
5415
- credential: string;
5416
- } | {
5417
- id: string;
5418
- mode: "self";
5419
- publicKey: unknown;
5420
- credential: string;
5421
- })[];
5422
- }, {
5423
- readonly mode: 'value';
5424
- readonly value: {
5425
- identities: {
5426
- id: string;
5427
- iss: string;
5428
- sub: string;
5429
- }[];
5430
- };
5431
- }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
5432
- readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"register"> & {
5433
- readonly origin: "kernel.astrale.ai";
5434
- };
5435
- readonly key: "kernel.astrale.ai:function.register";
5436
- }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
5437
- operation: string;
5197
+ ast: {
5198
+ format: "astrale.graph.mutation";
5199
+ version: "v3";
5200
+ preconditions: ({
5201
+ kind: "node";
5202
+ node: string;
5203
+ class: string;
5204
+ props?: {
5205
+ equals: Record<string, unknown>;
5206
+ absent?: string[] | undefined;
5207
+ } | {
5208
+ absent: string[];
5209
+ } | undefined;
5210
+ } | {
5211
+ kind: "edge";
5212
+ edge: {
5213
+ source: string;
5214
+ target: string;
5215
+ class: string;
5216
+ };
5217
+ slug?: unknown;
5218
+ props?: {
5219
+ equals: Record<string, unknown>;
5220
+ absent?: string[] | undefined;
5221
+ } | {
5222
+ absent: string[];
5223
+ } | undefined;
5224
+ } | {
5225
+ kind: "query";
5226
+ query: {
5227
+ format: "astrale.graph.query";
5228
+ version: "v6";
5229
+ source: {
5230
+ kind: "node";
5231
+ terms: ({
5232
+ kind: "path";
5233
+ path: string;
5234
+ } | {
5235
+ kind: "class";
5236
+ class: {
5237
+ origin: string;
5238
+ kind: "class";
5239
+ name: string;
5240
+ };
5241
+ })[];
5242
+ binding: string;
5243
+ } | {
5244
+ kind: "edge";
5245
+ terms: {
5246
+ kind: "class";
5247
+ class: {
5248
+ origin: string;
5249
+ kind: "class";
5250
+ name: string;
5251
+ };
5252
+ }[];
5253
+ bindings: {
5254
+ source: string;
5255
+ edge: string;
5256
+ target: string;
5257
+ };
5258
+ };
5259
+ steps: ({
5260
+ op: "filter";
5261
+ binding: string;
5262
+ predicate: {
5263
+ kind: "class.satisfies";
5264
+ class: {
5265
+ origin: string;
5266
+ kind: "class";
5267
+ name: string;
5268
+ };
5269
+ } | {
5270
+ kind: "class.equal";
5271
+ class: {
5272
+ origin: string;
5273
+ kind: "class";
5274
+ name: string;
5275
+ };
5276
+ } | {
5277
+ kind: "property.equal";
5278
+ property: string;
5279
+ value: unknown;
5280
+ } | {
5281
+ kind: "property.present";
5282
+ property: string;
5283
+ } | {
5284
+ kind: "identity.equal";
5285
+ identity: string | {
5286
+ source: string;
5287
+ target: string;
5288
+ class: string;
5289
+ };
5290
+ };
5291
+ } | {
5292
+ op: "expand";
5293
+ from: string;
5294
+ via: {
5295
+ origin: string;
5296
+ kind: "class";
5297
+ name: string;
5298
+ }[];
5299
+ direction: "incident" | "incoming" | "outgoing";
5300
+ bindings: {
5301
+ edge: string;
5302
+ node: string;
5303
+ };
5304
+ })[];
5305
+ select: {
5306
+ kind: "graph";
5307
+ binding: string;
5308
+ order?: {
5309
+ property: string;
5310
+ direction: "asc" | "desc";
5311
+ unranked: "first" | "last";
5312
+ } | undefined;
5313
+ } | {
5314
+ kind: "nodes";
5315
+ binding: string;
5316
+ projection: {
5317
+ kind: "reference" | "value";
5318
+ };
5319
+ order?: {
5320
+ property: string;
5321
+ direction: "asc" | "desc";
5322
+ unranked: "first" | "last";
5323
+ } | undefined;
5324
+ } | {
5325
+ kind: "edges";
5326
+ binding: string;
5327
+ projection: {
5328
+ edge: "reference" | "value";
5329
+ source: "reference" | "value";
5330
+ target: "reference" | "value";
5331
+ };
5332
+ order?: {
5333
+ property: string;
5334
+ direction: "asc" | "desc";
5335
+ unranked: "first" | "last";
5336
+ } | undefined;
5337
+ };
5338
+ };
5339
+ equals: {
5340
+ kind: "node";
5341
+ ids: string[];
5342
+ } | {
5343
+ kind: "edge";
5344
+ keys: {
5345
+ source: string;
5346
+ target: string;
5347
+ class: string;
5348
+ }[];
5349
+ };
5350
+ })[];
5351
+ operations: ({
5352
+ op: "node.create";
5353
+ as: string;
5354
+ class: string;
5355
+ props: Record<string, unknown>;
5356
+ } | {
5357
+ op: "node.update";
5358
+ node: string;
5359
+ class: string;
5360
+ props: {
5361
+ set: Record<string, unknown>;
5362
+ unset: string[];
5363
+ };
5364
+ } | {
5365
+ op: "node.delete";
5366
+ node: string;
5367
+ class: string;
5368
+ } | {
5369
+ op: "edge.create";
5370
+ class: string;
5371
+ source: string | {
5372
+ created: string;
5373
+ };
5374
+ target: string | {
5375
+ created: string;
5376
+ };
5377
+ slug?: unknown;
5378
+ props: Record<string, unknown>;
5379
+ } | {
5380
+ op: "edge.update";
5381
+ edge: {
5382
+ source: string;
5383
+ target: string;
5384
+ class: string;
5385
+ };
5386
+ slug: unknown;
5387
+ props?: {
5388
+ set: Record<string, unknown>;
5389
+ unset: string[];
5390
+ } | undefined;
5391
+ } | {
5392
+ op: "edge.update";
5393
+ edge: {
5394
+ source: string;
5395
+ target: string;
5396
+ class: string;
5397
+ };
5398
+ props: {
5399
+ set: Record<string, unknown>;
5400
+ unset: string[];
5401
+ };
5402
+ } | {
5403
+ op: "edge.delete";
5404
+ edge: {
5405
+ source: string;
5406
+ target: string;
5407
+ class: string;
5408
+ };
5409
+ })[];
5410
+ };
5411
+ expected?: {
5412
+ origin: string;
5413
+ revision: string;
5414
+ }[] | undefined;
5415
+ }, {
5416
+ readonly mode: 'value';
5417
+ readonly value: {
5418
+ createdNodes: Record<string, string>;
5419
+ };
5420
+ }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
5421
+ readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"mutate"> & {
5422
+ readonly origin: "kernel.astrale.ai";
5423
+ };
5424
+ readonly key: "kernel.astrale.ai:function.mutate";
5425
+ }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
5426
+ operation: string;
5427
+ domains: ({
5428
+ artifact: {
5429
+ digest: string;
5430
+ mediaType: string;
5431
+ size: number;
5432
+ };
5433
+ currentRevision?: string | null | undefined;
5434
+ } | {
5435
+ publication: {
5436
+ url: string;
5437
+ token?: string | undefined;
5438
+ etag?: string | undefined;
5439
+ };
5440
+ revision?: string | undefined;
5441
+ currentRevision?: string | null | undefined;
5442
+ })[];
5443
+ }, {
5444
+ readonly mode: 'binary';
5445
+ }, "authorized", import("@astrale-os/kernel-dsl/v1").PolicyCheckExpression<import("@astrale-os/kernel-dsl/v1").PolicyRef, import("@astrale-os/kernel-dsl/v1/language").PolicyCheckObject>> & {
5446
+ readonly ref: import("@astrale-os/kernel-dsl/v1").FunctionRef<"install"> & {
5447
+ readonly origin: "kernel.astrale.ai";
5448
+ };
5449
+ readonly key: "kernel.astrale.ai:function.install";
5450
+ }) | (import("@astrale-os/kernel-dsl/v1").ResolvedFunction<{
5451
+ operation: string;
5438
5452
  domains: string[];
5439
5453
  data: {
5440
5454
  mode: "destructive" | "safe";
@@ -5479,30 +5493,15 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
5479
5493
  };
5480
5494
  readonly key: "kernel.astrale.ai:function.uninstall";
5481
5495
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
5482
- iss: string;
5483
- sub: string;
5496
+ audience?: string | undefined;
5497
+ ttlSeconds: number;
5498
+ grant?: unknown;
5499
+ identity: string;
5484
5500
  }, {
5485
5501
  readonly mode: 'value';
5486
- readonly value: {
5487
- id: string;
5488
- iss: string;
5489
- sub: string;
5490
- frozen: boolean;
5491
- requiredClaims: ({
5492
- claim: string;
5493
- op: "contains";
5494
- value: unknown;
5495
- } | {
5496
- claim: string;
5497
- op: "eq";
5498
- value: unknown;
5499
- } | {
5500
- claim: string;
5501
- op: "exists";
5502
- })[];
5503
- } | null;
5504
- }, 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"> & {
5505
- readonly name: "whois";
5502
+ readonly value: string;
5503
+ }, 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"> & {
5504
+ readonly name: "impersonate";
5506
5505
  readonly executable: true;
5507
5506
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
5508
5507
  target: string;
@@ -5531,6 +5530,13 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
5531
5530
  sandbox?: string[] | undefined;
5532
5531
  allow?: string[] | undefined;
5533
5532
  } | undefined;
5533
+ host?: {
5534
+ navigation: {
5535
+ external: {
5536
+ origins: string[];
5537
+ };
5538
+ };
5539
+ } | undefined;
5534
5540
  issuer: string;
5535
5541
  etag: string;
5536
5542
  revision: string;
@@ -5540,15 +5546,30 @@ export declare const KernelRootFunctions: readonly ((import("@astrale-os/kernel-
5540
5546
  readonly name: "resolve";
5541
5547
  readonly executable: true;
5542
5548
  }) | (import("@astrale-os/kernel-dsl/v1").ResolvedMethod<{
5543
- audience?: string | undefined;
5544
- ttlSeconds: number;
5545
- grant?: unknown;
5546
- identity: string;
5549
+ iss: string;
5550
+ sub: string;
5547
5551
  }, {
5548
5552
  readonly mode: 'value';
5549
- readonly value: string;
5550
- }, 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"> & {
5551
- readonly name: "impersonate";
5553
+ readonly value: {
5554
+ id: string;
5555
+ iss: string;
5556
+ sub: string;
5557
+ frozen: boolean;
5558
+ requiredClaims: ({
5559
+ claim: string;
5560
+ op: "contains";
5561
+ value: unknown;
5562
+ } | {
5563
+ claim: string;
5564
+ op: "eq";
5565
+ value: unknown;
5566
+ } | {
5567
+ claim: string;
5568
+ op: "exists";
5569
+ })[];
5570
+ } | null;
5571
+ }, 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"> & {
5572
+ readonly name: "whois";
5552
5573
  readonly executable: true;
5553
5574
  }))[];
5554
5575
  export { AuthorityOperationOrder, AuthorityOperations, operationOf } from '../authority/index.js';
@@ -0,0 +1,17 @@
1
+ /** Browser effects required by a published Shell View. */
2
+ export interface ViewHostRequirements {
3
+ readonly navigation: {
4
+ readonly external: {
5
+ readonly origins: readonly string[];
6
+ };
7
+ };
8
+ }
9
+ export declare const viewHostRequirements: import("zod").ZodObject<{
10
+ navigation: import("zod").ZodObject<{
11
+ external: import("zod").ZodObject<{
12
+ origins: import("zod").ZodArray<import("zod").ZodString>;
13
+ }, import("zod/v4/core").$strict>;
14
+ }, import("zod/v4/core").$strict>;
15
+ }, import("zod/v4/core").$strict>;
16
+ /** Decode canonical wire requirements; construction also normalizes authored origins. */
17
+ export declare function acceptViewHostRequirements(input: unknown, handshake: 'shell' | 'none', canonicalize?: boolean): ViewHostRequirements | undefined;
@@ -0,0 +1,40 @@
1
+ import * as portable from '@astrale-os/kernel-dsl/value';
2
+ import { array, strictObject, string } from 'zod';
3
+ export const viewHostRequirements = strictObject({
4
+ navigation: strictObject({
5
+ external: strictObject({ origins: array(string()).min(1) }),
6
+ }),
7
+ });
8
+ /** Decode canonical wire requirements; construction also normalizes authored origins. */
9
+ export function acceptViewHostRequirements(input, handshake, canonicalize = false) {
10
+ if (input === undefined)
11
+ return undefined;
12
+ if (handshake !== 'shell')
13
+ throw new TypeError('Host requirements require a Shell handshake.');
14
+ const parsed = viewHostRequirements.safeParse(portable.accept(input));
15
+ if (!parsed.success)
16
+ throw new TypeError('View host requirements are invalid.');
17
+ const origins = parsed.data.navigation.external.origins.map((candidate) => {
18
+ const url = new URL(candidate);
19
+ if (url.protocol !== 'https:' ||
20
+ url.hostname.includes('*') ||
21
+ url.username !== '' ||
22
+ url.password !== '' ||
23
+ url.pathname !== '/' ||
24
+ url.search !== '' ||
25
+ url.hash !== '' ||
26
+ (!canonicalize && url.origin !== candidate))
27
+ throw new TypeError('External navigation requires an exact HTTPS origin.');
28
+ return url.origin;
29
+ });
30
+ const canonical = [...new Set(origins)].sort();
31
+ if (!canonicalize &&
32
+ (canonical.length !== origins.length ||
33
+ canonical.some((origin, index) => origin !== origins[index])))
34
+ throw new TypeError('External navigation origins are not canonical.');
35
+ return Object.freeze({
36
+ navigation: Object.freeze({
37
+ external: Object.freeze({ origins: Object.freeze(canonical) }),
38
+ }),
39
+ });
40
+ }
@@ -27,6 +27,13 @@ export declare const viewResolveOutput: import("zod").ZodObject<{
27
27
  sandbox: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
28
28
  allow: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
29
29
  }, import("zod/v4/core").$strict>>;
30
+ host: import("zod").ZodOptional<import("zod").ZodObject<{
31
+ navigation: import("zod").ZodObject<{
32
+ external: import("zod").ZodObject<{
33
+ origins: import("zod").ZodArray<import("zod").ZodString>;
34
+ }, import("zod/v4/core").$strict>;
35
+ }, import("zod/v4/core").$strict>;
36
+ }, import("zod/v4/core").$strict>>;
30
37
  issuer: import("zod").ZodString;
31
38
  etag: import("zod").ZodString;
32
39
  revision: import("zod").ZodString;
@@ -1,6 +1,7 @@
1
1
  import { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
2
2
  import { fullMatch } from '@astrale-os/kernel-dsl/v1/value/full-match';
3
3
  import { array, discriminatedUnion, enum as enumeration, literal, strictObject, string } from 'zod';
4
+ import { viewHostRequirements } from './view-host-requirements.js';
4
5
  const definition = strictObject({
5
6
  origin: string().check(fullMatch(patterns.originFullMatch)),
6
7
  kind: literal('class'),
@@ -26,6 +27,7 @@ export const viewResolveOutput = strictObject({
26
27
  href: string().min(1),
27
28
  handshake: enumeration(['shell', 'none']),
28
29
  iframe: iframeRequirements.optional(),
30
+ host: viewHostRequirements.optional(),
29
31
  issuer: string().min(1),
30
32
  etag: string().min(1),
31
33
  revision: string().min(1),
@@ -696,6 +696,13 @@ export declare const ViewMethods: Readonly<{
696
696
  sandbox?: string[] | undefined;
697
697
  allow?: string[] | undefined;
698
698
  } | undefined;
699
+ host?: {
700
+ navigation: {
701
+ external: {
702
+ origins: string[];
703
+ };
704
+ };
705
+ } | undefined;
699
706
  issuer: string;
700
707
  etag: string;
701
708
  revision: string;
@@ -26,6 +26,13 @@ export declare const ViewResolve: builder.Method<builder.CallableProjection<{
26
26
  sandbox?: string[] | undefined;
27
27
  allow?: string[] | undefined;
28
28
  } | undefined;
29
+ host?: {
30
+ navigation: {
31
+ external: {
32
+ origins: string[];
33
+ };
34
+ };
35
+ } | undefined;
29
36
  issuer: string;
30
37
  etag: string;
31
38
  revision: string;
@@ -1,12 +1,15 @@
1
1
  import type { Revision, ViewDefinition } from '@astrale-os/kernel-dsl/v1';
2
2
  import type { Key as KeyType } from '@astrale-os/kernel-dsl/v1/addressing';
3
3
  import type { IssuerId } from '../../../../../auth/index.js';
4
+ import { type ViewHostRequirements } from '../../contracts/view-host-requirements.js';
5
+ export { acceptViewHostRequirements, type ViewHostRequirements, } from '../../contracts/view-host-requirements.js';
4
6
  export interface ResolvedView {
5
7
  readonly key: KeyType.View;
6
8
  readonly declaration: ViewDeclaration;
7
9
  readonly href: string;
8
10
  readonly handshake: 'shell' | 'none';
9
11
  readonly iframe?: IframeRequirements;
12
+ readonly host?: ViewHostRequirements;
10
13
  readonly issuer: IssuerId;
11
14
  readonly etag: `sha256:${string}`;
12
15
  readonly revision: Revision;
@@ -22,4 +25,3 @@ export interface ViewResolution {
22
25
  }
23
26
  /** Admit one detached, deeply immutable result of the Kernel View.resolve syscall. */
24
27
  export declare function acceptViewResolution(input: unknown): ViewResolution;
25
- export {};
@@ -2,6 +2,8 @@ import { Key, patterns } from '@astrale-os/kernel-dsl/v1/addressing';
2
2
  import * as portable from '@astrale-os/kernel-dsl/value';
3
3
  import { issuer } from '../../../../../auth/index.js';
4
4
  import { viewResolveOutput } from '../../contracts/index.js';
5
+ import { acceptViewHostRequirements, } from '../../contracts/view-host-requirements.js';
6
+ export { acceptViewHostRequirements, } from '../../contracts/view-host-requirements.js';
5
7
  /** Admit one detached, deeply immutable result of the Kernel View.resolve syscall. */
6
8
  export function acceptViewResolution(input) {
7
9
  const candidate = portable.accept(input);
@@ -24,12 +26,14 @@ export function acceptViewResolution(input) {
24
26
  invalid(`Resolved View ${index} issuer is not canonical.`);
25
27
  const declaration = acceptDeclaration(view.declaration, index);
26
28
  const iframe = acceptIframeRequirements(view.iframe, view.handshake, index);
29
+ const host = acceptViewHostRequirements(view.host, view.handshake);
27
30
  return Object.freeze({
28
31
  key,
29
32
  declaration,
30
33
  href: view.href,
31
34
  handshake: view.handshake,
32
35
  ...(iframe === undefined ? {} : { iframe }),
36
+ ...(host === undefined ? {} : { host }),
33
37
  issuer: view.issuer,
34
38
  etag: digest(view.etag, `Resolved View ${index} ETag`),
35
39
  revision: digest(view.revision, `Resolved View ${index} revision`),
@@ -30,6 +30,13 @@ export declare const resolve: import("./model.js").MethodSyscall<Readonly<{
30
30
  sandbox?: string[] | undefined;
31
31
  allow?: string[] | undefined;
32
32
  } | undefined;
33
+ host?: {
34
+ navigation: {
35
+ external: {
36
+ origins: string[];
37
+ };
38
+ };
39
+ } | undefined;
33
40
  issuer: string;
34
41
  etag: string;
35
42
  revision: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-core",
3
- "version": "0.9.0-beta.46",
3
+ "version": "0.9.0-beta.47",
4
4
  "description": "Astrale Kernel Core - Types, Invariants, and Pure Logic",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -186,6 +186,6 @@
186
186
  "test": "vitest run",
187
187
  "test:file": "vitest run",
188
188
  "test:watch": "vitest",
189
- "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.types.json && tsc --noEmit -p schema/.module/tsconfig.json"
189
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.types.json && tsc --noEmit -p schema/.module/tsconfig.json && tsc -p tsconfig.workers.json"
190
190
  }
191
191
  }