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

@c4a/extract-go

v0.6.17

Published

Go extraction plugin and structural index for Context

Readme

Context Go 结构提取

English

@c4a/extract-go 为 Context 知识项目提供确定性的 Go 结构事实。它提取声明、签名、 源码文档、导入、调用关系和常见 HTTP 路由注册,但不赋予产品专属含义。

这是可选结构包。Context 运行时不会内置它,也不会自动增加 Go 生命周期阶段。知识 项目通过自己的 extractCustom() Adapter 显式使用,把结构事实映射成项目候选; 审核、证据、新鲜度、close 和构建继续由标准 Context 工作流负责。

在知识生产链中的位置

已确认的 Go 仓库边界
          ↓
Go 结构索引
          ↓
项目自有 extractCustom() 映射
          ↓
Context 候选 → 审核 → 正式知识

公开 API

import { GoPlugin, indexGoRepository, indexGoSource } from "@c4a/extract-go";
  • GoPlugin 实现标准 @c4a/extract 插件协议;
  • indexGoSource() 解析一个源码单元,供 Adapter 在生成候选前读取细粒度事实;
  • indexGoRepository() 索引仓库树,并通过确定性参数控制 include root、测试文件、 生成文件和排除目录。

输出始终由代码事实支撑。package 命名、业务分类、知识路径、候选摘要和审核决定属于 知识项目及其 Agent 工作流。

适用场景

当 Context 工作区需要 Go 符号或关系,并且项目能够说明这些结构应该如何转化为知识 时使用本包。不要仅为了省去项目映射就添加通用 Go phase:语言解析器无法知道目标 读者、产品边界或有价值的知识形态。

开发

bun run --filter @c4a/extract-go build
bun run --filter @c4a/extract-go typecheck
bun run --filter @c4a/extract-go test
bun run --filter @c4a/extract-go lint