@almadar/std 16.143.0 → 16.145.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 (97) hide show
  1. package/behaviors/lolo/ml/atoms/std-ml-classify.lolo +121 -0
  2. package/behaviors/lolo/ml/atoms/std-ml-exact-check.lolo +90 -0
  3. package/behaviors/lolo/ml/atoms/std-ml-infer.lolo +141 -0
  4. package/behaviors/lolo/ml/atoms/std-ml-label-capture.lolo +75 -0
  5. package/behaviors/lolo/ml/atoms/std-ml-lookup.lolo +83 -0
  6. package/behaviors/lolo/ml/atoms/std-ml-posterior.lolo +104 -0
  7. package/behaviors/lolo/ml/atoms/std-ml-similarity.lolo +154 -0
  8. package/behaviors/lolo/ml/molecules/std-escalating-decision.lolo +271 -0
  9. package/behaviors/lolo/ml/molecules/std-knowledge-tracing.lolo +115 -0
  10. package/behaviors/lolo/ui/core/atoms/std-board.lolo +28 -6
  11. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +23 -6
  12. package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +85 -2
  13. package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +17 -0
  14. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +17 -0
  15. package/behaviors/lolo/ui/core/atoms/ui-typography.lolo +1 -1
  16. package/behaviors/lolo/ui/core/molecules/ui-calendar-grid.lolo +18 -0
  17. package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +2 -0
  18. package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +3 -2
  19. package/behaviors/lolo/ui/core/molecules/ui-filter-group.lolo +20 -0
  20. package/behaviors/lolo/ui/core/molecules/ui-search-input.lolo +7 -2
  21. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +3 -2
  22. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +2 -0
  23. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +2 -0
  24. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +2 -0
  25. package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +2 -0
  26. package/behaviors/registry/factory-signatures.json +5018 -824
  27. package/behaviors/registry/ml/atoms/std-ml-classify.orb +622 -0
  28. package/behaviors/registry/ml/atoms/std-ml-exact-check.orb +505 -0
  29. package/behaviors/registry/ml/atoms/std-ml-infer.orb +770 -0
  30. package/behaviors/registry/ml/atoms/std-ml-label-capture.orb +367 -0
  31. package/behaviors/registry/ml/atoms/std-ml-lookup.orb +473 -0
  32. package/behaviors/registry/ml/atoms/std-ml-posterior.orb +669 -0
  33. package/behaviors/registry/ml/atoms/std-ml-similarity.orb +862 -0
  34. package/behaviors/registry/ml/molecules/std-escalating-decision.orb +1553 -0
  35. package/behaviors/registry/ml/molecules/std-knowledge-tracing.orb +577 -0
  36. package/behaviors/registry/ui/core/atoms/std-board.orb +90 -20
  37. package/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
  38. package/behaviors/registry/ui/core/atoms/std-calendar.orb +238 -3
  39. package/behaviors/registry/ui/core/atoms/std-file-store.orb +40 -0
  40. package/behaviors/registry/ui/core/atoms/std-version-history.orb +40 -0
  41. package/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
  42. package/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +27 -0
  43. package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +25 -12
  44. package/behaviors/registry/ui/core/molecules/ui-data-list.orb +26 -13
  45. package/behaviors/registry/ui/core/molecules/ui-filter-group.orb +86 -0
  46. package/behaviors/registry/ui/core/molecules/ui-search-input.orb +37 -1
  47. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +25 -12
  48. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +13 -0
  49. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +21 -8
  50. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +13 -0
  51. package/behaviors/registry/ui/core/organisms/ui-timeline.orb +13 -0
  52. package/canonical-operators.json +30 -6
  53. package/dist/behaviors/behaviors-embeddings.json +134 -134
  54. package/dist/behaviors/exports-reader.js +2462 -2080
  55. package/dist/behaviors/functions/index.d.ts +725 -1
  56. package/dist/behaviors/functions/index.js +2437 -2081
  57. package/dist/behaviors/index.d.ts +1 -1
  58. package/dist/behaviors/index.js +2463 -2081
  59. package/dist/behaviors/knob-embeddings.json +1 -1
  60. package/dist/behaviors/query.js +2462 -2080
  61. package/dist/behaviors/registry/factory-signatures.json +5018 -824
  62. package/dist/behaviors/registry/ml/atoms/std-ml-classify.orb +622 -0
  63. package/dist/behaviors/registry/ml/atoms/std-ml-exact-check.orb +505 -0
  64. package/dist/behaviors/registry/ml/atoms/std-ml-infer.orb +770 -0
  65. package/dist/behaviors/registry/ml/atoms/std-ml-label-capture.orb +367 -0
  66. package/dist/behaviors/registry/ml/atoms/std-ml-lookup.orb +473 -0
  67. package/dist/behaviors/registry/ml/atoms/std-ml-posterior.orb +669 -0
  68. package/dist/behaviors/registry/ml/atoms/std-ml-similarity.orb +862 -0
  69. package/dist/behaviors/registry/ml/molecules/std-escalating-decision.orb +1553 -0
  70. package/dist/behaviors/registry/ml/molecules/std-knowledge-tracing.orb +577 -0
  71. package/dist/behaviors/registry/ui/core/atoms/std-board.orb +90 -20
  72. package/dist/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
  73. package/dist/behaviors/registry/ui/core/atoms/std-calendar.orb +238 -3
  74. package/dist/behaviors/registry/ui/core/atoms/std-file-store.orb +40 -0
  75. package/dist/behaviors/registry/ui/core/atoms/std-version-history.orb +40 -0
  76. package/dist/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
  77. package/dist/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +27 -0
  78. package/dist/behaviors/registry/ui/core/molecules/ui-data-grid.orb +25 -12
  79. package/dist/behaviors/registry/ui/core/molecules/ui-data-list.orb +26 -13
  80. package/dist/behaviors/registry/ui/core/molecules/ui-filter-group.orb +86 -0
  81. package/dist/behaviors/registry/ui/core/molecules/ui-search-input.orb +37 -1
  82. package/dist/behaviors/registry/ui/core/molecules/ui-table-view.orb +25 -12
  83. package/dist/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +13 -0
  84. package/dist/behaviors/registry/ui/core/organisms/ui-entity-list.orb +21 -8
  85. package/dist/behaviors/registry/ui/core/organisms/ui-entity-table.orb +13 -0
  86. package/dist/behaviors/registry/ui/core/organisms/ui-timeline.orb +13 -0
  87. package/dist/behaviors-embeddings.json +134 -134
  88. package/dist/index.d.ts +1 -1
  89. package/dist/index.js +2498 -2088
  90. package/dist/knob-embeddings.json +1 -1
  91. package/dist/modules/array.js +28 -0
  92. package/dist/modules/contract.js +4 -4
  93. package/dist/modules/data.js +3 -3
  94. package/dist/modules/index.js +35 -7
  95. package/dist/registry/factory-signatures.json +5018 -824
  96. package/dist/registry.js +35 -7
  97. package/package.json +6 -5
