Metadata-Version: 2.4
Name: utcp-socket
Version: 1.1.0
Summary: UTCP communication protocol plugin for TCP and UDP protocols.
Author: UTCP Contributors
License-Expression: MPL-2.0
Project-URL: Homepage, https://utcp.io
Project-URL: Source, https://github.com/universal-tool-calling-protocol/python-utcp
Project-URL: Issues, https://github.com/universal-tool-calling-protocol/python-utcp/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.0
Requires-Dist: utcp>=1.1
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: twine; extra == "dev"

# UTCP Socket Plugin (UDP/TCP)

This plugin adds UDP and TCP communication protocols to UTCP 1.0.

## Running Tests

Prerequisites:
- Python 3.10+
- `pip`
- (Optional) a virtual environment

1) Install core and the socket plugin in editable mode with dev extras:

```bash
pip install -e "./core[dev]"
pip install -e ./plugins/communication_protocols/socket[dev]
```

2) Run the socket plugin tests:

```bash
python -m pytest plugins/communication_protocols/socket/tests -v
```

3) Run a single test or filter by keyword:

```bash
# One file
python -m pytest plugins/communication_protocols/socket/tests/test_tcp_communication_protocol.py -v

# Filter by keyword (e.g., delimiter framing)
python -m pytest plugins/communication_protocols/socket/tests -k delimiter -q
```

4) Optional end-to-end sanity check (mock UDP/TCP servers):

```bash
python scripts/socket_sanity.py
```

Notes:
- On Windows, your firewall may prompt the first time tests open UDP/TCP sockets; allow access or run as admin if needed.
- Tests use `pytest-asyncio`. The dev extras installed above provide required dependencies.
- Streaming is single-chunk by design, consistent with HTTP/Text transports. Multi-chunk streaming can be added later behind provider configuration.
