@objectstack/spec 1.0.10 → 1.0.12

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 (147) hide show
  1. package/README.md +41 -1
  2. package/dist/ai/index.d.mts +2 -1
  3. package/dist/ai/index.d.ts +2 -1
  4. package/dist/ai/index.js +2047 -1944
  5. package/dist/ai/index.js.map +1 -1
  6. package/dist/ai/index.mjs +2047 -1944
  7. package/dist/ai/index.mjs.map +1 -1
  8. package/dist/api/index.d.mts +3 -1
  9. package/dist/api/index.d.ts +3 -1
  10. package/dist/api/index.js +2599 -2292
  11. package/dist/api/index.js.map +1 -1
  12. package/dist/api/index.mjs +2587 -2292
  13. package/dist/api/index.mjs.map +1 -1
  14. package/dist/automation/index.d.mts +2 -1
  15. package/dist/automation/index.d.ts +2 -1
  16. package/dist/automation/index.js +83 -0
  17. package/dist/automation/index.js.map +1 -1
  18. package/dist/automation/index.mjs +77 -0
  19. package/dist/automation/index.mjs.map +1 -1
  20. package/dist/contracts/index.d.mts +3 -2
  21. package/dist/contracts/index.d.ts +3 -2
  22. package/dist/data/index.d.mts +3 -2
  23. package/dist/data/index.d.ts +3 -2
  24. package/dist/data/index.js +658 -556
  25. package/dist/data/index.js.map +1 -1
  26. package/dist/data/index.mjs +656 -556
  27. package/dist/data/index.mjs.map +1 -1
  28. package/dist/{driver.zod-lfi00zVT.d.ts → driver.zod-CfGk9GYh.d.ts} +2164 -11
  29. package/dist/{driver.zod-BOM_Etco.d.mts → driver.zod-y1cX6R3c.d.mts} +2164 -11
  30. package/dist/hub/index.d.mts +1 -1
  31. package/dist/hub/index.d.ts +1 -1
  32. package/dist/hub/index.js +789 -724
  33. package/dist/hub/index.js.map +1 -1
  34. package/dist/hub/index.mjs +789 -724
  35. package/dist/hub/index.mjs.map +1 -1
  36. package/dist/{index-C67cfwmW.d.ts → index-B0Hf65bV.d.ts} +13 -5
  37. package/dist/{index-DLcySG7U.d.ts → index-B5pKM0My.d.ts} +335 -4370
  38. package/dist/{index-Os7lItRe.d.mts → index-BA022mg2.d.ts} +6178 -129
  39. package/dist/{index-B5-VbOKg.d.mts → index-BGeLoH2z.d.ts} +4251 -74
  40. package/dist/{index-CH5zloR3.d.ts → index-BwO__aqV.d.ts} +1 -1
  41. package/dist/{index-Dp7GFJ8V.d.mts → index-Cia3JPQ8.d.mts} +13 -5
  42. package/dist/{index-D12rNohm.d.mts → index-CpD1q1FP.d.ts} +35 -18
  43. package/dist/{index-Os7lItRe.d.ts → index-D5RSFPuB.d.mts} +6178 -129
  44. package/dist/{index-CU4m6noq.d.mts → index-DGjpaj0X.d.mts} +1 -1
  45. package/dist/{index-D12rNohm.d.ts → index-Dfn5VXl6.d.mts} +35 -18
  46. package/dist/{index-l6WIlmOD.d.mts → index-Dgybxlky.d.mts} +177 -158
  47. package/dist/{index-l6WIlmOD.d.ts → index-Dgybxlky.d.ts} +177 -158
  48. package/dist/{index-DLcySG7U.d.mts → index-Dpsk8PF4.d.mts} +335 -4370
  49. package/dist/{index-CyognKSZ.d.ts → index-DrNah5E0.d.ts} +1952 -6990
  50. package/dist/{index-DE_lJ11p.d.mts → index-OO84R20k.d.mts} +1952 -6990
  51. package/dist/{index-B5-VbOKg.d.ts → index-upA3Xt04.d.mts} +4251 -74
  52. package/dist/index.d.mts +8072 -1922
  53. package/dist/index.d.ts +8072 -1922
  54. package/dist/index.js +8563 -8249
  55. package/dist/index.js.map +1 -1
  56. package/dist/index.mjs +8563 -8249
  57. package/dist/index.mjs.map +1 -1
  58. package/dist/integration/index.d.mts +1 -1
  59. package/dist/integration/index.d.ts +1 -1
  60. package/dist/kernel/index.d.mts +2 -1
  61. package/dist/kernel/index.d.ts +2 -1
  62. package/dist/kernel/index.js +884 -684
  63. package/dist/kernel/index.js.map +1 -1
  64. package/dist/kernel/index.mjs +870 -684
  65. package/dist/kernel/index.mjs.map +1 -1
  66. package/dist/package-registry.zod-JMcOYNxM.d.mts +21119 -0
  67. package/dist/package-registry.zod-JMcOYNxM.d.ts +21119 -0
  68. package/dist/state-machine.zod-B-lFFSxQ.d.mts +285 -0
  69. package/dist/state-machine.zod-B-lFFSxQ.d.ts +285 -0
  70. package/dist/system/index.d.mts +2 -1
  71. package/dist/system/index.d.ts +2 -1
  72. package/dist/system/index.js +749 -651
  73. package/dist/system/index.js.map +1 -1
  74. package/dist/system/index.mjs +749 -651
  75. package/dist/system/index.mjs.map +1 -1
  76. package/dist/ui/index.d.mts +1 -1
  77. package/dist/ui/index.d.ts +1 -1
  78. package/json-schema/ai/Agent.json +499 -0
  79. package/json-schema/ai/DevOpsAgent.json +499 -0
  80. package/json-schema/ai/FeedbackLoop.json +2188 -186
  81. package/json-schema/ai/Resolution.json +2188 -186
  82. package/json-schema/api/ApiRoutes.json +4 -0
  83. package/json-schema/api/CompileManifestResponse.json +40 -10
  84. package/json-schema/api/DisablePackageRequest.json +18 -0
  85. package/json-schema/api/DisablePackageResponse.json +1521 -0
  86. package/json-schema/api/Discovery.json +4 -0
  87. package/json-schema/api/EnablePackageRequest.json +18 -0
  88. package/json-schema/api/EnablePackageResponse.json +1521 -0
  89. package/json-schema/api/GetDiscoveryResponse.json +4 -0
  90. package/json-schema/api/GetPackageRequest.json +18 -0
  91. package/json-schema/api/GetPackageResponse.json +1518 -0
  92. package/json-schema/api/InstallPackageRequest.json +1483 -0
  93. package/json-schema/api/InstallPackageResponse.json +1521 -0
  94. package/json-schema/api/ListPackagesRequest.json +42 -0
  95. package/json-schema/api/ListPackagesResponse.json +1525 -0
  96. package/json-schema/api/ObjectDefinitionResponse.json +1001 -0
  97. package/json-schema/api/ObjectStackProtocol.json +86 -1
  98. package/json-schema/api/RestApiConfig.json +5 -0
  99. package/json-schema/api/RestServerConfig.json +5 -0
  100. package/json-schema/api/UninstallPackageRequest.json +18 -0
  101. package/json-schema/api/UninstallPackageResponse.json +25 -0
  102. package/json-schema/automation/ActionRef.json +30 -0
  103. package/json-schema/automation/Event.json +24 -0
  104. package/json-schema/automation/Flow.json +1 -0
  105. package/json-schema/automation/FlowNode.json +1 -0
  106. package/json-schema/automation/FlowNodeAction.json +1 -0
  107. package/json-schema/automation/GuardRef.json +30 -0
  108. package/json-schema/automation/StateMachine.json +504 -0
  109. package/json-schema/automation/StateNode.json +324 -0
  110. package/json-schema/automation/Transition.json +73 -0
  111. package/json-schema/data/Object.json +1001 -0
  112. package/json-schema/data/ObjectExtension.json +2376 -0
  113. package/json-schema/data/ObjectOwnershipEnum.json +13 -0
  114. package/json-schema/hub/ComposerResponse.json +40 -10
  115. package/json-schema/kernel/DisablePackageRequest.json +18 -0
  116. package/json-schema/kernel/DisablePackageResponse.json +1521 -0
  117. package/json-schema/kernel/EnablePackageRequest.json +18 -0
  118. package/json-schema/kernel/EnablePackageResponse.json +1521 -0
  119. package/json-schema/kernel/EventBusConfig.json +15 -0
  120. package/json-schema/kernel/EventHandler.json +6 -0
  121. package/json-schema/kernel/EventPersistence.json +3 -0
  122. package/json-schema/kernel/EventRoute.json +3 -0
  123. package/json-schema/kernel/EventWebhookConfig.json +3 -0
  124. package/json-schema/kernel/GetPackageRequest.json +18 -0
  125. package/json-schema/kernel/GetPackageResponse.json +1518 -0
  126. package/json-schema/kernel/InstallPackageRequest.json +1483 -0
  127. package/json-schema/kernel/InstallPackageResponse.json +1521 -0
  128. package/json-schema/kernel/InstalledPackage.json +1509 -0
  129. package/json-schema/kernel/ListPackagesRequest.json +42 -0
  130. package/json-schema/kernel/ListPackagesResponse.json +1525 -0
  131. package/json-schema/kernel/Manifest.json +40 -10
  132. package/json-schema/kernel/PackageStatusEnum.json +16 -0
  133. package/json-schema/kernel/Plugin.json +5 -0
  134. package/json-schema/kernel/PluginContext.json +31 -7
  135. package/json-schema/kernel/PluginLifecycle.json +7 -1
  136. package/json-schema/kernel/RealTimeNotificationConfig.json +3 -0
  137. package/json-schema/kernel/UninstallPackageRequest.json +18 -0
  138. package/json-schema/kernel/UninstallPackageResponse.json +25 -0
  139. package/json-schema/system/ChangeSet.json +2188 -186
  140. package/json-schema/system/CreateObjectOperation.json +1001 -0
  141. package/json-schema/system/MigrationOperation.json +1001 -0
  142. package/package.json +29 -15
  143. package/prompts/create-new-project.md +37 -19
  144. package/dist/{index-I3piy4U4.d.mts → index-BmU_sD1f.d.mts} +8 -8
  145. package/dist/{index-CkhpsEUw.d.ts → index-BnXuc_HO.d.ts} +8 -8
  146. package/dist/{index-CIDI-8zR.d.mts → index-C_NTOcet.d.mts} +98 -98
  147. package/dist/{index-CIDI-8zR.d.ts → index-C_NTOcet.d.ts} +98 -98
@@ -2566,6 +2566,1007 @@
2566
2566
  },
2567
2567
  "description": "Object-level validation rules"
2568
2568
  },
2569
+ "stateMachine": {
2570
+ "type": "object",
2571
+ "properties": {
2572
+ "id": {
2573
+ "type": "string",
2574
+ "minLength": 2,
2575
+ "pattern": "^[a-z][a-z0-9_]*$",
2576
+ "description": "Unique Machine ID"
2577
+ },
2578
+ "description": {
2579
+ "type": "string"
2580
+ },
2581
+ "contextSchema": {
2582
+ "type": "object",
2583
+ "additionalProperties": {},
2584
+ "description": "Zod Schema for the machine context/memory"
2585
+ },
2586
+ "initial": {
2587
+ "type": "string",
2588
+ "description": "Initial State ID"
2589
+ },
2590
+ "states": {
2591
+ "type": "object",
2592
+ "additionalProperties": {
2593
+ "type": "object",
2594
+ "properties": {
2595
+ "type": {
2596
+ "type": "string",
2597
+ "enum": [
2598
+ "atomic",
2599
+ "compound",
2600
+ "parallel",
2601
+ "final",
2602
+ "history"
2603
+ ],
2604
+ "default": "atomic"
2605
+ },
2606
+ "entry": {
2607
+ "type": "array",
2608
+ "items": {
2609
+ "anyOf": [
2610
+ {
2611
+ "type": "string",
2612
+ "description": "Action Name"
2613
+ },
2614
+ {
2615
+ "type": "object",
2616
+ "properties": {
2617
+ "type": {
2618
+ "type": "string"
2619
+ },
2620
+ "params": {
2621
+ "type": "object",
2622
+ "additionalProperties": {}
2623
+ }
2624
+ },
2625
+ "required": [
2626
+ "type"
2627
+ ],
2628
+ "additionalProperties": false
2629
+ }
2630
+ ]
2631
+ },
2632
+ "description": "Actions to run when entering this state"
2633
+ },
2634
+ "exit": {
2635
+ "type": "array",
2636
+ "items": {
2637
+ "anyOf": [
2638
+ {
2639
+ "type": "string",
2640
+ "description": "Action Name"
2641
+ },
2642
+ {
2643
+ "type": "object",
2644
+ "properties": {
2645
+ "type": {
2646
+ "type": "string"
2647
+ },
2648
+ "params": {
2649
+ "type": "object",
2650
+ "additionalProperties": {}
2651
+ }
2652
+ },
2653
+ "required": [
2654
+ "type"
2655
+ ],
2656
+ "additionalProperties": false
2657
+ }
2658
+ ]
2659
+ },
2660
+ "description": "Actions to run when leaving this state"
2661
+ },
2662
+ "on": {
2663
+ "type": "object",
2664
+ "additionalProperties": {
2665
+ "anyOf": [
2666
+ {
2667
+ "type": "string"
2668
+ },
2669
+ {
2670
+ "type": "object",
2671
+ "properties": {
2672
+ "target": {
2673
+ "type": "string",
2674
+ "description": "Target State ID"
2675
+ },
2676
+ "cond": {
2677
+ "anyOf": [
2678
+ {
2679
+ "type": "string",
2680
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2681
+ },
2682
+ {
2683
+ "type": "object",
2684
+ "properties": {
2685
+ "type": {
2686
+ "type": "string"
2687
+ },
2688
+ "params": {
2689
+ "type": "object",
2690
+ "additionalProperties": {}
2691
+ }
2692
+ },
2693
+ "required": [
2694
+ "type"
2695
+ ],
2696
+ "additionalProperties": false
2697
+ }
2698
+ ],
2699
+ "description": "Condition (Guard) required to take this path"
2700
+ },
2701
+ "actions": {
2702
+ "type": "array",
2703
+ "items": {
2704
+ "anyOf": [
2705
+ {
2706
+ "type": "string",
2707
+ "description": "Action Name"
2708
+ },
2709
+ {
2710
+ "type": "object",
2711
+ "properties": {
2712
+ "type": {
2713
+ "type": "string"
2714
+ },
2715
+ "params": {
2716
+ "type": "object",
2717
+ "additionalProperties": {}
2718
+ }
2719
+ },
2720
+ "required": [
2721
+ "type"
2722
+ ],
2723
+ "additionalProperties": false
2724
+ }
2725
+ ]
2726
+ },
2727
+ "description": "Actions to execute during transition"
2728
+ },
2729
+ "description": {
2730
+ "type": "string",
2731
+ "description": "Human readable description of this rule"
2732
+ }
2733
+ },
2734
+ "additionalProperties": false
2735
+ },
2736
+ {
2737
+ "type": "array",
2738
+ "items": {
2739
+ "type": "object",
2740
+ "properties": {
2741
+ "target": {
2742
+ "type": "string",
2743
+ "description": "Target State ID"
2744
+ },
2745
+ "cond": {
2746
+ "anyOf": [
2747
+ {
2748
+ "type": "string",
2749
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2750
+ },
2751
+ {
2752
+ "type": "object",
2753
+ "properties": {
2754
+ "type": {
2755
+ "type": "string"
2756
+ },
2757
+ "params": {
2758
+ "type": "object",
2759
+ "additionalProperties": {}
2760
+ }
2761
+ },
2762
+ "required": [
2763
+ "type"
2764
+ ],
2765
+ "additionalProperties": false
2766
+ }
2767
+ ],
2768
+ "description": "Condition (Guard) required to take this path"
2769
+ },
2770
+ "actions": {
2771
+ "type": "array",
2772
+ "items": {
2773
+ "anyOf": [
2774
+ {
2775
+ "type": "string",
2776
+ "description": "Action Name"
2777
+ },
2778
+ {
2779
+ "type": "object",
2780
+ "properties": {
2781
+ "type": {
2782
+ "type": "string"
2783
+ },
2784
+ "params": {
2785
+ "type": "object",
2786
+ "additionalProperties": {}
2787
+ }
2788
+ },
2789
+ "required": [
2790
+ "type"
2791
+ ],
2792
+ "additionalProperties": false
2793
+ }
2794
+ ]
2795
+ },
2796
+ "description": "Actions to execute during transition"
2797
+ },
2798
+ "description": {
2799
+ "type": "string",
2800
+ "description": "Human readable description of this rule"
2801
+ }
2802
+ },
2803
+ "additionalProperties": false
2804
+ }
2805
+ }
2806
+ ]
2807
+ },
2808
+ "description": "Map of Event Type -> Transition Definition"
2809
+ },
2810
+ "always": {
2811
+ "type": "array",
2812
+ "items": {
2813
+ "type": "object",
2814
+ "properties": {
2815
+ "target": {
2816
+ "type": "string",
2817
+ "description": "Target State ID"
2818
+ },
2819
+ "cond": {
2820
+ "anyOf": [
2821
+ {
2822
+ "type": "string",
2823
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2824
+ },
2825
+ {
2826
+ "type": "object",
2827
+ "properties": {
2828
+ "type": {
2829
+ "type": "string"
2830
+ },
2831
+ "params": {
2832
+ "type": "object",
2833
+ "additionalProperties": {}
2834
+ }
2835
+ },
2836
+ "required": [
2837
+ "type"
2838
+ ],
2839
+ "additionalProperties": false
2840
+ }
2841
+ ],
2842
+ "description": "Condition (Guard) required to take this path"
2843
+ },
2844
+ "actions": {
2845
+ "type": "array",
2846
+ "items": {
2847
+ "anyOf": [
2848
+ {
2849
+ "type": "string",
2850
+ "description": "Action Name"
2851
+ },
2852
+ {
2853
+ "type": "object",
2854
+ "properties": {
2855
+ "type": {
2856
+ "type": "string"
2857
+ },
2858
+ "params": {
2859
+ "type": "object",
2860
+ "additionalProperties": {}
2861
+ }
2862
+ },
2863
+ "required": [
2864
+ "type"
2865
+ ],
2866
+ "additionalProperties": false
2867
+ }
2868
+ ]
2869
+ },
2870
+ "description": "Actions to execute during transition"
2871
+ },
2872
+ "description": {
2873
+ "type": "string",
2874
+ "description": "Human readable description of this rule"
2875
+ }
2876
+ },
2877
+ "additionalProperties": false
2878
+ }
2879
+ },
2880
+ "initial": {
2881
+ "type": "string",
2882
+ "description": "Initial child state (if compound)"
2883
+ },
2884
+ "states": {
2885
+ "type": "object",
2886
+ "additionalProperties": {}
2887
+ },
2888
+ "meta": {
2889
+ "type": "object",
2890
+ "properties": {
2891
+ "label": {
2892
+ "type": "string"
2893
+ },
2894
+ "description": {
2895
+ "type": "string"
2896
+ },
2897
+ "color": {
2898
+ "type": "string"
2899
+ },
2900
+ "aiInstructions": {
2901
+ "type": "string",
2902
+ "description": "Specific instructions for AI when in this state"
2903
+ }
2904
+ },
2905
+ "additionalProperties": false
2906
+ }
2907
+ },
2908
+ "additionalProperties": false
2909
+ },
2910
+ "description": "State Nodes"
2911
+ },
2912
+ "on": {
2913
+ "type": "object",
2914
+ "additionalProperties": {
2915
+ "anyOf": [
2916
+ {
2917
+ "type": "string"
2918
+ },
2919
+ {
2920
+ "type": "object",
2921
+ "properties": {
2922
+ "target": {
2923
+ "type": "string",
2924
+ "description": "Target State ID"
2925
+ },
2926
+ "cond": {
2927
+ "anyOf": [
2928
+ {
2929
+ "type": "string",
2930
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2931
+ },
2932
+ {
2933
+ "type": "object",
2934
+ "properties": {
2935
+ "type": {
2936
+ "type": "string"
2937
+ },
2938
+ "params": {
2939
+ "type": "object",
2940
+ "additionalProperties": {}
2941
+ }
2942
+ },
2943
+ "required": [
2944
+ "type"
2945
+ ],
2946
+ "additionalProperties": false
2947
+ }
2948
+ ],
2949
+ "description": "Condition (Guard) required to take this path"
2950
+ },
2951
+ "actions": {
2952
+ "type": "array",
2953
+ "items": {
2954
+ "anyOf": [
2955
+ {
2956
+ "type": "string",
2957
+ "description": "Action Name"
2958
+ },
2959
+ {
2960
+ "type": "object",
2961
+ "properties": {
2962
+ "type": {
2963
+ "type": "string"
2964
+ },
2965
+ "params": {
2966
+ "type": "object",
2967
+ "additionalProperties": {}
2968
+ }
2969
+ },
2970
+ "required": [
2971
+ "type"
2972
+ ],
2973
+ "additionalProperties": false
2974
+ }
2975
+ ]
2976
+ },
2977
+ "description": "Actions to execute during transition"
2978
+ },
2979
+ "description": {
2980
+ "type": "string",
2981
+ "description": "Human readable description of this rule"
2982
+ }
2983
+ },
2984
+ "additionalProperties": false
2985
+ },
2986
+ {
2987
+ "type": "array",
2988
+ "items": {
2989
+ "type": "object",
2990
+ "properties": {
2991
+ "target": {
2992
+ "type": "string",
2993
+ "description": "Target State ID"
2994
+ },
2995
+ "cond": {
2996
+ "anyOf": [
2997
+ {
2998
+ "type": "string",
2999
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3000
+ },
3001
+ {
3002
+ "type": "object",
3003
+ "properties": {
3004
+ "type": {
3005
+ "type": "string"
3006
+ },
3007
+ "params": {
3008
+ "type": "object",
3009
+ "additionalProperties": {}
3010
+ }
3011
+ },
3012
+ "required": [
3013
+ "type"
3014
+ ],
3015
+ "additionalProperties": false
3016
+ }
3017
+ ],
3018
+ "description": "Condition (Guard) required to take this path"
3019
+ },
3020
+ "actions": {
3021
+ "type": "array",
3022
+ "items": {
3023
+ "anyOf": [
3024
+ {
3025
+ "type": "string",
3026
+ "description": "Action Name"
3027
+ },
3028
+ {
3029
+ "type": "object",
3030
+ "properties": {
3031
+ "type": {
3032
+ "type": "string"
3033
+ },
3034
+ "params": {
3035
+ "type": "object",
3036
+ "additionalProperties": {}
3037
+ }
3038
+ },
3039
+ "required": [
3040
+ "type"
3041
+ ],
3042
+ "additionalProperties": false
3043
+ }
3044
+ ]
3045
+ },
3046
+ "description": "Actions to execute during transition"
3047
+ },
3048
+ "description": {
3049
+ "type": "string",
3050
+ "description": "Human readable description of this rule"
3051
+ }
3052
+ },
3053
+ "additionalProperties": false
3054
+ }
3055
+ }
3056
+ ]
3057
+ }
3058
+ }
3059
+ },
3060
+ "required": [
3061
+ "id",
3062
+ "initial",
3063
+ "states"
3064
+ ],
3065
+ "additionalProperties": false,
3066
+ "description": "Single state machine for record lifecycle (shorthand)"
3067
+ },
3068
+ "stateMachines": {
3069
+ "type": "object",
3070
+ "additionalProperties": {
3071
+ "type": "object",
3072
+ "properties": {
3073
+ "id": {
3074
+ "type": "string",
3075
+ "minLength": 2,
3076
+ "pattern": "^[a-z][a-z0-9_]*$",
3077
+ "description": "Unique Machine ID"
3078
+ },
3079
+ "description": {
3080
+ "type": "string"
3081
+ },
3082
+ "contextSchema": {
3083
+ "type": "object",
3084
+ "additionalProperties": {},
3085
+ "description": "Zod Schema for the machine context/memory"
3086
+ },
3087
+ "initial": {
3088
+ "type": "string",
3089
+ "description": "Initial State ID"
3090
+ },
3091
+ "states": {
3092
+ "type": "object",
3093
+ "additionalProperties": {
3094
+ "type": "object",
3095
+ "properties": {
3096
+ "type": {
3097
+ "type": "string",
3098
+ "enum": [
3099
+ "atomic",
3100
+ "compound",
3101
+ "parallel",
3102
+ "final",
3103
+ "history"
3104
+ ],
3105
+ "default": "atomic"
3106
+ },
3107
+ "entry": {
3108
+ "type": "array",
3109
+ "items": {
3110
+ "anyOf": [
3111
+ {
3112
+ "type": "string",
3113
+ "description": "Action Name"
3114
+ },
3115
+ {
3116
+ "type": "object",
3117
+ "properties": {
3118
+ "type": {
3119
+ "type": "string"
3120
+ },
3121
+ "params": {
3122
+ "type": "object",
3123
+ "additionalProperties": {}
3124
+ }
3125
+ },
3126
+ "required": [
3127
+ "type"
3128
+ ],
3129
+ "additionalProperties": false
3130
+ }
3131
+ ]
3132
+ },
3133
+ "description": "Actions to run when entering this state"
3134
+ },
3135
+ "exit": {
3136
+ "type": "array",
3137
+ "items": {
3138
+ "anyOf": [
3139
+ {
3140
+ "type": "string",
3141
+ "description": "Action Name"
3142
+ },
3143
+ {
3144
+ "type": "object",
3145
+ "properties": {
3146
+ "type": {
3147
+ "type": "string"
3148
+ },
3149
+ "params": {
3150
+ "type": "object",
3151
+ "additionalProperties": {}
3152
+ }
3153
+ },
3154
+ "required": [
3155
+ "type"
3156
+ ],
3157
+ "additionalProperties": false
3158
+ }
3159
+ ]
3160
+ },
3161
+ "description": "Actions to run when leaving this state"
3162
+ },
3163
+ "on": {
3164
+ "type": "object",
3165
+ "additionalProperties": {
3166
+ "anyOf": [
3167
+ {
3168
+ "type": "string"
3169
+ },
3170
+ {
3171
+ "type": "object",
3172
+ "properties": {
3173
+ "target": {
3174
+ "type": "string",
3175
+ "description": "Target State ID"
3176
+ },
3177
+ "cond": {
3178
+ "anyOf": [
3179
+ {
3180
+ "type": "string",
3181
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3182
+ },
3183
+ {
3184
+ "type": "object",
3185
+ "properties": {
3186
+ "type": {
3187
+ "type": "string"
3188
+ },
3189
+ "params": {
3190
+ "type": "object",
3191
+ "additionalProperties": {}
3192
+ }
3193
+ },
3194
+ "required": [
3195
+ "type"
3196
+ ],
3197
+ "additionalProperties": false
3198
+ }
3199
+ ],
3200
+ "description": "Condition (Guard) required to take this path"
3201
+ },
3202
+ "actions": {
3203
+ "type": "array",
3204
+ "items": {
3205
+ "anyOf": [
3206
+ {
3207
+ "type": "string",
3208
+ "description": "Action Name"
3209
+ },
3210
+ {
3211
+ "type": "object",
3212
+ "properties": {
3213
+ "type": {
3214
+ "type": "string"
3215
+ },
3216
+ "params": {
3217
+ "type": "object",
3218
+ "additionalProperties": {}
3219
+ }
3220
+ },
3221
+ "required": [
3222
+ "type"
3223
+ ],
3224
+ "additionalProperties": false
3225
+ }
3226
+ ]
3227
+ },
3228
+ "description": "Actions to execute during transition"
3229
+ },
3230
+ "description": {
3231
+ "type": "string",
3232
+ "description": "Human readable description of this rule"
3233
+ }
3234
+ },
3235
+ "additionalProperties": false
3236
+ },
3237
+ {
3238
+ "type": "array",
3239
+ "items": {
3240
+ "type": "object",
3241
+ "properties": {
3242
+ "target": {
3243
+ "type": "string",
3244
+ "description": "Target State ID"
3245
+ },
3246
+ "cond": {
3247
+ "anyOf": [
3248
+ {
3249
+ "type": "string",
3250
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3251
+ },
3252
+ {
3253
+ "type": "object",
3254
+ "properties": {
3255
+ "type": {
3256
+ "type": "string"
3257
+ },
3258
+ "params": {
3259
+ "type": "object",
3260
+ "additionalProperties": {}
3261
+ }
3262
+ },
3263
+ "required": [
3264
+ "type"
3265
+ ],
3266
+ "additionalProperties": false
3267
+ }
3268
+ ],
3269
+ "description": "Condition (Guard) required to take this path"
3270
+ },
3271
+ "actions": {
3272
+ "type": "array",
3273
+ "items": {
3274
+ "anyOf": [
3275
+ {
3276
+ "type": "string",
3277
+ "description": "Action Name"
3278
+ },
3279
+ {
3280
+ "type": "object",
3281
+ "properties": {
3282
+ "type": {
3283
+ "type": "string"
3284
+ },
3285
+ "params": {
3286
+ "type": "object",
3287
+ "additionalProperties": {}
3288
+ }
3289
+ },
3290
+ "required": [
3291
+ "type"
3292
+ ],
3293
+ "additionalProperties": false
3294
+ }
3295
+ ]
3296
+ },
3297
+ "description": "Actions to execute during transition"
3298
+ },
3299
+ "description": {
3300
+ "type": "string",
3301
+ "description": "Human readable description of this rule"
3302
+ }
3303
+ },
3304
+ "additionalProperties": false
3305
+ }
3306
+ }
3307
+ ]
3308
+ },
3309
+ "description": "Map of Event Type -> Transition Definition"
3310
+ },
3311
+ "always": {
3312
+ "type": "array",
3313
+ "items": {
3314
+ "type": "object",
3315
+ "properties": {
3316
+ "target": {
3317
+ "type": "string",
3318
+ "description": "Target State ID"
3319
+ },
3320
+ "cond": {
3321
+ "anyOf": [
3322
+ {
3323
+ "type": "string",
3324
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3325
+ },
3326
+ {
3327
+ "type": "object",
3328
+ "properties": {
3329
+ "type": {
3330
+ "type": "string"
3331
+ },
3332
+ "params": {
3333
+ "type": "object",
3334
+ "additionalProperties": {}
3335
+ }
3336
+ },
3337
+ "required": [
3338
+ "type"
3339
+ ],
3340
+ "additionalProperties": false
3341
+ }
3342
+ ],
3343
+ "description": "Condition (Guard) required to take this path"
3344
+ },
3345
+ "actions": {
3346
+ "type": "array",
3347
+ "items": {
3348
+ "anyOf": [
3349
+ {
3350
+ "type": "string",
3351
+ "description": "Action Name"
3352
+ },
3353
+ {
3354
+ "type": "object",
3355
+ "properties": {
3356
+ "type": {
3357
+ "type": "string"
3358
+ },
3359
+ "params": {
3360
+ "type": "object",
3361
+ "additionalProperties": {}
3362
+ }
3363
+ },
3364
+ "required": [
3365
+ "type"
3366
+ ],
3367
+ "additionalProperties": false
3368
+ }
3369
+ ]
3370
+ },
3371
+ "description": "Actions to execute during transition"
3372
+ },
3373
+ "description": {
3374
+ "type": "string",
3375
+ "description": "Human readable description of this rule"
3376
+ }
3377
+ },
3378
+ "additionalProperties": false
3379
+ }
3380
+ },
3381
+ "initial": {
3382
+ "type": "string",
3383
+ "description": "Initial child state (if compound)"
3384
+ },
3385
+ "states": {
3386
+ "type": "object",
3387
+ "additionalProperties": {}
3388
+ },
3389
+ "meta": {
3390
+ "type": "object",
3391
+ "properties": {
3392
+ "label": {
3393
+ "type": "string"
3394
+ },
3395
+ "description": {
3396
+ "type": "string"
3397
+ },
3398
+ "color": {
3399
+ "type": "string"
3400
+ },
3401
+ "aiInstructions": {
3402
+ "type": "string",
3403
+ "description": "Specific instructions for AI when in this state"
3404
+ }
3405
+ },
3406
+ "additionalProperties": false
3407
+ }
3408
+ },
3409
+ "additionalProperties": false
3410
+ },
3411
+ "description": "State Nodes"
3412
+ },
3413
+ "on": {
3414
+ "type": "object",
3415
+ "additionalProperties": {
3416
+ "anyOf": [
3417
+ {
3418
+ "type": "string"
3419
+ },
3420
+ {
3421
+ "type": "object",
3422
+ "properties": {
3423
+ "target": {
3424
+ "type": "string",
3425
+ "description": "Target State ID"
3426
+ },
3427
+ "cond": {
3428
+ "anyOf": [
3429
+ {
3430
+ "type": "string",
3431
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3432
+ },
3433
+ {
3434
+ "type": "object",
3435
+ "properties": {
3436
+ "type": {
3437
+ "type": "string"
3438
+ },
3439
+ "params": {
3440
+ "type": "object",
3441
+ "additionalProperties": {}
3442
+ }
3443
+ },
3444
+ "required": [
3445
+ "type"
3446
+ ],
3447
+ "additionalProperties": false
3448
+ }
3449
+ ],
3450
+ "description": "Condition (Guard) required to take this path"
3451
+ },
3452
+ "actions": {
3453
+ "type": "array",
3454
+ "items": {
3455
+ "anyOf": [
3456
+ {
3457
+ "type": "string",
3458
+ "description": "Action Name"
3459
+ },
3460
+ {
3461
+ "type": "object",
3462
+ "properties": {
3463
+ "type": {
3464
+ "type": "string"
3465
+ },
3466
+ "params": {
3467
+ "type": "object",
3468
+ "additionalProperties": {}
3469
+ }
3470
+ },
3471
+ "required": [
3472
+ "type"
3473
+ ],
3474
+ "additionalProperties": false
3475
+ }
3476
+ ]
3477
+ },
3478
+ "description": "Actions to execute during transition"
3479
+ },
3480
+ "description": {
3481
+ "type": "string",
3482
+ "description": "Human readable description of this rule"
3483
+ }
3484
+ },
3485
+ "additionalProperties": false
3486
+ },
3487
+ {
3488
+ "type": "array",
3489
+ "items": {
3490
+ "type": "object",
3491
+ "properties": {
3492
+ "target": {
3493
+ "type": "string",
3494
+ "description": "Target State ID"
3495
+ },
3496
+ "cond": {
3497
+ "anyOf": [
3498
+ {
3499
+ "type": "string",
3500
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3501
+ },
3502
+ {
3503
+ "type": "object",
3504
+ "properties": {
3505
+ "type": {
3506
+ "type": "string"
3507
+ },
3508
+ "params": {
3509
+ "type": "object",
3510
+ "additionalProperties": {}
3511
+ }
3512
+ },
3513
+ "required": [
3514
+ "type"
3515
+ ],
3516
+ "additionalProperties": false
3517
+ }
3518
+ ],
3519
+ "description": "Condition (Guard) required to take this path"
3520
+ },
3521
+ "actions": {
3522
+ "type": "array",
3523
+ "items": {
3524
+ "anyOf": [
3525
+ {
3526
+ "type": "string",
3527
+ "description": "Action Name"
3528
+ },
3529
+ {
3530
+ "type": "object",
3531
+ "properties": {
3532
+ "type": {
3533
+ "type": "string"
3534
+ },
3535
+ "params": {
3536
+ "type": "object",
3537
+ "additionalProperties": {}
3538
+ }
3539
+ },
3540
+ "required": [
3541
+ "type"
3542
+ ],
3543
+ "additionalProperties": false
3544
+ }
3545
+ ]
3546
+ },
3547
+ "description": "Actions to execute during transition"
3548
+ },
3549
+ "description": {
3550
+ "type": "string",
3551
+ "description": "Human readable description of this rule"
3552
+ }
3553
+ },
3554
+ "additionalProperties": false
3555
+ }
3556
+ }
3557
+ ]
3558
+ }
3559
+ }
3560
+ },
3561
+ "required": [
3562
+ "id",
3563
+ "initial",
3564
+ "states"
3565
+ ],
3566
+ "additionalProperties": false
3567
+ },
3568
+ "description": "Named state machines for parallel lifecycles (e.g., status, payment, approval)"
3569
+ },
2569
3570
  "titleFormat": {
2570
3571
  "type": "string",
2571
3572
  "description": "Title expression (e.g. \"{name} - {code}\"). Overrides nameField."