Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bun run catalog:ci # entry used by the catalog-sync workflow

Entry points: `plugin.ts` owns all config-hook logic (dual default `{ id, setup }` plus `server`); `index.ts` re-exports the plugin plus the `createCommandCode` SDK factory; `src/entry.ts` is bundle glue for `scripts/build-plugin.ts` only — it produces `dist/plugin.js`.

CI (`.github/workflows/catalog-sync.yml`) opens a `fix(catalog)` PR every 6 hours when Command Code ships a new catalog; if extraction fails it opens a `catalog-break` issue instead. The PR auto-merges after **check (test)**, **check (typecheck)**, **check (lint)**, **check (format)**, and **check (pack)** are green. `.github/workflows/release.yml` then runs **semantic-release** (npm publish + GitHub Release + tag). Do not push to `main`.
CI (`.github/workflows/catalog-sync.yml`) opens a `fix(catalog)` PR every 6 hours when Command Code ships a new catalog; if extraction fails it opens a `catalog-break` issue instead. The PR auto-merges after **check (test)**, **check (typecheck)**, **check (lint)**, **check (format)**, and **check (pack)** are green. `.github/workflows/release.yml` then runs **semantic-release** (build + verified npm publish + GitHub Release + tag). Do not push to `main`.

The GitHub Actions secret name is `NPMJS`. It is mapped to both `NPM_TOKEN` and `NODE_AUTH_TOKEN`. Use an npm **Automation** token (bypasses 2FA). A login token from `~/.npmrc` fails CI with `EOTP`. Catalog PRs get a real CI run when `RELEASE_SYNC_TOKEN` is a PAT; `GITHUB_TOKEN` can open the PR but GitHub will not start workflows from that event.

Expand Down
2 changes: 1 addition & 1 deletion opencode.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://opencode.ai/config.json",
"model": "commandcode/deepseek-v4-flash",
"small_model": "commandcode/deepseek-v4-flash",
"plugin": ["@brainervirus/opencode-commandcode/server"],
"plugins": ["@brainervirus/opencode-commandcode"],
"provider": {
"commandcode": {
"npm": "@ai-sdk/openai-compatible",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"test:integration": "bun test tests/integration/",
"test:all": "bun test",
"typecheck": "tsc --noEmit",
"prepack": "bun run scripts/verify-manifest-version.ts",
"prepack": "bun run build && bun run scripts/verify-manifest-version.ts",
"verify:release-candidate": "bun run scripts/verify-release-candidate.ts",
"generate-readme": "bun run scripts/generate-readme.ts",
"sync": "bun run scripts/sync-models.ts",
Expand Down
1 change: 1 addition & 0 deletions scripts/analyze-release-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const PRODUCT_FILES = new Set([
"models.json",
"manifest.json",
"_version.txt",
"package.json",
]);

export function isProductPath(file: string): boolean {
Expand Down
9 changes: 8 additions & 1 deletion scripts/verify-release-candidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import { tmpdir } from "os";
import { join } from "path";

const ROOT = join(import.meta.dir, "..");
const REQUIRED = ["plugin.ts", "models.json", "manifest.json", "package.json", "src/catalog.ts"];
const REQUIRED = [
"dist/plugin.js",
"plugin.ts",
"models.json",
"manifest.json",
"package.json",
"src/catalog.ts",
];
const FORBIDDEN = ["tests/", "docs/", ".github/"];

const dir = mkdtempSync(join(tmpdir(), "cc-pack-"));
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/analyze-release-scope.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ describe("analyzeReleaseScope", () => {
}
});

test("package fixes yield a release", () => {
const r = repo();
r.tag("v0.6.0");
try {
r.commit("fix: package the built plugin", { "package.json": "{}\n" });
expect(analyzeReleaseScope(r.root)).toEqual({ level: "patch" });
} finally {
r.cleanup();
}
});

test("catalog file updates still release", () => {
const r = repo();
r.tag("v0.6.0");
Expand Down
Loading