You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
release: add CI workflow, Makefile, README, and bump opencode-slack-plugin to v0.1.1
- Add GitHub Actions workflow for automated npm publish via OIDC trusted publishing
- Add Makefile with build, typecheck, publish, and release targets
- Add repo-level README with plugin list, quick start, and release instructions
- Update AGENTS.md with release process documentation
- Rename package to @kubeopencode/opencode-slack-plugin
- Bump version to 0.1.1
Signed-off-by: xuezhaojun <xuezhaokeepgoing@gmail.com>
To target a specific plugin (when multiple plugins exist):
215
+
202
216
```bash
203
-
cd opencode-slack-plugin
204
-
npm install
205
-
npm run typecheck # tsc --noEmit
206
-
npm run build # tsup -> dist/
217
+
make build PLUGIN_DIR=opencode-slack-plugin
207
218
```
208
219
209
220
### Testing Locally
@@ -233,13 +244,65 @@ metadata:
233
244
name: my-agent
234
245
spec:
235
246
plugins:
236
-
- name: "opencode-slack-plugin"
247
+
- name: "@kubeopencode/opencode-slack-plugin"
237
248
credentials:
238
249
- secretRef:
239
250
name: slack-credentials
240
251
# ...
241
252
```
242
253
254
+
## Release Process
255
+
256
+
Releases are automated via GitHub Actions using **npm OIDC Trusted Publishing**. No npm tokens or secrets are required — authentication uses short-lived OIDC credentials tied to the specific workflow.
257
+
258
+
### How to release a plugin
259
+
260
+
1.**Bump the version** in the plugin's `package.json`:
3. Ensure the `release` environment exists in the GitHub repo settings
301
+
302
+
### npm package naming
303
+
304
+
All plugins are published under the `@kubeopencode` npm scope (e.g. `@kubeopencode/opencode-slack-plugin`). The `package.json``name` field must use this scoped format.
First-party plugins for [KubeOpenCode](https://github.com/kubeopencode/kubeopencode) — a Kubernetes-native AI Agent Platform built on [OpenCode](https://opencode.ai).
4
+
5
+
Each plugin is an independent npm package published under the `@kubeopencode` scope. Plugins follow the [OpenCode plugin API](https://opencode.ai/docs) and can be installed into any KubeOpenCode Agent via `spec.plugins`.
6
+
7
+
## Plugins
8
+
9
+
| Plugin | npm | Description |
10
+
|--------|-----|-------------|
11
+
|[opencode-slack-plugin](./opencode-slack-plugin/)|[`@kubeopencode/opencode-slack-plugin`](https://www.npmjs.com/package/@kubeopencode/opencode-slack-plugin)| Slack Socket Mode integration — chat with your Agent from Slack threads |
12
+
13
+
## Quick Start
14
+
15
+
### Install in KubeOpenCode
16
+
17
+
Declare the plugin in your Agent spec:
18
+
19
+
```yaml
20
+
apiVersion: kubeopencode.io/v1alpha1
21
+
kind: Agent
22
+
metadata:
23
+
name: my-agent
24
+
spec:
25
+
plugins:
26
+
- name: "@kubeopencode/opencode-slack-plugin"
27
+
target: server
28
+
credentials:
29
+
- secretRef:
30
+
name: slack-credentials
31
+
```
32
+
33
+
### Install in standalone OpenCode
34
+
35
+
Add to your `opencode.json`:
36
+
37
+
```json
38
+
{
39
+
"plugin": ["@kubeopencode/opencode-slack-plugin"]
40
+
}
41
+
```
42
+
43
+
## Development
44
+
45
+
### Prerequisites
46
+
47
+
- Node.js >= 22
48
+
- npm
49
+
50
+
### Build
51
+
52
+
```bash
53
+
make install # install dependencies
54
+
make typecheck # type-check (tsc --noEmit)
55
+
make build # build (tsup -> dist/)
56
+
```
57
+
58
+
### Build a specific plugin
59
+
60
+
```bash
61
+
make build PLUGIN_DIR=opencode-slack-plugin
62
+
```
63
+
64
+
## Release
65
+
66
+
Releases are automated via GitHub Actions using [npm OIDC Trusted Publishing](https://docs.npmjs.com/trusted-publishers/) — no npm tokens required.
67
+
68
+
### Publishing a new version
69
+
70
+
1. Update the version in the plugin's `package.json`:
make release # or: make release PLUGIN_DIR=opencode-slack-plugin
89
+
```
90
+
91
+
This creates a git tag `opencode-slack-plugin/v0.1.1` and pushes it. GitHub Actions will automatically build, verify, and publish to npm with provenance.
92
+
93
+
### Tag format
94
+
95
+
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.
96
+
97
+
### First-time setup for a new plugin
98
+
99
+
OIDC Trusted Publishing requires the package to already exist on npm. For a brand-new plugin:
100
+
101
+
1. Publish the first version manually:
102
+
103
+
```bash
104
+
npm login
105
+
make publish PLUGIN_DIR=my-new-plugin
106
+
```
107
+
108
+
2. Configure Trusted Publisher on [npmjs.com](https://www.npmjs.com):
109
+
- Go to the package settings > Trusted Publisher
110
+
- Owner: `kubeopencode`
111
+
- Repository: `kubeopencode-plugins`
112
+
- Workflow: `publish.yaml`
113
+
- Environment: `release`
114
+
115
+
3. Create a `release` environment in GitHub repo settings (if not already done).
116
+
117
+
After this one-time setup, all subsequent releases are fully automated.
118
+
119
+
## Repository Structure
120
+
121
+
```
122
+
kubeopencode-plugins/
123
+
README.md # This file
124
+
AGENTS.md # AI agent development guidelines
125
+
Makefile # Build and release targets
126
+
.github/workflows/publish.yaml # CI: automated npm publish on tag
127
+
opencode-slack-plugin/ # Slack Socket Mode plugin
128
+
src/index.ts
129
+
package.json
130
+
tsconfig.json
131
+
dist/
132
+
README.md
133
+
```
134
+
135
+
## Contributing
136
+
137
+
1. Each plugin lives in its own directory at the repo root
138
+
2. Use TypeScript with ESM (`"type": "module"`)
139
+
3. Use `@opencode-ai/plugin` as a peer dependency
140
+
4. See [AGENTS.md](./AGENTS.md) for detailed plugin architecture and conventions
0 commit comments