Skip to content

Commit b3ac36f

Browse files
authored
Merge branch 'anomalyco:dev' into dev
2 parents e769216 + aef0e58 commit b3ac36f

10 files changed

Lines changed: 770 additions & 54 deletions

File tree

bun.lock

Lines changed: 34 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-gUWzUsk81miIrjg0fZQmsIQG4pZYmEHgzN6BaXI+lfc=",
4-
"aarch64-linux": "sha256-gwEG75ha/ojTO2iAObTmLTtEkXIXJ7BThzfI5CqlJh8=",
5-
"aarch64-darwin": "sha256-20RGG2GkUItCzD67gDdoSLfexttM8abS//FKO9bfjoM=",
6-
"x86_64-darwin": "sha256-i2VawFuR1UbjPVYoybU6aJDJfFo0tcvtl1aM31Y2mTQ="
3+
"x86_64-linux": "sha256-3wRTDLo5FZoUc2Bwm1aAJZ4dNsekX8XoY6TwTmohgYo=",
4+
"aarch64-linux": "sha256-CKiuc6c52UV9cLEtccYEYS4QN0jYzNJv1fHSayqbHKo=",
5+
"aarch64-darwin": "sha256-pWfXomWTDvG8WpWmUCwNXdbSHw6hPlqoT0Q/XuNceMc=",
6+
"x86_64-darwin": "sha256-Dmg4+cUq2r6vZB2ta9tLpNAWqcl11ZCu4ZpieegRFrY="
77
}
88
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@tailwindcss/vite": "4.1.11",
3939
"diff": "8.0.2",
4040
"dompurify": "3.3.1",
41-
"ai": "5.0.119",
41+
"ai": "5.0.124",
4242
"hono": "4.10.7",
4343
"hono-openapi": "1.1.2",
4444
"fuzzysort": "3.1.0",

packages/opencode/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@
5050
"@actions/core": "1.11.1",
5151
"@actions/github": "6.0.1",
5252
"@agentclientprotocol/sdk": "0.13.0",
53-
"@ai-sdk/amazon-bedrock": "3.0.73",
54-
"@ai-sdk/anthropic": "2.0.57",
53+
"@ai-sdk/amazon-bedrock": "3.0.74",
54+
"@ai-sdk/anthropic": "2.0.58",
5555
"@ai-sdk/azure": "2.0.91",
56-
"@ai-sdk/cerebras": "1.0.34",
56+
"@ai-sdk/cerebras": "1.0.36",
5757
"@ai-sdk/cohere": "2.0.22",
58-
"@ai-sdk/deepinfra": "1.0.31",
59-
"@ai-sdk/gateway": "2.0.25",
58+
"@ai-sdk/deepinfra": "1.0.33",
59+
"@ai-sdk/gateway": "2.0.30",
6060
"@ai-sdk/google": "2.0.52",
61-
"@ai-sdk/google-vertex": "3.0.97",
61+
"@ai-sdk/google-vertex": "3.0.98",
6262
"@ai-sdk/groq": "2.0.34",
6363
"@ai-sdk/mistral": "2.0.27",
6464
"@ai-sdk/openai": "2.0.89",
65-
"@ai-sdk/openai-compatible": "1.0.30",
65+
"@ai-sdk/openai-compatible": "1.0.32",
6666
"@ai-sdk/perplexity": "2.0.23",
6767
"@ai-sdk/provider": "2.0.1",
6868
"@ai-sdk/provider-utils": "3.0.20",
69-
"@ai-sdk/togetherai": "1.0.31",
70-
"@ai-sdk/vercel": "1.0.31",
71-
"@ai-sdk/xai": "2.0.51",
69+
"@ai-sdk/togetherai": "1.0.34",
70+
"@ai-sdk/vercel": "1.0.33",
71+
"@ai-sdk/xai": "2.0.56",
7272
"@clack/prompts": "1.0.0-alpha.1",
7373
"@gitlab/gitlab-ai-provider": "3.3.1",
7474
"@hono/standard-validator": "0.1.5",
@@ -81,7 +81,7 @@
8181
"@opencode-ai/script": "workspace:*",
8282
"@opencode-ai/sdk": "workspace:*",
8383
"@opencode-ai/util": "workspace:*",
84-
"@openrouter/ai-sdk-provider": "1.5.2",
84+
"@openrouter/ai-sdk-provider": "1.5.4",
8585
"@opentui/core": "0.1.75",
8686
"@opentui/solid": "0.1.75",
8787
"@parcel/watcher": "2.5.1",

packages/opencode/src/cli/cmd/acp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const AcpCommand = cmd({
2020
})
2121
},
2222
handler: async (args) => {
23+
process.env.OPENCODE_CLIENT = "acp"
2324
await bootstrap(process.cwd(), async () => {
2425
const opts = await resolveNetworkOptions(args)
2526
const server = Server.listen(opts)

packages/opencode/src/flag/flag.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export namespace Flag {
2525
OPENCODE_DISABLE_CLAUDE_CODE || truthy("OPENCODE_DISABLE_CLAUDE_CODE_SKILLS")
2626
export declare const OPENCODE_DISABLE_PROJECT_CONFIG: boolean
2727
export const OPENCODE_FAKE_VCS = process.env["OPENCODE_FAKE_VCS"]
28-
export const OPENCODE_CLIENT = process.env["OPENCODE_CLIENT"] ?? "cli"
28+
export declare const OPENCODE_CLIENT: string
2929
export const OPENCODE_SERVER_PASSWORD = process.env["OPENCODE_SERVER_PASSWORD"]
3030
export const OPENCODE_SERVER_USERNAME = process.env["OPENCODE_SERVER_USERNAME"]
3131

@@ -77,3 +77,14 @@ Object.defineProperty(Flag, "OPENCODE_CONFIG_DIR", {
7777
enumerable: true,
7878
configurable: false,
7979
})
80+
81+
// Dynamic getter for OPENCODE_CLIENT
82+
// This must be evaluated at access time, not module load time,
83+
// because some commands override the client at runtime
84+
Object.defineProperty(Flag, "OPENCODE_CLIENT", {
85+
get() {
86+
return process.env["OPENCODE_CLIENT"] ?? "cli"
87+
},
88+
enumerable: true,
89+
configurable: false,
90+
})

packages/opencode/src/tool/bash.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export const BashTool = Tool.define("bash", async () => {
9191

9292
for (const node of tree.rootNode.descendantsOfType("command")) {
9393
if (!node) continue
94+
95+
// Get full command text including redirects if present
96+
let commandText = node.parent?.type === "redirected_statement" ? node.parent.text : node.text
97+
9498
const command = []
9599
for (let i = 0; i < node.childCount; i++) {
96100
const child = node.child(i)
@@ -131,8 +135,8 @@ export const BashTool = Tool.define("bash", async () => {
131135

132136
// cd covered by above check
133137
if (command.length && command[0] !== "cd") {
134-
patterns.add(command.join(" "))
135-
always.add(BashArity.prefix(command).join(" ") + "*")
138+
patterns.add(commandText)
139+
always.add(BashArity.prefix(command).join(" ") + " *")
136140
}
137141
}
138142

0 commit comments

Comments
 (0)