@astrale-os/sdk 0.6.0-beta.23 → 0.6.0-beta.24

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 (181) hide show
  1. package/README.md +30 -36
  2. package/dist/application/define.d.ts +3 -1
  3. package/dist/application/define.js +16 -2
  4. package/dist/application/domain.d.ts +3 -1
  5. package/dist/application/index.d.ts +1 -1
  6. package/dist/application/mutation/index.d.ts +1 -1
  7. package/dist/application/query/composite/plan.d.ts +0 -4
  8. package/dist/application/query/composite/plan.js +0 -2
  9. package/dist/application/view/define.js +4 -6
  10. package/dist/application/view/frontend.d.ts +2 -2
  11. package/dist/application/view/index.d.ts +1 -1
  12. package/dist/application/view/route.d.ts +0 -14
  13. package/dist/application/view/route.js +1 -64
  14. package/dist/deployment/adapter/adapter.d.ts +3 -20
  15. package/dist/deployment/adapter/bundle/file.d.ts +1 -1
  16. package/dist/deployment/adapter/define.d.ts +4 -25
  17. package/dist/deployment/adapter/define.js +12 -44
  18. package/dist/deployment/adapter/index.d.ts +0 -2
  19. package/dist/deployment/adapter/release/list.d.ts +1 -2
  20. package/dist/deployment/address/summary.d.ts +3 -7
  21. package/dist/deployment/authoring.d.ts +0 -2
  22. package/dist/deployment/authoring.js +0 -1
  23. package/dist/deployment/build/build.d.ts +6 -0
  24. package/dist/deployment/build/compile.js +2 -0
  25. package/dist/deployment/build/frontend/compilation.d.ts +2 -4
  26. package/dist/deployment/build/frontend/compilation.js +0 -5
  27. package/dist/deployment/build/frontend/digest.js +1 -5
  28. package/dist/deployment/build/material.d.ts +2 -2
  29. package/dist/deployment/build/material.js +28 -13
  30. package/dist/deployment/deployment.d.ts +4 -8
  31. package/dist/deployment/index.d.ts +3 -5
  32. package/dist/deployment/index.js +1 -2
  33. package/dist/deployment/release/addressing.d.ts +2 -9
  34. package/dist/deployment/release/addressing.js +2 -3
  35. package/dist/deployment/release/index.d.ts +0 -2
  36. package/dist/deployment/release/index.js +0 -2
  37. package/dist/deployment/release/release.d.ts +1 -1
  38. package/dist/deployment/release/runtime.d.ts +0 -2
  39. package/dist/deployment/release/runtime.js +0 -2
  40. package/dist/deployment/release/served/index.d.ts +1 -2
  41. package/dist/deployment/release/served/index.js +7 -3
  42. package/dist/deployment/release/served/views.js +0 -1
  43. package/dist/deployment/verify/index.d.ts +2 -4
  44. package/dist/deployment/verify/index.js +1 -3
  45. package/dist/deployment/verify/preflight/index.d.ts +0 -12
  46. package/dist/deployment/verify/preflight/index.js +0 -12
  47. package/dist/deployment/verify/readiness/index.d.ts +2 -6
  48. package/dist/deployment/verify/readiness/index.js +3 -12
  49. package/dist/deployment/worker/response.d.ts +1 -4
  50. package/dist/deployment/worker/response.js +2 -8
  51. package/dist/execution/identity/delivery.d.ts +2 -7
  52. package/dist/execution/identity/delivery.js +1 -23
  53. package/dist/execution/identity/identity.d.ts +2 -3
  54. package/dist/execution/index.d.ts +1 -3
  55. package/dist/execution/index.js +1 -2
  56. package/dist/execution/invocation/admission/authority.d.ts +4 -5
  57. package/dist/execution/invocation/admission/authority.js +1 -2
  58. package/dist/execution/invocation/index.d.ts +2 -2
  59. package/dist/execution/invocation/index.js +1 -1
  60. package/dist/execution/invocation/invocation.js +3 -12
  61. package/dist/execution/invocation/result/errors.d.ts +0 -10
  62. package/dist/execution/invocation/result/errors.js +0 -17
  63. package/dist/execution/invocation/result/index.d.ts +2 -2
  64. package/dist/execution/invocation/result/index.js +1 -1
  65. package/dist/execution/runtime/release.d.ts +6 -11
  66. package/dist/execution/runtime/release.js +2 -9
  67. package/dist/execution/service/create.js +3 -1
  68. package/dist/execution/service/service.d.ts +2 -3
  69. package/dist/execution/service/serving/delivery.d.ts +1 -2
  70. package/dist/execution/service/serving/delivery.js +1 -2
  71. package/dist/execution/service/serving/source.d.ts +3 -10
  72. package/dist/execution/service/serving/source.js +1 -5
  73. package/dist/execution/workflows/index.d.ts +1 -1
  74. package/dist/execution/workflows/index.js +1 -1
  75. package/dist/execution/workflows/options.d.ts +0 -6
  76. package/dist/execution/workflows/options.js +0 -18
  77. package/dist/execution/workflows/receiver.d.ts +1 -2
  78. package/dist/execution/workflows/receiver.js +13 -20
  79. package/dist/execution/workflows/route.d.ts +1 -3
  80. package/dist/execution/workflows/route.js +4 -9
  81. package/dist/execution/workflows/run.d.ts +1 -1
  82. package/dist/execution/workflows/run.js +1 -1
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +1 -1
  85. package/dist/platform/graph/alias.d.ts +1 -5
  86. package/dist/platform/graph/alias.js +1 -5
  87. package/dist/platform/graph/document/index.d.ts +1 -1
  88. package/dist/platform/graph/document/index.js +1 -1
  89. package/dist/platform/graph/index.d.ts +1 -1
  90. package/dist/platform/graph/index.js +1 -1
  91. package/dist/platform/release/index.d.ts +1 -26
  92. package/dist/platform/release/index.js +1 -26
  93. package/dist/platform/schema/class-icon-svg.d.ts +9 -0
  94. package/dist/platform/schema/class-icon-svg.js +29 -0
  95. package/dist/platform/schema/class-icon.d.ts +3 -8
  96. package/dist/platform/schema/class-icon.js +2 -29
  97. package/dist/platform/schema/index.d.ts +1 -1
  98. package/dist/platform/schema/schema-authoring.d.ts +14 -7
  99. package/dist/platform/schema/schema-authoring.js +5 -1
  100. package/dist/project/admit.js +0 -4
  101. package/dist/project/install-command.d.ts +0 -4
  102. package/dist/project/install-command.js +1 -5
  103. package/dist/tooling/cli/deploy-mode.d.ts +3 -59
  104. package/dist/tooling/cli/deploy-mode.js +46 -122
  105. package/dist/tooling/cli/deploy-result.d.ts +10 -15
  106. package/dist/tooling/cli/help.js +9 -16
  107. package/dist/tooling/cli/immutable-deployment.d.ts +3 -3
  108. package/dist/tooling/cli/index.d.ts +1 -1
  109. package/dist/tooling/cli/list.d.ts +5 -7
  110. package/dist/tooling/cli/list.js +9 -61
  111. package/dist/tooling/cli/orchestrate.js +6 -16
  112. package/dist/tooling/cli/publish/index.d.ts +2 -2
  113. package/dist/tooling/cli/registry/client.js +1 -1
  114. package/dist/tooling/cli/secrets.d.ts +2 -2
  115. package/dist/tooling/linter/implementations/source/global.js +0 -1
  116. package/dist/tooling/linter/implementations/source/verifiers.js +0 -2
  117. package/dist/tooling/linter/policy/generated.js +2 -51
  118. package/dist/tooling/linter/requirements/registry.js +0 -6
  119. package/package.json +6 -6
  120. package/dist/application/query/execution/projection.d.ts +0 -3
  121. package/dist/application/query/execution/projection.js +0 -3
  122. package/dist/deployment/adapter/legacy/adapter.d.ts +0 -40
  123. package/dist/deployment/adapter/legacy/adapter.js +0 -1
  124. package/dist/deployment/adapter/legacy/deploy/context.d.ts +0 -19
  125. package/dist/deployment/adapter/legacy/deploy/context.js +0 -1
  126. package/dist/deployment/adapter/legacy/deploy/index.d.ts +0 -2
  127. package/dist/deployment/adapter/legacy/deploy/index.js +0 -1
  128. package/dist/deployment/adapter/legacy/deploy/result.d.ts +0 -89
  129. package/dist/deployment/adapter/legacy/deploy/result.js +0 -1
  130. package/dist/deployment/adapter/legacy/index.d.ts +0 -24
  131. package/dist/deployment/adapter/legacy/index.js +0 -1
  132. package/dist/deployment/adapter/legacy/prepare/artifact.d.ts +0 -43
  133. package/dist/deployment/adapter/legacy/prepare/artifact.js +0 -1
  134. package/dist/deployment/adapter/legacy/prepare/context.d.ts +0 -33
  135. package/dist/deployment/adapter/legacy/prepare/context.js +0 -1
  136. package/dist/deployment/adapter/legacy/prepare/index.d.ts +0 -2
  137. package/dist/deployment/adapter/legacy/prepare/index.js +0 -1
  138. package/dist/deployment/deploy.d.ts +0 -20
  139. package/dist/deployment/deploy.js +0 -31
  140. package/dist/deployment/release/legacy/admission.d.ts +0 -3
  141. package/dist/deployment/release/legacy/admission.js +0 -8
  142. package/dist/deployment/release/legacy/assemble.d.ts +0 -5
  143. package/dist/deployment/release/legacy/assemble.js +0 -20
  144. package/dist/deployment/release/legacy/index.d.ts +0 -35
  145. package/dist/deployment/release/legacy/index.js +0 -34
  146. package/dist/deployment/release/legacy/release.d.ts +0 -12
  147. package/dist/deployment/release/legacy/release.js +0 -1
  148. package/dist/deployment/release/legacy/seal.d.ts +0 -10
  149. package/dist/deployment/release/legacy/seal.js +0 -17
  150. package/dist/deployment/verify/preflight/artifact.d.ts +0 -6
  151. package/dist/deployment/verify/preflight/artifact.js +0 -122
  152. package/dist/deployment/verify/preflight/publication.d.ts +0 -4
  153. package/dist/deployment/verify/preflight/publication.js +0 -15
  154. package/dist/deployment/verify/readiness/deployment.d.ts +0 -3
  155. package/dist/deployment/verify/readiness/deployment.js +0 -143
  156. package/dist/deployment/verify/readiness/legacy/index.d.ts +0 -2
  157. package/dist/deployment/verify/readiness/legacy/index.js +0 -2
  158. package/dist/deployment/verify/readiness/legacy/publication.d.ts +0 -12
  159. package/dist/deployment/verify/readiness/legacy/publication.js +0 -23
  160. package/dist/execution/service/errors.d.ts +0 -3
  161. package/dist/execution/service/errors.js +0 -3
  162. package/dist/execution/service/serving/legacy/index.d.ts +0 -15
  163. package/dist/execution/service/serving/legacy/index.js +0 -19
  164. package/dist/tooling/cli/deprecations.d.ts +0 -9
  165. package/dist/tooling/cli/deprecations.js +0 -15
  166. package/dist/tooling/cli/legacy/deploy-result.d.ts +0 -28
  167. package/dist/tooling/cli/legacy/deploy-result.js +0 -37
  168. package/dist/tooling/cli/legacy/stable-target-adapter.d.ts +0 -21
  169. package/dist/tooling/cli/legacy/stable-target-adapter.js +0 -14
  170. package/dist/tooling/cli/legacy/stable-target-deploy.d.ts +0 -40
  171. package/dist/tooling/cli/legacy/stable-target-deploy.js +0 -102
  172. package/dist/tooling/cli/legacy/uploaded-build.d.ts +0 -11
  173. package/dist/tooling/cli/legacy/uploaded-build.js +0 -22
  174. package/dist/tooling/linter/implementations/source/migrations.d.ts +0 -2
  175. package/dist/tooling/linter/implementations/source/migrations.js +0 -113
  176. package/dist/tooling/linter/qualification/index.d.ts +0 -10
  177. package/dist/tooling/linter/qualification/index.js +0 -2
  178. package/dist/tooling/linter/qualification/query-fixtures.d.ts +0 -2
  179. package/dist/tooling/linter/qualification/query-fixtures.js +0 -68
  180. package/dist/tooling/linter/qualification/runner.d.ts +0 -3
  181. package/dist/tooling/linter/qualification/runner.js +0 -6
