unifiedui-sdk 0.1.0__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.
- unifiedui_sdk-0.1.0/PKG-INFO +412 -0
- unifiedui_sdk-0.1.0/README.md +382 -0
- unifiedui_sdk-0.1.0/pyproject.toml +154 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/__init__.py +10 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/README.md +190 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/__init__.py +29 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/config.py +98 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/engine.py +227 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/multi/__init__.py +15 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/multi/executor.py +206 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/multi/orchestrator.py +110 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/multi/planner.py +150 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/multi/synthesizer.py +76 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/prompts.py +34 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/single.py +152 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/tools/__init__.py +11 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/tools/loader.py +84 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/tools/mcp.py +181 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/agents/tools/openapi.py +229 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/client/__init__.py +23 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/client/client.py +52 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/client/config.py +70 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/client/errors.py +89 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/client/http.py +155 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/client/tracing.py +116 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/core/README.md +28 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/core/__init__.py +15 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/core/utils.py +56 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/py.typed +0 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/streaming/README.md +110 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/streaming/__init__.py +10 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/streaming/models.py +62 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/streaming/writer.py +206 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/tracing/README.md +121 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/tracing/__init__.py +29 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/tracing/base.py +474 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/tracing/langchain.py +20 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/tracing/langgraph.py +32 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/tracing/models.py +180 -0
- unifiedui_sdk-0.1.0/src/unifiedui_sdk/tracing/react_agent.py +272 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: unifiedui-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for external integration with the unified-ui platform β tracing, streaming, agents, and more.
|
|
5
|
+
Keywords: unified-ui,sdk,ai,agents,tracing,streaming,langchain,langgraph
|
|
6
|
+
Author: Enrico Goerlitz
|
|
7
|
+
Author-email: Enrico Goerlitz <rico.goerlitz@gmail.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Dist: pydantic>=2.0
|
|
18
|
+
Requires-Dist: langchain-core>=0.3
|
|
19
|
+
Requires-Dist: langgraph>=0.2
|
|
20
|
+
Requires-Dist: httpx>=0.27
|
|
21
|
+
Maintainer: Enrico Goerlitz
|
|
22
|
+
Maintainer-email: Enrico Goerlitz <rico.goerlitz@gmail.com>
|
|
23
|
+
Requires-Python: >=3.13
|
|
24
|
+
Project-URL: Homepage, https://github.com/unified-ui/unifiedui-sdk
|
|
25
|
+
Project-URL: Documentation, https://github.com/unified-ui/unifiedui-sdk/tree/main/docs
|
|
26
|
+
Project-URL: Repository, https://github.com/unified-ui/unifiedui-sdk
|
|
27
|
+
Project-URL: Issues, https://github.com/unified-ui/unifiedui-sdk/issues
|
|
28
|
+
Project-URL: Changelog, https://github.com/unified-ui/unifiedui-sdk/blob/main/CHANGELOG.md
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# unified-ui SDK
|
|
32
|
+
|
|
33
|
+
[](https://github.com/unified-ui/unifiedui-sdk/actions/workflows/ci-tests-and-lint.yml)
|
|
34
|
+
[](https://www.python.org/downloads/)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
[](https://docs.astral.sh/ruff/)
|
|
37
|
+
|
|
38
|
+
> **Python SDK for external integration with the unified-ui platform** β tracing, streaming, agents, and more!
|
|
39
|
+
|
|
40
|
+
## What is unified-ui?
|
|
41
|
+
|
|
42
|
+
**unified-ui** transforms the complexity of managing multiple AI systems into a single, cohesive experience. Organizations deploy agents across diverse platforms β Microsoft Foundry, n8n, LangGraph, Copilot, and custom solutions β resulting in fragmented user experiences, inconsistent monitoring, and operational silos.
|
|
43
|
+
|
|
44
|
+
unified-ui eliminates these challenges by providing **one interface where every agent converges**.
|
|
45
|
+
|
|
46
|
+
## What is this SDK?
|
|
47
|
+
|
|
48
|
+
The **unified-ui SDK** is a complementary Python package that provides capabilities for **external integration** with the unified-ui platform:
|
|
49
|
+
|
|
50
|
+
| Module | Description |
|
|
51
|
+
|--------|-------------|
|
|
52
|
+
| π **Tracing** | Standardized tracing objects; LangChain & LangGraph trace sniffing and forwarding |
|
|
53
|
+
| π‘ **Streaming** | Standardized streaming response protocol for unified-ui |
|
|
54
|
+
| π€ **Agents** | ReACT Agent class with an agent engine built on LangChain / LangGraph |
|
|
55
|
+
| π§± **Core** | Shared interfaces, base classes, and utility functions |
|
|
56
|
+
|
|
57
|
+
### How It Fits
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
βββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
61
|
+
β Frontend ββββββΆβ Platform Service (FastAPI) β
|
|
62
|
+
βββββββββββββββ β β’ Authentication & RBAC β
|
|
63
|
+
β β’ Tenants, Applications, Credentials β
|
|
64
|
+
β β’ Conversations, Autonomous Agents β
|
|
65
|
+
ββββββββββββββββββββ¬ββββββββββββββββββββββββββββ
|
|
66
|
+
β
|
|
67
|
+
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
|
|
68
|
+
βΌ βΌ βΌ
|
|
69
|
+
ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
|
|
70
|
+
β Agent Service β β Custom Service β β External App β
|
|
71
|
+
β (Go/Gin) β β β β β
|
|
72
|
+
ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
|
|
73
|
+
β β β
|
|
74
|
+
β βββββββββββ΄βββββββββββ β
|
|
75
|
+
β β unifiedui-sdk βββββΌββββββββββββ
|
|
76
|
+
β β (this package) β
|
|
77
|
+
β ββββββββββββββββββββββ
|
|
78
|
+
βΌ
|
|
79
|
+
ββββββββββββββββββ
|
|
80
|
+
β AI Backends β
|
|
81
|
+
β N8N, Foundry, β
|
|
82
|
+
β LangGraph, ... β
|
|
83
|
+
ββββββββββββββββββ
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Installation
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install unifiedui-sdk
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Or with [uv](https://docs.astral.sh/uv/):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
uv add unifiedui-sdk
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Quick Start
|
|
103
|
+
|
|
104
|
+
### Tracing β Capture Traces from LangChain / LangGraph
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from unifiedui_sdk.tracing import UnifiedUILanggraphTracer
|
|
108
|
+
|
|
109
|
+
tracer = UnifiedUILanggraphTracer()
|
|
110
|
+
|
|
111
|
+
# Attach to any LangChain/LangGraph execution
|
|
112
|
+
result = graph.invoke(
|
|
113
|
+
{"messages": [("human", "Hello")]},
|
|
114
|
+
config={"callbacks": [tracer]},
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
# Get the trace as a dict (camelCase JSON for the agent-service API)
|
|
118
|
+
trace_dict = tracer.get_trace_dict()
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Streaming β Build SSE Responses
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
from unifiedui_sdk.streaming import StreamWriter, StreamMessageType
|
|
125
|
+
|
|
126
|
+
writer = StreamWriter()
|
|
127
|
+
|
|
128
|
+
# Build stream messages for the unified-ui SSE protocol
|
|
129
|
+
yield writer.stream_start()
|
|
130
|
+
yield writer.text_stream("Hello ")
|
|
131
|
+
yield writer.text_stream("world!")
|
|
132
|
+
yield writer.tool_call_start("tc_1", "search", {"query": "test"})
|
|
133
|
+
yield writer.tool_call_end("tc_1", "search", "success", tool_result="Found 3 results")
|
|
134
|
+
yield writer.stream_end()
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Agents β Single-Agent with Tools
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
from langchain_openai import ChatOpenAI
|
|
141
|
+
from langchain_core.tools import tool
|
|
142
|
+
|
|
143
|
+
from unifiedui_sdk.agents import ReActAgentConfig, ReActAgentEngine
|
|
144
|
+
from unifiedui_sdk.tracing import ReActAgentTracer
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
@tool
|
|
148
|
+
def calculator(expression: str) -> str:
|
|
149
|
+
"""Evaluate a math expression."""
|
|
150
|
+
return str(eval(expression))
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0.1)
|
|
154
|
+
config = ReActAgentConfig(system_prompt="You are a helpful assistant.")
|
|
155
|
+
tracer = ReActAgentTracer()
|
|
156
|
+
|
|
157
|
+
engine = ReActAgentEngine(
|
|
158
|
+
config=config, llm=llm, tools=[calculator], tracer=tracer
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Stream agent execution
|
|
162
|
+
async for msg in engine.invoke_stream("What is 42 * 17?"):
|
|
163
|
+
if msg.type == "TEXT_STREAM":
|
|
164
|
+
print(msg.content, end="", flush=True)
|
|
165
|
+
elif msg.type == "TOOL_CALL_START":
|
|
166
|
+
print(f"\nTool: {msg.config['tool_name']}")
|
|
167
|
+
elif msg.type == "TOOL_CALL_END":
|
|
168
|
+
print(f"Result: {msg.config['tool_result']}")
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Agents β Multi-Agent Orchestration
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
from unifiedui_sdk.agents import ReActAgentConfig, ReActAgentEngine
|
|
175
|
+
from unifiedui_sdk.agents.config import MultiAgentConfig
|
|
176
|
+
from unifiedui_sdk.tracing import ReActAgentTracer
|
|
177
|
+
|
|
178
|
+
config = ReActAgentConfig(
|
|
179
|
+
system_prompt="You are a research assistant.",
|
|
180
|
+
multi_agent_enabled=True,
|
|
181
|
+
multi_agent=MultiAgentConfig(
|
|
182
|
+
max_sub_agents=5,
|
|
183
|
+
max_parallel_per_step=3,
|
|
184
|
+
),
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
tracer = ReActAgentTracer()
|
|
188
|
+
engine = ReActAgentEngine(config=config, llm=llm, tools=[...], tracer=tracer)
|
|
189
|
+
|
|
190
|
+
async for msg in engine.invoke_stream("Compare weather in Berlin, Munich, Hamburg"):
|
|
191
|
+
if msg.type == "PLAN_COMPLETE":
|
|
192
|
+
print("Plan:", msg.config["plan"]["goal"])
|
|
193
|
+
elif msg.type == "SUB_AGENT_STREAM":
|
|
194
|
+
print(msg.content, end="")
|
|
195
|
+
elif msg.type == "SYNTHESIS_STREAM":
|
|
196
|
+
print(msg.content, end="")
|
|
197
|
+
|
|
198
|
+
# Get the full trace
|
|
199
|
+
trace = tracer.get_trace()
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Agents β Tool Loading (OpenAPI + MCP)
|
|
203
|
+
|
|
204
|
+
```python
|
|
205
|
+
from unifiedui_sdk.agents.config import ToolConfig, ToolType, MCPTransport
|
|
206
|
+
from unifiedui_sdk.agents.tools.loader import load_tools
|
|
207
|
+
|
|
208
|
+
tool_configs = [
|
|
209
|
+
ToolConfig(
|
|
210
|
+
name="PetStore",
|
|
211
|
+
type=ToolType.OPENAPI_DEFINITION,
|
|
212
|
+
config={
|
|
213
|
+
"spec_url": "https://petstore3.swagger.io/api/v3/openapi.json",
|
|
214
|
+
"base_url": "https://petstore3.swagger.io/api/v3",
|
|
215
|
+
},
|
|
216
|
+
),
|
|
217
|
+
ToolConfig(
|
|
218
|
+
name="MCP Weather",
|
|
219
|
+
type=ToolType.MCP_SERVER,
|
|
220
|
+
config={
|
|
221
|
+
"url": "http://localhost:8080/sse",
|
|
222
|
+
"transport": MCPTransport.SSE,
|
|
223
|
+
},
|
|
224
|
+
),
|
|
225
|
+
]
|
|
226
|
+
|
|
227
|
+
tools = await load_tools(tool_configs)
|
|
228
|
+
engine = ReActAgentEngine(config=config, llm=llm, tools=tools)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
> Detailed module documentation: [`tracing/`](src/unifiedui_sdk/tracing/README.md) Β· [`streaming/`](src/unifiedui_sdk/streaming/README.md) Β· [`agents/`](src/unifiedui_sdk/agents/README.md) Β· [`core/`](src/unifiedui_sdk/core/README.md)
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Development
|
|
236
|
+
|
|
237
|
+
### Prerequisites
|
|
238
|
+
|
|
239
|
+
- Python 3.13+
|
|
240
|
+
- [uv](https://docs.astral.sh/uv/) (recommended)
|
|
241
|
+
|
|
242
|
+
### Setup
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Clone the repository
|
|
246
|
+
git clone https://github.com/unified-ui/unifiedui-sdk.git
|
|
247
|
+
cd unifiedui-sdk
|
|
248
|
+
|
|
249
|
+
# Install dependencies
|
|
250
|
+
uv sync
|
|
251
|
+
|
|
252
|
+
# Install pre-commit hooks
|
|
253
|
+
pre-commit install
|
|
254
|
+
pre-commit install --hook-type commit-msg
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Common Commands
|
|
258
|
+
|
|
259
|
+
| Command | Description |
|
|
260
|
+
|---------|-------------|
|
|
261
|
+
| `pytest tests/ -n auto` | Run tests in parallel |
|
|
262
|
+
| `pytest tests/ -n auto --cov=unifiedui_sdk --cov-fail-under=80` | Tests + coverage |
|
|
263
|
+
| `ruff check .` | Lint |
|
|
264
|
+
| `ruff format .` | Format |
|
|
265
|
+
| `mypy src/unifiedui_sdk/` | Type check |
|
|
266
|
+
|
|
267
|
+
> **See [TOOLING.md](TOOLING.md)** for the full tooling guide, pre-commit hooks, and CI details.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Project Structure
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
unifiedui-sdk/
|
|
275
|
+
βββ src/unifiedui_sdk/ # Main package (src layout)
|
|
276
|
+
β βββ core/ # Shared interfaces & utilities
|
|
277
|
+
β β βββ utils.py # generate_id, utc_now, safe_str, str_uuid
|
|
278
|
+
β βββ tracing/ # Tracing objects & LangChain/LangGraph sniffing
|
|
279
|
+
β β βββ models.py # Trace, TraceNode, NodeData, NodeType, NodeStatus
|
|
280
|
+
β β βββ base.py # BaseTracer (callback handler)
|
|
281
|
+
β β βββ langchain.py # UnifiedUILangchainTracer
|
|
282
|
+
β β βββ langgraph.py # UnifiedUILanggraphTracer
|
|
283
|
+
β β βββ react_agent.py # ReActAgentTracer (multi-agent trace support)
|
|
284
|
+
β βββ streaming/ # Standardized streaming responses
|
|
285
|
+
β β βββ models.py # StreamMessage, StreamMessageType (22 events)
|
|
286
|
+
β β βββ writer.py # StreamWriter (~25 builder methods)
|
|
287
|
+
β βββ agents/ # ReACT Agent Engine
|
|
288
|
+
β βββ config.py # ReActAgentConfig, MultiAgentConfig, ToolConfig
|
|
289
|
+
β βββ engine.py # ReActAgentEngine (single + multi-agent)
|
|
290
|
+
β βββ single.py # Single-agent ReACT executor
|
|
291
|
+
β βββ prompts.py # System prompt builder
|
|
292
|
+
β βββ tools/ # Tool integrations
|
|
293
|
+
β β βββ openapi.py # OpenAPI 3.x β LangChain tools
|
|
294
|
+
β β βββ mcp.py # MCP Server β LangChain tools
|
|
295
|
+
β β βββ loader.py # Parallel tool loader
|
|
296
|
+
β βββ multi/ # Multi-agent orchestration
|
|
297
|
+
β βββ planner.py # LLM-based execution plan generator
|
|
298
|
+
β βββ executor.py # Parallel sub-agent executor
|
|
299
|
+
β βββ synthesizer.py # Result synthesizer
|
|
300
|
+
β βββ orchestrator.py # Full pipeline coordinator
|
|
301
|
+
βββ tests/ # Test suite (327 tests)
|
|
302
|
+
βββ docs/ # Documentation
|
|
303
|
+
βββ pocs/ # Proof-of-concept scripts
|
|
304
|
+
βββ .github/ # CI workflows & Copilot instructions
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Branching Strategy
|
|
310
|
+
|
|
311
|
+
This project follows a **Git Flow** branching model optimized for open-source SDK releases with semantic versioning.
|
|
312
|
+
|
|
313
|
+
```mermaid
|
|
314
|
+
gitGraph
|
|
315
|
+
commit id: "init"
|
|
316
|
+
branch develop
|
|
317
|
+
checkout develop
|
|
318
|
+
commit id: "setup"
|
|
319
|
+
|
|
320
|
+
branch feat/tracing
|
|
321
|
+
checkout feat/tracing
|
|
322
|
+
commit id: "add tracing"
|
|
323
|
+
commit id: "tracing tests"
|
|
324
|
+
checkout develop
|
|
325
|
+
merge feat/tracing id: "merge tracing"
|
|
326
|
+
|
|
327
|
+
branch feat/streaming
|
|
328
|
+
checkout feat/streaming
|
|
329
|
+
commit id: "add streaming"
|
|
330
|
+
checkout develop
|
|
331
|
+
merge feat/streaming id: "merge streaming"
|
|
332
|
+
|
|
333
|
+
branch release/0.1.0
|
|
334
|
+
checkout release/0.1.0
|
|
335
|
+
commit id: "bump 0.1.0"
|
|
336
|
+
commit id: "fix docs"
|
|
337
|
+
checkout main
|
|
338
|
+
merge release/0.1.0 id: "v0.1.0" tag: "v0.1.0"
|
|
339
|
+
checkout develop
|
|
340
|
+
merge release/0.1.0 id: "back-merge 0.1.0"
|
|
341
|
+
|
|
342
|
+
checkout develop
|
|
343
|
+
branch feat/agents
|
|
344
|
+
checkout feat/agents
|
|
345
|
+
commit id: "add agents"
|
|
346
|
+
checkout develop
|
|
347
|
+
merge feat/agents id: "merge agents"
|
|
348
|
+
|
|
349
|
+
checkout main
|
|
350
|
+
branch hotfix/0.1.1
|
|
351
|
+
checkout hotfix/0.1.1
|
|
352
|
+
commit id: "critical fix"
|
|
353
|
+
checkout main
|
|
354
|
+
merge hotfix/0.1.1 id: "v0.1.1" tag: "v0.1.1"
|
|
355
|
+
checkout develop
|
|
356
|
+
merge hotfix/0.1.1 id: "back-merge hotfix"
|
|
357
|
+
|
|
358
|
+
branch release/0.2.0
|
|
359
|
+
checkout release/0.2.0
|
|
360
|
+
commit id: "bump 0.2.0"
|
|
361
|
+
checkout main
|
|
362
|
+
merge release/0.2.0 id: "v0.2.0" tag: "v0.2.0"
|
|
363
|
+
checkout develop
|
|
364
|
+
merge release/0.2.0 id: "back-merge 0.2.0"
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Branch Types
|
|
368
|
+
|
|
369
|
+
| Branch | Purpose | Branches from | Merges into |
|
|
370
|
+
|--------|---------|---------------|-------------|
|
|
371
|
+
| `main` | Stable releases only β every commit is a tagged version | β | β |
|
|
372
|
+
| `develop` | Integration branch for the next release | `main` | `release/*` |
|
|
373
|
+
| `feat/<name>` | New features or enhancements | `develop` | `develop` |
|
|
374
|
+
| `fix/<name>` | Bug fixes (non-critical) | `develop` | `develop` |
|
|
375
|
+
| `release/<version>` | Release preparation (version bump, changelog, final fixes) | `develop` | `main` + `develop` |
|
|
376
|
+
| `hotfix/<version>` | Critical fixes on a released version | `main` | `main` + `develop` |
|
|
377
|
+
| `docs/<name>` | Documentation-only changes | `develop` | `develop` |
|
|
378
|
+
| `refactor/<name>` | Code restructuring without behavior changes | `develop` | `develop` |
|
|
379
|
+
|
|
380
|
+
### Workflow
|
|
381
|
+
|
|
382
|
+
1. **Feature development** β Create a `feat/` branch from `develop`. Open a PR back into `develop` when ready.
|
|
383
|
+
2. **Release preparation** β When `develop` is ready for a release, create a `release/x.y.z` branch. Bump the version, update the changelog, and fix any last-minute issues on this branch.
|
|
384
|
+
3. **Publishing** β Merge the release branch into `main` and tag it (`vx.y.z`). Back-merge into `develop`.
|
|
385
|
+
4. **Hotfixes** β For critical bugs on a released version, create a `hotfix/` branch from `main`, fix, tag, and back-merge into both `main` and `develop`.
|
|
386
|
+
|
|
387
|
+
### Rules
|
|
388
|
+
|
|
389
|
+
- **Never commit directly** to `main` or `develop` β always use PRs
|
|
390
|
+
- **All PRs require** passing CI (tests, lint, type check, coverage β₯ 80%)
|
|
391
|
+
- **Squash merge** feature branches into `develop` for a clean history
|
|
392
|
+
- **Merge commits** for release/hotfix branches to preserve branch topology
|
|
393
|
+
- **Tag format**: `v<major>.<minor>.<patch>` (e.g. `v0.1.0`)
|
|
394
|
+
- **Branch naming**: `<type>/<short-description>` (e.g. `feat/langchain-tracing`)
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Contributing
|
|
399
|
+
|
|
400
|
+
Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our development workflow, code standards, and how to submit pull requests.
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## Sponsors
|
|
405
|
+
|
|
406
|
+
If you find this project useful, consider [sponsoring](SPONSORS.md) its development.
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## License
|
|
411
|
+
|
|
412
|
+
MIT License β see [LICENSE](LICENSE) for details.
|