Skip to content

Commit a3156fe

Browse files
authored
chore: release 1.3.0 (#138)
- fix(codex): 修正 Codex 安装流程 — marketplace 制(README 命令错误修复) - feat(codex): 新增 .agents/plugins/marketplace.json 仓库级 marketplace(npm 源) - test(codex): marketplace.json 结构/版本/policy 校验测试 - 同步 .codex-plugin/plugin.json 版本 1.2.0 → 1.3.0
1 parent ab421f2 commit a3156fe

5 files changed

Lines changed: 70 additions & 9 deletions

File tree

.agents/plugins/marketplace.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "cabbage",
3+
"interface": {
4+
"displayName": "OpenCode Cabbage"
5+
},
6+
"plugins": [
7+
{
8+
"name": "opencode-cabbage",
9+
"source": {
10+
"source": "npm",
11+
"package": "@devcxl/opencode-cabbage",
12+
"version": "^1.3.0",
13+
"registry": "https://registry.npmjs.org"
14+
},
15+
"policy": {
16+
"installation": "AVAILABLE",
17+
"authentication": "ON_INSTALL"
18+
},
19+
"category": "Developer Tools"
20+
}
21+
]
22+
}

.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opencode-cabbage",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "全流程开发编排插件 — 需求→设计→任务→编码→测试→审查→自动合并,支持 OpenCode 与 Codex 双平台",
55
"author": {
66
"name": "devcxl",

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,24 @@ Once started, the plugin automatically injects 7 slash commands, 9 flow skills,
2929

3030
This package also ships a Codex plugin compatibility layer (`codex-skills/` + `hooks/` + `.codex-plugin/`) so the flow skills and agent prompts work in Codex as well.
3131

32+
The repository is a Codex marketplace: add it as a marketplace source, then install the plugin from it.
33+
3234
```bash
33-
# 1. Install the package (npm registry or git)
34-
npm install @devcxl/opencode-cabbage
35+
# 1. Add this repository as a Codex marketplace
36+
codex plugin marketplace add devcxl/opencode-cabbage
3537

36-
# 2. Build first — the SessionStart hook runs from dist/
37-
npm run build
38+
# 2. Confirm the plugin is available
39+
codex plugin list --available
3840

39-
# 3. Install the plugin into Codex
40-
codex plugins install @devcxl/opencode-cabbage
41+
# 3. Install the plugin (pulled from the npm package, which bundles all Codex files)
42+
codex plugin add opencode-cabbage@cabbage
4143
```
4244

4345
Notes:
4446

45-
- **Build before use**: the SessionStart hook executes `dist/hooks/session-start.js`, which only exists after `npm run build`.
47+
- **Build artifact included**: the SessionStart hook (`dist/hooks/session-start.js`) ships inside the published npm package — no local build required.
4648
- **Hook trust review**: Codex requires interactive trust approval for hooks (`/hooks` command) on first run — approve the `SessionStart` hook to enable context injection.
49+
- **Marketplace name**: the marketplace is named `cabbage` (see `.agents/plugins/marketplace.json`); use `opencode-cabbage@cabbage` as the plugin selector.
4750
- **Platform differences**: the Codex layer is a pure-Prompt downgrade — no `goal` tool, no slash commands, no automatic continuation. Agents are plain skills (referenced as `@agent-*`), and flow state is tracked via GitHub Issue checklists. See `codex-skills/agent-dev-lifecycle/SKILL.md` for details.
4851

4952
## Command Overview

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devcxl/opencode-cabbage",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "OpenCode 全流程开发插件 — 需求→设计→任务→编码→测试→审查→自动合并,支持自动编排与并行 Subagent",
55
"repository": {
66
"type": "git",

test/plugin/codex-compat.test.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,39 @@ describe("codex skills drift vs assets", () => {
156156
}
157157
})
158158
})
159+
160+
describe("codex marketplace (.agents/plugins/marketplace.json)", () => {
161+
const marketplace = readJson(".agents/plugins/marketplace.json") as {
162+
name: string
163+
interface: Record<string, unknown>
164+
plugins: Array<Record<string, unknown>>
165+
}
166+
const pkg = readJson("package.json")
167+
const entry = marketplace.plugins[0]
168+
169+
it("is valid JSON with name, interface and plugins entries", () => {
170+
expect(typeof marketplace.name).toBe("string")
171+
expect(marketplace.interface).toBeTruthy()
172+
expect(Array.isArray(marketplace.plugins)).toBe(true)
173+
})
174+
175+
it("plugin entry matches manifest name and has required policy fields", () => {
176+
expect(entry).toBeTruthy()
177+
expect(entry.name).toBe("opencode-cabbage")
178+
const policy = entry.policy as Record<string, unknown>
179+
expect(policy.installation).toBe("AVAILABLE")
180+
expect(policy.authentication).toBe("ON_INSTALL")
181+
})
182+
183+
it("source points to this npm package with a valid version range", () => {
184+
const source = entry.source as Record<string, unknown>
185+
expect(source.source).toBe("npm")
186+
expect(source.package).toBe(pkg.name)
187+
expect(String(source.version)).toMatch(/^\^\d+\.\d+\.\d+$/)
188+
expect(pkg.version).toMatch(new RegExp(`^${String(source.version).replace("^", "").replace(/(\d+)\.(\d+)\.\d+/, "$1.$2.")}`))
189+
})
190+
191+
it("uses a valid category from the official enum", () => {
192+
expect(["Developer Tools", "Productivity", "Utilities", "Data & Analytics"]).toContain(entry.category)
193+
})
194+
})

0 commit comments

Comments
 (0)