@@ -0,0 +1,1553 @@
1
+ {
2
+ "description": "std-escalating-decision — the intelligence ladder itself, as one reusable composition. One request enters at DECIDE and falls through the rungs in order — R0 exact check, R1 table lookup, R3 retrieval, R4 learned inference, R5 generative classification — each rung handing off to the next by abstaining, until one proves the answer. Exits DECIDED, tagged with which rung answered (rung, confidence, matched, reasoning), or DECISION_FAILED if even the generative floor could not serve it. The escalation is a chain, not a hub: each rung listens directly to the rung above it and projects its own inputs out of the carried request, so the trait graph is a DAG and no event ever returns to a rung that already ran. Domain-agnostic: it knows about candidates and categories, not students or quizzes — grading, routing, matching, moderation, and duplicate detection are all this same molecule with different knobs. R2 (the Beta posterior) is deliberately not in this chain: it is the 'decide what to do next' half of a turn and already lives in std-knowledge-tracing.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01KYBV09899CDQKETN5JFBX4EX": {
6
+ "bakedName": "KeyLookup",
7
+ "curName": "KeyLookup",
8
+ "id": "ent_01KYBV09899CDQKETN5JFBX4EX",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "ent_01KYBV0989A4ZMRWM79R1DK3DB": {
14
+ "bakedName": "ExactCheck",
15
+ "curName": "ExactCheck",
16
+ "id": "ent_01KYBV0989A4ZMRWM79R1DK3DB",
17
+ "kind": "entity",
18
+ "owner": "workspace",
19
+ "renames": []
20
+ },
21
+ "ent_01KYBV0989DW3WZDZ9G8HMXSJK": {
22
+ "bakedName": "SimilarityComparison",
23
+ "curName": "SimilarityComparison",
24
+ "id": "ent_01KYBV0989DW3WZDZ9G8HMXSJK",
25
+ "kind": "entity",
26
+ "owner": "workspace",
27
+ "renames": []
28
+ },
29
+ "ent_01KYBV0989PA5SP6AT1B01P8PB": {
30
+ "bakedName": "ClassifierVerdict",
31
+ "curName": "ClassifierVerdict",
32
+ "id": "ent_01KYBV0989PA5SP6AT1B01P8PB",
33
+ "kind": "entity",
34
+ "owner": "workspace",
35
+ "renames": []
36
+ },
37
+ "ent_01KYBV0989Q6EWCA1PPP4KTX75": {
38
+ "bakedName": "Inference",
39
+ "curName": "Inference",
40
+ "id": "ent_01KYBV0989Q6EWCA1PPP4KTX75",
41
+ "kind": "entity",
42
+ "owner": "workspace",
43
+ "renames": []
44
+ },
45
+ "ent_01KYC06PWVCKCYJZ2WWNTJ2CE2": {
46
+ "bakedName": "LadderRequest",
47
+ "curName": "LadderRequest",
48
+ "id": "ent_01KYC06PWVCKCYJZ2WWNTJ2CE2",
49
+ "kind": "entity",
50
+ "owner": "workspace",
51
+ "renames": []
52
+ },
53
+ "ent_01KYC06PWVTWYDVRXHHJ8H7MBN": {
54
+ "bakedName": "LadderVerdict",
55
+ "curName": "LadderVerdict",
56
+ "id": "ent_01KYC06PWVTWYDVRXHHJ8H7MBN",
57
+ "kind": "entity",
58
+ "owner": "workspace",
59
+ "renames": []
60
+ },
61
+ "evt_01KYC06PWV0WNG8YXAXDCSGCMK": {
62
+ "bakedName": "RESET",
63
+ "curName": "RESET",
64
+ "id": "evt_01KYC06PWV0WNG8YXAXDCSGCMK",
65
+ "kind": "event",
66
+ "owner": "workspace",
67
+ "parent": "trt_01KYC06PWV0T9JDATJBR5NW7JX",
68
+ "renames": []
69
+ },
70
+ "evt_01KYC06PWV50NDP6J22QHK7PWE": {
71
+ "bakedName": "FROM_CLASSIFY",
72
+ "curName": "FROM_CLASSIFY",
73
+ "id": "evt_01KYC06PWV50NDP6J22QHK7PWE",
74
+ "kind": "event",
75
+ "owner": "workspace",
76
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
77
+ "renames": []
78
+ },
79
+ "evt_01KYC06PWV8N74BABJ2QMA9TQR": {
80
+ "bakedName": "DECIDE",
81
+ "curName": "DECIDE",
82
+ "id": "evt_01KYC06PWV8N74BABJ2QMA9TQR",
83
+ "kind": "event",
84
+ "owner": "workspace",
85
+ "parent": "trt_01KYC06PWV0T9JDATJBR5NW7JX",
86
+ "renames": []
87
+ },
88
+ "evt_01KYC06PWVBDKHTBEK806HBAE8": {
89
+ "bakedName": "RUN_EXACT",
90
+ "curName": "RUN_EXACT",
91
+ "id": "evt_01KYC06PWVBDKHTBEK806HBAE8",
92
+ "kind": "event",
93
+ "owner": "workspace",
94
+ "parent": "trt_01KYC06PWV0T9JDATJBR5NW7JX",
95
+ "renames": []
96
+ },
97
+ "evt_01KYC06PWVBMW1ZPR7WRYECYHJ": {
98
+ "bakedName": "FROM_LOOKUP",
99
+ "curName": "FROM_LOOKUP",
100
+ "id": "evt_01KYC06PWVBMW1ZPR7WRYECYHJ",
101
+ "kind": "event",
102
+ "owner": "workspace",
103
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
104
+ "renames": []
105
+ },
106
+ "evt_01KYC06PWVE8S93JMF0J74Y1B8": {
107
+ "bakedName": "FROM_CLASSIFY_FAILURE",
108
+ "curName": "FROM_CLASSIFY_FAILURE",
109
+ "id": "evt_01KYC06PWVE8S93JMF0J74Y1B8",
110
+ "kind": "event",
111
+ "owner": "workspace",
112
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
113
+ "renames": []
114
+ },
115
+ "evt_01KYC06PWVFMCH8Q4XEN2FJGKY": {
116
+ "bakedName": "FROM_INFER",
117
+ "curName": "FROM_INFER",
118
+ "id": "evt_01KYC06PWVFMCH8Q4XEN2FJGKY",
119
+ "kind": "event",
120
+ "owner": "workspace",
121
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
122
+ "renames": []
123
+ },
124
+ "evt_01KYC06PWVFVEJE5JCZ9QGBTQS": {
125
+ "bakedName": "DECIDED",
126
+ "curName": "DECIDED",
127
+ "id": "evt_01KYC06PWVFVEJE5JCZ9QGBTQS",
128
+ "kind": "event",
129
+ "owner": "workspace",
130
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
131
+ "renames": []
132
+ },
133
+ "evt_01KYC06PWVGZ7AWD6PYD2DCZN9": {
134
+ "bakedName": "DECISION_FAILED",
135
+ "curName": "DECISION_FAILED",
136
+ "id": "evt_01KYC06PWVGZ7AWD6PYD2DCZN9",
137
+ "kind": "event",
138
+ "owner": "workspace",
139
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
140
+ "renames": []
141
+ },
142
+ "evt_01KYC06PWVJR97P13P65CMY1XQ": {
143
+ "bakedName": "INIT",
144
+ "curName": "INIT",
145
+ "id": "evt_01KYC06PWVJR97P13P65CMY1XQ",
146
+ "kind": "event",
147
+ "owner": "workspace",
148
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
149
+ "renames": []
150
+ },
151
+ "evt_01KYC06PWVKV2CQJ63FXJ6Z2VN": {
152
+ "bakedName": "INIT",
153
+ "curName": "INIT",
154
+ "id": "evt_01KYC06PWVKV2CQJ63FXJ6Z2VN",
155
+ "kind": "event",
156
+ "owner": "workspace",
157
+ "parent": "trt_01KYC06PWV0T9JDATJBR5NW7JX",
158
+ "renames": []
159
+ },
160
+ "evt_01KYC06PWVNY4RACZE4JF4Y2SB": {
161
+ "bakedName": "RESET",
162
+ "curName": "RESET",
163
+ "id": "evt_01KYC06PWVNY4RACZE4JF4Y2SB",
164
+ "kind": "event",
165
+ "owner": "workspace",
166
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
167
+ "renames": []
168
+ },
169
+ "evt_01KYC06PWVSQC5XWD4TBQWMYHJ": {
170
+ "bakedName": "FROM_SIMILARITY",
171
+ "curName": "FROM_SIMILARITY",
172
+ "id": "evt_01KYC06PWVSQC5XWD4TBQWMYHJ",
173
+ "kind": "event",
174
+ "owner": "workspace",
175
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
176
+ "renames": []
177
+ },
178
+ "evt_01KYC06PWVWPQZRX9XD2KYS0WX": {
179
+ "bakedName": "FROM_EXACT",
180
+ "curName": "FROM_EXACT",
181
+ "id": "evt_01KYC06PWVWPQZRX9XD2KYS0WX",
182
+ "kind": "event",
183
+ "owner": "workspace",
184
+ "parent": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
185
+ "renames": []
186
+ },
187
+ "orb_01KYBV0989HAR303D054T6S7FQ": {
188
+ "bakedName": "EscalatingDecisionOrbital",
189
+ "curName": "EscalatingDecisionOrbital",
190
+ "id": "orb_01KYBV0989HAR303D054T6S7FQ",
191
+ "kind": "orbital",
192
+ "owner": "workspace",
193
+ "renames": []
194
+ },
195
+ "pag_01KYBV0989N4SHACK87Z0W7049": {
196
+ "bakedName": "LadderDecidePage",
197
+ "curName": "LadderDecidePage",
198
+ "id": "pag_01KYBV0989N4SHACK87Z0W7049",
199
+ "kind": "page",
200
+ "owner": "workspace",
201
+ "renames": []
202
+ },
203
+ "trt_01KYBV0989745177PBSGRQHX1D": {
204
+ "bakedName": "ClassifyRung",
205
+ "curName": "ClassifyRung",
206
+ "id": "trt_01KYBV0989745177PBSGRQHX1D",
207
+ "kind": "trait",
208
+ "owner": "workspace",
209
+ "renames": []
210
+ },
211
+ "trt_01KYBV09897QSSA7A1QCBY7WD7": {
212
+ "bakedName": "ExactRung",
213
+ "curName": "ExactRung",
214
+ "id": "trt_01KYBV09897QSSA7A1QCBY7WD7",
215
+ "kind": "trait",
216
+ "owner": "workspace",
217
+ "renames": []
218
+ },
219
+ "trt_01KYBV0989C4D1RVXG0F91NQEF": {
220
+ "bakedName": "LookupRung",
221
+ "curName": "LookupRung",
222
+ "id": "trt_01KYBV0989C4D1RVXG0F91NQEF",
223
+ "kind": "trait",
224
+ "owner": "workspace",
225
+ "renames": []
226
+ },
227
+ "trt_01KYBV0989H8WKSR4F6VEMYBAV": {
228
+ "bakedName": "SimilarityRung",
229
+ "curName": "SimilarityRung",
230
+ "id": "trt_01KYBV0989H8WKSR4F6VEMYBAV",
231
+ "kind": "trait",
232
+ "owner": "workspace",
233
+ "renames": []
234
+ },
235
+ "trt_01KYBV0989NRVM07RKY8T08950": {
236
+ "bakedName": "InferRung",
237
+ "curName": "InferRung",
238
+ "id": "trt_01KYBV0989NRVM07RKY8T08950",
239
+ "kind": "trait",
240
+ "owner": "workspace",
241
+ "renames": []
242
+ },
243
+ "trt_01KYC06PWV0T9JDATJBR5NW7JX": {
244
+ "bakedName": "LadderEntry",
245
+ "curName": "LadderEntry",
246
+ "id": "trt_01KYC06PWV0T9JDATJBR5NW7JX",
247
+ "kind": "trait",
248
+ "owner": "workspace",
249
+ "renames": []
250
+ },
251
+ "trt_01KYC06PWV9AQNNJGE19F9R8M1": {
252
+ "bakedName": "LadderVerdictSink",
253
+ "curName": "LadderVerdictSink",
254
+ "id": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
255
+ "kind": "trait",
256
+ "owner": "workspace",
257
+ "renames": []
258
+ }
259
+ },
260
+ "schemaVersion": 1
261
+ },
262
+ "name": "std-escalating-decision",
263
+ "orbitals": [
264
+ {
265
+ "auxiliaryEntities": [
266
+ {
267
+ "fields": [
268
+ {
269
+ "default": "",
270
+ "name": "rung",
271
+ "type": "string"
272
+ },
273
+ {
274
+ "default": 0.0,
275
+ "name": "confidence",
276
+ "type": "number"
277
+ },
278
+ {
279
+ "default": "",
280
+ "name": "reasoning",
281
+ "type": "string"
282
+ },
283
+ {
284
+ "default": "",
285
+ "name": "failReason",
286
+ "type": "string"
287
+ },
288
+ {
289
+ "default": "idle",
290
+ "name": "status",
291
+ "type": "string",
292
+ "values": [
293
+ "idle",
294
+ "decided",
295
+ "failed"
296
+ ]
297
+ }
298
+ ],
299
+ "id": "ent_01KYC06PWVTWYDVRXHHJ8H7MBN",
300
+ "name": "LadderVerdict",
301
+ "persistence": "runtime"
302
+ },
303
+ {
304
+ "fields": [
305
+ {
306
+ "default": false,
307
+ "name": "matched",
308
+ "type": "boolean"
309
+ },
310
+ {
311
+ "default": "idle",
312
+ "name": "status",
313
+ "type": "string",
314
+ "values": [
315
+ "idle",
316
+ "checked"
317
+ ]
318
+ }
319
+ ],
320
+ "id": "ent_01KYBV0989A4ZMRWM79R1DK3DB",
321
+ "name": "ExactCheck",
322
+ "persistence": "runtime"
323
+ },
324
+ {
325
+ "fields": [
326
+ {
327
+ "default": false,
328
+ "name": "matched",
329
+ "type": "boolean"
330
+ },
331
+ {
332
+ "default": "idle",
333
+ "name": "status",
334
+ "type": "string",
335
+ "values": [
336
+ "idle",
337
+ "checked"
338
+ ]
339
+ }
340
+ ],
341
+ "id": "ent_01KYBV09899CDQKETN5JFBX4EX",
342
+ "name": "KeyLookup",
343
+ "persistence": "runtime"
344
+ },
345
+ {
346
+ "fields": [
347
+ {
348
+ "default": "",
349
+ "name": "query",
350
+ "type": "string"
351
+ },
352
+ {
353
+ "default": [],
354
+ "items": {
355
+ "type": "string"
356
+ },
357
+ "name": "candidates",
358
+ "type": "array"
359
+ },
360
+ {
361
+ "default": [],
362
+ "items": {
363
+ "items": {
364
+ "type": "number"
365
+ },
366
+ "type": "array"
367
+ },
368
+ "name": "embeddings",
369
+ "type": "array"
370
+ },
371
+ {
372
+ "default": [],
373
+ "items": {
374
+ "type": "number"
375
+ },
376
+ "name": "queryVector",
377
+ "type": "array"
378
+ },
379
+ {
380
+ "default": [],
381
+ "items": {
382
+ "items": {
383
+ "type": "number"
384
+ },
385
+ "type": "array"
386
+ },
387
+ "name": "candidateVectors",
388
+ "type": "array"
389
+ },
390
+ {
391
+ "default": 0.0,
392
+ "name": "matchIndex",
393
+ "type": "number"
394
+ },
395
+ {
396
+ "default": 0.0,
397
+ "name": "matchScore",
398
+ "type": "number"
399
+ },
400
+ {
401
+ "default": 0.0,
402
+ "name": "matchMargin",
403
+ "type": "number"
404
+ },
405
+ {
406
+ "default": "",
407
+ "name": "reason",
408
+ "type": "string"
409
+ },
410
+ {
411
+ "default": {},
412
+ "name": "request",
413
+ "type": "object"
414
+ },
415
+ {
416
+ "default": "idle",
417
+ "name": "status",
418
+ "type": "string",
419
+ "values": [
420
+ "idle",
421
+ "embedding",
422
+ "resolved"
423
+ ]
424
+ }
425
+ ],
426
+ "id": "ent_01KYBV0989DW3WZDZ9G8HMXSJK",
427
+ "name": "SimilarityComparison",
428
+ "persistence": "runtime"
429
+ },
430
+ {
431
+ "fields": [
432
+ {
433
+ "default": {},
434
+ "name": "input",
435
+ "type": "object"
436
+ },
437
+ {
438
+ "default": [],
439
+ "items": {
440
+ "type": "number"
441
+ },
442
+ "name": "output",
443
+ "type": "array"
444
+ },
445
+ {
446
+ "default": 0.0,
447
+ "name": "confidence",
448
+ "type": "number"
449
+ },
450
+ {
451
+ "default": [],
452
+ "items": {
453
+ "type": "object"
454
+ },
455
+ "name": "violations",
456
+ "type": "array"
457
+ },
458
+ {
459
+ "default": "",
460
+ "name": "reason",
461
+ "type": "string"
462
+ },
463
+ {
464
+ "default": {},
465
+ "name": "request",
466
+ "type": "object"
467
+ },
468
+ {
469
+ "default": "idle",
470
+ "name": "status",
471
+ "type": "string",
472
+ "values": [
473
+ "idle",
474
+ "inferring",
475
+ "resolved"
476
+ ]
477
+ }
478
+ ],
479
+ "id": "ent_01KYBV0989Q6EWCA1PPP4KTX75",
480
+ "name": "Inference",
481
+ "persistence": "runtime"
482
+ },
483
+ {
484
+ "fields": [
485
+ {
486
+ "default": "",
487
+ "name": "text",
488
+ "type": "string"
489
+ },
490
+ {
491
+ "default": "",
492
+ "name": "category",
493
+ "type": "string"
494
+ },
495
+ {
496
+ "default": 0.0,
497
+ "name": "confidence",
498
+ "type": "number"
499
+ },
500
+ {
501
+ "default": "",
502
+ "name": "reasoning",
503
+ "type": "string"
504
+ },
505
+ {
506
+ "default": "",
507
+ "name": "errorMessage",
508
+ "type": "string"
509
+ },
510
+ {
511
+ "default": {},
512
+ "name": "request",
513
+ "type": "object"
514
+ },
515
+ {
516
+ "default": "idle",
517
+ "name": "status",
518
+ "type": "string",
519
+ "values": [
520
+ "idle",
521
+ "classifying",
522
+ "done"
523
+ ]
524
+ }
525
+ ],
526
+ "id": "ent_01KYBV0989PA5SP6AT1B01P8PB",
527
+ "name": "ClassifierVerdict",
528
+ "persistence": "runtime"
529
+ }
530
+ ],
531
+ "entity": {
532
+ "fields": [
533
+ {
534
+ "default": "idle",
535
+ "name": "status",
536
+ "type": "string",
537
+ "values": [
538
+ "idle",
539
+ "dispatched"
540
+ ]
541
+ }
542
+ ],
543
+ "id": "ent_01KYC06PWVCKCYJZ2WWNTJ2CE2",
544
+ "name": "LadderRequest",
545
+ "persistence": "runtime"
546
+ },
547
+ "id": "orb_01KYBV0989HAR303D054T6S7FQ",
548
+ "name": "EscalatingDecisionOrbital",
549
+ "pages": [
550
+ {
551
+ "id": "pag_01KYBV0989N4SHACK87Z0W7049",
552
+ "name": "LadderDecidePage",
553
+ "path": "/ladder/decide",
554
+ "traits": [
555
+ {
556
+ "ref": "LadderEntry",
557
+ "refId": "trt_01KYC06PWV0T9JDATJBR5NW7JX"
558
+ },
559
+ {
560
+ "ref": "ExactRung",
561
+ "refId": "trt_01KYBV09897QSSA7A1QCBY7WD7"
562
+ },
563
+ {
564
+ "ref": "LookupRung",
565
+ "refId": "trt_01KYBV0989C4D1RVXG0F91NQEF"
566
+ },
567
+ {
568
+ "ref": "SimilarityRung",
569
+ "refId": "trt_01KYBV0989H8WKSR4F6VEMYBAV"
570
+ },
571
+ {
572
+ "ref": "InferRung",
573
+ "refId": "trt_01KYBV0989NRVM07RKY8T08950"
574
+ },
575
+ {
576
+ "ref": "ClassifyRung",
577
+ "refId": "trt_01KYBV0989745177PBSGRQHX1D"
578
+ },
579
+ {
580
+ "ref": "LadderVerdictSink",
581
+ "refId": "trt_01KYC06PWV9AQNNJGE19F9R8M1"
582
+ }
583
+ ]
584
+ }
585
+ ],
586
+ "traits": [
587
+ {
588
+ "category": "lifecycle",
589
+ "emits": [
590
+ {
591
+ "description": "Starts the ladder at the exact-check rung (R0). request is the whole DECIDE payload, carried down the chain so each rung can project its own inputs.",
592
+ "event": "RUN_EXACT",
593
+ "eventId": "evt_01KYC06PWVBDKHTBEK806HBAE8",
594
+ "payloadSchema": [
595
+ {
596
+ "name": "candidate",
597
+ "required": true,
598
+ "type": "any"
599
+ },
600
+ {
601
+ "name": "key",
602
+ "required": true,
603
+ "type": "any"
604
+ },
605
+ {
606
+ "name": "request",
607
+ "required": true,
608
+ "type": "object"
609
+ }
610
+ ],
611
+ "tier": "secondary"
612
+ }
613
+ ],
614
+ "entityRefIds": {
615
+ "LadderRequest": "ent_01KYC06PWVCKCYJZ2WWNTJ2CE2"
616
+ },
617
+ "id": "trt_01KYC06PWV0T9JDATJBR5NW7JX",
618
+ "linkedEntity": "LadderRequest",
619
+ "linkedEntityId": "ent_01KYC06PWVCKCYJZ2WWNTJ2CE2",
620
+ "name": "LadderEntry",
621
+ "scope": "instance",
622
+ "stateMachine": {
623
+ "events": [
624
+ {
625
+ "id": "evt_01KYC06PWVKV2CQJ63FXJ6Z2VN",
626
+ "key": "INIT",
627
+ "name": "Initialize"
628
+ },
629
+ {
630
+ "description": "Public entry point — decide the candidate, falling through the ladder until a rung can prove the answer. accepted is R1's table; categories is R3's comparison set (R5's closed label set is the ClassifyRung categories knob, a design-time decision rather than a per-request one).",
631
+ "id": "evt_01KYC06PWV8N74BABJ2QMA9TQR",
632
+ "key": "DECIDE",
633
+ "name": "Decide",
634
+ "payloadSchema": [
635
+ {
636
+ "name": "candidate",
637
+ "required": true,
638
+ "type": "any"
639
+ },
640
+ {
641
+ "name": "key",
642
+ "required": true,
643
+ "type": "any"
644
+ },
645
+ {
646
+ "name": "accepted",
647
+ "required": true,
648
+ "type": "[any]"
649
+ },
650
+ {
651
+ "name": "categories",
652
+ "required": true,
653
+ "type": "[string]"
654
+ }
655
+ ],
656
+ "tier": "primary"
657
+ },
658
+ {
659
+ "id": "evt_01KYC06PWV0WNG8YXAXDCSGCMK",
660
+ "key": "RESET",
661
+ "name": "Reset"
662
+ },
663
+ {
664
+ "description": "Starts the ladder at the exact-check rung (R0). request is the whole DECIDE payload, carried down the chain so each rung can project its own inputs.",
665
+ "id": "evt_01KYC06PWVBDKHTBEK806HBAE8",
666
+ "key": "RUN_EXACT",
667
+ "name": "Run Exact",
668
+ "payloadSchema": [
669
+ {
670
+ "name": "candidate",
671
+ "required": true,
672
+ "type": "any"
673
+ },
674
+ {
675
+ "name": "key",
676
+ "required": true,
677
+ "type": "any"
678
+ },
679
+ {
680
+ "name": "request",
681
+ "required": true,
682
+ "type": "object"
683
+ }
684
+ ],
685
+ "tier": "secondary"
686
+ }
687
+ ],
688
+ "states": [
689
+ {
690
+ "isInitial": true,
691
+ "name": "idle"
692
+ },
693
+ {
694
+ "name": "dispatched"
695
+ }
696
+ ],
697
+ "transitions": [
698
+ {
699
+ "effects": [
700
+ [
701
+ "set",
702
+ "@entity.status",
703
+ "idle"
704
+ ]
705
+ ],
706
+ "event": "INIT",
707
+ "eventId": "evt_01KYC06PWVKV2CQJ63FXJ6Z2VN",
708
+ "from": "idle",
709
+ "to": "idle"
710
+ },
711
+ {
712
+ "effects": [
713
+ [
714
+ "set",
715
+ "@entity.status",
716
+ "dispatched"
717
+ ],
718
+ [
719
+ "emit",
720
+ "RUN_EXACT",
721
+ {
722
+ "candidate": "@payload.candidate",
723
+ "key": "@payload.key",
724
+ "request": "@payload"
725
+ }
726
+ ]
727
+ ],
728
+ "event": "DECIDE",
729
+ "eventId": "evt_01KYC06PWV8N74BABJ2QMA9TQR",
730
+ "from": "idle",
731
+ "to": "dispatched"
732
+ },
733
+ {
734
+ "effects": [
735
+ [
736
+ "set",
737
+ "@entity.status",
738
+ "dispatched"
739
+ ]
740
+ ],
741
+ "event": "INIT",
742
+ "eventId": "evt_01KYC06PWVKV2CQJ63FXJ6Z2VN",
743
+ "from": "dispatched",
744
+ "to": "dispatched"
745
+ },
746
+ {
747
+ "effects": [
748
+ [
749
+ "set",
750
+ "@entity.status",
751
+ "idle"
752
+ ]
753
+ ],
754
+ "event": "RESET",
755
+ "eventId": "evt_01KYC06PWV0WNG8YXAXDCSGCMK",
756
+ "from": "dispatched",
757
+ "to": "idle"
758
+ }
759
+ ]
760
+ }
761
+ },
762
+ {
763
+ "id": "trt_01KYBV09897QSSA7A1QCBY7WD7",
764
+ "linkedEntity": "ExactCheck",
765
+ "linkedEntityId": "ent_01KYBV0989A4ZMRWM79R1DK3DB",
766
+ "listens": [
767
+ {
768
+ "event": "RUN_EXACT",
769
+ "source": {
770
+ "kind": "trait",
771
+ "trait": "LadderEntry"
772
+ },
773
+ "triggers": "CHECK"
774
+ }
775
+ ],
776
+ "name": "ExactRung",
777
+ "ref": "Rung0.traits.ExactCheckRun"
778
+ },
779
+ {
780
+ "id": "trt_01KYBV0989C4D1RVXG0F91NQEF",
781
+ "linkedEntity": "KeyLookup",
782
+ "linkedEntityId": "ent_01KYBV09899CDQKETN5JFBX4EX",
783
+ "listens": [
784
+ {
785
+ "event": "EXACT_UNMATCHED",
786
+ "payloadMapping": {
787
+ "accepted": [
788
+ "object/get",
789
+ "@payload.request",
790
+ "accepted"
791
+ ],
792
+ "candidate": "@payload.candidate",
793
+ "request": "@payload.request"
794
+ },
795
+ "source": {
796
+ "kind": "trait",
797
+ "trait": "ExactRung"
798
+ },
799
+ "triggers": "LOOKUP"
800
+ }
801
+ ],
802
+ "name": "LookupRung",
803
+ "ref": "Rung1.traits.LookupRun"
804
+ },
805
+ {
806
+ "id": "trt_01KYBV0989H8WKSR4F6VEMYBAV",
807
+ "linkedEntity": "SimilarityComparison",
808
+ "linkedEntityId": "ent_01KYBV0989DW3WZDZ9G8HMXSJK",
809
+ "listens": [
810
+ {
811
+ "event": "KEY_MISS",
812
+ "payloadMapping": {
813
+ "candidates": [
814
+ "object/get",
815
+ "@payload.request",
816
+ "categories"
817
+ ],
818
+ "query": [
819
+ "str/concat",
820
+ "@payload.candidate"
821
+ ],
822
+ "request": "@payload.request"
823
+ },
824
+ "source": {
825
+ "kind": "trait",
826
+ "trait": "LookupRung"
827
+ },
828
+ "triggers": "COMPARE"
829
+ }
830
+ ],
831
+ "name": "SimilarityRung",
832
+ "ref": "Rung3.traits.SimilarityRun"
833
+ },
834
+ {
835
+ "id": "trt_01KYBV0989NRVM07RKY8T08950",
836
+ "linkedEntity": "Inference",
837
+ "linkedEntityId": "ent_01KYBV0989Q6EWCA1PPP4KTX75",
838
+ "listens": [
839
+ {
840
+ "event": "SIMILARITY_ABSTAINED",
841
+ "payloadMapping": {
842
+ "input": "@payload.request",
843
+ "request": "@payload.request"
844
+ },
845
+ "source": {
846
+ "kind": "trait",
847
+ "trait": "SimilarityRung"
848
+ },
849
+ "triggers": "INFER"
850
+ }
851
+ ],
852
+ "name": "InferRung",
853
+ "ref": "Rung4.traits.InferenceRun"
854
+ },
855
+ {
856
+ "id": "trt_01KYBV0989745177PBSGRQHX1D",
857
+ "linkedEntity": "ClassifierVerdict",
858
+ "linkedEntityId": "ent_01KYBV0989PA5SP6AT1B01P8PB",
859
+ "listens": [
860
+ {
861
+ "event": "INFER_ABSTAINED",
862
+ "payloadMapping": {
863
+ "request": "@payload.request",
864
+ "text": [
865
+ "str/concat",
866
+ [
867
+ "object/get",
868
+ "@payload.request",
869
+ "candidate"
870
+ ]
871
+ ]
872
+ },
873
+ "source": {
874
+ "kind": "trait",
875
+ "trait": "InferRung"
876
+ },
877
+ "triggers": "CLASSIFY"
878
+ }
879
+ ],
880
+ "name": "ClassifyRung",
881
+ "ref": "Rung5.traits.ClassifyRun"
882
+ },
883
+ {
884
+ "category": "lifecycle",
885
+ "emits": [
886
+ {
887
+ "description": "The ladder proved an answer. rung names which one served it: R0 exact, R1 table, R3 retrieved, R4 learned, R5 generative.",
888
+ "event": "DECIDED",
889
+ "eventId": "evt_01KYC06PWVFVEJE5JCZ9QGBTQS",
890
+ "payloadSchema": [
891
+ {
892
+ "name": "rung",
893
+ "required": true,
894
+ "type": "string"
895
+ },
896
+ {
897
+ "name": "confidence",
898
+ "required": true,
899
+ "type": "number"
900
+ },
901
+ {
902
+ "name": "matched",
903
+ "required": true,
904
+ "type": "any"
905
+ },
906
+ {
907
+ "name": "reasoning",
908
+ "required": true,
909
+ "type": "string"
910
+ }
911
+ ],
912
+ "scope": "external",
913
+ "tier": "primary"
914
+ },
915
+ {
916
+ "description": "Even the generative floor (R5) could not answer — the classify service call itself failed.",
917
+ "event": "DECISION_FAILED",
918
+ "eventId": "evt_01KYC06PWVGZ7AWD6PYD2DCZN9",
919
+ "payloadSchema": [
920
+ {
921
+ "name": "reason",
922
+ "required": true,
923
+ "type": "string"
924
+ }
925
+ ],
926
+ "scope": "external",
927
+ "tier": "primary"
928
+ }
929
+ ],
930
+ "entityRefIds": {
931
+ "LadderVerdict": "ent_01KYC06PWVTWYDVRXHHJ8H7MBN"
932
+ },
933
+ "id": "trt_01KYC06PWV9AQNNJGE19F9R8M1",
934
+ "linkedEntity": "LadderVerdict",
935
+ "linkedEntityId": "ent_01KYC06PWVTWYDVRXHHJ8H7MBN",
936
+ "listens": [
937
+ {
938
+ "event": "EXACT_MATCHED",
939
+ "payloadMapping": {
940
+ "key": "@payload.key"
941
+ },
942
+ "source": {
943
+ "kind": "trait",
944
+ "trait": "ExactRung",
945
+ "traitId": "trt_01KYBV09897QSSA7A1QCBY7WD7"
946
+ },
947
+ "triggers": "FROM_EXACT",
948
+ "triggersId": "evt_01KYC06PWVWPQZRX9XD2KYS0WX"
949
+ },
950
+ {
951
+ "event": "KEY_HIT",
952
+ "payloadMapping": {
953
+ "entry": "@payload.entry"
954
+ },
955
+ "source": {
956
+ "kind": "trait",
957
+ "trait": "LookupRung",
958
+ "traitId": "trt_01KYBV0989C4D1RVXG0F91NQEF"
959
+ },
960
+ "triggers": "FROM_LOOKUP",
961
+ "triggersId": "evt_01KYC06PWVBMW1ZPR7WRYECYHJ"
962
+ },
963
+ {
964
+ "event": "SIMILARITY_MATCHED",
965
+ "payloadMapping": {
966
+ "index": "@payload.index",
967
+ "score": "@payload.score"
968
+ },
969
+ "source": {
970
+ "kind": "trait",
971
+ "trait": "SimilarityRung",
972
+ "traitId": "trt_01KYBV0989H8WKSR4F6VEMYBAV"
973
+ },
974
+ "triggers": "FROM_SIMILARITY",
975
+ "triggersId": "evt_01KYC06PWVSQC5XWD4TBQWMYHJ"
976
+ },
977
+ {
978
+ "event": "INFERRED",
979
+ "payloadMapping": {
980
+ "confidence": "@payload.confidence",
981
+ "output": "@payload.output"
982
+ },
983
+ "source": {
984
+ "kind": "trait",
985
+ "trait": "InferRung",
986
+ "traitId": "trt_01KYBV0989NRVM07RKY8T08950"
987
+ },
988
+ "triggers": "FROM_INFER",
989
+ "triggersId": "evt_01KYC06PWVFMCH8Q4XEN2FJGKY"
990
+ },
991
+ {
992
+ "event": "CLASSIFIED",
993
+ "payloadMapping": {
994
+ "category": "@payload.category",
995
+ "confidence": "@payload.confidence",
996
+ "reasoning": "@payload.reasoning"
997
+ },
998
+ "source": {
999
+ "kind": "trait",
1000
+ "trait": "ClassifyRung",
1001
+ "traitId": "trt_01KYBV0989745177PBSGRQHX1D"
1002
+ },
1003
+ "triggers": "FROM_CLASSIFY",
1004
+ "triggersId": "evt_01KYC06PWV50NDP6J22QHK7PWE"
1005
+ },
1006
+ {
1007
+ "event": "CLASSIFY_FAILED",
1008
+ "payloadMapping": {
1009
+ "error": "@payload.error"
1010
+ },
1011
+ "source": {
1012
+ "kind": "trait",
1013
+ "trait": "ClassifyRung",
1014
+ "traitId": "trt_01KYBV0989745177PBSGRQHX1D"
1015
+ },
1016
+ "triggers": "FROM_CLASSIFY_FAILURE",
1017
+ "triggersId": "evt_01KYC06PWVE8S93JMF0J74Y1B8"
1018
+ }
1019
+ ],
1020
+ "name": "LadderVerdictSink",
1021
+ "scope": "instance",
1022
+ "stateMachine": {
1023
+ "events": [
1024
+ {
1025
+ "id": "evt_01KYC06PWVJR97P13P65CMY1XQ",
1026
+ "key": "INIT",
1027
+ "name": "Initialize"
1028
+ },
1029
+ {
1030
+ "id": "evt_01KYC06PWVWPQZRX9XD2KYS0WX",
1031
+ "key": "FROM_EXACT",
1032
+ "name": "From Exact",
1033
+ "payloadSchema": [
1034
+ {
1035
+ "name": "key",
1036
+ "required": true,
1037
+ "type": "any"
1038
+ }
1039
+ ]
1040
+ },
1041
+ {
1042
+ "id": "evt_01KYC06PWVBMW1ZPR7WRYECYHJ",
1043
+ "key": "FROM_LOOKUP",
1044
+ "name": "From Lookup",
1045
+ "payloadSchema": [
1046
+ {
1047
+ "name": "entry",
1048
+ "required": true,
1049
+ "type": "any"
1050
+ }
1051
+ ]
1052
+ },
1053
+ {
1054
+ "id": "evt_01KYC06PWVSQC5XWD4TBQWMYHJ",
1055
+ "key": "FROM_SIMILARITY",
1056
+ "name": "From Similarity",
1057
+ "payloadSchema": [
1058
+ {
1059
+ "name": "index",
1060
+ "required": true,
1061
+ "type": "int"
1062
+ },
1063
+ {
1064
+ "name": "score",
1065
+ "required": true,
1066
+ "type": "float"
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ "id": "evt_01KYC06PWVFMCH8Q4XEN2FJGKY",
1072
+ "key": "FROM_INFER",
1073
+ "name": "From Infer",
1074
+ "payloadSchema": [
1075
+ {
1076
+ "name": "output",
1077
+ "required": true,
1078
+ "type": "[float]"
1079
+ },
1080
+ {
1081
+ "name": "confidence",
1082
+ "required": true,
1083
+ "type": "float"
1084
+ }
1085
+ ]
1086
+ },
1087
+ {
1088
+ "id": "evt_01KYC06PWV50NDP6J22QHK7PWE",
1089
+ "key": "FROM_CLASSIFY",
1090
+ "name": "From Classify",
1091
+ "payloadSchema": [
1092
+ {
1093
+ "name": "category",
1094
+ "required": true,
1095
+ "type": "string"
1096
+ },
1097
+ {
1098
+ "name": "confidence",
1099
+ "required": true,
1100
+ "type": "float"
1101
+ },
1102
+ {
1103
+ "name": "reasoning",
1104
+ "required": true,
1105
+ "type": "string"
1106
+ }
1107
+ ]
1108
+ },
1109
+ {
1110
+ "id": "evt_01KYC06PWVE8S93JMF0J74Y1B8",
1111
+ "key": "FROM_CLASSIFY_FAILURE",
1112
+ "name": "From Classify Failure",
1113
+ "payloadSchema": [
1114
+ {
1115
+ "name": "error",
1116
+ "required": true,
1117
+ "type": "string"
1118
+ }
1119
+ ]
1120
+ },
1121
+ {
1122
+ "id": "evt_01KYC06PWVNY4RACZE4JF4Y2SB",
1123
+ "key": "RESET",
1124
+ "name": "Reset"
1125
+ },
1126
+ {
1127
+ "description": "The ladder proved an answer. rung names which one served it: R0 exact, R1 table, R3 retrieved, R4 learned, R5 generative.",
1128
+ "id": "evt_01KYC06PWVFVEJE5JCZ9QGBTQS",
1129
+ "key": "DECIDED",
1130
+ "name": "Decided",
1131
+ "payloadSchema": [
1132
+ {
1133
+ "name": "rung",
1134
+ "required": true,
1135
+ "type": "string"
1136
+ },
1137
+ {
1138
+ "name": "confidence",
1139
+ "required": true,
1140
+ "type": "number"
1141
+ },
1142
+ {
1143
+ "name": "matched",
1144
+ "required": true,
1145
+ "type": "any"
1146
+ },
1147
+ {
1148
+ "name": "reasoning",
1149
+ "required": true,
1150
+ "type": "string"
1151
+ }
1152
+ ],
1153
+ "tier": "primary"
1154
+ },
1155
+ {
1156
+ "description": "Even the generative floor (R5) could not answer — the classify service call itself failed.",
1157
+ "id": "evt_01KYC06PWVGZ7AWD6PYD2DCZN9",
1158
+ "key": "DECISION_FAILED",
1159
+ "name": "Decision Failed",
1160
+ "payloadSchema": [
1161
+ {
1162
+ "name": "reason",
1163
+ "required": true,
1164
+ "type": "string"
1165
+ }
1166
+ ],
1167
+ "tier": "primary"
1168
+ }
1169
+ ],
1170
+ "states": [
1171
+ {
1172
+ "isInitial": true,
1173
+ "name": "idle"
1174
+ },
1175
+ {
1176
+ "name": "decided"
1177
+ },
1178
+ {
1179
+ "name": "failed"
1180
+ }
1181
+ ],
1182
+ "transitions": [
1183
+ {
1184
+ "effects": [
1185
+ [
1186
+ "set",
1187
+ "@entity.rung",
1188
+ ""
1189
+ ],
1190
+ [
1191
+ "set",
1192
+ "@entity.confidence",
1193
+ 0.0
1194
+ ],
1195
+ [
1196
+ "set",
1197
+ "@entity.reasoning",
1198
+ ""
1199
+ ],
1200
+ [
1201
+ "set",
1202
+ "@entity.failReason",
1203
+ ""
1204
+ ],
1205
+ [
1206
+ "set",
1207
+ "@entity.status",
1208
+ "idle"
1209
+ ]
1210
+ ],
1211
+ "event": "INIT",
1212
+ "eventId": "evt_01KYC06PWVJR97P13P65CMY1XQ",
1213
+ "from": "idle",
1214
+ "to": "idle"
1215
+ },
1216
+ {
1217
+ "effects": [
1218
+ [
1219
+ "set",
1220
+ "@entity.rung",
1221
+ "R0"
1222
+ ],
1223
+ [
1224
+ "set",
1225
+ "@entity.confidence",
1226
+ 1.0
1227
+ ],
1228
+ [
1229
+ "set",
1230
+ "@entity.reasoning",
1231
+ ""
1232
+ ],
1233
+ [
1234
+ "set",
1235
+ "@entity.status",
1236
+ "decided"
1237
+ ],
1238
+ [
1239
+ "emit",
1240
+ "DECIDED",
1241
+ {
1242
+ "confidence": 1.0,
1243
+ "matched": "@payload.key",
1244
+ "reasoning": "",
1245
+ "rung": "R0"
1246
+ }
1247
+ ]
1248
+ ],
1249
+ "event": "FROM_EXACT",
1250
+ "eventId": "evt_01KYC06PWVWPQZRX9XD2KYS0WX",
1251
+ "from": "idle",
1252
+ "to": "decided"
1253
+ },
1254
+ {
1255
+ "effects": [
1256
+ [
1257
+ "set",
1258
+ "@entity.rung",
1259
+ "R1"
1260
+ ],
1261
+ [
1262
+ "set",
1263
+ "@entity.confidence",
1264
+ 1.0
1265
+ ],
1266
+ [
1267
+ "set",
1268
+ "@entity.reasoning",
1269
+ ""
1270
+ ],
1271
+ [
1272
+ "set",
1273
+ "@entity.status",
1274
+ "decided"
1275
+ ],
1276
+ [
1277
+ "emit",
1278
+ "DECIDED",
1279
+ {
1280
+ "confidence": 1.0,
1281
+ "matched": "@payload.entry",
1282
+ "reasoning": "",
1283
+ "rung": "R1"
1284
+ }
1285
+ ]
1286
+ ],
1287
+ "event": "FROM_LOOKUP",
1288
+ "eventId": "evt_01KYC06PWVBMW1ZPR7WRYECYHJ",
1289
+ "from": "idle",
1290
+ "to": "decided"
1291
+ },
1292
+ {
1293
+ "effects": [
1294
+ [
1295
+ "set",
1296
+ "@entity.rung",
1297
+ "R3"
1298
+ ],
1299
+ [
1300
+ "set",
1301
+ "@entity.confidence",
1302
+ "@payload.score"
1303
+ ],
1304
+ [
1305
+ "set",
1306
+ "@entity.reasoning",
1307
+ ""
1308
+ ],
1309
+ [
1310
+ "set",
1311
+ "@entity.status",
1312
+ "decided"
1313
+ ],
1314
+ [
1315
+ "emit",
1316
+ "DECIDED",
1317
+ {
1318
+ "confidence": "@payload.score",
1319
+ "matched": "@payload.index",
1320
+ "reasoning": "",
1321
+ "rung": "R3"
1322
+ }
1323
+ ]
1324
+ ],
1325
+ "event": "FROM_SIMILARITY",
1326
+ "eventId": "evt_01KYC06PWVSQC5XWD4TBQWMYHJ",
1327
+ "from": "idle",
1328
+ "to": "decided"
1329
+ },
1330
+ {
1331
+ "effects": [
1332
+ [
1333
+ "set",
1334
+ "@entity.rung",
1335
+ "R4"
1336
+ ],
1337
+ [
1338
+ "set",
1339
+ "@entity.confidence",
1340
+ "@payload.confidence"
1341
+ ],
1342
+ [
1343
+ "set",
1344
+ "@entity.reasoning",
1345
+ ""
1346
+ ],
1347
+ [
1348
+ "set",
1349
+ "@entity.status",
1350
+ "decided"
1351
+ ],
1352
+ [
1353
+ "emit",
1354
+ "DECIDED",
1355
+ {
1356
+ "confidence": "@payload.confidence",
1357
+ "matched": "@payload.output",
1358
+ "reasoning": "",
1359
+ "rung": "R4"
1360
+ }
1361
+ ]
1362
+ ],
1363
+ "event": "FROM_INFER",
1364
+ "eventId": "evt_01KYC06PWVFMCH8Q4XEN2FJGKY",
1365
+ "from": "idle",
1366
+ "to": "decided"
1367
+ },
1368
+ {
1369
+ "effects": [
1370
+ [
1371
+ "set",
1372
+ "@entity.rung",
1373
+ "R5"
1374
+ ],
1375
+ [
1376
+ "set",
1377
+ "@entity.confidence",
1378
+ "@payload.confidence"
1379
+ ],
1380
+ [
1381
+ "set",
1382
+ "@entity.reasoning",
1383
+ "@payload.reasoning"
1384
+ ],
1385
+ [
1386
+ "set",
1387
+ "@entity.status",
1388
+ "decided"
1389
+ ],
1390
+ [
1391
+ "emit",
1392
+ "DECIDED",
1393
+ {
1394
+ "confidence": "@payload.confidence",
1395
+ "matched": "@payload.category",
1396
+ "reasoning": "@payload.reasoning",
1397
+ "rung": "R5"
1398
+ }
1399
+ ]
1400
+ ],
1401
+ "event": "FROM_CLASSIFY",
1402
+ "eventId": "evt_01KYC06PWV50NDP6J22QHK7PWE",
1403
+ "from": "idle",
1404
+ "to": "decided"
1405
+ },
1406
+ {
1407
+ "effects": [
1408
+ [
1409
+ "set",
1410
+ "@entity.failReason",
1411
+ "@payload.error"
1412
+ ],
1413
+ [
1414
+ "set",
1415
+ "@entity.status",
1416
+ "failed"
1417
+ ],
1418
+ [
1419
+ "emit",
1420
+ "DECISION_FAILED",
1421
+ {
1422
+ "reason": "@payload.error"
1423
+ }
1424
+ ]
1425
+ ],
1426
+ "event": "FROM_CLASSIFY_FAILURE",
1427
+ "eventId": "evt_01KYC06PWVE8S93JMF0J74Y1B8",
1428
+ "from": "idle",
1429
+ "to": "failed"
1430
+ },
1431
+ {
1432
+ "effects": [
1433
+ [
1434
+ "set",
1435
+ "@entity.status",
1436
+ "decided"
1437
+ ]
1438
+ ],
1439
+ "event": "INIT",
1440
+ "eventId": "evt_01KYC06PWVJR97P13P65CMY1XQ",
1441
+ "from": "decided",
1442
+ "to": "decided"
1443
+ },
1444
+ {
1445
+ "effects": [
1446
+ [
1447
+ "set",
1448
+ "@entity.rung",
1449
+ ""
1450
+ ],
1451
+ [
1452
+ "set",
1453
+ "@entity.confidence",
1454
+ 0.0
1455
+ ],
1456
+ [
1457
+ "set",
1458
+ "@entity.reasoning",
1459
+ ""
1460
+ ],
1461
+ [
1462
+ "set",
1463
+ "@entity.failReason",
1464
+ ""
1465
+ ],
1466
+ [
1467
+ "set",
1468
+ "@entity.status",
1469
+ "idle"
1470
+ ]
1471
+ ],
1472
+ "event": "RESET",
1473
+ "eventId": "evt_01KYC06PWVNY4RACZE4JF4Y2SB",
1474
+ "from": "decided",
1475
+ "to": "idle"
1476
+ },
1477
+ {
1478
+ "effects": [
1479
+ [
1480
+ "set",
1481
+ "@entity.status",
1482
+ "failed"
1483
+ ]
1484
+ ],
1485
+ "event": "INIT",
1486
+ "eventId": "evt_01KYC06PWVJR97P13P65CMY1XQ",
1487
+ "from": "failed",
1488
+ "to": "failed"
1489
+ },
1490
+ {
1491
+ "effects": [
1492
+ [
1493
+ "set",
1494
+ "@entity.rung",
1495
+ ""
1496
+ ],
1497
+ [
1498
+ "set",
1499
+ "@entity.confidence",
1500
+ 0.0
1501
+ ],
1502
+ [
1503
+ "set",
1504
+ "@entity.reasoning",
1505
+ ""
1506
+ ],
1507
+ [
1508
+ "set",
1509
+ "@entity.failReason",
1510
+ ""
1511
+ ],
1512
+ [
1513
+ "set",
1514
+ "@entity.status",
1515
+ "idle"
1516
+ ]
1517
+ ],
1518
+ "event": "RESET",
1519
+ "eventId": "evt_01KYC06PWVNY4RACZE4JF4Y2SB",
1520
+ "from": "failed",
1521
+ "to": "idle"
1522
+ }
1523
+ ]
1524
+ }
1525
+ }
1526
+ ],
1527
+ "uses": [
1528
+ {
1529
+ "as": "Rung0",
1530
+ "from": "std/behaviors/std-ml-exact-check"
1531
+ },
1532
+ {
1533
+ "as": "Rung1",
1534
+ "from": "std/behaviors/std-ml-lookup"
1535
+ },
1536
+ {
1537
+ "as": "Rung3",
1538
+ "from": "std/behaviors/std-ml-similarity"
1539
+ },
1540
+ {
1541
+ "as": "Rung4",
1542
+ "from": "std/behaviors/std-ml-infer"
1543
+ },
1544
+ {
1545
+ "as": "Rung5",
1546
+ "from": "std/behaviors/std-ml-classify"
1547
+ }
1548
+ ]
1549
+ }
1550
+ ],
1551
+ "schemaVersion": 1,
1552
+ "version": "1.0.0"
1553
+ }