@astrale-os/sdk 0.5.0-beta.123 → 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 CHANGED
@@ -1,5 +1,12 @@
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
+
3
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)
4
11
 
5
12
 
@@ -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>): ReturnType<typeof kernelNodeClass<Config>>;
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 {};
@@ -0,0 +1,3 @@
1
+ import { stateProperty as canonicalStateProperty, } from '@astrale-os/kernel-dsl/v1/builder';
2
+ /** Canonical state-property authoring with a portable inferred return type. */
3
+ export const stateProperty = canonicalStateProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/sdk",
3
- "version": "0.5.0-beta.123",
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",