Developer opens state-driven companion runtime as npm package
The project author open-sourced @yanisjiang/companion-core, a TypeScript runtime for adding state-driven companion behavior to existing applications. According to the author, traits and current state determine an intent, silence can bypass the LLM, and developers can connect the package to bots, game NPCs, desktop shells, or custom backends by supplying an LLM and storage. The repository’s Web/PWA implementation is presented as an optional example host rather than part of the core package.
The package separates conversational decision-making from host-specific UI, authentication, deployment, and push features, allowing developers to reuse the same companion logic across multiple application types.
先说结论
我开源的不是「只能打开某个聊天站才能用的陪伴」。
真正可复用的是 npm 包 @yanisjiang/companion-core:
-
性格 × 心情等状态 →
decide出意图 -
silence时不调模型 - 你把 LLM 和 存储 插进去,接到 Bot / 游戏 NPC / 桌面壳 / 自己的后端都行
- 仓库里的 Web/PWA,只是其中一个宿主示例(口令、页面、推送归宿主,不塞进内核)。
- 包:www.npmjs.com/package/@ya…
- 仓库:github.com/YanisJiang/…
npm i @yanisjiang/companion-core
痛点:聊天产品常把「决策」和「填字」糊在一起
很多 AI 聊天项目最后变成: