@stonerzju/opencode 1.2.16-offline.1 → 1.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/bin/opencode +29 -157
  2. package/package.json +29 -29
  3. package/src/acp/agent.ts +4 -4
  4. package/src/acp/session.ts +1 -1
  5. package/src/agent/agent.ts +3 -3
  6. package/src/bun/index.ts +2 -2
  7. package/src/cli/cmd/acp.ts +3 -3
  8. package/src/cli/cmd/debug/file.ts +1 -1
  9. package/src/cli/cmd/github.ts +2 -2
  10. package/src/cli/cmd/pr.ts +1 -1
  11. package/src/cli/cmd/tui/app.tsx +24 -24
  12. package/src/cli/cmd/tui/attach.ts +3 -3
  13. package/src/cli/cmd/tui/component/dialog-agent.tsx +3 -3
  14. package/src/cli/cmd/tui/component/dialog-command.tsx +3 -3
  15. package/src/cli/cmd/tui/component/dialog-mcp.tsx +5 -5
  16. package/src/cli/cmd/tui/component/dialog-model.tsx +4 -4
  17. package/src/cli/cmd/tui/component/dialog-provider.tsx +4 -4
  18. package/src/cli/cmd/tui/component/dialog-session-list.tsx +5 -5
  19. package/src/cli/cmd/tui/component/dialog-session-rename.tsx +3 -3
  20. package/src/cli/cmd/tui/component/dialog-skill.tsx +3 -3
  21. package/src/cli/cmd/tui/component/dialog-stash.tsx +3 -3
  22. package/src/cli/cmd/tui/component/dialog-status.tsx +2 -2
  23. package/src/cli/cmd/tui/component/dialog-tag.tsx +3 -3
  24. package/src/cli/cmd/tui/component/logo.tsx +2 -2
  25. package/src/cli/cmd/tui/component/prompt/autocomplete.tsx +6 -6
  26. package/src/cli/cmd/tui/component/prompt/frecency.tsx +2 -2
  27. package/src/cli/cmd/tui/component/prompt/history.tsx +2 -2
  28. package/src/cli/cmd/tui/component/prompt/index.tsx +14 -14
  29. package/src/cli/cmd/tui/component/prompt/stash.tsx +2 -2
  30. package/src/cli/cmd/tui/component/textarea-keybindings.ts +1 -1
  31. package/src/cli/cmd/tui/component/tips.tsx +1 -1
  32. package/src/cli/cmd/tui/context/directory.ts +1 -1
  33. package/src/cli/cmd/tui/context/exit.tsx +1 -1
  34. package/src/cli/cmd/tui/context/keybind.tsx +2 -2
  35. package/src/cli/cmd/tui/context/kv.tsx +2 -2
  36. package/src/cli/cmd/tui/context/local.tsx +6 -6
  37. package/src/cli/cmd/tui/context/sync.tsx +4 -4
  38. package/src/cli/cmd/tui/context/theme/opencode.json +245 -0
  39. package/src/cli/cmd/tui/context/theme.tsx +2 -2
  40. package/src/cli/cmd/tui/context/tui-config.tsx +1 -1
  41. package/src/cli/cmd/tui/event.ts +2 -2
  42. package/src/cli/cmd/tui/routes/home.tsx +6 -6
  43. package/src/cli/cmd/tui/routes/session/dialog-fork-from-timeline.tsx +6 -6
  44. package/src/cli/cmd/tui/routes/session/dialog-message.tsx +6 -6
  45. package/src/cli/cmd/tui/routes/session/dialog-subagent.tsx +2 -2
  46. package/src/cli/cmd/tui/routes/session/dialog-timeline.tsx +3 -3
  47. package/src/cli/cmd/tui/routes/session/header.tsx +5 -5
  48. package/src/cli/cmd/tui/routes/session/index.tsx +32 -32
  49. package/src/cli/cmd/tui/routes/session/permission.tsx +4 -4
  50. package/src/cli/cmd/tui/routes/session/sidebar.tsx +4 -4
  51. package/src/cli/cmd/tui/thread.ts +9 -9
  52. package/src/cli/cmd/tui/ui/dialog-confirm.tsx +1 -1
  53. package/src/cli/cmd/tui/ui/dialog-help.tsx +2 -2
  54. package/src/cli/cmd/tui/ui/dialog-select.tsx +5 -5
  55. package/src/cli/cmd/tui/ui/dialog.tsx +3 -3
  56. package/src/cli/cmd/tui/ui/toast.tsx +1 -1
  57. package/src/cli/cmd/tui/util/editor.ts +3 -3
  58. package/src/cli/cmd/tui/util/transcript.ts +1 -1
  59. package/src/cli/cmd/tui/worker.ts +10 -10
  60. package/src/cli/error.ts +1 -1
  61. package/src/cli/ui.ts +1 -1
  62. package/src/cli/upgrade.ts +4 -4
  63. package/src/command/index.ts +1 -1
  64. package/src/config/config.ts +10 -10
  65. package/src/config/markdown.ts +1 -1
  66. package/src/config/migrate-tui-config.ts +5 -5
  67. package/src/config/paths.ts +4 -4
  68. package/src/config/tui.ts +4 -4
  69. package/src/control/control.sql.ts +1 -1
  70. package/src/control/index.ts +1 -1
  71. package/src/control-plane/adaptors/worktree.ts +1 -1
  72. package/src/control-plane/session-proxy-middleware.ts +1 -1
  73. package/src/control-plane/workspace.sql.ts +1 -1
  74. package/src/control-plane/workspace.ts +7 -7
  75. package/src/file/index.ts +1 -1
  76. package/src/file/ripgrep.ts +2 -2
  77. package/src/file/watcher.ts +5 -5
  78. package/src/format/formatter.ts +1 -1
  79. package/src/ide/index.ts +3 -3
  80. package/src/index.ts +1 -1
  81. package/src/installation/index.ts +3 -3
  82. package/src/lsp/client.ts +3 -3
  83. package/src/lsp/index.ts +3 -3
  84. package/src/mcp/index.ts +4 -4
  85. package/src/permission/index.ts +2 -2
  86. package/src/permission/next.ts +10 -10
  87. package/src/plugin/codex.ts +1 -1
  88. package/src/plugin/copilot.ts +2 -2
  89. package/src/plugin/index.ts +1 -1
  90. package/src/project/bootstrap.ts +2 -2
  91. package/src/project/instance.ts +4 -4
  92. package/src/project/project.sql.ts +1 -1
  93. package/src/project/project.ts +5 -5
  94. package/src/project/state.ts +1 -1
  95. package/src/project/vcs.ts +4 -4
  96. package/src/provider/auth.ts +4 -4
  97. package/src/provider/error.ts +1 -1
  98. package/src/provider/models-snapshot.ts +2 -0
  99. package/src/provider/models.ts +1 -1
  100. package/src/provider/provider.ts +2 -2
  101. package/src/provider/transform.ts +2 -2
  102. package/src/pty/index.ts +5 -5
  103. package/src/question/index.ts +5 -5
  104. package/src/server/event.ts +1 -1
  105. package/src/server/mdns.ts +1 -1
  106. package/src/server/routes/global.ts +3 -3
  107. package/src/server/routes/permission.ts +1 -1
  108. package/src/server/routes/pty.ts +1 -1
  109. package/src/server/routes/session.ts +4 -4
  110. package/src/server/routes/tui.ts +1 -1
  111. package/src/server/server.ts +3 -3
  112. package/src/session/compaction.ts +7 -7
  113. package/src/session/index.ts +10 -10
  114. package/src/session/instruction.ts +1 -1
  115. package/src/session/llm.ts +11 -11
  116. package/src/session/message-v2.ts +10 -10
  117. package/src/session/message.ts +1 -1
  118. package/src/session/processor.ts +10 -10
  119. package/src/session/prompt.ts +8 -8
  120. package/src/session/retry.ts +2 -2
  121. package/src/session/revert.ts +1 -1
  122. package/src/session/session.sql.ts +3 -3
  123. package/src/session/status.ts +3 -3
  124. package/src/session/summary.ts +5 -5
  125. package/src/session/system.ts +1 -1
  126. package/src/session/todo.ts +2 -2
  127. package/src/share/share-next.ts +7 -7
  128. package/src/share/share.sql.ts +1 -1
  129. package/src/shell/shell.ts +3 -3
  130. package/src/skill/skill.ts +6 -6
  131. package/src/storage/db.ts +1 -1
  132. package/src/storage/storage.ts +1 -1
  133. package/src/tool/bash.ts +6 -6
  134. package/src/tool/edit.ts +1 -1
  135. package/src/tool/registry.ts +2 -2
  136. package/src/tool/skill.ts +1 -1
  137. package/src/tool/task.ts +3 -3
  138. package/src/util/array.ts +10 -0
  139. package/src/util/binary.ts +41 -0
  140. package/src/util/encode.ts +51 -0
  141. package/src/util/error.ts +54 -0
  142. package/src/util/identifier.ts +48 -0
  143. package/src/util/lazy.ts +4 -16
  144. package/src/util/path.ts +37 -0
  145. package/src/util/retry.ts +41 -0
  146. package/src/util/slug.ts +74 -0
  147. package/src/worktree/index.ts +3 -3
  148. package/AGENTS.md +0 -10
  149. package/BUN_SHELL_MIGRATION_PLAN.md +0 -136
  150. package/Dockerfile +0 -18
  151. package/README.md +0 -15
  152. package/bunfig.toml +0 -7
  153. package/drizzle.config.ts +0 -10
  154. package/package.json.bak +0 -140
  155. package/script/build.ts +0 -224
  156. package/script/check-migrations.ts +0 -16
  157. package/script/postinstall.mjs +0 -131
  158. package/script/publish.ts +0 -181
  159. package/script/schema.ts +0 -63
  160. package/script/seed-e2e.ts +0 -50
  161. package/sst-env.d.ts +0 -10
  162. package/test/AGENTS.md +0 -81
  163. package/test/acp/agent-interface.test.ts +0 -51
  164. package/test/acp/event-subscription.test.ts +0 -683
  165. package/test/agent/agent.test.ts +0 -689
  166. package/test/bun.test.ts +0 -53
  167. package/test/cli/github-action.test.ts +0 -197
  168. package/test/cli/github-remote.test.ts +0 -80
  169. package/test/cli/import.test.ts +0 -38
  170. package/test/cli/plugin-auth-picker.test.ts +0 -120
  171. package/test/cli/tui/transcript.test.ts +0 -322
  172. package/test/config/agent-color.test.ts +0 -71
  173. package/test/config/config.test.ts +0 -1886
  174. package/test/config/fixtures/empty-frontmatter.md +0 -4
  175. package/test/config/fixtures/frontmatter.md +0 -28
  176. package/test/config/fixtures/markdown-header.md +0 -11
  177. package/test/config/fixtures/no-frontmatter.md +0 -1
  178. package/test/config/fixtures/weird-model-id.md +0 -13
  179. package/test/config/markdown.test.ts +0 -228
  180. package/test/config/tui.test.ts +0 -510
  181. package/test/control-plane/session-proxy-middleware.test.ts +0 -147
  182. package/test/control-plane/sse.test.ts +0 -56
  183. package/test/control-plane/workspace-server-sse.test.ts +0 -65
  184. package/test/control-plane/workspace-sync.test.ts +0 -97
  185. package/test/file/ignore.test.ts +0 -10
  186. package/test/file/index.test.ts +0 -394
  187. package/test/file/path-traversal.test.ts +0 -198
  188. package/test/file/ripgrep.test.ts +0 -39
  189. package/test/file/time.test.ts +0 -361
  190. package/test/fixture/db.ts +0 -11
  191. package/test/fixture/fixture.ts +0 -45
  192. package/test/fixture/lsp/fake-lsp-server.js +0 -77
  193. package/test/fixture/skills/agents-sdk/SKILL.md +0 -152
  194. package/test/fixture/skills/agents-sdk/references/callable.md +0 -92
  195. package/test/fixture/skills/cloudflare/SKILL.md +0 -211
  196. package/test/fixture/skills/index.json +0 -6
  197. package/test/ide/ide.test.ts +0 -82
  198. package/test/keybind.test.ts +0 -421
  199. package/test/lsp/client.test.ts +0 -95
  200. package/test/mcp/headers.test.ts +0 -153
  201. package/test/mcp/oauth-browser.test.ts +0 -249
  202. package/test/memory/abort-leak.test.ts +0 -136
  203. package/test/patch/patch.test.ts +0 -348
  204. package/test/permission/arity.test.ts +0 -33
  205. package/test/permission/next.test.ts +0 -689
  206. package/test/permission-task.test.ts +0 -319
  207. package/test/plugin/auth-override.test.ts +0 -44
  208. package/test/plugin/codex.test.ts +0 -123
  209. package/test/preload.ts +0 -80
  210. package/test/project/project.test.ts +0 -348
  211. package/test/project/worktree-remove.test.ts +0 -65
  212. package/test/provider/amazon-bedrock.test.ts +0 -446
  213. package/test/provider/copilot/convert-to-copilot-messages.test.ts +0 -523
  214. package/test/provider/copilot/copilot-chat-model.test.ts +0 -592
  215. package/test/provider/gitlab-duo.test.ts +0 -262
  216. package/test/provider/provider.test.ts +0 -2220
  217. package/test/provider/transform.test.ts +0 -2353
  218. package/test/pty/pty-output-isolation.test.ts +0 -140
  219. package/test/question/question.test.ts +0 -300
  220. package/test/scheduler.test.ts +0 -73
  221. package/test/server/global-session-list.test.ts +0 -89
  222. package/test/server/session-list.test.ts +0 -90
  223. package/test/server/session-select.test.ts +0 -78
  224. package/test/session/compaction.test.ts +0 -423
  225. package/test/session/instruction.test.ts +0 -170
  226. package/test/session/llm.test.ts +0 -667
  227. package/test/session/message-v2.test.ts +0 -924
  228. package/test/session/prompt.test.ts +0 -211
  229. package/test/session/retry.test.ts +0 -188
  230. package/test/session/revert-compact.test.ts +0 -285
  231. package/test/session/session.test.ts +0 -71
  232. package/test/session/structured-output-integration.test.ts +0 -233
  233. package/test/session/structured-output.test.ts +0 -385
  234. package/test/skill/discovery.test.ts +0 -110
  235. package/test/skill/skill.test.ts +0 -388
  236. package/test/snapshot/snapshot.test.ts +0 -1180
  237. package/test/storage/json-migration.test.ts +0 -846
  238. package/test/tool/__snapshots__/tool.test.ts.snap +0 -9
  239. package/test/tool/apply_patch.test.ts +0 -566
  240. package/test/tool/bash.test.ts +0 -402
  241. package/test/tool/edit.test.ts +0 -496
  242. package/test/tool/external-directory.test.ts +0 -127
  243. package/test/tool/fixtures/large-image.png +0 -0
  244. package/test/tool/fixtures/models-api.json +0 -38413
  245. package/test/tool/grep.test.ts +0 -110
  246. package/test/tool/question.test.ts +0 -107
  247. package/test/tool/read.test.ts +0 -504
  248. package/test/tool/registry.test.ts +0 -122
  249. package/test/tool/skill.test.ts +0 -112
  250. package/test/tool/truncation.test.ts +0 -160
  251. package/test/tool/webfetch.test.ts +0 -100
  252. package/test/tool/write.test.ts +0 -348
  253. package/test/util/filesystem.test.ts +0 -443
  254. package/test/util/format.test.ts +0 -59
  255. package/test/util/glob.test.ts +0 -164
  256. package/test/util/iife.test.ts +0 -36
  257. package/test/util/lazy.test.ts +0 -50
  258. package/test/util/lock.test.ts +0 -72
  259. package/test/util/process.test.ts +0 -59
  260. package/test/util/timeout.test.ts +0 -21
  261. package/test/util/wildcard.test.ts +0 -90
  262. package/tsconfig.json +0 -16
