Skip to content

Commit cbd4efa

Browse files
committed
release: v0.13.1
1 parent 0ff1f44 commit cbd4efa

27 files changed

Lines changed: 351 additions & 185 deletions

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,20 @@ jobs:
6565
cargo build --locked
6666
export PATH="$PWD/target/debug:$PATH"
6767
oy setup
68-
grep -F '"commands"' "$HOME/.config/opencode/opencode.json"
69-
python3 -c 'import json, pathlib; config=json.loads(pathlib.Path.home().joinpath(".config/opencode/opencode.json").read_text()); assert "command" not in config; assert "oy" not in config.get("mcp", {}).get("servers", {}); assert "tool_output" not in config'
68+
grep -F '"@oy-cli/opencode@0.13.1"' "$HOME/.config/opencode/opencode.json"
69+
python3 -c 'import json, pathlib; config=json.loads(pathlib.Path.home().joinpath(".config/opencode/opencode.json").read_text()); assert "command" not in config; assert "oy-audit" not in config.get("commands", {}); assert "oy" not in config.get("mcp", {}).get("servers", {}); assert "tool_output" not in config'
70+
# The release version does not exist in npm until the tag publishes it.
71+
# Load this checkout directly for the pre-publish runtime smoke instead.
72+
npm ci --prefix packages/opencode --ignore-scripts
73+
python3 - <<'PY'
74+
import json
75+
from pathlib import Path
76+
77+
path = Path.home() / ".config/opencode/opencode.json"
78+
config = json.loads(path.read_text())
79+
config["plugins"] = [str(Path("packages/opencode/src/index.js").resolve())]
80+
path.write_text(json.dumps(config, indent=2) + "\n")
81+
PY
7082
opencode2 service start
7183
# The first location-scoped query boots and caches project services.
7284
opencode2 api v2.agent.list --param "location[directory]=$PWD" > /dev/null

.github/workflows/release.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
publish-release:
6767
if: github.repository_owner == 'adonm'
68-
needs: release
68+
needs: [release, publish-npm]
6969
runs-on: ubuntu-latest
7070
permissions:
7171
contents: write
@@ -181,7 +181,7 @@ jobs:
181181
fi
182182
183183
publish-npm:
184-
if: github.repository_owner == 'adonm' && vars.NPM_PUBLISH_ENABLED == 'true'
184+
if: github.repository_owner == 'adonm'
185185
needs: release
186186
runs-on: ubuntu-latest
187187
environment: npm
@@ -214,4 +214,18 @@ jobs:
214214
npm run build
215215
npm test
216216
- name: Publish public package with npm trusted publishing
217-
run: npm publish --access public
217+
env:
218+
EXPECTED_SHA: ${{ github.sha }}
219+
run: |
220+
package=$(node -p 'require("./package.json").name')
221+
version=$(node -p 'require("./package.json").version')
222+
if npm view "$package@$version" version >/dev/null 2>&1; then
223+
published_sha=$(npm view "$package@$version" gitHead)
224+
if [ "$published_sha" != "$EXPECTED_SHA" ]; then
225+
echo "::error::$package@$version already exists from unexpected commit $published_sha"
226+
exit 1
227+
fi
228+
echo "::notice::$package@$version is already published from $published_sha; skipping"
229+
else
230+
npm publish --access public
231+
fi

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [0.13.1] - 2026-07-12
4+
5+
### Changed
6+
- Made `oy setup` package-first: it now pins the matching `@oy-cli/opencode` version and removes superseded direct agent, skill, and command files/configuration.
7+
- Updated the curl installer to start OpenCode after setup and verify that plugin ID `oy` loaded from the version-matched npm package.
8+
- Made npm trusted publishing mandatory for tagged releases, idempotent on workflow reruns, and a prerequisite for publishing the GitHub release.
9+
310
## [0.13.0] - 2026-07-12
411

512
### Added

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Keep `Cargo.lock` in sync with `Cargo.toml` after dependency changes.
4343
## Prompt And Agent Changes
4444

