@opencow-ai/opencow-agent-sdk 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,7 @@ OpenCow Agent SDK is an open-source coding agent toolkit with two entrypoints:
8
8
  Use one workflow across OpenAI-compatible APIs, Gemini, GitHub Models, Codex, Ollama, Atomic Chat, and other supported backends, with tools, agents, MCP, and streaming responses.
9
9
 
10
10
  [![PR Checks](https://github.com/OpenCowAI/opencow-agent-sdk/actions/workflows/pr-checks.yml/badge.svg?branch=main)](https://github.com/OpenCowAI/opencow-agent-sdk/actions/workflows/pr-checks.yml)
11
+ [![Publish to npm](https://github.com/OpenCowAI/opencow-agent-sdk/actions/workflows/release.yml/badge.svg)](https://github.com/OpenCowAI/opencow-agent-sdk/actions/workflows/release.yml)
11
12
  [![Release](https://img.shields.io/github/v/tag/OpenCowAI/opencow-agent-sdk?label=release&color=0ea5e9)](https://github.com/OpenCowAI/opencow-agent-sdk/tags)
12
13
  [![Discussions](https://img.shields.io/badge/discussions-open-7c3aed)](https://github.com/OpenCowAI/opencow-agent-sdk/discussions)
13
14
  [![Security Policy](https://img.shields.io/badge/security-policy-0f766e)](SECURITY.md)
@@ -27,6 +28,7 @@ Use one workflow across OpenAI-compatible APIs, Gemini, GitHub Models, Codex, Ol
27
28
  - [Setup Guides](#setup-guides)
28
29
  - [Build From Source](#build-from-source)
29
30
  - [Testing and Validation](#testing-and-validation)
31
+ - [Release Process](#release-process)
30
32
  - [Repository Structure](#repository-structure)
31
33
  - [VS Code Extension](#vs-code-extension)
32
34
  - [Contributing](#contributing)
@@ -313,6 +315,76 @@ Additional checks:
313
315
  - `bun run security:pr-scan -- --base origin/main`
314
316
  - focused `bun test path/to/file.test.ts`
315
317
 
318
+ ## Release Process
319
+
320
+ Releases are split between local preparation and a CI-driven publish step. Pushing a `v*` tag triggers `.github/workflows/release.yml`, which publishes to npm and creates a GitHub Release.
321
+
322
+ ### Cut a new version
323
+
324
+ The interactive flow drafts user-facing release notes, writes them to `CHANGELOG.md`, then hands off to the local prepare script:
325
+
326
+ ```
327
+ /yg.release patch # 0.4.0 → 0.4.1 (also accepts: minor | major | <x.y.z>)
328
+ ```
329
+
330
+ The slash command is defined at `.claude/commands/yg.release.md` and runs inside Claude Code. If you prefer to skip the notes-drafting step and bump directly, call the prepare script:
331
+
332
+ ```bash
333
+ bun run release:patch # or release:minor / release:major
334
+ bun run release:dry # full-pipeline preview, no file writes, no push
335
+ bun run release -- --version 0.5.0-rc.1 # explicit version (prerelease → next dist-tag)
336
+ ```
337
+
338
+ `bun run release` runs preflight checks, bumps `package.json`, renames `## [Unreleased]` in `CHANGELOG.md` to `## [X.Y.Z] — YYYY-MM-DD`, typechecks, builds, smoke-tests, commits, tags, and pushes. After the tag push, CI takes over:
339
+
340
+ 1. verifies the tag matches `package.json`
341
+ 2. installs, typechecks, builds, smoke-tests
342
+ 3. publishes the main package via `scripts/publish.ts`
343
+ 4. creates a GitHub Release with the matching `CHANGELOG.md` section as body
344
+
345
+ The dist-tag is inferred from semver — versions containing `-` (e.g. `0.5.0-rc.1`) publish to `next`, everything else to `latest`.
346
+
347
+ ### Ripgrep subpackages
348
+
349
+ The 8 platform-specific `@opencow-ai/ripgrep-*` packages are published independently and only when the underlying `rg` binary changes. Most main-package releases do not touch them — the main package's `optionalDependencies` keeps pointing at the last published ripgrep version, and CI skips the subpackage publish step automatically.
350
+
351
+ When you do update the ripgrep binary across all 8 `packages/ripgrep-*` directories:
352
+
353
+ ```bash
354
+ bun run release:ripgrep -- --bump patch
355
+ ```
356
+
357
+ This runs locally (no CI), publishes all 8 subpackages, updates the main package's `optionalDependencies`, and commits — but does not create a tag. The next regular `/yg.release` will pick up the new ripgrep version automatically.
358
+
359
+ ### CI prerequisites
360
+
361
+ The publish workflow uses [npm Trusted Publishers](https://docs.npmjs.com/trusted-publishers) (OIDC). No long-lived `NPM_TOKEN` is needed.
362
+
363
+ Setup is per-package on npmjs.com. For each of the 9 packages below, open the package's npmjs.com page → **Settings → Trusted Publishers → Add → GitHub Actions** and fill in:
364
+
365
+ - **Organization or user**: `OpenCowAI`
366
+ - **Repository**: `opencow-agent-sdk`
367
+ - **Workflow filename**: `release.yml`
368
+ - **Environment name**: leave blank
369
+
370
+ Packages to configure:
371
+
372
+ ```
373
+ @opencow-ai/opencow-agent-sdk
374
+ @opencow-ai/ripgrep-darwin-arm64
375
+ @opencow-ai/ripgrep-darwin-x64
376
+ @opencow-ai/ripgrep-linux-arm64
377
+ @opencow-ai/ripgrep-linux-x64
378
+ @opencow-ai/ripgrep-linux-arm
379
+ @opencow-ai/ripgrep-win32-arm64
380
+ @opencow-ai/ripgrep-win32-x64
381
+ @opencow-ai/ripgrep-win32-ia32
382
+ ```
383
+
384
+ npm does not validate Trusted Publisher config when saved — errors only surface at publish time. Test with a prerelease (`bun run release -- --version 0.x.y-rc.0`) before cutting a real release. The workflow already pins `permissions: id-token: write` and upgrades npm to the latest version (Trusted Publishers requires npm ≥ 11.5.1).
385
+
386
+ Design and implementation notes live in `docs/superpowers/specs/2026-05-18-release-pipeline-design.md`.
387
+
316
388
  ## Repository Structure
317
389
 
318
390
  - `src/` - core CLI/runtime and SDK entrypoints