Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ token.json

video/
video-new
code-session.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**See what your LangChain & LangGraph agents actually did.**
Local-first observability — drop in one line, watch every run live in your browser.

[![PyPI](https://img.shields.io/badge/pypi-v0.3.0-3775A9)](https://pypi.org/project/tracesage/)
[![PyPI](https://img.shields.io/badge/pypi-v0.3.1-3775A9)](https://pypi.org/project/tracesage/)
[![Python versions](https://img.shields.io/pypi/pyversions/tracesage)](https://pypi.org/project/tracesage/)
[![License: MIT](https://img.shields.io/pypi/l/tracesage)](LICENSE)
[![CI](https://github.com/kjgpta/tracesage/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kjgpta/tracesage/actions/workflows/ci.yml)
Expand Down
21,910 changes: 0 additions & 21,910 deletions code-session.txt

This file was deleted.

32 changes: 32 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

_Nothing yet._

## [0.3.1] — 2026-07-01

A focused release that makes failed runs unmistakable in the UI and lets MCP tool
errors surface as real failures.

### Added
- **`register_mcp_client(..., handle_tool_errors=False)`.** New keyword on the MCP
adapter (`tracesage.adapters.mcp`). By default (`True`) an MCP tool that errors
server-side returns the error as tool content — the model sees it and can recover,
matching langchain-mcp-adapters' behaviour. Pass `False` to make MCP tool errors
**raise** instead, so a broken tool call fails the run and shows up as a red error
node on the exact tool. Mirrors `ToolNode(handle_tool_errors=...)` for local tools.
The loader now binds tools to the server's connection config (not a transient
session) so each call opens its own session — fixing a `ClosedResourceError` when
errors propagate.

### Changed
- **Failed nodes render solid red.** In the topology / run-trace graph, a node that
errored is now filled solid `--error` red with a matching red glow — not just a red
outline. The error styling overrides the trace-mode success/step glows, so a broken
node reads unambiguously as red instead of blending toward orange.
- **MCP server palette recoloured.** The per-server colour palette (`mcpServerColor`)
no longer includes red-family hues, so a healthy MCP server/tool is never confused
with a failed (red) node. Red is now reserved exclusively for errors.

### Fixed
- **`register_mcp_client` across langchain-mcp-adapters API variants.** The tool
loader falls back cleanly (`get_tools(server_name=...)` → connection config →
per-server session) and no longer leaks a closed session.
- **Example `11_supervisor_research_team`** no longer raises `KeyError: 'next'` — the
supervisor's stop branch now always emits a routing key.

## [0.3.0] — 2026-06-23

A major UI overhaul (topology vs. run-trace, step-through replay, readable
Expand Down
7 changes: 5 additions & 2 deletions examples/showcase/11_supervisor_research_team/after.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def build_graph() -> Runnable:

async def supervise(state: TeamState) -> TeamState:
if state["steps"] >= 4:
return {**state, "verdict": state.get("verdict") or "stopped"}
# Stop condition: always emit next="done" so pick() can route to END
# (a missing "next" key would KeyError in the conditional edge).
return {**state, "next": "done", "verdict": state.get("verdict") or "stopped"}
route: Route = await router.ainvoke(
f"Topic: {state['topic']}. Notes done={bool(state['notes'])}, "
f"draft done={bool(state['draft'])}, checked={bool(state['verdict'])}. "
Expand All @@ -96,7 +98,8 @@ async def run_checker(state: TeamState) -> TeamState:
return {**state, "verdict": await checker.ainvoke(state)}

def pick(state: TeamState) -> str:
return END if state.get("next") == "done" else state["next"]
nxt = state.get("next", "done")
return END if nxt == "done" else nxt

builder = StateGraph(TeamState)
builder.add_node("supervisor", supervise)
Expand Down
7 changes: 5 additions & 2 deletions examples/showcase/11_supervisor_research_team/before.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def build_graph() -> Runnable:

async def supervise(state: TeamState) -> TeamState:
if state["steps"] >= 4:
return {**state, "verdict": state.get("verdict") or "stopped"}
# Stop condition: always emit next="done" so pick() can route to END
# (a missing "next" key would KeyError in the conditional edge).
return {**state, "next": "done", "verdict": state.get("verdict") or "stopped"}
route: Route = await router.ainvoke(
f"Topic: {state['topic']}. Notes done={bool(state['notes'])}, "
f"draft done={bool(state['draft'])}, checked={bool(state['verdict'])}. "
Expand All @@ -88,7 +90,8 @@ async def run_checker(state: TeamState) -> TeamState:
return {**state, "verdict": await checker.ainvoke(state)}

def pick(state: TeamState) -> str:
return END if state.get("next") == "done" else state["next"]
nxt = state.get("next", "done")
return END if nxt == "done" else nxt

builder = StateGraph(TeamState)
builder.add_node("supervisor", supervise)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "tracesage"
version = "0.3.0"
version = "0.3.1"
description = "Local-first observability for LangChain/LangGraph multi-agent systems"
readme = "README.md"
license = { text = "MIT" }
Expand Down
Loading