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

cortico-world-deai

v0.1.2

Published

Coopanion 去 AI 味:给 AI 腔的话做检查,提供本地检查服务供其他 World 接入,面板显示拦下与漏网;装后重启 Coopanion 生效。

Readme

cortico-world-deai(去 AI 味)

当前版本 0.1.2。改了什么见 CHANGELOG.md。

一个不连平台、不管事件的 Coopanion World:挂上之后只在三处起作用。

  1. 环境提示词:src/ENV_PROMPT.md 进系统前缀,告诉它「话说完会被体检」「被拦了怎么改」。
  2. 工具 deai_check:把一段文本丢进去,返回命中清单(小作文 / 升华 / 讨好 / 翻译腔 / AI 词句式)与改法;mode: "rewrite" 再给一版规则替换后的文本。
  3. 面板「腔调记录」:读 tone-log.json,显示最近 15 条——哪些被拦下、哪些真发出去了。数据由接入方调 /check、/note 写进来;没人接就是空列表(不会报错)。

规则移植自 deai-flavor 的分级思路(硬伤 3 分、句式 2 分、抽象词 1 分,按每百字归一),词表与句式按中文口语重写。

怎么生效

  1. 把本目录放进 <Coopanion 数据目录>\extensions\node_modules\cortico-world-deai
  2. config.json 里设 { "worlds": { "deai": { "enabled": true } } }
  3. 重启 Coopanion(扩展只在进程启动时装载,不重启不会出现)
  4. 打开 WebUI → World → 去 AI 味,应该看到:
    • 「检查服务:运行中 → http://127.0.0.1:18770」
    • 「腔调记录」(空的)
    • 「该拦没拦」的扫描按钮

此时还不会拦任何话。 想让它真拦,需要在那个 World 发送前调用检查服务——见仓库根目录的 docs/接入指南.md(含可复制的示例和给 AI 的提示词)。

改了 src/ENV_PROMPT.md 不用重启:下一轮前缀重建就生效(也能在 WebUI 的 World 页里直接编辑)。改了 src/deai.ts 或 src/server.ts 要重启。

安装

extensions\node_modules\ 下直接放目录即可。有的 pnpm 布局需要做链接,命令按实际路径写:

cmd /c mklink /J "<...>\extensions\node_modules\cortico-world-deai" "<...>\extensions\cortico-world-deai"

改规则

  • 说话规则:src/ENV_PROMPT.md,下一轮前缀重建就生效(也能在 WebUI 的 World 页里编辑)。
  • 词表与句式:src/deai.ts 的 HARD_WORDS / SOFT_WORDS / PATTERNS,重启进程生效。
  • 检查服务端口:src/server.ts 的 DEFAULT_PORT(默认 18770,被占会自动往后找 20 个),或环境变量 COOPANION_TONE_PORT。

日志路径

按下面顺序取第一个可用的:

  1. 环境变量 COOPANION_TONE_LOG
  2. <用户目录>/Coopanion/data/home/companion/data/tone-log.json

只留最近 15 条,满了从最老的丢。