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

@gencode/agents

v0.6.1

Published

## 包定位

Downloads

3,158

Readme

@gencode/agents

包定位

@gencode/agents 是 agent 核心领域层。 它应成为 agent 执行流程、session 相关领域能力以及内部运行期事件的主要归属位置。

负责内容

这个包适合承载:

  • agent 执行流程
  • session 领域行为
  • memory / bootstrap / identity 相关领域能力
  • 内部运行期协调
  • 结构化内部事件产出
  • 不依赖外部传输层的 agent 核心抽象

不负责内容

这个包不应直接承担以下进程外通信职责:

  • stdout 渲染
  • HTTP callback 投递
  • websocket 传输投递
  • Web 服务侧逻辑
  • CLI 参数解析

这些职责属于 @gencode/cli 或更高层的集成包。

当前源码入口

阅读本包时,建议先看:

  • src/index.ts —— 主入口
  • src/types.ts —— 包内类型定义
  • src/build-config.test.ts —— 当前包级验证示例

dist/ 存在时,应将其视为构建产物,而不是主要编辑目标。 优先阅读源码与测试。

与其他包的关系

  • @gencode/cli 使用本包执行 agent 行为,并把内部事件适配为外部输出
  • @gencode/shared 应承载稳定的跨包协议,而不是在本包内重复定义
  • @gencode/web 不允许绕过 CLI 直接消费本包

开发说明

当你在这里增加新能力时:

  • 保持职责在领域侧,而不是传输侧
  • 优先返回显式接口与结构化输出
  • 不要把 callback / websocket 认知嵌入 agent 内核
  • 当一个对外结构开始被多个包复用时,应优先沉淀到 @gencode/shared

验证

在工作区根目录可运行:

pnpm -C source/packages/agents test

类型检查通常通过工作区命令统一运行:

pnpm -C source typecheck

相关规格文档

  • ../../../specs/system-overview.md
  • ../../../specs/architecture-boundaries.md
  • ../../../specs/development-workflow.md
  • ../../../specs/repo-map.md