orchestrator-core 4.6.2__py3-none-any.whl → 4.6.3__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 (53) hide show
  1. orchestrator/__init__.py +1 -1
  2. orchestrator/api/api_v1/endpoints/search.py +44 -34
  3. orchestrator/{search/retrieval/utils.py → cli/search/display.py} +4 -29
  4. orchestrator/cli/search/search_explore.py +22 -24
  5. orchestrator/cli/search/speedtest.py +11 -9
  6. orchestrator/db/models.py +6 -6
  7. orchestrator/graphql/resolvers/helpers.py +15 -0
  8. orchestrator/graphql/resolvers/process.py +5 -3
  9. orchestrator/graphql/resolvers/product.py +3 -2
  10. orchestrator/graphql/resolvers/product_block.py +3 -2
  11. orchestrator/graphql/resolvers/resource_type.py +3 -2
  12. orchestrator/graphql/resolvers/scheduled_tasks.py +3 -1
  13. orchestrator/graphql/resolvers/settings.py +2 -0
  14. orchestrator/graphql/resolvers/subscription.py +5 -3
  15. orchestrator/graphql/resolvers/version.py +2 -0
  16. orchestrator/graphql/resolvers/workflow.py +3 -2
  17. orchestrator/log_config.py +2 -0
  18. orchestrator/schemas/search.py +1 -1
  19. orchestrator/schemas/search_requests.py +59 -0
  20. orchestrator/search/agent/handlers.py +129 -0
  21. orchestrator/search/agent/prompts.py +54 -33
  22. orchestrator/search/agent/state.py +9 -24
  23. orchestrator/search/agent/tools.py +223 -144
  24. orchestrator/search/agent/validation.py +80 -0
  25. orchestrator/search/{schemas → aggregations}/__init__.py +20 -0
  26. orchestrator/search/aggregations/base.py +201 -0
  27. orchestrator/search/core/types.py +3 -2
  28. orchestrator/search/filters/__init__.py +4 -0
  29. orchestrator/search/filters/definitions.py +22 -1
  30. orchestrator/search/filters/numeric_filter.py +3 -3
  31. orchestrator/search/llm_migration.py +2 -1
  32. orchestrator/search/query/__init__.py +90 -0
  33. orchestrator/search/query/builder.py +285 -0
  34. orchestrator/search/query/engine.py +162 -0
  35. orchestrator/search/{retrieval → query}/exceptions.py +38 -7
  36. orchestrator/search/query/mixins.py +95 -0
  37. orchestrator/search/query/queries.py +129 -0
  38. orchestrator/search/query/results.py +252 -0
  39. orchestrator/search/{retrieval/query_state.py → query/state.py} +31 -11
  40. orchestrator/search/{retrieval → query}/validation.py +58 -1
  41. orchestrator/search/retrieval/__init__.py +0 -5
  42. orchestrator/search/retrieval/pagination.py +7 -8
  43. orchestrator/search/retrieval/retrievers/base.py +9 -9
  44. orchestrator/workflows/translations/en-GB.json +1 -0
  45. {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3.dist-info}/METADATA +16 -15
  46. {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3.dist-info}/RECORD +49 -43
  47. orchestrator/search/retrieval/builder.py +0 -127
  48. orchestrator/search/retrieval/engine.py +0 -197
  49. orchestrator/search/schemas/parameters.py +0 -133
  50. orchestrator/search/schemas/results.py +0 -80
  51. /orchestrator/search/{export.py → query/export.py} +0 -0
  52. {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3.dist-info}/WHEEL +0 -0
  53. {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,80 +0,0 @@
1
- # Copyright 2019-2025 SURF, GÉANT.
2
- # Licensed under the Apache License, Version 2.0 (the "License");
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # Unless required by applicable law or agreed to in writing, software
9
- # distributed under the License is distributed on an "AS IS" BASIS,
10
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- # See the License for the specific language governing permissions and
12
- # limitations under the License.
13
-
14
- from typing import Literal
15
-
16
- from pydantic import BaseModel, ConfigDict
17
-
18
- from orchestrator.search.core.types import EntityType, FilterOp, SearchMetadata, UIType
19
-
20
-
21
- class MatchingField(BaseModel):
22
- """Contains the field that contributed most to the (fuzzy) search result."""
23
-
24
- text: str
25
- path: str
26
- highlight_indices: list[tuple[int, int]] | None = None
27
-
28
-
29
- class SearchResult(BaseModel):
30
- """Represents a single search result item."""
31
-
32
- entity_id: str
33
- entity_type: EntityType
34
- entity_title: str
35
- score: float
36
- perfect_match: int = 0
37
- matching_field: MatchingField | None = None
38
-
39
-
40
- class SearchResponse(BaseModel):
41
- """Response containing search results and metadata."""
42
-
43
- results: list[SearchResult]
44
- metadata: SearchMetadata
45
- query_embedding: list[float] | None = None
46
-
47
-
48
- class ValueSchema(BaseModel):
49
- kind: UIType | Literal["none", "object"] = UIType.STRING
50
- fields: dict[str, "ValueSchema"] | None = None
51
-
52
- model_config = ConfigDict(extra="forbid")
53
-
54
-
55
- class LeafInfo(BaseModel):
56
- name: str
57
- ui_types: list[UIType]
58
- paths: list[str]
59
-
60
- model_config = ConfigDict(
61
- extra="forbid",
62
- use_enum_values=True,
63
- )
64
-
65
-
66
- class ComponentInfo(BaseModel):
67
- name: str
68
- ui_types: list[UIType]
69
-
70
- model_config = ConfigDict(
71
- extra="forbid",
72
- use_enum_values=True,
73
- )
74
-
75
-
76
- class TypeDefinition(BaseModel):
77
- operators: list[FilterOp]
78
- value_schema: dict[FilterOp, ValueSchema]
79
-
80
- model_config = ConfigDict(use_enum_values=True)
File without changes