Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
shell: bash
run: |
set -euo pipefail
# Version bumps are reviewed separately; this workflow publishes package.json verbatim.
version="$(node -p "require('./package.json').version")"
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$ ]]; then
echo "Expected package version X.Y.Z-beta.N, got: $version" >&2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist/

# Local agent notes / environment-specific
AGENTS.md
.opencode/

# Graphify knowledge graph output
graphify-out/
6 changes: 0 additions & 6 deletions .opencode/opencode.json

This file was deleted.

162 changes: 84 additions & 78 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,86 @@
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0-beta.2] - 2026-08-24

### Added

- OpenCode V2 `Plugin.define` entrypoint with native integration, catalog, and
`LanguageModelV3` registrations
- Native Cursor AgentService transport for images, cancellation, parallel tool
calls, bounded H2 pooling, and live tool-result continuation
- V2 loader, package, lifecycle, catalog, integration, and language-adapter tests
- Preserved OpenCode V1 adapter at the `./v1` package export; npm `latest`
remains on the `2.x` release line while V2 publishes under npm `beta`

### Changed

- OpenCode V2 now owns transcript reconstruction, credential persistence,
permissions, tool execution, and compaction; the V2 path no longer uses the
localhost OpenAI-compatible proxy
- Adapted from CasualDeveloper's V2 implementation in commit
`3af03f605243b58b33c2a9e1f9fa638280bca693`

## [2.2.0] - 2026-08-05

### Changed

- Phase-aware stall budget for post-tool resumes: silent tool continuations recover in **90s** instead of 180s
- H2 bridge workers pre-connect TLS/HTTP-2 at startup (faster first message after restart)
- Tool-call debounce reduced from 500ms → 250ms
- Title-gen model probe result persisted to disk (skip ~2.5s Zen probe after restart)

### Added

- `OPENCODE_CURSOR_POST_TOOL_PRE_OUTPUT_STALL_TIMEOUT_MS` (default 90s)
- Regression coverage for silent post-tool stall recovery

### Performance

- First message (`gpt-5.4-nano`): **8.5s → 4.8s** (−44%)
- First message (`cursor/default`): **6.1s → 3.7s** (−39%)

## [2.1.0] - 2026-08-05

### Changed

- Phase-aware stall budgets: cold thinking gets **180s** so reasoning models are not discarded mid-thought
- Recovery limits honor `MAX_STALL_RECOVERIES`
- `proxyTelemetry` exported for observability and tests

### Added

- `OPENCODE_CURSOR_PRE_OUTPUT_STALL_TIMEOUT_MS` (default 180s)

## [2.0.0] - 2026-08-04

### Fixed

- Root-cause restate loop: tool-result follow-ups no longer look like user interrupts that discard parked bridges
- Frozen sessions: visible-text stalls surface an error in ~90s instead of holding a step for up to 12 minutes
- Infinite recovery restarts capped by forward progress
- Model discovery retries 3× on transient bridge failures

### Removed

- Accumulated loop detectors, loop-break notes, compaction re-framing, and auto-continue nudges (~1,450 lines)

## [1.4.0] - 2026-08-03

