@almadar/std 16.144.0 → 16.146.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 (124) 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 +166 -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-app-layout.lolo +14 -0
  11. package/behaviors/lolo/ui/core/atoms/std-board.lolo +20 -6
  12. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +23 -6
  13. package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +80 -2
  14. package/behaviors/lolo/ui/core/atoms/std-stats.lolo +1 -1
  15. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +3 -3
  16. package/behaviors/lolo/ui/core/atoms/ui-typography.lolo +1 -1
  17. package/behaviors/lolo/ui/core/molecules/ui-calendar-grid.lolo +18 -0
  18. package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +2 -0
  19. package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +3 -2
  20. package/behaviors/lolo/ui/core/molecules/ui-filter-group.lolo +20 -0
  21. package/behaviors/lolo/ui/core/molecules/ui-search-input.lolo +7 -2
  22. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +3 -2
  23. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +2 -0
  24. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +2 -0
  25. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +2 -0
  26. package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +2 -0
  27. package/behaviors/lolo/ui/game/atoms/std-dungeon-combat.lolo +2 -2
  28. package/behaviors/lolo/ui/game/molecules/std-worldmap-board-2d.lolo +1 -1
  29. package/behaviors/lolo/ui/game/organisms/ui-boardgame-board.lolo +2 -2
  30. package/behaviors/lolo/ui/game/organisms/ui-builder-board.lolo +2 -2
  31. package/behaviors/lolo/ui/game/organisms/ui-debugger-board.lolo +3 -3
  32. package/behaviors/lolo/ui/game/organisms/ui-physics-sandbox-board.lolo +3 -3
  33. package/behaviors/lolo/ui/game/organisms/ui-roguelike-board.lolo +1 -1
  34. package/behaviors/lolo/ui/game/organisms/ui-sequencer-board.lolo +1 -1
  35. package/behaviors/lolo/ui/learning/atoms/std-algo-heapsort.lolo +2 -2
  36. package/behaviors/lolo/ui/learning/atoms/std-algo-mst.lolo +3 -3
  37. package/behaviors/registry/factory-signatures.json +5018 -824
  38. package/behaviors/registry/ml/atoms/std-ml-classify.orb +622 -0
  39. package/behaviors/registry/ml/atoms/std-ml-exact-check.orb +505 -0
  40. package/behaviors/registry/ml/atoms/std-ml-infer.orb +770 -0
  41. package/behaviors/registry/ml/atoms/std-ml-label-capture.orb +367 -0
  42. package/behaviors/registry/ml/atoms/std-ml-lookup.orb +473 -0
  43. package/behaviors/registry/ml/atoms/std-ml-posterior.orb +669 -0
  44. package/behaviors/registry/ml/atoms/std-ml-similarity.orb +917 -0
  45. package/behaviors/registry/ml/molecules/std-escalating-decision.orb +1553 -0
  46. package/behaviors/registry/ml/molecules/std-knowledge-tracing.orb +577 -0
  47. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
  48. package/behaviors/registry/ui/core/atoms/std-board.orb +64 -20
  49. package/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
  50. package/behaviors/registry/ui/core/atoms/std-calendar.orb +213 -3
  51. package/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
  52. package/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +27 -0
  53. package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +25 -12
  54. package/behaviors/registry/ui/core/molecules/ui-data-list.orb +26 -13
  55. package/behaviors/registry/ui/core/molecules/ui-filter-group.orb +86 -0
  56. package/behaviors/registry/ui/core/molecules/ui-search-input.orb +37 -1
  57. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +25 -12
  58. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +13 -0
  59. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +21 -8
  60. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +13 -0
  61. package/behaviors/registry/ui/core/organisms/ui-timeline.orb +13 -0
  62. package/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
  63. package/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
  64. package/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
  65. package/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
  66. package/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
  67. package/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
  68. package/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
  69. package/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
  70. package/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
  71. package/canonical-operators.json +30 -6
  72. package/dist/behaviors/behaviors-embeddings.json +267 -267
  73. package/dist/behaviors/exports-reader.js +2462 -2080
  74. package/dist/behaviors/functions/index.d.ts +725 -1
  75. package/dist/behaviors/functions/index.js +2437 -2081
  76. package/dist/behaviors/index.d.ts +1 -1
  77. package/dist/behaviors/index.js +2463 -2081
  78. package/dist/behaviors/knob-embeddings.json +1 -1
  79. package/dist/behaviors/query.js +2462 -2080
  80. package/dist/behaviors/registry/factory-signatures.json +5018 -824
  81. package/dist/behaviors/registry/ml/atoms/std-ml-classify.orb +622 -0
  82. package/dist/behaviors/registry/ml/atoms/std-ml-exact-check.orb +505 -0
  83. package/dist/behaviors/registry/ml/atoms/std-ml-infer.orb +770 -0
  84. package/dist/behaviors/registry/ml/atoms/std-ml-label-capture.orb +367 -0
  85. package/dist/behaviors/registry/ml/atoms/std-ml-lookup.orb +473 -0
  86. package/dist/behaviors/registry/ml/atoms/std-ml-posterior.orb +669 -0
  87. package/dist/behaviors/registry/ml/atoms/std-ml-similarity.orb +917 -0
  88. package/dist/behaviors/registry/ml/molecules/std-escalating-decision.orb +1553 -0
  89. package/dist/behaviors/registry/ml/molecules/std-knowledge-tracing.orb +577 -0
  90. package/dist/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
  91. package/dist/behaviors/registry/ui/core/atoms/std-board.orb +64 -20
  92. package/dist/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
  93. package/dist/behaviors/registry/ui/core/atoms/std-calendar.orb +213 -3
  94. package/dist/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
  95. package/dist/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +27 -0
  96. package/dist/behaviors/registry/ui/core/molecules/ui-data-grid.orb +25 -12
  97. package/dist/behaviors/registry/ui/core/molecules/ui-data-list.orb +26 -13
  98. package/dist/behaviors/registry/ui/core/molecules/ui-filter-group.orb +86 -0
  99. package/dist/behaviors/registry/ui/core/molecules/ui-search-input.orb +37 -1
  100. package/dist/behaviors/registry/ui/core/molecules/ui-table-view.orb +25 -12
  101. package/dist/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +13 -0
  102. package/dist/behaviors/registry/ui/core/organisms/ui-entity-list.orb +21 -8
  103. package/dist/behaviors/registry/ui/core/organisms/ui-entity-table.orb +13 -0
  104. package/dist/behaviors/registry/ui/core/organisms/ui-timeline.orb +13 -0
  105. package/dist/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
  106. package/dist/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
  107. package/dist/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
  108. package/dist/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
  109. package/dist/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
  110. package/dist/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
  111. package/dist/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
  112. package/dist/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
  113. package/dist/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
  114. package/dist/behaviors-embeddings.json +267 -267
  115. package/dist/index.d.ts +1 -1
  116. package/dist/index.js +2498 -2088
  117. package/dist/knob-embeddings.json +1 -1
  118. package/dist/modules/array.js +28 -0
  119. package/dist/modules/contract.js +4 -4
  120. package/dist/modules/data.js +3 -3
  121. package/dist/modules/index.js +35 -7
  122. package/dist/registry/factory-signatures.json +5018 -824
  123. package/dist/registry.js +35 -7
  124. package/package.json +3 -3
@@ -0,0 +1,622 @@
1
+ {
2
+ "description": "Generative rung (R5) — structured LLM verdict from a closed category set, via the llm.classify service seam. Bottom of the fall-through: always answers or fails, never abstains.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01KYBN0QT3HD015YZ1STMQFY82": {
6
+ "bakedName": "ClassifierVerdict",
7
+ "curName": "ClassifierVerdict",
8
+ "id": "ent_01KYBN0QT3HD015YZ1STMQFY82",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01KYBN0QT30XVF7W16J30ANCMJ": {
14
+ "bakedName": "CLASSIFY",
15
+ "curName": "CLASSIFY",
16
+ "id": "evt_01KYBN0QT30XVF7W16J30ANCMJ",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01KYBN0QT30GWRAF1975RP6W1M",
20
+ "renames": []
21
+ },
22
+ "evt_01KYBN0QT35ZC6DMT51562ZVB7": {
23
+ "bakedName": "CLASSIFIED_RAW",
24
+ "curName": "CLASSIFIED_RAW",
25
+ "id": "evt_01KYBN0QT35ZC6DMT51562ZVB7",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01KYBN0QT30GWRAF1975RP6W1M",
29
+ "renames": []
30
+ },
31
+ "evt_01KYBN0QT3CDGRK7KXX3Q0BZYF": {
32
+ "bakedName": "RESET",
33
+ "curName": "RESET",
34
+ "id": "evt_01KYBN0QT3CDGRK7KXX3Q0BZYF",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01KYBN0QT30GWRAF1975RP6W1M",
38
+ "renames": []
39
+ },
40
+ "evt_01KYBN0QT3EA98HV7HR0KHMATC": {
41
+ "bakedName": "CLASSIFIED",
42
+ "curName": "CLASSIFIED",
43
+ "id": "evt_01KYBN0QT3EA98HV7HR0KHMATC",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01KYBN0QT30GWRAF1975RP6W1M",
47
+ "renames": []
48
+ },
49
+ "evt_01KYBN0QT3KCCWJWNER5MRE69Z": {
50
+ "bakedName": "CLASSIFY_CALL_FAILED",
51
+ "curName": "CLASSIFY_CALL_FAILED",
52
+ "id": "evt_01KYBN0QT3KCCWJWNER5MRE69Z",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01KYBN0QT30GWRAF1975RP6W1M",
56
+ "renames": []
57
+ },
58
+ "evt_01KYBN0QT3SYGKNNR4H6Z4MM0J": {
59
+ "bakedName": "INIT",
60
+ "curName": "INIT",
61
+ "id": "evt_01KYBN0QT3SYGKNNR4H6Z4MM0J",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01KYBN0QT30GWRAF1975RP6W1M",
65
+ "renames": []
66
+ },
67
+ "evt_01KYBN0QT4G0C4HKHV44ZW54NB": {
68
+ "bakedName": "CLASSIFY_FAILED",
69
+ "curName": "CLASSIFY_FAILED",
70
+ "id": "evt_01KYBN0QT4G0C4HKHV44ZW54NB",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01KYBN0QT30GWRAF1975RP6W1M",
74
+ "renames": []
75
+ },
76
+ "orb_01KYBN0QT323PSVR93E1FQ30HN": {
77
+ "bakedName": "MlClassifyOrbital",
78
+ "curName": "MlClassifyOrbital",
79
+ "id": "orb_01KYBN0QT323PSVR93E1FQ30HN",
80
+ "kind": "orbital",
81
+ "owner": "workspace",
82
+ "renames": []
83
+ },
84
+ "pag_01KYBN0QT49SGH6M9XJN4FPTR9": {
85
+ "bakedName": "MlClassifyPage",
86
+ "curName": "MlClassifyPage",
87
+ "id": "pag_01KYBN0QT49SGH6M9XJN4FPTR9",
88
+ "kind": "page",
89
+ "owner": "workspace",
90
+ "renames": []
91
+ },
92
+ "trt_01KYBN0QT30GWRAF1975RP6W1M": {
93
+ "bakedName": "ClassifyRun",
94
+ "curName": "ClassifyRun",
95
+ "id": "trt_01KYBN0QT30GWRAF1975RP6W1M",
96
+ "kind": "trait",
97
+ "owner": "workspace",
98
+ "renames": []
99
+ }
100
+ },
101
+ "schemaVersion": 1
102
+ },
103
+ "name": "std-ml-classify",
104
+ "orbitals": [
105
+ {
106
+ "entity": {
107
+ "fields": [
108
+ {
109
+ "default": "",
110
+ "name": "text",
111
+ "type": "string"
112
+ },
113
+ {
114
+ "default": "",
115
+ "name": "category",
116
+ "type": "string"
117
+ },
118
+ {
119
+ "default": 0.0,
120
+ "name": "confidence",
121
+ "type": "number"
122
+ },
123
+ {
124
+ "default": "",
125
+ "name": "reasoning",
126
+ "type": "string"
127
+ },
128
+ {
129
+ "default": "",
130
+ "name": "errorMessage",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "default": {},
135
+ "name": "request",
136
+ "type": "object"
137
+ },
138
+ {
139
+ "default": "idle",
140
+ "name": "status",
141
+ "type": "string",
142
+ "values": [
143
+ "idle",
144
+ "classifying",
145
+ "done"
146
+ ]
147
+ }
148
+ ],
149
+ "id": "ent_01KYBN0QT3HD015YZ1STMQFY82",
150
+ "name": "ClassifierVerdict",
151
+ "persistence": "runtime"
152
+ },
153
+ "id": "orb_01KYBN0QT323PSVR93E1FQ30HN",
154
+ "name": "MlClassifyOrbital",
155
+ "pages": [
156
+ {
157
+ "id": "pag_01KYBN0QT49SGH6M9XJN4FPTR9",
158
+ "name": "MlClassifyPage",
159
+ "path": "/ml-classify",
160
+ "traits": [
161
+ {
162
+ "ref": "ClassifyRun",
163
+ "refId": "trt_01KYBN0QT30GWRAF1975RP6W1M"
164
+ }
165
+ ]
166
+ }
167
+ ],
168
+ "traits": [
169
+ {
170
+ "category": "lifecycle",
171
+ "config": {
172
+ "categories": {
173
+ "default": [],
174
+ "description": "Closed set of category labels the LLM must choose from",
175
+ "items": {
176
+ "type": "string"
177
+ },
178
+ "label": "Categories",
179
+ "tier": "domain",
180
+ "type": "[string]"
181
+ },
182
+ "model": {
183
+ "default": "",
184
+ "description": "Model override forwarded to the classify call",
185
+ "label": "Model",
186
+ "tier": "infra",
187
+ "type": "string"
188
+ },
189
+ "provider": {
190
+ "default": "",
191
+ "description": "Reserved for provider selection; LLMServiceActions.classify (packages/almadar-llm/src/contracts.ts) takes no provider param today, so this knob is not forwarded to the call",
192
+ "label": "Provider",
193
+ "tier": "infra",
194
+ "type": "string"
195
+ }
196
+ },
197
+ "emits": [
198
+ {
199
+ "description": "Raw llm.classify service result, flattened onto the payload by the call-service effect executor",
200
+ "event": "CLASSIFIED_RAW",
201
+ "eventId": "evt_01KYBN0QT35ZC6DMT51562ZVB7",
202
+ "payloadSchema": [
203
+ {
204
+ "name": "category",
205
+ "required": true,
206
+ "type": "string"
207
+ },
208
+ {
209
+ "name": "confidence",
210
+ "required": true,
211
+ "type": "number"
212
+ },
213
+ {
214
+ "name": "reasoning",
215
+ "required": true,
216
+ "type": "string"
217
+ }
218
+ ],
219
+ "tier": "secondary"
220
+ },
221
+ {
222
+ "description": "call-service classify failure signal",
223
+ "event": "CLASSIFY_CALL_FAILED",
224
+ "eventId": "evt_01KYBN0QT3KCCWJWNER5MRE69Z",
225
+ "payloadSchema": [
226
+ {
227
+ "name": "error",
228
+ "required": true,
229
+ "type": "string"
230
+ }
231
+ ],
232
+ "tier": "secondary"
233
+ },
234
+ {
235
+ "description": "Structured LLM verdict — closed-set category with confidence and reasoning",
236
+ "event": "CLASSIFIED",
237
+ "eventId": "evt_01KYBN0QT3EA98HV7HR0KHMATC",
238
+ "payloadSchema": [
239
+ {
240
+ "name": "category",
241
+ "required": true,
242
+ "type": "string"
243
+ },
244
+ {
245
+ "name": "confidence",
246
+ "required": true,
247
+ "type": "float"
248
+ },
249
+ {
250
+ "name": "reasoning",
251
+ "required": true,
252
+ "type": "string"
253
+ }
254
+ ],
255
+ "scope": "external",
256
+ "tier": "primary"
257
+ },
258
+ {
259
+ "description": "The classify service call failed; this rung never abstains, only answers or fails",
260
+ "event": "CLASSIFY_FAILED",
261
+ "eventId": "evt_01KYBN0QT4G0C4HKHV44ZW54NB",
262
+ "payloadSchema": [
263
+ {
264
+ "name": "error",
265
+ "required": true,
266
+ "type": "string"
267
+ }
268
+ ],
269
+ "scope": "external",
270
+ "tier": "primary"
271
+ }
272
+ ],
273
+ "entityRefIds": {
274
+ "ClassifierVerdict": "ent_01KYBN0QT3HD015YZ1STMQFY82"
275
+ },
276
+ "id": "trt_01KYBN0QT30GWRAF1975RP6W1M",
277
+ "linkedEntity": "ClassifierVerdict",
278
+ "linkedEntityId": "ent_01KYBN0QT3HD015YZ1STMQFY82",
279
+ "name": "ClassifyRun",
280
+ "scope": "instance",
281
+ "stateMachine": {
282
+ "events": [
283
+ {
284
+ "id": "evt_01KYBN0QT3SYGKNNR4H6Z4MM0J",
285
+ "key": "INIT",
286
+ "name": "Initialize"
287
+ },
288
+ {
289
+ "id": "evt_01KYBN0QT30XVF7W16J30ANCMJ",
290
+ "key": "CLASSIFY",
291
+ "name": "Classify",
292
+ "payloadSchema": [
293
+ {
294
+ "name": "text",
295
+ "required": true,
296
+ "type": "string"
297
+ },
298
+ {
299
+ "name": "request",
300
+ "type": "object"
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "description": "Raw llm.classify service result, flattened onto the payload by the call-service effect executor",
306
+ "id": "evt_01KYBN0QT35ZC6DMT51562ZVB7",
307
+ "key": "CLASSIFIED_RAW",
308
+ "name": "Classified Raw",
309
+ "payloadSchema": [
310
+ {
311
+ "name": "category",
312
+ "required": true,
313
+ "type": "string"
314
+ },
315
+ {
316
+ "name": "confidence",
317
+ "required": true,
318
+ "type": "number"
319
+ },
320
+ {
321
+ "name": "reasoning",
322
+ "required": true,
323
+ "type": "string"
324
+ }
325
+ ],
326
+ "tier": "secondary"
327
+ },
328
+ {
329
+ "description": "call-service classify failure signal",
330
+ "id": "evt_01KYBN0QT3KCCWJWNER5MRE69Z",
331
+ "key": "CLASSIFY_CALL_FAILED",
332
+ "name": "Classify Call Failed",
333
+ "payloadSchema": [
334
+ {
335
+ "name": "error",
336
+ "required": true,
337
+ "type": "string"
338
+ }
339
+ ],
340
+ "tier": "secondary"
341
+ },
342
+ {
343
+ "id": "evt_01KYBN0QT3CDGRK7KXX3Q0BZYF",
344
+ "key": "RESET",
345
+ "name": "Reset"
346
+ },
347
+ {
348
+ "description": "Structured LLM verdict — closed-set category with confidence and reasoning",
349
+ "id": "evt_01KYBN0QT3EA98HV7HR0KHMATC",
350
+ "key": "CLASSIFIED",
351
+ "name": "Classified",
352
+ "payloadSchema": [
353
+ {
354
+ "name": "category",
355
+ "required": true,
356
+ "type": "string"
357
+ },
358
+ {
359
+ "name": "confidence",
360
+ "required": true,
361
+ "type": "float"
362
+ },
363
+ {
364
+ "name": "reasoning",
365
+ "required": true,
366
+ "type": "string"
367
+ }
368
+ ],
369
+ "tier": "primary"
370
+ },
371
+ {
372
+ "description": "The classify service call failed; this rung never abstains, only answers or fails",
373
+ "id": "evt_01KYBN0QT4G0C4HKHV44ZW54NB",
374
+ "key": "CLASSIFY_FAILED",
375
+ "name": "Classify Failed",
376
+ "payloadSchema": [
377
+ {
378
+ "name": "error",
379
+ "required": true,
380
+ "type": "string"
381
+ }
382
+ ],
383
+ "tier": "primary"
384
+ }
385
+ ],
386
+ "states": [
387
+ {
388
+ "isInitial": true,
389
+ "name": "idle"
390
+ },
391
+ {
392
+ "name": "classifying"
393
+ },
394
+ {
395
+ "name": "done"
396
+ }
397
+ ],
398
+ "transitions": [
399
+ {
400
+ "effects": [
401
+ [
402
+ "set",
403
+ "@entity.text",
404
+ ""
405
+ ],
406
+ [
407
+ "set",
408
+ "@entity.category",
409
+ ""
410
+ ],
411
+ [
412
+ "set",
413
+ "@entity.confidence",
414
+ 0.0
415
+ ],
416
+ [
417
+ "set",
418
+ "@entity.reasoning",
419
+ ""
420
+ ],
421
+ [
422
+ "set",
423
+ "@entity.errorMessage",
424
+ ""
425
+ ],
426
+ [
427
+ "set",
428
+ "@entity.request",
429
+ {}
430
+ ],
431
+ [
432
+ "set",
433
+ "@entity.status",
434
+ "idle"
435
+ ]
436
+ ],
437
+ "event": "INIT",
438
+ "eventId": "evt_01KYBN0QT3SYGKNNR4H6Z4MM0J",
439
+ "from": "idle",
440
+ "to": "idle"
441
+ },
442
+ {
443
+ "effects": [
444
+ [
445
+ "set",
446
+ "@entity.text",
447
+ "@payload.text"
448
+ ],
449
+ [
450
+ "set",
451
+ "@entity.request",
452
+ "@payload.request"
453
+ ],
454
+ [
455
+ "set",
456
+ "@entity.status",
457
+ "classifying"
458
+ ],
459
+ [
460
+ "call-service",
461
+ "llm",
462
+ "classify",
463
+ {
464
+ "categories": "@config.categories",
465
+ "model": "@config.model",
466
+ "text": "@payload.text"
467
+ },
468
+ {
469
+ "emit": {
470
+ "failure": "CLASSIFY_CALL_FAILED",
471
+ "success": "CLASSIFIED_RAW"
472
+ }
473
+ }
474
+ ]
475
+ ],
476
+ "event": "CLASSIFY",
477
+ "eventId": "evt_01KYBN0QT30XVF7W16J30ANCMJ",
478
+ "from": "idle",
479
+ "to": "classifying"
480
+ },
481
+ {
482
+ "effects": [
483
+ [
484
+ "set",
485
+ "@entity.category",
486
+ "@payload.category"
487
+ ],
488
+ [
489
+ "set",
490
+ "@entity.confidence",
491
+ "@payload.confidence"
492
+ ],
493
+ [
494
+ "set",
495
+ "@entity.reasoning",
496
+ "@payload.reasoning"
497
+ ],
498
+ [
499
+ "set",
500
+ "@entity.status",
501
+ "done"
502
+ ],
503
+ [
504
+ "emit",
505
+ "CLASSIFIED",
506
+ {
507
+ "category": "@entity.category",
508
+ "confidence": "@entity.confidence",
509
+ "reasoning": "@entity.reasoning"
510
+ }
511
+ ]
512
+ ],
513
+ "event": "CLASSIFIED_RAW",
514
+ "eventId": "evt_01KYBN0QT35ZC6DMT51562ZVB7",
515
+ "from": "classifying",
516
+ "to": "done"
517
+ },
518
+ {
519
+ "effects": [
520
+ [
521
+ "set",
522
+ "@entity.category",
523
+ ""
524
+ ],
525
+ [
526
+ "set",
527
+ "@entity.confidence",
528
+ 0.0
529
+ ],
530
+ [
531
+ "set",
532
+ "@entity.reasoning",
533
+ ""
534
+ ],
535
+ [
536
+ "set",
537
+ "@entity.errorMessage",
538
+ "@payload.error"
539
+ ],
540
+ [
541
+ "set",
542
+ "@entity.status",
543
+ "done"
544
+ ],
545
+ [
546
+ "emit",
547
+ "CLASSIFY_FAILED",
548
+ {
549
+ "error": "@entity.errorMessage"
550
+ }
551
+ ]
552
+ ],
553
+ "event": "CLASSIFY_CALL_FAILED",
554
+ "eventId": "evt_01KYBN0QT3KCCWJWNER5MRE69Z",
555
+ "from": "classifying",
556
+ "to": "done"
557
+ },
558
+ {
559
+ "effects": [
560
+ [
561
+ "set",
562
+ "@entity.status",
563
+ "done"
564
+ ]
565
+ ],
566
+ "event": "INIT",
567
+ "eventId": "evt_01KYBN0QT3SYGKNNR4H6Z4MM0J",
568
+ "from": "done",
569
+ "to": "done"
570
+ },
571
+ {
572
+ "effects": [
573
+ [
574
+ "set",
575
+ "@entity.text",
576
+ ""
577
+ ],
578
+ [
579
+ "set",
580
+ "@entity.category",
581
+ ""
582
+ ],
583
+ [
584
+ "set",
585
+ "@entity.confidence",
586
+ 0.0
587
+ ],
588
+ [
589
+ "set",
590
+ "@entity.reasoning",
591
+ ""
592
+ ],
593
+ [
594
+ "set",
595
+ "@entity.errorMessage",
596
+ ""
597
+ ],
598
+ [
599
+ "set",
600
+ "@entity.request",
601
+ {}
602
+ ],
603
+ [
604
+ "set",
605
+ "@entity.status",
606
+ "idle"
607
+ ]
608
+ ],
609
+ "event": "RESET",
610
+ "eventId": "evt_01KYBN0QT3CDGRK7KXX3Q0BZYF",
611
+ "from": "done",
612
+ "to": "idle"
613
+ }
614
+ ]
615
+ }
616
+ }
617
+ ]
618
+ }
619
+ ],
620
+ "schemaVersion": 1,
621
+ "version": "1.0.0"
622
+ }