Skip to content
Closed
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
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RESPONSE=$(curl -fsSL \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/ci.yml/runs?branch=main&event=push&status=success&per_page=1")

LATEST_GREEN_SHA=$(echo "$RESPONSE" | jq -r '.workflow_runs[0].head_sha // empty')
LATEST_GREEN_SHA=$(gh run list \
--workflow=ci.yml \
--branch=main \
--event=push \
--status=success \
--limit=1 \
--json headSha \
--jq '.[0].headSha')

if [ -z "$LATEST_GREEN_SHA" ]; then
echo "Error: No successful ci.yml run found on main"
exit 1
Expand Down Expand Up @@ -118,16 +121,12 @@ jobs:

- name: Create GitHub release
if: ${{ !inputs.dry_run }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: weavegraph-v${{ inputs.version }}
release_name: Weavegraph v${{ inputs.version }}
body: |
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md#${{ inputs.version }}) for details.
draft: false
prerelease: false
run: |
gh release create "weavegraph-v${{ inputs.version }}" \
--title "Weavegraph v${{ inputs.version }}" \
--notes "See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md#${{ inputs.version }}) for details."

- name: Dry run summary
if: ${{ inputs.dry_run }}
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0] - 2026-04-01

### Added
- `DIAGNOSTIC_SCOPE` constant exported from `weavegraph::event_bus` for identifying internal diagnostic events
- `examples/production_streaming.rs` — golden-path reference for Axum + SSE + Postgres checkpointing
- `[[example]]` entry with `required-features = ["postgres", "examples"]` for `production_streaming`
- `#![warn(missing_docs)]` now enforced — all 228 previously undocumented public API items are documented

### Changed
- `RuntimeConfig::new()` signature changed: removed middle `checkpointer: Option<CheckpointerType>` parameter; now takes `(session_id: Option<String>, sqlite_db_name: Option<String>)`
- Feature flags table in crate-level docs updated to remove the removed `llm` alias
- `docs/MIGRATION.md` updated with v0.3.0 → v0.4.0 migration guide

### Removed
- **BREAKING**: `Message::new(role: &str, content: &str)` removed (deprecated since v0.3.0) — use `Message::with_role(Role::..., ...)` or convenience constructors
- **BREAKING**: `RuntimeConfig.checkpointer` field removed — configure checkpointer via `AppRunner::builder().checkpointer(...)`
- **BREAKING**: `RuntimeConfig::with_checkpointer()` and `RuntimeConfig::checkpointer_type()` removed
- **BREAKING**: `AppRunner::new()`, `from_arc()`, `with_options()`, `with_options_arc()`, `with_options_and_bus()`, `with_options_arc_and_bus()` removed (deprecated since v0.2.0) — use `AppRunner::builder()`
- **BREAKING**: `LadderError` type alias removed (deprecated since v0.3.0) — use `WeaveError` directly
- **BREAKING**: `llm` feature flag alias removed (deprecated since v0.3.0) — use `features = ["rig"]`

## [0.3.0] - 2026-03-07

### Added
Expand Down
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "weavegraph"
version = "0.3.0"
version = "0.4.0"
edition = "2024"
description = "Graph-driven, concurrent agent workflow framework with versioned state, deterministic barrier merges, and rich diagnostics."
license = "MIT"
Expand Down Expand Up @@ -118,11 +118,14 @@ sqlite = ["sqlx"]
postgres-migrations = ["postgres"]
postgres = ["sqlx"]
rig = ["dep:rig-core", "dep:rmcp"]
llm = ["rig"]
diagnostics = ["dep:miette"]
examples = ["reqwest", "scraper"]
petgraph-compat = ["petgraph"]

[[example]]
name = "production_streaming"
required-features = ["postgres", "examples"]

[[bench]]
name = "event_bus_throughput"
harness = false
Expand Down
161 changes: 161 additions & 0 deletions docs/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,167 @@ migration guidance for upgrading your code.

---

## v0.4.0

### Overview

v0.4.0 is the **API freeze** release. All items deprecated in v0.2.0 and v0.3.0
have been removed. No new public APIs were added. If you are already on v0.3.0
with no deprecation warnings, upgrading requires only the signature change to
`RuntimeConfig::new()`.

### Breaking Changes

#### 1. `Message::new(role: &str, content: &str)` removed

**Removed in:** v0.4.0 (deprecated since v0.3.0)

Use the typed constructors instead:

```rust
// Before
let m = Message::new("user", "hello");

// After — typed Role enum
let m = Message::with_role(Role::User, "hello");

// Or use the convenience constructors
let m = Message::user("hello");
let m = Message::assistant("reply");
let m = Message::system("you are a helpful assistant");
```

---

#### 2. `RuntimeConfig::new()` signature changed

**Removed in:** v0.4.0

The `checkpointer: Option<CheckpointerType>` middle parameter is removed.

```rust
// Before (v0.3.0)
let config = RuntimeConfig::new(
Some("session-id".into()),
Some(CheckpointerType::InMemory),
None,
);

// After (v0.4.0) — two parameters only
let config = RuntimeConfig::new(
Some("session-id".into()),
None, // sqlite_db_name
);
```

Set the checkpointer type via `AppRunner::builder()`:

```rust
AppRunner::builder()
.app_arc(app)
.checkpointer(CheckpointerType::SQLite)
.build()
.await?;
```

---

#### 3. `RuntimeConfig.checkpointer` field, `with_checkpointer()`, and `checkpointer_type()` removed

**Removed in:** v0.4.0

Configure the checkpointer exclusively through `AppRunner::builder()`:

```rust
// Before — field on RuntimeConfig
let config = RuntimeConfig { checkpointer: Some(CheckpointerType::Postgres), ..Default::default() };
// or
let config = RuntimeConfig::default().with_checkpointer(CheckpointerType::Postgres);

// After — builder method on AppRunner
AppRunner::builder()
.app_arc(app)
.checkpointer(CheckpointerType::Postgres)
.build()
.await?;

// For a fully custom checkpointer — still on RuntimeConfig
let config = RuntimeConfig::new(None, None)
.checkpointer_custom(Arc::new(my_checkpointer));
```

---

#### 4. Legacy `AppRunner` constructors removed

**Removed in:** v0.4.0 (deprecated since v0.2.0)

All free-standing constructors have been removed. Use `AppRunner::builder()` exclusively:

| Removed | Replacement |
|---------|-------------|
| `AppRunner::new(app)` | `AppRunner::builder().app(app).build().await` |
| `AppRunner::from_arc(app)` | `AppRunner::builder().app_arc(app).build().await` |
| `AppRunner::with_options(app, config)` | `AppRunner::builder().app(app)` + config methods |
| `AppRunner::with_options_arc(app, config)` | `AppRunner::builder().app_arc(app)` + config methods |
| `AppRunner::with_options_and_bus(app, config, bus)` | `AppRunner::builder().app(app).event_bus(bus)` |
| `AppRunner::with_options_arc_and_bus(app, config, bus)` | `AppRunner::builder().app_arc(app).event_bus(bus)` |

```rust
// Before
let runner = AppRunner::with_options_and_bus(app, config, bus).await?;

// After
let runner = AppRunner::builder()
.app(app)
.checkpointer(CheckpointerType::InMemory)
.event_bus(bus)
.build()
.await?;
```

---

#### 5. `LadderError` type alias removed

**Removed in:** v0.4.0 (deprecated since v0.3.0)

```rust
// Before
use weavegraph::channels::errors::LadderError;
fn my_fn() -> Result<(), LadderError> { ... }

// After
use weavegraph::channels::errors::WeaveError;
fn my_fn() -> Result<(), WeaveError> { ... }
```

---

#### 6. `llm` feature flag alias removed

**Removed in:** v0.4.0 (deprecated since v0.3.0)

```toml
# Before
weavegraph = { version = "0.3", features = ["llm"] }

# After
weavegraph = { version = "0.4", features = ["rig"] }
```

---

### New in v0.4.0

- `DIAGNOSTIC_SCOPE` constant exported from `weavegraph::event_bus` — use to
identify internal diagnostic events when filtering the event stream.
- `#![warn(missing_docs)]` is now enforced — all public API items are documented.
- `examples/production_streaming.rs` — golden-path reference for Axum + SSE +
Postgres checkpointing (requires `--features postgres,examples`).

---

## v0.3.0 (Upcoming)

### Breaking Changes
Expand Down
6 changes: 3 additions & 3 deletions examples/convenience_streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! - `App::invoke_with_channel()` - Simple streaming with a channel
//! - `App::invoke_with_sinks()` - Multiple custom sinks
//!
//! These methods simplify the common case while the full `AppRunner::with_options_and_bus()`
//! These methods simplify the common case while the `AppRunner::builder()`
//! pattern remains available for advanced use cases like web servers.
//!
//! ## When to Use Each Pattern
Expand All @@ -19,7 +19,7 @@
//! - Single execution with custom event routing
//! - More control than `invoke_with_channel()`
//!
//! ### `AppRunner::with_options_and_bus()` - Web Servers
//! ### `AppRunner::builder()` - Web Servers
//! - Per-request event isolation required
//! - SSE or WebSocket streaming
//! - Multiple concurrent clients
Expand Down Expand Up @@ -215,7 +215,7 @@ async fn main() -> ExampleResult<()> {
info!(" • More flexible than channel-only\n");

info!("💡 For web servers with per-request isolation:");
info!(" Use AppRunner::with_options_and_bus() instead");
info!(" Use AppRunner::builder() with .event_bus() instead");
info!(" (See examples/streaming_events.rs)\n");

Ok(())
Expand Down
Loading
Loading