Metadata-Version: 2.4
Name: scitrera-messaging-spec
Version: 1.2.6
Summary: Universal ChatMessage & ToolCall schema for the Scitrera AI platform.
Project-URL: Homepage, https://github.com/scitrera/ecosystem-messaging-spec
Project-URL: Repository, https://github.com/scitrera/ecosystem-messaging-spec
Project-URL: Issues, https://github.com/scitrera/ecosystem-messaging-spec/issues
Author: Scitrera LLC
License-Expression: Apache-2.0
Keywords: chat,llm,messaging,schema,spec
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: pydantic>=2.6
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3; extra == 'langchain'
Provides-Extra: test
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# scitrera-messaging-spec

Python reference implementation of the Scitrera Ecosystem Messaging Spec
(v1.0).

```python
from scitrera_messaging_spec import (
    ChatMessage, TextPart, ToolCallPart, ToolResultPart,
    apply_event, MessageStarted, PartAppended, TokenDelta,
    to_openai_chat_completion,
)

m = ChatMessage(
    id="msg_1",
    role="assistant",
    content=[
        TextPart(text="hello"),
        ToolCallPart(id="c1", name="get_time", args={}, status="completed"),
        ToolResultPart(call_id="c1", output_text="3pm"),
    ],
)
print(m.model_dump_json())
```

See the [spec](../docs/UNIVERSAL_MESSAGE_SPEC.md) for the normative shape.

## Install

```bash
pip install scitrera-messaging-spec
```

Or, for local development, from a checkout:

```bash
pip install -e python
```
