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

@ferrexd-chaos/interaction-mcp

v0.2.1

Published

Local MCP server for the CHAOS interaction runtime: durable decisions, sessions, locks, and resume capsules, file-backed under .chaos/interactions.

Downloads

31

Readme

@ferrexd-chaos/interaction-mcp

Local MCP server for the CHAOS interaction runtime: durable decisions, sessions, locks, and resume capsules, file-backed under .chaos/interactions/ in your repository.

The chat thread is not the source of truth. The interaction runtime is the source of truth. MCP is the agent-facing API to that runtime.

  • Server name: chaos-interaction
  • Transport: stdio
  • Storage: local JSON files only. No network calls, no telemetry.

Install / run

No install step — run it with npx from your repository root:

{
  "mcpServers": {
    "chaos-interaction": {
      "command": "npx",
      "args": [
        "-y",
        "@ferrexd-chaos/interaction-mcp",
        "--repo-root",
        ".",
        "--log-level",
        "error"
      ]
    }
  }
}

The CHAOS Claude Code plugin ships this exact wiring; installing the plugin is the normal way to get this server. Requires Node.js >= 20.19 (the published package is a single pre-bundled JS file — no compile at install time).

Schemas

Artifacts are validated against JSON schemas in .chaos/interactions/schema/. The canonical schema files are embedded in this package and seeded automatically:

  • On startup, if the interactions root (.chaos/interactions/) exists but the schema directory is missing or empty, the server seeds it. A repository where CHAOS was never initialized is left untouched.
  • Explicitly: npx -y @ferrexd-chaos/interaction-mcp --seed-schemas (add --force to overwrite existing files). Existing files are never overwritten without --force — once seeded, the workspace copy is yours.

MCP tools

| Tool | Notes | |---|---| | chaos_begin_command | READY / RESUME_AVAILABLE / BLOCKED_BY_PENDING_DECISION / CONFLICTING_COMMAND_ACTIVE. | | chaos_create_decision | Returns mustStop: true; never blocks; idempotent (PENDING_DECISION_EXISTS). | | chaos_get_active_decision | NO_ACTIVE_DECISION / ACTIVE_DECISION / MULTIPLE_ACTIVE_DECISIONS. | | chaos_get_decision_response | NO_RESPONSE_YET / ANSWERED / CANCELLED / EXPIRED / SUPERSEDED / CONSUMED. | | chaos_answer_decision | Manual/dev/test bridge (see caveat below). | | chaos_mark_decision_consumed | answered → consumed; preserves response. | | chaos_create_resume_capsule | Compact; references artifacts by path. | | chaos_get_resume_capsule | FOUND / NOT_FOUND / MULTIPLE_FOUND; by run/change/latest. | | chaos_find_resume_candidates | Ready-to-resume sessions for chaos:resume. | | chaos_complete_command | Distinguishes administrative terminalization. | | chaos_cancel_command | Cancels pending decisions, releases locks, preserves artifacts. | | chaos_list_locks | Flags stale locks; never deletes/repairs. | | chaos_list_sessions | Summaries only. |

Tool result contract

Every tool returns a consistent, model-friendly wrapper:

{
  "ok": true,
  "status": "WAITING_FOR_USER_DECISION",
  "mustStop": true,
  "message": "Decision created. Stop now and wait for the human response.",
  "data": {},
  "warnings": [],
  "nextAction": "Stop now. Do not continue this CHAOS command until a decision response exists."
}

Errors are structured and never contain stack traces. Any result that requires the model to stop sets mustStop: true and says so explicitly.

Caveat: chaos_answer_decision is a manual/dev/testing bridge only. Human responses are normally written by the VS Code Decision Center extension. The model must not choose the human decision itself.

MCP resources (read-only)

| URI | Content | |---|---| | chaos://interactions/active | Active interaction pointer. | | chaos://interactions/locks | Current locks with stale flags. | | chaos://interactions/sessions | All session summaries. | | chaos://interactions/sessions/{commandRunId} | One session. | | chaos://interactions/decisions/{decisionId} | One decision + its response. | | chaos://interactions/capsules/{commandRunId} | One resume capsule. |

All resources return application/json. Missing items return a clean NOT_FOUND body.

CLI flags / environment variables

| CLI flag | Env var | Default | |---|---|---| | --repo-root <dir> | CHAOS_REPOSITORY_ROOT | process.cwd() | | --root <dir> | CHAOS_INTERACTIONS_ROOT | <repo-root>/.chaos/interactions | | --schema-dir <dir> | CHAOS_INTERACTIONS_SCHEMA_DIR | <root>/schema | | --no-validate / --validate | CHAOS_INTERACTION_VALIDATE | true | | --log-level <level> | CHAOS_INTERACTION_LOG_LEVEL | info | | --config <file> | — | (optional JSON config) | | --seed-schemas [--force] | — | mode: write embedded schemas and exit |

Precedence: CLI > env > JSON config > defaults. All logging goes to stderr; stdout is reserved for the MCP protocol stream.

Development (from a CHAOS checkout)

The server runs its TypeScript sources directly (Node >= 22.6 for type stripping); the runtime package is consumed from source via a relative path:

npm test               # node --test (unit + spawned stdio smoke)
npm run typecheck      # tsc --noEmit
npm run generate:schemas  # regenerate embedded schemas from .chaos/interactions/schema/
npm run bundle         # esbuild -> dist/chaos-interaction-mcp.mjs (the published artifact)
npm run smoke:bundle   # cold-start smoke of the bundle outside the checkout

Authoritative contracts live in the CHAOS repository: .chaos/interactions/ and tools/chaos-interaction-runtime.

License

MIT