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 🙏

© 2025 – Pkg Stats / Ryan Hefner

autopoietic-sdk

v1.0.2

Published

A universal SDK for institutional logic simulations.

Downloads

5

Readme

Autopoietic-SDK

Autopoietic-SDK is a universal library for modeling and simulating complex systems and institutional logic. It empowers developers to create autonomous components, link them, and coordinate their interactions dynamically.

Beyond the Rule of Law

Autopoietic-SDK encapsulates a universal institutional logic applicable across various domains. It uses the foundational principles of the Optimus Method to model diverse systems, from legal frameworks to economic microcosms. The SDK operates based on four core rules:

The Four Rules of the Optimus Method

  1. Functional Differentiation Institutions are divided into distinct, autonomous units, each serving a specific function. For example, legislative, judicial, and executive branches operate as independent parts essential to the coherence of the entire system.

  2. Autopoiesis Each unit self-regulates according to its own binary logic. The legal system, for instance, operates on valid/invalid distinctions, while the political system is driven by legitimate/illegitimate decisions. This internal regulation ensures stability and consistency.

  3. Structural Coupling Although each unit remains autonomous, they interact through stable, flexible mechanisms. These interactions enable the institution to evolve cohesively, allowing separate units to maintain independence while staying interdependent.

  4. Society (Central Orchestrator) A central orchestrator ensures that all units function in harmony, iterating over time to adapt and refine the system. This is the core of societal evolution, where interactions between units are monitored and dynamically adjusted.

Installation

Install the SDK via npm:

npm install autopoietic-sdk

Quick Start Example

Here's an example of how to use Autopoietic-SDK to model and simulate a system:

// Import components from the SDK
const { SystemUnit, Connector, Coordinator } = require("autopoietic-sdk");

// Define individual units with specific behaviors
const unit1 = new SystemUnit("Increment", (x) => x + 1); // Adds 1 to input
const unit2 = new SystemUnit("Double", (x) => x * 2); // Multiplies input by 2

// Connect the units to define their interaction
const connector = new Connector(unit1, unit2);

// Use the coordinator to simulate the system
const coordinator = new Coordinator(connector);
coordinator.simulate(3, 5); // Simulate 5 cycles with an initial input of 3

Expected Output

When running the above code, the output will simulate the system across 5 cycles:

Cycle 1: Input = 3
Output = { Increment: 4, Double: 6 }
Cycle 2: Input = 10
Output = { Increment: 11, Double: 20 }
Cycle 3: Input = 31
Output = { Increment: 32, Double: 62 }
Cycle 4: Input = 94
Output = { Increment: 95, Double: 188 }
Cycle 5: Input = 283
Output = { Increment: 284, Double: 566 }

Features

  • SystemUnit: Define autonomous components with specific logic.

  • Connector: Establish dynamic connections between components.

  • Coordinator: Simulate interactions and manage cycles of execution.

Why Choose Autopoietic-SDK?

  • Modularity: Easily extendable with reusable components.

  • Scalability: Handle complex systems with multiple interlinked units.

  • Flexibility: Adaptable to various fields like institutional modeling, AI, and simulations.

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute it.