Skip to content

Commit 1327189

Browse files
ci(DATAGO-130579): update plugin repos to support release (#139)
1 parent c1323a3 commit 1327189

33 files changed

Lines changed: 748 additions & 238 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env python3
2+
"""Fail when a command log contains warning output."""
3+
4+
from __future__ import annotations
5+
6+
import argparse
7+
from pathlib import Path
8+
import re
9+
10+
WARNING_PATTERN = re.compile(r"(?i)(?:\bWARN\b|\b[\w-]*warnings?\b)")
11+
IGNORED_SUBSTRINGS = (
12+
"--disable-warnings",
13+
"fail_on_warnings.py",
14+
)
15+
16+
17+
def parse_args() -> argparse.Namespace:
18+
parser = argparse.ArgumentParser(
19+
description="Fail if the provided log file contains warning output."
20+
)
21+
parser.add_argument("log_path", help="Path to the log file to inspect.")
22+
parser.add_argument(
23+
"--command",
24+
default="command",
25+
help="Human-readable command name for error messages.",
26+
)
27+
return parser.parse_args()
28+
29+
30+
def collect_warning_lines(log_text: str) -> list[tuple[int, str]]:
31+
warning_lines: list[tuple[int, str]] = []
32+
for line_number, raw_line in enumerate(log_text.splitlines(), start=1):
33+
line = raw_line.rstrip()
34+
if not WARNING_PATTERN.search(line):
35+
continue
36+
if any(ignored in line for ignored in IGNORED_SUBSTRINGS):
37+
continue
38+
warning_lines.append((line_number, line))
39+
return warning_lines
40+
41+
42+
def main() -> int:
43+
args = parse_args()
44+
log_text = Path(args.log_path).read_text(encoding="utf-8", errors="replace")
45+
warning_lines = collect_warning_lines(log_text)
46+
47+
if not warning_lines:
48+
print(f"No warnings found in {args.command} output.")
49+
return 0
50+
51+
print(f"{args.command} produced warnings; failing build.")
52+
print("Warning lines:")
53+
for line_number, line in warning_lines:
54+
print(f"{line_number}: {line}")
55+
return 1
56+
57+
58+
if __name__ == "__main__":
59+
raise SystemExit(main())

.github/workflows/build-plugin.yaml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,34 @@ jobs:
202202
echo "SonarQube scan outcome: ${{ steps.sonarqube-scan.outcome }}"
203203
echo "status=${{ steps.sonarqube-scan.outcome }}" >> $GITHUB_OUTPUT
204204
205-
- name: Build and Verify Package
205+
- name: Build package distributions
206+
id: build-package
207+
working-directory: ${{ inputs.plugin_directory }}
208+
shell: bash
209+
run: |
210+
BUILD_LOG="$(mktemp "${RUNNER_TEMP:-/tmp}/hatch-build-XXXX.log")"
211+
echo "build_log=$BUILD_LOG" >> "$GITHUB_OUTPUT"
212+
213+
set +e
214+
hatch build 2>&1 | tee "$BUILD_LOG"
215+
BUILD_RC=${PIPESTATUS[0]}
216+
set -e
217+
218+
if [[ "$BUILD_RC" -ne 0 ]]; then
219+
exit "$BUILD_RC"
220+
fi
221+
222+
- name: Fail on build warnings
223+
if: ${{ hashFiles('.github/scripts/fail_on_warnings.py') != '' && steps.build-package.outputs.build_log != '' }}
224+
run: >
225+
python3 .github/scripts/fail_on_warnings.py
226+
"${{ steps.build-package.outputs.build_log }}"
227+
--command "hatch build"
228+
229+
- name: Verify built distributions
230+
working-directory: ${{ inputs.plugin_directory }}
206231
shell: bash
207232
run: |
208-
cd ${{ inputs.plugin_directory }}
209-
hatch build
210-
# Use uv to run twine for package verification
211233
uv tool run twine check dist/*.tar.gz
212234
uv tool run twine check dist/*.whl
213235

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@ jobs:
158158
gh workflow run "release.yaml" \
159159
--repo "${{ github.repository }}" \
160160
--ref main \
161-
--f project-name="$PROJECT_NAME" \
162-
--f version="$VERSION"
161+
-f project-name="$PROJECT_NAME" \
162+
-f version="$VERSION"

LICENSE

Lines changed: 183 additions & 183 deletions
Large diffs are not rendered by default.

sam-bedrock-agent/README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,52 @@
11
# Bedrock Agent SAM Plugin
22

3-
The Amazon Bedrock Agent allows you to import one or multiple Amazon Bedrock agents or flows as actions to be used in your SAM project. This is useful for integrating with Amazon Bedrock's capabilities directly into your Solace Agent Mesh (SAM) project.
3+
`sam-bedrock-agent` is an official Solace Agent Mesh core plugin that lets you import Amazon Bedrock agents and flows into your SAM project as reusable actions.
44

5-
## Installation
5+
## About Solace Agent Mesh
66

7-
Run the following command in your SAM project directory to add the Amazon Bedrock Agent plugin:
7+
Solace Agent Mesh (SAM) is an open-source framework for building event-driven, multi-agent AI systems where specialized agents collaborate on complex tasks. It provides a standardized way for agents to communicate, share data, and integrate with external systems while keeping components loosely coupled and production-ready.
8+
9+
SAM helps you:
10+
11+
- Build event-driven multi-agent systems on Solace Event Mesh
12+
- Connect agents, tools, gateways, and services through a common runtime
13+
- Extend projects with installable plugins such as `sam-bedrock-agent`
14+
15+
Learn more in the [Solace Agent Mesh documentation](https://solacelabs.github.io/solace-agent-mesh/) and the [main project repository](https://github.com/SolaceLabs/solace-agent-mesh).
16+
17+
## What This Plugin Adds
18+
19+
This plugin makes it easy to bring Amazon Bedrock capabilities into Solace Agent Mesh by:
20+
21+
- Importing one or multiple Amazon Bedrock agents or flows
22+
- Exposing them as actions inside your SAM project
23+
- Generating a standard plugin configuration under `configs/plugins/`
24+
25+
## Quick Start
26+
27+
If you do not already have SAM installed, install it first:
28+
29+
```bash
30+
pip install solace-agent-mesh
31+
```
32+
33+
Then add the plugin from your SAM project directory:
834

935
```bash
10-
solace-agent-mesh plugin add <your-new-component-name> --plugin sam-bedrock-agent
36+
sam plugin add <your-new-component-name> --plugin sam-bedrock-agent
1137
```
1238

13-
This will create a new component configuration at `configs/plugins/<your-new-component-name-kebab-case>.yaml`.
39+
This creates a component configuration at `configs/plugins/<your-new-component-name-kebab-case>.yaml`.
1440

1541
## Configuration
1642

17-
There is 2 sections in the configuration file that must be updated.
43+
The generated configuration file contains two sections that require updates:
1844

19-
Section one, indicated by `# 1. UPDATE REQUIRED - START #`, contains the configuration for the Amazon Bedrock Agent/Flow and the internal configuration for the Agent.
45+
1. The section marked `# 1. UPDATE REQUIRED - START #` configures the Amazon Bedrock agent or flow and the internal agent settings.
46+
2. The section marked `# 2. UPDATE REQUIRED - START #` configures the public-facing API that other agents use to interact with it.
2047

48+
## Additional Resources
2149

22-
Section two, indicated by `# 2. UPDATE REQUIRED - START #`, contains the configuration for the public facing API of the Agent which will be used by other agents to interact with it.
50+
- [Solace Agent Mesh Docs](https://solacelabs.github.io/solace-agent-mesh/)
51+
- [Solace Agent Mesh Repository](https://github.com/SolaceLabs/solace-agent-mesh)
52+
- [Core Plugins Repository](https://github.com/SolaceLabs/solace-agent-mesh-core-plugins)

sam-bedrock-agent/pyproject.toml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,45 @@ version = "0.1.0"
1414
authors = [
1515
{ name="SolaceLabs", email="solacelabs@solace.com" },
1616
]
17-
description = "This plugin allows you to import one or multiple Amazon bedrock agents or flows as action to be used in your SAM project."
17+
description = "Official Solace Agent Mesh core plugin for importing Amazon Bedrock agents and flows into SAM projects."
1818
readme = "README.md"
19-
requires-python = ">=3.10"
19+
license = { text = "Apache License 2.0" }
20+
requires-python = ">=3.10.16,<3.14"
21+
classifiers = [
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
"License :: OSI Approved :: Apache Software License",
27+
"Operating System :: OS Independent",
28+
"Topic :: Software Development :: Libraries :: Application Frameworks",
29+
]
2030
dependencies = [
2131
"boto3==1.40.37",
2232
]
2333

34+
[project.optional-dependencies]
35+
test = [
36+
"pytest-asyncio",
37+
"pytest>=8.0.0",
38+
"pytest-mock>=3.0.0",
39+
"pytest-cov>=4.0.0",
40+
"pytest-json-ctrf>=0.1.0",
41+
"pytest-xdist>=3.5.0",
42+
"sam-test-infrastructure @ git+https://github.com/SolaceLabs/solace-agent-mesh#subdirectory=tests/sam-test-infrastructure",
43+
]
44+
45+
[project.urls]
46+
Homepage = "https://github.com/SolaceLabs/solace-agent-mesh"
47+
Documentation = "https://solacelabs.github.io/solace-agent-mesh/"
48+
Repository = "https://github.com/SolaceLabs/solace-agent-mesh-core-plugins"
49+
Issues = "https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/issues"
50+
2451
[tool.hatch.build.targets.wheel]
2552
packages = ["src/sam_bedrock_agent"]
2653
src-path = "src"
2754

2855
[tool.hatch.build.targets.wheel.force-include]
29-
"src/sam_bedrock_agent" = "sam_bedrock_agent/"
3056
"config.yaml" = "sam_bedrock_agent/config.yaml"
3157
"README.md" = "sam_bedrock_agent/README.md"
3258
"pyproject.toml" = "sam_bedrock_agent/pyproject.toml"

sam-event-mesh-agent/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ packages = ["src/sam_event_mesh_agent"]
2525
src-path = "src"
2626

2727
[tool.hatch.build.targets.wheel.force-include]
28-
"src/sam_event_mesh_agent" = "sam_event_mesh_agent/"
2928
"config.yaml" = "sam_event_mesh_agent/config.yaml"
3029
"README.md" = "sam_event_mesh_agent/README.md"
3130
"pyproject.toml" = "sam_event_mesh_agent/pyproject.toml"

sam-event-mesh-gateway/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# SAM Event Mesh Gateway: User Guide
22

3+
## About Solace Agent Mesh
4+
5+
Solace Agent Mesh (SAM) is an open-source framework for building event-driven, multi-agent AI systems where specialized agents collaborate on complex tasks. It provides a standardized way for agents to communicate, share data, and integrate with external systems while keeping components loosely coupled and production-ready.
6+
7+
SAM helps you:
8+
9+
- Build event-driven multi-agent systems on Solace Event Mesh
10+
- Connect agents, tools, gateways, and services through a common runtime
11+
- Extend projects with installable plugins such as `sam-event-mesh-gateway`
12+
13+
Learn more in the [Solace Agent Mesh documentation](https://solacelabs.github.io/solace-agent-mesh/) and the [main project repository](https://github.com/SolaceLabs/solace-agent-mesh).
14+
315
## Overview
416

517
The Solace Agent Mesh (SAM) Event Mesh Gateway is a powerful plugin that acts as a bridge between a Solace PubSub+ event mesh and the SAM agent ecosystem. It allows external systems to trigger AI agent tasks by publishing events to the mesh, and it enables agents to publish their results back to the mesh for consumption by other applications.

sam-event-mesh-gateway/pyproject.toml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,44 @@ version = "1.0.0"
1414
description = "Solace Agent Mesh Gateway plugin for integrating with Solace PubSub+ event brokers."
1515
readme = "README.md"
1616
authors = [
17-
{ name="SolaceLabs", email="solacelabs@solace.com" }
17+
{ name="SolaceLabs", email="solacelabs@solace.com" },
18+
]
19+
license = { text = "Apache License 2.0" }
20+
requires-python = ">=3.10.16,<3.14"
21+
classifiers = [
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
"License :: OSI Approved :: Apache Software License",
27+
"Operating System :: OS Independent",
28+
"Topic :: Software Development :: Libraries :: Application Frameworks",
1829
]
19-
requires-python = ">=3.10"
2030
dependencies = [
2131
"pydantic>=2.0.0",
2232
"jsonschema>=4.0.0",
2333
"solace-pubsubplus>=1.3.0" # For data plane client if used directly
2434
]
2535

36+
[project.optional-dependencies]
37+
test = [
38+
"a2a-sdk[http-server]>=0.3.1",
39+
"pytest-asyncio",
40+
"pytest>=8.0.0",
41+
"pytest-mock>=3.0.0",
42+
"pytest-cov>=4.0.0",
43+
"pytest-json-ctrf>=0.1.0",
44+
"pytest-xdist>=3.5.0",
45+
"solace-agent-mesh>=1.16.0",
46+
"sam-test-infrastructure @ git+https://github.com/SolaceLabs/solace-agent-mesh#subdirectory=tests/sam-test-infrastructure",
47+
]
48+
49+
[project.urls]
50+
Homepage = "https://github.com/SolaceLabs/solace-agent-mesh"
51+
Documentation = "https://solacelabs.github.io/solace-agent-mesh/"
52+
Repository = "https://github.com/SolaceLabs/solace-agent-mesh-core-plugins"
53+
Issues = "https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/issues"
54+
2655
[project.entry-points."solace_agent_mesh.plugins"]
2756
sam_event_mesh_gateway = "sam_event_mesh_gateway.app:info"
2857

sam-event-mesh-tool/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ This plugin for Solace Agent Mesh (SAM) provides a powerful and dynamic tool for
44

55
Unlike a standalone agent, this is a **tool** that can be added to any existing or new agent, allowing you to create multi-faceted agents that can communicate with multiple backend services.
66

7+
## About Solace Agent Mesh
8+
9+
Solace Agent Mesh (SAM) is an open-source framework for building event-driven, multi-agent AI systems where specialized agents collaborate on complex tasks. It provides a standardized way for agents to communicate, share data, and integrate with external systems while keeping components loosely coupled and production-ready.
10+
11+
SAM helps you:
12+
13+
- Build event-driven multi-agent systems on Solace Event Mesh
14+
- Connect agents, tools, gateways, and services through a common runtime
15+
- Extend projects with installable plugins such as `sam-event-mesh-tool`
16+
17+
Learn more in the [Solace Agent Mesh documentation](https://solacelabs.github.io/solace-agent-mesh/) and the [main project repository](https://github.com/SolaceLabs/solace-agent-mesh).
18+
719
## Key Features
820

921
- **Dynamic Tool Creation**: Define custom tools directly in your agent's YAML configuration. Each tool instance is completely independent.

0 commit comments

Comments
 (0)