npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

intentx-core-z

v2.2.1

Published

Deterministic intent-driven execution engine for orchestrating domain logic via reactive graphs and managed effects.

Downloads

192

Readme

🧬 intentx-core-z

NPM Downloads

LIVE EXAMPLE

A minimal, framework-agnostic intent-driven execution core.

intentx-core-z is a low-level runtime for orchestrating logic deterministically.


Why intentx-core-z

  • ✅ Deterministic execution
  • ✅ Async control (debounce / throttle / takeLatest / takeLeading)
  • ✅ Fine-grained signals
  • ✅ Lazy computed values
  • ✅ Priority scheduler
  • ✅ Batching
  • ✅ Scope isolation
  • ✅ Framework-agnostic
  • ✅ Zero external dependencies

Mental Model

emit(intent)
   ↓
scoped handlers
   ↓
effect orchestration (debounce / takeLatest / ...)
   ↓
explicit state mutation
   ↓
reactive invalidation
   ↓
scheduled recomputation
   ↓
scheduler flush (priority ordered)

Execution is explicit.
State mutation is explicit.
Reactivity is explicit.


Installation

npm install intentx-core-z

Import

import {
  createIntentBus,
  intentEffect,
  signal,
  createComputed,
  reactiveEffect,
  batch,
  queueJob,
  createScope
} from "intentx-core-z"

Intent Runtime

1️⃣ Basic Intent Execution

import { createIntentBus } from "intentx-core-z"

type State = { count: number }

const state: State = { count: 0 }

const bus = createIntentBus<State>((payload, scope) => ({
  state,
  payload,
  scope,
  emit: (type, payload) => bus.emit(type, payload, scope),
  setState(fn) {
    fn(state)
  }
}))

bus.on("increment", ({ setState }) => {
  setState(s => {
    s.count++
  })
})

await bus.emit("increment")

console.log(state.count) // 1

State is user-owned.
IntentBus controls execution only.


2️⃣ Async Effect Orchestration

import { intentEffect } from "intentx-core-z"

bus.effect(
  "search",
  intentEffect()
    .debounce(300)
    .takeLatest()
)

Available controls:

  • .debounce(ms)
  • .throttle(ms)
  • .takeLatest()
  • .takeLeading()

Effects wrap handlers — no hidden scheduler.

Execution remains deterministic.


Reactive Core

Reactive primitives are independent from IntentBus.


3️⃣ signal

import { signal } from "intentx-core-z"

const count = signal(1)

count.set(2)
console.log(count()) // 2
  • Fine-grained
  • Pull-based
  • No proxies

4️⃣ computed

import { signal, createComputed } from "intentx-core-z"

const count = signal(1)

const double = createComputed(() => {
  return count() * 2
}) // computed

console.log(double()) // 2

count.set(3)

console.log(double()) // 6
  • Lazy
  • Cached
  • Dependency tracked automatically

5️⃣ reactiveEffect

import {
  signal,
  createComputed,
  reactiveEffect
} from "intentx-core-z"

const count = signal(1)

const double = createComputed(() => count() * 2)

const triple = createComputed(() => double() + count())

reactiveEffect(() => {
  console.log("double =", double())
})

count.set(2)
// → double = 4

Effects rerun only when dependencies change.


Scheduler & Batching

6️⃣ batch

import { batch, signal, reactiveEffect } from "intentx-core-z"

const count = signal(0)

reactiveEffect(() => {
  console.log("count =", count())
})

batch(() => {
  count.set(1)
  count.set(2)
  count.set(3)
})

// effect runs once → count = 3
const handleClick = () => {
    batch(() => {
      count.set(1)
      count.set(2)
      count.set(3)
    })
  }
<button onClick={handleClick}>Batch</button>

7️⃣ queueJob with priority

import { queueJob } from "intentx-core-z"

queueJob(() => console.log("low"), "low")
queueJob(() => console.log("high"), "high")

Priority levels:

  • "high"
  • "normal"
  • "low"

Jobs are deduplicated per flush cycle.


Scope Isolation

Scopes isolate intent handlers.

import { createScope } from "intentx-core-z"

