swarmauri_toolkit_image 0.1.0__py3-none-any.whl
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.
- swarmauri_toolkit_image/ImageToolkit.py +80 -0
- swarmauri_toolkit_image/__init__.py +5 -0
- swarmauri_toolkit_image-0.1.0.dist-info/METADATA +353 -0
- swarmauri_toolkit_image-0.1.0.dist-info/RECORD +8 -0
- swarmauri_toolkit_image-0.1.0.dist-info/WHEEL +4 -0
- swarmauri_toolkit_image-0.1.0.dist-info/entry_points.txt +3 -0
- swarmauri_toolkit_image-0.1.0.dist-info/licenses/LICENSE +201 -0
- swarmauri_toolkit_image-0.1.0.dist-info/licenses/NOTICE +4 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Compose image generation and signing behind a shared publication policy."""
|
|
2
|
+
|
|
3
|
+
from threading import Lock
|
|
4
|
+
from typing import Any, Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field, PrivateAttr
|
|
7
|
+
from swarmauri_base.ComponentBase import ComponentBase
|
|
8
|
+
from swarmauri_base.toolkits.ToolkitBase import ToolkitBase
|
|
9
|
+
from swarmauri_core.image_gens.types import ImageArtifact
|
|
10
|
+
from swarmauri_tool_generateimage import GenerateImageTool
|
|
11
|
+
from swarmauri_tool_signimage import SignImageTool
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@ComponentBase.register_type(ToolkitBase, "ImageToolkit")
|
|
15
|
+
class ImageToolkit(ToolkitBase):
|
|
16
|
+
"""Apply the signing policy before releasing generated images."""
|
|
17
|
+
|
|
18
|
+
type: Literal["ImageToolkit"] = "ImageToolkit"
|
|
19
|
+
generate_tool: GenerateImageTool = Field(exclude=True)
|
|
20
|
+
sign_tool: SignImageTool = Field(exclude=True)
|
|
21
|
+
signing_policy: Literal["agent_decides", "always"] = Field(
|
|
22
|
+
default="agent_decides", frozen=True
|
|
23
|
+
)
|
|
24
|
+
_publication_lock: Lock = PrivateAttr(default_factory=Lock)
|
|
25
|
+
|
|
26
|
+
def model_post_init(self, context: Any) -> None:
|
|
27
|
+
if (
|
|
28
|
+
self.generate_tool.storage is not self.sign_tool.storage
|
|
29
|
+
or self.generate_tool.scope != self.sign_tool.scope
|
|
30
|
+
):
|
|
31
|
+
raise ValueError(
|
|
32
|
+
"Image tools must share the same storage instance and scope"
|
|
33
|
+
)
|
|
34
|
+
generate = self.generate_tool.model_copy(
|
|
35
|
+
update={
|
|
36
|
+
"on_staged": self._sign_and_publish
|
|
37
|
+
if self.signing_policy == "always"
|
|
38
|
+
else None
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
self.generate_tool = generate
|
|
42
|
+
self.tools = {
|
|
43
|
+
generate.name: generate,
|
|
44
|
+
self.sign_tool.name: self.sign_tool,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
def _sign_and_publish(
|
|
48
|
+
self, batch_id: str, artifacts: list[ImageArtifact]
|
|
49
|
+
) -> dict[str, Any]:
|
|
50
|
+
with self._publication_lock:
|
|
51
|
+
try:
|
|
52
|
+
signatures = [
|
|
53
|
+
self.sign_tool.sign_staged(item.artifact_id)
|
|
54
|
+
for item in artifacts
|
|
55
|
+
]
|
|
56
|
+
self.generate_tool.publish(batch_id)
|
|
57
|
+
except Exception:
|
|
58
|
+
return {"status": "signing_failed", "retry_batch_id": batch_id}
|
|
59
|
+
return {
|
|
60
|
+
"status": "signed",
|
|
61
|
+
"artifacts": self.generate_tool.result(artifacts)["artifacts"],
|
|
62
|
+
"signatures": signatures,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
def retry_signing(self, batch_id: str) -> dict[str, Any]:
|
|
66
|
+
"""Retry signing a previously staged batch without generating again."""
|
|
67
|
+
if self.signing_policy != "always":
|
|
68
|
+
raise ValueError("Batch retry requires the always policy")
|
|
69
|
+
return self._sign_and_publish(
|
|
70
|
+
batch_id, self.generate_tool.staged_artifacts(batch_id)
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
def read_image(self, artifact_id: str) -> bytes:
|
|
74
|
+
"""Read the original bytes of a published image in this scope."""
|
|
75
|
+
key = self.sign_tool.require_published(artifact_id)
|
|
76
|
+
return self.generate_tool.storage.get_blob(f"{key}/image")
|
|
77
|
+
|
|
78
|
+
def read_signature(self, artifact_id: str, signature_id: str) -> bytes:
|
|
79
|
+
"""Read a published image's signature file."""
|
|
80
|
+
return self.sign_tool.read_signature(artifact_id, signature_id)
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_toolkit_image
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Compose image generation and enforce the configured signing policy.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Keywords: swarmauri,toolkits,automatic image signing,staged file publication,signing retry
|
|
9
|
+
Author: Jacob Stewart
|
|
10
|
+
Author-email: jacob@swarmauri.com
|
|
11
|
+
Requires-Python: >=3.10,<3.15
|
|
12
|
+
Classifier: Development Status :: 1 - Planning
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Requires-Dist: swarmauri_base (>=0.11.0,<0.12)
|
|
19
|
+
Requires-Dist: swarmauri_core (>=0.11.1,<0.12)
|
|
20
|
+
Requires-Dist: swarmauri_tool_generateimage (>=0.1,<0.2)
|
|
21
|
+
Requires-Dist: swarmauri_tool_signimage (>=0.1,<0.2)
|
|
22
|
+
Project-URL: Repository, https://github.com/swarmauri/swarmauri-sdk
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# swarmauri_toolkit_image
|
|
26
|
+
|
|
27
|
+
<!-- readme-standards:begin branding -->
|
|
28
|
+
<p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
|
|
29
|
+
<p align="center"><strong>swarmauri_toolkit_image</strong></p>
|
|
30
|
+
<p align="center">Compose image generation and enforce the configured signing policy.</p>
|
|
31
|
+
<p align="center">
|
|
32
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_image/"><img alt="pypi: swarmauri_toolkit_image unpublished" src="https://img.shields.io/static/v1?label=pypi&message=swarmauri_toolkit_image%20unpublished&labelColor=292421&color=805500"></a>
|
|
33
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/pyproject.toml"><img alt="Source version: 0.1.0" src="https://img.shields.io/static/v1?label=Source%20version&message=0.1.0&labelColor=292421&color=994525"></a>
|
|
34
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/pyproject.toml"><img alt="Python: >=3.10,<3.15" src="https://img.shields.io/static/v1?label=Python&message=%3E%3D3.10%2C%3C3.15&labelColor=292421&color=994525"></a>
|
|
35
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/pyproject.toml"><img alt="Layer: plugins" src="https://img.shields.io/static/v1?label=Layer&message=plugins&labelColor=292421&color=994525"></a>
|
|
36
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&message=active&labelColor=292421&color=24654A"></a>
|
|
37
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&message=Apache-2.0&labelColor=292421&color=994525"></a>
|
|
38
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&message=attribution&labelColor=292421&color=994525"></a>
|
|
39
|
+
</p>
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="https://pypi.org/project/swarmauri_toolkit_image/"><img alt="pypi downloads: swarmauri_toolkit_image: unpublished" src="https://img.shields.io/static/v1?label=pypi%20downloads&message=swarmauri_toolkit_image%3A%20unpublished&labelColor=292421&color=805500"></a>
|
|
42
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/README.md"><img alt="README hits: swarmauri_toolkit_image" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/60-plugins/swarmauri_toolkit_image/README.md.svg?label=README%20hits&labelColor=292421&color=08704E"></a>
|
|
43
|
+
</p>
|
|
44
|
+
<p align="center">
|
|
45
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&message=CI%20gate&labelColor=292421&color=67437E"></a>
|
|
46
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&message=example%20source&labelColor=292421&color=67437E"></a>
|
|
47
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&message=not%20certified&labelColor=292421&color=805500"></a>
|
|
48
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&message=repository%20policy&labelColor=292421&color=67437E"></a>
|
|
49
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&message=source%20and%20CI&labelColor=292421&color=67437E"></a>
|
|
50
|
+
</p>
|
|
51
|
+
<p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
|
|
52
|
+
<!-- readme-standards:end branding -->
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Overview
|
|
57
|
+
|
|
58
|
+
### Summary
|
|
59
|
+
|
|
60
|
+
Compose image generation and enforce the configured signing policy.
|
|
61
|
+
|
|
62
|
+
### Why This Package
|
|
63
|
+
|
|
64
|
+
This package provides automatic image signing, staged file publication, signing retry for applications using the Swarmauri SDK.
|
|
65
|
+
|
|
66
|
+
### When to Use
|
|
67
|
+
|
|
68
|
+
Use this component when an application needs the image workflow described in the usage examples.
|
|
69
|
+
|
|
70
|
+
### Features
|
|
71
|
+
|
|
72
|
+
- Automatic image signing.
|
|
73
|
+
- Staged file publication.
|
|
74
|
+
- Signing retry.
|
|
75
|
+
|
|
76
|
+
### Non-Goals
|
|
77
|
+
|
|
78
|
+
Provider accounts, storage credentials, and signing identities are configured by the application.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Getting Started
|
|
83
|
+
|
|
84
|
+
### Prerequisites
|
|
85
|
+
|
|
86
|
+
The package supports Python 3.10 through 3.14. Install any application-specific provider or adapter used in your workflow.
|
|
87
|
+
|
|
88
|
+
### Installation
|
|
89
|
+
|
|
90
|
+
#### Install with uv
|
|
91
|
+
|
|
92
|
+
<!-- readme-standards:begin installation.uv -->
|
|
93
|
+
`swarmauri_toolkit_image` is not declared published. From the source checkout:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
uv pip install .
|
|
97
|
+
```
|
|
98
|
+
<!-- readme-standards:end installation.uv -->
|
|
99
|
+
|
|
100
|
+
From a Swarmauri SDK checkout, run `uv sync --directory pkgs --package swarmauri_toolkit_image`.
|
|
101
|
+
|
|
102
|
+
#### Install with pip
|
|
103
|
+
|
|
104
|
+
<!-- readme-standards:begin installation.pip -->
|
|
105
|
+
`swarmauri_toolkit_image` is not declared published. From the source checkout:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
python -m pip install .
|
|
109
|
+
```
|
|
110
|
+
<!-- readme-standards:end installation.pip -->
|
|
111
|
+
|
|
112
|
+
From the wheelhouse containing the SDK dependency builds, run `python -m pip install --find-links dist swarmauri_toolkit_image`.
|
|
113
|
+
|
|
114
|
+
#### Install with Poetry
|
|
115
|
+
|
|
116
|
+
<!-- readme-standards:begin installation.poetry -->
|
|
117
|
+
`swarmauri_toolkit_image` is not declared published. From a separate Poetry project, replace the path with your checkout:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
poetry add /path/to/swarmauri_toolkit_image
|
|
121
|
+
```
|
|
122
|
+
<!-- readme-standards:end installation.poetry -->
|
|
123
|
+
|
|
124
|
+
### Quick Start
|
|
125
|
+
|
|
126
|
+
#### Example
|
|
127
|
+
|
|
128
|
+
<!-- readme-standards:begin example.quick-start -->
|
|
129
|
+
Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/docs/readme/quick_start.py).
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from swarmauri_tool_generateimage import GenerateImageTool
|
|
133
|
+
from swarmauri_tool_signimage import ImageSigningConfig, SignImageTool
|
|
134
|
+
from swarmauri_toolkit_image import ImageToolkit
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def configure(image_model, storage, key_provider, *, scope, key_ref):
|
|
138
|
+
generate = GenerateImageTool(
|
|
139
|
+
model=image_model, storage=storage, scope=scope
|
|
140
|
+
)
|
|
141
|
+
sign = SignImageTool(
|
|
142
|
+
storage=storage,
|
|
143
|
+
scope=scope,
|
|
144
|
+
key_provider=key_provider,
|
|
145
|
+
config=ImageSigningConfig(
|
|
146
|
+
key_ref=key_ref, algorithm="EdDSA", metadata={"issuer": "Studio"}
|
|
147
|
+
),
|
|
148
|
+
)
|
|
149
|
+
return ImageToolkit(
|
|
150
|
+
generate_tool=generate, sign_tool=sign, signing_policy="always"
|
|
151
|
+
)
|
|
152
|
+
```
|
|
153
|
+
<!-- readme-standards:end example.quick-start -->
|
|
154
|
+
|
|
155
|
+
#### Expected Result
|
|
156
|
+
|
|
157
|
+
The example shows the package’s configuration and workflow entry point.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Usage
|
|
162
|
+
|
|
163
|
+
### Common Workflows
|
|
164
|
+
|
|
165
|
+
The configure example takes a byte-returning image model, an SDK storage adapter, and a key provider with an Ed25519 key. For the DeepInfra adapter shown in the generator guide, set output="base64" on GenerateImageTool. Call toolkit.get_tool_by_name("GenerateImageTool")(prompt) to run generation with the policy applied. Pass the returned result to save_first_signed_image. Use retry_signing with the retry batch ID after correcting a signing failure.
|
|
166
|
+
|
|
167
|
+
<!-- readme-standards:begin example.usage -->
|
|
168
|
+
Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/docs/readme/usage.py).
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
from pathlib import Path
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def save_first_signed_image(toolkit, result, output: Path):
|
|
175
|
+
if result["status"] != "signed":
|
|
176
|
+
raise RuntimeError(result["status"])
|
|
177
|
+
signature = result["signatures"][0]
|
|
178
|
+
artifact_id = signature["artifact_id"]
|
|
179
|
+
output.write_bytes(toolkit.read_image(artifact_id))
|
|
180
|
+
output.with_suffix(".jws.json").write_bytes(
|
|
181
|
+
toolkit.read_signature(artifact_id, signature["signature_id"])
|
|
182
|
+
)
|
|
183
|
+
```
|
|
184
|
+
<!-- readme-standards:end example.usage -->
|
|
185
|
+
|
|
186
|
+
**Expected output.** With a successful signing result and `Path("mug.png")`, the helper writes two files to the working directory.
|
|
187
|
+
|
|
188
|
+
```text
|
|
189
|
+
mug.png
|
|
190
|
+
mug.jws.json
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Configuration
|
|
194
|
+
|
|
195
|
+
Use the public constructor or loader shown above. The caller supplies application-specific collaborators when constructing a component.
|
|
196
|
+
|
|
197
|
+
### Error Handling
|
|
198
|
+
|
|
199
|
+
Check the structured tool or agent outcome before using image references or reporting that signing succeeded.
|
|
200
|
+
|
|
201
|
+
### Best Practices
|
|
202
|
+
|
|
203
|
+
Use a distinct storage scope per authorized session and retrieve images through the toolkit after publication.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Package Boundary
|
|
208
|
+
|
|
209
|
+
### What It Owns
|
|
210
|
+
|
|
211
|
+
Compose image generation and enforce the configured signing policy.
|
|
212
|
+
|
|
213
|
+
### Public API and Import Surfaces
|
|
214
|
+
|
|
215
|
+
Import `ImageToolkit` from `swarmauri_toolkit_image`.
|
|
216
|
+
|
|
217
|
+
### Entry Points
|
|
218
|
+
|
|
219
|
+
<!-- readme-standards:begin entry-points -->
|
|
220
|
+
- `swarmauri.toolkits` → `ImageToolkit` → `swarmauri_toolkit_image:ImageToolkit`
|
|
221
|
+
<!-- readme-standards:end entry-points -->
|
|
222
|
+
|
|
223
|
+
### Injected Dependencies
|
|
224
|
+
|
|
225
|
+
Inject the collaborators required by your application through the public constructor.
|
|
226
|
+
|
|
227
|
+
### Protocol Consumers
|
|
228
|
+
|
|
229
|
+
Swarmauri applications can use this component through the corresponding SDK resource family.
|
|
230
|
+
|
|
231
|
+
### Extensions
|
|
232
|
+
|
|
233
|
+
Supply compatible SDK components through the inputs shown in the examples.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Operations and Readiness
|
|
238
|
+
|
|
239
|
+
### Operational Requirements
|
|
240
|
+
|
|
241
|
+
Set up the application collaborators listed above before running the workflow. Use a test provider and isolated scope for local verification.
|
|
242
|
+
|
|
243
|
+
### Health and Observability
|
|
244
|
+
|
|
245
|
+
Check tool outcomes, provider health, and storage availability in the application.
|
|
246
|
+
|
|
247
|
+
### Security and Resource Limits
|
|
248
|
+
|
|
249
|
+
Set provider and storage limits at the application boundary. Keep signing keys in the configured key provider.
|
|
250
|
+
|
|
251
|
+
### Compatibility
|
|
252
|
+
|
|
253
|
+
Python 3.10 through 3.14. Check the Python support of any provider adapter installed alongside this package.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Verification
|
|
258
|
+
|
|
259
|
+
### Tests
|
|
260
|
+
|
|
261
|
+
Run the package’s pytest suite from the SDK workspace.
|
|
262
|
+
|
|
263
|
+
### Certification Status
|
|
264
|
+
|
|
265
|
+
The package is in planning status. Its tests are available in the repository.
|
|
266
|
+
|
|
267
|
+
### Evidence
|
|
268
|
+
|
|
269
|
+
The package tests and maintained example sources are available alongside its manifest.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## FAQ
|
|
274
|
+
|
|
275
|
+
### Why
|
|
276
|
+
|
|
277
|
+
Compose image generation and enforce the configured signing policy.
|
|
278
|
+
|
|
279
|
+
### How
|
|
280
|
+
|
|
281
|
+
Use the installation instructions and the workflow examples in this guide.
|
|
282
|
+
|
|
283
|
+
### When
|
|
284
|
+
|
|
285
|
+
Use it when your image workflow needs automatic image signing, staged file publication, signing retry.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Documentation and Related Packages
|
|
290
|
+
|
|
291
|
+
### More Documentation
|
|
292
|
+
|
|
293
|
+
See the maintained example sources under `docs/readme`.
|
|
294
|
+
|
|
295
|
+
### Related Packages
|
|
296
|
+
|
|
297
|
+
See the SDK package index for the image tools, toolkit, agents, and packaged skills.
|
|
298
|
+
|
|
299
|
+
### Project Links
|
|
300
|
+
|
|
301
|
+
<!-- readme-standards:begin project-links -->
|
|
302
|
+
- [Repository](https://github.com/swarmauri/swarmauri-sdk)
|
|
303
|
+
- [pypi: swarmauri_toolkit_image](https://pypi.org/project/swarmauri_toolkit_image/)
|
|
304
|
+
<!-- readme-standards:end project-links -->
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Contributing
|
|
309
|
+
|
|
310
|
+
### How to Contribute
|
|
311
|
+
|
|
312
|
+
Follow the SDK contribution guide and keep workflow examples in sync with the public API.
|
|
313
|
+
|
|
314
|
+
### Development Setup
|
|
315
|
+
|
|
316
|
+
Use the SDK uv workspace and run the package’s lint and test commands.
|
|
317
|
+
|
|
318
|
+
### Notes for Maintainers
|
|
319
|
+
|
|
320
|
+
Keep the package import path and registered component name aligned with the manifest.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Governance
|
|
325
|
+
|
|
326
|
+
### Ownership and Decision Making
|
|
327
|
+
|
|
328
|
+
The Swarmauri SDK maintainers review changes to this package.
|
|
329
|
+
|
|
330
|
+
### Standards and Policies
|
|
331
|
+
|
|
332
|
+
Follow the SDK contribution and package README policies.
|
|
333
|
+
|
|
334
|
+
### Lifecycle and Migration
|
|
335
|
+
|
|
336
|
+
This is a new package in planning status.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## License and Attribution
|
|
341
|
+
|
|
342
|
+
### License
|
|
343
|
+
|
|
344
|
+
<!-- readme-standards:begin license -->
|
|
345
|
+
Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/LICENSE).
|
|
346
|
+
<!-- readme-standards:end license -->
|
|
347
|
+
|
|
348
|
+
### Notices
|
|
349
|
+
|
|
350
|
+
<!-- readme-standards:begin notices -->
|
|
351
|
+
See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/60-plugins/swarmauri_toolkit_image/NOTICE) for attribution.
|
|
352
|
+
<!-- readme-standards:end notices -->
|
|
353
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
swarmauri_toolkit_image/ImageToolkit.py,sha256=eUXSpa7X_HKSsoeZ8JG7-HaZ8DdMyQQyz3ZtMkjKkok,3173
|
|
2
|
+
swarmauri_toolkit_image/__init__.py,sha256=ZWrHXZ_z6p-yv5baEyqAQ83r28eDV87Dwa911CJe86M,142
|
|
3
|
+
swarmauri_toolkit_image-0.1.0.dist-info/METADATA,sha256=HpiBdr8W3XL-3H_ABN53f0Cs3M7UCh4EeKOANsJYRX0,13921
|
|
4
|
+
swarmauri_toolkit_image-0.1.0.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
|
|
5
|
+
swarmauri_toolkit_image-0.1.0.dist-info/entry_points.txt,sha256=KKsPypf6EoivC5_xUV6dRmKJQtWh6J9PN6frrc7u4S0,72
|
|
6
|
+
swarmauri_toolkit_image-0.1.0.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
|
|
7
|
+
swarmauri_toolkit_image-0.1.0.dist-info/licenses/NOTICE,sha256=VfAL5X7ziNvo-D3n5KC0OJscjJ6cHcF5CwRHzM3S9cc,150
|
|
8
|
+
swarmauri_toolkit_image-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [2025] [Jacob Stewart @ Swarmauri]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|