@@ -18,16 +18,12 @@ export interface DeploymentSummaryV1 {
18
18
  * `published` on Admin's Services, which keeps every deployment until it is retired. Absent on a
19
19
  * dispatch namespace, which keeps no retention.
20
20
  */
21
- readonly retention?: 'preview' | 'published';
21
+ readonly retention?: 'published';
22
22
  /** When the host created it; absent when the host no longer knows (its script is gone). */
23
23
  readonly createdAt?: string;
24
- /** An older adapter's report of the last call; no first-party adapter reports it any more. */
25
- readonly lastCallAt?: string;
26
- /** An older adapter's preview expiry; no first-party adapter reports it any more. */
27
- readonly expiresAt?: string;
28
24
  readonly retiredAt?: string;
29
- /** `withdrawn` once its owner retired it (`expired` only from an older adapter). */
30
- readonly retirement?: 'expired' | 'withdrawn';
25
+ /** `withdrawn` once its owner retired it. */
26
+ readonly retirement?: 'withdrawn';
31
27
  /** The RFC 7638 thumbprint of its key; absent when the host no longer knows (its script is gone). */
32
28
  readonly signingKeyId?: string;
33
29
  readonly record: DeploymentRecordV1;
@@ -1,5 +1,3 @@
1
- export { deploy } from './deploy.js';
2
- export type { DeploymentInput, LegacyDeployment } from './deploy.js';
3
1
  export type { Deployment } from './deployment.js';
4
2
  export { runtime } from './runtime/index.js';
5
3
  export type { RuntimeReference } from './runtime/index.js';
@@ -1,2 +1 @@
1
- export { deploy } from './deploy.js';
2
1
  export { runtime } from './runtime/index.js';
@@ -10,4 +10,10 @@ export interface Build<Schema extends schema.DomainSchema = schema.DomainSchema,
10
10
  readonly requirements: release.Requirements;
11
11
  readonly routes: routes.Plan;
12
12
  readonly frontend?: FrontendCompilation;
13
+ /** What the release manifest shows of the application: its icon. */
14
+ readonly presentation?: BuildPresentation;
15
+ }
16
+ export interface BuildPresentation {
17
+ /** One self-contained inline SVG. */
18
+ readonly icon?: string;
13
19
  }