4545
Prompt quality is live-model behavior, not a deterministic unit-test problem.
46-
Before changing generated agents or skills, read `docs/evaluation.md` and use a
46+
Before changing packaged agents or skills, read `docs/evaluation.md` and use a
4747
pinned public-repository corpus when possible. Keep raw model outputs under
4848
`.tmp/eval/`; do not commit generated `ISSUES.md`, `REVIEW.md`, or SARIF files
4949
from local runs.
@@ -58,7 +58,7 @@ python3 scripts/eval_runner.py run --dry-run
5858
## Design Rules
5959

6060
- Do not add a native LLM client, provider router, transcript store, or chat UI back to `oy`.
61-
- Keep the three generated skills canonical for audit, review, and enhance protocols. They execute under the user's OpenCode permissions through the single `oy` agent.
61+
- Keep the three packaged skills canonical for audit, review, and enhance protocols. They execute under the user's OpenCode permissions through the single `oy` agent.
6262
- Keep `oy` concise but compare it with tagged OpenCode 2 Build behavior: inspect first, preserve unrelated changes, implement end-to-end, verify, and avoid destructive or unrequested Git operations.
6363
- Do not add oy-owned plan/edit/auto permission modes. OpenCode policy is authoritative.
6464
- Put immutable workflow-input, ordering, limit, and render enforcement in typed Rust boundaries rather than relying on prompt text.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oy-cli"
3-
version = "0.13.0"
3+
version = "0.13.1"
44
edition = "2024"
55
rust-version = "1.96"
66
description = "Autonomous OpenCode agent and deterministic repository audit and review workflows"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The **inputs, ordering, limits, and report rendering** are deterministic. Model
2121

2222
## Quick start
2323

24-
Requirements: OpenCode 2 with a configured provider, plus `git` for diff reviews. oy 0.13.0 no longer supports OpenCode 1.
24+
Requirements: OpenCode 2 with a configured provider, plus `git` for diff reviews. oy 0.13.1 no longer supports OpenCode 1.
2525

2626
```bash
2727
curl -fsSL https://oy.adonm.dev/install.sh | sh
@@ -30,12 +30,12 @@ oy doctor
3030
oy audit
3131
```
3232

