@astrale-os/sdk 0.6.0-beta.55 → 0.6.0-beta.57
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/README.md +11 -10
- package/dist/application/index.d.ts +2 -1
- package/dist/application/query/execution/crossings.d.ts +6 -1
- package/dist/application/query/execution/crossings.js +15 -1
- package/dist/application/query/execution/legacy/declared-classes.d.ts +10 -0
- package/dist/application/query/execution/legacy/declared-classes.js +9 -0
- package/dist/application/requirements/canonical.d.ts +7 -0
- package/dist/application/requirements/canonical.js +16 -0
- package/dist/application/requirements/classes.d.ts +9 -7
- package/dist/application/requirements/classes.js +35 -42
- package/dist/application/requirements/functions.d.ts +3 -1
- package/dist/application/requirements/functions.js +12 -27
- package/dist/application/requirements/index.d.ts +34 -16
- package/dist/application/requirements/index.js +17 -20
- package/dist/application/requirements/legacy/authority.d.ts +21 -0
- package/dist/application/requirements/{authority.js → legacy/authority.js} +5 -2
- package/dist/application/requirements/legacy/classes.d.ts +22 -0
- package/dist/application/requirements/legacy/classes.js +24 -0
- package/dist/application/requirements/legacy/core.d.ts +30 -0
- package/dist/application/requirements/{core.js → legacy/core.js} +15 -13
- package/dist/application/requirements/legacy/functions.d.ts +7 -0
- package/dist/application/requirements/legacy/functions.js +15 -0
- package/dist/application/requirements/legacy/index.d.ts +43 -0
- package/dist/application/requirements/legacy/index.js +1 -0
- package/dist/application/requirements/legacy/requirements.d.ts +31 -0
- package/dist/application/requirements/legacy/requirements.js +31 -0
- package/dist/application/requirements/requirement.d.ts +30 -19
- package/dist/application/requirements/roles.d.ts +17 -0
- package/dist/application/requirements/roles.js +62 -0
- package/dist/application/requirements/scopes.d.ts +16 -0
- package/dist/application/requirements/scopes.js +34 -0
- package/dist/deployment/build/build.d.ts +3 -5
- package/dist/deployment/build/compile.js +12 -64
- package/dist/deployment/build/legacy/requirements.d.ts +11 -0
- package/dist/deployment/build/legacy/requirements.js +79 -0
- package/dist/deployment/build/material.js +0 -3
- package/dist/execution/invocation/dispatch/context.js +2 -1
- package/dist/platform/schema/class-authoring.d.ts +9 -7
- package/dist/platform/schema/class-authoring.js +3 -2
- package/dist/platform/schema/index.d.ts +1 -1
- package/dist/testing/query.js +2 -1
- package/dist/tooling/linter/adapters/typescript/discover.js +8 -2
- package/dist/tooling/linter/adapters/typescript/index.d.ts +6 -0
- package/dist/tooling/linter/adapters/typescript/index.js +1 -0
- package/dist/tooling/linter/adapters/typescript/legacy.d.ts +20 -0
- package/dist/tooling/linter/adapters/typescript/legacy.js +28 -0
- package/dist/tooling/linter/implementations/source/callable-requirements.d.ts +1 -2
- package/dist/tooling/linter/implementations/source/callable-requirements.js +7 -44
- package/dist/tooling/linter/implementations/source/const-initializer.d.ts +3 -0
- package/dist/tooling/linter/implementations/source/const-initializer.js +31 -0
- package/dist/tooling/linter/implementations/source/domain-requirements.d.ts +8 -0
- package/dist/tooling/linter/implementations/source/domain-requirements.js +35 -0
- package/dist/tooling/linter/implementations/source/global.js +21 -8
- package/dist/tooling/linter/implementations/source/legacy/requirements.d.ts +10 -0
- package/dist/tooling/linter/implementations/source/legacy/requirements.js +40 -0
- package/dist/tooling/linter/implementations/source/legacy-folders.d.ts +3 -0
- package/dist/tooling/linter/implementations/source/legacy-folders.js +126 -0
- package/dist/tooling/linter/implementations/source/mutations.js +7 -22
- package/dist/tooling/linter/implementations/source/requirement-entries.d.ts +24 -0
- package/dist/tooling/linter/implementations/source/requirement-entries.js +52 -0
- package/dist/tooling/linter/implementations/source/schema.d.ts +3 -0
- package/dist/tooling/linter/implementations/source/schema.js +9 -5
- package/dist/tooling/linter/implementations/source/tests.js +1 -1
- package/dist/tooling/linter/implementations/source/verifiers.js +2 -0
- package/dist/tooling/linter/policy/generated.js +2 -2
- package/dist/tooling/linter/requirements/registry.js +2 -0
- package/docs/accounts/scenarios.tsv +12 -0
- package/docs/handler-dependencies.md +5 -3
- package/docs/legacy.md +113 -0
- package/docs/queries.md +3 -2
- package/docs/requirements.md +134 -0
- package/package.json +4 -4
- package/dist/application/requirements/authority.d.ts +0 -7
- package/dist/application/requirements/core.d.ts +0 -14
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { LegacyAuthorityRequirements, LegacyAuthorityRequirementsInput } from './authority.js';
|
|
2
|
+
import type { LegacyClassRequirement, LegacyClassRequirementInput } from './classes.js';
|
|
3
|
+
import type { LegacyCoreRequirement, LegacyCoreRequirementInput } from './core.js';
|
|
4
|
+
export { legacyRequirements, type LegacyRequirements, type LegacyRequirementsInput, } from './requirements.js';
|
|
5
|
+
export type { LegacyAuthorityRequirements, LegacyAuthorityRequirementsInput } from './authority.js';
|
|
6
|
+
export type { LegacyClassRequirement, LegacyClassRequirementInput } from './classes.js';
|
|
7
|
+
export type { LegacyCoreRequirement, LegacyCoreRequirementInput } from './core.js';
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated The pre-Roles public name of `LegacyClassRequirement` (L-SDK-1). Replaced by
|
|
10
|
+
* `ClassScopeRequirement`. Removal: in the SDK major that adopts a Kernel cohort no longer
|
|
11
|
+
* admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
12
|
+
*/
|
|
13
|
+
export type ClassRequirement = LegacyClassRequirement;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated The pre-Roles public name of `LegacyClassRequirementInput` (L-SDK-1). Replaced by
|
|
16
|
+
* `ClassScopeRequirementInput`. Removal: in the SDK major that adopts a Kernel cohort no longer
|
|
17
|
+
* admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
18
|
+
*/
|
|
19
|
+
export type ClassRequirementInput = LegacyClassRequirementInput;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated The pre-Roles public name of `LegacyAuthorityRequirements` (L-SDK-1). Replaced by
|
|
22
|
+
* Role `granters`. Removal: in the SDK major that adopts a Kernel cohort no longer admitting the
|
|
23
|
+
* legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
24
|
+
*/
|
|
25
|
+
export type AuthorityRequirements = LegacyAuthorityRequirements;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated The pre-Roles public name of `LegacyAuthorityRequirementsInput` (L-SDK-1). Replaced
|
|
28
|
+
* by Role `granters`. Removal: in the SDK major that adopts a Kernel cohort no longer admitting the
|
|
29
|
+
* legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
30
|
+
*/
|
|
31
|
+
export type AuthorityRequirementsInput = LegacyAuthorityRequirementsInput;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated The pre-Roles public name of `LegacyCoreRequirement` (L-SDK-1). Replaced by
|
|
34
|
+
* `RoleRequirement`. Removal: in the SDK major that adopts a Kernel cohort no longer admitting the
|
|
35
|
+
* legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
36
|
+
*/
|
|
37
|
+
export type CoreRequirement = LegacyCoreRequirement;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated The pre-Roles public name of `LegacyCoreRequirementInput` (L-SDK-1). Replaced by
|
|
40
|
+
* `RoleRequirementInput` members. Removal: in the SDK major that adopts a Kernel cohort no longer
|
|
41
|
+
* admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
42
|
+
*/
|
|
43
|
+
export type CoreRequirementInput = LegacyCoreRequirementInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { legacyRequirements, } from './requirements.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Key } from '../../../platform/schema/index.js';
|
|
2
|
+
import type { FunctionRequirementTarget } from '../functions.js';
|
|
3
|
+
import type { LegacyAuthorityRequirements, LegacyAuthorityRequirementsInput } from './authority.js';
|
|
4
|
+
import type { LegacyClassRequirement, LegacyClassRequirementInput } from './classes.js';
|
|
5
|
+
import type { LegacyCoreRequirement, LegacyCoreRequirementInput } from './core.js';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated The capability shape of a release before Kernel Roles: `functions`, `classes`,
|
|
8
|
+
* `authority` and `core` (L-SDK-1). Replaced by `RoleRequirementsInput` (`roles` and
|
|
9
|
+
* `scopes`). Removal: in the SDK major that adopts a Kernel cohort no longer admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
10
|
+
*/
|
|
11
|
+
export interface LegacyRequirementsInput {
|
|
12
|
+
readonly functions?: readonly FunctionRequirementTarget[];
|
|
13
|
+
readonly classes?: readonly LegacyClassRequirementInput[];
|
|
14
|
+
readonly authority?: LegacyAuthorityRequirementsInput;
|
|
15
|
+
readonly core?: readonly LegacyCoreRequirementInput[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Canonical legacy author intent; dependency-closure validation belongs to Build
|
|
19
|
+
* compilation (L-SDK-1). Replaced by `RoleRequirements`. Removal: in the SDK major that adopts a Kernel cohort no longer admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
20
|
+
*/
|
|
21
|
+
export interface LegacyRequirements {
|
|
22
|
+
readonly functions: readonly Key.Callable[];
|
|
23
|
+
readonly classes: readonly LegacyClassRequirement[];
|
|
24
|
+
readonly authority?: LegacyAuthorityRequirements;
|
|
25
|
+
readonly core: readonly LegacyCoreRequirement[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Capture the legacy capability shape exactly as before Kernel Roles (L-SDK-1).
|
|
29
|
+
* Replaced by `requirements({ roles, scopes })`. Removal: in the SDK major that adopts a Kernel cohort no longer admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
30
|
+
*/
|
|
31
|
+
export declare function legacyRequirements(input: LegacyRequirementsInput): LegacyRequirements;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { legacyAuthority } from './authority.js';
|
|
2
|
+
import { legacyClasses } from './classes.js';
|
|
3
|
+
import { legacyCore } from './core.js';
|
|
4
|
+
import { legacyFunctions } from './functions.js';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Capture the legacy capability shape exactly as before Kernel Roles (L-SDK-1).
|
|
7
|
+
* Replaced by `requirements({ roles, scopes })`. Removal: in the SDK major that adopts a Kernel cohort no longer admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
8
|
+
*/
|
|
9
|
+
export function legacyRequirements(input) {
|
|
10
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input))
|
|
11
|
+
invalid();
|
|
12
|
+
if ('roles' in input || 'scopes' in input) {
|
|
13
|
+
throw new TypeError('Requirements declare roles and scopes, or the legacy functions, classes, authority, and core, never both.');
|
|
14
|
+
}
|
|
15
|
+
if (Reflect.ownKeys(input).some((key) => key !== 'functions' && key !== 'classes' && key !== 'authority' && key !== 'core')) {
|
|
16
|
+
invalid();
|
|
17
|
+
}
|
|
18
|
+
const functions = legacyFunctions(input.functions);
|
|
19
|
+
const classes = legacyClasses(input.classes);
|
|
20
|
+
const authority = legacyAuthority(input.authority);
|
|
21
|
+
const core = legacyCore(input.core);
|
|
22
|
+
return Object.freeze({
|
|
23
|
+
functions,
|
|
24
|
+
classes,
|
|
25
|
+
core,
|
|
26
|
+
...(authority === undefined ? {} : { authority }),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function invalid() {
|
|
30
|
+
throw new TypeError('Requirements definition may contain only functions, classes, authority, and core.');
|
|
31
|
+
}
|
|
@@ -1,25 +1,36 @@
|
|
|
1
|
-
import type { AuthorityOperation } from '../../platform/schema/index.js';
|
|
2
1
|
import type { ClassRef, CoreRef, Key } from '../../platform/schema/index.js';
|
|
3
2
|
import type { ClassOperation } from './classes.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly
|
|
3
|
+
/** The installed Domain itself, as a Role holder: `requirements.domain`. */
|
|
4
|
+
export interface DomainHolder {
|
|
5
|
+
readonly kind: 'domain';
|
|
6
|
+
}
|
|
7
|
+
/** Who holds a Role binding: the installed Domain, or a Core Identity by its reference. */
|
|
8
|
+
export type RequirementHolder = DomainHolder | CoreRef;
|
|
9
|
+
/** One Kernel Role the release binds: its members extend it, its granters may grant it. */
|
|
10
|
+
export interface RoleRequirement {
|
|
11
|
+
/** A Core Node whose Class is a Role, of the Domain or of a dependency. */
|
|
12
|
+
readonly role: CoreRef;
|
|
13
|
+
/** Each one extends the Role (`extends_with`), in canonical order, the Domain first. */
|
|
14
|
+
readonly members?: readonly [RequirementHolder, ...RequirementHolder[]];
|
|
15
|
+
/** Each one may grant and revoke the Role, in canonical order, the Domain first. */
|
|
16
|
+
readonly granters?: readonly [RequirementHolder, ...RequirementHolder[]];
|
|
7
17
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
/** A scope the installed Domain holds: `call` on a callable, Class operations on a Class. */
|
|
19
|
+
export type ScopeRequirement = CallableScopeRequirement | ClassScopeRequirement;
|
|
20
|
+
export interface CallableScopeRequirement {
|
|
21
|
+
readonly on: Key.Callable;
|
|
22
|
+
readonly operations: readonly ['call'];
|
|
11
23
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
readonly classes: readonly ClassRequirement[];
|
|
16
|
-
readonly authority?: AuthorityRequirements;
|
|
17
|
-
readonly core: readonly CoreRequirement[];
|
|
24
|
+
export interface ClassScopeRequirement {
|
|
25
|
+
readonly on: ClassRef;
|
|
26
|
+
readonly operations: readonly [ClassOperation, ...ClassOperation[]];
|
|
18
27
|
}
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The Kernel Roles and scopes a Domain release requires, canonical as the Kernel admits them:
|
|
30
|
+
* Roles by the Key of their Role, scopes by the Key of their target. Build compiles them to the
|
|
31
|
+
* release's `capabilities` and proves them against the exact dependency closure.
|
|
32
|
+
*/
|
|
33
|
+
export interface RoleRequirements {
|
|
34
|
+
readonly roles: readonly RoleRequirement[];
|
|
35
|
+
readonly scopes: readonly ScopeRequirement[];
|
|
25
36
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ResolvedCoreDefinition } from '../../platform/schema/index.js';
|
|
2
|
+
import type { DomainHolder, RoleRequirement } from './requirement.js';
|
|
3
|
+
/** `requirements.domain`: the installed Domain as a Role member or granter. */
|
|
4
|
+
export declare const DOMAIN_HOLDER: DomainHolder;
|
|
5
|
+
/** A Core Node a requirement names by its resolved definition, such as `K.core.nodes.reader`. */
|
|
6
|
+
export type CoreNodeInput = Pick<ResolvedCoreDefinition, 'ref'>;
|
|
7
|
+
/** A Role holder: `requirements.domain`, or a Core Identity by its resolved definition. */
|
|
8
|
+
export type HolderInput = CoreNodeInput | DomainHolder;
|
|
9
|
+
export interface RoleRequirementInput {
|
|
10
|
+
/** A Core Node whose Class is a Role: the Domain's own, or a dependency's. */
|
|
11
|
+
readonly role: CoreNodeInput;
|
|
12
|
+
/** Holders that extend the Role. A binding names members, granters, or both. */
|
|
13
|
+
readonly members?: readonly HolderInput[];
|
|
14
|
+
/** Holders that may grant and revoke the Role. */
|
|
15
|
+
readonly granters?: readonly HolderInput[];
|
|
16
|
+
}
|
|
17
|
+
export declare function captureRoles(input: readonly RoleRequirementInput[] | undefined): readonly RoleRequirement[];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { acceptDefinitionRef, Key } from '../../platform/schema/index.js';
|
|
2
|
+
import { isRecord, sortedBy, unique } from './canonical.js';
|
|
3
|
+
/** `requirements.domain`: the installed Domain as a Role member or granter. */
|
|
4
|
+
export const DOMAIN_HOLDER = Object.freeze({ kind: 'domain' });
|
|
5
|
+
export function captureRoles(input) {
|
|
6
|
+
if (input === undefined)
|
|
7
|
+
return Object.freeze([]);
|
|
8
|
+
if (!Array.isArray(input))
|
|
9
|
+
throw new TypeError('Role requirements must be an array.');
|
|
10
|
+
const roles = input.map((entry) => {
|
|
11
|
+
if (!isRecord(entry) ||
|
|
12
|
+
Reflect.ownKeys(entry).some((key) => key !== 'role' && key !== 'members' && key !== 'granters')) {
|
|
13
|
+
throw new TypeError('Role requirement may contain only role, members, and granters.');
|
|
14
|
+
}
|
|
15
|
+
const role = coreRef(entry.role, 'Role requirement must name one Core Node as its role.');
|
|
16
|
+
const members = holders(entry.members, 'Role member');
|
|
17
|
+
const granters = holders(entry.granters, 'Role granter');
|
|
18
|
+
if (members === undefined && granters === undefined) {
|
|
19
|
+
throw new TypeError('Role requirement names members or granters.');
|
|
20
|
+
}
|
|
21
|
+
return Object.freeze({
|
|
22
|
+
role,
|
|
23
|
+
...(members === undefined ? {} : { members }),
|
|
24
|
+
...(granters === undefined ? {} : { granters }),
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
unique(roles.map(({ role }) => Key.of(role)), 'Role requirement');
|
|
28
|
+
return sortedBy(roles, ({ role }) => Key.of(role));
|
|
29
|
+
}
|
|
30
|
+
function holders(input, label) {
|
|
31
|
+
if (input === undefined)
|
|
32
|
+
return undefined;
|
|
33
|
+
if (!Array.isArray(input))
|
|
34
|
+
throw new TypeError(`${label}s must be an array.`);
|
|
35
|
+
if (input.length === 0)
|
|
36
|
+
throw new TypeError(`${label}s cannot be empty.`);
|
|
37
|
+
const values = input.map((holder) => {
|
|
38
|
+
if (isRecord(holder) && holder.kind === 'domain') {
|
|
39
|
+
if (Reflect.ownKeys(holder).length !== 1)
|
|
40
|
+
throw new TypeError(`${label} is invalid.`);
|
|
41
|
+
return DOMAIN_HOLDER;
|
|
42
|
+
}
|
|
43
|
+
return coreRef(holder, `${label} must be requirements.domain or one Core Node.`);
|
|
44
|
+
});
|
|
45
|
+
unique(values.map(holderKey), label);
|
|
46
|
+
return sortedBy(values, holderKey);
|
|
47
|
+
}
|
|
48
|
+
function coreRef(input, message) {
|
|
49
|
+
try {
|
|
50
|
+
const admitted = acceptDefinitionRef(isRecord(input) ? input.ref : undefined);
|
|
51
|
+
if (admitted.kind !== 'core')
|
|
52
|
+
throw new TypeError('Expected Core reference.');
|
|
53
|
+
return admitted;
|
|
54
|
+
}
|
|
55
|
+
catch (cause) {
|
|
56
|
+
throw new TypeError(message, { cause });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/** The installed Domain sorts first; a Core Identity by its Key, as the Kernel orders holders. */
|
|
60
|
+
function holderKey(holder) {
|
|
61
|
+
return holder.kind === 'domain' ? '' : String(Key.of(holder));
|
|
62
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ScopeRequirement } from './requirement.js';
|
|
2
|
+
import { type ClassOperation, type ClassTarget } from './classes.js';
|
|
3
|
+
import { type FunctionRequirementTarget } from './functions.js';
|
|
4
|
+
/** The installed Domain holds the Class operations on a Class of its closure. */
|
|
5
|
+
export interface ClassScopeRequirementInput {
|
|
6
|
+
readonly on: ClassTarget;
|
|
7
|
+
readonly operations: readonly [ClassOperation, ...ClassOperation[]];
|
|
8
|
+
}
|
|
9
|
+
/** The installed Domain holds `call` on a Function or Method of its closure. */
|
|
10
|
+
export interface CallableScopeRequirementInput {
|
|
11
|
+
readonly on: FunctionRequirementTarget;
|
|
12
|
+
readonly operations: readonly ['call'];
|
|
13
|
+
}
|
|
14
|
+
/** A scope only bounds what the Domain does for a caller: the target's Policy still decides. */
|
|
15
|
+
export type ScopeRequirementInput = ClassScopeRequirementInput | CallableScopeRequirementInput;
|
|
16
|
+
export declare function captureScopes(input: readonly ScopeRequirementInput[] | undefined): readonly ScopeRequirement[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Key } from '../../platform/schema/index.js';
|
|
2
|
+
import { isRecord, sortedBy, unique } from './canonical.js';
|
|
3
|
+
import { captureClassOperations, captureClassRef, namesClass, } from './classes.js';
|
|
4
|
+
import { captureCallable } from './functions.js';
|
|
5
|
+
export function captureScopes(input) {
|
|
6
|
+
if (input === undefined)
|
|
7
|
+
return Object.freeze([]);
|
|
8
|
+
if (!Array.isArray(input))
|
|
9
|
+
throw new TypeError('Scope requirements must be an array.');
|
|
10
|
+
const scopes = input.map((entry) => {
|
|
11
|
+
if (!isRecord(entry) ||
|
|
12
|
+
Reflect.ownKeys(entry).some((key) => key !== 'on' && key !== 'operations')) {
|
|
13
|
+
throw new TypeError('Scope requirement may contain only on and operations.');
|
|
14
|
+
}
|
|
15
|
+
if (namesClass(entry.on)) {
|
|
16
|
+
return Object.freeze({
|
|
17
|
+
on: captureClassRef(entry.on, 'Scope requirement target is invalid.'),
|
|
18
|
+
operations: captureClassOperations(entry.operations, 'Class scope operation'),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
const on = captureCallable(entry.on, 'Scope requirement target must be a Class, a Function, or a Method.');
|
|
22
|
+
const operations = entry.operations;
|
|
23
|
+
if (!Array.isArray(operations) || operations.length !== 1 || operations[0] !== 'call') {
|
|
24
|
+
throw new TypeError("A Function or Method scope has the one operation 'call'.");
|
|
25
|
+
}
|
|
26
|
+
return Object.freeze({ on, operations: Object.freeze(['call']) });
|
|
27
|
+
});
|
|
28
|
+
unique(scopes.map(scopeKey), 'Scope requirement');
|
|
29
|
+
return sortedBy(scopes, scopeKey);
|
|
30
|
+
}
|
|
31
|
+
/** A callable by its Key, a Class by the Key of its reference, as the Kernel orders scopes. */
|
|
32
|
+
function scopeKey({ on }) {
|
|
33
|
+
return typeof on === 'string' ? on : String(Key.of(on));
|
|
34
|
+
}
|
|
@@ -14,12 +14,10 @@ export interface Build<Schema extends schema.DomainSchema = schema.DomainSchema,
|
|
|
14
14
|
readonly presentation?: BuildPresentation;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* What a build requires of the Instance
|
|
18
|
-
*
|
|
17
|
+
* What a build requires of the Instance: the Kernel Roles it binds and the scopes its Domain holds,
|
|
18
|
+
* or, for a Domain still authored in the legacy shape, that shape; never both.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
21
|
-
readonly capabilities: release.LegacyCapabilityRequirements;
|
|
22
|
-
}
|
|
20
|
+
export type BuildRequirements = release.Requirements;
|
|
23
21
|
export interface BuildPresentation {
|
|
24
22
|
/** One self-contained inline SVG. */
|
|
25
23
|
readonly icon?: string;
|
|
@@ -2,10 +2,11 @@ import { artifact as artifactProtocol, release, routes } from '@astrale-os/kerne
|
|
|
2
2
|
import { isDomainDefinition } from '../../application/index.js';
|
|
3
3
|
import { admit as admitRoutes } from '../../application/routes/index.js';
|
|
4
4
|
import { admitRuntimeRegistry } from '../../application/runtime/index.js';
|
|
5
|
-
import { bundle
|
|
5
|
+
import { bundle } from '../../platform/schema/index.js';
|
|
6
6
|
import { schema as schemaApi } from '../../platform/schema/index.js';
|
|
7
7
|
import { admitBuild } from './admission.js';
|
|
8
8
|
import { compileFrontend } from './frontend/index.js';
|
|
9
|
+
import { legacyCompileRequirements } from './legacy/requirements.js';
|
|
9
10
|
/** Compile one inert Domain definition into provider-neutral, dependency-closed material. */
|
|
10
11
|
export function compile(definition) {
|
|
11
12
|
if (!isDomainDefinition(definition)) {
|
|
@@ -42,75 +43,22 @@ export function compile(definition) {
|
|
|
42
43
|
});
|
|
43
44
|
return admitBuild(build, { domain, registry });
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Compile the requirements to the release's capabilities: Roles and scopes, which the Kernel admits
|
|
48
|
+
* in canonical order and validates against the exact dependency closure, or the legacy shape.
|
|
49
|
+
*/
|
|
45
50
|
function compileRequirements(domain, input, sourceBundle) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
throw new TypeError(`Function requirement ${key} is absent from the dependency closure.`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
for (const requirement of input?.classes ?? []) {
|
|
53
|
-
const key = Key.of(requirement.class);
|
|
54
|
-
requireDirectDependency(domain, key, 'Class');
|
|
55
|
-
if (domain.definition(requirement.class) === undefined) {
|
|
56
|
-
throw new TypeError('Class requirement is absent from the dependency closure.');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
for (const requirement of input?.core ?? []) {
|
|
60
|
-
const subject = domain.core.nodes[requirement.subject.name];
|
|
61
|
-
if (requirement.subject.origin !== domain.origin || subject === undefined) {
|
|
62
|
-
throw new TypeError('Core capability subject must name one local Core Node.');
|
|
63
|
-
}
|
|
64
|
-
for (const key of requirement.functions) {
|
|
65
|
-
if (Key.origin(key) !== domain.origin) {
|
|
66
|
-
requireDirectDependency(domain, key, 'Core capability Function');
|
|
67
|
-
}
|
|
68
|
-
if (domain.callable(key) === undefined) {
|
|
69
|
-
throw new TypeError(`Core capability Function ${key} is absent from the dependency closure.`);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
for (const classRequirement of requirement.classes) {
|
|
73
|
-
const key = Key.of(classRequirement.class);
|
|
74
|
-
if (classRequirement.class.origin !== domain.origin) {
|
|
75
|
-
requireDirectDependency(domain, key, 'Core capability Class');
|
|
76
|
-
}
|
|
77
|
-
if (domain.definition(classRequirement.class) === undefined) {
|
|
78
|
-
throw new TypeError('Core capability Class is absent from the dependency closure.');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
51
|
+
// The one seam to the legacy shape: a key only that shape declares selects it.
|
|
52
|
+
if (input !== undefined && release.isLegacyCapabilities(input)) {
|
|
53
|
+
return legacyCompileRequirements(domain, input, sourceBundle);
|
|
81
54
|
}
|
|
55
|
+
const { roles = [], scopes = [] } = (input ?? {});
|
|
82
56
|
const candidate = release.admitRequirements({
|
|
83
57
|
capabilities: {
|
|
84
|
-
...(
|
|
85
|
-
|
|
86
|
-
: { functions: input.functions }),
|
|
87
|
-
...(input === undefined || input.classes.length === 0 ? {} : { classes: input.classes }),
|
|
88
|
-
...(input?.authority === undefined ? {} : { authority: input.authority }),
|
|
89
|
-
...(input === undefined || input.core.length === 0
|
|
90
|
-
? {}
|
|
91
|
-
: {
|
|
92
|
-
core: input.core.map((requirement) => ({
|
|
93
|
-
subject: requirement.subject,
|
|
94
|
-
...(requirement.functions.length === 0 ? {} : { functions: requirement.functions }),
|
|
95
|
-
...(requirement.classes.length === 0 ? {} : { classes: requirement.classes }),
|
|
96
|
-
...(requirement.authority === undefined ? {} : { authority: requirement.authority }),
|
|
97
|
-
})),
|
|
98
|
-
}),
|
|
58
|
+
...(roles.length === 0 ? {} : { roles }),
|
|
59
|
+
...(scopes.length === 0 ? {} : { scopes }),
|
|
99
60
|
},
|
|
100
61
|
});
|
|
101
62
|
release.validateRequirements(sourceBundle.root, sourceBundle.closure, candidate);
|
|
102
63
|
return candidate;
|
|
103
64
|
}
|
|
104
|
-
function requireDirectDependency(domain, key, label) {
|
|
105
|
-
let origin;
|
|
106
|
-
try {
|
|
107
|
-
origin = Key.origin(Key(key));
|
|
108
|
-
}
|
|
109
|
-
catch {
|
|
110
|
-
throw new TypeError(`${label} requirement is invalid.`);
|
|
111
|
-
}
|
|
112
|
-
if (origin === domain.origin ||
|
|
113
|
-
!Object.values(domain.dependencies).some((dependency) => dependency.origin === origin)) {
|
|
114
|
-
throw new TypeError(`${label} requirement must target an exact direct dependency.`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { release } from '@astrale-os/kernel-protocol';
|
|
2
|
+
import type { LegacyRequirements } from '../../../application/requirements/index.js';
|
|
3
|
+
import type { bundle, Domain } from '../../../platform/schema/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Compile the legacy capability shape exactly as before Kernel Roles (L-SDK-2): a
|
|
6
|
+
* top-level Function or Class requirement targets an exact direct dependency, a Core subject is a
|
|
7
|
+
* local Core Node, and the Kernel admits and validates the result. Replaced by the Role and scope
|
|
8
|
+
* compilation of `compile`. Removal: in the SDK major that adopts a Kernel cohort no longer
|
|
9
|
+
* admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
10
|
+
*/
|
|
11
|
+
export declare function legacyCompileRequirements(domain: Domain, input: LegacyRequirements, sourceBundle: bundle.Bundle): release.Requirements;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { release } from '@astrale-os/kernel-protocol';
|
|
2
|
+
import { Key } from '../../../platform/schema/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Compile the legacy capability shape exactly as before Kernel Roles (L-SDK-2): a
|
|
5
|
+
* top-level Function or Class requirement targets an exact direct dependency, a Core subject is a
|
|
6
|
+
* local Core Node, and the Kernel admits and validates the result. Replaced by the Role and scope
|
|
7
|
+
* compilation of `compile`. Removal: in the SDK major that adopts a Kernel cohort no longer
|
|
8
|
+
* admitting the legacy capability shape (Kernel `LegacyCapabilityRequirements`, A1e).
|
|
9
|
+
*/
|
|
10
|
+
export function legacyCompileRequirements(domain, input, sourceBundle) {
|
|
11
|
+
for (const key of input.functions) {
|
|
12
|
+
requireDirectDependency(domain, key, 'Function');
|
|
13
|
+
if (domain.callable(key) === undefined) {
|
|
14
|
+
throw new TypeError(`Function requirement ${key} is absent from the dependency closure.`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
for (const requirement of input.classes) {
|
|
18
|
+
const key = Key.of(requirement.class);
|
|
19
|
+
requireDirectDependency(domain, key, 'Class');
|
|
20
|
+
if (domain.definition(requirement.class) === undefined) {
|
|
21
|
+
throw new TypeError('Class requirement is absent from the dependency closure.');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
for (const requirement of input.core) {
|
|
25
|
+
const subject = domain.core.nodes[requirement.subject.name];
|
|
26
|
+
if (requirement.subject.origin !== domain.origin || subject === undefined) {
|
|
27
|
+
throw new TypeError('Core capability subject must name one local Core Node.');
|
|
28
|
+
}
|
|
29
|
+
for (const key of requirement.functions) {
|
|
30
|
+
if (Key.origin(key) !== domain.origin) {
|
|
31
|
+
requireDirectDependency(domain, key, 'Core capability Function');
|
|
32
|
+
}
|
|
33
|
+
if (domain.callable(key) === undefined) {
|
|
34
|
+
throw new TypeError(`Core capability Function ${key} is absent from the dependency closure.`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
for (const classRequirement of requirement.classes) {
|
|
38
|
+
const key = Key.of(classRequirement.class);
|
|
39
|
+
if (classRequirement.class.origin !== domain.origin) {
|
|
40
|
+
requireDirectDependency(domain, key, 'Core capability Class');
|
|
41
|
+
}
|
|
42
|
+
if (domain.definition(classRequirement.class) === undefined) {
|
|
43
|
+
throw new TypeError('Core capability Class is absent from the dependency closure.');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const candidate = release.admitRequirements({
|
|
48
|
+
capabilities: {
|
|
49
|
+
...(input.functions.length === 0 ? {} : { functions: input.functions }),
|
|
50
|
+
...(input.classes.length === 0 ? {} : { classes: input.classes }),
|
|
51
|
+
...(input.authority === undefined ? {} : { authority: input.authority }),
|
|
52
|
+
...(input.core.length === 0
|
|
53
|
+
? {}
|
|
54
|
+
: {
|
|
55
|
+
core: input.core.map((requirement) => ({
|
|
56
|
+
subject: requirement.subject,
|
|
57
|
+
...(requirement.functions.length === 0 ? {} : { functions: requirement.functions }),
|
|
58
|
+
...(requirement.classes.length === 0 ? {} : { classes: requirement.classes }),
|
|
59
|
+
...(requirement.authority === undefined ? {} : { authority: requirement.authority }),
|
|
60
|
+
})),
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
release.validateRequirements(sourceBundle.root, sourceBundle.closure, candidate);
|
|
65
|
+
return candidate;
|
|
66
|
+
}
|
|
67
|
+
function requireDirectDependency(domain, key, label) {
|
|
68
|
+
let origin;
|
|
69
|
+
try {
|
|
70
|
+
origin = Key.origin(Key(key));
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
throw new TypeError(`${label} requirement is invalid.`);
|
|
74
|
+
}
|
|
75
|
+
if (origin === domain.origin ||
|
|
76
|
+
!Object.values(domain.dependencies).some((dependency) => dependency.origin === origin)) {
|
|
77
|
+
throw new TypeError(`${label} requirement must target an exact direct dependency.`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -58,9 +58,6 @@ export function restoreBuild(input, runtime) {
|
|
|
58
58
|
}
|
|
59
59
|
const registry = bindRuntime(domain, runtime, input.callables);
|
|
60
60
|
const requirements = admitRequirements(input.requirements);
|
|
61
|
-
// A build declares its capabilities in the legacy shape only: never roles or scopes.
|
|
62
|
-
if ('roles' in requirements.capabilities || 'scopes' in requirements.capabilities)
|
|
63
|
-
invalid();
|
|
64
61
|
validateRequirements(decoded.root, decoded.closure, requirements);
|
|
65
62
|
const plan = admitRoutePlan(input.routes, domain);
|
|
66
63
|
const compiled = deepFreeze(input.schema.compiled);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { filePositionsOf, receivedFile, withFiles } from '../../../application/file/index.js';
|
|
2
|
+
import { declaredClasses } from '../../../application/query/execution/crossings.js';
|
|
2
3
|
import { bindCapabilities } from '../capabilities/index.js';
|
|
3
4
|
import { clients } from '../integration/index.js';
|
|
4
5
|
export function context(request, runtime, callable, authentication, self) {
|
|
@@ -18,7 +19,7 @@ export function context(request, runtime, callable, authentication, self) {
|
|
|
18
19
|
input: filesOf(callable, request.call.input, authentication),
|
|
19
20
|
...(request.context.binary === undefined ? {} : { body: request.context.binary }),
|
|
20
21
|
caller: authentication.caller,
|
|
21
|
-
...bindCapabilities(runtime.loaded.domain, sessions, runtime.loaded.release.build.requirements.capabilities
|
|
22
|
+
...bindCapabilities(runtime.loaded.domain, sessions, declaredClasses(runtime.loaded.release.build.requirements.capabilities)),
|
|
22
23
|
integrations: clients(runtime, request.context, {
|
|
23
24
|
...sessions,
|
|
24
25
|
...(authentication.caller.kind !== 'authenticated' ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { edgeClass as kernelEdgeClass, nodeClass as kernelNodeClass, type DirectedEdgeClass, type DirectedEdgeInput, type Lazy, type NodeClass, type NodeClassInput as KernelNodeClassInput, type NodeClassPolicyInput as NodeClassReadRule, type Policy, type UndirectedEdgeClass, type UndirectedEdgeInput } from '@astrale-os/kernel-dsl/v1/builder';
|
|
1
|
+
import { edgeClass as kernelEdgeClass, nodeClass as kernelNodeClass, type DirectedEdgeClass, type DirectedEdgeInput, type EdgeClassPolicyInput as EdgeClassReadRule, type Lazy, type NodeClass, type NodeClassInput as KernelNodeClassInput, type NodeClassPolicyInput as NodeClassReadRule, type Policy, type UndirectedEdgeClass, type UndirectedEdgeInput } from '@astrale-os/kernel-dsl/v1/builder';
|
|
2
2
|
import { type ClassIcon } from './class-icon.js';
|
|
3
3
|
/**
|
|
4
4
|
* SDK Node Class input: every author must make an explicit, admitted icon choice, and every
|
|
@@ -7,9 +7,10 @@ import { type ClassIcon } from './class-icon.js';
|
|
|
7
7
|
export type NodeClassInput = Omit<KernelNodeClassInput, 'icon'> & {
|
|
8
8
|
readonly icon: ClassIcon;
|
|
9
9
|
};
|
|
10
|
-
/**
|
|
10
|
+
/** A named Policy, or the constant `true` or `false`: the rule every Class slot admits. */
|
|
11
11
|
export type ClassReadRule = Lazy<Policy> | boolean;
|
|
12
12
|
export type { NodeClassReadRule };
|
|
13
|
+
export type { EdgeClassReadRule };
|
|
13
14
|
/**
|
|
14
15
|
* The observation rules of a concrete Class. A Node stays traversable through either rule, so a
|
|
15
16
|
* read rule other than `true` leaves every caller able to reach it, and to select its reference,
|
|
@@ -50,11 +51,11 @@ type NodeInput = {
|
|
|
50
51
|
type DirectedInput = {
|
|
51
52
|
readonly kind: 'edge';
|
|
52
53
|
readonly orientation: 'directed';
|
|
53
|
-
} & Declared<DirectedOptions>;
|
|
54
|
+
} & Declared<DirectedOptions, EdgeClassReadRule>;
|
|
54
55
|
type UndirectedInput = {
|
|
55
56
|
readonly kind: 'edge';
|
|
56
57
|
readonly orientation: 'undirected';
|
|
57
|
-
} & Declared<UndirectedOptions>;
|
|
58
|
+
} & Declared<UndirectedOptions, EdgeClassReadRule>;
|
|
58
59
|
/**
|
|
59
60
|
* Author a Node Class whose materialized configuration always carries an explicitly selected,
|
|
60
61
|
* admitted SVG icon and, when concrete, a declared read rule. The mapped input retains inference
|
|
@@ -66,11 +67,12 @@ export declare function nodeClass<const Config extends NodeClassInput>(config: C
|
|
|
66
67
|
[Member in keyof NonNullable<Config[Key]>]: NonNullable<Config[Key]>[Member];
|
|
67
68
|
} | Extract<Config[Key], undefined> : Key extends 'extends' ? Config[Key] extends infer Parents extends NodeClassInput['extends'] ? Parents extends readonly unknown[] ? readonly [...Parents] : Parents : never : Config[Key];
|
|
68
69
|
}>;
|
|
69
|
-
declare function directed<const Input extends DirectedOptions>(input: Input & Parameters<typeof kernelEdgeClass.directed<Input>>[0] & DeclaredReadRule<Input>): ReturnType<typeof kernelEdgeClass.directed<Input>>;
|
|
70
|
-
declare function undirected<const Input extends UndirectedOptions>(input: Input & Parameters<typeof kernelEdgeClass.undirected<Input>>[0] & DeclaredReadRule<Input>): ReturnType<typeof kernelEdgeClass.undirected<Input>>;
|
|
70
|
+
declare function directed<const Input extends DirectedOptions>(input: Input & Parameters<typeof kernelEdgeClass.directed<Input>>[0] & DeclaredReadRule<Input, EdgeClassReadRule>): ReturnType<typeof kernelEdgeClass.directed<Input>>;
|
|
71
|
+
declare function undirected<const Input extends UndirectedOptions>(input: Input & Parameters<typeof kernelEdgeClass.undirected<Input>>[0] & DeclaredReadRule<Input, EdgeClassReadRule>): ReturnType<typeof kernelEdgeClass.undirected<Input>>;
|
|
71
72
|
/**
|
|
72
73
|
* Author an Edge Class. A concrete Edge Class declares its read rule exactly as a Node Class
|
|
73
|
-
* does; the handle is the canonical
|
|
74
|
+
* does, and each slot takes Policy checks as a Node Class slot does; the handle is the canonical
|
|
75
|
+
* DSL handle.
|
|
74
76
|
*/
|
|
75
77
|
export declare const edgeClass: Readonly<{
|
|
76
78
|
directed: typeof directed;
|
|
@@ -23,7 +23,8 @@ function undirected(input) {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Author an Edge Class. A concrete Edge Class declares its read rule exactly as a Node Class
|
|
26
|
-
* does; the handle is the canonical
|
|
26
|
+
* does, and each slot takes Policy checks as a Node Class slot does; the handle is the canonical
|
|
27
|
+
* DSL handle.
|
|
27
28
|
*/
|
|
28
29
|
export const edgeClass = Object.freeze({ directed, undirected });
|
|
29
30
|
export function defineClass(config) {
|
|
@@ -42,7 +43,7 @@ export function defineClass(config) {
|
|
|
42
43
|
function assertDeclaredReadRule(kind, config) {
|
|
43
44
|
if (config.abstract === true)
|
|
44
45
|
return;
|
|
45
|
-
const rule =
|
|
46
|
+
const rule = 'a Policy, Policy checks, true or false';
|
|
46
47
|
const read = config.policies?.read;
|
|
47
48
|
if (read === undefined) {
|
|
48
49
|
throw new TypeError(`${kind} Class read rule is required; declare policies.read with ${rule}.`);
|
|
@@ -8,7 +8,7 @@ export { property } from './property.js';
|
|
|
8
8
|
export type { AuthoredProperty, PropertyOptions } from './property.js';
|
|
9
9
|
export { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
10
10
|
export { defineClass, edgeClass, nodeClass } from './class-authoring.js';
|
|
11
|
-
export type { AuthoredNodeClass, ClassReadRule, DeclaredObservation, DeclaredReadRule, NodeClassReadRule, NodeClassInput, } from './class-authoring.js';
|
|
11
|
+
export type { AuthoredNodeClass, ClassReadRule, DeclaredObservation, DeclaredReadRule, EdgeClassReadRule, NodeClassReadRule, NodeClassInput, } from './class-authoring.js';
|
|
12
12
|
export { func, method } from './callable-authoring.js';
|
|
13
13
|
export type { CallerRule, DeclaredCallerRule } from './callable-authoring.js';
|
|
14
14
|
export { error } from './error.js';
|
package/dist/testing/query.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isDomainDefinition } from '../application/define.js';
|
|
2
2
|
import { querySpecOf } from '../application/query/defined/define.js';
|
|
3
|
+
import { declaredClasses } from '../application/query/execution/crossings.js';
|
|
3
4
|
import { planStep, Run, stepsFor, stepsOf } from '../application/query/execution/run.js';
|
|
4
5
|
import { handlesOf } from '../application/query/handles/build.js';
|
|
5
6
|
import { describe } from '../application/query/handles/terms.js';
|
|
@@ -23,7 +24,7 @@ export function checkQuery(query, sampleInput, options) {
|
|
|
23
24
|
// A definition types its requirements as written; the check reads any.
|
|
24
25
|
const requirements = definition?.requirements;
|
|
25
26
|
const checked = definition !== undefined && options?.as !== 'executor';
|
|
26
|
-
const declared = checked ? (requirements
|
|
27
|
+
const declared = checked ? declaredClasses(requirements ?? { scopes: [] }) : undefined;
|
|
27
28
|
const run = new Run(NO_KERNEL, domain, query.id, declared);
|
|
28
29
|
const build = spec.build;
|
|
29
30
|
const built = build(sampleInput, handlesOf(domain), stepsFor(query.id));
|