Skip to content

About

AiCode 官方插件 monorepo:每个子目录一个插件,独立打包、发布与安装

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AiCode Plugins

AiCode 官方插件 monorepo。每个一级子目录是一个独立插件,插件仍按自己的 id 和版本单独打包、发布与安装。

本仓库不接受外部代码提交或 Pull Request(PR)。

插件目录

  • backup-helper:Backup Helper(备份扩展示例)
  • cpa-gateway:CPA Gateway
  • desktop-pet:Desktop Pet
  • github:GitHub(PR / Issue / Actions 面板,基于容器内 gh CLI)
  • kilo-gateway:Kilo Gateway(接入 ai-gateway.kilo.ai,自动注册免费模型)
  • lm-fingerprint:LLM Fingerprint Detector(模型指纹检测,用已配置供应商采样整数,本地比对 lmfpd 参考库)
  • magpie-gateway:Magpie Gateway(在容器内运行 magpie 网关)
  • newapi-gateway:New API Gateway(在容器内运行 New API 网关)
  • plugin-guide:Plugin Dev & Release Guide(插件开发与发布指南,纯技能插件)
  • remote-ports:Remote Ports
  • vue-language:Vue Language(Vue 单文件组件语法高亮,纯声明式语言包)

开发与发布指南插件

plugin-guide 贡献两个技能,安装后「设置 → 技能」里出现 jieapi.plugin-guide:plugin-dev 与 jieapi.plugin-guide:plugin-release(插件贡献的技能名统一是「插件 id:技能 id」):

  • plugin-dev:从零写插件——能力选型、仓库结构、plugin.json 字段、技能/子代理格式、SDK handler、页面槽位、Hook,以及开发者侧载调试的验证顺序与排查。
  • plugin-release:打包(包根、进包规则、大小限制)、在自己仓库发 Release(资产名 {id}_{version}.zip 的铁律)、给 AiCode-Plugins-Store 的 index.json 提 PR 上架、升级与回滚。

两个技能都是面向插件作者的通用流程,不依赖任何特定仓库的做法。

它同时是一份最小可用的纯技能插件样例:没有 runtime,也没有 package.json,只有一个 plugin.json 加 skills/<id>/SKILL.md,打包命令与其他插件完全一致。

构建

各插件保留自己的 package.json、锁文件和构建脚本。首次使用时分别安装依赖:

npm ci --prefix cpa-gateway
npm ci --prefix desktop-pet
npm ci --prefix lm-fingerprint
npm ci --prefix remote-ports

构建全部正式插件:

npm run build

只构建一个插件:

npm run build -- cpa-gateway

类型检查

npm run typecheck

打包

包名统一为 {id}_{version}.zip,可按目录名或插件 ID 指定插件:

npm run package
npm run package -- jieapi.cpa-gateway

产物写入 .artifacts/。压缩包根目录直接包含 plugin.json,页面、图标、工具 schema 和运行时入口按清单引用自动收集。

发布插件 Release

每个插件独立发布。发布版本前,先修改对应插件的 plugin.json,令 version 使用不带 v 前缀的 SemVer,例如 1.0.1。

发布前在插件目录写 RELEASE_NOTES.md,工作流会把它作为 GitHub Release 正文;App 的插件更新日志直接展示这段 Markdown。没有该文件时回退为 Release {id} {version}。

本地发布前检查:

plugin=remote-ports
npm ci --prefix "$plugin"
npm --prefix "$plugin" run typecheck
npm --prefix "$plugin" run build
npm run package -- "$plugin"
id=$(node -p "require('./$plugin/plugin.json').id")
version=$(node -p "require('./$plugin/plugin.json').version")
unzip -tq ".artifacts/${id}_${version}.zip"

确认检查和构建通过后,提交并推送 plugin.json、源码和锁文件,然后创建与插件版本一致的 tag。tag 格式为:

plugin/<插件目录>/<版本>

例如发布 remote-ports 1.0.1:

git add remote-ports/plugin.json remote-ports/package.json remote-ports/package-lock.json remote-ports/src
git commit -m "release(remote-ports): 1.0.1"
git push origin main
git tag plugin/remote-ports/1.0.1
git push origin plugin/remote-ports/1.0.1

推送 tag 后,.github/workflows/release.yml 会自动执行:

  1. 从 tag 解析插件目录和版本,并校验 tag 版本与 plugin.json 一致;
  2. 执行该插件的 npm ci、类型检查和构建;
  3. 生成 .artifacts/{id}_{version}.zip;
  4. 创建同名 GitHub Release,正文取自插件目录的 RELEASE_NOTES.md,并上传 ZIP 资产。

GitHub Actions 也支持手动运行 Release plugin 工作流。输入插件目录名或插件 ID 后,工作流会执行检查、构建和打包,并上传 Actions artifact;手动运行不会自动创建 GitHub Release,正式发布应使用上述 tag 流程。

发布完成后,在 jieapi/AiCode-Plugins-Store 的 index.json 中更新对应插件的 version。repository 填写 https://github.com/jieapi/aicode-plugins,版本必须与 plugin.json 和 Release 资产名 {id}_{version}.zip 一致。多个插件可以共用这个仓库,但每个插件必须发布独立的 ZIP 资产。

About

AiCode 官方插件 monorepo:每个子目录一个插件,独立打包、发布与安装

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages