flowspec2 1.0.0__py3-none-any.whl

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 (92) hide show
  1. flowspec2/__init__.py +105 -0
  2. flowspec2/authoring/__init__.py +275 -0
  3. flowspec2/authoring/authoring-evidence-signature.schema.json +34 -0
  4. flowspec2/authoring/authoring-evidence.schema.json +455 -0
  5. flowspec2/authoring/authoring-operational-evidence.schema.json +160 -0
  6. flowspec2/authoring/benchmark.py +1409 -0
  7. flowspec2/authoring/corpus/await_correction.case.json +220 -0
  8. flowspec2/authoring/corpus/flowspec2.ctk.json +769 -0
  9. flowspec2/authoring/corpus/gated_derive.case.json +100 -0
  10. flowspec2/authoring/corpus/linear.case.json +55 -0
  11. flowspec2/authoring/corpus/manifest.json +31 -0
  12. flowspec2/authoring/corpus/subflow.case.json +66 -0
  13. flowspec2/authoring/corpus/terminal.case.json +94 -0
  14. flowspec2/authoring/corpus.py +307 -0
  15. flowspec2/authoring/ctk.py +836 -0
  16. flowspec2/authoring/detached_signature.py +120 -0
  17. flowspec2/authoring/evidence.py +311 -0
  18. flowspec2/authoring/evidence_signature.py +187 -0
  19. flowspec2/authoring/evidence_verification.py +229 -0
  20. flowspec2/authoring/gemini.py +215 -0
  21. flowspec2/authoring/operational-corpus.json +61 -0
  22. flowspec2/authoring/operational.py +956 -0
  23. flowspec2/authoring/operational_providers.py +167 -0
  24. flowspec2/authoring/presentation_review.py +1013 -0
  25. flowspec2/authoring/presentation_review_signature.py +305 -0
  26. flowspec2/authoring/projection.py +299 -0
  27. flowspec2/authoring/provider_prompt.py +83 -0
  28. flowspec2/backends/__init__.py +82 -0
  29. flowspec2/backends/http.py +189 -0
  30. flowspec2/checker.py +238 -0
  31. flowspec2/cli.py +789 -0
  32. flowspec2/cli_parser.py +345 -0
  33. flowspec2/clock.py +23 -0
  34. flowspec2/compat/__init__.py +47 -0
  35. flowspec2/compat/models.py +82 -0
  36. flowspec2/compat/open_workflow.py +616 -0
  37. flowspec2/compat/rasa.py +19 -0
  38. flowspec2/compat/rasa_export.py +876 -0
  39. flowspec2/compat/rasa_import.py +992 -0
  40. flowspec2/compat/rasa_shared.py +270 -0
  41. flowspec2/compat/schemas/open-workflow-conversation-1.schema.json +138 -0
  42. flowspec2/compat/schemas/vendor/open-workflow-1.0.3.LICENSE +201 -0
  43. flowspec2/compat/schemas/vendor/open-workflow-1.0.3.provenance.json +13 -0
  44. flowspec2/compat/schemas/vendor/open-workflow-1.0.3.workflow.yaml +1956 -0
  45. flowspec2/compat/tool_profiles.py +149 -0
  46. flowspec2/compat/yaml.py +147 -0
  47. flowspec2/compiler.py +957 -0
  48. flowspec2/compiler_contracts.py +17 -0
  49. flowspec2/compiler_resume_contracts.py +594 -0
  50. flowspec2/compiler_schema_relations.py +1830 -0
  51. flowspec2/compiler_tool_contracts.py +245 -0
  52. flowspec2/compiler_value_contracts.py +447 -0
  53. flowspec2/derive.py +32 -0
  54. flowspec2/diagnostics.py +94 -0
  55. flowspec2/domains.py +489 -0
  56. flowspec2/experimental/__init__.py +57 -0
  57. flowspec2/experimental/flowspec-3-draft.schema.json +923 -0
  58. flowspec2/experimental/v3-preview-loss-policy.json +161 -0
  59. flowspec2/experimental/v3_lowering.py +928 -0
  60. flowspec2/experimental/v3_preview.py +2460 -0
  61. flowspec2/flowspec-2.schema.json +635 -0
  62. flowspec2/interactive.py +300 -0
  63. flowspec2/ir.py +1459 -0
  64. flowspec2/json_codec.py +120 -0
  65. flowspec2/llm.py +366 -0
  66. flowspec2/models.py +121 -0
  67. flowspec2/nodes.py +1537 -0
  68. flowspec2/observability.py +151 -0
  69. flowspec2/predicates.py +89 -0
  70. flowspec2/profiles.py +118 -0
  71. flowspec2/py.typed +0 -0
  72. flowspec2/runtime.py +1059 -0
  73. flowspec2/schema.py +54 -0
  74. flowspec2/schema_contracts.py +203 -0
  75. flowspec2/semantic_derive_contracts.py +530 -0
  76. flowspec2/semantic_path_contracts.py +528 -0
  77. flowspec2/semantic_predicate_contracts.py +355 -0
  78. flowspec2/semantic_schema_contracts.py +137 -0
  79. flowspec2/semantic_source_contracts.py +21 -0
  80. flowspec2/semantic_state_contracts.py +450 -0
  81. flowspec2/semantic_support.py +40 -0
  82. flowspec2/semantics.py +410 -0
  83. flowspec2/state_migration.py +1034 -0
  84. flowspec2/subflows/__init__.py +1117 -0
  85. flowspec2/subflows/address.py +328 -0
  86. flowspec2/subflows/identification.py +1031 -0
  87. flowspec2/tools.py +1154 -0
  88. flowspec2-1.0.0.dist-info/METADATA +482 -0
  89. flowspec2-1.0.0.dist-info/RECORD +92 -0
  90. flowspec2-1.0.0.dist-info/WHEEL +4 -0
  91. flowspec2-1.0.0.dist-info/entry_points.txt +2 -0
  92. flowspec2-1.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,769 @@
1
+ {
2
+ "format": "flowspec2/ctk-corpus",
3
+ "version": "1",
4
+ "cases": [
5
+ {
6
+ "identifier": "linear_valid_runtime",
7
+ "source": {
8
+ "path": "linear.case.json",
9
+ "pointer": "/source"
10
+ },
11
+ "expected": {
12
+ "compilation": "succeeded",
13
+ "diagnostics": [],
14
+ "ir": {
15
+ "ir_format": "flowspec2/ir@1",
16
+ "flow": "linear_maintenance_request",
17
+ "version": "1.0.0",
18
+ "source_digest": "8d0fc6b9e48ed28092d670b9ae0fd3fadc8dfbc17f73c2f3104ef64a55af343f",
19
+ "profile_digest": "23a6b3f9d68730770f2eeef4ea80ab3fd9bfe526cbf47117240c1f526987174a",
20
+ "dependency_digest": "fedc868783841382d0969ddb2c3d84a886bba6406e2d978cf64185bb16e013ec",
21
+ "digest": "b829dd1981d2d11cac40de240753e65ecbe2fde16333a57d32e1270b93945b8a",
22
+ "canonical_document_digest": "7ef8e510c22e58c1746488adade9c17da2a127bab62c37acc9c6c7d73afb2acf",
23
+ "canonical_execution_ir_digest": "43c3708bf68b342bc5da9dd9a6f8c28876cbc3fb8babb98a0471bc109d663c95",
24
+ "canonical_ir_digest": "34fe81e3c3511b54d3b6bb30f934c42e47fbab24f6b225665dd7f8d3fe618bbf"
25
+ }
26
+ },
27
+ "turns": [
28
+ {
29
+ "payload": {},
30
+ "expected_trace": {
31
+ "agent_response": {
32
+ "description": "Describe the maintenance request.",
33
+ "payload_schema": {
34
+ "properties": {
35
+ "request_description": {
36
+ "description": "Set request_description to only the text inside `ZETA=[...]`; ignore `ALPHA=[...]`.",
37
+ "minLength": 1,
38
+ "title": "Request Description",
39
+ "type": "string"
40
+ }
41
+ },
42
+ "required": [
43
+ "request_description"
44
+ ],
45
+ "title": "Slot_request_description",
46
+ "type": "object"
47
+ }
48
+ },
49
+ "data": {},
50
+ "status": "progress"
51
+ }
52
+ },
53
+ {
54
+ "payload": {
55
+ "request_description": "Broken streetlight cover"
56
+ },
57
+ "expected_trace": {
58
+ "agent_response": {
59
+ "description": "Service completed successfully."
60
+ },
61
+ "data": {
62
+ "request_description": "Broken streetlight cover"
63
+ },
64
+ "status": "completed"
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "identifier": "structural_diagnostic_order",
71
+ "source": {
72
+ "path": "linear.case.json",
73
+ "pointer": "/source",
74
+ "mutations": [
75
+ {
76
+ "path": "/flow",
77
+ "replacement": "Invalid Flow"
78
+ },
79
+ {
80
+ "path": "/version",
81
+ "replacement": "2"
82
+ },
83
+ {
84
+ "path": "/unexpected",
85
+ "replacement": true
86
+ }
87
+ ]
88
+ },
89
+ "expected": {
90
+ "compilation": "skipped",
91
+ "diagnostics": [
92
+ {
93
+ "code": "FLOWSPEC_SCHEMA_ADDITIONALPROPERTIES",
94
+ "severity": "error",
95
+ "path": ""
96
+ },
97
+ {
98
+ "code": "FLOWSPEC_SCHEMA_PATTERN",
99
+ "severity": "error",
100
+ "path": "/flow"
101
+ },
102
+ {
103
+ "code": "FLOWSPEC_SCHEMA_PATTERN",
104
+ "severity": "error",
105
+ "path": "/version"
106
+ }
107
+ ]
108
+ }
109
+ },
110
+ {
111
+ "identifier": "terminal_success_runtime",
112
+ "source": {
113
+ "path": "terminal.case.json",
114
+ "pointer": "/source"
115
+ },
116
+ "expected": {
117
+ "compilation": "succeeded",
118
+ "diagnostics": [],
119
+ "ir": {
120
+ "ir_format": "flowspec2/ir@1",
121
+ "flow": "terminal_ticket_fulfillment",
122
+ "version": "1.0.0",
123
+ "source_digest": "83e568f2a863896f682ff5735b909c0e648f18b71f5676238f1e0ead2e9c61a2",
124
+ "profile_digest": "23a6b3f9d68730770f2eeef4ea80ab3fd9bfe526cbf47117240c1f526987174a",
125
+ "dependency_digest": "28d277364117b2aa6aff8e6a5672d20e2d5dd738eab5181965abc4cdd8240ff2",
126
+ "digest": "a5b339137a821e49076f231fa10616614d4a905f0fffc3849b8ca63aa5c488d5",
127
+ "canonical_document_digest": "3b845b53c8a28d2ae81193ab9514beea0f42b04557fad83a492fbad1f4ccc53c",
128
+ "canonical_execution_ir_digest": "29c6f454aedf586eb26e64c7c837196f68c61bba1f1f2081ac876c5fceddfd73",
129
+ "canonical_ir_digest": "4cf2d33c77f20578082ade701de1365c4108ad4331a654bb7765b4072a461d78"
130
+ }
131
+ },
132
+ "turns": [
133
+ {
134
+ "payload": {},
135
+ "expected_trace": {
136
+ "agent_response": {
137
+ "description": "Describe the service problem.",
138
+ "payload_schema": {
139
+ "properties": {
140
+ "problem_description": {
141
+ "description": "Value for problem_description.",
142
+ "minLength": 1,
143
+ "title": "Problem Description",
144
+ "type": "string"
145
+ }
146
+ },
147
+ "required": [
148
+ "problem_description"
149
+ ],
150
+ "title": "Slot_problem_description",
151
+ "type": "object"
152
+ }
153
+ },
154
+ "data": {},
155
+ "status": "progress"
156
+ }
157
+ },
158
+ {
159
+ "payload": {
160
+ "problem_description": "Broken signal cabinet"
161
+ },
162
+ "expected_trace": {
163
+ "agent_response": {
164
+ "description": "Service request opened successfully."
165
+ },
166
+ "data": {
167
+ "_reset_on_next_call": true,
168
+ "problem_description": "Broken signal cabinet",
169
+ "protocol_id": "REQ-F76922174F"
170
+ },
171
+ "status": "completed"
172
+ }
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "identifier": "address_subflow_runtime",
178
+ "source": {
179
+ "path": "subflow.case.json",
180
+ "pointer": "/source"
181
+ },
182
+ "expected": {
183
+ "compilation": "succeeded",
184
+ "diagnostics": [],
185
+ "ir": {
186
+ "ir_format": "flowspec2/ir@1",
187
+ "flow": "address_collection",
188
+ "version": "1.0.0",
189
+ "source_digest": "01822a8b6076ebf5ff3700bf514e7ffeaf23145d622b433ab3a9ddfc3d785476",
190
+ "profile_digest": "23a6b3f9d68730770f2eeef4ea80ab3fd9bfe526cbf47117240c1f526987174a",
191
+ "dependency_digest": "384884639482b9b9f5e41eeb838de89c87c746ef256527a767f365cb331e77fc",
192
+ "digest": "6e23e4bcb3b90bca2e1f1702ee712d7b95ce62f2568d6766ad8d4c114ced225d",
193
+ "canonical_document_digest": "e27e8450d91c841314af83b3b2a3e27bfa8a868ec476b3e6f62beaaa5d449c65",
194
+ "canonical_execution_ir_digest": "8f57129781114ef317a9e1007a5ddb957ff0bd7a92a2484aacc1b4115549da04",
195
+ "canonical_ir_digest": "cb416119846d9cf7e13f8159a151fd3f0ed70aaa16a9a89753c9a08d2a7dcd22"
196
+ }
197
+ },
198
+ "turns": [
199
+ {
200
+ "payload": {},
201
+ "expected_trace": {
202
+ "agent_response": {
203
+ "description": "Add an optional nearby reference point.",
204
+ "payload_schema": {
205
+ "properties": {
206
+ "reference_note": {
207
+ "description": "Value for reference_note. Use null when the citizen chooses not to provide this optional value.",
208
+ "title": "Reference Note",
209
+ "type": [
210
+ "string",
211
+ "null"
212
+ ]
213
+ }
214
+ },
215
+ "required": [
216
+ "reference_note"
217
+ ],
218
+ "title": "Slot_reference_note",
219
+ "type": "object"
220
+ }
221
+ },
222
+ "data": {},
223
+ "status": "progress"
224
+ }
225
+ },
226
+ {
227
+ "payload": {
228
+ "reference_note": "Near the public school"
229
+ },
230
+ "expected_trace": {
231
+ "agent_response": {
232
+ "description": "What is the complete address (street, number, and district)?",
233
+ "payload_schema": {
234
+ "properties": {
235
+ "address": {
236
+ "description": "Complete address: street, number, and district.",
237
+ "type": "string"
238
+ }
239
+ },
240
+ "required": [
241
+ "address"
242
+ ],
243
+ "type": "object"
244
+ }
245
+ },
246
+ "data": {
247
+ "reference_note": "Near the public school"
248
+ },
249
+ "status": "progress"
250
+ }
251
+ },
252
+ {
253
+ "payload": {
254
+ "address": "Flower Street, 100"
255
+ },
256
+ "expected_trace": {
257
+ "agent_response": {
258
+ "description": "Do you confirm the address: Flower Street, 100, Downtown?"
259
+ },
260
+ "data": {
261
+ "address": {
262
+ "city": "Example City",
263
+ "district": "Downtown",
264
+ "kind": "street",
265
+ "street": "Flower Street, 100"
266
+ },
267
+ "address_needs_confirmation": true,
268
+ "reference_note": "Near the public school"
269
+ },
270
+ "status": "progress"
271
+ }
272
+ },
273
+ {
274
+ "payload": {
275
+ "confirmation": "yes"
276
+ },
277
+ "expected_trace": {
278
+ "agent_response": {
279
+ "description": "Service completed successfully."
280
+ },
281
+ "data": {
282
+ "address": {
283
+ "city": "Example City",
284
+ "district": "Downtown",
285
+ "kind": "street",
286
+ "street": "Flower Street, 100"
287
+ },
288
+ "address_completed": true,
289
+ "address_confirmed": true,
290
+ "address_needs_confirmation": true,
291
+ "reference_note": "Near the public school"
292
+ },
293
+ "status": "completed"
294
+ }
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ "identifier": "typed_external_resume_policies",
300
+ "source": {
301
+ "path": "await_correction.case.json",
302
+ "pointer": "/source"
303
+ },
304
+ "expected": {
305
+ "compilation": "succeeded",
306
+ "diagnostics": [],
307
+ "ir": {
308
+ "ir_format": "flowspec2/ir@1",
309
+ "flow": "authenticated_correctable_request",
310
+ "version": "1.0.0",
311
+ "source_digest": "5c25b971365e8b220920a336bdfc6799381aa626b40ba2475545a402cccd2581",
312
+ "profile_digest": "23a6b3f9d68730770f2eeef4ea80ab3fd9bfe526cbf47117240c1f526987174a",
313
+ "dependency_digest": "9ec5cc56324901ee4dcd252d3184357c6cdecc164396d486dbe86fe79a6c9f78",
314
+ "digest": "b33cc512d2b41f120e658ddd785db6c94df54c32477acf931af0b44270395a0b",
315
+ "canonical_document_digest": "05aab89f0959881f79b49bedc0211043a27ec5922b83b7988521c3d4701f6e56",
316
+ "canonical_execution_ir_digest": "dfa0caab1ec1a07e7d608c492e9e99fdbf8b5a0a5e4d5e52c224233846b017ff",
317
+ "canonical_ir_digest": "947e147ce19e390ab0172d6270c7c8d13aa1cd34d07ebd4e3835a094ae19b5d2"
318
+ }
319
+ },
320
+ "turns": [
321
+ {
322
+ "payload": {},
323
+ "expected_trace": {
324
+ "agent_response": {
325
+ "description": "Describe your request.",
326
+ "payload_schema": {
327
+ "properties": {
328
+ "request_description": {
329
+ "description": "Value for request_description.",
330
+ "minLength": 1,
331
+ "title": "Request Description",
332
+ "type": "string"
333
+ }
334
+ },
335
+ "required": [
336
+ "request_description"
337
+ ],
338
+ "title": "Slot_request_description",
339
+ "type": "object"
340
+ }
341
+ },
342
+ "data": {},
343
+ "status": "progress"
344
+ }
345
+ },
346
+ {
347
+ "payload": {
348
+ "request_description": "Broken accessibility ramp"
349
+ },
350
+ "expected_trace": {
351
+ "agent_response": {
352
+ "description": "Authenticate to continue.",
353
+ "interactive": {
354
+ "field": "authentication_token",
355
+ "kind": "cta_url",
356
+ "next_step": "authenticate_requester",
357
+ "out_of_band": true,
358
+ "out_of_band_sent": true,
359
+ "resume_contract": {
360
+ "correlation": "$token.brazilian_tax_id",
361
+ "deadline": "2025-01-01T00:15:00+00:00",
362
+ "digest": "387fb72570a25e5de4f5ff1ff259b05aabb3cac8e3a7c77d976dfbf276e14eba",
363
+ "duplicate": "ignore",
364
+ "late": "reject",
365
+ "version": "1"
366
+ }
367
+ }
368
+ },
369
+ "data": {
370
+ "request_description": "Broken accessibility ramp"
371
+ },
372
+ "status": "progress"
373
+ }
374
+ },
375
+ {
376
+ "payload": {
377
+ "authentication_token": {
378
+ "brazilian_tax_id": "12345678909"
379
+ }
380
+ },
381
+ "expected_trace": {
382
+ "agent_response": {
383
+ "description": "Do you confirm the request details?",
384
+ "interactive": {
385
+ "body": "Do you confirm the request details?",
386
+ "buttons": [
387
+ {
388
+ "id": "true",
389
+ "title": "Yes"
390
+ },
391
+ {
392
+ "id": "false",
393
+ "title": "No"
394
+ }
395
+ ],
396
+ "field": "ticket_data_confirmed"
397
+ },
398
+ "payload_schema": {
399
+ "properties": {
400
+ "ticket_data_confirmed": {
401
+ "description": "Interpret as a boolean: true for yes/affirmative, false for no/negative.",
402
+ "title": "Ticket Data Confirmed",
403
+ "type": "boolean"
404
+ }
405
+ },
406
+ "required": [
407
+ "ticket_data_confirmed"
408
+ ],
409
+ "title": "Slot_ticket_data_confirmed",
410
+ "type": "object",
411
+ "x-flowspec2-correction-targets": [
412
+ "request_description"
413
+ ]
414
+ }
415
+ },
416
+ "data": {
417
+ "request_description": "Broken accessibility ramp"
418
+ },
419
+ "status": "progress"
420
+ }
421
+ },
422
+ {
423
+ "payload": {
424
+ "authentication_token": {
425
+ "brazilian_tax_id": "12345678909"
426
+ }
427
+ },
428
+ "expected_trace": {
429
+ "agent_response": {
430
+ "description": "Do you confirm the request details?",
431
+ "interactive": {
432
+ "body": "Do you confirm the request details?",
433
+ "buttons": [
434
+ {
435
+ "id": "true",
436
+ "title": "Yes"
437
+ },
438
+ {
439
+ "id": "false",
440
+ "title": "No"
441
+ }
442
+ ],
443
+ "field": "ticket_data_confirmed"
444
+ },
445
+ "payload_schema": {
446
+ "properties": {
447
+ "ticket_data_confirmed": {
448
+ "description": "Interpret as a boolean: true for yes/affirmative, false for no/negative.",
449
+ "title": "Ticket Data Confirmed",
450
+ "type": "boolean"
451
+ }
452
+ },
453
+ "required": [
454
+ "ticket_data_confirmed"
455
+ ],
456
+ "title": "Slot_ticket_data_confirmed",
457
+ "type": "object",
458
+ "x-flowspec2-correction-targets": [
459
+ "request_description"
460
+ ]
461
+ }
462
+ },
463
+ "data": {
464
+ "request_description": "Broken accessibility ramp"
465
+ },
466
+ "status": "progress"
467
+ }
468
+ },
469
+ {
470
+ "payload": {
471
+ "authentication_token": {
472
+ "brazilian_tax_id": "98765432100"
473
+ }
474
+ },
475
+ "expected_trace": {
476
+ "agent_response": {
477
+ "description": "",
478
+ "error_message": "await_external 'authenticate_requester' rejected late resume delivery"
479
+ },
480
+ "data": {
481
+ "request_description": "Broken accessibility ramp"
482
+ },
483
+ "status": "error"
484
+ }
485
+ }
486
+ ]
487
+ },
488
+ {
489
+ "identifier": "gated_derivation_gate_true_runtime",
490
+ "source": {
491
+ "path": "gated_derive.case.json",
492
+ "pointer": "/source"
493
+ },
494
+ "expected": {
495
+ "compilation": "succeeded",
496
+ "diagnostics": [],
497
+ "ir": {
498
+ "ir_format": "flowspec2/ir@1",
499
+ "flow": "gated_issue_classification",
500
+ "version": "1.0.0",
501
+ "source_digest": "bef43034d203f38584eff3548e3773f5b5bb4604a2706a61ce5334ba3d67de34",
502
+ "profile_digest": "23a6b3f9d68730770f2eeef4ea80ab3fd9bfe526cbf47117240c1f526987174a",
503
+ "dependency_digest": "a5c83f35e8179f308288eea31dcc88d17e4ac772bbaad5ddea5cc74d150e56bb",
504
+ "digest": "6a547da9a5f979988ed9c1f6110c8396020e39bbb091e9f65fbd1c457e563f45",
505
+ "canonical_document_digest": "3f4aeaf54a2d3e5069384d8d12905322f85599de19e3ea2116f4d60daa7a480b",
506
+ "canonical_execution_ir_digest": "a05696459b4c46e24d681b6b48f53ef69b974166771beaec174e3b300cc134b7",
507
+ "canonical_ir_digest": "9e65c746f797b8fad8b18a1aa02e8ec6b6380f413aed2ffde2daed28c58d74e3"
508
+ }
509
+ },
510
+ "turns": [
511
+ {
512
+ "payload": {},
513
+ "expected_trace": {
514
+ "agent_response": {
515
+ "description": "Which type of issue are you reporting?",
516
+ "payload_schema": {
517
+ "properties": {
518
+ "issue_category": {
519
+ "description": "Interpret the user's input and return ONLY one closed value: Pothole, Obstruction.",
520
+ "enum": [
521
+ "Pothole",
522
+ "Obstruction"
523
+ ],
524
+ "title": "Issue Category",
525
+ "type": "string"
526
+ }
527
+ },
528
+ "required": [
529
+ "issue_category"
530
+ ],
531
+ "title": "Slot_issue_category",
532
+ "type": "object"
533
+ }
534
+ },
535
+ "data": {},
536
+ "status": "progress"
537
+ }
538
+ },
539
+ {
540
+ "payload": {
541
+ "issue_category": "Pothole"
542
+ },
543
+ "expected_trace": {
544
+ "agent_response": {
545
+ "description": "How large is the pothole?",
546
+ "payload_schema": {
547
+ "properties": {
548
+ "issue_detail": {
549
+ "description": "Interpret the user's input and return ONLY one closed value: Small, Large.",
550
+ "enum": [
551
+ "Small",
552
+ "Large"
553
+ ],
554
+ "title": "Issue Detail",
555
+ "type": "string"
556
+ }
557
+ },
558
+ "required": [
559
+ "issue_detail"
560
+ ],
561
+ "title": "Slot_issue_detail",
562
+ "type": "object"
563
+ }
564
+ },
565
+ "data": {
566
+ "issue_category": "Pothole"
567
+ },
568
+ "status": "progress"
569
+ }
570
+ },
571
+ {
572
+ "payload": {
573
+ "issue_detail": "Small"
574
+ },
575
+ "expected_trace": {
576
+ "agent_response": {
577
+ "description": "Service completed successfully."
578
+ },
579
+ "data": {
580
+ "backend_classification": "POTHOLE_SMALL",
581
+ "issue_category": "Pothole",
582
+ "issue_detail": "Small"
583
+ },
584
+ "status": "completed"
585
+ }
586
+ }
587
+ ]
588
+ },
589
+ {
590
+ "identifier": "gated_derivation_gate_false_runtime",
591
+ "source": {
592
+ "path": "gated_derive.case.json",
593
+ "pointer": "/source"
594
+ },
595
+ "expected": {
596
+ "compilation": "succeeded",
597
+ "diagnostics": [],
598
+ "ir": {
599
+ "ir_format": "flowspec2/ir@1",
600
+ "flow": "gated_issue_classification",
601
+ "version": "1.0.0",
602
+ "source_digest": "bef43034d203f38584eff3548e3773f5b5bb4604a2706a61ce5334ba3d67de34",
603
+ "profile_digest": "23a6b3f9d68730770f2eeef4ea80ab3fd9bfe526cbf47117240c1f526987174a",
604
+ "dependency_digest": "a5c83f35e8179f308288eea31dcc88d17e4ac772bbaad5ddea5cc74d150e56bb",
605
+ "digest": "6a547da9a5f979988ed9c1f6110c8396020e39bbb091e9f65fbd1c457e563f45",
606
+ "canonical_document_digest": "3f4aeaf54a2d3e5069384d8d12905322f85599de19e3ea2116f4d60daa7a480b",
607
+ "canonical_execution_ir_digest": "a05696459b4c46e24d681b6b48f53ef69b974166771beaec174e3b300cc134b7",
608
+ "canonical_ir_digest": "9e65c746f797b8fad8b18a1aa02e8ec6b6380f413aed2ffde2daed28c58d74e3"
609
+ }
610
+ },
611
+ "turns": [
612
+ {
613
+ "payload": {},
614
+ "expected_trace": {
615
+ "agent_response": {
616
+ "description": "Which type of issue are you reporting?",
617
+ "payload_schema": {
618
+ "properties": {
619
+ "issue_category": {
620
+ "description": "Interpret the user's input and return ONLY one closed value: Pothole, Obstruction.",
621
+ "enum": [
622
+ "Pothole",
623
+ "Obstruction"
624
+ ],
625
+ "title": "Issue Category",
626
+ "type": "string"
627
+ }
628
+ },
629
+ "required": [
630
+ "issue_category"
631
+ ],
632
+ "title": "Slot_issue_category",
633
+ "type": "object"
634
+ }
635
+ },
636
+ "data": {},
637
+ "status": "progress"
638
+ }
639
+ },
640
+ {
641
+ "payload": {
642
+ "issue_category": "Obstruction",
643
+ "issue_detail": "Large"
644
+ },
645
+ "expected_trace": {
646
+ "agent_response": {
647
+ "description": "Service completed successfully."
648
+ },
649
+ "data": {
650
+ "backend_classification": "STREET_OBSTRUCTION",
651
+ "issue_category": "Obstruction"
652
+ },
653
+ "status": "completed"
654
+ }
655
+ }
656
+ ]
657
+ },
658
+ {
659
+ "identifier": "gated_derivation_default_runtime",
660
+ "source": {
661
+ "path": "gated_derive.case.json",
662
+ "pointer": "/source",
663
+ "mutations": [
664
+ {
665
+ "path": "/derive/0/lookup",
666
+ "replacement": {
667
+ "Pothole|Small": "POTHOLE_SMALL",
668
+ "Obstruction|null": "STREET_OBSTRUCTION"
669
+ }
670
+ }
671
+ ]
672
+ },
673
+ "expected": {
674
+ "compilation": "succeeded",
675
+ "diagnostics": [],
676
+ "ir": {
677
+ "ir_format": "flowspec2/ir@1",
678
+ "flow": "gated_issue_classification",
679
+ "version": "1.0.0",
680
+ "source_digest": "6bf8f544a993d5f06651ef4b4190fe2b384969a831866d7bb3b172a0f8ae8cae",
681
+ "profile_digest": "23a6b3f9d68730770f2eeef4ea80ab3fd9bfe526cbf47117240c1f526987174a",
682
+ "dependency_digest": "a5c83f35e8179f308288eea31dcc88d17e4ac772bbaad5ddea5cc74d150e56bb",
683
+ "digest": "91ceb9abc69411c8be54e56440bf7bee7550d9bafc1dcdd16bb17c0df2442ee6",
684
+ "canonical_document_digest": "9d5a899c4f5f3a972e9be0da27bb766c7e2c10d5736c0a91930f926521379528",
685
+ "canonical_execution_ir_digest": "615efc119955760b7659361600c855f7909cf07e764222e14845c583d48c3f64",
686
+ "canonical_ir_digest": "7d551ab1a0754a5b58edcde44ebea49a1de9b9ac4bce0f9e1b73592c81219800"
687
+ }
688
+ },
689
+ "turns": [
690
+ {
691
+ "payload": {},
692
+ "expected_trace": {
693
+ "agent_response": {
694
+ "description": "Which type of issue are you reporting?",
695
+ "payload_schema": {
696
+ "properties": {
697
+ "issue_category": {
698
+ "description": "Interpret the user's input and return ONLY one closed value: Pothole, Obstruction.",
699
+ "enum": [
700
+ "Pothole",
701
+ "Obstruction"
702
+ ],
703
+ "title": "Issue Category",
704
+ "type": "string"
705
+ }
706
+ },
707
+ "required": [
708
+ "issue_category"
709
+ ],
710
+ "title": "Slot_issue_category",
711
+ "type": "object"
712
+ }
713
+ },
714
+ "data": {},
715
+ "status": "progress"
716
+ }
717
+ },
718
+ {
719
+ "payload": {
720
+ "issue_category": "Pothole"
721
+ },
722
+ "expected_trace": {
723
+ "agent_response": {
724
+ "description": "How large is the pothole?",
725
+ "payload_schema": {
726
+ "properties": {
727
+ "issue_detail": {
728
+ "description": "Interpret the user's input and return ONLY one closed value: Small, Large.",
729
+ "enum": [
730
+ "Small",
731
+ "Large"
732
+ ],
733
+ "title": "Issue Detail",
734
+ "type": "string"
735
+ }
736
+ },
737
+ "required": [
738
+ "issue_detail"
739
+ ],
740
+ "title": "Slot_issue_detail",
741
+ "type": "object"
742
+ }
743
+ },
744
+ "data": {
745
+ "issue_category": "Pothole"
746
+ },
747
+ "status": "progress"
748
+ }
749
+ },
750
+ {
751
+ "payload": {
752
+ "issue_detail": "Large"
753
+ },
754
+ "expected_trace": {
755
+ "agent_response": {
756
+ "description": "Service completed successfully."
757
+ },
758
+ "data": {
759
+ "backend_classification": "Pothole",
760
+ "issue_category": "Pothole",
761
+ "issue_detail": "Large"
762
+ },
763
+ "status": "completed"
764
+ }
765
+ }
766
+ ]
767
+ }
768
+ ]
769
+ }