swarmauri_toolkit_containertoolkit 0.11.0.dev1__tar.gz → 0.11.0.dev4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swarmauri_toolkit_containertoolkit
3
- Version: 0.11.0.dev1
3
+ Version: 0.11.0.dev4
4
4
  Summary: Toolkit bundling container management tools.
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -17,12 +17,19 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Programming Language :: Python :: 3.14
20
- Requires-Dist: swarmauri_base
21
- Requires-Dist: swarmauri_core
22
- Requires-Dist: swarmauri_standard
23
- Requires-Dist: swarmauri_tool_containerfeedchars
24
- Requires-Dist: swarmauri_tool_containermakepr
25
- Requires-Dist: swarmauri_tool_containernewsession
20
+ Requires-Dist: swarmauri_base (>=0.11.0.dev6,<0.12)
21
+ Requires-Dist: swarmauri_core (>=0.11.0.dev6,<0.12)
22
+ Requires-Dist: swarmauri_process_docker (>=0.1.0,<0.2)
23
+ Requires-Dist: swarmauri_process_kubernetes (>=0.1.0,<0.2)
24
+ Requires-Dist: swarmauri_standard (>=0.11.0.dev8,<0.12)
25
+ Requires-Dist: swarmauri_tool_cancelprocess (>=0.1.0,<0.2)
26
+ Requires-Dist: swarmauri_tool_containerfeedchars (>=0.11.0.dev4,<0.12)
27
+ Requires-Dist: swarmauri_tool_containermakepr (>=0.11.0.dev4,<0.12)
28
+ Requires-Dist: swarmauri_tool_containernewsession (>=0.11.0.dev4,<0.12)
29
+ Requires-Dist: swarmauri_tool_readprocessoutput (>=0.1.0,<0.2)
30
+ Requires-Dist: swarmauri_tool_runbashscript (>=0.1.0,<0.2)
31
+ Requires-Dist: swarmauri_tool_runcommand (>=0.1.0,<0.2)
32
+ Requires-Dist: swarmauri_tool_writestdin (>=0.1.0,<0.2)
26
33
  Description-Content-Type: text/markdown
27
34
 
28
35
  ![Swarmauri Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri_sdk_brand.png)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "swarmauri_toolkit_containertoolkit"
3
- version = "0.11.0.dev1"
3
+ version = "0.11.0.dev4"
4
4
  description = "Toolkit bundling container management tools."
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
@@ -19,12 +19,19 @@ classifiers = [
19
19
  ]
20
20
  authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
21
21
  dependencies = [
22
- "swarmauri_core",
23
- "swarmauri_base",
24
- "swarmauri_standard",
25
- "swarmauri_tool_containernewsession",
26
- "swarmauri_tool_containerfeedchars",
27
- "swarmauri_tool_containermakepr",
22
+ "swarmauri_process_docker>=0.1.0,<0.2",
23
+ "swarmauri_process_kubernetes>=0.1.0,<0.2",
24
+ "swarmauri_tool_runcommand>=0.1.0,<0.2",
25
+ "swarmauri_tool_runbashscript>=0.1.0,<0.2",
26
+ "swarmauri_tool_readprocessoutput>=0.1.0,<0.2",
27
+ "swarmauri_tool_writestdin>=0.1.0,<0.2",
28
+ "swarmauri_tool_cancelprocess>=0.1.0,<0.2",
29
+ "swarmauri_core>=0.11.0.dev6,<0.12",
30
+ "swarmauri_base>=0.11.0.dev6,<0.12",
31
+ "swarmauri_standard>=0.11.0.dev8,<0.12",
32
+ "swarmauri_tool_containernewsession>=0.11.0.dev4,<0.12",
33
+ "swarmauri_tool_containerfeedchars>=0.11.0.dev4,<0.12",
34
+ "swarmauri_tool_containermakepr>=0.11.0.dev4,<0.12",
28
35
  ]
29
36
  keywords = [
30
37
  'swarmauri',
@@ -36,6 +43,13 @@ keywords = [
36
43
  ]
37
44
 
38
45
  [tool.uv.sources]
46
+ swarmauri_process_docker = { workspace = true }
47
+ swarmauri_process_kubernetes = { workspace = true }
48
+ swarmauri_tool_runcommand = { workspace = true }
49
+ swarmauri_tool_runbashscript = { workspace = true }
50
+ swarmauri_tool_readprocessoutput = { workspace = true }
51
+ swarmauri_tool_writestdin = { workspace = true }
52
+ swarmauri_tool_cancelprocess = { workspace = true }
39
53
  swarmauri_core = { workspace = true }
40
54
  swarmauri_base = { workspace = true }
41
55
  swarmauri_standard = { workspace = true }
@@ -0,0 +1,78 @@
1
+ from typing import Dict, Literal
2
+
3
+ from pydantic import Field
4
+
5
+ from swarmauri_core.processes import IProcessBackend
6
+ from swarmauri_process_docker import DockerProcessBackend
7
+ from swarmauri_process_kubernetes import KubernetesProcessBackend
8
+ from swarmauri_tool_runcommand import RunCommandTool
9
+ from swarmauri_tool_runbashscript import RunBashScriptTool
10
+ from swarmauri_tool_readprocessoutput import ReadProcessOutputTool
11
+ from swarmauri_tool_writestdin import WriteStdinTool
12
+ from swarmauri_tool_cancelprocess import CancelProcessTool
13
+ from swarmauri_base.tools.ToolBase import ToolBase
14
+ from swarmauri_base.toolkits.ToolkitBase import ToolkitBase
15
+ from swarmauri_base.ComponentBase import ComponentBase, SubclassUnion
16
+
17
+ from swarmauri_tool_containernewsession import ContainerNewSessionTool
18
+ from swarmauri_tool_containerfeedchars import ContainerFeedCharsTool
19
+ from swarmauri_tool_containermakepr import ContainerMakePrTool
20
+
21
+
22
+ @ComponentBase.register_type(ToolkitBase, "ContainerToolkit")
23
+ class ContainerToolkit(ToolkitBase):
24
+ tools: Dict[str, SubclassUnion[ToolBase]] = Field(
25
+ default_factory=dict, exclude=True
26
+ )
27
+ container_name: str | None = None
28
+ image: str | None = None
29
+ driver: Literal["docker", "kubernetes"] = "docker"
30
+
31
+ def __init__(
32
+ self,
33
+ container_name: str | None = None,
34
+ image: str | None = None,
35
+ driver: Literal["docker", "kubernetes"] = "docker",
36
+ backend: IProcessBackend | None = None,
37
+ **kwargs,
38
+ ):
39
+ kwargs.pop("tools", None)
40
+ super().__init__(
41
+ container_name=container_name, image=image, driver=driver, **kwargs
42
+ )
43
+ process_backend = backend
44
+ if process_backend is None:
45
+ process_backend = (
46
+ DockerProcessBackend()
47
+ if driver == "docker"
48
+ else KubernetesProcessBackend()
49
+ )
50
+ self.tools = {
51
+ "ContainerNewSessionTool": ContainerNewSessionTool(
52
+ container_name=container_name,
53
+ image=image,
54
+ driver=driver,
55
+ backend=backend,
56
+ ),
57
+ "ContainerFeedCharsTool": ContainerFeedCharsTool(
58
+ container_name=container_name,
59
+ driver=driver,
60
+ backend=backend,
61
+ ),
62
+ "ContainerMakePrTool": ContainerMakePrTool(
63
+ container_name=container_name,
64
+ driver=driver,
65
+ backend=backend,
66
+ ),
67
+ "RunCommandTool": RunCommandTool(
68
+ backend=process_backend, workspace=container_name
69
+ ),
70
+ "RunBashScriptTool": RunBashScriptTool(
71
+ backend=process_backend, workspace=container_name
72
+ ),
73
+ "ReadProcessOutputTool": ReadProcessOutputTool(
74
+ backend=process_backend
75
+ ),
76
+ "WriteStdinTool": WriteStdinTool(backend=process_backend),
77
+ "CancelProcessTool": CancelProcessTool(backend=process_backend),
78
+ }
@@ -1,33 +0,0 @@
1
- from typing import Dict
2
- from swarmauri_base.tools.ToolBase import ToolBase
3
- from swarmauri_base.toolkits.ToolkitBase import ToolkitBase
4
- from swarmauri_base.ComponentBase import ComponentBase, SubclassUnion
5
-
6
- from swarmauri_tool_containernewsession import ContainerNewSessionTool
7
- from swarmauri_tool_containerfeedchars import ContainerFeedCharsTool
8
- from swarmauri_tool_containermakepr import ContainerMakePrTool
9
-
10
-
11
- @ComponentBase.register_type(ToolkitBase, "ContainerToolkit")
12
- class ContainerToolkit(ToolkitBase):
13
- tools: Dict[str, SubclassUnion[ToolBase]] = {}
14
-
15
- def __init__(
16
- self,
17
- container_name: str | None = None,
18
- image: str | None = None,
19
- **kwargs,
20
- ):
21
- super().__init__(**kwargs)
22
- self.tools = {
23
- "ContainerNewSessionTool": ContainerNewSessionTool(
24
- container_name=container_name,
25
- image=image,
26
- ),
27
- "ContainerFeedCharsTool": ContainerFeedCharsTool(
28
- container_name=container_name,
29
- ),
30
- "ContainerMakePrTool": ContainerMakePrTool(
31
- container_name=container_name,
32
- ),
33
- }