V0.2.2
Release v0.2.2
✨ New Features
-
Event System Enhancement
IntroducedConstructableEventandTRIGGER_EVENTinstruction – events can now be constructed on‑demand inside a workflow composition, enabling decoupled event dispatch without manual instantiation. -
Manual Stack Management
AddedRET_FARinstruction for explicit control over the return address stack. Perfect for early exit from nestedCALLscopes or custom stack unwinding. -
Middleware Support
WorkflowInterpreternow accepts an optionalmiddlewarecallable, allowing custom logic to wrap every node execution (e.g., logging, metrics, injection). -
Inline Workflow Pattern
New guide and demos for encapsulating workflows inside classes – nodes as instance methods, state onself, and a cleanrun()API. LangGraph‑style development without the builder boilerplate.
🚀 Improvements
-
Try/Catch Stability
Added an escape sentinel (NOP) to allTRYblocks, ensuring control flow never falls through into the enclosing composition. -
Dependency Injection
Refined matching rules betweenextra_argsandextra_kwargs– better error messages and predictable fallback behavior. -
Node Composition
SelfCompileInstructionnow supports the>>operator directly, making it even easier to mix custom instructions with regular nodes.
📚 Documentation & Examples
- 15 new runnable demos covering everything from minimal workflows to
RET_FAR,TRIGGER_EVENT, step‑by‑step debugging, and custom self‑compile instructions. - New advanced guides on manual stack management and inline workflows (both English and Chinese).
- Expanded API reference for
WorkflowInterpreter(jump methods,middleware, far calls) and event types.
🔧 Development & CI
- Added
ci.shand companion scripts for full pipeline: environment init, linting, type checking, testing, coverage, package build, and docs build. - Updated Ruff and Pyright configurations for stricter checks.
🌟 Other Changes
- Project motto updated: “Sense is all you need.”
Upgrade
pip install --upgrade amrita-sense
Full Changelog: 0.2.1...0.2.2