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

opencode-investment-team

v0.1.2

Published

Standalone, policy-constrained investment workflow plugin for OpenCode

Readme

OpenCode Investment Team

English

一个面向 Thesis-to-First-Meeting(投资主题到首次会谈) 工作流的独立 OpenCode 插件。MVP 提供类型化工作流记录、本地 SQLite 持久化、证据原文留存、受策略约束的模型路由、投资分析 Agent、人工决策门禁,以及确定性生成的 Markdown 简报。

本插件不会自动执行投资审批、对外联络、定价、外部写入或不透明评分。

环境要求

  • Bun 1.3+
  • OpenCode 1.18.23+(用于解析 npm server 插件)

npm 安装

如需直接使用库 API,建议安装精确版本:

npm install --save-exact [email protected]

在 OpenCode 中,将一个 npm 包规格加入 opencode.json 的 plugin 数组:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["[email protected]"]
}

OpenCode 1.18.23+ 支持以下写法:

| 规格 | 含义 | |---|---| | opencode-investment-team | 不带版本的包名 | | [email protected] | 精确版本 | | opencode-investment-team@^0.1.2 | 兼容版本范围 |

为保证环境可复现,推荐精确固定 0.1.2。OpenCode 会按配置中的包规格缓存已解析的 npm 插件;使用不变的包名、精确版本或范围并重启,不会强制重新查询 registry。可靠更新方式是把配置改为目标新版本(例如从 @0.1.1 改为 @0.1.2),然后退出并重启 OpenCode。

源码安装与验证

bun install
bun run check

隔离启动模式

先构建,再启动新的 OpenCode 进程:

bun run build
bun run src/cli.ts investment /path/to/workspace
bun run src/cli.ts omo /path/to/workspace
bun run src/cli.ts plain /path/to/workspace

每次调用都会创建一个新的 OpenCode 进程,并分别设置 OPENCODE_CONFIG 和隔离的 XDG_CONFIG_HOME。启动器会移除继承的 OPENCODE_CONFIG_CONTENT 与 OPENCODE_CONFIG_DIR,同时在该进程中禁用项目配置继承和默认插件。

| 模式 | 加载的插件 | |---|---| | investment | 仅加载本插件 | | omo | 仅加载 oh-my-openagent | | plain | 不加载插件 |

如果合并后的配置中含有 OMO 插件,Investment 插件会拒绝启动。因此,切换模式需要先退出当前会话,再重新运行对应启动命令。

状态存储

数据库和启动器生成的配置默认保存在:

${INVESTMENT_TEAM_HOME:-~/.local/share/investment-team}

本项目不保存凭证。模型供应商密钥继续由运营方通过环境变量管理。

工作流工具

  • investment_create_thesis
  • investment_create_fund_mandate
  • investment_create_company
  • investment_create_signal
  • investment_create_person
  • investment_create_meeting
  • investment_create_action
  • investment_create_feedback
  • investment_capture_evidence
  • investment_record_decision
  • investment_export_markdown
  • investment_prepare_first_meeting

首次会谈材料包使用明确的 Thesis ID 和 Company ID,只包含与该组合关联、且时间不晚于指定 asOf 时间戳的记录。最多展示五个由用户提供的问题;不足的部分保留明确占位符,不自动生成分析内容。

决策结果仅支持 Advance、Kill、Watch 和 Refer。拟议决策必须附带证据;批准或拒绝还必须同时具备结构化人工回执,以及决策工具发起的 OpenCode 权限确认。

模型路由

模型注册表将模型家族与供应商端点分离。端点的信任和部署元数据独立于数据分类准入规则。模型还带有供应商、版本、开放性、许可证审核和运营方解析状态等元数据。

候选模型必须同时满足以下条件:

  • 具备全部所需能力;
  • 符合数据分类要求;
  • 端点和模型均可用且处于生产状态;
  • 不属于试用端点或试用模型;
  • 模型版本已由运营方解析确认;
  • 许可证审核状态为已批准;
  • 处理 L2 数据时,端点已进入 L2 白名单。

L3 数据会在选择任何模型前直接拒绝路由。作者与独立审查者还必须使用不同的模型家族和不同的端点。

参考 examples/routing.example.json。在运营方完成合同、安全、可用性和生产状态核验前,示例中的所有候选模型均保持禁用;该文件不构成对任何供应商的保证。

Agent 模型配置

每个 Agent 都有按能力划分的模型池。运营方可以为 Agent 指定具体的宿主模型:

export INVESTMENT_AGENT_MODELS_JSON='{"orchestrator":"provider/org/model","independent-critic":"provider/critic-model"}'

键必须是已知的 Agent ID;值必须采用 provider/model,或 provider/org/model 等嵌套标识格式。未显式配置的 Agent 继承宿主默认模型。

插件只负责校验映射并将其应用到 Agent 配置,不会自行创建子会话或发起模型调用。

每条持久化工作流记录都带有数据分类。首次会谈材料包会根据全部纳入记录计算最高有效分类,因此高分类证据不会被低分类 Thesis 或调用方输入降级。

QCC 证据纪律

QCC 输出属于确定性的来源证据。必须保存完整原始输出,并将所有重要返回值以精确字符串形式留存。实现会对原文载荷计算哈希,但不会解析、重新计算或缩位展示持股比例、财务比率、风险计数或所有权数值。

相关文档

修改插件或启动器配置后,请退出并重启 OpenCode;配置只在进程启动时加载一次。