@objectstack/spec 1.0.11 → 1.1.0

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
@@ -2559,6 +2559,1007 @@
2559
2559
  },
2560
2560
  "description": "Object-level validation rules"
2561
2561
  },
2562
+ "stateMachine": {
2563
+ "type": "object",
2564
+ "properties": {
2565
+ "id": {
2566
+ "type": "string",
2567
+ "minLength": 2,
2568
+ "pattern": "^[a-z][a-z0-9_]*$",
2569
+ "description": "Unique Machine ID"
2570
+ },
2571
+ "description": {
2572
+ "type": "string"
2573
+ },
2574
+ "contextSchema": {
2575
+ "type": "object",
2576
+ "additionalProperties": {},
2577
+ "description": "Zod Schema for the machine context/memory"
2578
+ },
2579
+ "initial": {
2580
+ "type": "string",
2581
+ "description": "Initial State ID"
2582
+ },
2583
+ "states": {
2584
+ "type": "object",
2585
+ "additionalProperties": {
2586
+ "type": "object",
2587
+ "properties": {
2588
+ "type": {
2589
+ "type": "string",
2590
+ "enum": [
2591
+ "atomic",
2592
+ "compound",
2593
+ "parallel",
2594
+ "final",
2595
+ "history"
2596
+ ],
2597
+ "default": "atomic"
2598
+ },
2599
+ "entry": {
2600
+ "type": "array",
2601
+ "items": {
2602
+ "anyOf": [
2603
+ {
2604
+ "type": "string",
2605
+ "description": "Action Name"
2606
+ },
2607
+ {
2608
+ "type": "object",
2609
+ "properties": {
2610
+ "type": {
2611
+ "type": "string"
2612
+ },
2613
+ "params": {
2614
+ "type": "object",
2615
+ "additionalProperties": {}
2616
+ }
2617
+ },
2618
+ "required": [
2619
+ "type"
2620
+ ],
2621
+ "additionalProperties": false
2622
+ }
2623
+ ]
2624
+ },
2625
+ "description": "Actions to run when entering this state"
2626
+ },
2627
+ "exit": {
2628
+ "type": "array",
2629
+ "items": {
2630
+ "anyOf": [
2631
+ {
2632
+ "type": "string",
2633
+ "description": "Action Name"
2634
+ },
2635
+ {
2636
+ "type": "object",
2637
+ "properties": {
2638
+ "type": {
2639
+ "type": "string"
2640
+ },
2641
+ "params": {
2642
+ "type": "object",
2643
+ "additionalProperties": {}
2644
+ }
2645
+ },
2646
+ "required": [
2647
+ "type"
2648
+ ],
2649
+ "additionalProperties": false
2650
+ }
2651
+ ]
2652
+ },
2653
+ "description": "Actions to run when leaving this state"
2654
+ },
2655
+ "on": {
2656
+ "type": "object",
2657
+ "additionalProperties": {
2658
+ "anyOf": [
2659
+ {
2660
+ "type": "string"
2661
+ },
2662
+ {
2663
+ "type": "object",
2664
+ "properties": {
2665
+ "target": {
2666
+ "type": "string",
2667
+ "description": "Target State ID"
2668
+ },
2669
+ "cond": {
2670
+ "anyOf": [
2671
+ {
2672
+ "type": "string",
2673
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2674
+ },
2675
+ {
2676
+ "type": "object",
2677
+ "properties": {
2678
+ "type": {
2679
+ "type": "string"
2680
+ },
2681
+ "params": {
2682
+ "type": "object",
2683
+ "additionalProperties": {}
2684
+ }
2685
+ },
2686
+ "required": [
2687
+ "type"
2688
+ ],
2689
+ "additionalProperties": false
2690
+ }
2691
+ ],
2692
+ "description": "Condition (Guard) required to take this path"
2693
+ },
2694
+ "actions": {
2695
+ "type": "array",
2696
+ "items": {
2697
+ "anyOf": [
2698
+ {
2699
+ "type": "string",
2700
+ "description": "Action Name"
2701
+ },
2702
+ {
2703
+ "type": "object",
2704
+ "properties": {
2705
+ "type": {
2706
+ "type": "string"
2707
+ },
2708
+ "params": {
2709
+ "type": "object",
2710
+ "additionalProperties": {}
2711
+ }
2712
+ },
2713
+ "required": [
2714
+ "type"
2715
+ ],
2716
+ "additionalProperties": false
2717
+ }
2718
+ ]
2719
+ },
2720
+ "description": "Actions to execute during transition"
2721
+ },
2722
+ "description": {
2723
+ "type": "string",
2724
+ "description": "Human readable description of this rule"
2725
+ }
2726
+ },
2727
+ "additionalProperties": false
2728
+ },
2729
+ {
2730
+ "type": "array",
2731
+ "items": {
2732
+ "type": "object",
2733
+ "properties": {
2734
+ "target": {
2735
+ "type": "string",
2736
+ "description": "Target State ID"
2737
+ },
2738
+ "cond": {
2739
+ "anyOf": [
2740
+ {
2741
+ "type": "string",
2742
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2743
+ },
2744
+ {
2745
+ "type": "object",
2746
+ "properties": {
2747
+ "type": {
2748
+ "type": "string"
2749
+ },
2750
+ "params": {
2751
+ "type": "object",
2752
+ "additionalProperties": {}
2753
+ }
2754
+ },
2755
+ "required": [
2756
+ "type"
2757
+ ],
2758
+ "additionalProperties": false
2759
+ }
2760
+ ],
2761
+ "description": "Condition (Guard) required to take this path"
2762
+ },
2763
+ "actions": {
2764
+ "type": "array",
2765
+ "items": {
2766
+ "anyOf": [
2767
+ {
2768
+ "type": "string",
2769
+ "description": "Action Name"
2770
+ },
2771
+ {
2772
+ "type": "object",
2773
+ "properties": {
2774
+ "type": {
2775
+ "type": "string"
2776
+ },
2777
+ "params": {
2778
+ "type": "object",
2779
+ "additionalProperties": {}
2780
+ }
2781
+ },
2782
+ "required": [
2783
+ "type"
2784
+ ],
2785
+ "additionalProperties": false
2786
+ }
2787
+ ]
2788
+ },
2789
+ "description": "Actions to execute during transition"
2790
+ },
2791
+ "description": {
2792
+ "type": "string",
2793
+ "description": "Human readable description of this rule"
2794
+ }
2795
+ },
2796
+ "additionalProperties": false
2797
+ }
2798
+ }
2799
+ ]
2800
+ },
2801
+ "description": "Map of Event Type -> Transition Definition"
2802
+ },
2803
+ "always": {
2804
+ "type": "array",
2805
+ "items": {
2806
+ "type": "object",
2807
+ "properties": {
2808
+ "target": {
2809
+ "type": "string",
2810
+ "description": "Target State ID"
2811
+ },
2812
+ "cond": {
2813
+ "anyOf": [
2814
+ {
2815
+ "type": "string",
2816
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2817
+ },
2818
+ {
2819
+ "type": "object",
2820
+ "properties": {
2821
+ "type": {
2822
+ "type": "string"
2823
+ },
2824
+ "params": {
2825
+ "type": "object",
2826
+ "additionalProperties": {}
2827
+ }
2828
+ },
2829
+ "required": [
2830
+ "type"
2831
+ ],
2832
+ "additionalProperties": false
2833
+ }
2834
+ ],
2835
+ "description": "Condition (Guard) required to take this path"
2836
+ },
2837
+ "actions": {
2838
+ "type": "array",
2839
+ "items": {
2840
+ "anyOf": [
2841
+ {
2842
+ "type": "string",
2843
+ "description": "Action Name"
2844
+ },
2845
+ {
2846
+ "type": "object",
2847
+ "properties": {
2848
+ "type": {
2849
+ "type": "string"
2850
+ },
2851
+ "params": {
2852
+ "type": "object",
2853
+ "additionalProperties": {}
2854
+ }
2855
+ },
2856
+ "required": [
2857
+ "type"
2858
+ ],
2859
+ "additionalProperties": false
2860
+ }
2861
+ ]
2862
+ },
2863
+ "description": "Actions to execute during transition"
2864
+ },
2865
+ "description": {
2866
+ "type": "string",
2867
+ "description": "Human readable description of this rule"
2868
+ }
2869
+ },
2870
+ "additionalProperties": false
2871
+ }
2872
+ },
2873
+ "initial": {
2874
+ "type": "string",
2875
+ "description": "Initial child state (if compound)"
2876
+ },
2877
+ "states": {
2878
+ "type": "object",
2879
+ "additionalProperties": {}
2880
+ },
2881
+ "meta": {
2882
+ "type": "object",
2883
+ "properties": {
2884
+ "label": {
2885
+ "type": "string"
2886
+ },
2887
+ "description": {
2888
+ "type": "string"
2889
+ },
2890
+ "color": {
2891
+ "type": "string"
2892
+ },
2893
+ "aiInstructions": {
2894
+ "type": "string",
2895
+ "description": "Specific instructions for AI when in this state"
2896
+ }
2897
+ },
2898
+ "additionalProperties": false
2899
+ }
2900
+ },
2901
+ "additionalProperties": false
2902
+ },
2903
+ "description": "State Nodes"
2904
+ },
2905
+ "on": {
2906
+ "type": "object",
2907
+ "additionalProperties": {
2908
+ "anyOf": [
2909
+ {
2910
+ "type": "string"
2911
+ },
2912
+ {
2913
+ "type": "object",
2914
+ "properties": {
2915
+ "target": {
2916
+ "type": "string",
2917
+ "description": "Target State ID"
2918
+ },
2919
+ "cond": {
2920
+ "anyOf": [
2921
+ {
2922
+ "type": "string",
2923
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2924
+ },
2925
+ {
2926
+ "type": "object",
2927
+ "properties": {
2928
+ "type": {
2929
+ "type": "string"
2930
+ },
2931
+ "params": {
2932
+ "type": "object",
2933
+ "additionalProperties": {}
2934
+ }
2935
+ },
2936
+ "required": [
2937
+ "type"
2938
+ ],
2939
+ "additionalProperties": false
2940
+ }
2941
+ ],
2942
+ "description": "Condition (Guard) required to take this path"
2943
+ },
2944
+ "actions": {
2945
+ "type": "array",
2946
+ "items": {
2947
+ "anyOf": [
2948
+ {
2949
+ "type": "string",
2950
+ "description": "Action Name"
2951
+ },
2952
+ {
2953
+ "type": "object",
2954
+ "properties": {
2955
+ "type": {
2956
+ "type": "string"
2957
+ },
2958
+ "params": {
2959
+ "type": "object",
2960
+ "additionalProperties": {}
2961
+ }
2962
+ },
2963
+ "required": [
2964
+ "type"
2965
+ ],
2966
+ "additionalProperties": false
2967
+ }
2968
+ ]
2969
+ },
2970
+ "description": "Actions to execute during transition"
2971
+ },
2972
+ "description": {
2973
+ "type": "string",
2974
+ "description": "Human readable description of this rule"
2975
+ }
2976
+ },
2977
+ "additionalProperties": false
2978
+ },
2979
+ {
2980
+ "type": "array",
2981
+ "items": {
2982
+ "type": "object",
2983
+ "properties": {
2984
+ "target": {
2985
+ "type": "string",
2986
+ "description": "Target State ID"
2987
+ },
2988
+ "cond": {
2989
+ "anyOf": [
2990
+ {
2991
+ "type": "string",
2992
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
2993
+ },
2994
+ {
2995
+ "type": "object",
2996
+ "properties": {
2997
+ "type": {
2998
+ "type": "string"
2999
+ },
3000
+ "params": {
3001
+ "type": "object",
3002
+ "additionalProperties": {}
3003
+ }
3004
+ },
3005
+ "required": [
3006
+ "type"
3007
+ ],
3008
+ "additionalProperties": false
3009
+ }
3010
+ ],
3011
+ "description": "Condition (Guard) required to take this path"
3012
+ },
3013
+ "actions": {
3014
+ "type": "array",
3015
+ "items": {
3016
+ "anyOf": [
3017
+ {
3018
+ "type": "string",
3019
+ "description": "Action Name"
3020
+ },
3021
+ {
3022
+ "type": "object",
3023
+ "properties": {
3024
+ "type": {
3025
+ "type": "string"
3026
+ },
3027
+ "params": {
3028
+ "type": "object",
3029
+ "additionalProperties": {}
3030
+ }
3031
+ },
3032
+ "required": [
3033
+ "type"
3034
+ ],
3035
+ "additionalProperties": false
3036
+ }
3037
+ ]
3038
+ },
3039
+ "description": "Actions to execute during transition"
3040
+ },
3041
+ "description": {
3042
+ "type": "string",
3043
+ "description": "Human readable description of this rule"
3044
+ }
3045
+ },
3046
+ "additionalProperties": false
3047
+ }
3048
+ }
3049
+ ]
3050
+ }
3051
+ }
3052
+ },
3053
+ "required": [
3054
+ "id",
3055
+ "initial",
3056
+ "states"
3057
+ ],
3058
+ "additionalProperties": false,
3059
+ "description": "Single state machine for record lifecycle (shorthand)"
3060
+ },
3061
+ "stateMachines": {
3062
+ "type": "object",
3063
+ "additionalProperties": {
3064
+ "type": "object",
3065
+ "properties": {
3066
+ "id": {
3067
+ "type": "string",
3068
+ "minLength": 2,
3069
+ "pattern": "^[a-z][a-z0-9_]*$",
3070
+ "description": "Unique Machine ID"
3071
+ },
3072
+ "description": {
3073
+ "type": "string"
3074
+ },
3075
+ "contextSchema": {
3076
+ "type": "object",
3077
+ "additionalProperties": {},
3078
+ "description": "Zod Schema for the machine context/memory"
3079
+ },
3080
+ "initial": {
3081
+ "type": "string",
3082
+ "description": "Initial State ID"
3083
+ },
3084
+ "states": {
3085
+ "type": "object",
3086
+ "additionalProperties": {
3087
+ "type": "object",
3088
+ "properties": {
3089
+ "type": {
3090
+ "type": "string",
3091
+ "enum": [
3092
+ "atomic",
3093
+ "compound",
3094
+ "parallel",
3095
+ "final",
3096
+ "history"
3097
+ ],
3098
+ "default": "atomic"
3099
+ },
3100
+ "entry": {
3101
+ "type": "array",
3102
+ "items": {
3103
+ "anyOf": [
3104
+ {
3105
+ "type": "string",
3106
+ "description": "Action Name"
3107
+ },
3108
+ {
3109
+ "type": "object",
3110
+ "properties": {
3111
+ "type": {
3112
+ "type": "string"
3113
+ },
3114
+ "params": {
3115
+ "type": "object",
3116
+ "additionalProperties": {}
3117
+ }
3118
+ },
3119
+ "required": [
3120
+ "type"
3121
+ ],
3122
+ "additionalProperties": false
3123
+ }
3124
+ ]
3125
+ },
3126
+ "description": "Actions to run when entering this state"
3127
+ },
3128
+ "exit": {
3129
+ "type": "array",
3130
+ "items": {
3131
+ "anyOf": [
3132
+ {
3133
+ "type": "string",
3134
+ "description": "Action Name"
3135
+ },
3136
+ {
3137
+ "type": "object",
3138
+ "properties": {
3139
+ "type": {
3140
+ "type": "string"
3141
+ },
3142
+ "params": {
3143
+ "type": "object",
3144
+ "additionalProperties": {}
3145
+ }
3146
+ },
3147
+ "required": [
3148
+ "type"
3149
+ ],
3150
+ "additionalProperties": false
3151
+ }
3152
+ ]
3153
+ },
3154
+ "description": "Actions to run when leaving this state"
3155
+ },
3156
+ "on": {
3157
+ "type": "object",
3158
+ "additionalProperties": {
3159
+ "anyOf": [
3160
+ {
3161
+ "type": "string"
3162
+ },
3163
+ {
3164
+ "type": "object",
3165
+ "properties": {
3166
+ "target": {
3167
+ "type": "string",
3168
+ "description": "Target State ID"
3169
+ },
3170
+ "cond": {
3171
+ "anyOf": [
3172
+ {
3173
+ "type": "string",
3174
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3175
+ },
3176
+ {
3177
+ "type": "object",
3178
+ "properties": {
3179
+ "type": {
3180
+ "type": "string"
3181
+ },
3182
+ "params": {
3183
+ "type": "object",
3184
+ "additionalProperties": {}
3185
+ }
3186
+ },
3187
+ "required": [
3188
+ "type"
3189
+ ],
3190
+ "additionalProperties": false
3191
+ }
3192
+ ],
3193
+ "description": "Condition (Guard) required to take this path"
3194
+ },
3195
+ "actions": {
3196
+ "type": "array",
3197
+ "items": {
3198
+ "anyOf": [
3199
+ {
3200
+ "type": "string",
3201
+ "description": "Action Name"
3202
+ },
3203
+ {
3204
+ "type": "object",
3205
+ "properties": {
3206
+ "type": {
3207
+ "type": "string"
3208
+ },
3209
+ "params": {
3210
+ "type": "object",
3211
+ "additionalProperties": {}
3212
+ }
3213
+ },
3214
+ "required": [
3215
+ "type"
3216
+ ],
3217
+ "additionalProperties": false
3218
+ }
3219
+ ]
3220
+ },
3221
+ "description": "Actions to execute during transition"
3222
+ },
3223
+ "description": {
3224
+ "type": "string",
3225
+ "description": "Human readable description of this rule"
3226
+ }
3227
+ },
3228
+ "additionalProperties": false
3229
+ },
3230
+ {
3231
+ "type": "array",
3232
+ "items": {
3233
+ "type": "object",
3234
+ "properties": {
3235
+ "target": {
3236
+ "type": "string",
3237
+ "description": "Target State ID"
3238
+ },
3239
+ "cond": {
3240
+ "anyOf": [
3241
+ {
3242
+ "type": "string",
3243
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3244
+ },
3245
+ {
3246
+ "type": "object",
3247
+ "properties": {
3248
+ "type": {
3249
+ "type": "string"
3250
+ },
3251
+ "params": {
3252
+ "type": "object",
3253
+ "additionalProperties": {}
3254
+ }
3255
+ },
3256
+ "required": [
3257
+ "type"
3258
+ ],
3259
+ "additionalProperties": false
3260
+ }
3261
+ ],
3262
+ "description": "Condition (Guard) required to take this path"
3263
+ },
3264
+ "actions": {
3265
+ "type": "array",
3266
+ "items": {
3267
+ "anyOf": [
3268
+ {
3269
+ "type": "string",
3270
+ "description": "Action Name"
3271
+ },
3272
+ {
3273
+ "type": "object",
3274
+ "properties": {
3275
+ "type": {
3276
+ "type": "string"
3277
+ },
3278
+ "params": {
3279
+ "type": "object",
3280
+ "additionalProperties": {}
3281
+ }
3282
+ },
3283
+ "required": [
3284
+ "type"
3285
+ ],
3286
+ "additionalProperties": false
3287
+ }
3288
+ ]
3289
+ },
3290
+ "description": "Actions to execute during transition"
3291
+ },
3292
+ "description": {
3293
+ "type": "string",
3294
+ "description": "Human readable description of this rule"
3295
+ }
3296
+ },
3297
+ "additionalProperties": false
3298
+ }
3299
+ }
3300
+ ]
3301
+ },
3302
+ "description": "Map of Event Type -> Transition Definition"
3303
+ },
3304
+ "always": {
3305
+ "type": "array",
3306
+ "items": {
3307
+ "type": "object",
3308
+ "properties": {
3309
+ "target": {
3310
+ "type": "string",
3311
+ "description": "Target State ID"
3312
+ },
3313
+ "cond": {
3314
+ "anyOf": [
3315
+ {
3316
+ "type": "string",
3317
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3318
+ },
3319
+ {
3320
+ "type": "object",
3321
+ "properties": {
3322
+ "type": {
3323
+ "type": "string"
3324
+ },
3325
+ "params": {
3326
+ "type": "object",
3327
+ "additionalProperties": {}
3328
+ }
3329
+ },
3330
+ "required": [
3331
+ "type"
3332
+ ],
3333
+ "additionalProperties": false
3334
+ }
3335
+ ],
3336
+ "description": "Condition (Guard) required to take this path"
3337
+ },
3338
+ "actions": {
3339
+ "type": "array",
3340
+ "items": {
3341
+ "anyOf": [
3342
+ {
3343
+ "type": "string",
3344
+ "description": "Action Name"
3345
+ },
3346
+ {
3347
+ "type": "object",
3348
+ "properties": {
3349
+ "type": {
3350
+ "type": "string"
3351
+ },
3352
+ "params": {
3353
+ "type": "object",
3354
+ "additionalProperties": {}
3355
+ }
3356
+ },
3357
+ "required": [
3358
+ "type"
3359
+ ],
3360
+ "additionalProperties": false
3361
+ }
3362
+ ]
3363
+ },
3364
+ "description": "Actions to execute during transition"
3365
+ },
3366
+ "description": {
3367
+ "type": "string",
3368
+ "description": "Human readable description of this rule"
3369
+ }
3370
+ },
3371
+ "additionalProperties": false
3372
+ }
3373
+ },
3374
+ "initial": {
3375
+ "type": "string",
3376
+ "description": "Initial child state (if compound)"
3377
+ },
3378
+ "states": {
3379
+ "type": "object",
3380
+ "additionalProperties": {}
3381
+ },
3382
+ "meta": {
3383
+ "type": "object",
3384
+ "properties": {
3385
+ "label": {
3386
+ "type": "string"
3387
+ },
3388
+ "description": {
3389
+ "type": "string"
3390
+ },
3391
+ "color": {
3392
+ "type": "string"
3393
+ },
3394
+ "aiInstructions": {
3395
+ "type": "string",
3396
+ "description": "Specific instructions for AI when in this state"
3397
+ }
3398
+ },
3399
+ "additionalProperties": false
3400
+ }
3401
+ },
3402
+ "additionalProperties": false
3403
+ },
3404
+ "description": "State Nodes"
3405
+ },
3406
+ "on": {
3407
+ "type": "object",
3408
+ "additionalProperties": {
3409
+ "anyOf": [
3410
+ {
3411
+ "type": "string"
3412
+ },
3413
+ {
3414
+ "type": "object",
3415
+ "properties": {
3416
+ "target": {
3417
+ "type": "string",
3418
+ "description": "Target State ID"
3419
+ },
3420
+ "cond": {
3421
+ "anyOf": [
3422
+ {
3423
+ "type": "string",
3424
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3425
+ },
3426
+ {
3427
+ "type": "object",
3428
+ "properties": {
3429
+ "type": {
3430
+ "type": "string"
3431
+ },
3432
+ "params": {
3433
+ "type": "object",
3434
+ "additionalProperties": {}
3435
+ }
3436
+ },
3437
+ "required": [
3438
+ "type"
3439
+ ],
3440
+ "additionalProperties": false
3441
+ }
3442
+ ],
3443
+ "description": "Condition (Guard) required to take this path"
3444
+ },
3445
+ "actions": {
3446
+ "type": "array",
3447
+ "items": {
3448
+ "anyOf": [
3449
+ {
3450
+ "type": "string",
3451
+ "description": "Action Name"
3452
+ },
3453
+ {
3454
+ "type": "object",
3455
+ "properties": {
3456
+ "type": {
3457
+ "type": "string"
3458
+ },
3459
+ "params": {
3460
+ "type": "object",
3461
+ "additionalProperties": {}
3462
+ }
3463
+ },
3464
+ "required": [
3465
+ "type"
3466
+ ],
3467
+ "additionalProperties": false
3468
+ }
3469
+ ]
3470
+ },
3471
+ "description": "Actions to execute during transition"
3472
+ },
3473
+ "description": {
3474
+ "type": "string",
3475
+ "description": "Human readable description of this rule"
3476
+ }
3477
+ },
3478
+ "additionalProperties": false
3479
+ },
3480
+ {
3481
+ "type": "array",
3482
+ "items": {
3483
+ "type": "object",
3484
+ "properties": {
3485
+ "target": {
3486
+ "type": "string",
3487
+ "description": "Target State ID"
3488
+ },
3489
+ "cond": {
3490
+ "anyOf": [
3491
+ {
3492
+ "type": "string",
3493
+ "description": "Guard Name (e.g., \"isManager\", \"amountGT1000\")"
3494
+ },
3495
+ {
3496
+ "type": "object",
3497
+ "properties": {
3498
+ "type": {
3499
+ "type": "string"
3500
+ },
3501
+ "params": {
3502
+ "type": "object",
3503
+ "additionalProperties": {}
3504
+ }
3505
+ },
3506
+ "required": [
3507
+ "type"
3508
+ ],
3509
+ "additionalProperties": false
3510
+ }
3511
+ ],
3512
+ "description": "Condition (Guard) required to take this path"
3513
+ },
3514
+ "actions": {
3515
+ "type": "array",
3516
+ "items": {
3517
+ "anyOf": [
3518
+ {
3519
+ "type": "string",
3520
+ "description": "Action Name"
3521
+ },
3522
+ {
3523
+ "type": "object",
3524
+ "properties": {
3525
+ "type": {
3526
+ "type": "string"
3527
+ },
3528
+ "params": {
3529
+ "type": "object",
3530
+ "additionalProperties": {}
3531
+ }
3532
+ },
3533
+ "required": [
3534
+ "type"
3535
+ ],
3536
+ "additionalProperties": false
3537
+ }
3538
+ ]
3539
+ },
3540
+ "description": "Actions to execute during transition"
3541
+ },
3542
+ "description": {
3543
+ "type": "string",
3544
+ "description": "Human readable description of this rule"
3545
+ }
3546
+ },
3547
+ "additionalProperties": false
3548
+ }
3549
+ }
3550
+ ]
3551
+ }
3552
+ }
3553
+ },
3554
+ "required": [
3555
+ "id",
3556
+ "initial",
3557
+ "states"
3558
+ ],
3559
+ "additionalProperties": false
3560
+ },
3561
+ "description": "Named state machines for parallel lifecycles (e.g., status, payment, approval)"
3562
+ },
2562
3563
  "titleFormat": {
2563
3564
  "type": "string",
2564
3565
  "description": "Title expression (e.g. \"{name} - {code}\"). Overrides nameField."