@astrale-os/sdk 0.5.0-beta.122 → 0.5.0-beta.124
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 +18 -0
- package/dist/application/action/action.d.ts +1 -1
- package/dist/application/runtime/callables.js +2 -2
- package/dist/execution/invocation/dependency/bind.js +1 -2
- package/dist/platform/schema/class-authoring.d.ts +10 -2
- package/dist/platform/schema/index.d.ts +3 -1
- package/dist/platform/schema/index.js +1 -0
- package/dist/platform/schema/state-property.d.ts +11 -0
- package/dist/platform/schema/state-property.js +3 -0
- package/dist/testing/dataset/references.d.ts +2 -4
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0-beta.124](https://github.com/astrale-os/sdk/compare/sdk-v0.5.0-beta.123...sdk-v0.5.0-beta.124) (2026-09-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **schema:** keep inferred schema declarations portable ([#449](https://github.com/astrale-os/sdk/issues/449)) ([4745529](https://github.com/astrale-os/sdk/commit/47455291c20b32acd840e7e4d6c04daf48662e71))
|
|
9
|
+
|
|
10
|
+
## [0.5.0-beta.123](https://github.com/astrale-os/sdk/compare/sdk-v0.5.0-beta.122...sdk-v0.5.0-beta.123) (2026-09-07)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ⚠ BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* **invocation:** carry complete targets through exact admission ([#424](https://github.com/astrale-os/sdk/issues/424))
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **invocation:** carry complete targets through exact admission ([#424](https://github.com/astrale-os/sdk/issues/424)) ([6df4d80](https://github.com/astrale-os/sdk/commit/6df4d804743941d0b9abdf05f11381f4e0f9dfe4))
|
|
20
|
+
|
|
3
21
|
## [0.5.0-beta.122](https://github.com/astrale-os/sdk/compare/sdk-v0.5.0-beta.121...sdk-v0.5.0-beta.122) (2026-09-07)
|
|
4
22
|
|
|
5
23
|
|
|
@@ -16,7 +16,7 @@ type MethodValues<Class> = Class extends {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
} ? Values<Instance> | Values<Static> : never;
|
|
19
|
-
type Executable<Callable> = Callable extends ResolvedMethod<unknown, unknown, boolean, infer
|
|
19
|
+
type Executable<Callable> = Callable extends ResolvedMethod<unknown, unknown, boolean, infer Abstract> ? Abstract extends true ? never : Callable : Callable;
|
|
20
20
|
/** Every root-owned callable implementation contract, independent of Function or Method topology. */
|
|
21
21
|
export type LocalCallable<DomainValue extends Domain> = Extract<Values<DomainValue['functions']>, ResolvedCallable> | Extract<Executable<MethodValues<Values<DomainValue['classes']>>>, ResolvedCallable>;
|
|
22
22
|
export type ActionAddressOf<Callable> = Callable extends {
|
|
@@ -12,11 +12,11 @@ export function runtimeCallables(domain) {
|
|
|
12
12
|
if (selected.kind !== 'node')
|
|
13
13
|
continue;
|
|
14
14
|
for (const callable of selected.self.methods) {
|
|
15
|
-
if (callable.
|
|
15
|
+
if (!callable.abstract)
|
|
16
16
|
append(callable);
|
|
17
17
|
}
|
|
18
18
|
for (const callable of selected.self.static.methods) {
|
|
19
|
-
if (callable.
|
|
19
|
+
if (!callable.abstract)
|
|
20
20
|
append(callable);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -22,8 +22,7 @@ export function bindDependencies(domain, caller) {
|
|
|
22
22
|
const callable = dependency.callable(selected.key);
|
|
23
23
|
if (callable !== selected || Key.origin(callable.key) !== dependency.origin)
|
|
24
24
|
invalid();
|
|
25
|
-
if ('owner' in callable &&
|
|
26
|
-
(callable.inheritance === 'abstract' || !ownMethod(dependency, callable)))
|
|
25
|
+
if ('owner' in callable && (callable.abstract || !ownMethod(dependency, callable)))
|
|
27
26
|
invalid();
|
|
28
27
|
if ('owner' in callable && !callable.static) {
|
|
29
28
|
if (args.length < 2 || args.length > 3 || typeof args[0] !== 'string')
|
|
@@ -4,6 +4,9 @@ import { type ClassIcon } from './class-icon.js';
|
|
|
4
4
|
export type NodeClassInput = Omit<KernelNodeClassInput, 'icon'> & {
|
|
5
5
|
readonly icon: ClassIcon;
|
|
6
6
|
};
|
|
7
|
+
/** Preserve authored input instead of serializing expanded inheritance projections in consumers. */
|
|
8
|
+
export interface AuthoredNodeClass<Config extends NodeClassInput> extends ReturnType<typeof kernelNodeClass<Config>> {
|
|
9
|
+
}
|
|
7
10
|
type NodeInput = {
|
|
8
11
|
readonly kind: 'node';
|
|
9
12
|
readonly abstract: boolean;
|
|
@@ -20,9 +23,14 @@ type UndirectedInput = {
|
|
|
20
23
|
} & Omit<UndirectedEdgeInput, 'orientation'>;
|
|
21
24
|
/**
|
|
22
25
|
* Author a Node Class whose materialized configuration always carries an explicitly selected,
|
|
23
|
-
* admitted SVG icon.
|
|
26
|
+
* admitted SVG icon. The mapped input retains inference while expanding package-private
|
|
27
|
+
* Config interface names into portable structure for downstream declaration emit.
|
|
24
28
|
*/
|
|
25
|
-
export declare function nodeClass<const Config extends NodeClassInput>(config: Config & Record<Exclude<keyof Config, keyof NodeClassInput>, never>):
|
|
29
|
+
export declare function nodeClass<const Config extends NodeClassInput>(config: Config & Record<Exclude<keyof Config, keyof NodeClassInput>, never>): AuthoredNodeClass<{
|
|
30
|
+
[Key in keyof Config]: Key extends 'properties' | 'methods' | 'policies' ? {
|
|
31
|
+
[Member in keyof NonNullable<Config[Key]>]: NonNullable<Config[Key]>[Member];
|
|
32
|
+
} | 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];
|
|
33
|
+
}>;
|
|
26
34
|
export declare function defineClass(config: NodeInput): NodeClass;
|
|
27
35
|
export declare function defineClass(config: DirectedInput): DirectedEdgeClass;
|
|
28
36
|
export declare function defineClass(config: UndirectedInput): UndirectedEdgeClass;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { KernelSchema as CoreKernelSchema } from '@astrale-os/kernel-core/schema';
|
|
2
2
|
export * from '@astrale-os/kernel-dsl/v1';
|
|
3
|
+
export { stateProperty } from './state-property.js';
|
|
4
|
+
export type { StateProperty } from './state-property.js';
|
|
3
5
|
export { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
4
6
|
export { defineClass, nodeClass } from './class-authoring.js';
|
|
5
|
-
export type { NodeClassInput } from './class-authoring.js';
|
|
7
|
+
export type { AuthoredNodeClass, NodeClassInput } from './class-authoring.js';
|
|
6
8
|
export { error } from './error.js';
|
|
7
9
|
export type { DeclaredErrorDefinition, DeclaredErrorFamily } from './error.js';
|
|
8
10
|
export { classIcon } from './class-icon.js';
|
|
@@ -2,6 +2,7 @@ import { KernelSchema as CoreKernelSchema } from '@astrale-os/kernel-core/schema
|
|
|
2
2
|
/** Canonical Schema authoring, compilation, loading, and resolved Domain surface. */
|
|
3
3
|
import { schema as language } from '@astrale-os/kernel-dsl/v1';
|
|
4
4
|
export * from '@astrale-os/kernel-dsl/v1';
|
|
5
|
+
export { stateProperty } from './state-property.js';
|
|
5
6
|
export { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
6
7
|
export { defineClass, nodeClass } from './class-authoring.js';
|
|
7
8
|
export { error } from './error.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StateMachine } from '@astrale-os/kernel-dsl/v1/language/state';
|
|
2
|
+
import { stateProperty as canonicalStateProperty, type PropertyOptions } from '@astrale-os/kernel-dsl/v1/builder';
|
|
3
|
+
type StatePropertyOptions = Omit<PropertyOptions, 'required'>;
|
|
4
|
+
/** Keep the machine's internal Zod schemas behind a portable public property handle. */
|
|
5
|
+
export interface StateProperty<Machine extends StateMachine, Options extends StatePropertyOptions = Record<never, never>> extends ReturnType<typeof canonicalStateProperty<Machine, Options>> {
|
|
6
|
+
}
|
|
7
|
+
/** Canonical state-property authoring with a portable inferred return type. */
|
|
8
|
+
export declare const stateProperty: <const Machine extends StateMachine, const Options extends StatePropertyOptions = Record<never, never>>(machine: Machine, options?: Options & Record<Exclude<keyof Options, 'description'>, never>) => StateProperty<Machine, {
|
|
9
|
+
[Key in keyof Options]: Options[Key];
|
|
10
|
+
}>;
|
|
11
|
+
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { Graph } from '../../platform/graph/document/index.js';
|
|
2
2
|
import type { Node } from '../../platform/graph/node/index.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ClassRef, CoreRef, FunctionRef, PolicyRef, ViewRef, schema } from '../../platform/schema/index.js';
|
|
4
4
|
import type { DatasetReferences } from './dataset.js';
|
|
5
|
-
type DatasetProjectionRef =
|
|
6
|
-
readonly kind: 'method';
|
|
7
|
-
}>;
|
|
5
|
+
type DatasetProjectionRef = ClassRef | FunctionRef | PolicyRef | ViewRef | CoreRef;
|
|
8
6
|
export type DatasetReferenceInput = DatasetProjectionRef | {
|
|
9
7
|
readonly ref: DatasetProjectionRef;
|
|
10
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/sdk",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.124",
|
|
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.
|
|
237
|
-
"@astrale-os/kernel-core": "0.9.0-beta.
|
|
238
|
-
"@astrale-os/kernel-dsl": "0.2.0-beta.
|
|
239
|
-
"@astrale-os/kernel-protocol": "0.5.0-beta.
|
|
240
|
-
"@astrale-os/kernel-server": "0.5.0-beta.
|
|
236
|
+
"@astrale-os/kernel-client": "0.6.0-beta.57",
|
|
237
|
+
"@astrale-os/kernel-core": "0.9.0-beta.44",
|
|
238
|
+
"@astrale-os/kernel-dsl": "0.2.0-beta.32",
|
|
239
|
+
"@astrale-os/kernel-protocol": "0.5.0-beta.48",
|
|
240
|
+
"@astrale-os/kernel-server": "0.5.0-beta.50",
|
|
241
241
|
"@lucide/icons": "1.34.0",
|
|
242
242
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
243
243
|
"hono": "^4.13.2",
|