@@ -19,6 +19,7 @@ export function compile(definition) {
19
19
  const compiled = schemaApi.compile(definition.schema);
20
20
  const requirements = compileRequirements(domain, definition.requirements, sourceBundle);
21
21
  const frontend = compileFrontend(definition.frontend, domain);
22
+ const presentation = definition.icon === undefined ? undefined : Object.freeze({ icon: definition.icon });
22
23
  const plan = routes.compile({
23
24
  domain,
24
25
  routes: admitRoutes(definition.routes, registry),
@@ -37,6 +38,7 @@ export function compile(definition) {
37
38
  requirements,
38
39
  routes: plan,
39
40
  ...(frontend === undefined ? {} : { frontend }),
41
+ ...(presentation === undefined ? {} : { presentation }),
40
42
  });
41
43
  return admitBuild(build, { domain, registry });
42
44
  }
@@ -1,19 +1,17 @@
1
1
  import type { Frontend, FrontendSource } from '../../../application/view/index.js';
2
- import type { FrontendHandshake, IframeRequirements, ViewHostRequirements } from '../../../application/view/index.js';
3
- import type { Key, ViewRef } from '../../../platform/schema/index.js';
2
+ import type { FrontendHandshake, ViewHostRequirements } from '../../../application/view/index.js';
3
+ import type { Key } from '../../../platform/schema/index.js';
4
4
  import type { Domain } from '../../../platform/schema/index.js';
5
5
  export interface CompiledFrontendRoute {
6
6
  readonly view: Key.View;
7
7
  readonly path: string;
8
8
  readonly document: string;
9
9
  readonly handshake: FrontendHandshake;
10
- readonly iframe?: IframeRequirements;
11
10
  readonly host?: ViewHostRequirements;
12
11
  }
13
12
  export interface FrontendCompilation {
14
13
  readonly source: FrontendSource;
15
14
  readonly routes: readonly CompiledFrontendRoute[];
16
- readonly entrypoint: ViewRef;
17
15
  }
18
16
  /** Lower exact authored View names to canonical DSL references without placing URLs. */
19
17
  export declare function compileFrontend(frontend: Frontend | undefined, domain: Domain): FrontendCompilation | undefined;
@@ -15,16 +15,11 @@ export function compileFrontend(frontend, domain) {
15
15
  path: route.path,
16
16
  document: route.document,
17
17
  handshake: route.handshake,
18
- ...(route.iframe === undefined ? {} : { iframe: route.iframe }),
19
18
  ...(route.host === undefined ? {} : { host: route.host }),
20
19
  });
21
20
  });
22
- const entrypoint = domain.views[frontend.entrypoint];
23
- if (entrypoint === undefined)
24
- throw new TypeError('Frontend entrypoint is absent from its Domain.');
25
21
  return Object.freeze({
26
22
  source: frontend.source,
27
23
  routes: Object.freeze(routes),
28
- entrypoint: entrypoint.ref,
29
24
  });
30
25
  }