package/bin/opencode CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const childProcess = require("child_process")
4
- const fs = require("fs")
5
- const path = require("path")
6
- const os = require("os")
3
+ import childProcess from "child_process"
4
+ import fs from "fs"
5
+ import path from "path"
6
+ import os from "os"
7
7
 
8
8
  function run(target) {
9
9
  const result = childProcess.spawnSync(target, process.argv.slice(2), {
@@ -18,162 +18,34 @@ function run(target) {
18
18
  }
19
19
 
20
20
  const envPath = process.env.OPENCODE_BIN_PATH
21
+
21
22
  if (envPath) {
22
23
  run(envPath)
23
- }
24
-
25
- const scriptPath = fs.realpathSync(__filename)
26
- const scriptDir = path.dirname(scriptPath)
27
-
28
- //
29
- const cached = path.join(scriptDir, ".opencode")
30
- if (fs.existsSync(cached)) {
31
- run(cached)
32
- }
33
-
34
- const platformMap = {
35
- darwin: "darwin",
36
- linux: "linux",
37
- win32: "windows",
38
- }
39
- const archMap = {
40
- x64: "x64",
41
- arm64: "arm64",
42
- arm: "arm",
43
- }
44
-
45
- let platform = platformMap[os.platform()]
46
- if (!platform) {
47
- platform = os.platform()
48
- }
49
- let arch = archMap[os.arch()]
50
- if (!arch) {
51
- arch = os.arch()
52
- }
53
- const base = "opencode-" + platform + "-" + arch
54
- const binary = platform === "windows" ? "opencode.exe" : "opencode"
55
-
56
- function supportsAvx2() {
57
- if (arch !== "x64") return false
58
-
59
- if (platform === "linux") {
60
- try {
61
- return /(^|\s)avx2(\s|$)/i.test(fs.readFileSync("/proc/cpuinfo", "utf8"))
62
- } catch {
63
- return false
64
- }
65
- }
66
-
67
- if (platform === "darwin") {
68
- try {
69
- const result = childProcess.spawnSync("sysctl", ["-n", "hw.optional.avx2_0"], {
70
- encoding: "utf8",
71
- timeout: 1500,
72
- })
73
- if (result.status !== 0) return false
74
- return (result.stdout || "").trim() === "1"
75
- } catch {
76
- return false
77
- }
78
- }
79
-
80
- if (platform === "windows") {
81
- const cmd =
82
- '(Add-Type -MemberDefinition "[DllImport(""kernel32.dll"")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);" -Name Kernel32 -Namespace Win32 -PassThru)::IsProcessorFeaturePresent(40)'
83
-
84
- for (const exe of ["powershell.exe", "pwsh.exe", "pwsh", "powershell"]) {
85
- try {
86
- const result = childProcess.spawnSync(exe, ["-NoProfile", "-NonInteractive", "-Command", cmd], {
87
- encoding: "utf8",
88
- timeout: 3000,
89
- windowsHide: true,
90
- })
91
- if (result.status !== 0) continue
92
- const out = (result.stdout || "").trim().toLowerCase()
93
- if (out === "true" || out === "1") return true
94
- if (out === "false" || out === "0") return false
95
- } catch {
96
- continue
97
- }
24
+ } else {
25
+ const __dirname = path.dirname(new URL(import.meta.url).pathname)
26
+ const target = path.resolve(__dirname, "../src/index.ts")
27
+
28
+ // Check if we're running from a local build or from node_modules
29
+ let bunPath = null
30
+ const possiblePaths = [
31
+ path.resolve(__dirname, "../node_modules/.bin/bun"),
32
+ path.resolve(__dirname, "../../../.bun/bin/bun"),
33
+ path.resolve(os.homedir(), ".bun/bin/bun"),
34
+ "/usr/local/bin/bun",
35
+ "/opt/homebrew/bin/bun",
36
+ ]
37
+
38
+ for (const p of possiblePaths) {
39
+ if (fs.existsSync(p)) {
40
+ bunPath = p
41
+ break
98
42
  }
99
-
100
- return false
101
- }
102
-
103
- return false
104
- }
105
-
106
- const names = (() => {
107
- const avx2 = supportsAvx2()
108
- const baseline = arch === "x64" && !avx2
109
-
110
- if (platform === "linux") {
111
- const musl = (() => {
112
- try {
113
- if (fs.existsSync("/etc/alpine-release")) return true
114
- } catch {
115
- // ignore
116
- }
117
-
118
- try {
119
- const result = childProcess.spawnSync("ldd", ["--version"], { encoding: "utf8" })
120
- const text = ((result.stdout || "") + (result.stderr || "")).toLowerCase()
121
- if (text.includes("musl")) return true
122
- } catch {
123
- // ignore
124
- }
125
-
126
- return false
127
- })()
128
-
129
- if (musl) {
130
- if (arch === "x64") {
131
- if (baseline) return [`${base}-baseline-musl`, `${base}-musl`, `${base}-baseline`, base]
132
- return [`${base}-musl`, `${base}-baseline-musl`, base, `${base}-baseline`]
133
- }
134
- return [`${base}-musl`, base]
135
- }
136
-
137
- if (arch === "x64") {
138
- if (baseline) return [`${base}-baseline`, base, `${base}-baseline-musl`, `${base}-musl`]
139
- return [base, `${base}-baseline`, `${base}-musl`, `${base}-baseline-musl`]
140
- }
141
- return [base, `${base}-musl`]
142
43
  }
143
-
144
- if (arch === "x64") {
145
- if (baseline) return [`${base}-baseline`, base]
146
- return [base, `${base}-baseline`]
147
- }
148
- return [base]
149
- })()
150
-
151
- function findBinary(startDir) {
152
- let current = startDir
153
- for (;;) {
154
- const modules = path.join(current, "node_modules")
155
- if (fs.existsSync(modules)) {
156
- for (const name of names) {
157
- const candidate = path.join(modules, name, "bin", binary)
158
- if (fs.existsSync(candidate)) return candidate
159
- }
160
- }
161
- const parent = path.dirname(current)
162
- if (parent === current) {
163
- return
164
- }
165
- current = parent
44
+
45
+ if (bunPath) {
46
+ run(bunPath)
47
+ } else {
48
+ // Fallback: try to run with bun from PATH
49
+ run("bun")
166
50
  }
167
51
  }
168
-
169
- const resolved = findBinary(scriptDir)
170
- if (!resolved) {
171
- console.error(
172
- "It seems that your package manager failed to install the right version of the opencode CLI for your platform. You can try manually installing " +
173
- names.map((n) => `\"${n}\"`).join(" or ") +
174
- " package",
175
- )
176
- process.exit(1)
177
- }
178
-
179
- run(resolved)
package/package.json CHANGED
@@ -1,34 +1,36 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.2.16-offline.1",
3
+ "version": "1.2.18",
4
4
  "name": "@stonerzju/opencode",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
-
8
7
  "scripts": {
9
8
  "typecheck": "tsgo --noEmit",
10
9
  "test": "bun test --timeout 30000",
11
10
  "build": "bun run script/build.ts",
12
11
  "dev": "bun run --conditions=browser ./src/index.ts",
13
- "random": "echo 'Random script updated at $(date)' && echo 'Change queued successfully' && echo 'Another change made' && echo 'Yet another change' && echo 'One more change' && echo 'Final change' && echo 'Another final change' && echo 'Yet another final change'",
14
12
  "clean": "echo 'Cleaning up...' && rm -rf node_modules dist",
15
13
  "lint": "echo 'Running lint checks...' && bun test --coverage",
16
14
  "format": "echo 'Formatting code...' && bun run --prettier --write src/**/*.ts",
17
15
  "docs": "echo 'Generating documentation...' && find src -name '*.ts' -exec echo 'Processing: {}' \\;",
18
16
  "deploy": "echo 'Deploying application...' && bun run build && echo 'Deployment completed successfully'",
19
- "db": "bun drizzle-kit"
17
+ "db": "bun drizzle-kit",
18
+ "prepublishOnly": "node ../../scripts/validate-publish.js"
20
19
  },
21
20
  "bin": {
22
21
  "opencode": "./bin/opencode"
23
22
  },
24
- "randomField": "this-is-a-random-value-12345",
25
- "exports": {
26
- "./*": "./src/*.ts"
27
- },
23
+ "files": [
24
+ "bin",
25
+ "src",
26
+ "README.md",
27
+ "LICENSE",
28
+ "parsers-config.ts",
29
+ "migration"
30
+ ],
28
31
  "devDependencies": {
29
32
  "@babel/core": "7.28.4",
30
33
  "@octokit/webhooks-types": "7.6.1",
31
- "@opencode-ai/script": "workspace:*",
32
34
  "@parcel/watcher-darwin-arm64": "2.5.1",
33
35
  "@parcel/watcher-darwin-x64": "2.5.1",
34
36
  "@parcel/watcher-linux-arm64-glibc": "2.5.1",
@@ -37,16 +39,16 @@
37
39
  "@parcel/watcher-linux-x64-musl": "2.5.1",
38
40
  "@parcel/watcher-win32-x64": "2.5.1",
39
41
  "@standard-schema/spec": "1.0.0",
40
- "@tsconfig/bun": "catalog:",
42
+ "@tsconfig/bun": "1.0.9",
41
43
  "@types/babel__core": "7.20.5",
42
- "@types/bun": "catalog:",
44
+ "@types/bun": "1.3.9",
43
45
  "@types/mime-types": "3.0.1",
44
46
  "@types/turndown": "5.0.5",
45
47
  "@types/yargs": "17.0.33",
46
- "@typescript/native-preview": "catalog:",
48
+ "@typescript/native-preview": "7.0.0-dev.20251207.1",
47
49
  "drizzle-kit": "1.0.0-beta.12-a5629fb",
48
50
  "drizzle-orm": "1.0.0-beta.12-a5629fb",
49
- "typescript": "catalog:",
51
+ "typescript": "5.8.2",
50
52
  "vscode-languageserver-types": "3.17.5",
51
53
  "why-is-node-running": "3.2.2",
52
54
  "zod-to-json-schema": "3.24.5"
@@ -79,39 +81,37 @@
79
81
  "@gitlab/gitlab-ai-provider": "3.6.0",
80
82
  "@gitlab/opencode-gitlab-auth": "1.3.3",
81
83
  "@hono/standard-validator": "0.1.5",
82
- "@hono/zod-validator": "catalog:",
84
+ "@hono/zod-validator": "0.4.2",
83
85
  "@modelcontextprotocol/sdk": "1.25.2",
84
86
  "@octokit/graphql": "9.0.2",
85
- "@octokit/rest": "catalog:",
86
- "@openauthjs/openauth": "catalog:",
87
- "@opencode-ai/plugin": "workspace:*",
88
- "@opencode-ai/script": "workspace:*",
89
- "@opencode-ai/sdk": "workspace:*",
90
- "@opencode-ai/util": "workspace:*",
87
+ "@octokit/rest": "22.0.0",
88
+ "@openauthjs/openauth": "0.0.0-20250322224806",
89
+ "@opencode-ai/plugin": "1.2.15",
90
+ "@opencode-ai/sdk": "1.2.15",
91
91
  "@openrouter/ai-sdk-provider": "1.5.4",
92
92
  "@opentui/core": "0.1.81",
93
93
  "@opentui/solid": "0.1.81",
94
94
  "@parcel/watcher": "2.5.1",
95
- "@pierre/diffs": "catalog:",
95
+ "@pierre/diffs": "1.1.0-beta.18",
96
96
  "@solid-primitives/event-bus": "1.1.2",
97
97
  "@solid-primitives/scheduled": "1.5.2",
98
98
  "@standard-schema/spec": "1.0.0",
99
99
  "@zip.js/zip.js": "2.7.62",
100
- "ai": "catalog:",
100
+ "ai": "5.0.124",
101
101
  "ai-gateway-provider": "2.3.1",
102
102
  "bonjour-service": "1.3.0",
103
103
  "bun-pty": "0.4.8",
104
104
  "chokidar": "4.0.3",
105
105
  "clipboardy": "4.0.0",
106
106
  "decimal.js": "10.5.0",
107
- "diff": "catalog:",
107
+ "diff": "8.0.2",
108
108
  "drizzle-orm": "1.0.0-beta.12-a5629fb",
109
109
  "fuzzysort": "3.1.0",
110
110
  "glob": "13.0.5",
111
111
  "google-auth-library": "10.5.0",
112
112
  "gray-matter": "4.0.3",
113
- "hono": "catalog:",
114
- "hono-openapi": "catalog:",
113
+ "hono": "4.10.7",
114
+ "hono-openapi": "1.1.2",
115
115
  "ignore": "7.0.5",
116
116
  "jsonc-parser": "3.3.1",
117
117
  "mime-types": "3.0.2",
@@ -121,17 +121,17 @@
121
121
  "partial-json": "0.1.7",
122
122
  "react": "19.2.4",
123
123
  "react-dom": "19.2.4",
124
- "remeda": "catalog:",
125
- "solid-js": "catalog:",
124
+ "remeda": "2.26.0",
125
+ "solid-js": "1.9.10",
126
126
  "strip-ansi": "7.1.2",
127
127
  "tree-sitter-bash": "0.25.0",
128
128
  "turndown": "7.2.0",
129
- "ulid": "catalog:",
129
+ "ulid": "3.0.1",
130
130
  "vscode-jsonrpc": "8.2.1",
131
131
  "web-tree-sitter": "0.25.10",
132
132
  "xdg-basedir": "5.1.0",
133
133
  "yargs": "18.0.0",
134
- "zod": "catalog:",
134
+ "zod": "4.1.8",
135
135
  "zod-to-json-schema": "3.24.5"
136
136
  },
137
137
  "overrides": {
package/src/acp/agent.ts CHANGED
@@ -35,10 +35,10 @@ import { ACPSessionManager } from "./session"
35
35
  import type { ACPConfig } from "./types"
36
36
  import { Provider } from "../provider/provider"
37
37
  import { Agent as AgentModule } from "../agent/agent"
38
- import { Installation } from "@/installation"
39
- import { MessageV2 } from "@/session/message-v2"
40
- import { Config } from "@/config/config"
41
- import { Todo } from "@/session/todo"
38
+ import { Installation } from "../installation"
39
+ import { MessageV2 } from "../session/message-v2"
40
+ import { Config } from "../config/config"
41
+ import { Todo } from "../session/todo"
42
42
  import { z } from "zod"
43
43
  import { LoadAPIKeyError } from "ai"
44
44
  import type { AssistantMessage, Event, OpencodeClient, SessionMessageResponse, ToolPart } from "@opencode-ai/sdk/v2"
@@ -1,6 +1,6 @@
1
1
  import { RequestError, type McpServer } from "@agentclientprotocol/sdk"
2
2
  import type { ACPSessionState } from "./types"
3
- import { Log } from "@/util/log"
3
+ import { Log } from "../util/log"
4
4
  import type { OpencodeClient } from "@opencode-ai/sdk/v2"
5
5
 
6
6
  const log = Log.create({ service: "acp-session-manager" })
@@ -13,11 +13,11 @@ import PROMPT_COMPACTION from "./prompt/compaction.txt"
13
13
  import PROMPT_EXPLORE from "./prompt/explore.txt"
14
14
  import PROMPT_SUMMARY from "./prompt/summary.txt"
15
15
  import PROMPT_TITLE from "./prompt/title.txt"
16
- import { PermissionNext } from "@/permission/next"
16
+ import { PermissionNext } from "../permission/next"
17
17
  import { mergeDeep, pipe, sortBy, values } from "remeda"
18
- import { Global } from "@/global"
18
+ import { Global } from "../global"
19
19
  import path from "path"
20
- import { Plugin } from "@/plugin"
20
+ import { Plugin } from "../plugin"
21
21
  import { Skill } from "../skill"
22
22
 
23
23
  export namespace Agent {
package/src/bun/index.ts CHANGED
@@ -3,11 +3,11 @@ import { Global } from "../global"
3
3
  import { Log } from "../util/log"
4
4
  import path from "path"
5
5
  import { Filesystem } from "../util/filesystem"
6
- import { NamedError } from "@opencode-ai/util/error"
6
+ import { NamedError } from "../util/error"
7
7
  import { text } from "node:stream/consumers"
8
8
  import { Lock } from "../util/lock"
9
9
  import { PackageRegistry } from "./registry"
10
- import { proxied } from "@/util/proxied"
10
+ import { proxied } from "../util/proxied"
11
11
  import { Process } from "../util/process"
12
12
 
13
13
  export namespace BunProc {
@@ -1,9 +1,9 @@
1
- import { Log } from "@/util/log"
1
+ import { Log } from "../../util/log"
2
2
  import { bootstrap } from "../bootstrap"
3
3
  import { cmd } from "./cmd"
4
4
  import { AgentSideConnection, ndJsonStream } from "@agentclientprotocol/sdk"
5
- import { ACP } from "@/acp/agent"
6
- import { Server } from "@/server/server"
5
+ import { ACP } from "../../acp/agent"
6
+ import { Server } from "../../server/server"
7
7
  import { createOpencodeClient } from "@opencode-ai/sdk/v2"
8
8
  import { withNetworkOptions, resolveNetworkOptions } from "../network"
9
9
 
@@ -2,7 +2,7 @@ import { EOL } from "os"
2
2
  import { File } from "../../../file"
3
3
  import { bootstrap } from "../../bootstrap"
4
4
  import { cmd } from "../cmd"
5
- import { Ripgrep } from "@/file/ripgrep"
5
+ import { Ripgrep } from "../../../file/ripgrep"
6
6
 
7
7
  const FileSearchCommand = cmd({
8
8
  command: "search <query>",
@@ -19,14 +19,14 @@ import type {
19
19
  import { UI } from "../ui"
20
20
  import { cmd } from "./cmd"
21
21
  import { ModelsDev } from "../../provider/models"
22
- import { Instance } from "@/project/instance"
22
+ import { Instance } from "../../project/instance"
23
23
  import { bootstrap } from "../bootstrap"
24
24
  import { Session } from "../../session"
25
25
  import { Identifier } from "../../id/id"
26
26
  import { Provider } from "../../provider/provider"
27
27
  import { Bus } from "../../bus"
28
28
  import { MessageV2 } from "../../session/message-v2"
29
- import { SessionPrompt } from "@/session/prompt"
29
+ import { SessionPrompt } from "../../session/prompt"
30
30
  import { $ } from "bun"
31
31
 
32
32
  type GitHubAuthor = {
package/src/cli/cmd/pr.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { UI } from "../ui"
2
2
  import { cmd } from "./cmd"
3
- import { Instance } from "@/project/instance"
3
+ import { Instance } from "../../project/instance"
4
4
  import { $ } from "bun"
5
5
 
6
6
  export const PrCommand = cmd({
@@ -1,45 +1,45 @@
1
1
  import { render, useKeyboard, useRenderer, useTerminalDimensions } from "@opentui/solid"
2
- import { Clipboard } from "@tui/util/clipboard"
3
- import { Selection } from "@tui/util/selection"
2
+ import { Clipboard } from "./util/clipboard"
3
+ import { Selection } from "./util/selection"
4
4
  import { MouseButton, TextAttributes } from "@opentui/core"
5
- import { RouteProvider, useRoute } from "@tui/context/route"
5
+ import { RouteProvider, useRoute } from "./context/route"
6
6
  import { Switch, Match, createEffect, untrack, ErrorBoundary, createSignal, onMount, batch, Show, on } from "solid-js"
7
7
  import { win32DisableProcessedInput, win32FlushInputBuffer, win32InstallCtrlCGuard } from "./win32"
8
- import { Installation } from "@/installation"
9
- import { Flag } from "@/flag/flag"
10
- import { DialogProvider, useDialog } from "@tui/ui/dialog"
11
- import { DialogProvider as DialogProviderList } from "@tui/component/dialog-provider"
12
- import { SDKProvider, useSDK } from "@tui/context/sdk"
13
- import { SyncProvider, useSync } from "@tui/context/sync"
14
- import { LocalProvider, useLocal } from "@tui/context/local"
15
- import { DialogModel, useConnected } from "@tui/component/dialog-model"
16
- import { DialogMcp } from "@tui/component/dialog-mcp"
17
- import { DialogStatus } from "@tui/component/dialog-status"
18
- import { DialogThemeList } from "@tui/component/dialog-theme-list"
8
+ import { Installation } from "../../../installation"
9
+ import { Flag } from "../../../flag/flag"
10
+ import { DialogProvider, useDialog } from "./ui/dialog"
11
+ import { DialogProvider as DialogProviderList } from "./component/dialog-provider"
12
+ import { SDKProvider, useSDK } from "./context/sdk"
13
+ import { SyncProvider, useSync } from "./context/sync"
14
+ import { LocalProvider, useLocal } from "./context/local"
15
+ import { DialogModel, useConnected } from "./component/dialog-model"
16
+ import { DialogMcp } from "./component/dialog-mcp"
17
+ import { DialogStatus } from "./component/dialog-status"
18
+ import { DialogThemeList } from "./component/dialog-theme-list"
19
19
  import { DialogHelp } from "./ui/dialog-help"
20
- import { CommandProvider, useCommandDialog } from "@tui/component/dialog-command"
21
- import { DialogAgent } from "@tui/component/dialog-agent"
22
- import { DialogSessionList } from "@tui/component/dialog-session-list"
23
- import { KeybindProvider } from "@tui/context/keybind"
24
- import { ThemeProvider, useTheme } from "@tui/context/theme"
25
- import { Home } from "@tui/routes/home"
26
- import { Session } from "@tui/routes/session"
20
+ import { CommandProvider, useCommandDialog } from "./component/dialog-command"
21
+ import { DialogAgent } from "./component/dialog-agent"
22
+ import { DialogSessionList } from "./component/dialog-session-list"
23
+ import { KeybindProvider } from "./context/keybind"
24
+ import { ThemeProvider, useTheme } from "./context/theme"
25
+ import { Home } from "./routes/home"
26
+ import { Session } from "./routes/session"
27
27
  import { PromptHistoryProvider } from "./component/prompt/history"
28
28
  import { FrecencyProvider } from "./component/prompt/frecency"
29
29
  import { PromptStashProvider } from "./component/prompt/stash"
30
30
  import { DialogAlert } from "./ui/dialog-alert"
31
31
  import { ToastProvider, useToast } from "./ui/toast"
32
32
  import { ExitProvider, useExit } from "./context/exit"
33
- import { Session as SessionApi } from "@/session"
33
+ import { Session as SessionApi } from "../../../session"
34
34
  import { TuiEvent } from "./event"
35
35
  import { KVProvider, useKV } from "./context/kv"
36
- import { Provider } from "@/provider/provider"
36
+ import { Provider } from "../../../provider/provider"
37
37
  import { ArgsProvider, useArgs, type Args } from "./context/args"
38
38
  import open from "open"
39
39
  import { writeHeapSnapshot } from "v8"
40
40
  import { PromptRefProvider, usePromptRef } from "./context/prompt"
41
41
  import { TuiConfigProvider } from "./context/tui-config"
42
- import { TuiConfig } from "@/config/tui"
42
+ import { TuiConfig } from "../../../config/tui"
43
43
 
44
44
  async function getTerminalBackgroundColor(): Promise<"dark" | "light"> {
45
45
  // can't set raw mode if not a TTY
@@ -1,9 +1,9 @@
1
1
  import { cmd } from "../cmd"
2
- import { UI } from "@/cli/ui"
2
+ import { UI } from "../../ui"
3
3
  import { tui } from "./app"
4
4
  import { win32DisableProcessedInput, win32InstallCtrlCGuard } from "./win32"
5
- import { TuiConfig } from "@/config/tui"
6
- import { Instance } from "@/project/instance"
5
+ import { TuiConfig } from "../../../config/tui"
6
+ import { Instance } from "../../../project/instance"
7
7
  import { existsSync } from "fs"
8
8
 
9
9
  export const AttachCommand = cmd({
@@ -1,7 +1,7 @@
1
1
  import { createMemo } from "solid-js"
2
- import { useLocal } from "@tui/context/local"
3
- import { DialogSelect } from "@tui/ui/dialog-select"
4
- import { useDialog } from "@tui/ui/dialog"
2
+ import { useLocal } from "../context/local"
3
+ import { DialogSelect } from "../ui/dialog-select"
4
+ import { useDialog } from "../ui/dialog"
5
5
 
6
6
  export function DialogAgent() {
7
7
  const local = useLocal()
@@ -1,5 +1,5 @@
1
- import { useDialog } from "@tui/ui/dialog"
2
- import { DialogSelect, type DialogSelectOption, type DialogSelectRef } from "@tui/ui/dialog-select"
1
+ import { useDialog } from "../ui/dialog"
2
+ import { DialogSelect, type DialogSelectOption, type DialogSelectRef } from "../ui/dialog-select"
3
3
  import {
4
4
  createContext,
5
5
  createMemo,
@@ -10,7 +10,7 @@ import {
10
10
  type ParentProps,
11
11
  } from "solid-js"
12
12
  import { useKeyboard } from "@opentui/solid"
13
- import { type KeybindKey, useKeybind } from "@tui/context/keybind"
13
+ import { type KeybindKey, useKeybind } from "../context/keybind"
14
14
 
15
15
  type Context = ReturnType<typeof init>
16
16
  const ctx = createContext<Context>()
@@ -1,12 +1,12 @@
1
1
  import { createMemo, createSignal } from "solid-js"
2
- import { useLocal } from "@tui/context/local"
3
- import { useSync } from "@tui/context/sync"
2
+ import { useLocal } from "../context/local"
3
+ import { useSync } from "../context/sync"
4
4
  import { map, pipe, entries, sortBy } from "remeda"
5
- import { DialogSelect, type DialogSelectRef, type DialogSelectOption } from "@tui/ui/dialog-select"
5
+ import { DialogSelect, type DialogSelectRef, type DialogSelectOption } from "../ui/dialog-select"
6
6
  import { useTheme } from "../context/theme"
7
- import { Keybind } from "@/util/keybind"
7
+ import { Keybind } from "../../../../util/keybind"
8
8
  import { TextAttributes } from "@opentui/core"
9
- import { useSDK } from "@tui/context/sdk"
9
+ import { useSDK } from "../context/sdk"
10
10
 
11
11
  function Status(props: { enabled: boolean; loading: boolean }) {
12
12
  const { theme } = useTheme()
@@ -1,9 +1,9 @@
1
1
  import { createMemo, createSignal } from "solid-js"
2
- import { useLocal } from "@tui/context/local"
3
- import { useSync } from "@tui/context/sync"
2
+ import { useLocal } from "../context/local"
3
+ import { useSync } from "../context/sync"
4
4
  import { map, pipe, flatMap, entries, filter, sortBy, take } from "remeda"
5
- import { DialogSelect } from "@tui/ui/dialog-select"
6
- import { useDialog } from "@tui/ui/dialog"
5
+ import { DialogSelect } from "../ui/dialog-select"
6
+ import { useDialog } from "../ui/dialog"
7
7
  import { createDialogProviderOptions, DialogProvider } from "./dialog-provider"
8
8
  import { useKeybind } from "../context/keybind"
9
9
  import * as fuzzysort from "fuzzysort"
@@ -1,8 +1,8 @@
1
1
  import { createMemo, createSignal, onMount, Show } from "solid-js"
2
- import { useSync } from "@tui/context/sync"
2
+ import { useSync } from "../context/sync"
3
3
  import { map, pipe, sortBy } from "remeda"
4
- import { DialogSelect } from "@tui/ui/dialog-select"
5
- import { useDialog } from "@tui/ui/dialog"
4
+ import { DialogSelect } from "../ui/dialog-select"
5
+ import { useDialog } from "../ui/dialog"
6
6
  import { useSDK } from "../context/sdk"
7
7
  import { DialogPrompt } from "../ui/dialog-prompt"
8
8
  import { Link } from "../ui/link"
@@ -11,7 +11,7 @@ import { TextAttributes } from "@opentui/core"
11
11
  import type { ProviderAuthAuthorization } from "@opencode-ai/sdk/v2"
12
12
  import { DialogModel } from "./dialog-model"
13
13
  import { useKeyboard } from "@opentui/solid"
14
- import { Clipboard } from "@tui/util/clipboard"
14
+ import { Clipboard } from "../util/clipboard"
15
15
  import { useToast } from "../ui/toast"
16
16
 
17
17
  const PROVIDER_PRIORITY: Record<string, number> = {
@@ -1,9 +1,9 @@
1
- import { useDialog } from "@tui/ui/dialog"
2
- import { DialogSelect } from "@tui/ui/dialog-select"
3
- import { useRoute } from "@tui/context/route"
4
- import { useSync } from "@tui/context/sync"
1
+ import { useDialog } from "../ui/dialog"
2
+ import { DialogSelect } from "../ui/dialog-select"
3
+ import { useRoute } from "../context/route"
4
+ import { useSync } from "../context/sync"
5
5
  import { createMemo, createSignal, createResource, onMount, Show } from "solid-js"
6
- import { Locale } from "@/util/locale"
6
+ import { Locale } from "../../../../util/locale"
7
7
  import { useKeybind } from "../context/keybind"
8
8
  import { useTheme } from "../context/theme"
9
9
  import { useSDK } from "../context/sdk"
@@ -1,6 +1,6 @@
1
- import { DialogPrompt } from "@tui/ui/dialog-prompt"
2
- import { useDialog } from "@tui/ui/dialog"
3
- import { useSync } from "@tui/context/sync"
1
+ import { DialogPrompt } from "../ui/dialog-prompt"
2
+ import { useDialog } from "../ui/dialog"
3
+ import { useSync } from "../context/sync"
4
4
  import { createMemo } from "solid-js"
5
5
  import { useSDK } from "../context/sdk"
6
6