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,270 @@
|
|
|
1
|
+
"""Bounded interoperability with the portable Rasa CALM collection subset.
|
|
2
|
+
|
|
3
|
+
The converter deliberately does not model arbitrary Rasa projects. It projects
|
|
4
|
+
linear ``collect`` steps (including ordinary bool slots), their slot domains, one
|
|
5
|
+
unconditional prompt response, and static ``SetSlots`` buttons. Confirmation
|
|
6
|
+
steps are blocked because their exhaustion behavior has no equivalent Rasa
|
|
7
|
+
``collect`` contract. Profile ``rasa-calm/1`` targets Rasa 3.11.0 or newer.
|
|
8
|
+
Every omitted source construct is represented by a compatibility diagnostic
|
|
9
|
+
before policy is enforced.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
import re
|
|
16
|
+
from dataclasses import dataclass, field
|
|
17
|
+
from typing import Any, Mapping, Sequence, cast
|
|
18
|
+
|
|
19
|
+
from jsonschema import Draft202012Validator
|
|
20
|
+
from jsonschema.exceptions import ValidationError
|
|
21
|
+
|
|
22
|
+
from flowspec2.compat.tool_profiles import (
|
|
23
|
+
compatibility_tool_names,
|
|
24
|
+
synthetic_compatibility_tool_definition,
|
|
25
|
+
)
|
|
26
|
+
from flowspec2.compiler import compile_flow
|
|
27
|
+
from flowspec2.domains import interactive_options_for_domain
|
|
28
|
+
from flowspec2.schema import schema as flowspec_schema
|
|
29
|
+
from flowspec2.tools import ToolRegistry, default_tool_registry
|
|
30
|
+
|
|
31
|
+
from .models import (
|
|
32
|
+
CompatibilityDiagnostic,
|
|
33
|
+
DiagnosticSeverity,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
RASA_PROFILE_VERSION = "1"
|
|
37
|
+
RASA_FORMAT = f"rasa-calm/{RASA_PROFILE_VERSION}"
|
|
38
|
+
RASA_MINIMUM_VERSION = "3.11.0"
|
|
39
|
+
FLOWSPEC_FORMAT = "flowspec/2"
|
|
40
|
+
RASA_DOMAIN_VERSION = "3.1"
|
|
41
|
+
|
|
42
|
+
FLOWSPEC_FLOW_IDENTIFIER_PATTERN = re.compile(r"^[a-z][a-z0-9_]*$")
|
|
43
|
+
RASA_ACTION_IDENTIFIER_PATTERN = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
|
|
44
|
+
_RASA_SET_SLOTS_NAME_FORBIDDEN = frozenset("=,()")
|
|
45
|
+
_RASA_SET_SLOTS_VALUE_FORBIDDEN = frozenset(",()")
|
|
46
|
+
_RASA_RESPONSE_TEMPLATE_CHARACTERS = frozenset("{}")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass(frozen=True, init=False)
|
|
50
|
+
class RasaBundle:
|
|
51
|
+
"""An immutable pair of Rasa ``flows.yml`` and ``domain.yml`` documents.
|
|
52
|
+
|
|
53
|
+
Documents are held as private JSON snapshots. Each public accessor returns a
|
|
54
|
+
fresh dictionary, so mutating a caller-owned object can never mutate the
|
|
55
|
+
bundle or a later serialization.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
_flows_snapshot: str = field(repr=False)
|
|
59
|
+
_domain_snapshot: str = field(repr=False)
|
|
60
|
+
|
|
61
|
+
def __init__(
|
|
62
|
+
self,
|
|
63
|
+
flows: Mapping[str, Any],
|
|
64
|
+
domain: Mapping[str, Any],
|
|
65
|
+
) -> None:
|
|
66
|
+
object.__setattr__(self, "_flows_snapshot", _snapshot_mapping(flows))
|
|
67
|
+
object.__setattr__(self, "_domain_snapshot", _snapshot_mapping(domain))
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def flows(self) -> dict[str, Any]:
|
|
71
|
+
"""Return a defensive copy of the ``flows.yml`` document."""
|
|
72
|
+
|
|
73
|
+
return cast(dict[str, Any], json.loads(self._flows_snapshot))
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def domain(self) -> dict[str, Any]:
|
|
77
|
+
"""Return a defensive copy of the ``domain.yml`` document."""
|
|
78
|
+
|
|
79
|
+
return cast(dict[str, Any], json.loads(self._domain_snapshot))
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def flows_document(self) -> dict[str, Any]:
|
|
83
|
+
"""Alias for callers that prefer an explicit document name."""
|
|
84
|
+
|
|
85
|
+
return self.flows
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def domain_document(self) -> dict[str, Any]:
|
|
89
|
+
"""Alias for callers that prefer an explicit document name."""
|
|
90
|
+
|
|
91
|
+
return self.domain
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def _snapshot_mapping(document: Mapping[str, Any]) -> str:
|
|
95
|
+
return json.dumps(
|
|
96
|
+
dict(document),
|
|
97
|
+
ensure_ascii=False,
|
|
98
|
+
allow_nan=False,
|
|
99
|
+
separators=(",", ":"),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
async def _compatibility_profile_tool(**_inputs: Any) -> dict[str, Any]:
|
|
104
|
+
"""Stand in for a declared action while the adapter checks compilation only."""
|
|
105
|
+
|
|
106
|
+
return {}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _compatibility_tool_registry(flow_document: Mapping[str, Any]) -> ToolRegistry:
|
|
110
|
+
"""Register only tool names explicitly present in the document being reviewed."""
|
|
111
|
+
|
|
112
|
+
registry = ToolRegistry()
|
|
113
|
+
known_definitions = default_tool_registry().definitions
|
|
114
|
+
for tool_name in compatibility_tool_names(flow_document):
|
|
115
|
+
registry.register(
|
|
116
|
+
tool_name,
|
|
117
|
+
_compatibility_profile_tool,
|
|
118
|
+
definition=known_definitions.get(tool_name)
|
|
119
|
+
or synthetic_compatibility_tool_definition(
|
|
120
|
+
tool_name,
|
|
121
|
+
flow_document,
|
|
122
|
+
version="rasa-compatibility-profile",
|
|
123
|
+
description=(
|
|
124
|
+
"Synthetic compile-only contract derived from the Rasa compatibility artifact."
|
|
125
|
+
),
|
|
126
|
+
),
|
|
127
|
+
)
|
|
128
|
+
return registry
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def compatibility_diagnostic(
|
|
132
|
+
severity: DiagnosticSeverity,
|
|
133
|
+
code: str,
|
|
134
|
+
source_path: str,
|
|
135
|
+
message: str,
|
|
136
|
+
) -> CompatibilityDiagnostic:
|
|
137
|
+
return CompatibilityDiagnostic(
|
|
138
|
+
severity=severity,
|
|
139
|
+
code=code,
|
|
140
|
+
source_path=source_path,
|
|
141
|
+
message=message,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def _validation_path(validation_error: ValidationError) -> str:
|
|
146
|
+
path = "$"
|
|
147
|
+
for segment in validation_error.absolute_path:
|
|
148
|
+
path += f"[{segment}]" if isinstance(segment, int) else f".{segment}"
|
|
149
|
+
return path
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def flowspec_validation_diagnostics(
|
|
153
|
+
flow_document: Mapping[str, Any],
|
|
154
|
+
code: str,
|
|
155
|
+
) -> tuple[CompatibilityDiagnostic, ...]:
|
|
156
|
+
validator = Draft202012Validator(flowspec_schema())
|
|
157
|
+
return tuple(
|
|
158
|
+
compatibility_diagnostic(
|
|
159
|
+
"error",
|
|
160
|
+
code,
|
|
161
|
+
_validation_path(validation_error),
|
|
162
|
+
validation_error.message,
|
|
163
|
+
)
|
|
164
|
+
for validation_error in validator.iter_errors(dict(flow_document))
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def flowspec_compilation_diagnostic(
|
|
169
|
+
flow_document: Mapping[str, Any],
|
|
170
|
+
code: str,
|
|
171
|
+
) -> CompatibilityDiagnostic | None:
|
|
172
|
+
try:
|
|
173
|
+
compile_flow(
|
|
174
|
+
dict(flow_document),
|
|
175
|
+
tools=_compatibility_tool_registry(flow_document),
|
|
176
|
+
)
|
|
177
|
+
except (KeyError, StopIteration, TypeError, ValueError) as compilation_error:
|
|
178
|
+
return compatibility_diagnostic(
|
|
179
|
+
"error",
|
|
180
|
+
code,
|
|
181
|
+
"$",
|
|
182
|
+
"flowspec2 compiler rejected the document: "
|
|
183
|
+
f"{str(compilation_error) or compilation_error.__class__.__name__}",
|
|
184
|
+
)
|
|
185
|
+
return None
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
def mapping_or_none(value: object) -> Mapping[str, Any] | None:
|
|
189
|
+
if not isinstance(value, Mapping):
|
|
190
|
+
return None
|
|
191
|
+
if not all(isinstance(key, str) for key in value):
|
|
192
|
+
return None
|
|
193
|
+
return cast(Mapping[str, Any], value)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def sequence_or_none(value: object) -> Sequence[Any] | None:
|
|
197
|
+
if isinstance(value, (str, bytes, bytearray)) or not isinstance(value, Sequence):
|
|
198
|
+
return None
|
|
199
|
+
return value
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def step_identifier_diagnostics(
|
|
203
|
+
steps: Sequence[Any],
|
|
204
|
+
source_path: str,
|
|
205
|
+
diagnostics: list[CompatibilityDiagnostic],
|
|
206
|
+
) -> None:
|
|
207
|
+
first_indexes_by_identifier: dict[str, int] = {}
|
|
208
|
+
for step_index, step_value in enumerate(steps):
|
|
209
|
+
step = mapping_or_none(step_value)
|
|
210
|
+
if step is None or "id" not in step:
|
|
211
|
+
continue
|
|
212
|
+
step_identifier = step.get("id")
|
|
213
|
+
if not isinstance(step_identifier, str) or not step_identifier:
|
|
214
|
+
diagnostics.append(
|
|
215
|
+
compatibility_diagnostic(
|
|
216
|
+
"error",
|
|
217
|
+
"RASA_STEP_ID_INVALID",
|
|
218
|
+
f"{source_path}[{step_index}].id",
|
|
219
|
+
"a Rasa step id must be a non-empty string",
|
|
220
|
+
)
|
|
221
|
+
)
|
|
222
|
+
continue
|
|
223
|
+
if step_identifier in first_indexes_by_identifier:
|
|
224
|
+
diagnostics.append(
|
|
225
|
+
compatibility_diagnostic(
|
|
226
|
+
"error",
|
|
227
|
+
"RASA_DUPLICATE_STEP_ID",
|
|
228
|
+
f"{source_path}[{step_index}].id",
|
|
229
|
+
f"step id {step_identifier!r} was already used at index "
|
|
230
|
+
f"{first_indexes_by_identifier[step_identifier]}",
|
|
231
|
+
)
|
|
232
|
+
)
|
|
233
|
+
else:
|
|
234
|
+
first_indexes_by_identifier[step_identifier] = step_index
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def rasa_response_key(flow_identifier: str, slot_name: str, step_index: int) -> str:
|
|
238
|
+
normalized_slot_name = re.sub(r"[^A-Za-z0-9_]", "_", slot_name)
|
|
239
|
+
return f"utter_ask_{flow_identifier}_{normalized_slot_name}_{step_index + 1}"
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def rasa_set_slots_name_supported(slot_name: str) -> bool:
|
|
243
|
+
return bool(slot_name) and not any(
|
|
244
|
+
character in slot_name
|
|
245
|
+
for character in (_RASA_SET_SLOTS_NAME_FORBIDDEN | _RASA_RESPONSE_TEMPLATE_CHARACTERS)
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def rasa_set_slots_value_supported(slot_value: str) -> bool:
|
|
250
|
+
return bool(slot_value) and not any(
|
|
251
|
+
character in slot_value
|
|
252
|
+
for character in (_RASA_SET_SLOTS_VALUE_FORBIDDEN | _RASA_RESPONSE_TEMPLATE_CHARACTERS)
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def rasa_response_text_supported(response_text: str) -> bool:
|
|
257
|
+
return not any(character in response_text for character in _RASA_RESPONSE_TEMPLATE_CHARACTERS)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def set_slots_payload(slot_name: str, slot_value: str) -> str:
|
|
261
|
+
return f"/SetSlots({slot_name}={slot_value})"
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def domain_button_options(
|
|
265
|
+
domain_specification: Mapping[str, Any],
|
|
266
|
+
) -> tuple[tuple[str, str], ...]:
|
|
267
|
+
return tuple(
|
|
268
|
+
(str(domain_option.value).lower(), domain_option.title)
|
|
269
|
+
for domain_option in interactive_options_for_domain(domain_specification)
|
|
270
|
+
)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://wllsena.github.io/flowspec2/schemas/open-workflow-conversation-1.json",
|
|
4
|
+
"title": "flowspec2 conversational profile for Open Workflow Specification 1.0.3",
|
|
5
|
+
"description": "Strict schema for the flowspec2 conversational profile only. It is not a validator for arbitrary Open Workflow Specification documents.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["document", "do"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"document": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["dsl", "namespace", "name", "version", "metadata"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"dsl": { "const": "1.0.3" },
|
|
16
|
+
"namespace": { "$ref": "#/$defs/dnsLabel" },
|
|
17
|
+
"name": { "$ref": "#/$defs/dnsLabel" },
|
|
18
|
+
"version": { "$ref": "#/$defs/semanticVersion" },
|
|
19
|
+
"metadata": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["flowspec2"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"flowspec2": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["profile", "original_flow_id", "sections"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"profile": {
|
|
30
|
+
"const": "https://wllsena.github.io/flowspec2/profiles/open-workflow-conversation-1"
|
|
31
|
+
},
|
|
32
|
+
"original_flow_id": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
35
|
+
},
|
|
36
|
+
"sections": { "$ref": "#/$defs/flowspecSections" }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"input": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["schema"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"schema": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["format", "document"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"format": { "const": "json" },
|
|
54
|
+
"document": { "type": "object" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"do": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"minItems": 1,
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"minProperties": 1,
|
|
65
|
+
"maxProperties": 1,
|
|
66
|
+
"propertyNames": {
|
|
67
|
+
"pattern": "^path-(0|[1-9][0-9]*)-(slot|confirm|derive|terminal|use|await_external)$"
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": { "$ref": "#/$defs/profileTask" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"$defs": {
|
|
74
|
+
"dnsLabel": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"
|
|
77
|
+
},
|
|
78
|
+
"semanticVersion": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
81
|
+
},
|
|
82
|
+
"flowspecSections": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": ["schema", "version", "route", "domains"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"schema": { "const": "flowspec/2" },
|
|
88
|
+
"version": { "$ref": "#/$defs/semanticVersion" },
|
|
89
|
+
"service": { "type": "object" },
|
|
90
|
+
"route": { "type": "object" },
|
|
91
|
+
"config": { "type": "object" },
|
|
92
|
+
"entry": { "type": "object" },
|
|
93
|
+
"domains": { "type": "object" },
|
|
94
|
+
"slots": { "type": "object" },
|
|
95
|
+
"uses": { "type": "array" },
|
|
96
|
+
"derive": { "type": "array" },
|
|
97
|
+
"confirm": { "type": "object" },
|
|
98
|
+
"terminal": { "type": "object" },
|
|
99
|
+
"overrides": { "type": "object" },
|
|
100
|
+
"auto_flow": { "type": "object" },
|
|
101
|
+
"capabilities": { "type": "object" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"profileTask": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["call", "with", "metadata"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"call": {
|
|
110
|
+
"enum": [
|
|
111
|
+
"flowspec2.slot",
|
|
112
|
+
"flowspec2.confirm",
|
|
113
|
+
"flowspec2.derive",
|
|
114
|
+
"flowspec2.terminal",
|
|
115
|
+
"flowspec2.use",
|
|
116
|
+
"flowspec2.await_external"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"with": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": ["step"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"step": { "type": "object" }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"metadata": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": ["path_index"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"path_index": { "type": "integer", "minimum": 0 }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"artifact": "open-workflow-1.0.3.workflow.yaml",
|
|
3
|
+
"license_artifact": "open-workflow-1.0.3.LICENSE",
|
|
4
|
+
"license_sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
|
|
5
|
+
"license_spdx": "Apache-2.0",
|
|
6
|
+
"retrieved_at": "2026-07-13",
|
|
7
|
+
"schema_sha256": "df3326da907e17e743e9d9e888839481d1557abdf91c592e74f27506ff523f0b",
|
|
8
|
+
"source_commit": "9b5b1da29e9d4fff2358580241e11aab22704a16",
|
|
9
|
+
"source_path": "schema/workflow.yaml",
|
|
10
|
+
"source_repository": "https://github.com/serverlessworkflow/specification",
|
|
11
|
+
"source_url": "https://raw.githubusercontent.com/serverlessworkflow/specification/9b5b1da29e9d4fff2358580241e11aab22704a16/schema/workflow.yaml",
|
|
12
|
+
"version": "1.0.3"
|
|
13
|
+
}
|