@@ -3,11 +3,7 @@ const MEDIA_TYPE = 'application/vnd.astrale.frontend-material+octet-stream;v=1';
3
3
  export function digest(frontend, files) {
4
4
  const encoder = new TextEncoder();
5
5
  const chunks = [
6
- encoder.encode(JSON.stringify({
7
- source: frontend.source,
8
- routes: frontend.routes,
9
- entrypoint: frontend.entrypoint,
10
- })),
6
+ encoder.encode(JSON.stringify({ source: frontend.source, routes: frontend.routes })),
11
7
  ];
12
8
  for (const file of files) {
13
9
  const bytes = file.bytes();
@@ -1,6 +1,6 @@
1
1
  import type { DomainSchema } from '@astrale-os/kernel-dsl/v1/schema';
2
2
  import type { Runtime } from '../../application/runtime/index.js';
3
- import type { Build } from './build.js';
3
+ import type { Build, BuildPresentation } from './build.js';
4
4
  import type { FrontendCompilation } from './frontend/index.js';
5
5
  export interface BuildMaterial {
6
6
  readonly format: 'astrale.sdk.build-material';
@@ -16,6 +16,7 @@ export interface BuildMaterial {
16
16
  readonly requirements: Build['requirements'];
17
17
  readonly routes: Build['routes'];
18
18
  readonly frontend?: FrontendCompilation;
19
+ readonly presentation?: BuildPresentation;
19
20
  }
20
21
  declare const GENERATED_BUILD_MATERIAL: unique symbol;
21
22
  /** Exact Build material embedded by an Astrale execution-code generator. */
@@ -23,7 +24,6 @@ export interface GeneratedBuildMaterial {
23
24
  readonly format: 'astrale.sdk.generated-build-material';
24
25
  readonly version: 1;
25
26
  readonly material: BuildMaterial;
26
- readonly digest: Build['schema']['bundle']['ref']['digest'];
27
27
  readonly [GENERATED_BUILD_MATERIAL]: 'generated-build-material';
28
28
  }
29
29
  /** Detach the provider-neutral, runtime-free material embedded into generated execution code. */
@@ -4,10 +4,11 @@ import { load as loadCompiledSchema } from '@astrale-os/kernel-dsl/v1/compiled/l
4
4
  import { revision } from '@astrale-os/kernel-dsl/v1/schema/revision';
5
5
  import { equal } from '@astrale-os/kernel-dsl/value';
6
6
  import * as artifact from '@astrale-os/kernel-protocol/artifact';
7
- import { BUNDLE_MEDIA_TYPE } from '@astrale-os/kernel-protocol/release/bundle';
8
- import { admitRequirements, validateRequirements, } from '@astrale-os/kernel-protocol/release/requirements';
7
+ import { BUNDLE_MEDIA_TYPE } from '@astrale-os/kernel-protocol/release';
8
+ import { admitRequirements, validateRequirements } from '@astrale-os/kernel-protocol/release';
9
9
  import * as routes from '@astrale-os/kernel-protocol/routes';
10
10
  import { admitRuntimeRegistry, isRuntime } from '../../application/runtime/index.js';
11
+ import { admitClassIconSvg } from '../../platform/schema/class-icon-svg.js';
11
12
  import { admitBuild, isBuild } from './admission.js';
12
13
  /** Detach the provider-neutral, runtime-free material embedded into generated execution code. */
13
14
  export function material(build) {
@@ -29,6 +30,7 @@ export function material(build) {
29
30
  requirements: build.requirements,
30
31
  routes: build.routes,
31
32
  ...(build.frontend === undefined ? {} : { frontend: build.frontend }),
33
+ ...(build.presentation === undefined ? {} : { presentation: build.presentation }),
32
34
  });
33
35
  }
34
36
  /** Produce opaque material for execution code from one admitted Build. */
@@ -38,7 +40,6 @@ export function generatedMaterial(build) {
38
40
  format: 'astrale.sdk.generated-build-material',
39
41
  version: 1,
40
42
  material: value,
41
- digest: digestOf(value),
42
43
  });
43
44
  }
44
45
  /** Re-admit detached provider-neutral Build material against the exact Runtime value. */
@@ -62,6 +63,7 @@ export function restoreBuild(input, runtime) {
62
63
  const compiled = deepFreeze(input.schema.compiled);
63
64
  const bundleRef = deepFreeze(input.schema.bundle.ref);
64
65
  const frontend = input.frontend === undefined ? undefined : deepFreeze(input.frontend);
66
+ const presentation = input.presentation === undefined ? undefined : admitPresentation(input.presentation);
65
67
  const detached = new Uint8Array(bytes);
66
68
  const build = Object.freeze({
67
69
  kind: 'build',
@@ -77,6 +79,7 @@ export function restoreBuild(input, runtime) {
77
79
  requirements,
78
80
  routes: plan,
79
81
  ...(frontend === undefined ? {} : { frontend }),
82
+ ...(presentation === undefined ? {} : { presentation }),
80
83
  });
81
84
  return admitBuild(build, { domain, registry });
82
85
  }
@@ -106,6 +109,7 @@ export function restoreGeneratedBuild(input, runtime) {
106
109
  requirements: material.requirements,
107
110
  routes: material.routes,
108
111
  ...(material.frontend === undefined ? {} : { frontend: material.frontend }),
112
+ ...(material.presentation === undefined ? {} : { presentation: material.presentation }),
109
113
  });
110
114
  return admitBuild(build, { domain, registry });
111
115
  }
@@ -118,7 +122,7 @@ function acceptGeneratedMaterial(input, runtime) {
118
122
  Array.isArray(input) ||
119
123
  format !== 'astrale.sdk.generated-build-material' ||
120
124
  version !== 1 ||
121
- Reflect.ownKeys(input).some((key) => key !== 'format' && key !== 'version' && key !== 'material' && key !== 'digest')) {
125
+ Reflect.ownKeys(input).some((key) => key !== 'format' && key !== 'version' && key !== 'material')) {
122
126
  invalid();
123
127
  }
124
128
  assertMaterialEnvelope(material, runtime);
@@ -128,14 +132,6 @@ function acceptGeneratedMaterial(input, runtime) {
128
132
  deepFreeze(input);
129
133
  return Object.freeze({ material });
130
134
  }