See [GitHub Releases](https://github.com/otto-assistant/opencode-cursor/releases) for earlier notes.

[2.2.0]: https://github.com/otto-assistant/opencode-cursor/compare/v2.1.0...v2.2.0
[3.0.0-beta.2]: https://github.com/otto-assistant/opencode-cursor/compare/v2.2.0...v3.0.0-beta.2
[2.1.0]: https://github.com/otto-assistant/opencode-cursor/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/otto-assistant/opencode-cursor/compare/v1.4.0...v2.0.0
[1.4.0]: https://github.com/otto-assistant/opencode-cursor/releases/tag/v1.4.0
This channel targets OpenCode V2 exclusively.

## Unreleased

Live release validation remains pending for instruction precedence on Opus and
image cases, opaque-reasoning replay, and continued work after automatic
compaction, as recorded in
the [acceptance report](docs/opencode-v2-release-acceptance.md).

- Reconstruct authoritative host history through structured Cursor root blobs.
- Observe host tool, permission, question, and session events while forwarding
results only from the next authoritative model invocation.
- Use bounded, per-Run Node HTTP/2 workers with validated Connect completion.
- Preserve late reasoning signatures in durable host metadata for fresh replay.
- Report each host step's usage as Cursor's checkpoint occupancy, counted as
uncached input, plus that step's streamed output tokens, so OpenCode's context
meter and compaction follow the conversation size. Keep terminal input, output,
cache, and reasoning counters, which aggregate every model call in a Run, in
durable provider metadata with an explicit usage scope. Verify the contract
against the pinned host's automatic compaction behavior.
- Preserve checkpoint-referenced opaque reasoning in durable host metadata and
restore its exact placement during replay. Reject ambiguous or changed new
roots rather than guessing their relationship to emitted output.
- Match opaque roots to visible text and tools even when Cursor also streamed
thinking. Omit thinking-only roots and extra unmatched conversation roots
instead of failing a completed answer.
- Treat Cursor `reasoning-effort` as a variant parameter so Gemini 3.8 Flash
High/Medium attach to one model, matching Gemini 3.7 Flash.
- Treat any effort-valued parameter, including `reasoning_effort`, as variants
on one model. Keep Claude thinking on that same model: `none` is
non-thinking, and the effort variants stay thinking. Context and fast
listings stay separate.
- Offer Cursor only its MCP tool family when tools are enabled, using the same
`x-cursor-agent-allowed-tools` list as the official SDK's `mcp` group, so models
see OpenCode's tools rather than Cursor's native ones. The list includes
`get_mcp_tools_tool_call`; allowing only `mcp_tool_call` stripped it and Cursor
failed at bootstrap. Map any native workspace tool execution requests
(`shellStreamArgs`, `shellArgs`, `grepArgs`, `readArgs`, `writeArgs`, `lsArgs`)
that still arrive to OpenCode host tools and format their native results.
- Answer every Cursor exec frame. Fail unknown and unserved frames in band with
`throw` and `streamClose` instead of leaving Cursor waiting. Decline
Cursor-hosted web search, Exa search and fetch, web fetch, question, and
mode-switch queries so the Run continues with host tools, return an error for
plan creation, and fail the Run on VM setup and unrecognized queries.
- Complete native shell streams with `start`, output, `exit`, the structured
`shellResult`, and `streamClose`. Without the result and close, Cursor kept the
turn pending after every native shell call, so resumed Runs stalled until the
watchdog fired.
- Decline the read and write behind Cursor's native StrReplace edit so formatted
host reads are never written back as file content; the model edits through the
host `edit` tool instead.
- Wait up to 180 seconds for a resumed Run's first output, as for fresh Runs.
Cursor needed 72 to 175 seconds at large contexts, so the previous 90-second
limit discarded continuations that would have answered.
- Open a rebuilt Run that follows tool results by saying the results answer the
model's latest calls. The previous opener read as an interruption, and the
model re-checked state on every rebuilt Run instead of continuing.
- Group the `minimal` effort tier into variants so models like Muse Spark 1.3
do not leak separate `-minimal` models.
- Publish Cursor models under the stable catalog name, including newly available
Grok models, and send the exact usable wire ID, such as `cursor-grok-4.6-xhigh`,
as Cursor's model details id. New catalog entries appear without a plugin
code change. When OpenCode has loaded the models.dev Cursor provider, copy
that row's family, limits, modalities, and price. Do not copy lab caps, and
do not replace the live account catalog with the static list.
- Add deterministic pinned-host acceptance and opt-in synthetic live probes.
- Project host system instructions into ordered Cursor rules as well as history
roots. Add an explicit host contract that names those rules as the
application's system prompt, gives them priority over conflicting user and
tool text, and requires genuine tool outcomes. In live checks, Composer, Grok
4.7, and Auto followed a project instruction over a conflicting user request
in 18 of 18 trials, up from 6 of 9 with the earlier wording; Opus is untested.
- Restrict this package to the native V2 plugin API and its runtime dependencies.
- Migrate to released `@opencode/*` `2.0.6`, replacing the removed catalog API
with provider source registration and reload.
- Refresh Cursor models on `credential.switched`, including sign-in and disconnect.
- Preserve tool-error metadata in structured compaction and auxiliary requests.
Update host fixtures for directory loading and experimental session export APIs.

## 3.0.0-beta.2

- Native OpenCode V2 plugin, integration, catalog, and language-model APIs.
- Account-discovered Cursor models with exact model/variant routing.
- OpenCode-owned OAuth credentials, permissions, sessions, tools, and compaction.
Loading
Loading