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

@ai-rpg-engine/presentation

v2.0.7

Published

Narration plan schema, render contracts, and presentation state types for AI RPG Engine

Readme

@ai-rpg-engine/presentation

用于AI RPG Engine的叙述计划模式、渲染协议以及呈现状态类型。

它是沉浸式运行时的一部分,该运行时是一个多模态的呈现流水线,可以将游戏状态转换为结构化的视听体验。

安装

npm install @ai-rpg-engine/presentation

其功能

与直接输出原始文本不同,叙述器会生成一个叙述计划,这是一个结构化的配方,描述了文本、音效、环境音、音乐提示、UI效果以及语音合成参数。

任何前端(终端、网页、Electron)都实现PresentationRenderer接口,以接收和执行这些计划。

主要类型

| 类型 | 用途 | |------|---------| | NarrationPlan | 结构化的叙述配方(文本 + 音效 + 环境音 + 音乐 + UI) | | SpeakerCue | 语音合成参数(语音ID、情感、速度) | | SfxCue | 音效触发器(音效ID、时间、强度) | | AmbientCue | 环境音控制(开始、停止、淡入淡出) | | MusicCue | 背景音乐控制(播放、停止、增强、减弱) | | UiEffect | 终端/屏幕视觉效果(闪烁、摇晃、淡出) | | VoiceProfile | 语音配置,用于语音合成 | | PresentationRenderer | 渲染协议——任何前端都必须实现此协议 |

用法

import type { NarrationPlan, PresentationRenderer } from '@ai-rpg-engine/presentation';
import { validateNarrationPlan, isValidNarrationPlan } from '@ai-rpg-engine/presentation';

// Validate a plan from Claude's output
const errors = validateNarrationPlan(planFromClaude);
if (errors.length === 0) {
  // Plan is valid, execute it
}

// Type guard
if (isValidNarrationPlan(data)) {
  console.log(data.sceneText);
}

AI RPG Engine 的一部分

此包是 AI RPG Engine 单仓库的一部分。请参阅根目录的 README 文件以获取完整的架构信息。

许可证

MIT