spot-sdk-python 2.0.0b8__tar.gz → 2.0.0b9__tar.gz

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 (34) hide show
  1. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/PKG-INFO +2 -2
  2. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/README.md +1 -1
  3. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/pyproject.toml +1 -1
  4. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/clients.py +0 -6
  5. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/retriever.py +13 -4
  6. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/fake_spot.py +0 -2
  7. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/__init__.py +0 -0
  8. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/_json.py +0 -0
  9. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/app.py +0 -0
  10. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/artifacts.py +0 -0
  11. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/config.py +0 -0
  12. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/email.py +0 -0
  13. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/errors.py +0 -0
  14. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/knowledge.py +0 -0
  15. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/knowledge_tags.py +0 -0
  16. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/llm.py +0 -0
  17. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/logging.py +0 -0
  18. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/manifest.py +0 -0
  19. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/mime.py +0 -0
  20. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/model_input.py +0 -0
  21. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/orchestrator.py +0 -0
  22. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/py.typed +0 -0
  23. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/settings.py +0 -0
  24. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/signals.py +0 -0
  25. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/README.md +0 -0
  26. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/__init__.py +0 -0
  27. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/contract.py +0 -0
  28. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/fake_knowledge_client.py +0 -0
  29. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/fake_llm.py +0 -0
  30. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/settings.py +0 -0
  31. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/testing/views.py +0 -0
  32. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/urls.py +0 -0
  33. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/verdict.py +0 -0
  34. {spot_sdk_python-2.0.0b8 → spot_sdk_python-2.0.0b9}/spot_sdk/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spot-sdk-python
3
- Version: 2.0.0b8
3
+ Version: 2.0.0b9
4
4
  Summary: SPOT plugin SDK: the plugin contract, the plugin runtime, its clients and test helpers
5
5
  License: Apache-2.0
6
6
  Author: SPOT Project
@@ -51,7 +51,7 @@ plugins share:
51
51
  ## Install
52
52
 
53
53
  ```bash
54
- pip install spot-sdk-python==2.0.0b8
54
+ pip install spot-sdk-python==2.0.0b9
55
55
  ```
56
56
 
57
57
  Python 3.11 to 3.15. Version 2 implements plugin contract 2, for
@@ -26,7 +26,7 @@ plugins share:
26
26
  ## Install
27
27
 
28
28
  ```bash
29
- pip install spot-sdk-python==2.0.0b8
29
+ pip install spot-sdk-python==2.0.0b9
30
30
  ```
31
31
 
32
32
  Python 3.11 to 3.15. Version 2 implements plugin contract 2, for
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "spot-sdk-python"
7
- version = "2.0.0b8"
7
+ version = "2.0.0b9"
8
8
  description = "SPOT plugin SDK: the plugin contract, the plugin runtime, its clients and test helpers"
9
9
  authors = ["SPOT Project <spot@sonn.lu>"]
10
10
  license = "Apache-2.0"
@@ -111,7 +111,6 @@ def ingestion_request(
111
111
  raw: bytes,
112
112
  *,
113
113
  envelope: Envelope | None = None,
114
- workflow_id: str | None = None,
115
114
  priority: IngestionPriority = "normal",
116
115
  wait_for_verdict: bool = False,
117
116
  timeout_ms: int = 30_000,
@@ -121,7 +120,6 @@ def ingestion_request(
121
120
  return IngestionRequest(
122
121
  raw=base64.b64encode(raw).decode("ascii"),
123
122
  envelope=envelope,
124
- workflow_id=workflow_id,
125
123
  priority=priority,
126
124
  wait_for_verdict=wait_for_verdict,
127
125
  timeout_ms=timeout_ms,
@@ -132,7 +130,6 @@ def ingestion_body(
132
130
  raw: bytes,
133
131
  *,
134
132
  envelope: Envelope | None = None,
135
- workflow_id: str | None = None,
136
133
  priority: IngestionPriority = "normal",
137
134
  wait_for_verdict: bool = False,
138
135
  timeout_ms: int = 30_000,
@@ -149,7 +146,6 @@ def ingestion_body(
149
146
  request = IngestionRequest(
150
147
  raw=(pieces[0] if pieces else b"").decode("ascii"),
151
148
  envelope=envelope,
152
- workflow_id=workflow_id,
153
149
  priority=priority,
154
150
  wait_for_verdict=wait_for_verdict,
155
151
  timeout_ms=timeout_ms,
@@ -191,7 +187,6 @@ class SpotClient:
191
187
  raw: bytes,
192
188
  *,
193
189
  envelope: Envelope | None = None,
194
- workflow_id: str | None = None,
195
190
  priority: IngestionPriority = "normal",
196
191
  wait_for_verdict: bool = False,
197
192
  timeout_ms: int = 30_000,
@@ -211,7 +206,6 @@ class SpotClient:
211
206
  ingestion_body,
212
207
  raw,
213
208
  envelope=envelope,
214
- workflow_id=workflow_id,
215
209
  priority=priority,
216
210
  wait_for_verdict=wait_for_verdict,
217
211
  timeout_ms=timeout_ms,
@@ -21,7 +21,7 @@ from __future__ import annotations
21
21
  import base64
22
22
  import binascii
23
23
  from enum import StrEnum
24
- from typing import Annotated, Literal
24
+ from typing import Annotated, Any, Literal
25
25
  from uuid import UUID
26
26
 
27
27
  from pydantic import (
@@ -30,6 +30,7 @@ from pydantic import (
30
30
  Field,
31
31
  PlainSerializer,
32
32
  WithJsonSchema,
33
+ model_validator,
33
34
  )
34
35
 
35
36
  from .email import Envelope
@@ -78,9 +79,6 @@ class IngestionRequest(BaseModel):
78
79
 
79
80
  raw: Base64Message = Field(description="The RFC 5322 message")
80
81
  envelope: Envelope | None = None
81
- workflow_id: str | None = Field(
82
- default=None, description="None: the platform's default workflow"
83
- )
84
82
  priority: IngestionPriority = "normal"
85
83
  wait_for_verdict: bool = False
86
84
  timeout_ms: int = Field(
@@ -90,6 +88,17 @@ class IngestionRequest(BaseModel):
90
88
  description="The caller's budget when wait_for_verdict is set",
91
89
  )
92
90
 
91
+ @model_validator(mode="before")
92
+ @classmethod
93
+ def _refuse_workflow_id(cls, data: Any) -> Any:
94
+ """Refuse ``workflow_id`` rather than drop it as other unknown fields are:
95
+ a retriever that still names a workflow would otherwise be silently routed."""
96
+ if isinstance(data, dict) and "workflow_id" in data:
97
+ raise ValueError(
98
+ "workflow_id is no longer taken: SPOT's routes choose the workflow"
99
+ )
100
+ return data
101
+
93
102
 
94
103
  class IngestionResult(BaseModel):
95
104
  """The response of ``POST /internal/ingest`` for a stored message."""
@@ -57,7 +57,6 @@ class FakeSpot:
57
57
  raw: bytes,
58
58
  *,
59
59
  envelope: Envelope | None = None,
60
- workflow_id: str | None = None,
61
60
  priority: IngestionPriority = "normal",
62
61
  wait_for_verdict: bool = False,
63
62
  timeout_ms: int = 30_000,
@@ -65,7 +64,6 @@ class FakeSpot:
65
64
  request = ingestion_request(
66
65
  raw,
67
66
  envelope=envelope,
68
- workflow_id=workflow_id,
69
67
  priority=priority,
70
68
  wait_for_verdict=wait_for_verdict,
71
69
  timeout_ms=timeout_ms,