const admin = createScope("admin")

bus.on("reset", ({ setState }) => {
  setState(s => {
    s.count = 0
  })
}, admin)

await bus.emit("reset", null, admin)

Scopes are symbol-based.
No cross-scope leakage.


Optional: eventbus-z

intentx-core-z does not depend on any event bus.

If you want UI-level signaling:

import EventBus from "eventbus-z"
import { createIntentBus } from "intentx-core-z"

const bus = createIntentBus(context => context)

// bridge UI → intent
EventBus.$on("INCREMENT", payload => {
  bus.emit("increment", payload)
})

Architecture layering:

UI → eventbus-z → intentx-core-z → reactive
  • EventBus = transport
  • IntentBus = orchestration
  • Reactive = invalidation

Each layer remains independent.


API Overview

IntentBus

| Method | Description | | ---------------------------------- | ---------------------------- | | createIntentBus(getContext) | Create scoped intent runtime | | bus.on(type, handler, scope?) | Register intent handler | | bus.effect(type, effect, scope?) | Attach effect middleware | | bus.emit(type, payload?, scope?) | Emit intent | | createScope(label?) | Create isolated scope |

Reactive

| Primitive | Description | | -------------------- | ------------------------ | | signal(initial) | Reactive state primitive | | createComputed(fn) | Lazy derived value | | reactiveEffect(fn) | Reactive side-effect | | batch(fn) | Batch multiple updates |


Who Should Use This

  • Backend command engines
  • Domain-driven execution layers
  • Automation workflows
  • Micro-frontend orchestration
  • UI-independent business logic
  • Worker-based logic runtime
  • Highly testable logic systems

Design Principles

  • Deterministic execution
  • Explicit state mutation
  • No hidden global state
  • No magic subscriptions
  • Runtime-controlled scheduling
  • Separation of transport / orchestration / state

Positioning

intentx-core-z is positioned as an execution kernel — not a store and not a stream library.
The comparison below reflects execution model differences, not feature completeness.

| Criteria | intentx-core-z | Store-based (Redux / Zustand) | Stream-based (RxJS) | | --------------------------- | ------------------ | ----------------------------- | ------------------- | | Intent-based execution | ✅ | ❌ | ⚠️ | | Deterministic orchestration | ✅ | ⚠️ | ❌ | | Built-in async control | ✅ | ❌ | ✅ | | Fine-grained reactivity | ✅ | ❌ | ❌ | | Lazy computed graph | ✅ | ❌ | ❌ | | Explicit scheduler control | ✅ | ❌ | ⚠️ | | State store abstraction | ❌ | ✅ | ❌ | | Stream semantics | ❌ | ❌ | ✅ | | Proxy-based mutation | ❌ | ⚠️ | ❌ | | Framework required | ❌ | ⚠️ | ❌ |

Notes

  • intentx-core-z is an execution kernel: intent is first-class, scheduling is explicit, and reactivity is fine-grained and lazy.
  • Store-based libraries focus on state containers; async control and orchestration typically rely on external middleware.
  • RxJS is a stream algebra system with powerful async operators, but intent and scheduling are stream-driven rather than runtime-orchestrated.
  • Determinism in intentx-core-z is enforced via explicit priority scheduling; other models depend on middleware order or operator chains.
  • intentx-core-z does not provide a state store abstraction by design — state remains user-owned.

What it is NOT

  • Not a state manager
  • Not Redux / Zustand
  • Not a reducer system
  • Not proxy-based reactivity
  • Not a UI framework
  • Not an event transport layer

Non-goals

intentx-core-z intentionally does NOT provide:

  • State persistence
  • Global store abstraction
  • UI rendering layer
  • Proxy-based reactivity
  • Stream/Rx pipeline semantics
  • Middleware plugin system

If you want a store, build one on top of intentx-core-z.


Philosophy

intentx-core-z is an execution engine.
You own the state. It owns the orchestration.


Architecture Diagram

Transport Layer
   (eventbus / http / worker)
           ↓
Intent Layer
   (intentx-core-z)
           ↓
Reactive Layer
   (signals / computed / effects)
           ↓
State (user-owned)

License

MIT