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.
- flowspec2/__init__.py +105 -0
- flowspec2/authoring/__init__.py +275 -0
- flowspec2/authoring/authoring-evidence-signature.schema.json +34 -0
- flowspec2/authoring/authoring-evidence.schema.json +455 -0
- flowspec2/authoring/authoring-operational-evidence.schema.json +160 -0
- flowspec2/authoring/benchmark.py +1409 -0
- flowspec2/authoring/corpus/await_correction.case.json +220 -0
- flowspec2/authoring/corpus/flowspec2.ctk.json +769 -0
- flowspec2/authoring/corpus/gated_derive.case.json +100 -0
- flowspec2/authoring/corpus/linear.case.json +55 -0
- flowspec2/authoring/corpus/manifest.json +31 -0
- flowspec2/authoring/corpus/subflow.case.json +66 -0
- flowspec2/authoring/corpus/terminal.case.json +94 -0
- flowspec2/authoring/corpus.py +307 -0
- flowspec2/authoring/ctk.py +836 -0
- flowspec2/authoring/detached_signature.py +120 -0
- flowspec2/authoring/evidence.py +311 -0
- flowspec2/authoring/evidence_signature.py +187 -0
- flowspec2/authoring/evidence_verification.py +229 -0
- flowspec2/authoring/gemini.py +215 -0
- flowspec2/authoring/operational-corpus.json +61 -0
- flowspec2/authoring/operational.py +956 -0
- flowspec2/authoring/operational_providers.py +167 -0
- flowspec2/authoring/presentation_review.py +1013 -0
- flowspec2/authoring/presentation_review_signature.py +305 -0
- flowspec2/authoring/projection.py +299 -0
- flowspec2/authoring/provider_prompt.py +83 -0
- flowspec2/backends/__init__.py +82 -0
- flowspec2/backends/http.py +189 -0
- flowspec2/checker.py +238 -0
- flowspec2/cli.py +789 -0
- flowspec2/cli_parser.py +345 -0
- flowspec2/clock.py +23 -0
- flowspec2/compat/__init__.py +47 -0
- flowspec2/compat/models.py +82 -0
- flowspec2/compat/open_workflow.py +616 -0
- flowspec2/compat/rasa.py +19 -0
- flowspec2/compat/rasa_export.py +876 -0
- flowspec2/compat/rasa_import.py +992 -0
- flowspec2/compat/rasa_shared.py +270 -0
- flowspec2/compat/schemas/open-workflow-conversation-1.schema.json +138 -0
- flowspec2/compat/schemas/vendor/open-workflow-1.0.3.LICENSE +201 -0
- flowspec2/compat/schemas/vendor/open-workflow-1.0.3.provenance.json +13 -0
- flowspec2/compat/schemas/vendor/open-workflow-1.0.3.workflow.yaml +1956 -0
- flowspec2/compat/tool_profiles.py +149 -0
- flowspec2/compat/yaml.py +147 -0
- flowspec2/compiler.py +957 -0
- flowspec2/compiler_contracts.py +17 -0
- flowspec2/compiler_resume_contracts.py +594 -0
- flowspec2/compiler_schema_relations.py +1830 -0
- flowspec2/compiler_tool_contracts.py +245 -0
- flowspec2/compiler_value_contracts.py +447 -0
- flowspec2/derive.py +32 -0
- flowspec2/diagnostics.py +94 -0
- flowspec2/domains.py +489 -0
- flowspec2/experimental/__init__.py +57 -0
- flowspec2/experimental/flowspec-3-draft.schema.json +923 -0
- flowspec2/experimental/v3-preview-loss-policy.json +161 -0
- flowspec2/experimental/v3_lowering.py +928 -0
- flowspec2/experimental/v3_preview.py +2460 -0
- flowspec2/flowspec-2.schema.json +635 -0
- flowspec2/interactive.py +300 -0
- flowspec2/ir.py +1459 -0
- flowspec2/json_codec.py +120 -0
- flowspec2/llm.py +366 -0
- flowspec2/models.py +121 -0
- flowspec2/nodes.py +1537 -0
- flowspec2/observability.py +151 -0
- flowspec2/predicates.py +89 -0
- flowspec2/profiles.py +118 -0
- flowspec2/py.typed +0 -0
- flowspec2/runtime.py +1059 -0
- flowspec2/schema.py +54 -0
- flowspec2/schema_contracts.py +203 -0
- flowspec2/semantic_derive_contracts.py +530 -0
- flowspec2/semantic_path_contracts.py +528 -0
- flowspec2/semantic_predicate_contracts.py +355 -0
- flowspec2/semantic_schema_contracts.py +137 -0
- flowspec2/semantic_source_contracts.py +21 -0
- flowspec2/semantic_state_contracts.py +450 -0
- flowspec2/semantic_support.py +40 -0
- flowspec2/semantics.py +410 -0
- flowspec2/state_migration.py +1034 -0
- flowspec2/subflows/__init__.py +1117 -0
- flowspec2/subflows/address.py +328 -0
- flowspec2/subflows/identification.py +1031 -0
- flowspec2/tools.py +1154 -0
- flowspec2-1.0.0.dist-info/METADATA +482 -0
- flowspec2-1.0.0.dist-info/RECORD +92 -0
- flowspec2-1.0.0.dist-info/WHEEL +4 -0
- flowspec2-1.0.0.dist-info/entry_points.txt +2 -0
- flowspec2-1.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "flowspec2/authoring-case@3",
|
|
3
|
+
"identifier": "await_and_correction",
|
|
4
|
+
"prompt": "Author the ordered steps collect_request_description, authenticate_requester, confirm_ticket_data, and the open_ticket terminal. Collect required request_description through free-text RequestDescription. Persist brazilian_tax_id internally through the BrazilianTaxId domain. Suspend authenticate_requester with a verbatim cta_url prompt and out-of-band authentication_token field. Use resume contract version 1 with an exact eleven-digit brazilian_tax_id object schema, correlation $token.brazilian_tax_id, duplicate ignore, late reject, and set brazilian_tax_id from $token.brazilian_tax_id. Timeout, abort, and switch return to collect_request_description; resend returns to authenticate_requester. Confirm through ticket_data_confirmed in bool domain YesNo with affirmation and emoji_veto normalization, buttons sourced from YesNo, and allow correction of request_description. Call open_service_request idempotently with request_description as problem and brazilian_tax_id as requester, store result.protocol_id as protocol_id, reset on success and fatal, and preserve state on retryable. Add no other semantic behavior. Flow identity, version, route prose, and non-verbatim path-prompt wording may vary.",
|
|
5
|
+
"feature_tags": ["await_external", "correction", "terminal"],
|
|
6
|
+
"required_constructs": [
|
|
7
|
+
{
|
|
8
|
+
"identifier": "external-wait-marker",
|
|
9
|
+
"pointer_pattern": "/path/*/await_external",
|
|
10
|
+
"expected": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"identifier": "external-wait-kind",
|
|
14
|
+
"pointer_pattern": "/capabilities/await_external/kind",
|
|
15
|
+
"expected": "cta_url"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"identifier": "external-wait-step",
|
|
19
|
+
"pointer_pattern": "/capabilities/await_external/step",
|
|
20
|
+
"expected": "authenticate_requester"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"identifier": "external-wait-resume-token",
|
|
24
|
+
"pointer_pattern": "/capabilities/await_external/resume_on",
|
|
25
|
+
"expected": "authentication_token"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"identifier": "external-resume-brazilian_tax_id",
|
|
29
|
+
"pointer_pattern": "/capabilities/await_external/on_resume/set/brazilian_tax_id",
|
|
30
|
+
"expected": "$token.brazilian_tax_id"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"identifier": "correctable-confirmation",
|
|
34
|
+
"pointer_pattern": "/path/*/correctable",
|
|
35
|
+
"expected": true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"identifier": "correction-contract",
|
|
39
|
+
"pointer_pattern": "/confirm/correctable",
|
|
40
|
+
"expected": [
|
|
41
|
+
"request_description"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"identifier": "terminal-marker",
|
|
46
|
+
"pointer_pattern": "/path/*/terminal",
|
|
47
|
+
"expected": true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"identifier": "terminal-tool",
|
|
51
|
+
"pointer_pattern": "/terminal/tool",
|
|
52
|
+
"expected": "open_service_request"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"identifier": "terminal-idempotency",
|
|
56
|
+
"pointer_pattern": "/terminal/idempotent",
|
|
57
|
+
"expected": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"identifier": "terminal-output",
|
|
61
|
+
"pointer_pattern": "/terminal/outputs/protocol_id",
|
|
62
|
+
"expected": "result.protocol_id"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"source": {
|
|
66
|
+
"schema": "flowspec/2",
|
|
67
|
+
"flow": "authenticated_correctable_request",
|
|
68
|
+
"version": "1.0.0",
|
|
69
|
+
"route": {
|
|
70
|
+
"description": "Authenticate, confirm, and open a correctable municipal request."
|
|
71
|
+
},
|
|
72
|
+
"domains": {
|
|
73
|
+
"RequestDescription": {
|
|
74
|
+
"type": "free_text"
|
|
75
|
+
},
|
|
76
|
+
"BrazilianTaxId": {
|
|
77
|
+
"type": "brazilian_tax_id"
|
|
78
|
+
},
|
|
79
|
+
"YesNo": {
|
|
80
|
+
"type": "bool",
|
|
81
|
+
"normalize": {
|
|
82
|
+
"affirmation": true,
|
|
83
|
+
"emoji_veto": true
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"slots": {
|
|
88
|
+
"request_description": {
|
|
89
|
+
"domain": "RequestDescription",
|
|
90
|
+
"required": true
|
|
91
|
+
},
|
|
92
|
+
"brazilian_tax_id": {
|
|
93
|
+
"domain": "BrazilianTaxId",
|
|
94
|
+
"persist": "internal"
|
|
95
|
+
},
|
|
96
|
+
"ticket_data_confirmed": {
|
|
97
|
+
"domain": "YesNo"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"path": [
|
|
101
|
+
{
|
|
102
|
+
"step": "collect_request_description",
|
|
103
|
+
"slot": "request_description",
|
|
104
|
+
"prompt": {
|
|
105
|
+
"text": "Describe your request."
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"step": "authenticate_requester",
|
|
110
|
+
"await_external": true
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"step": "confirm_ticket_data",
|
|
114
|
+
"confirm": "ticket_data_confirmed",
|
|
115
|
+
"correctable": true,
|
|
116
|
+
"prompt": {
|
|
117
|
+
"text": "Do you confirm the request details?"
|
|
118
|
+
},
|
|
119
|
+
"interactive": {
|
|
120
|
+
"kind": "buttons",
|
|
121
|
+
"field": "ticket_data_confirmed",
|
|
122
|
+
"from_domain": "YesNo"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"terminal": true
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"confirm": {
|
|
130
|
+
"step": "confirm_ticket_data",
|
|
131
|
+
"slot": "ticket_data_confirmed",
|
|
132
|
+
"on_confirm": "open_ticket",
|
|
133
|
+
"correctable": ["request_description"]
|
|
134
|
+
},
|
|
135
|
+
"terminal": {
|
|
136
|
+
"step": "open_ticket",
|
|
137
|
+
"tool": "open_service_request",
|
|
138
|
+
"idempotent": true,
|
|
139
|
+
"input": [
|
|
140
|
+
{
|
|
141
|
+
"param": "problem",
|
|
142
|
+
"slot": "request_description"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"param": "requester",
|
|
146
|
+
"slot": "brazilian_tax_id"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"outputs": {
|
|
150
|
+
"protocol_id": "result.protocol_id"
|
|
151
|
+
},
|
|
152
|
+
"outcomes": {
|
|
153
|
+
"success": {
|
|
154
|
+
"reset_next": true
|
|
155
|
+
},
|
|
156
|
+
"retryable": {
|
|
157
|
+
"preserve_state": true
|
|
158
|
+
},
|
|
159
|
+
"fatal": {
|
|
160
|
+
"reset_next": true
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"capabilities": {
|
|
165
|
+
"await_external": {
|
|
166
|
+
"kind": "cta_url",
|
|
167
|
+
"step": "authenticate_requester",
|
|
168
|
+
"resume_on": "authentication_token",
|
|
169
|
+
"resume": {
|
|
170
|
+
"version": "1",
|
|
171
|
+
"schema": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"properties": {
|
|
175
|
+
"brazilian_tax_id": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"pattern": "^[0-9]{11}$"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"required": [
|
|
181
|
+
"brazilian_tax_id"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"correlation": "$token.brazilian_tax_id",
|
|
185
|
+
"duplicate": "ignore",
|
|
186
|
+
"late": "reject"
|
|
187
|
+
},
|
|
188
|
+
"prompt": {
|
|
189
|
+
"text": "Authenticate to continue.",
|
|
190
|
+
"verbatim": true
|
|
191
|
+
},
|
|
192
|
+
"interactive": {
|
|
193
|
+
"kind": "cta_url",
|
|
194
|
+
"field": "authentication_token",
|
|
195
|
+
"out_of_band": true,
|
|
196
|
+
"next_step": "authenticate_requester"
|
|
197
|
+
},
|
|
198
|
+
"on_resume": {
|
|
199
|
+
"set": {
|
|
200
|
+
"brazilian_tax_id": "$token.brazilian_tax_id"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"timeout": {
|
|
204
|
+
"goto": "collect_request_description"
|
|
205
|
+
},
|
|
206
|
+
"recovery": {
|
|
207
|
+
"abort": {
|
|
208
|
+
"goto": "collect_request_description"
|
|
209
|
+
},
|
|
210
|
+
"resend": {
|
|
211
|
+
"goto": "authenticate_requester"
|
|
212
|
+
},
|
|
213
|
+
"switch": {
|
|
214
|
+
"goto": "collect_request_description"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|