New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chrono-forge

Package Overview
Dependencies
Maintainers
0
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrono-forge

A comprehensive framework for building resilient Temporal workflows, advanced state management, and real-time streaming activities in TypeScript. Designed for a seamless developer experience with powerful abstractions, dynamic orchestration, and full cont

  • 1.4.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
882
increased by68.64%
Maintainers
0
Weekly downloads
 
Created
Source

Temporal-Forge

(A Next-Gen Temporal Workflow Orchestration Framework for TypeScript)

Sponsor on GitHub Test Suite Quality Gate Status Reliability Rating Security Rating Maintainability Rating

Temporal-Forge supercharges Temporal.io workflows by eliminating boilerplate, automating state management, and enabling seamless hierarchical orchestration.

  • Decorator-Based API → Write workflows in a declarative, intuitive way
  • Event-Driven UpdatesNo polling—Workflows automatically synchronize state
  • State Normalization & Hierarchical Management → Built-in entity normalization & child workflow orchestration
  • ContinueAsNew & Long-Running Workflow SupportEfficiently persists state and prevents history bloat
  • API Integration → Load & sync external data in real-time
  • Built-in Observability → OpenTelemetry support for tracing and debugging

💡 Why Use Temporal-Forge?

  • 🚀 Faster Workflow Development → No need to manually manage signals, queries, or updates.
  • 🧠 Intelligent State Management → Normalized entities with automatic denormalization and caching.
  • 🎯 Precision Updates → Changes only propagate where needed, eliminating redundant state syncing.
  • 🤖 Automatic Child Workflow Handling → Start, stop, and update workflows without writing extra logic.

📌 Key Features

1️⃣ Step-Based Workflow Execution

Temporal-Forge simplifies workflow design using decorators like @Step(), @Query(), and @Signal() to define workflow logic.

  • Step-based execution with dependencies
  • Conditional branching & dynamic workflow control
  • Lifecycle hooks (@Before(), @After(), @Hook())

2️⃣ Advanced Stateful Workflow Management

Stateful workflows handle complex entity relationships with automatic state tracking.
Automatic child workflow execution & cancellation
Parent workflows automatically sync child state changes
Limitless nesting of parent-child workflows


3️⃣ Event-Driven, Subscription-Based Updates (No Polling)

  • Entities update automatically across workflows
  • Only relevant workflows receive updates via event-driven signals
  • Ancestor tracking prevents infinite loops & redundant updates

💡 How it Works? → Each workflow subscribes to only the data it cares about.
If an entity updates, only dependent workflows receive updates, ensuring low-latency state propagation.


4️⃣ Normalized State & Cached Denormalization

State is structured using normalizr, ensuring efficient, normalized entity management.
Automatically flattens nested relationships
StateManager & limitRecursion cache queries to optimize lookups
Denormalization is fully cached & optimized


5️⃣ Auto-Managed Child Workflow Lifecycle

  • Starts child workflows when needed
  • Cancels workflows when dependencies change
  • Passes subscription objects so child workflows notify parents of updates

No more manual child workflow management—it just works.


📦 Installation

npm install chrono-forge

or

yarn add chrono-forge

🔧 Requirements:

  • Node.js 18+
  • Temporal.io’s TypeScript SDK

🚀 Quick Start

Basic Workflow

import { ChronoFlow, Workflow, Step } from 'chrono-forge';

@ChronoFlow()
export class SimpleWorkflow extends Workflow {
  @Step()
  async execute() {
    this.log.info('Executing workflow...');
  }
}

export default SimpleWorkflow;

Stateful Workflow Example

import { StatefulWorkflow, Property, Query, Signal, ChronoFlow } from 'chrono-forge';

@ChronoFlow()
class MyStatefulWorkflow extends StatefulWorkflow {
  @Property()
  myState!: string;

  @Signal()
  async updateState(newState: string) {
    this.myState = newState;
  }

  @Query()
  getState() {
    return this.myState;
  }
}

export default MyStatefulWorkflow;

💡 This workflow automatically normalizes state and updates subscribers when updateState is called!


📖 Documentation

📚 Read the full docs:


🛠️ Core Concepts

Step-Based Execution → Define steps using @Step()
Workflow Lifecycle Management → Manage workflow execution state
Query & Signal Handling → Real-time data retrieval and updates
Automatic Retry & Error Handling → Decorators like @OnError() simplify failure recovery


📌 Advanced Topics

  • Handling Circular Workflow Relationships → Prevents redundant updates
  • Security & API Token Management → Securely handle external API access
  • ContinueAsNew Optimization → Ensures long-running workflows stay within Temporal’s execution limits

🔍 Full API reference available in docs/API.md


🧪 Testing & Validation

Temporal-Forge includes a comprehensive test suite:

  • ✅ Unit tests for decorators, subscriptions, and state management
  • Integration tests covering real-world workflow scenarios
  • ✅ SonarCloud reports for maintainability, security, and reliability

💡 Run tests locally:

npm run test

🤝 Contributing

🚀 We welcome contributions! Whether it's bug fixes, feature requests, or documentation improvements—join the project and help make Temporal-Forge even better.

📌 See CONTRIBUTING.md for details.


📜 License

MIT License – See the LICENSE file for more details.


💡 "Those who say it cannot be done should stop interrupting the people doing it."

Keywords

FAQs

Package last updated on 11 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc