execution-plane-client 0.1.10__tar.gz → 0.1.11__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 (22) hide show
  1. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/PKG-INFO +3 -3
  2. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/README.md +2 -2
  3. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/_version.py +2 -2
  4. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/catalog.py +2 -1
  5. execution_plane_client-0.1.11/commands/credentials.py +15 -0
  6. execution_plane_client-0.1.11/commands/results.py +43 -0
  7. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/commands/targets.py +6 -0
  8. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/handlers.py +2 -0
  9. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/protocol.py +0 -8
  10. execution_plane_client-0.1.10/commands/credentials.py +0 -25
  11. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/.gitignore +0 -0
  12. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/LICENSE +0 -0
  13. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/__init__.py +0 -0
  14. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/commands/__init__.py +0 -0
  15. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/commands/base.py +0 -0
  16. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/commands/clusters.py +0 -0
  17. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/commands/control.py +0 -0
  18. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/commands/work.py +0 -0
  19. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/errors.py +0 -0
  20. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/py.typed +0 -0
  21. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/pyproject.toml +0 -0
  22. {execution_plane_client-0.1.10 → execution_plane_client-0.1.11}/registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: execution-plane-client
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Summary: Shared execution-plane command contracts and handler registry
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -45,8 +45,8 @@ message = ClusterRegister(
45
45
  body = message.model_dump(mode="json") # Send using your application's HTTP client.
46
46
  ```
47
47
 
48
- Every concrete command supports this method, including `ClusterDelete` and
49
- `TargetDelete`. Partial updates serialize only supplied fields, retaining explicit
48
+ Every concrete command supports this method, including `ClusterDelete`,
49
+ `TargetDelete` and `TargetHealth`. Partial updates serialize only supplied fields, retaining explicit
50
50
  nulls and placement discriminators without resetting omitted configuration.
51
51
 
52
52
  By default, each call generates a command UUID and UTC timestamp; `message_id`
@@ -35,8 +35,8 @@ message = ClusterRegister(
35
35
  body = message.model_dump(mode="json") # Send using your application's HTTP client.
36
36
  ```
37
37
 
38
- Every concrete command supports this method, including `ClusterDelete` and
39
- `TargetDelete`. Partial updates serialize only supplied fields, retaining explicit
38
+ Every concrete command supports this method, including `ClusterDelete`,
39
+ `TargetDelete` and `TargetHealth`. Partial updates serialize only supplied fields, retaining explicit
40
40
  nulls and placement discriminators without resetting omitted configuration.
41
41
 
42
42
  By default, each call generates a command UUID and UTC timestamp; `message_id`
@@ -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.10'
22
- __version_tuple__ = version_tuple = (0, 1, 10)
21
+ __version__ = version = '0.1.11'
22
+ __version_tuple__ = version_tuple = (0, 1, 11)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -6,7 +6,7 @@ from execution_plane_client.commands.base import CommandPayload
6
6
  from execution_plane_client.commands.clusters import ClusterDelete, ClusterProvision, ClusterRegister, ClusterUpdate
7
7
  from execution_plane_client.commands.control import CancelCommand, Completion
8
8
  from execution_plane_client.commands.credentials import CredentialResolve
9
- from execution_plane_client.commands.targets import TargetDelete, TargetRegister, TargetUpdate
9
+ from execution_plane_client.commands.targets import TargetDelete, TargetHealth, TargetRegister, TargetUpdate
10
10
  from execution_plane_client.commands.work import WorkExecute
11
11
  from execution_plane_client.errors import UnsupportedCommand
12
12
  from execution_plane_client.protocol import MessageEnvelope
@@ -37,6 +37,7 @@ class CommandCatalog:
37
37
  TargetRegister,
38
38
  TargetUpdate,
39
39
  TargetDelete,
40
+ TargetHealth,
40
41
  CancelCommand,
41
42
  )
