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

@actrium/actr

v0.3.12

Published

TypeScript/Node.js bindings for the ACTR (Actor-RTC) framework

Downloads

1,776

Readme

actr-ts

English | 中文

这是 ACTR 的 TypeScript/Node.js 绑定。当前实现已经切到 package-first:本地源码形式的 workload 已被移除。actr-ts 现在会从 manifest.toml 启动一个 ActrNode 包装层,自动加载同目录的 actr.toml,然后通过发现 + 显式远端调用访问服务。

快速开始

import { ActrNode, PayloadType } from '@actrium/actr';

async function main() {
  const node = await ActrNode.fromConfig('./manifest.toml');
  const actorRef = await node.start();

  const [serverId] = await actorRef.discover(
    { manufacturer: 'actrium', name: 'EchoService', version: '0.2.1-beta' },
    1,
  );

  if (!serverId) {
    throw new Error('没有发现 EchoService');
  }

  const response = await actorRef.call(
    serverId,
    'echo.EchoService.Echo',
    PayloadType.RpcReliable,
    Buffer.from('hello'),
    5000,
  );

  console.log(response.toString());
  await actorRef.stop();
}

main().catch(console.error);

API

  • ActrNode.fromConfig(configPath):从 manifest.toml 启动 ActrNode 包装层。
  • ActrRef.discover(targetType, count):发现远端 actor。
  • ActrRef.call(target, routeKey, payloadType, payload, timeoutMs):发起远端 RPC。
  • ActrRef.tell(target, routeKey, payloadType, payload):发送单向远端消息。

与 Rust Node Typestate 的关系

Rust 宿主暴露 typestate 链 Node<Init> → Node<Attached> → Node<Registered> → ActrReffrom_config_fileattach_*registerstart),便于系统层观察并自定义每次状态迁移。TypeScript 绑定有意把这条流水线压扁为一步 ActrNode.fromConfig(path).start():应用开发者几乎不需要中间态,扁平接口更契合当前 TypeScript 绑定表面。需要精细控制(自定义 TrustProvider、复用 Hyper、工作负载托管等)时,请下沉到原生 Rust 的 actr_hyper::{Hyper, Node} 接口。

当前边界

  • 当前支持:manifest 启动、服务发现、远端 RPC、关闭流程。
  • 已移除:源码定义的本地 workload、ActrSystemsystem.attach(...)Workload
  • 如果要承载服务,请构建经过验证的 .actr 包,并通过 Rust Node::attach(...)wasm / dyn lib)运行。

构建

npm install
npm run build
npm run compile:ts