Skip to content

Releases: PaulJPhilp/effect-actor

v0.1.2 - ActorRef Interface & Type Improvements

Choose a tag to compare

@PaulJPhilp PaulJPhilp released this 03 Nov 23:22

What's New

✨ New Features

  • ActorRef<M, R> Interface: Added proper TypeScript interface for actor references
    • Generic message type M and requirements type R
    • send(message: M): Effect.Effect<void, Error, R> method
    • Full Effect integration for type-safe messaging

🏗️ Architecture Improvements

  • Enhanced Type Safety: Better TypeScript inference across the actor system
  • Module Organization: Improved export structure in actor/index.ts
  • Effect Integration: Proper Effect imports and usage patterns

📦 Package

  • Published to npm as effect-actor-pauljphilp@0.1.2

🧪 Testing

  • All 34 tests passing
  • Comprehensive coverage of actor functionality

Usage Example

import { Actor } from 'effect-actor-pauljphilp'

const actor: ActorRef<{ type: 'increment' }> = await Actor.make({
  initialState: 0,
  receive: (count, msg) => 
    msg.type === 'increment' 
      ? Effect.succeed(count + 1)
      : Effect.succeed(count)
}).pipe(Effect.runPromise)

await actor.send({ type: 'increment' })

v0.1.1 - Actor.make() High-Level API

Choose a tag to compare

@PaulJPhilp PaulJPhilp released this 03 Nov 23:05

Added Actor.make() high-level API for simpler actor creation. Published to npm as effect-actor-pauljphilp@0.1.1

Release v0.1.0

Choose a tag to compare

@PaulJPhilp PaulJPhilp released this 03 Nov 22:35

What's New

Added

  • Initial release of effect-actor
  • Effect-native state machine orchestration framework
  • Actor service with state persistence and audit trails
  • State machine specification builder with guards and actions
  • Storage and compute provider interfaces
  • Content production workflow example
  • Comprehensive test suite
  • TypeScript declarations and ES modules support

Features

  • Hierarchical state machines with entry/exit actions
  • Guard conditions for state transitions
  • Action execution during transitions
  • Schema validation with Effect.Schema
  • Audit trail recording
  • Actor state persistence
  • Effect service integration
  • Type-safe actor specifications

Dependencies

  • Effect ^3.18.4 (peer dependency)