42
43
  self._definitions = {
@@ -0,0 +1,15 @@
1
+ """Credential-reference resolution commands."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import ClassVar
6
+ from uuid import UUID # noqa: TC003 - Pydantic evaluates fields.
7
+
8
+ from execution_plane_client.commands.base import CommandPayload
9
+
10
+
11
+ class CredentialResolve(CommandPayload):
12
+ """Resolve an opaque credential reference into a short-lived value."""
13
+
14
+ command_type: ClassVar[str] = "credential.resolve"
15
+ credential_ref: UUID
@@ -0,0 +1,43 @@
1
+ """Typed command results and transport receipts."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Annotated, Literal
6
+ from uuid import UUID # noqa: TC003 - Pydantic resolves this model field at runtime.
7
+
8
+ from pydantic import Field, StrictBool, StrictStr
9
+
10
+ from execution_plane_client.protocol import ResourceReference, WireModel
11
+
12
+
13
+ class CredentialResolveCommandResult(WireModel):
14
+ """Typed result returned for a credential-resolution command."""
15
+
16
+ command_type: Literal["credential.resolve"] = "credential.resolve"
17
+ command_revision: Literal[1] = 1
18
+ credential: Annotated[StrictStr, Field(min_length=1, max_length=65536, repr=False)]
19
+
20
+
21
+ class TargetHealthCommandResult(WireModel):
22
+ """Typed result returned for an execution-target health command."""
23
+
24
+ command_type: Literal["execution_target.health"] = "execution_target.health"
25
+ command_revision: Literal[1] = 1
26
+ healthy: StrictBool
27
+ message: StrictStr | None = None
28
+ skipped: StrictBool = False
29
+
30
+
31
+ CommandResult = Annotated[
32
+ CredentialResolveCommandResult | TargetHealthCommandResult,
33
+ Field(discriminator="command_type"),
34
+ ]
35
+
36
+
37
+ class TransportReceipt(WireModel):
38
+ """Receipt of a handled request, without a persisted command record."""
39
+
40
+ received: Literal[True] = True
41
+ message_id: UUID
42
+ resource: ResourceReference | None = None
43
+ result: CommandResult | None = None
@@ -150,3 +150,9 @@ class TargetUpdate(ResourceIdentity, CommandPayload):
150
150
  def check_endpoint(cls, value: str | None) -> str | None:
151
151
  """Validate explicit endpoint updates before applying them."""
152
152
  return None if value is None else validate_endpoint(value)
153
+
154
+
155
+ class TargetHealth(ResourceIdentity, CommandPayload):
156
+ """Query the current health of one ExecutionTarget."""
157
+
158
+ command_type: ClassVar[str] = "execution_target.health"
@@ -4,6 +4,7 @@ from dataclasses import dataclass
4
4
  from typing import Protocol
5
5
 
6
6
  from execution_plane_client.commands.base import CommandPayload
7
+ from execution_plane_client.commands.results import CommandResult
7
8
  from execution_plane_client.protocol import MessageEnvelope, ResourceReference
8
9
 
9
10
 
@@ -12,6 +13,7 @@ class HandlingResult:
12
13
  """Optional resource created or affected by a command."""
13
14
 
14
15
  resource: ResourceReference | None = None
16
+ result: CommandResult | None = None
15
17
 
16
18
 
17
19
  class CommandHandler[ContextT](Protocol):
@@ -123,11 +123,3 @@ class CapabilitiesRead(WireModel):
123
123
 
124
124
  protocol_revision: Literal[1] = 1
125
125
  commands: dict[str, list[int]]
126
-
127
-
128
- class TransportReceipt(WireModel):
129
- """Receipt of a handled request, without a persisted command record."""
130
-
131
- received: Literal[True] = True
132
- message_id: UUID
133
- resource: ResourceReference | None = None
@@ -1,25 +0,0 @@
1
- """Credential-reference resolution commands and responses."""
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Annotated, ClassVar
6
- from uuid import UUID # noqa: TC003 - Pydantic evaluates fields.
7
-
8
- from pydantic import Field, StrictStr
9
-
10
- from execution_plane_client.commands.base import CommandPayload
11
- from execution_plane_client.protocol import WireModel
12
-
13
-
14
- class CredentialResolve(CommandPayload):
15
- """Resolve an opaque credential reference into a short-lived value."""
16
-
17
- command_type: ClassVar[str] = "credential.resolve"
18
- credential_ref: UUID
19
-
20
-
21
- class CredentialResolution(WireModel):
22
- """The resolved credential value for one submitted command."""
23
-
24
- message_id: UUID
25
- credential: Annotated[StrictStr, Field(min_length=1, max_length=65536, repr=False)]