33-
The installer uses [`mise`](https://mise.jdx.dev/) to install pinned oy 0.13.0, `@opencode-ai/cli@0.0.0-next-15353`, `tokei`, and Universal Ctags. It verifies both primary versions, stops stale OpenCode services, prunes unreferenced old mise versions, and resets generated integration files before running `oy setup`. Set `OY_RESET_SETUP=0` to preserve the generated setup in place or `OY_SKIP_SETUP=1` to skip setup. Source-built Sighthound is opt-in with `OY_INSTALL_SIGHTHOUND=1`.
33+
The installer uses [`mise`](https://mise.jdx.dev/) to install pinned oy 0.13.1, `@opencode-ai/cli@0.0.0-next-15353`, `tokei`, and Universal Ctags. It verifies both primary versions, stops stale OpenCode services, prunes unreferenced old mise versions, and resets the integration before `oy setup` registers `@oy-cli/opencode@0.13.1`. OpenCode installs the package into its isolated cache and the installer verifies that plugin ID `oy` loaded. Set `OY_RESET_SETUP=0` to preserve the generated setup in place or `OY_SKIP_SETUP=1` to skip setup. Source-built Sighthound is opt-in with `OY_INSTALL_SIGHTHOUND=1`.
3434

3535
For a minimal manual install:
3636

3737
```bash
38-
mise use --global node@24 cargo-binstall cargo:oy-cli@0.13.0 npm:@opencode-ai/cli@0.0.0-next-15353
38+
mise use --global node@24 cargo-binstall cargo:oy-cli@0.13.1 npm:@opencode-ai/cli@0.0.0-next-15353
3939
oy setup
4040
oy doctor
4141
```
@@ -114,15 +114,15 @@ Sighthound remains optional and source-built. The install pins immutable commit
114114

115115
## Agent, package, and setup
116116

117-
The OpenCode V2 package lives at `packages/opencode` and publishes as `@oy-cli/opencode`. It registers one `oy` primary agent, the three canonical skills, and their slash commands without permission overrides. Add `"@oy-cli/opencode@0.13.0"` to OpenCode's `plugins` array after installing the `oy` binary.
117+
The OpenCode V2 package lives at `packages/opencode` and publishes as `@oy-cli/opencode`. It registers one `oy` primary agent, the three canonical skills, and their slash commands without permission overrides. `oy setup` pins the package version matching the binary in OpenCode's `plugins` array and removes superseded direct-file copies.
118118

119-
`oy setup` remains the direct-file installer: it writes the same agent and skills plus thin skill commands, but does not register MCP or change OpenCode's tool-output budget. Global setup uses `OPENCODE_CONFIG_DIR` when set, otherwise `~/.config/opencode/`; workspace setup uses `.opencode/`. Use `--dry-run` to preview or `--remove` to remove generated files and owned config entries.
119+
`oy setup` is package-first: it adds the exact `@oy-cli/opencode` version matching the binary and removes exact legacy agent, skill, command, MCP, and output-budget entries. Global setup uses `OPENCODE_CONFIG_DIR` when set, otherwise `~/.config/opencode/`; workspace setup uses `.opencode/`. Use `--dry-run` to preview or `--remove` to remove the owned plugin entry and legacy generated files.
120120

121121
The `oy` agent has no permission overrides. Its short system prompt carries the useful OpenCode 2 defaults that a custom prompt would otherwise replace: inspect before editing, follow repository conventions, make the smallest correct change, persist through verification, preserve unrelated worktree changes, avoid destructive Git operations, and report concisely. OpenCode and the user remain authoritative for permissions and approvals.
122122

123123
Setup and removal stage one multi-file batch and roll back mutations already committed if a later mutation fails. This is in-process rollback, not crash journaling or durable recovery. JSON and JSONC are still pretty-reserialized, so comments and formatting are not preserved. Removal deletes owned current values; it does not restore values that existed before setup.
124124

125-
Launch, model, and workflow commands only validate that a complete global or workspace integration exists; they never auto-refresh it. Run `oy setup` explicitly after generated assets change (`oy upgrade` does this as an explicit post-upgrade step). All selected OpenCode runner and managed-API processes use `OY_ROOT` as their working directory.
125+
Launch, model, and workflow commands only validate that a complete global or workspace integration exists; they never auto-refresh it. Run `oy setup` explicitly after upgrading (`oy upgrade` does this as an explicit post-upgrade step). All selected OpenCode runner and managed-API processes use `OY_ROOT` as their working directory.
126126

127127
oy defaults to the `opencode2` executable. This release supports exactly beta `0.0.0-next-15353` and tagged OpenCode 2.x; other prereleases and major versions fail closed until tested. `OY_OPENCODE` remains an executable override. `oy run`, `audit`, `review`, and `enhance` use the single `oy` agent. `oy run --auto` asks OpenCode to approve pending requests once while preserving explicit denies; without it, the user's normal policy applies. Set `OY_OPENCODE_MODEL=provider/model#variant` to override the noninteractive workflow model.
128128

ROADMAP.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ _Updated July 2026. Ordered by outcome, not promised release date._
1010

1111
**Core loop:** prepare deterministic evidence → let OpenCode reason and edit under the user's permissions → validate a durable report → rerun to confirm.
1212

13-
The intended integration is CLI-first and skill-led. MCP, generated commands, config merging, and host wrappers are transitional compatibility surfaces, not the destination.
13+
The intended integration is CLI-first, package-delivered, and skill-led. MCP and host wrappers are transitional compatibility surfaces, not the destination.
1414

1515
## Product principles
1616

1717
1. **OpenCode owns execution policy.** Users configure models, agents, permissions, edits, shell, web, sessions, and approvals in OpenCode. Oy does not maintain parallel plan/edit/auto permission modes.
18-
2. **Keep one useful agent.** The generated `oy` agent is a concise autonomous system prompt. It adds completion discipline and engineering defaults without overriding the user's permissions.
18+
2. **Keep one useful agent.** The packaged `oy` agent is a concise autonomous system prompt. It adds completion discipline and engineering defaults without overriding the user's permissions.
1919
3. **Own the evidence boundary, not the model.** Oy owns collection, ordering, limits, evidence identity, and report normalization; OpenCode owns inference and general tools.
2020
4. **Skills are the integration contract.** Audit, review, and one-finding remediation protocols should be usable from normal OpenCode sessions and should not require dedicated permission-adapter agents.
2121
5. **Prefer files over large tool responses.** Prepare immutable workspace-local evidence artifacts, return small structured descriptors, and let OpenCode read them with native tools.
@@ -36,6 +36,7 @@ Completed in the current development cycle:
3636
- Added `oy audit|review prepare` and `finalize` with workspace-local evidence, private state, SHA-256 artifact binding, changed-input/output rejection, and strict candidate findings.
3737
- Rewrote audit/review skills around native OpenCode reads and edits.
3838
- Added the `@oy-cli/opencode` V2 package for the agent, skills, and commands.
39+
- Made setup package-first and removed direct agent/skill/command installation.
3940
- Stopped registering MCP and global tool-output overrides in default setup.
4041

4142
## Completed — make the CLI the deterministic boundary

SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ Avoid mounting the host Docker socket into AI-assisted containers. Docker socket
4343

4444
## Local Files
4545

46-
`oy setup` writes generated files under `OPENCODE_CONFIG_DIR` when set, otherwise `~/.config/opencode/`; `oy setup --workspace` writes under `.opencode/`. An existing `opencode.jsonc` is selected before `opencode.json`. Launch/model/workflow commands validate setup but never rewrite it. Use `oy setup --dry-run` before first setup and `oy setup --remove` to remove the current oy integration.
46+
`oy setup` writes a versioned `@oy-cli/opencode` plugin entry under `OPENCODE_CONFIG_DIR` when set, otherwise `~/.config/opencode/`; `oy setup --workspace` writes under `.opencode/`. An existing `opencode.jsonc` is selected before `opencode.json`. Launch/model/workflow commands validate setup but never rewrite it. Use `oy setup --dry-run` before first setup and `oy setup --remove` to remove the current oy integration.
4747

48-
Generated agent and skill files refuse to overwrite non-generated files at generated paths. Setup owns one `oy` agent, three skills, and `commands.oy-audit`, `commands.oy-review`, and `commands.oy-enhance`; unknown sibling object keys are retained. Exact transitional `mcp.servers.oy` and tool-output budget values are removed. Older generated mode and workflow-agent files are retired during setup.
48+
Setup owns string-form `@oy-cli/opencode` package entries. It removes exact legacy generated agent/skill files and command, MCP, and output-budget values while retaining unrelated entries. Modified generated files and object-form oy plugin entries with custom options fail closed rather than being deleted or overwritten.
4949

50-
Setup/removal is a staged multi-file batch that restores already-mutated files if a later commit fails. It has no persistent journal and cannot promise recovery across a process or machine crash. JSONC comments and formatting are still lost during reserialization. Removal deletes oy's generated files and currently owned config values; it does not remember or restore historical pre-setup values. Back up hand-edited config before setup.
50+
Setup/removal is a staged file batch that restores already-mutated files if a later commit fails. It has no persistent journal and cannot promise recovery across a process or machine crash. JSONC comments and formatting are still lost during reserialization. Removal deletes the current package entry, exact legacy generated files, and currently owned config values; it does not remember or restore historical pre-setup values. Back up hand-edited config before setup.
5151

5252
opencode owns its own local state. Treat sessions, logs, and config as sensitive because they may contain prompts, source snippets, command output, or provider metadata.
5353

0 commit comments

Comments
 (0)