@kubeopencode/opencode-slack-pluginOpenCode plugin that connects to Slack via Socket Mode — zero port exposure, runs inside your OpenCode process
0
44
近 7 天 10
24.9
生态多维模型
3 个月前
2026-05-10
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@kubeopencode/opencode-slack-plugin@0.1.7"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@kubeopencode/opencode-slack-plugin@0.1.7"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @kubeopencode/opencode-slack-pluginopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
First-party plugins for KubeOpenCode — a Kubernetes-native AI Agent Platform built on OpenCode.
Each plugin is an independent npm package published under the @kubeopencode scope. Plugins follow the OpenCode plugin API and can be installed into any KubeOpenCode Agent via spec.plugins.
Plugins
| Plugin | npm | Description |
|---|---|---|
| opencode-slack-plugin | @kubeopencode/opencode-slack-plugin |
Slack Socket Mode integration — chat with your Agent from Slack threads |
Quick Start
Install in KubeOpenCode
Declare the plugin in your Agent spec:
apiVersion: kubeopencode.io/v1alpha1
kind: Agent
metadata:
name: my-agent
spec:
plugins:
- name: "@kubeopencode/opencode-slack-plugin"
target: server
credentials:
- secretRef:
name: slack-credentials
Install in standalone OpenCode
Add to your opencode.json:
{
"plugin": ["@kubeopencode/opencode-slack-plugin"]
}
Development
Prerequisites
- Node.js >= 22 (local development)
- Node.js >= 24 is used in CI for npm OIDC trusted publishing (npm 11.5.1+ required)
Build
make install # install dependencies
make typecheck # type-check (tsc --noEmit)
make build # build (tsup -> dist/)
Build a specific plugin
make build PLUGIN_DIR=opencode-slack-plugin
Release
Releases are automated via GitHub Actions using npm OIDC Trusted Publishing — no npm tokens required.
Publishing a new version
Update the version in the plugin's
package.json:cd opencode-slack-plugin npm version patch # or minor / majorCommit and push:
git add -A git commit -s -m "release: opencode-slack-plugin v0.1.1" git push origin mainTag and push to trigger CI:
make release # or: make release PLUGIN_DIR=opencode-slack-pluginThis creates a git tag
opencode-slack-plugin/v0.1.1and pushes it. GitHub Actions will automatically build, verify, and publish to npm with provenance.
Tag format
Tags follow the pattern <plugin-dir>/v<version>, e.g. opencode-slack-plugin/v0.1.0. This supports independent versioning when more plugins are added.
First-time setup for a new plugin
OIDC Trusted Publishing requires the package to already exist on npm. For a brand-new plugin:
Publish the first version manually:
npm login make publish PLUGIN_DIR=my-new-pluginConfigure Trusted Publisher on npmjs.com:
- Go to the package settings > Trusted Publisher
- Owner:
kubeopencode - Repository:
kubeopencode-plugins - Workflow:
publish.yaml - Environment:
release
Create a
releaseenvironment in GitHub repo settings (if not already done).
After this one-time setup, all subsequent releases are fully automated.
Repository Structure
kubeopencode-plugins/
README.md # This file
AGENTS.md # AI agent development guidelines
Makefile # Build and release targets
.github/workflows/publish.yaml # CI: automated npm publish on tag
opencode-slack-plugin/ # Slack Socket Mode plugin
src/index.ts
package.json
tsconfig.json
dist/
README.md
Contributing
- Each plugin lives in its own directory at the repo root
- Use TypeScript with ESM (
"type": "module") - Use
@opencode-ai/pluginas a peer dependency - See AGENTS.md for detailed plugin architecture and conventions
License
MIT