@toolproof-npm/schema 0.1.80 → 0.1.81

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.
@@ -2709,36 +2709,26 @@
2709
2709
  }
2710
2710
  }
2711
2711
  },
2712
- "StrategyRunUpdate": {
2713
- "identity": "RESOURCE-StrategyRunUpdate",
2712
+ "StrategyStateDelta": {
2713
+ "identity": "RESOURCE-StrategyStateDelta",
2714
2714
  "resourceTypeRef": "TYPE-ResourceType",
2715
2715
  "creationContext": {
2716
2716
  "resourceRoleRef": "ROLE-Genesis",
2717
- "executionRef": "EXECUTION-StrategyRunUpdate"
2717
+ "executionRef": "EXECUTION-StrategyStateDelta"
2718
2718
  },
2719
2719
  "kind": "materialized",
2720
2720
  "timestamp": "2025-11-30T00:00:00.000Z",
2721
2721
  "extractedData": {
2722
- "identity": "TYPE-StrategyRunUpdate",
2723
- "name": "StrategyRunUpdate",
2722
+ "identity": "TYPE-StrategyStateDelta",
2723
+ "name": "StrategyStateDelta",
2724
2724
  "description": "dummy-description",
2725
2725
  "resourceFormatRef": "FORMAT-ApplicationJson",
2726
2726
  "extractionSchema": {
2727
- "$anchor": "StrategyRunUpdate",
2727
+ "$anchor": "StrategyStateDelta",
2728
2728
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2729
2729
  "type": "object",
2730
- "required": [
2731
- "strategyRunRef",
2732
- "strategyStateUpdate"
2733
- ],
2730
+ "$comment": "Shared delta payload for strategy state updates; used both as standalone updates and embedded within run events.",
2734
2731
  "properties": {
2735
- "strategyRunRef": {
2736
- "$ref": "#/$defs/StrategyRunIdentity"
2737
- },
2738
- "strategyRun": {
2739
- "$comment": "Optional embedded snapshot; strategyRunRef remains the canonical pointer.",
2740
- "$ref": "#/$defs/StrategyRun"
2741
- },
2742
2732
  "strategyStateUpdate": {
2743
2733
  "type": "object",
2744
2734
  "propertyNames": {
@@ -2759,9 +2749,514 @@
2759
2749
  },
2760
2750
  "unevaluatedProperties": false
2761
2751
  }
2752
+ }
2753
+ }
2754
+ }
2755
+ },
2756
+ "StrategyRunUpdate": {
2757
+ "identity": "RESOURCE-StrategyRunUpdate",
2758
+ "resourceTypeRef": "TYPE-ResourceType",
2759
+ "creationContext": {
2760
+ "resourceRoleRef": "ROLE-Genesis",
2761
+ "executionRef": "EXECUTION-StrategyRunUpdate"
2762
+ },
2763
+ "kind": "materialized",
2764
+ "timestamp": "2025-11-30T00:00:00.000Z",
2765
+ "extractedData": {
2766
+ "identity": "TYPE-StrategyRunUpdate",
2767
+ "name": "StrategyRunUpdate",
2768
+ "description": "dummy-description",
2769
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2770
+ "extractionSchema": {
2771
+ "$anchor": "StrategyRunUpdate",
2772
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2773
+ "type": "object",
2774
+ "required": [
2775
+ "strategyRunRef",
2776
+ "strategyStateUpdate"
2777
+ ],
2778
+ "properties": {
2779
+ "strategyRunRef": {
2780
+ "$ref": "#/$defs/StrategyRunIdentity"
2781
+ },
2782
+ "strategyRun": {
2783
+ "$comment": "Optional embedded snapshot; strategyRunRef remains the canonical pointer.",
2784
+ "$ref": "#/$defs/StrategyRun"
2785
+ }
2762
2786
  },
2787
+ "allOf": [
2788
+ {
2789
+ "$ref": "#/$defs/StrategyStateDelta"
2790
+ }
2791
+ ],
2763
2792
  "unevaluatedProperties": false
2764
2793
  }
2765
2794
  }
2795
+ },
2796
+ "RunEventKind": {
2797
+ "identity": "RESOURCE-RunEventKind",
2798
+ "resourceTypeRef": "TYPE-ResourceType",
2799
+ "creationContext": {
2800
+ "resourceRoleRef": "ROLE-Genesis",
2801
+ "executionRef": "EXECUTION-RunEventKind"
2802
+ },
2803
+ "kind": "materialized",
2804
+ "timestamp": "2025-11-30T00:00:00.000Z",
2805
+ "extractedData": {
2806
+ "identity": "TYPE-RunEventKind",
2807
+ "name": "RunEventKind",
2808
+ "description": "dummy-description",
2809
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2810
+ "extractionSchema": {
2811
+ "$anchor": "RunEventKind",
2812
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2813
+ "type": "string",
2814
+ "enum": [
2815
+ "graph_start",
2816
+ "tick",
2817
+ "interrupt",
2818
+ "graph_end"
2819
+ ]
2820
+ }
2821
+ }
2822
+ },
2823
+ "RunEventCounters": {
2824
+ "identity": "RESOURCE-RunEventCounters",
2825
+ "resourceTypeRef": "TYPE-ResourceType",
2826
+ "creationContext": {
2827
+ "resourceRoleRef": "ROLE-Genesis",
2828
+ "executionRef": "EXECUTION-RunEventCounters"
2829
+ },
2830
+ "kind": "materialized",
2831
+ "timestamp": "2025-11-30T00:00:00.000Z",
2832
+ "extractedData": {
2833
+ "identity": "TYPE-RunEventCounters",
2834
+ "name": "RunEventCounters",
2835
+ "description": "dummy-description",
2836
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2837
+ "extractionSchema": {
2838
+ "$anchor": "RunEventCounters",
2839
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2840
+ "type": "object",
2841
+ "properties": {
2842
+ "stepCounterAfter": {
2843
+ "type": "integer"
2844
+ },
2845
+ "iterationCounterAfter": {
2846
+ "type": "integer"
2847
+ }
2848
+ }
2849
+ }
2850
+ }
2851
+ },
2852
+ "RunEventStepKind": {
2853
+ "identity": "RESOURCE-RunEventStepKind",
2854
+ "resourceTypeRef": "TYPE-ResourceType",
2855
+ "creationContext": {
2856
+ "resourceRoleRef": "ROLE-Genesis",
2857
+ "executionRef": "EXECUTION-RunEventStepKind"
2858
+ },
2859
+ "kind": "materialized",
2860
+ "timestamp": "2025-11-30T00:00:00.000Z",
2861
+ "extractedData": {
2862
+ "identity": "TYPE-RunEventStepKind",
2863
+ "name": "RunEventStepKind",
2864
+ "description": "dummy-description",
2865
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2866
+ "extractionSchema": {
2867
+ "$anchor": "RunEventStepKind",
2868
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2869
+ "type": "string",
2870
+ "enum": [
2871
+ "work",
2872
+ "branch",
2873
+ "while",
2874
+ "for"
2875
+ ]
2876
+ }
2877
+ }
2878
+ },
2879
+ "RunEventStepMetaData": {
2880
+ "identity": "RESOURCE-RunEventStepMetaData",
2881
+ "resourceTypeRef": "TYPE-ResourceType",
2882
+ "creationContext": {
2883
+ "resourceRoleRef": "ROLE-Genesis",
2884
+ "executionRef": "EXECUTION-RunEventStepMetaData"
2885
+ },
2886
+ "kind": "materialized",
2887
+ "timestamp": "2025-11-30T00:00:00.000Z",
2888
+ "extractedData": {
2889
+ "identity": "TYPE-RunEventStepMetaData",
2890
+ "name": "RunEventStepMetaData",
2891
+ "description": "dummy-description",
2892
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2893
+ "extractionSchema": {
2894
+ "$anchor": "RunEventStepMetaData",
2895
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2896
+ "type": "object",
2897
+ "required": [
2898
+ "stepRef",
2899
+ "stepKind",
2900
+ "threadStepIndex"
2901
+ ],
2902
+ "properties": {
2903
+ "stepRef": {
2904
+ "oneOf": [
2905
+ {
2906
+ "$ref": "#/$defs/WorkStepIdentity"
2907
+ },
2908
+ {
2909
+ "$ref": "#/$defs/BranchStepIdentity"
2910
+ },
2911
+ {
2912
+ "$ref": "#/$defs/WhileStepIdentity"
2913
+ },
2914
+ {
2915
+ "$ref": "#/$defs/ForStepIdentity"
2916
+ }
2917
+ ]
2918
+ },
2919
+ "stepKind": {
2920
+ "$ref": "#/$defs/RunEventStepKind"
2921
+ },
2922
+ "threadStepIndex": {
2923
+ "type": "integer"
2924
+ },
2925
+ "executionRef": {
2926
+ "$ref": "#/$defs/ExecutionIdentity"
2927
+ },
2928
+ "jobRef": {
2929
+ "$ref": "#/$defs/JobIdentity"
2930
+ }
2931
+ }
2932
+ }
2933
+ }
2934
+ },
2935
+ "RunEventUpdates": {
2936
+ "identity": "RESOURCE-RunEventUpdates",
2937
+ "resourceTypeRef": "TYPE-ResourceType",
2938
+ "creationContext": {
2939
+ "resourceRoleRef": "ROLE-Genesis",
2940
+ "executionRef": "EXECUTION-RunEventUpdates"
2941
+ },
2942
+ "kind": "materialized",
2943
+ "timestamp": "2025-11-30T00:00:00.000Z",
2944
+ "extractedData": {
2945
+ "identity": "TYPE-RunEventUpdates",
2946
+ "name": "RunEventUpdates",
2947
+ "description": "dummy-description",
2948
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2949
+ "extractionSchema": {
2950
+ "$anchor": "RunEventUpdates",
2951
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2952
+ "type": "object",
2953
+ "allOf": [
2954
+ {
2955
+ "$ref": "#/$defs/StrategyStateDelta"
2956
+ }
2957
+ ],
2958
+ "properties": {
2959
+ "stepsMutation": {
2960
+ "type": "object",
2961
+ "required": [
2962
+ "insertAt",
2963
+ "inserted"
2964
+ ],
2965
+ "properties": {
2966
+ "insertAt": {
2967
+ "type": "integer"
2968
+ },
2969
+ "inserted": {
2970
+ "type": "array",
2971
+ "items": {
2972
+ "$ref": "#/$defs/Step"
2973
+ }
2974
+ }
2975
+ }
2976
+ },
2977
+ "interruptData": {
2978
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
2979
+ "type": [
2980
+ "object",
2981
+ "null"
2982
+ ]
2983
+ }
2984
+ }
2985
+ }
2986
+ }
2987
+ },
2988
+ "RunEventBase": {
2989
+ "identity": "RESOURCE-RunEventBase",
2990
+ "resourceTypeRef": "TYPE-ResourceType",
2991
+ "creationContext": {
2992
+ "resourceRoleRef": "ROLE-Genesis",
2993
+ "executionRef": "EXECUTION-RunEventBase"
2994
+ },
2995
+ "kind": "materialized",
2996
+ "timestamp": "2025-11-30T00:00:00.000Z",
2997
+ "extractedData": {
2998
+ "identity": "TYPE-RunEventBase",
2999
+ "name": "RunEventBase",
3000
+ "description": "dummy-description",
3001
+ "resourceFormatRef": "FORMAT-ApplicationJson",
3002
+ "extractionSchema": {
3003
+ "$anchor": "RunEventBase",
3004
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3005
+ "type": "object",
3006
+ "required": [
3007
+ "kind",
3008
+ "strategyRunRef",
3009
+ "strategyThreadRef",
3010
+ "createdAt",
3011
+ "nodeName",
3012
+ "eventSeq"
3013
+ ],
3014
+ "properties": {
3015
+ "kind": {
3016
+ "$ref": "#/$defs/RunEventKind"
3017
+ },
3018
+ "strategyRunRef": {
3019
+ "$ref": "#/$defs/StrategyRunIdentity"
3020
+ },
3021
+ "strategyThreadRef": {
3022
+ "$ref": "#/$defs/StrategyThreadIdentity"
3023
+ },
3024
+ "createdAt": {
3025
+ "$ref": "#/$defs/Timestamp"
3026
+ },
3027
+ "nodeName": {
3028
+ "type": "string"
3029
+ },
3030
+ "eventSeq": {
3031
+ "type": "integer"
3032
+ },
3033
+ "counters": {
3034
+ "$ref": "#/$defs/RunEventCounters"
3035
+ },
3036
+ "stepMetaData": {
3037
+ "$ref": "#/$defs/RunEventStepMetaData"
3038
+ },
3039
+ "updates": {
3040
+ "$ref": "#/$defs/RunEventUpdates"
3041
+ }
3042
+ }
3043
+ }
3044
+ }
3045
+ },
3046
+ "GraphStartRunEvent": {
3047
+ "identity": "RESOURCE-GraphStartRunEvent",
3048
+ "resourceTypeRef": "TYPE-ResourceType",
3049
+ "creationContext": {
3050
+ "resourceRoleRef": "ROLE-Genesis",
3051
+ "executionRef": "EXECUTION-GraphStartRunEvent"
3052
+ },
3053
+ "kind": "materialized",
3054
+ "timestamp": "2025-11-30T00:00:00.000Z",
3055
+ "extractedData": {
3056
+ "identity": "TYPE-GraphStartRunEvent",
3057
+ "name": "GraphStartRunEvent",
3058
+ "description": "dummy-description",
3059
+ "resourceFormatRef": "FORMAT-ApplicationJson",
3060
+ "extractionSchema": {
3061
+ "$anchor": "GraphStartRunEvent",
3062
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3063
+ "allOf": [
3064
+ {
3065
+ "$ref": "#/$defs/RunEventBase"
3066
+ },
3067
+ {
3068
+ "type": "object",
3069
+ "required": [
3070
+ "strategyRunSeed"
3071
+ ],
3072
+ "properties": {
3073
+ "kind": {
3074
+ "const": "graph_start"
3075
+ },
3076
+ "strategyRunSeed": {
3077
+ "$ref": "#/$defs/StrategyRun"
3078
+ }
3079
+ }
3080
+ }
3081
+ ]
3082
+ }
3083
+ }
3084
+ },
3085
+ "TickRunEvent": {
3086
+ "identity": "RESOURCE-TickRunEvent",
3087
+ "resourceTypeRef": "TYPE-ResourceType",
3088
+ "creationContext": {
3089
+ "resourceRoleRef": "ROLE-Genesis",
3090
+ "executionRef": "EXECUTION-TickRunEvent"
3091
+ },
3092
+ "kind": "materialized",
3093
+ "timestamp": "2025-11-30T00:00:00.000Z",
3094
+ "extractedData": {
3095
+ "identity": "TYPE-TickRunEvent",
3096
+ "name": "TickRunEvent",
3097
+ "description": "dummy-description",
3098
+ "resourceFormatRef": "FORMAT-ApplicationJson",
3099
+ "extractionSchema": {
3100
+ "$anchor": "TickRunEvent",
3101
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3102
+ "allOf": [
3103
+ {
3104
+ "$ref": "#/$defs/RunEventBase"
3105
+ },
3106
+ {
3107
+ "type": "object",
3108
+ "properties": {
3109
+ "kind": {
3110
+ "const": "tick"
3111
+ }
3112
+ }
3113
+ }
3114
+ ]
3115
+ }
3116
+ }
3117
+ },
3118
+ "InterruptRunEvent": {
3119
+ "identity": "RESOURCE-InterruptRunEvent",
3120
+ "resourceTypeRef": "TYPE-ResourceType",
3121
+ "creationContext": {
3122
+ "resourceRoleRef": "ROLE-Genesis",
3123
+ "executionRef": "EXECUTION-InterruptRunEvent"
3124
+ },
3125
+ "kind": "materialized",
3126
+ "timestamp": "2025-11-30T00:00:00.000Z",
3127
+ "extractedData": {
3128
+ "identity": "TYPE-InterruptRunEvent",
3129
+ "name": "InterruptRunEvent",
3130
+ "description": "dummy-description",
3131
+ "resourceFormatRef": "FORMAT-ApplicationJson",
3132
+ "extractionSchema": {
3133
+ "$anchor": "InterruptRunEvent",
3134
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3135
+ "allOf": [
3136
+ {
3137
+ "$ref": "#/$defs/RunEventBase"
3138
+ },
3139
+ {
3140
+ "type": "object",
3141
+ "properties": {
3142
+ "kind": {
3143
+ "const": "interrupt"
3144
+ }
3145
+ }
3146
+ }
3147
+ ]
3148
+ }
3149
+ }
3150
+ },
3151
+ "GraphEndRunEvent": {
3152
+ "identity": "RESOURCE-GraphEndRunEvent",
3153
+ "resourceTypeRef": "TYPE-ResourceType",
3154
+ "creationContext": {
3155
+ "resourceRoleRef": "ROLE-Genesis",
3156
+ "executionRef": "EXECUTION-GraphEndRunEvent"
3157
+ },
3158
+ "kind": "materialized",
3159
+ "timestamp": "2025-11-30T00:00:00.000Z",
3160
+ "extractedData": {
3161
+ "identity": "TYPE-GraphEndRunEvent",
3162
+ "name": "GraphEndRunEvent",
3163
+ "description": "dummy-description",
3164
+ "resourceFormatRef": "FORMAT-ApplicationJson",
3165
+ "extractionSchema": {
3166
+ "$anchor": "GraphEndRunEvent",
3167
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3168
+ "allOf": [
3169
+ {
3170
+ "$ref": "#/$defs/RunEventBase"
3171
+ },
3172
+ {
3173
+ "type": "object",
3174
+ "properties": {
3175
+ "kind": {
3176
+ "const": "graph_end"
3177
+ }
3178
+ }
3179
+ }
3180
+ ]
3181
+ }
3182
+ }
3183
+ },
3184
+ "RunEvent": {
3185
+ "identity": "RESOURCE-RunEvent",
3186
+ "resourceTypeRef": "TYPE-ResourceType",
3187
+ "creationContext": {
3188
+ "resourceRoleRef": "ROLE-Genesis",
3189
+ "executionRef": "EXECUTION-RunEvent"
3190
+ },
3191
+ "kind": "materialized",
3192
+ "timestamp": "2025-11-30T00:00:00.000Z",
3193
+ "extractedData": {
3194
+ "identity": "TYPE-RunEvent",
3195
+ "name": "RunEvent",
3196
+ "description": "dummy-description",
3197
+ "resourceFormatRef": "FORMAT-ApplicationJson",
3198
+ "extractionSchema": {
3199
+ "$anchor": "RunEvent",
3200
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3201
+ "oneOf": [
3202
+ {
3203
+ "$ref": "#/$defs/GraphStartRunEvent"
3204
+ },
3205
+ {
3206
+ "$ref": "#/$defs/TickRunEvent"
3207
+ },
3208
+ {
3209
+ "$ref": "#/$defs/InterruptRunEvent"
3210
+ },
3211
+ {
3212
+ "$ref": "#/$defs/GraphEndRunEvent"
3213
+ }
3214
+ ]
3215
+ }
3216
+ }
3217
+ },
3218
+ "RunRecording": {
3219
+ "identity": "RESOURCE-RunRecording",
3220
+ "resourceTypeRef": "TYPE-ResourceType",
3221
+ "creationContext": {
3222
+ "resourceRoleRef": "ROLE-Genesis",
3223
+ "executionRef": "EXECUTION-RunRecording"
3224
+ },
3225
+ "kind": "materialized",
3226
+ "timestamp": "2025-11-30T00:00:00.000Z",
3227
+ "extractedData": {
3228
+ "identity": "TYPE-RunRecording",
3229
+ "name": "RunRecording",
3230
+ "description": "dummy-description",
3231
+ "resourceFormatRef": "FORMAT-ApplicationJson",
3232
+ "extractionSchema": {
3233
+ "$anchor": "RunRecording",
3234
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3235
+ "type": "object",
3236
+ "required": [
3237
+ "runEvents"
3238
+ ],
3239
+ "properties": {
3240
+ "strategyRunRef": {
3241
+ "$comment": "Optional; derived from the first event but useful for indexing.",
3242
+ "$ref": "#/$defs/StrategyRunIdentity"
3243
+ },
3244
+ "strategyThreadRef": {
3245
+ "$comment": "Optional; derived from the first event but useful for indexing.",
3246
+ "$ref": "#/$defs/StrategyThreadIdentity"
3247
+ },
3248
+ "recordedAt": {
3249
+ "$comment": "Optional recording timestamp.",
3250
+ "$ref": "#/$defs/Timestamp"
3251
+ },
3252
+ "runEvents": {
3253
+ "type": "array",
3254
+ "items": {
3255
+ "$ref": "#/$defs/RunEvent"
3256
+ }
3257
+ }
3258
+ }
3259
+ }
3260
+ }
2766
3261
  }
2767
3262
  }