execution-plane-client 0.1.23__tar.gz → 0.1.24__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 (29) hide show
  1. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/PKG-INFO +1 -1
  2. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/_version.py +2 -2
  3. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/catalog.py +3 -0
  4. execution_plane_client-0.1.24/commands/bulk_work.py +60 -0
  5. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/.gitignore +0 -0
  6. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/LICENSE +0 -0
  7. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/README.md +0 -0
  8. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/__init__.py +0 -0
  9. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/__init__.py +0 -0
  10. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/base.py +0 -0
  11. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/clusters.py +0 -0
  12. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/control.py +0 -0
  13. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/credentials.py +0 -0
  14. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/results.py +0 -0
  15. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/targets.py +0 -0
  16. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/commands/work.py +0 -0
  17. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/errors.py +0 -0
  18. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/handlers.py +0 -0
  19. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/models/__init__.py +0 -0
  20. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/models/cluster.py +0 -0
  21. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/models/execution_target.py +0 -0
  22. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/models/runtime_context.py +0 -0
  23. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/models/shared.py +0 -0
  24. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/models/work_item.py +0 -0
  25. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/protocol.py +0 -0
  26. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/py.typed +0 -0
  27. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/pyproject.toml +0 -0
  28. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/registry.py +0 -0
  29. {execution_plane_client-0.1.23 → execution_plane_client-0.1.24}/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: execution-plane-client
3
- Version: 0.1.23
3
+ Version: 0.1.24
4
4
  Summary: Shared execution-plane command, response, and handler contracts
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.1.23'
22
- __version_tuple__ = version_tuple = (0, 1, 23)
21
+ __version__ = version = '0.1.24'
22
+ __version_tuple__ = version_tuple = (0, 1, 24)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -3,6 +3,7 @@
3
3
  from dataclasses import dataclass
4
4
 
5
5
  from execution_plane_client.commands.base import CommandPayload
6
+ from execution_plane_client.commands.bulk_work import WorkCancelBulk, WorkDeleteBulk
6
7
  from execution_plane_client.commands.clusters import ClusterDelete, ClusterRegister, ClusterUpdate
7
8
  from execution_plane_client.commands.control import Completion, WorkCancel
8
9
  from execution_plane_client.commands.credentials import CredentialResolveCluster, CredentialResolveWorkload
@@ -28,6 +29,8 @@ class CommandCatalog:
28
29
  """Install supported work, resource and completion contracts."""
29
30
  payloads = (
30
31
  WorkExecute,
32
+ WorkCancelBulk,
33
+ WorkDeleteBulk,
31
34
  WorkDelete,
32
35
  Completion,
33
36
  CredentialResolveCluster,
@@ -0,0 +1,60 @@
1
+ """Transactional intent requests for a client-owned set of existing work items."""
2
+
3
+ from typing import ClassVar, Self
4
+ from uuid import UUID
5
+
6
+ from pydantic import Field, JsonValue, model_validator
7
+
8
+ from execution_plane_client.commands.base import CommandPayload
9
+ from execution_plane_client.protocol import WireModel
10
+
11
+
12
+ class WorkItemSelector(WireModel):
13
+ """Select by exactly one ID list or a non-empty runtime-context containment filter.
14
+
15
+ Selection is always restricted to the authenticated client. Missing IDs,
16
+ foreign IDs, and zero filter matches are successful no-ops. A filter selects
17
+ existing rows at execution time, not work submitted after the command.
18
+ """
19
+
20
+ work_item_ids: list[UUID] | None = Field(default=None, min_length=1, max_length=100)
21
+ runtime_context: dict[str, JsonValue] | None = Field(
22
+ default=None,
23
+ min_length=1,
24
+ description=(
25
+ "Non-empty JSON object matched using PostgreSQL JSONB containment (@>). "
26
+ "All supplied key/value pairs must be contained in the stored runtime_context. "
27
+ "Nested objects may contain additional keys; arrays use JSONB containment semantics. "
28
+ "Keys and values are caller-defined; EP assigns them no domain meaning."
29
+ ),
30
+ )
31
+
32
+ @model_validator(mode="after")
33
+ def require_one_selector(self) -> Self:
34
+ """Reject unscoped requests and ambiguous combinations of selectors."""
35
+ if (self.work_item_ids is not None) == (self.runtime_context is not None):
36
+ message = "Exactly one of work_item_ids or runtime_context is required"
37
+ raise ValueError(message)
38
+ return self
39
+
40
+
41
+ class WorkCancelBulk(CommandPayload):
42
+ """Commit cancellation intent for all matches in one transaction.
43
+
44
+ Success acknowledges durable intent, not stopped execution. Lifecycle and
45
+ results are unchanged, including for terminal work. Repeating is safe.
46
+ """
47
+
48
+ command_type: ClassVar[str] = "work.cancel_bulk"
49
+ selector: WorkItemSelector = Field(description="Exactly one selector; filter matches have no row-count limit.")
50
+
51
+
52
+ class WorkDeleteBulk(CommandPayload):
53
+ """Commit deletion and cancellation intent together for all matches.
54
+
55
+ Success follows the transaction commit, not resource cleanup or physical
56
+ removal. EP workers own completion. Repeating after a lost receipt is safe.
57
+ """
58
+
59
+ command_type: ClassVar[str] = "work.delete_bulk"
60
+ selector: WorkItemSelector = Field(description="Exactly one selector; filter matches have no row-count limit.")