From d772fff7765a172fb523cdf07a22a96d21f83d2f Mon Sep 17 00:00:00 2001 From: opencode Date: Tue, 23 Sep 2025 21:03:59 +0000 Subject: [PATCH 01/11] release: v0.11.2 --- bun.lock | 18 +++++++++--------- packages/app/package.json | 2 +- packages/console/app/package.json | 2 +- packages/console/core/package.json | 2 +- packages/console/function/package.json | 2 +- packages/console/scripts/package.json | 2 +- packages/function/package.json | 2 +- packages/opencode/package.json | 2 +- packages/plugin/package.json | 2 +- packages/sdk/js/package.json | 2 +- packages/web/package.json | 2 +- sdks/vscode/package.json | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/bun.lock b/bun.lock index 221696fcc..a3054acb9 100644 --- a/bun.lock +++ b/bun.lock @@ -14,7 +14,7 @@ }, "packages/app": { "name": "@opencode/app", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@kobalte/core": "0.13.11", "@opencode-ai/sdk": "workspace:*", @@ -62,7 +62,7 @@ }, "packages/console/core": { "name": "@opencode/console-core", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@aws-sdk/client-sts": "3.782.0", "@opencode/console-resource": "workspace:*", @@ -79,7 +79,7 @@ }, "packages/console/function": { "name": "@opencode/console-function", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@ai-sdk/anthropic": "2.0.0", "@ai-sdk/openai": "2.0.2", @@ -105,7 +105,7 @@ }, "packages/console/scripts": { "name": "@opencode/console-scripts", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@opencode/console-core": "workspace:*", "tsx": "4.20.5", @@ -117,7 +117,7 @@ }, "packages/function": { "name": "@opencode/function", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@octokit/auth-app": "8.0.1", "@octokit/rest": "22.0.0", @@ -132,7 +132,7 @@ }, "packages/opencode": { "name": "opencode", - "version": "0.11.1", + "version": "0.11.2", "bin": { "opencode": "./bin/opencode", }, @@ -183,7 +183,7 @@ }, "packages/plugin": { "name": "@opencode-ai/plugin", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@opencode-ai/sdk": "workspace:*", "zod": "catalog:", @@ -195,7 +195,7 @@ }, "packages/sdk/js": { "name": "@opencode-ai/sdk", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@hey-api/openapi-ts": "0.81.0", }, @@ -207,7 +207,7 @@ }, "packages/web": { "name": "@opencode/web", - "version": "0.11.1", + "version": "0.11.2", "dependencies": { "@astrojs/cloudflare": "12.6.3", "@astrojs/markdown-remark": "6.3.1", diff --git a/packages/app/package.json b/packages/app/package.json index 322434204..7b279034c 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@opencode/app", - "version": "0.11.1", + "version": "0.11.2", "description": "", "type": "module", "scripts": { diff --git a/packages/console/app/package.json b/packages/console/app/package.json index 1b5cf6c91..7bf50d751 100644 --- a/packages/console/app/package.json +++ b/packages/console/app/package.json @@ -7,7 +7,7 @@ "dev:remote": "VITE_AUTH_URL=https://auth.dev.opencode.ai bun sst shell --stage=dev bun dev", "build": "vinxi build && ../../opencode/script/schema.ts ./.output/public/config.json", "start": "vinxi start", - "version": "0.11.1" + "version": "0.11.2" }, "dependencies": { "@ibm/plex": "6.4.1", diff --git a/packages/console/core/package.json b/packages/console/core/package.json index 20955eaff..1fb575ae9 100644 --- a/packages/console/core/package.json +++ b/packages/console/core/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode/console-core", - "version": "0.11.1", + "version": "0.11.2", "private": true, "type": "module", "dependencies": { diff --git a/packages/console/function/package.json b/packages/console/function/package.json index e9c031982..b7a6ef773 100644 --- a/packages/console/function/package.json +++ b/packages/console/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode/console-function", - "version": "0.11.1", + "version": "0.11.2", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/console/scripts/package.json b/packages/console/scripts/package.json index bfdb914bf..0ec0579e4 100644 --- a/packages/console/scripts/package.json +++ b/packages/console/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@opencode/console-scripts", - "version": "0.11.1", + "version": "0.11.2", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/function/package.json b/packages/function/package.json index 4a8835e5a..fc113d7a9 100644 --- a/packages/function/package.json +++ b/packages/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode/function", - "version": "0.11.1", + "version": "0.11.2", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 66d25e565..172bdf63a 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "0.11.1", + "version": "0.11.2", "name": "opencode", "type": "module", "private": true, diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 440a6c59b..b9a4a65a8 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/plugin", - "version": "0.11.1", + "version": "0.11.2", "type": "module", "scripts": { "typecheck": "tsc --noEmit", diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index 42f5c5dea..e514f61eb 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/sdk", - "version": "0.11.1", + "version": "0.11.2", "type": "module", "scripts": { "typecheck": "tsc --noEmit", diff --git a/packages/web/package.json b/packages/web/package.json index 11946ca48..4801d84b7 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,7 +1,7 @@ { "name": "@opencode/web", "type": "module", - "version": "0.11.1", + "version": "0.11.2", "scripts": { "dev": "astro dev", "dev:remote": "VITE_API_URL=https://api.opencode.ai astro dev", diff --git a/sdks/vscode/package.json b/sdks/vscode/package.json index e65e3e4d3..677ed1760 100644 --- a/sdks/vscode/package.json +++ b/sdks/vscode/package.json @@ -2,7 +2,7 @@ "name": "opencode", "displayName": "opencode", "description": "opencode for VS Code", - "version": "0.11.1", + "version": "0.11.2", "publisher": "sst-dev", "repository": { "type": "git", From 449994f1201effe454fc185cd06386aab2c182b0 Mon Sep 17 00:00:00 2001 From: Siddhant Choudhary <28786196+i-m-sid@users.noreply.github.com> Date: Wed, 24 Sep 2025 02:49:32 +0530 Subject: [PATCH 02/11] feat: output-format flag to stream json output (#2471) Co-authored-by: Siddhant Choudhary Co-authored-by: rekram1-node --- packages/opencode/src/cli/cmd/run.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.ts index e5aa70106..07cc10a74 100644 --- a/packages/opencode/src/cli/cmd/run.ts +++ b/packages/opencode/src/cli/cmd/run.ts @@ -64,6 +64,12 @@ export const RunCommand = cmd({ type: "string", describe: "agent to use", }) + .option("format", { + type: "string", + choices: ["default", "json"], + default: "default", + describe: "format: default (formatted) or json (raw JSON events)", + }) }, handler: async (args) => { let message = args.message.join(" ") @@ -144,6 +150,20 @@ export const RunCommand = cmd({ ) } + function outputJsonEvent(type: string, data: any) { + if (args.format === "json") { + const jsonEvent = { + type, + timestamp: Date.now(), + sessionID: session?.id, + ...data, + } + process.stdout.write(JSON.stringify(jsonEvent) + "\n") + return true + } + return false + } + let text = "" Bus.subscribe(MessageV2.Event.PartUpdated, async (evt) => { @@ -152,6 +172,7 @@ export const RunCommand = cmd({ const part = evt.properties.part if (part.type === "tool" && part.state.status === "completed") { + if (outputJsonEvent("tool_use", { part })) return const [tool, color] = TOOL[part.tool] ?? [part.tool, UI.Style.TEXT_INFO_BOLD] const title = part.state.title || @@ -169,6 +190,7 @@ export const RunCommand = cmd({ text = part.text if (part.time?.end) { + if (outputJsonEvent("text", { part })) return UI.empty() UI.println(UI.markdown(text)) UI.empty() @@ -189,6 +211,7 @@ export const RunCommand = cmd({ } errorMsg = errorMsg ? errorMsg + "\n" + err : err + if (outputJsonEvent("error", { error })) return UI.error(err) }) @@ -225,6 +248,7 @@ export const RunCommand = cmd({ const isPiped = !process.stdout.isTTY if (isPiped) { const match = result.parts.findLast((x: any) => x.type === "text") as any + if (outputJsonEvent("text", { text: match })) return if (match) process.stdout.write(UI.markdown(match.text)) if (errorMsg) process.stdout.write(errorMsg) } From 9d3fdda674cf52f5bf415dfe0d13d6ca9962aae2 Mon Sep 17 00:00:00 2001 From: Jay V Date: Mon, 22 Sep 2025 16:08:43 -0400 Subject: [PATCH 03/11] docs: edit --- packages/web/src/content/docs/ide.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/web/src/content/docs/ide.mdx b/packages/web/src/content/docs/ide.mdx index 085f275bd..2d33aef8c 100644 --- a/packages/web/src/content/docs/ide.mdx +++ b/packages/web/src/content/docs/ide.mdx @@ -24,9 +24,7 @@ To install opencode on VS Code and popular forks like Cursor, Windsurf, VSCodium 2. Open the integrated terminal 3. Run `opencode` - the extension installs automatically -:::tip -Run Set `export EDITOR="code --wait"` in your terminal to enable `/export` and similar commands. For other editors, check [Editor Setup](https://opencode.ai/docs/tui/#editor-setup). -::: +If on the other hand you want to use your own IDE when you run `/editor` or `/export` from the TUI, you'll need to set `export EDITOR="code --wait"`. [Learn more](https://opencode.ai/docs/tui/#editor-setup). --- From 8c9fbc771747f80713023d15bdefae01212f6576 Mon Sep 17 00:00:00 2001 From: Jay V Date: Mon, 22 Sep 2025 16:16:53 -0400 Subject: [PATCH 04/11] docs: edits --- packages/web/src/content/docs/ide.mdx | 2 +- packages/web/src/content/docs/tui.mdx | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/web/src/content/docs/ide.mdx b/packages/web/src/content/docs/ide.mdx index 2d33aef8c..47c030598 100644 --- a/packages/web/src/content/docs/ide.mdx +++ b/packages/web/src/content/docs/ide.mdx @@ -24,7 +24,7 @@ To install opencode on VS Code and popular forks like Cursor, Windsurf, VSCodium 2. Open the integrated terminal 3. Run `opencode` - the extension installs automatically -If on the other hand you want to use your own IDE when you run `/editor` or `/export` from the TUI, you'll need to set `export EDITOR="code --wait"`. [Learn more](https://opencode.ai/docs/tui/#editor-setup). +If on the other hand you want to use your own IDE when you run `/editor` or `/export` from the TUI, you'll need to set `export EDITOR="code --wait"`. [Learn more](/docs/tui/#editor-setup). --- diff --git a/packages/web/src/content/docs/tui.mdx b/packages/web/src/content/docs/tui.mdx index 19fafe822..743702eaa 100644 --- a/packages/web/src/content/docs/tui.mdx +++ b/packages/web/src/content/docs/tui.mdx @@ -185,6 +185,9 @@ Redo a previously undone message. Only available after using `/undo`. Any file changes will also be restored. ::: +Internally, this uses Git to manage the file changes. So your project **needs to +be a Git repository**. + ```bash frame="none" /redo ``` @@ -237,6 +240,9 @@ Undo last message in the conversation. Removes the most recent user message, all Any file changes made will also be reverted. ::: +Internally, this uses Git to manage the file changes. So your project **needs to +be a Git repository**. + ```bash frame="none" /undo ``` @@ -266,7 +272,8 @@ Both the `/editor` and `/export` commands use the editor specified in your `EDIT export EDITOR=nano export EDITOR=vim - # For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait + # For GUI editors, VS Code, Cursor, VSCodium, Windsurf, Zed, etc. + # include --wait export EDITOR="code --wait" ``` @@ -279,7 +286,8 @@ Both the `/editor` and `/export` commands use the editor specified in your `EDIT ```bash set EDITOR=notepad - # For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait + # For GUI editors, VS Code, Cursor, VSCodium, Windsurf, Zed, etc. + # include --wait set EDITOR=code --wait ``` @@ -292,7 +300,8 @@ Both the `/editor` and `/export` commands use the editor specified in your `EDIT ```powershell $env:EDITOR = "notepad" - # For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait + # For GUI editors, VS Code, Cursor, VSCodium, Windsurf, Zed, etc. + # include --wait $env:EDITOR = "code --wait" ``` From 190413580f6f83cd57f70efd73985de6d752544e Mon Sep 17 00:00:00 2001 From: Jay V Date: Tue, 23 Sep 2025 13:15:02 -0400 Subject: [PATCH 05/11] docs: edit --- packages/web/src/content/docs/cli.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/web/src/content/docs/cli.mdx b/packages/web/src/content/docs/cli.mdx index c0fbbd3ba..5d2ac4a7b 100644 --- a/packages/web/src/content/docs/cli.mdx +++ b/packages/web/src/content/docs/cli.mdx @@ -144,6 +144,8 @@ opencode models This command displays all models available across your configured providers in the format `provider/model`. +This is useful for figuring out the exact model name to use in [your config](/docs/config/). + --- ### run From 679aeb29f095571d57fbe736186caa017f7a0885 Mon Sep 17 00:00:00 2001 From: Jay V Date: Tue, 23 Sep 2025 17:36:40 -0400 Subject: [PATCH 06/11] docs: add codex to zen --- packages/web/src/content/docs/zen.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/web/src/content/docs/zen.mdx b/packages/web/src/content/docs/zen.mdx index 461751f39..0aab52616 100644 --- a/packages/web/src/content/docs/zen.mdx +++ b/packages/web/src/content/docs/zen.mdx @@ -64,7 +64,8 @@ You can also access our models through the following API endpoints. | Model | Mode ID | Endpoint | AI SDK Package | | ---------------- | ---------------- | --------------------------------------------- | --------------------------- | -| GPT-5 | gpt-5 | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` | +| GPT 5 | gpt-5 | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` | +| GPT 5 Codex | gpt-5-codex | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` | | Claude Sonnet 4 | claude-sonnet-4 | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` | | Claude Haiku 3.5 | claude-3-5-haiku | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` | | Claude Opus 4.1 | claude-opus-4-1 | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` | @@ -88,6 +89,7 @@ We support a pay-as-you-go model. Below are the prices **per 1M tokens**. | Claude Haiku 3.5 | $0.80 | $4.00 | $0.08 | $1.00 | | Claude Opus 4.1 | $15.00 | $75.00 | $1.50 | $18.75 | | GPT 5 | $1.25 | $10.00 | $0.125 | - | +| GPT 5 Codex | $1.25 | $10.00 | $0.125 | - | | Kimi K2 | $0.60 | $2.50 | - | - | :::note From c3b2c27997261b07db8efb3e0a4819dccb90a8b8 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 23 Sep 2025 21:37:20 +0000 Subject: [PATCH 07/11] chore: format code --- packages/web/src/content/docs/zen.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/content/docs/zen.mdx b/packages/web/src/content/docs/zen.mdx index 0aab52616..100204221 100644 --- a/packages/web/src/content/docs/zen.mdx +++ b/packages/web/src/content/docs/zen.mdx @@ -65,7 +65,7 @@ You can also access our models through the following API endpoints. | Model | Mode ID | Endpoint | AI SDK Package | | ---------------- | ---------------- | --------------------------------------------- | --------------------------- | | GPT 5 | gpt-5 | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` | -| GPT 5 Codex | gpt-5-codex | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` | +| GPT 5 Codex | gpt-5-codex | `https://opencode.ai/zen/v1/responses` | `@ai-sdk/openai` | | Claude Sonnet 4 | claude-sonnet-4 | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` | | Claude Haiku 3.5 | claude-3-5-haiku | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` | | Claude Opus 4.1 | claude-opus-4-1 | `https://opencode.ai/zen/v1/messages` | `@ai-sdk/anthropic` | From edd6198999e956f9cccde0d67b8719b6b68188e3 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 23 Sep 2025 17:58:26 -0400 Subject: [PATCH 08/11] zen: refund --- infra/console.ts | 4 +- .../workspace/payment-section.module.css | 4 + .../component/workspace/payment-section.tsx | 4 +- .../console/app/src/routes/stripe/webhook.ts | 35 +- .../core/migrations/0016_cold_la_nuit.sql | 1 + .../core/migrations/meta/0016_snapshot.json | 681 ++++++++++++++++++ .../core/migrations/meta/_journal.json | 9 +- .../console/core/src/schema/billing.sql.ts | 1 + 8 files changed, 733 insertions(+), 6 deletions(-) create mode 100644 packages/console/core/migrations/0016_cold_la_nuit.sql create mode 100644 packages/console/core/migrations/meta/0016_snapshot.json diff --git a/infra/console.ts b/infra/console.ts index 74c478aee..bd0af2b15 100644 --- a/infra/console.ts +++ b/infra/console.ts @@ -75,6 +75,7 @@ export const stripeWebhook = new WebhookEndpoint("StripeWebhookEndpoint", { "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", + "charge.refunded", "customer.created", "customer.deleted", "customer.updated", @@ -93,9 +94,6 @@ export const stripeWebhook = new WebhookEndpoint("StripeWebhookEndpoint", { "customer.subscription.resumed", "customer.subscription.trial_will_end", "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", ], }) diff --git a/packages/console/app/src/component/workspace/payment-section.module.css b/packages/console/app/src/component/workspace/payment-section.module.css index ea8e2ed42..2e1afe78b 100644 --- a/packages/console/app/src/component/workspace/payment-section.module.css +++ b/packages/console/app/src/component/workspace/payment-section.module.css @@ -40,6 +40,10 @@ &[data-slot="payment-amount"] { color: var(--color-text); + + &[data-refunded="true"] { + text-decoration: line-through; + } } } diff --git a/packages/console/app/src/component/workspace/payment-section.tsx b/packages/console/app/src/component/workspace/payment-section.tsx index 826ec7a55..5cdb0cd78 100644 --- a/packages/console/app/src/component/workspace/payment-section.tsx +++ b/packages/console/app/src/component/workspace/payment-section.tsx @@ -85,7 +85,9 @@ export function PaymentSection() { {formatDateForTable(date)} {payment.id} - ${((payment.amount ?? 0) / 100000000).toFixed(2)} + + ${((payment.amount ?? 0) / 100000000).toFixed(2)} +