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
31 changes: 28 additions & 3 deletions .github/workflows/upstream-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,58 @@ jobs:
git fetch upstream dev

- name: Merge upstream (exclude workflows)
id: merge
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Merge upstream/dev but don't commit yet
git merge upstream/dev --no-commit --no-ff || true
if ! git merge upstream/dev --no-commit --no-ff; then
# Check for unresolved conflict markers
if git diff --name-only --diff-filter=U | grep -q .; then
echo "::warning::Merge has conflicts that require manual resolution."
git merge --abort
exit 1
fi
fi

# Restore our fork's workflows (discard upstream workflow changes)
git checkout HEAD -- .github/workflows/ || true

# Check if there are actual changes to commit
if git diff --cached --quiet && git diff --quiet; then
echo "No changes to sync"
echo "changes=false" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "changes=true" >> "$GITHUB_OUTPUT"
git commit -m "chore: sync upstream changes (excluding workflows)"

- name: Create PR
if: steps.merge.outputs.changes == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="chore/upstream-sync-$(date +%Y%m%d)"
BRANCH="chore/upstream-sync-$(date +%Y%m%d)-${GITHUB_RUN_NUMBER}"
git checkout -b "$BRANCH"
git push origin "$BRANCH"

# Attempt PR creation β€” warn on permission failure instead of hard-failing
gh pr create \
--base dev \
--head "$BRANCH" \
--title "chore: sync upstream $(date +%Y-%m-%d)" \
--body "Automated upstream sync from anomalyco/opencode (workflows excluded)."
--body "## What
Automated upstream sync from anomalyco/opencode (workflows excluded).

## Why
Keep fork up-to-date with upstream releases and fixes.

## Changes
See commit log for upstream changes included in this sync.

## Test plan
- [ ] CI passes (typecheck + unit + e2e)
- [ ] Fork-specific features still work" \
|| echo "::warning::PR creation failed (likely permissions). Branch $BRANCH pushed β€” create PR manually at: https://github.com/${{ github.repository }}/compare/dev...$BRANCH"
36 changes: 18 additions & 18 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/app",
"version": "1.3.13",
"version": "1.3.15",
"description": "",
"type": "module",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/console/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-app",
"version": "1.3.13",
"version": "1.3.15",
"type": "module",
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/console/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/console-core",
"version": "1.3.13",
"version": "1.3.15",
"private": true,
"type": "module",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/console/function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-function",
"version": "1.3.13",
"version": "1.3.15",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/console/mail/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-mail",
"version": "1.3.13",
"version": "1.3.15",
"dependencies": {
"@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/desktop-electron",
"private": true,
"version": "1.3.13",
"version": "1.3.15",
"type": "module",
"license": "MIT",
"homepage": "https://opencode.ai",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/desktop",
"private": true,
"version": "1.3.13",
"version": "1.3.15",
"type": "module",
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/enterprise/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/enterprise",
"version": "1.3.13",
"version": "1.3.15",
"private": true,
"type": "module",
"license": "MIT",
Expand Down
12 changes: 6 additions & 6 deletions packages/extensions/zed/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id = "opencode"
name = "OpenCode"
description = "The open source coding agent."
version = "1.3.13"
version = "1.3.15"
schema_version = 1
authors = ["Anomaly"]
repository = "https://github.com/anomalyco/opencode"
Expand All @@ -11,26 +11,26 @@ name = "OpenCode"
icon = "./icons/opencode.svg"

[agent_servers.opencode.targets.darwin-aarch64]
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.13/opencode-darwin-arm64.zip"
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.15/opencode-darwin-arm64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.darwin-x86_64]
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.13/opencode-darwin-x64.zip"
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.15/opencode-darwin-x64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.linux-aarch64]
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.13/opencode-linux-arm64.tar.gz"
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.15/opencode-linux-arm64.tar.gz"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.linux-x86_64]
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.13/opencode-linux-x64.tar.gz"
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.15/opencode-linux-x64.tar.gz"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.windows-x86_64]
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.13/opencode-windows-x64.zip"
archive = "https://github.com/anomalyco/opencode/releases/download/v1.3.15/opencode-windows-x64.zip"
cmd = "./opencode.exe"
args = ["acp"]
2 changes: 1 addition & 1 deletion packages/function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/function",
"version": "1.3.13",
"version": "1.3.15",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/guardrails/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/guardrails",
"version": "1.3.13",
"version": "1.3.15",
"private": true,
"type": "module",
"license": "MIT",
Expand All @@ -15,6 +15,6 @@
"README.md"
],
"dependencies": {
"opencode": "1.3.13"
"opencode": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/opencode/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.3.13",
"version": "1.3.15",
"name": "opencode",
"type": "module",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions packages/opencode/script/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ for (const item of targets) {
conditions: ["browser"],
tsconfig: "./tsconfig.json",
plugins: [plugin],
external: ["node-gyp"],
compile: {
autoloadBunfig: false,
autoloadDotenv: false,
Expand Down
18 changes: 17 additions & 1 deletion packages/opencode/specs/effect-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,27 @@ Once individual tools are effectified, change `Tool.Info` (`tool/tool.ts`) so `i
2. Update `Tool.define()` factory to work with Effects
3. Update `SessionPrompt` to `yield*` tool results instead of `await`ing

### Tool migration details

Until the tool interface itself returns `Effect`, use this transitional pattern for migrated tools:

- `Tool.defineEffect(...)` should `yield*` the services the tool depends on and close over them in the returned tool definition.
- Keep the bridge at the Promise boundary only. Prefer a single `Effect.runPromise(...)` in the temporary `async execute(...)` implementation, and move the inner logic into `Effect.fn(...)` helpers instead of scattering `runPromise` islands through the tool body.
- If a tool starts requiring new services, wire them into `ToolRegistry.defaultLayer` so production callers resolve the same dependencies as tests.

Tool tests should use the existing Effect helpers in `packages/opencode/test/lib/effect.ts`:

- Use `testEffect(...)` / `it.live(...)` instead of creating fake local wrappers around effectful tools.
- Yield the real tool export, then initialize it: `const info = yield* ReadTool`, `const tool = yield* Effect.promise(() => info.init())`.
- Run tests inside a real instance with `provideTmpdirInstance(...)` or `provideInstance(tmpdirScoped(...))` so instance-scoped services resolve exactly as they do in production.

This keeps migrated tool tests aligned with the production service graph today, and makes the eventual `Tool.Info` β†’ `Effect` cleanup mostly mechanical later.

Individual tools, ordered by value:

- [ ] `apply_patch.ts` β€” HIGH: multi-step orchestration, error accumulation, Bus events
- [ ] `bash.ts` β€” HIGH: shell orchestration, quoting, timeout handling, output capture
- [ ] `read.ts` β€” HIGH: streaming I/O, readline, binary detection β†’ FileSystem + Stream
- [x] `read.ts` β€” HIGH: streaming I/O, readline, binary detection β†’ FileSystem + Stream
- [ ] `edit.ts` β€” HIGH: multi-step diff/format/publish pipeline, FileWatcher lock
- [ ] `grep.ts` β€” MEDIUM: spawns ripgrep β†’ ChildProcessSpawner, timeout handling
- [ ] `write.ts` β€” MEDIUM: permission checks, diagnostics polling, Bus events
Expand Down
Loading
Loading