131
- function digestOf(input) {
132
- try {
133
- return artifact.identify(new TextEncoder().encode(JSON.stringify(input)), 'application/vnd.astrale.sdk.build-material+json').digest;
134
- }
135
- catch {
136
- invalid();
137
- }
138
- }
139
135
  function assertMaterialEnvelope(input, runtime) {
140
136
  if (!isRuntime(runtime))
141
137
  throw new TypeError('Build Runtime is not admitted.');
@@ -150,7 +146,8 @@ function assertMaterialEnvelope(input, runtime) {
150
146
  key !== 'callables' &&
151
147
  key !== 'requirements' &&
152
148
  key !== 'routes' &&
153
- key !== 'frontend')) {
149
+ key !== 'frontend' &&
150
+ key !== 'presentation')) {
154
151
  invalid();
155
152
  }
156
153
  }
@@ -186,6 +183,24 @@ function admitRoutePlan(input, domain) {
186
183
  invalid();
187
184
  return admitted;
188
185
  }
186
+ /** External material must re-admit its icon using the same worker-safe SVG owner as authoring. */
187
+ function admitPresentation(input) {
188
+ if (input === null || typeof input !== 'object' || Array.isArray(input))
189
+ invalid();
190
+ const value = input;
191
+ if (Reflect.ownKeys(value).some((key) => key !== 'icon'))
192
+ invalid();
193
+ const { icon } = value;
194
+ if (icon === undefined)
195
+ return Object.freeze({});
196
+ if (typeof icon !== 'string')
197
+ invalid();
198
+ const admitted = admitClassIconSvg(icon);
199
+ // Material carries an exact admitted value, rather than authored text to normalize.
200
+ if (admitted !== icon)
201
+ invalid();
202
+ return Object.freeze({ icon: admitted });
203
+ }
189
204
  function deepFreeze(input, seen = new WeakSet()) {
190
205
  if (input !== null && typeof input === 'object' && !seen.has(input)) {
191
206
  seen.add(input);
@@ -1,14 +1,10 @@
1
- import type { Adapter, LegacyAdapter } from './adapter/index.js';
2
- /**
3
- * One adapter bound to the parameters of one Project Environment. `AdapterValue` is an adapter
4
- * interface v2 `Adapter`, or a `@deprecated` `LegacyAdapter` whose Environments are all on the
5
- * legacy direct-mode path (CT33).
6
- */
7
- export interface Deployment<Parameters extends object = object, AdapterValue extends Adapter<Parameters> | LegacyAdapter<Parameters> = Adapter<Parameters> | LegacyAdapter<Parameters>> {
1
+ import type { Adapter } from './adapter/index.js';
2
+ /** One immutable-deployment adapter bound to one Project Environment. */
3
+ export interface Deployment<Parameters extends object = object, AdapterValue extends Adapter<Parameters> = Adapter<Parameters>> {
8
4
  readonly kind: 'deployment';
9
5
  readonly adapter: AdapterValue;
10
6
  readonly parameters: Parameters;
11
7
  }
12
8
  /** Internal adapter binding boundary used by public provider packages. */
13
- export declare function captureDeployment<const Parameters extends object>(adapter: Adapter<Parameters> | LegacyAdapter<Parameters>, parameters: Parameters): Deployment<Parameters>;
9
+ export declare function captureDeployment<const Parameters extends object>(adapter: Adapter<Parameters>, parameters: Parameters): Deployment<Parameters>;
14
10
  export declare function isDeployment(input: unknown): input is Deployment;
@@ -1,14 +1,12 @@
1
1
  export { defineAdapter, defineDeployment, isAdapter } from './adapter/index.js';
2
- export type { Adapter, AdapterCommand, AdapterCommandContext, AdapterCommandResult, AdapterEnvironmentContext, AdapterInput, AddressingPlan, ArtifactFile, ArtifactSource, Bundle, BundleContext, Bundler, BundleSource, ConfigureContext, DeployContext, DeploymentCallTarget, DeploymentPhase, DeploymentProgress, DeploymentSecretsState, DeployResult, FailedDeployResult, FailedReleaseDeployResult, LegacyAdapter, LegacyAdapterInput, ListContext, ListedDeployment, MutationKnowledge, Placement, PlacementContext, PreparedArtifact, PreparedArtifactFile, PrepareContext, ReadyDeployResult, ReadyReleaseDeployResult, ReleaseDeployContext, ReleaseDeploymentPhase, ReleaseDeployResult, RetainContext, } from './adapter/index.js';
2
+ export type { Adapter, AdapterCommand, AdapterCommandContext, AdapterCommandResult, AdapterEnvironmentContext, AdapterInput, ArtifactFile, Bundle, BundleContext, Bundler, BundleSource, ConfigureContext, DeploymentCallTarget, DeploymentSecretsState, FailedReleaseDeployResult, ListContext, ListedDeployment, MutationKnowledge, Placement, PlacementContext, PreparedArtifactFile, ReadyReleaseDeployResult, ReleaseDeployContext, ReleaseDeploymentPhase, ReleaseDeployResult, RetainContext, } from './adapter/index.js';
3
3
  export { compile, isBuild } from './build/index.js';
4
4
  export type { Build, BuildBundle, BuildDigest, BuildManifestV1, BuildSchema, } from './build/index.js';
5
- export { deploy } from './deploy.js';
6
- export type { DeploymentInput, LegacyDeployment } from './deploy.js';
7
5
  export { isDeployment } from './deployment.js';
8
6
  export type { Deployment } from './deployment.js';
9
7
  export { addressing, assemble, isAddressing, isRelease } from './release/index.js';
10
8
  export type { Addressing, Release } from './release/index.js';
11
9
  export { admit as admitRuntime, resolve as resolveRuntime, runtime } from './runtime/index.js';
12
10
  export type { ResolvedRuntimeReference, RuntimeModuleLoader, RuntimeReference, } from './runtime/index.js';
13
- export { verifyBundle, verifyDeployment, verifyPreflight, verifyReadiness, verifyUploadedBuild, } from './verify/index.js';
14
- export type { BundleInput, PreflightInput } from './verify/index.js';
11
+ export { verifyBundle, verifyReadiness, verifyUploadedBuild } from './verify/index.js';
12
+ export type { BundleInput } from './verify/index.js';
@@ -1,7 +1,6 @@
1
1
  export { defineAdapter, defineDeployment, isAdapter } from './adapter/index.js';
2
2
  export { compile, isBuild } from './build/index.js';
3
- export { deploy } from './deploy.js';
4
3
  export { isDeployment } from './deployment.js';
5
4
  export { addressing, assemble, isAddressing, isRelease } from './release/index.js';
6
5
  export { admit as admitRuntime, resolve as resolveRuntime, runtime } from './runtime/index.js';
7
- export { verifyBundle, verifyDeployment, verifyPreflight, verifyReadiness, verifyUploadedBuild, } from './verify/index.js';
6
+ export { verifyBundle, verifyReadiness, verifyUploadedBuild } from './verify/index.js';
@@ -5,15 +5,8 @@ import type { IssuerId } from '../../platform/auth/index.js';
5
5
  */
6
6
  export interface Addressing {
7
7
  readonly issuer: IssuerId;
8
- /** Public origin serving this Release; the issuer can remain on an older deployment. */
8
+ /** Public origin serving this Release, identical to its issuer. */
9
9
  readonly publicUrl: IssuerId;
10
10
  }
11
- export declare function addressing(input: string, options?: {
12
- /**
13
- * @deprecated Stable-target `legacy` path only: adapter-cloudflare direct mode serves under an
14
- * issuer distinct from its route (`identityIssuer`). Removed with that mode at D10; a
15
- * deployment's URL is its issuer.
16
- */
17
- readonly publicUrl?: string;
18
- }): Addressing;
11
+ export declare function addressing(input: string): Addressing;
19
12
  export declare function isAddressing(input: unknown): input is Addressing;
@@ -1,9 +1,8 @@
1
1
  import { issuer } from '../../platform/auth/index.js';
2
2
  const admittedAddressing = new WeakSet();
3
- export function addressing(input, options = {}) {
3
+ export function addressing(input) {
4
4
  const admitted = origin(input);
5
- const publicUrl = options.publicUrl === undefined ? admitted : origin(options.publicUrl);
6
- const value = Object.freeze({ issuer: admitted, publicUrl });
5
+ const value = Object.freeze({ issuer: admitted, publicUrl: admitted });
7
6
  admittedAddressing.add(value);
8
7
  return value;
9
8
  }
@@ -3,5 +3,3 @@ export { capture, isRelease } from './admission.js';
3
3
  export { addressing, isAddressing, type Addressing } from './addressing.js';
4
4
  export { invocationPath } from './invocation.js';
5
5
  export type { Release } from './release.js';
6
- /** @deprecated Stable-target Publication v3; see `legacy/index.ts` for its consumers and removal. */
7
- export * as legacy from './legacy/index.js';
@@ -2,5 +2,3 @@ export { assemble } from './assemble.js';
2
2
  export { capture, isRelease } from './admission.js';
3
3
  export { addressing, isAddressing } from './addressing.js';
4
4
  export { invocationPath } from './invocation.js';
5
- /** @deprecated Stable-target Publication v3; see `legacy/index.ts` for its consumers and removal. */
6
- export * as legacy from './legacy/index.js';
@@ -12,7 +12,7 @@ export interface Release<BuildValue extends Build = Build> {
12
12
  readonly build: BuildValue;
13
13
  /**
14
14
  * The deployment's URL: its origin, which is also its issuer (`document.identity.issuer`). A
15
- * deployment never splits the two; only the stable-target `legacy` path does.
15
+ * deployment binds both to the same immutable URL.
16
16
  */
17
17
  readonly url: IssuerId;
18
18
  readonly document: release.DomainRelease;
@@ -1,4 +1,2 @@
1
1
  export { assemble } from './assemble.js';
2
2
  export { addressing } from './addressing.js';
3
- /** @deprecated Stable-target Publication v3; see `legacy/index.ts` for its consumers and removal. */
4
- export * as legacy from './legacy/index.js';
@@ -1,4 +1,2 @@
1
1
  export { assemble } from './assemble.js';
2
2
  export { addressing } from './addressing.js';
3
- /** @deprecated Stable-target Publication v3; see `legacy/index.ts` for its consumers and removal. */
4
- export * as legacy from './legacy/index.js';
@@ -4,8 +4,7 @@ import type { Addressing } from '../addressing.js';
4
4
  export declare const DELIVERY_PATH: '/install';
5
5
  /**
6
6
  * What a deployment serves beneath its URL: identity, schema bundle, requirements, bindings, routes
7
- * and delivery. A `DomainRelease` v4 adds its build to it, and the v3 Publication of the legacy
8
- * path is exactly this content, so both documents of one build at one address agree.
7
+ * and delivery. A `DomainRelease` v4 adds the digest of its running build.
9
8
  */
10
9
  export type Served = Omit<release.Content, 'format' | 'version' | 'build'>;
11
10
  /** Derive the served content of one exact Build at one Addressing. */
@@ -12,11 +12,15 @@ export function served(build, addressing) {
12
12
  identity: { issuer: addressing.issuer, subject: root.origin },
13
13
  schema: { revision: root.revision, bundle: { href: bundle, ref: build.schema.bundle.ref } },
14
14
  requirements: build.requirements,
15
- ...(build.frontend === undefined
16
- ? {}
17
- : { manifest: Object.freeze({ entrypoint: build.frontend.entrypoint }) }),
15
+ // The root schema declares the Domain name and entrypoint; a release authors neither.
16
+ ...manifest(build),
18
17
  bindings: { callables: callables(build, addressing), views: views(build, addressing) },
19
18
  delivery: release.placeDelivery({ path: DELIVERY_PATH, authentication: { kind: 'public' } }, addressing.publicUrl, bundle),
20
19
  routes: routes(build, addressing),
21
20
  };
22
21
  }
22
+ /** The release manifest carries the Domain icon as `logo`. Absent when the Build carries none. */
23
+ function manifest(build) {
24
+ const { icon } = build.presentation ?? {};
25
+ return icon === undefined ? {} : { manifest: Object.freeze({ logo: icon }) };
26
+ }
@@ -8,7 +8,6 @@ export function views(build, addressing) {
8
8
  view: route.view,
9
9
  href: new URL(route.path.replace(/^\//u, ''), base).href,
10
10
  handshake: route.handshake,
11
- ...(route.iframe === undefined ? {} : { iframe: route.iframe }),
12
11
  ...(route.host === undefined ? {} : { host: route.host }),
13
12
  })));
14
13
  }
@@ -1,5 +1,3 @@
1
- export { preflight as verifyPreflight } from './preflight/index.js';
2
- export { isPreparedArtifact } from './preflight/index.js';
3
1
  export { bundle as verifyBundle, isBundle, uploadedBuild as verifyUploadedBuild, } from './preflight/index.js';
4
- export type { BundleInput, PreflightInput } from './preflight/index.js';
5
- export { readiness as verifyReadiness, readinessPaths, verifyDeployment, } from './readiness/index.js';
2
+ export type { BundleInput } from './preflight/index.js';
3
+ export { readiness as verifyReadiness, readinessPaths } from './readiness/index.js';
@@ -1,4 +1,2 @@
1
- export { preflight as verifyPreflight } from './preflight/index.js';
2
- export { isPreparedArtifact } from './preflight/index.js';
3
1
  export { bundle as verifyBundle, isBundle, uploadedBuild as verifyUploadedBuild, } from './preflight/index.js';
4
- export { readiness as verifyReadiness, readinessPaths, verifyDeployment, } from './readiness/index.js';
2
+ export { readiness as verifyReadiness, readinessPaths } from './readiness/index.js';
@@ -1,14 +1,2 @@
1
- import type { ArtifactSource, PreparedArtifact } from '../../adapter/legacy/index.js';
2
- import type { Build } from '../../build/index.js';
3
- import type { ResolvedRuntimeReference } from '../../runtime/index.js';
4
- export { artifact, isPreparedArtifact } from './artifact.js';
5
1
  export { bundle, isBundle, uploadedBuild, type BundleInput } from './bundle.js';
6
2
  export { build } from './build.js';
7
- export { publication } from './publication.js';
8
- export interface PreflightInput<BuildValue extends Build = Build> {
9
- readonly build: BuildValue;
10
- readonly runtime: ResolvedRuntimeReference;
11
- readonly source: ArtifactSource;
12
- }
13
- /** Admit exact deployment material before any provider mutation. */
14
- export declare function preflight<const BuildValue extends Build>(input: PreflightInput<BuildValue>): PreparedArtifact<BuildValue>;
@@ -1,14 +1,2 @@
1
- import { artifact } from './artifact.js';
2
- import { build as verifyBuild } from './build.js';
3
- import { publication as verifyPublication } from './publication.js';
4
- export { artifact, isPreparedArtifact } from './artifact.js';
5
1
  export { bundle, isBundle, uploadedBuild } from './bundle.js';
6
2
  export { build } from './build.js';
7
- export { publication } from './publication.js';
8
- /** Admit exact deployment material before any provider mutation. */
9
- export function preflight(input) {
10
- verifyBuild(input.build);
11
- const prepared = artifact(input.build, input.runtime, input.source);
12
- verifyPublication(prepared);
13
- return prepared;
14
- }
@@ -1,15 +1,11 @@
1
1
  import type { Release } from '../../release/index.js';
2
- import type * as legacy from '../../release/legacy/index.js';
3
2
  import type { ReadinessOptions } from './fetch.js';
4
- export { verifyDeployment } from './deployment.js';
5
3
  export { verifyIdentity } from './identity.js';
6
4
  export type { ReadinessFetch, ReadinessOptions } from './fetch.js';
7
- export { verifyPublication } from './legacy/index.js';
8
5
  export { verifyRelease } from './release.js';
9
6
  /**
10
7
  * Read-only verification of one exact live Release and its serving identity: an immutable
11
- * deployment's `release.json` (release digest and build digest), or a stable target's
12
- * `domain.json` (deprecated, `legacy/`).
8
+ * deployment's release.json (release digest and build digest).
13
9
  */
14
10
  /**
15
11
  * The local paths `readiness` reads of one immutable deployment, each answering 200 once the
@@ -18,4 +14,4 @@ export { verifyRelease } from './release.js';
18
14
  * deployment probes these.
19
15
  */
20
16
  export declare function readinessPaths(deployed: Release): readonly string[];
21
- export declare function readiness(release: Release | legacy.Release, options?: ReadinessOptions): Promise<void>;
17
+ export declare function readiness(release: Release, options?: ReadinessOptions): Promise<void>;
@@ -1,16 +1,12 @@
1
1
  import { issuer } from '@astrale-os/kernel-protocol';
2
2
  import * as release from '@astrale-os/kernel-protocol/release';
3
3
  import { verifyIdentity } from './identity.js';
4
- import { verifyPublication } from './legacy/index.js';
5
4
  import { verifyRelease } from './release.js';
6
- export { verifyDeployment } from './deployment.js';
7
5
  export { verifyIdentity } from './identity.js';
8
- export { verifyPublication } from './legacy/index.js';
9
6
  export { verifyRelease } from './release.js';
10
7
  /**
11
8
  * Read-only verification of one exact live Release and its serving identity: an immutable
12
- * deployment's `release.json` (release digest and build digest), or a stable target's
13
- * `domain.json` (deprecated, `legacy/`).
9
+ * deployment's release.json (release digest and build digest).
14
10
  */
15
11
  /**
16
12
  * The local paths `readiness` reads of one immutable deployment, each answering 200 once the
@@ -28,11 +24,6 @@ export function readinessPaths(deployed) {
28
24
  ]);
29
25
  }
30
26
  export async function readiness(release, options = {}) {
31
- if (release.kind === 'release') {
32
- await verifyRelease(release, options);
33
- await verifyIdentity(release.url, options);
34
- return;
35
- }
36
- await verifyPublication(release, options);
37
- await verifyIdentity(release.addressing.issuer, options);
27
+ await verifyRelease(release, options);
28
+ await verifyIdentity(release.url, options);
38
29
  }
@@ -84,10 +84,7 @@ export type WorkerDeploymentResult = {
84
84
  };
85
85
  readonly deployment: WorkerDeploymentSummary;
86
86
  } | WorkerDeploymentRejection;
87
- /**
88
- * Admit the answer of a host's `hosting`: its routing domain. The `addressing: 'opaque'` an older
89
- * Services answers beside it is admitted and dropped: every Service name is opaque.
90
- */
87
+ /** Admit the answer of a host's `hosting`: exactly its routing domain. */
91
88
  export declare function decodeWorkerHosting(input: unknown): WorkerHostingV1;
92
89
  /**
93
90
  * Admit the answer of a deploy exactly: a deployment whose state reports the secret state it
@@ -23,18 +23,12 @@ const SECRETS_BY_STATE = Object.freeze({
23
23
  created: Object.freeze(['bound']),
24
24
  reused: Object.freeze(['updated', 'unchanged']),
25
25
  });
26
- /**
27
- * Admit the answer of a host's `hosting`: its routing domain. The `addressing: 'opaque'` an older
28
- * Services answers beside it is admitted and dropped: every Service name is opaque.
29
- */
26
+ /** Admit the answer of a host's `hosting`: exactly its routing domain. */
30
27
  export function decodeWorkerHosting(input) {
31
- const value = exact(input, ['routingDomain'], ['addressing'], 'hosting');
28
+ const value = exact(input, ['routingDomain'], [], 'hosting');
32
29
  if (typeof value.routingDomain !== 'string' || !isDnsName(value.routingDomain)) {
33
30
  invalid('hosting', 'routingDomain');
34
31
  }
35
- if (value.addressing !== undefined && value.addressing !== 'opaque') {
36
- invalid('hosting', 'addressing');
37
- }
38
32
  return Object.freeze({ routingDomain: value.routingDomain });
39
33
  }
40
34
  /**
@@ -2,12 +2,7 @@ import type { release as serverRelease } from '@astrale-os/kernel-server';
2
2
  import * as release from '@astrale-os/kernel-protocol/release';
3
3
  import type { IssuerId } from '../../platform/auth/index.js';
4
4
  import type { SigningMaterial } from './signing.js';
5
- type Served = release.DomainRelease | release.legacy.Publication;
6
5
  /**
7
- * Create one stateless, nonce-bound public Delivery provider for the exact document a deployment
8
- * serves. It answers in the request's version: a Delivery v2 carrying the release for a v2
9
- * request, and a Delivery v1 carrying the Publication (a release's frozen v3 projection) for the
10
- * deprecated v1 request. A stable target's Publication answers v1 only.
6
+ * Create one stateless, nonce-bound public Delivery v2 provider for the exact deployment release.
11
7
  */
12
- export declare function releaseDelivery(signing: SigningMaterial, issuer: IssuerId, subject: string, deployed: Served): serverRelease.delivery.Provider;
13
- export {};
8
+ export declare function releaseDelivery(signing: SigningMaterial, issuer: IssuerId, subject: string, deployed: release.DomainRelease): serverRelease.delivery.Provider;
@@ -2,34 +2,12 @@ import * as release from '@astrale-os/kernel-protocol/release';
2
2
  import { SignJWT } from 'jose';
3
3
  const ATTESTATION_TTL_SECONDS = 60;
4
4
  /**
5
- * Create one stateless, nonce-bound public Delivery provider for the exact document a deployment
6
- * serves. It answers in the request's version: a Delivery v2 carrying the release for a v2
7
- * request, and a Delivery v1 carrying the Publication (a release's frozen v3 projection) for the
8
- * deprecated v1 request. A stable target's Publication answers v1 only.
5
+ * Create one stateless, nonce-bound public Delivery v2 provider for the exact deployment release.
9
6
  */
10
7
  export function releaseDelivery(signing, issuer, subject, deployed) {
11
- const projection = deployed.version === 4 ? release.legacy.publication(deployed) : deployed;
12
8
  return Object.freeze({
13
9
  async create(request, context) {
14
10
  context.signal.throwIfAborted();
15
- if (request.version === 1) {
16
- const attestation = await attest(signing, issuer, subject, request.kernel, {
17
- purpose: release.legacy.delivery.PURPOSE,
18
- nonce: request.nonce,
19
- etag: projection.etag,
20
- schemaRevision: projection.schema.revision,
21
- });
22
- context.signal.throwIfAborted();
23
- return release.legacy.delivery.accept({
24
- format: 'astrale.domain.delivery',
25
- version: 1,
26
- publication: projection,
27
- attestation,
28
- });
29
- }
30
- if (deployed.version !== 4) {
31
- throw new TypeError('A Publication-backed deployment answers Delivery v1 only.');
32
- }
33
11
  const attestation = await attest(signing, issuer, subject, request.kernel, {
34
12
  purpose: release.delivery.PURPOSE,
35
13
  nonce: request.nonce,
@@ -12,10 +12,9 @@ export interface Identity extends Issuer, InvocationAuthority {
12
12
  readonly subject: string;
13
13
  readonly tokenExchange?: exchange.Provider;
14
14
  /**
15
- * Delivery for the exact document this deployment serves: Delivery v2 over its release and v1
16
- * over its frozen v3 projection, or v1 over a stable target's Publication.
15
+ * Delivery v2 for the exact release this deployment serves.
17
16
  */
18
- delivery(served: releaseProtocol.DomainRelease | releaseProtocol.legacy.Publication): release.delivery.Provider;
17
+ delivery(served: releaseProtocol.DomainRelease): release.delivery.Provider;
19
18
  /**
20
19
  * The Domain's own authority toward one Kernel for a step of the durable Execution `executionId`
21
20
  * (`ctx.execution.id`), which no caller credential carries; its credentials name `executionId` in