execution-plane-client 0.1.17__tar.gz → 0.1.19__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.
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/PKG-INFO +2 -4
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/README.md +1 -3
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/_version.py +2 -2
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/catalog.py +2 -1
- execution_plane_client-0.1.19/commands/credentials.py +37 -0
- execution_plane_client-0.1.19/commands/results.py +74 -0
- execution_plane_client-0.1.17/commands/credentials.py +0 -15
- execution_plane_client-0.1.17/commands/results.py +0 -43
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/.gitignore +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/LICENSE +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/__init__.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/commands/__init__.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/commands/base.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/commands/clusters.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/commands/control.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/commands/targets.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/commands/work.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/errors.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/handlers.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/models/__init__.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/models/cluster.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/models/execution_target.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/models/shared.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/models/work_item.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/protocol.py +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/py.typed +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/pyproject.toml +0 -0
- {execution_plane_client-0.1.17 → execution_plane_client-0.1.19}/registry.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: execution-plane-client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.19
|
|
4
4
|
Summary: Shared execution-plane command, response, and handler contracts
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -30,11 +30,9 @@ from uuid import uuid4
|
|
|
30
30
|
from execution_plane_client.commands.clusters import ClusterRegister
|
|
31
31
|
|
|
32
32
|
message = ClusterRegister(
|
|
33
|
-
|
|
34
|
-
desired_revision=1,
|
|
33
|
+
resource_id=uuid4(),
|
|
35
34
|
name="workers",
|
|
36
35
|
endpoint="https://cluster.example",
|
|
37
|
-
namespace="execution-plane",
|
|
38
36
|
credential_ref=uuid4(),
|
|
39
37
|
).to_message(
|
|
40
38
|
source_id="syntara-orchestration",
|
|
@@ -20,11 +20,9 @@ from uuid import uuid4
|
|
|
20
20
|
from execution_plane_client.commands.clusters import ClusterRegister
|
|
21
21
|
|
|
22
22
|
message = ClusterRegister(
|
|
23
|
-
|
|
24
|
-
desired_revision=1,
|
|
23
|
+
resource_id=uuid4(),
|
|
25
24
|
name="workers",
|
|
26
25
|
endpoint="https://cluster.example",
|
|
27
|
-
namespace="execution-plane",
|
|
28
26
|
credential_ref=uuid4(),
|
|
29
27
|
).to_message(
|
|
30
28
|
source_id="syntara-orchestration",
|
|
@@ -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.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
21
|
+
__version__ = version = '0.1.19'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 19)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -5,7 +5,7 @@ from dataclasses import dataclass
|
|
|
5
5
|
from execution_plane_client.commands.base import CommandPayload
|
|
6
6
|
from execution_plane_client.commands.clusters import ClusterDelete, ClusterRegister, ClusterUpdate
|
|
7
7
|
from execution_plane_client.commands.control import CancelCommand, Completion
|
|
8
|
-
from execution_plane_client.commands.credentials import CredentialResolve
|
|
8
|
+
from execution_plane_client.commands.credentials import CredentialResolve, CredentialResolveWorkload
|
|
9
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
|
|
@@ -30,6 +30,7 @@ class CommandCatalog:
|
|
|
30
30
|
WorkExecute,
|
|
31
31
|
Completion,
|
|
32
32
|
CredentialResolve,
|
|
33
|
+
CredentialResolveWorkload,
|
|
33
34
|
ClusterRegister,
|
|
34
35
|
ClusterUpdate,
|
|
35
36
|
ClusterDelete,
|
|
@@ -0,0 +1,37 @@
|
|
|
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 pydantic import Field
|
|
9
|
+
|
|
10
|
+
from execution_plane_client.commands.base import CommandPayload
|
|
11
|
+
from execution_plane_client.commands.work import CredentialRecipeId, StepIdentity # noqa: TC001
|
|
12
|
+
from execution_plane_client.protocol import Identifier # noqa: TC001
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CredentialResolve(CommandPayload):
|
|
16
|
+
"""Resolve an opaque credential reference into a short-lived value."""
|
|
17
|
+
|
|
18
|
+
command_type: ClassVar[str] = "credential.resolve"
|
|
19
|
+
credential_ref: UUID = Field(
|
|
20
|
+
repr=False,
|
|
21
|
+
description="Opaque AO credential reference.",
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CredentialResolveWorkload(CommandPayload):
|
|
26
|
+
"""Resolve one credential reference for the work item named by its parent command."""
|
|
27
|
+
|
|
28
|
+
command_type: ClassVar[str] = "credential.resolve.workload"
|
|
29
|
+
requires_parent: ClassVar[bool] = True
|
|
30
|
+
attempt_id: Identifier = Field(description="Execution attempt that owns the workload invocation.")
|
|
31
|
+
credential_ref: UUID = Field(
|
|
32
|
+
repr=False,
|
|
33
|
+
description="Opaque AO credential reference bound to the requested recipe.",
|
|
34
|
+
)
|
|
35
|
+
credential_recipe_id: CredentialRecipeId = Field(description="Logical Plugin SDK recipe requested by the workload.")
|
|
36
|
+
workflow_run_id: StepIdentity = Field(description="Caller-owned workflow run containing the active step.")
|
|
37
|
+
step_revision_id: StepIdentity = Field(description="Workload revision that requested the credential.")
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Typed command results and transport receipts."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from typing import Annotated, Literal
|
|
7
|
+
from uuid import UUID # noqa: TC003 - Pydantic resolves this model field at runtime.
|
|
8
|
+
|
|
9
|
+
from pydantic import Field, StrictBool, StrictStr, field_validator
|
|
10
|
+
|
|
11
|
+
from execution_plane_client.protocol import ResourceReference, WireModel
|
|
12
|
+
|
|
13
|
+
MAX_WORKLOAD_CREDENTIAL_FIELDS = 32
|
|
14
|
+
MAX_WORKLOAD_CREDENTIAL_BYTES = 32 * 1024
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CredentialResolveCommandResult(WireModel):
|
|
18
|
+
"""Typed result returned for a credential-resolution command."""
|
|
19
|
+
|
|
20
|
+
command_type: Literal["credential.resolve"] = "credential.resolve"
|
|
21
|
+
command_revision: Literal[1] = 1
|
|
22
|
+
credential: Annotated[StrictStr, Field(min_length=1, max_length=65536, repr=False)]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CredentialResolveWorkloadCommandResult(WireModel):
|
|
26
|
+
"""Typed result returned for a workload credential-resolution command."""
|
|
27
|
+
|
|
28
|
+
command_type: Literal["credential.resolve.workload"] = "credential.resolve.workload"
|
|
29
|
+
command_revision: Literal[1] = 1
|
|
30
|
+
credential: dict[
|
|
31
|
+
Annotated[StrictStr, Field(min_length=1, max_length=128)],
|
|
32
|
+
Annotated[StrictStr, Field(min_length=1, max_length=8192)],
|
|
33
|
+
] = Field(repr=False)
|
|
34
|
+
|
|
35
|
+
@field_validator("credential")
|
|
36
|
+
@classmethod
|
|
37
|
+
def check_document(cls, value: dict[str, str]) -> dict[str, str]:
|
|
38
|
+
"""Bound credential field count and encoded response size."""
|
|
39
|
+
if not value:
|
|
40
|
+
message = "Credential document must not be empty"
|
|
41
|
+
raise ValueError(message)
|
|
42
|
+
if len(value) > MAX_WORKLOAD_CREDENTIAL_FIELDS:
|
|
43
|
+
message = "Credential document must contain at most 32 fields"
|
|
44
|
+
raise ValueError(message)
|
|
45
|
+
encoded = json.dumps(value, ensure_ascii=False, separators=(",", ":")).encode("utf-8")
|
|
46
|
+
if len(encoded) > MAX_WORKLOAD_CREDENTIAL_BYTES:
|
|
47
|
+
message = "Credential document exceeds 32 KiB"
|
|
48
|
+
raise ValueError(message)
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class TargetHealthCommandResult(WireModel):
|
|
53
|
+
"""Typed result returned for an execution-target health command."""
|
|
54
|
+
|
|
55
|
+
command_type: Literal["execution_target.health"] = "execution_target.health"
|
|
56
|
+
command_revision: Literal[1] = 1
|
|
57
|
+
healthy: StrictBool
|
|
58
|
+
message: StrictStr | None = None
|
|
59
|
+
skipped: StrictBool = False
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
CommandResult = Annotated[
|
|
63
|
+
CredentialResolveCommandResult | CredentialResolveWorkloadCommandResult | TargetHealthCommandResult,
|
|
64
|
+
Field(discriminator="command_type"),
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class TransportReceipt(WireModel):
|
|
69
|
+
"""Receipt of a handled request, without a persisted command record."""
|
|
70
|
+
|
|
71
|
+
received: Literal[True] = True
|
|
72
|
+
message_id: UUID
|
|
73
|
+
resource: ResourceReference | None = None
|
|
74
|
+
result: CommandResult | None = None
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|