Compare commits

..
Author SHA1 Message Date
Dax Raad badacfabc1 Snapshot release v0.0.0-202508031655 2025-08-03 12:56:34 -04:00
Dax Raad 564ef93066 ci: ignore 2025-08-03 12:52:23 -04:00
14 changed files with 56 additions and 74 deletions
+5 -5
View File
@@ -10,7 +10,7 @@
},
"packages/function": {
"name": "@opencode/function",
"version": "0.3.123",
"version": "0.3.120",
"dependencies": {
"@octokit/auth-app": "8.0.1",
"@octokit/rest": "22.0.0",
@@ -25,7 +25,7 @@
},
"packages/opencode": {
"name": "opencode",
"version": "0.3.123",
"version": "0.3.120",
"bin": {
"opencode": "./bin/opencode",
},
@@ -78,7 +78,7 @@
},
"packages/plugin": {
"name": "@opencode-ai/plugin",
"version": "0.3.123",
"version": "0.3.120",
"devDependencies": {
"@hey-api/openapi-ts": "0.80.1",
"@opencode-ai/sdk": "workspace:*",
@@ -88,7 +88,7 @@
},
"packages/sdk/js": {
"name": "@opencode-ai/sdk",
"version": "0.3.123",
"version": "0.3.120",
"devDependencies": {
"@hey-api/openapi-ts": "0.80.1",
"@tsconfig/node22": "catalog:",
@@ -97,7 +97,7 @@
},
"packages/web": {
"name": "@opencode/web",
"version": "0.3.123",
"version": "0.3.120",
"dependencies": {
"@astrojs/cloudflare": "^12.5.4",
"@astrojs/markdown-remark": "6.3.1",
+1 -1
View File
@@ -5,7 +5,7 @@
"type": "module",
"packageManager": "bun@1.2.14",
"scripts": {
"dev": "bun run --conditions=development packages/opencode/src/index.ts",
"dev": "bun run packages/opencode/src/index.ts",
"typecheck": "bun run --filter='*' typecheck",
"stainless": "./scripts/stainless",
"postinstall": "./script/hooks"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode/function",
"version": "0.3.124",
"version": "0.3.122",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "0.3.124",
"version": "0.3.122",
"name": "opencode",
"type": "module",
"private": true,
+1 -1
View File
@@ -77,4 +77,4 @@ export namespace ModelsDev {
}
}
setInterval(() => ModelsDev.refresh(), 60 * 1000 * 60).unref()
setInterval(() => ModelsDev.refresh(), 60 * 1000).unref()
+2 -2
View File
@@ -737,7 +737,7 @@ export namespace Session {
)
const result = await item.execute(args, {
sessionID: input.sessionID,
abort: options.abortSignal!,
abort: abort.signal,
messageID: assistantMsg.id,
callID: options.toolCallId,
metadata: async (val) => {
@@ -779,7 +779,7 @@ export namespace Session {
}
for (const [key, item] of Object.entries(await MCP.tools())) {
if (enabledTools[key] === false) continue
if (mode.tools[key] === false) continue
const execute = item.execute
if (!execute) continue
item.execute = async (args, opts) => {
+21 -16
View File
@@ -60,28 +60,33 @@ export namespace SystemPrompt {
export async function custom() {
const { cwd, root } = App.info().path
const config = await Config.get()
const paths = new Set<string>()
const found = []
for (const item of CUSTOM_FILES) {
const matches = await Filesystem.findUp(item, cwd, root)
matches.forEach((path) => paths.add(path))
found.push(...matches.map((x) => Bun.file(x).text()))
}
paths.add(path.join(Global.Path.config, "AGENTS.md"))
paths.add(path.join(os.homedir(), ".claude", "CLAUDE.md"))
if (config.instructions) {
for (const instruction of config.instructions) {
const matches = await Filesystem.globUp(instruction, cwd, root).catch(() => [])
matches.forEach((path) => paths.add(path))
}
}
const found = Array.from(paths).map((p) =>
Bun.file(p)
found.push(
Bun.file(path.join(Global.Path.config, "AGENTS.md"))
.text()
.catch(() => ""),
)
found.push(
Bun.file(path.join(os.homedir(), ".claude", "CLAUDE.md"))
.text()
.catch(() => ""),
)
if (config.instructions) {
for (const instruction of config.instructions) {
try {
const matches = await Filesystem.globUp(instruction, cwd, root)
found.push(...matches.map((x) => Bun.file(x).text()))
} catch {
continue // Skip invalid glob patterns
}
}
}
return Promise.all(found).then((result) => result.filter(Boolean))
}
+10 -18
View File
@@ -1,6 +1,4 @@
import { z } from "zod"
import { exec } from "child_process"
import { text } from "stream/consumers"
import { Tool } from "./tool"
import DESCRIPTION from "./bash.txt"
import { App } from "../app/app"
@@ -118,25 +116,19 @@ export const BashTool = Tool.define("bash", {
})
}
const process = exec(params.command, {
const process = Bun.spawn({
cmd: ["bash", "-c", params.command],
cwd: app.path.cwd,
signal: ctx.abort,
maxBuffer: MAX_OUTPUT_LENGTH,
timeout,
signal: ctx.abort,
timeout: timeout,
stdin: "pipe",
stdout: "pipe",
stderr: "pipe",
})
const stdoutPromise = text(process.stdout!)
const stderrPromise = text(process.stderr!)
await new Promise<void>((resolve) => {
process.on("close", () => {
resolve()
})
})
const stdout = await stdoutPromise
const stderr = await stderrPromise
console.log({ stderr, stdout })
await process.exited
const stdout = await new Response(process.stdout).text()
const stderr = await new Response(process.stderr).text()
return {
title: params.command,
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/plugin",
"version": "0.3.124",
"version": "0.3.122",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
"version": "0.3.124",
"version": "0.3.122",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@opencode/web",
"type": "module",
"version": "0.3.124",
"version": "0.3.122",
"scripts": {
"dev": "astro dev",
"dev:remote": "sst shell --stage=dev --target=Web astro dev",
+1 -20
View File
@@ -236,14 +236,6 @@ The `disabled_providers` option accepts an array of provider IDs. When a provide
- It won't be loaded even if API keys are configured through `opencode auth login`
- The provider's models won't appear in the model selection list
```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"disabled_providers": ["openai", "gemini"]
}
```
---
### Formatters
@@ -253,18 +245,7 @@ You can configure code formatters through the `formatter` option. See [Formatter
```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"formatter": {
"prettier": {
"disabled": true
},
"custom-prettier": {
"command": ["npx", "prettier", "--write", "$FILE"],
"environment": {
"NODE_ENV": "development"
},
"extensions": [".js", ".ts", ".jsx", ".tsx"]
}
}
"disabled_providers": ["openai", "gemini"]
}
```
+9 -5
View File
@@ -2,7 +2,8 @@
import { $ } from "bun"
console.log("=== publishing ===\n")
console.log("=== Publishing ===")
console.log()
const snapshot = process.env["OPENCODE_SNAPSHOT"] === "true"
const version = snapshot
@@ -28,14 +29,17 @@ for (const file of pkgjsons) {
await Bun.file(file).write(pkg)
}
console.log("\n=== opencode ===\n")
// await import(`../packages/opencode/script/publish.ts`)
console.log("=== opencode ===")
await import(`../packages/opencode/script/publish.ts`)
console.log()
console.log("\n=== sdk ===\n")
console.log("=== sdk ===")
await import(`../packages/sdk/js/script/publish.ts`)
console.log()
console.log("\n=== plugin ===\n")
console.log("=== plugin ===")
await import(`../packages/plugin/script/publish.ts`)
console.log()
// await import(`../packages/sdk/stainless/generate.ts`)
if (!snapshot) {
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "opencode",
"displayName": "opencode",
"description": "opencode for VS Code",
"version": "0.3.124",
"version": "0.3.122",
"publisher": "sst-dev",
"repository": {
"type": "git",