Skip to content

V0.2.2

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 30 May 04:56

Release v0.2.2

✨ New Features

  • Event System Enhancement
    Introduced ConstructableEvent and TRIGGER_EVENT instruction – events can now be constructed on‑demand inside a workflow composition, enabling decoupled event dispatch without manual instantiation.

  • Manual Stack Management
    Added RET_FAR instruction for explicit control over the return address stack. Perfect for early exit from nested CALL scopes or custom stack unwinding.

  • Middleware Support
    WorkflowInterpreter now accepts an optional middleware callable, 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 on self, and a clean run() API. LangGraph‑style development without the builder boilerplate.

🚀 Improvements

  • Try/Catch Stability
    Added an escape sentinel (NOP) to all TRY blocks, ensuring control flow never falls through into the enclosing composition.

  • Dependency Injection
    Refined matching rules between extra_args and extra_kwargs – better error messages and predictable fallback behavior.

  • Node Composition
    SelfCompileInstruction now 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.sh and 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