Skip to content

Add Rust core with compatible Python and Slack/Claude Node SDK - #21

Merged
ishaan-berri merged 1 commit into
mainfrom
feat/rust-core-multilang
Oct 13, 2026
Merged

ishaan-berri merged 1 commit into
mainfrom
feat/rust-core-multilang

Conversation

@ishaan-berri

@ishaan-berri ishaan-berri commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

AgentChat's dispatch and state logic previously lived only in Python. This adds a shared Rust turn engine and native Rust/Node interfaces, with Slack and the JavaScript Claude Agent SDK as the first native integration. Existing Python channel objects, imports, decorators, custom state, message identity and async callbacks remain supported.

  • Add typed core models, channel/state contracts, conversation serialization, context operations and a public Rust facade. Python and native runtimes execute the same turn transitions; bindings leave provider routing to the Slack crate.
  • Make Rust the default Python dispatcher and in-memory store through PyO3/maturin. Preserve arbitrary Python metadata and custom lock task scope; keep backend="python" / AGENTCHAT_BACKEND=python for explicit rollback without replaying failed work.
  • Add native Slack Socket Mode, confirmed replies, history, subscriptions, files, rich replies, mirroring and working indicators. Bound admission and shutdown, preserve admitted replies during draining, and never automatically retry uncertain writes.
  • Add an ESM Node package and a Claude Agent SDK example with conversation sessions, thread subscriptions, final-result validation and cancellation. Document the support matrix and add cross-platform package CI.

This is the first migration stage: all six existing Python adapters remain available, while native Node/Rust channel support initially covers Slack. Source installs now require Rust; binary wheels do not. No registry publishing is included.

Validation passed:

  • 494 Python tests on Python 3.11 and 3.14 with both Rust and Python backends; Ruff.
  • 47 Rust tests, including 16 shared Python/Slack normalization fixtures and local HTTP/WebSocket transport tests; formatting and workspace Clippy with warnings denied.
  • 10 native Node integration tests and 4 Claude tests; both packages type-check, including against Claude Agent SDK 0.2.141.
  • Installed wheel, source-distribution and packed npm package smoke tests; provider-free Rust facade and Slack example compilation; Rust 1.88 compilation in CI.

Independent review covered Rust domain/helper ownership, Python compatibility and shutdown/cancellation behavior. The resulting fixes have regressions for handler self-close, admitted replies during draining, uncertain sends, detached-operation cancellation, working-status cleanup races and fatal transport cancellation.

Live Slack/Claude credentials were not exercised; the end-to-end tests use local Slack servers and a fake Claude stream. A live application canary remains necessary before deployment. CI qualifies Linux x64/arm64, macOS x64/arm64 and Windows x64 packages and the declared Rust 1.88 minimum.

@ishaan-berri
ishaan-berri merged commit bacf106 into main Oct 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant