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

@forgeax/engine-intelligence

v0.1.27

Published

Provider-neutral asynchronous Activity boundary for ForgeaX Engine.

Readme

@forgeax/engine-intelligence

Provider-neutral asynchronous work for ForgeaX Engine. The public concept is an Activity: submit bounded input, poll ordered bounded events, cancel it, and retain only its provider-scoped SessionRef when conversation continuity is needed. The package does not define prompts, agents, tools, skills, memory, or gameplay components.

const started = intelligence.submit({ input: playerText, session: savedSession });
if (!started.ok) return;

for (const event of intelligence.poll()) {
  if (event.type === 'text-delta') dialogue.append(event.text);
  if (event.type === 'completed') savedSession = event.session;
}

submit, poll, and cancel never wait for provider work. Providers run outside the frame loop and can receive no World, Renderer, or asset-writing authority through this contract. A game must explicitly interpret and accept a terminal result before mutating authoritative state.

Realm boundary

createIntelligencePortClient() and bindIntelligencePort() carry only structured-cloneable commands, identities, sessions, text, and structured failures over an App bootstrapPort. The engine realm polls once per frame; the Host owns provider SDKs, credentials, and subprocesses.

IntelligencePortBinding.close() is the Host-side terminal transition. It shares one idempotent close task, closes the runtime before publishing intelligence-closed, and then releases the port. A synchronous publication fault is contained so physical release still runs and is awaited. This includes the intelligence-events response after runtime.poll() has drained its bounded output: a failed response terminally closes the binding instead of leaving its listener, runtime, or physical port live. When the notification is delivered, the client treats it as terminal: it clears active activities, rejected results, buffered events, and outstanding poll credit; late realm messages are ignored; later submit and cancel return structured intelligence-closed, and poll returns an empty list. A client-side close() is also idempotent and reuses the same Promise, including when Host cleanup wins the race. If publishing the client-side close command throws synchronously, the client remains terminal, releases its listener and port exactly once, and resolves that same close task. The same containment applies when publishing a client-side poll command throws synchronously: any events selected for that poll are discarded, the pending credit is cleared with the active/rejected/event state, the client returns an empty list instead of throwing, and listener/port release happens exactly once.

Lifecycle

intelligencePlugin(service) provides the optional Cordis service and closes it when the Fiber is disposed. Disposal is terminal and best-effort: a provider close failure cannot strand the realm transport, and callbacks from the closed provider are ignored. Output and concurrency bounds are explicit in IntelligenceLimits; streamed output is counted cumulatively and completion payloads are checked independently. Either output-character bound terminates the affected Activity with one intelligence-output-overflow terminal whose detail.bound is 'output-chars' and whose detail.limit is the configured limit, instead of growing an unbounded queue.