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.7.71

Published

Go extraction plugin and structural index for Context

Readme

Context Go 结构提取

English

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

这是 Code Indexer Provider 按需使用的可选结构包。Provider 把结构事实映射到 当前 Indexer Result;Candidate 状态、审核、新鲜度、close 和构建继续由 Context 负责。

在知识生产链中的位置

已确认的 Go 仓库边界
          ↓
Go 结构索引
          ↓
选中的 Code Indexer Provider
          ↓
Context 候选 → 审核 → 正式知识

公开 API

import {
  GoPlugin,
  goExtractionToEvidenceAdapterResult,
  indexGoRepository,
  indexGoSource,
} from "@c4a/extract-go";
  • GoPlugin 实现标准 @c4a/extract 插件协议;
  • GoPlugin 声明 ast-catalog capability,并为每个解析的 Go 文件返回显式 disposition;
  • goExtractionToEvidenceAdapterResult() 发布统一的 context.indexer.evidence-adapter-result/v1 线协议结果;
  • indexGoSource() 解析一个源码单元,供 Adapter 在生成候选前读取细粒度事实;
  • indexGoRepository() 索引仓库树,并通过确定性参数控制 include root、测试文件、 生成文件和排除目录。

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

适用场景

当 Code Indexer Provider 需要 Go 符号或关系时使用本包。语言解析器无法决定目标 读者、产品边界或有价值的知识形态,这些仍由 Provider 负责。

开发

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