@astrale-os/sdk 0.5.0-beta.119 → 0.5.0-beta.120

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0-beta.120](https://github.com/astrale-os/sdk/compare/sdk-v0.5.0-beta.119...sdk-v0.5.0-beta.120) (2026-09-07)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **app:** name Core Identity requirements core ([#441](https://github.com/astrale-os/sdk/issues/441))
9
+
10
+ ### Features
11
+
12
+ * **app:** name Core Identity requirements core ([#441](https://github.com/astrale-os/sdk/issues/441)) ([a91fb67](https://github.com/astrale-os/sdk/commit/a91fb67a7da0741c2466d9cbaf905d6dfda16be4))
13
+
3
14
  ## [0.5.0-beta.119](https://github.com/astrale-os/sdk/compare/sdk-v0.5.0-beta.118...sdk-v0.5.0-beta.119) (2026-09-06)
4
15
 
5
16
 
package/README.md CHANGED
@@ -83,6 +83,19 @@ Error declarations are not yet published in the installed Kernel Schema.
83
83
 
84
84
  ## Development
85
85
 
86
+ ### Core Identity requirements
87
+
88
+ Use `requirements({ core: [{ subject, functions, classes, authority }] })` to declare capabilities
89
+ for an Identity in the Application's local Core. `subject` is the resolved Core Node; each entry
90
+ must request at least one capability. The top-level `functions`, `classes`, and `authority` members
91
+ describe capabilities for the Domain principal.
92
+
93
+ This replaces `requirements.profiles`. Rename that property to `core` and imported
94
+ `CapabilityProfileRequirement` / `CapabilityProfileRequirementInput` types to `CoreRequirement` /
95
+ `CoreRequirementInput`. Builds emit `requirements.capabilities.core`; new releases use Publication
96
+ v3 and require a Kernel that supports it. That Kernel can restore historical v2 Publications and
97
+ installation ledgers without changing their existing authority or integrity evidence.
98
+
86
99
  ### Prerequisites
87
100
 
88
101
  - Node.js 26.7.0 (default) or Node.js 24; published packages remain compatible with Node.js 22+
@@ -1,7 +1,7 @@
1
1
  export { defineApplication, isApplication } from './define.js';
2
2
  export type { ApplicationInput } from './define.js';
3
3
  export { requirements } from './requirements/index.js';
4
- export type { AuthorityRequirements, AuthorityRequirementsInput, ClassOperation, ClassRequirement, ClassRequirementInput, FunctionRequirementTarget, Requirements, RequirementsInput, } from './requirements/index.js';
4
+ export type { AuthorityRequirements, AuthorityRequirementsInput, ClassOperation, ClassRequirement, ClassRequirementInput, CoreRequirement, CoreRequirementInput, FunctionRequirementTarget, Requirements, RequirementsInput, } from './requirements/index.js';
5
5
  export { route, routes } from './routes/index.js';
6
6
  export type { Route, RouteInput, RouteTarget, Routes } from './routes/index.js';
7
7
  export { defineFrontend, external, vite } from './view/index.js';
@@ -2,11 +2,12 @@ import type { ResolvedCoreDefinition } from '../../platform/schema/index.js';
2
2
  import type { AuthorityRequirementsInput } from './authority.js';
3
3
  import type { ClassRequirementInput } from './classes.js';
4
4
  import type { FunctionRequirementTarget } from './functions.js';
5
- import type { CapabilityProfileRequirement } from './requirement.js';
6
- export interface CapabilityProfileRequirementInput {
5
+ import type { CoreRequirement } from './requirement.js';
6
+ /** Capabilities assigned to one installation-owned local Core Identity. */
7
+ export interface CoreRequirementInput {
7
8
  readonly subject: Pick<ResolvedCoreDefinition, 'ref'>;
8
9
  readonly functions?: readonly FunctionRequirementTarget[];
9
10
  readonly classes?: readonly ClassRequirementInput[];
10
11
  readonly authority?: AuthorityRequirementsInput;
11
12
  }
12
- export declare function captureProfiles(input: readonly CapabilityProfileRequirementInput[] | undefined): readonly CapabilityProfileRequirement[];
13
+ export declare function captureCore(input: readonly CoreRequirementInput[] | undefined): readonly CoreRequirement[];
@@ -2,12 +2,12 @@ import { acceptDefinitionRef, Key } from '../../platform/schema/index.js';
2
2
  import { captureAuthority } from './authority.js';
3
3
  import { captureClasses } from './classes.js';
4
4
  import { captureFunctions } from './functions.js';
5
- export function captureProfiles(input) {
5
+ export function captureCore(input) {
6
6
  if (input === undefined)
7
7
  return Object.freeze([]);
8
8
  if (!Array.isArray(input))
9
- throw new TypeError('Requirement profiles must be an array.');
10
- const profiles = input.map((entry) => {
9
+ throw new TypeError('Core requirements must be an array.');
10
+ const core = input.map((entry) => {
11
11
  if (entry === null || typeof entry !== 'object' || Array.isArray(entry))
12
12
  invalid();
13
13
  if (Reflect.ownKeys(entry).some((key) => key !== 'subject' && key !== 'functions' && key !== 'classes' && key !== 'authority')) {
@@ -29,12 +29,12 @@ export function captureProfiles(input) {
29
29
  ...(authority === undefined ? {} : { authority }),
30
30
  });
31
31
  });
32
- if (new Set(profiles.map(({ subject }) => Key.of(subject))).size !== profiles.length)
32
+ if (new Set(core.map(({ subject }) => Key.of(subject))).size !== core.length)
33
33
  invalid();
34
- return Object.freeze([...profiles].sort((left, right) => compare(Key.of(left.subject), Key.of(right.subject))));
34
+ return Object.freeze([...core].sort((left, right) => compare(Key.of(left.subject), Key.of(right.subject))));
35
35
  }
36
36
  function invalid() {
37
- throw new TypeError('Capability profile requirement is invalid.');
37
+ throw new TypeError('Core capability requirement is invalid.');
38
38
  }
39
39
  function compare(left, right) {
40
40
  return left < right ? -1 : left > right ? 1 : 0;
@@ -1,18 +1,18 @@
1
1
  import type { AuthorityRequirementsInput } from './authority.js';
2
2
  import type { ClassRequirementInput } from './classes.js';
3
+ import type { CoreRequirementInput } from './core.js';
3
4
  import type { FunctionRequirementTarget } from './functions.js';
4
- import type { CapabilityProfileRequirementInput } from './profiles.js';
5
5
  import type { Requirements } from './requirement.js';
6
- export type { AuthorityRequirements, CapabilityProfileRequirement, ClassRequirement, Requirements, } from './requirement.js';
6
+ export type { AuthorityRequirements, CoreRequirement, ClassRequirement, Requirements, } from './requirement.js';
7
7
  export { ClassOperationOrder, type ClassOperation, type ClassRequirementInput } from './classes.js';
8
8
  export type { FunctionRequirementTarget } from './functions.js';
9
9
  export type { AuthorityRequirementsInput } from './authority.js';
10
- export type { CapabilityProfileRequirementInput } from './profiles.js';
10
+ export type { CoreRequirementInput } from './core.js';
11
11
  export interface RequirementsInput {
12
12
  readonly functions?: readonly FunctionRequirementTarget[];
13
13
  readonly classes?: readonly ClassRequirementInput[];
14
14
  readonly authority?: AuthorityRequirementsInput;
15
- readonly profiles?: readonly CapabilityProfileRequirementInput[];
15
+ readonly core?: readonly CoreRequirementInput[];
16
16
  }
17
17
  /** Capture canonical dependency requirements; Build proves the pinned dependency closure. */
18
18
  export declare function requirements(input?: RequirementsInput): Requirements;
@@ -1,24 +1,24 @@
1
1
  import { captureAuthority } from './authority.js';
2
2
  import { captureClasses } from './classes.js';
3
+ import { captureCore } from './core.js';
3
4
  import { captureFunctions } from './functions.js';
4
- import { captureProfiles } from './profiles.js';
5
5
  export { ClassOperationOrder } from './classes.js';
6
6
  const admittedRequirements = new WeakSet();
7
7
  /** Capture canonical dependency requirements; Build proves the pinned dependency closure. */
8
8
  export function requirements(input = {}) {
9
9
  if (input === null || typeof input !== 'object' || Array.isArray(input))
10
10
  invalid();
11
- if (Reflect.ownKeys(input).some((key) => key !== 'functions' && key !== 'classes' && key !== 'authority' && key !== 'profiles')) {
11
+ if (Reflect.ownKeys(input).some((key) => key !== 'functions' && key !== 'classes' && key !== 'authority' && key !== 'core')) {
12
12
  invalid();
13
13
  }
14
14
  const functions = captureFunctions(input.functions);
15
15
  const classes = captureClasses(input.classes);
16
16
  const authority = captureAuthority(input.authority);
17
- const profiles = captureProfiles(input.profiles);
17
+ const core = captureCore(input.core);
18
18
  const value = Object.freeze({
19
19
  functions,
20
20
  classes,
21
- profiles,
21
+ core,
22
22
  ...(authority === undefined ? {} : { authority }),
23
23
  });
24
24
  admittedRequirements.add(value);
@@ -28,5 +28,5 @@ export function isRequirements(input) {
28
28
  return input !== null && typeof input === 'object' && admittedRequirements.has(input);
29
29
  }
30
30
  function invalid() {
31
- throw new TypeError('Requirements definition may contain only functions, classes, authority, and profiles.');
31
+ throw new TypeError('Requirements definition may contain only functions, classes, authority, and core.');
32
32
  }
@@ -14,9 +14,10 @@ export interface Requirements {
14
14
  readonly functions: readonly Key.Callable[];
15
15
  readonly classes: readonly ClassRequirement[];
16
16
  readonly authority?: AuthorityRequirements;
17
- readonly profiles: readonly CapabilityProfileRequirement[];
17
+ readonly core: readonly CoreRequirement[];
18
18
  }
19
- export interface CapabilityProfileRequirement {
19
+ /** Capabilities assigned at installation to one Identity declared in the local Core. */
20
+ export interface CoreRequirement {
20
21
  readonly subject: CoreRef;
21
22
  readonly functions: readonly Key.Callable[];
22
23
  readonly classes: readonly ClassRequirement[];
@@ -54,24 +54,24 @@ function compileRequirements(domain, input, sourceBundle) {
54
54
  throw new TypeError('Class requirement is absent from the dependency closure.');
55
55
  }
56
56
  }
57
- for (const profile of input?.profiles ?? []) {
58
- const subject = domain.core.nodes[profile.subject.name];
59
- if (profile.subject.origin !== domain.origin || subject === undefined) {
60
- throw new TypeError('Capability profile subject must name one local Core Node.');
57
+ for (const requirement of input?.core ?? []) {
58
+ const subject = domain.core.nodes[requirement.subject.name];
59
+ if (requirement.subject.origin !== domain.origin || subject === undefined) {
60
+ throw new TypeError('Core capability subject must name one local Core Node.');
61
61
  }
62
- for (const key of profile.functions) {
63
- requireDirectDependency(domain, key, 'Capability profile Function');
62
+ for (const key of requirement.functions) {
63
+ requireDirectDependency(domain, key, 'Core capability Function');
64
64
  if (domain.callable(key) === undefined) {
65
- throw new TypeError(`Capability profile Function ${key} is absent from the dependency closure.`);
65
+ throw new TypeError(`Core capability Function ${key} is absent from the dependency closure.`);
66
66
  }
67
67
  }
68
- for (const requirement of profile.classes) {
69
- const key = Key.of(requirement.class);
70
- if (requirement.class.origin !== domain.origin) {
71
- requireDirectDependency(domain, key, 'Capability profile Class');
68
+ for (const classRequirement of requirement.classes) {
69
+ const key = Key.of(classRequirement.class);
70
+ if (classRequirement.class.origin !== domain.origin) {
71
+ requireDirectDependency(domain, key, 'Core capability Class');
72
72
  }
73
- if (domain.definition(requirement.class) === undefined) {
74
- throw new TypeError('Capability profile Class is absent from the dependency closure.');
73
+ if (domain.definition(classRequirement.class) === undefined) {
74
+ throw new TypeError('Core capability Class is absent from the dependency closure.');
75
75
  }
76
76
  }
77
77
  }
@@ -82,14 +82,14 @@ function compileRequirements(domain, input, sourceBundle) {
82
82
  : { functions: input.functions }),
83
83
  ...(input === undefined || input.classes.length === 0 ? {} : { classes: input.classes }),
84
84
  ...(input?.authority === undefined ? {} : { authority: input.authority }),
85
- ...(input === undefined || input.profiles.length === 0
85
+ ...(input === undefined || input.core.length === 0
86
86
  ? {}
87
87
  : {
88
- profiles: input.profiles.map((profile) => ({
89
- subject: profile.subject,
90
- ...(profile.functions.length === 0 ? {} : { functions: profile.functions }),
91
- ...(profile.classes.length === 0 ? {} : { classes: profile.classes }),
92
- ...(profile.authority === undefined ? {} : { authority: profile.authority }),
88
+ core: input.core.map((requirement) => ({
89
+ subject: requirement.subject,
90
+ ...(requirement.functions.length === 0 ? {} : { functions: requirement.functions }),
91
+ ...(requirement.classes.length === 0 ? {} : { classes: requirement.classes }),
92
+ ...(requirement.authority === undefined ? {} : { authority: requirement.authority }),
93
93
  })),
94
94
  }),
95
95
  },
@@ -13,7 +13,7 @@ export function seal(build, addressing) {
13
13
  const selectedManifest = manifest(build);
14
14
  const sealed = publication.seal({
15
15
  format: 'astrale.domain.publication',
16
- version: 2,
16
+ version: 3,
17
17
  origin: root.origin,
18
18
  identity: { issuer: addressing.issuer, subject: root.origin },
19
19
  schema: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/sdk",
3
- "version": "0.5.0-beta.119",
3
+ "version": "0.5.0-beta.120",
4
4
  "description": "Schema-first SDK for defining, composing, and deploying Astrale domains",
5
5
  "keywords": [
6
6
  "astrale",
@@ -233,11 +233,11 @@
233
233
  "registry": "https://registry.npmjs.org/"
234
234
  },
235
235
  "dependencies": {
236
- "@astrale-os/kernel-client": "0.6.0-beta.52",
237
- "@astrale-os/kernel-core": "0.9.0-beta.40",
236
+ "@astrale-os/kernel-client": "0.6.0-beta.55",
237
+ "@astrale-os/kernel-core": "0.9.0-beta.42",
238
238
  "@astrale-os/kernel-dsl": "0.2.0-beta.30",
239
- "@astrale-os/kernel-protocol": "0.5.0-beta.43",
240
- "@astrale-os/kernel-server": "0.5.0-beta.45",
239
+ "@astrale-os/kernel-protocol": "0.5.0-beta.46",
240
+ "@astrale-os/kernel-server": "0.5.0-beta.48",
241
241
  "@lucide/icons": "1.34.0",
242
242
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
243
243
  "hono": "^4.13.2",