anymous 1.0.5 → 1.1.0

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 (284) hide show
  1. package/LICENSE +21 -0
  2. package/bin/anymous.cjs +45 -45
  3. package/package.json +1 -1
  4. package/{script/postinstall.mjs → postinstall.mjs} +5 -5
  5. package/src/account/account.ts +5 -5
  6. package/src/account/repo.ts +5 -5
  7. package/src/acp/agent.ts +2 -2
  8. package/src/acp/content.ts +1 -1
  9. package/src/acp/directory.ts +5 -5
  10. package/src/acp/event.ts +4 -4
  11. package/src/acp/permission.ts +2 -2
  12. package/src/acp/profile.ts +1 -1
  13. package/src/acp/service.ts +24 -24
  14. package/src/acp/session.ts +5 -5
  15. package/src/acp/usage.ts +11 -11
  16. package/src/agent/agent.ts +13 -13
  17. package/src/agent/prompt/debug-tools.txt +40 -40
  18. package/src/agent/prompt/exe-extractor.txt +39 -39
  19. package/src/agent/prompt/memory-dump.txt +37 -37
  20. package/src/agent/prompt/reverser-automator.txt +38 -38
  21. package/src/agent/prompt/reverser-binary.txt +39 -39
  22. package/src/agent/prompt/reverser-dynamic.txt +36 -36
  23. package/src/agent/prompt/reverser-source.txt +38 -38
  24. package/src/agent/prompt/reverser-static.txt +35 -35
  25. package/src/agent/subagent-permissions.ts +1 -1
  26. package/src/auth/index.ts +8 -8
  27. package/src/background/job.ts +3 -3
  28. package/src/cli/cmd/account.ts +1 -1
  29. package/src/cli/cmd/acp.ts +3 -3
  30. package/src/cli/cmd/agent.ts +2 -2
  31. package/src/cli/cmd/attach.ts +3 -3
  32. package/src/cli/cmd/db.ts +1 -1
  33. package/src/cli/cmd/debug/agent.handler.ts +2 -2
  34. package/src/cli/cmd/debug/file.ts +4 -4
  35. package/src/cli/cmd/debug/index.ts +5 -5
  36. package/src/cli/cmd/debug/ripgrep.ts +1 -1
  37. package/src/cli/cmd/debug/scrap.ts +2 -2
  38. package/src/cli/cmd/debug/v2.ts +4 -4
  39. package/src/cli/cmd/export.ts +1 -1
  40. package/src/cli/cmd/generate.ts +2 -2
  41. package/src/cli/cmd/github.handler.ts +27 -27
  42. package/src/cli/cmd/github.shared.ts +1 -1
  43. package/src/cli/cmd/import.ts +5 -5
  44. package/src/cli/cmd/mcp.ts +13 -13
  45. package/src/cli/cmd/models.ts +6 -6
  46. package/src/cli/cmd/plug.ts +2 -2
  47. package/src/cli/cmd/pr.ts +6 -6
  48. package/src/cli/cmd/prompt-display.ts +1 -1
  49. package/src/cli/cmd/providers.ts +12 -12
  50. package/src/cli/cmd/run/demo.ts +3 -3
  51. package/src/cli/cmd/run/footer.command.tsx +2 -2
  52. package/src/cli/cmd/run/footer.permission.tsx +1 -1
  53. package/src/cli/cmd/run/footer.prompt.tsx +9 -9
  54. package/src/cli/cmd/run/footer.question.tsx +1 -1
  55. package/src/cli/cmd/run/footer.subagent.tsx +3 -3
  56. package/src/cli/cmd/run/footer.ts +2 -2
  57. package/src/cli/cmd/run/footer.view.tsx +9 -9
  58. package/src/cli/cmd/run/permission.shared.ts +1 -1
  59. package/src/cli/cmd/run/question.shared.ts +1 -1
  60. package/src/cli/cmd/run/runtime.boot.ts +2 -2
  61. package/src/cli/cmd/run/runtime.lifecycle.ts +4 -4
  62. package/src/cli/cmd/run/runtime.ts +6 -6
  63. package/src/cli/cmd/run/session-data.ts +1 -1
  64. package/src/cli/cmd/run/session-replay.ts +1 -1
  65. package/src/cli/cmd/run/splash.ts +13 -5
  66. package/src/cli/cmd/run/stream.transport.ts +3 -3
  67. package/src/cli/cmd/run/subagent-data.ts +1 -1
  68. package/src/cli/cmd/run/theme.ts +2 -2
  69. package/src/cli/cmd/run/tool.ts +2 -2
  70. package/src/cli/cmd/run/trace.ts +4 -4
  71. package/src/cli/cmd/run/types.ts +13 -13
  72. package/src/cli/cmd/run/variant.shared.ts +5 -5
  73. package/src/cli/cmd/run.ts +22 -22
  74. package/src/cli/cmd/serve.ts +4 -4
  75. package/src/cli/cmd/session.ts +4 -4
  76. package/src/cli/cmd/stats.ts +2 -2
  77. package/src/cli/cmd/tui.ts +7 -7
  78. package/src/cli/cmd/uninstall.ts +19 -19
  79. package/src/cli/cmd/upgrade.ts +14 -14
  80. package/src/cli/cmd/web.ts +4 -4
  81. package/src/cli/error.ts +1 -1
  82. package/src/cli/heap.ts +3 -3
  83. package/src/cli/logo.ts +1 -1
  84. package/src/cli/network.ts +1 -1
  85. package/src/cli/tui/layer.ts +3 -3
  86. package/src/cli/tui/validate-session.ts +2 -2
  87. package/src/cli/ui.ts +12 -9
  88. package/src/cli/upgrade.ts +11 -11
  89. package/src/command/index.ts +3 -3
  90. package/src/command/template/initialize.txt +3 -3
  91. package/src/config/agent.ts +2 -2
  92. package/src/config/command.ts +3 -3
  93. package/src/config/config.ts +49 -49
  94. package/src/config/managed.ts +6 -6
  95. package/src/config/markdown.ts +2 -2
  96. package/src/config/parse.ts +2 -2
  97. package/src/config/paths.ts +7 -7
  98. package/src/config/plugin.ts +2 -2
  99. package/src/config/tui-host-attention.ts +2 -2
  100. package/src/config/tui-migrate.ts +12 -12
  101. package/src/config/tui.ts +23 -23
  102. package/src/config/variable.ts +1 -1
  103. package/src/control-plane/adapters/index.ts +1 -1
  104. package/src/control-plane/dev/README.md +5 -5
  105. package/src/control-plane/dev/debug-workspace-plugin.ts +2 -2
  106. package/src/control-plane/types.ts +3 -3
  107. package/src/control-plane/workspace-context.ts +1 -1
  108. package/src/control-plane/workspace.ts +17 -17
  109. package/src/effect/app-node-builder-v1.ts +2 -2
  110. package/src/effect/app-runtime.ts +9 -9
  111. package/src/effect/bootstrap-runtime.ts +4 -4
  112. package/src/effect/bridge.ts +1 -1
  113. package/src/effect/config-service.ts +3 -3
  114. package/src/effect/instance-ref.ts +3 -3
  115. package/src/effect/instance-state.ts +1 -1
  116. package/src/effect/run-service.ts +2 -2
  117. package/src/effect/runtime-flags.ts +34 -34
  118. package/src/env/index.ts +3 -3
  119. package/src/event-manifest.ts +1 -1
  120. package/src/event-v2-bridge.ts +7 -7
  121. package/src/format/formatter.ts +2 -2
  122. package/src/format/index.ts +4 -4
  123. package/src/git/index.ts +3 -3
  124. package/src/ide/index.ts +4 -4
  125. package/src/image/image.ts +4 -4
  126. package/src/index.ts +1 -1
  127. package/src/installation/index.ts +32 -32
  128. package/src/lsp/lsp.ts +5 -5
  129. package/src/lsp/server.ts +5 -5
  130. package/src/mcp/auth.ts +6 -6
  131. package/src/mcp/browser.ts +2 -2
  132. package/src/mcp/index.ts +17 -17
  133. package/src/mcp/oauth-callback.ts +1 -1
  134. package/src/mcp/oauth-provider.ts +2 -2
  135. package/src/node.ts +1 -1
  136. package/src/patch/index.ts +1 -1
  137. package/src/permission/index.ts +5 -5
  138. package/src/plugin/azure.ts +1 -1
  139. package/src/plugin/cloudflare.ts +1 -1
  140. package/src/plugin/digitalocean.ts +6 -6
  141. package/src/plugin/github-copilot/copilot.ts +7 -7
  142. package/src/plugin/github-copilot/models.ts +2 -2
  143. package/src/plugin/index.ts +7 -7
  144. package/src/plugin/install.ts +6 -6
  145. package/src/plugin/loader.ts +3 -3
  146. package/src/plugin/meta.ts +4 -4
  147. package/src/plugin/openai/README.md +1 -1
  148. package/src/plugin/openai/codex.ts +8 -8
  149. package/src/plugin/openai/ws-pool.ts +1 -1
  150. package/src/plugin/pty-environment.ts +1 -1
  151. package/src/plugin/shared.ts +7 -7
  152. package/src/plugin/snowflake-cortex.ts +6 -6
  153. package/src/plugin/tui/internal.ts +1 -1
  154. package/src/plugin/tui/runtime.ts +17 -17
  155. package/src/plugin/xai.ts +8 -8
  156. package/src/project/bootstrap-service.ts +1 -1
  157. package/src/project/bootstrap.ts +1 -1
  158. package/src/project/instance-context.ts +1 -1
  159. package/src/project/instance-store.ts +5 -5
  160. package/src/project/project.ts +18 -18
  161. package/src/project/vcs.ts +5 -5
  162. package/src/provider/auth.ts +6 -6
  163. package/src/provider/error.ts +3 -3
  164. package/src/provider/model-status.ts +1 -1
  165. package/src/provider/provider.ts +38 -38
  166. package/src/provider/transform.ts +4 -4
  167. package/src/question/index.ts +3 -3
  168. package/src/question/schema.ts +1 -1
  169. package/src/server/auth.ts +6 -6
  170. package/src/server/event.ts +1 -1
  171. package/src/server/mdns.ts +2 -2
  172. package/src/server/proxy-util.ts +2 -2
  173. package/src/server/routes/instance/httpapi/api.ts +10 -10
  174. package/src/server/routes/instance/httpapi/groups/config.ts +4 -4
  175. package/src/server/routes/instance/httpapi/groups/control-plane.ts +1 -1
  176. package/src/server/routes/instance/httpapi/groups/control.ts +1 -1
  177. package/src/server/routes/instance/httpapi/groups/experimental.ts +7 -7
  178. package/src/server/routes/instance/httpapi/groups/file.ts +3 -3
  179. package/src/server/routes/instance/httpapi/groups/global.ts +10 -10
  180. package/src/server/routes/instance/httpapi/groups/instance.ts +6 -6
  181. package/src/server/routes/instance/httpapi/groups/mcp.ts +2 -2
  182. package/src/server/routes/instance/httpapi/groups/permission.ts +2 -2
  183. package/src/server/routes/instance/httpapi/groups/project-copy.ts +1 -1
  184. package/src/server/routes/instance/httpapi/groups/project.ts +4 -4
  185. package/src/server/routes/instance/httpapi/groups/provider.ts +2 -2
  186. package/src/server/routes/instance/httpapi/groups/pty.ts +5 -5
  187. package/src/server/routes/instance/httpapi/groups/question.ts +1 -1
  188. package/src/server/routes/instance/httpapi/groups/session.ts +8 -8
  189. package/src/server/routes/instance/httpapi/groups/sync.ts +3 -3
  190. package/src/server/routes/instance/httpapi/groups/tui.ts +1 -1
  191. package/src/server/routes/instance/httpapi/groups/workspace.ts +1 -1
  192. package/src/server/routes/instance/httpapi/handlers/control-plane.ts +2 -2
  193. package/src/server/routes/instance/httpapi/handlers/control.ts +1 -1
  194. package/src/server/routes/instance/httpapi/handlers/event.ts +1 -1
  195. package/src/server/routes/instance/httpapi/handlers/file.ts +6 -6
  196. package/src/server/routes/instance/httpapi/handlers/global.ts +2 -2
  197. package/src/server/routes/instance/httpapi/handlers/instance.ts +1 -1
  198. package/src/server/routes/instance/httpapi/handlers/permission.ts +1 -1
  199. package/src/server/routes/instance/httpapi/handlers/project-copy.ts +2 -2
  200. package/src/server/routes/instance/httpapi/handlers/project.ts +1 -1
  201. package/src/server/routes/instance/httpapi/handlers/provider.ts +2 -2
  202. package/src/server/routes/instance/httpapi/handlers/pty.ts +9 -9
  203. package/src/server/routes/instance/httpapi/handlers/session.ts +3 -3
  204. package/src/server/routes/instance/httpapi/handlers/sync.ts +3 -3
  205. package/src/server/routes/instance/httpapi/middleware/authorization.ts +3 -3
  206. package/src/server/routes/instance/httpapi/middleware/error.ts +2 -2
  207. package/src/server/routes/instance/httpapi/middleware/fence.ts +3 -3
  208. package/src/server/routes/instance/httpapi/middleware/instance-context.ts +1 -1
  209. package/src/server/routes/instance/httpapi/middleware/schema-error.ts +1 -1
  210. package/src/server/routes/instance/httpapi/middleware/workspace-routing.ts +6 -6
  211. package/src/server/routes/instance/httpapi/public.ts +6 -6
  212. package/src/server/routes/instance/httpapi/server.ts +27 -27
  213. package/src/server/routes/instance/httpapi/websocket-tracker.ts +2 -2
  214. package/src/server/server.ts +3 -3
  215. package/src/server/shared/fence.ts +4 -4
  216. package/src/server/shared/pty-ticket.ts +1 -1
  217. package/src/server/shared/ui.ts +3 -3
  218. package/src/server/tui-event.ts +1 -1
  219. package/src/session/compaction.ts +9 -9
  220. package/src/session/instruction.ts +9 -9
  221. package/src/session/llm/AGENTS.md +12 -12
  222. package/src/session/llm/ai-sdk.ts +2 -2
  223. package/src/session/llm/native-request.ts +4 -4
  224. package/src/session/llm/native-runtime.ts +7 -7
  225. package/src/session/llm/request.ts +10 -10
  226. package/src/session/llm.ts +12 -12
  227. package/src/session/message-error.ts +1 -1
  228. package/src/session/message-v2.ts +7 -7
  229. package/src/session/message.ts +3 -3
  230. package/src/session/overflow.ts +2 -2
  231. package/src/session/processor.ts +6 -6
  232. package/src/session/prompt.ts +14 -14
  233. package/src/session/reminders.ts +2 -2
  234. package/src/session/retry.ts +5 -5
  235. package/src/session/revert.ts +3 -3
  236. package/src/session/run-state.ts +3 -3
  237. package/src/session/schema.ts +2 -2
  238. package/src/session/session.ts +22 -22
  239. package/src/session/status.ts +3 -3
  240. package/src/session/summary.ts +3 -3
  241. package/src/session/system.ts +7 -7
  242. package/src/session/todo.ts +5 -5
  243. package/src/session/tools.ts +3 -3
  244. package/src/share/session.ts +2 -2
  245. package/src/share/share-next.ts +11 -11
  246. package/src/skill/discovery.ts +7 -7
  247. package/src/skill/index.ts +21 -21
  248. package/src/snapshot/index.ts +7 -7
  249. package/src/storage/schema.ts +5 -5
  250. package/src/storage/storage.ts +5 -5
  251. package/src/sync/schema.ts +1 -1
  252. package/src/temporary.ts +4 -4
  253. package/src/tool/apply_patch.ts +3 -3
  254. package/src/tool/code-mode.ts +1 -1
  255. package/src/tool/edit.ts +3 -3
  256. package/src/tool/external-directory.ts +1 -1
  257. package/src/tool/glob.ts +2 -2
  258. package/src/tool/grep.ts +2 -2
  259. package/src/tool/lsp.ts +1 -1
  260. package/src/tool/lsp.txt +1 -1
  261. package/src/tool/plan.ts +1 -1
  262. package/src/tool/read.ts +2 -2
  263. package/src/tool/registry.ts +13 -13
  264. package/src/tool/schema.ts +1 -1
  265. package/src/tool/shell/id.ts +1 -1
  266. package/src/tool/shell/prompt.ts +2 -2
  267. package/src/tool/shell.ts +2 -2
  268. package/src/tool/skill.ts +1 -1
  269. package/src/tool/task.ts +3 -3
  270. package/src/tool/tool.ts +2 -2
  271. package/src/tool/truncate.ts +4 -4
  272. package/src/tool/truncation-dir.ts +1 -1
  273. package/src/tool/webfetch.ts +1 -1
  274. package/src/tool/websearch.ts +4 -4
  275. package/src/tool/write.ts +3 -3
  276. package/src/util/bom.ts +1 -1
  277. package/src/util/error.ts +1 -1
  278. package/src/util/filesystem.ts +2 -2
  279. package/src/util/locale.ts +2 -2
  280. package/src/util/process.ts +1 -1
  281. package/src/util/record.ts +1 -1
  282. package/src/util/repository.ts +2 -2
  283. package/src/util/token.ts +1 -1
  284. package/src/worktree/index.ts +12 -12
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 opencode
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/bin/anymous.cjs CHANGED
@@ -1,45 +1,45 @@
1
- #!/usr/bin/env node
2
- const { spawnSync, spawn } = require("child_process")
3
- const path = require("path")
4
- const fs = require("fs")
5
-
6
- function findBun() {
7
- try {
8
- const r = spawnSync("where", ["bun"], { shell: false, windowsHide: false, encoding: "utf8", timeout: 3000 })
9
- if (r.status === 0) return r.stdout.trim().split("\n")[0]
10
- } catch {}
11
- try {
12
- const r = spawnSync("which", ["bun"], { shell: false, windowsHide: false, encoding: "utf8", timeout: 3000 })
13
- if (r.status === 0) return r.stdout.trim()
14
- } catch {}
15
- return null
16
- }
17
-
18
- const scriptDir = path.dirname(__filename)
19
- const pkgDir = path.resolve(scriptDir, "..")
20
- const src = path.join(pkgDir, "src", "index.ts")
21
-
22
- if (!fs.existsSync(src)) {
23
- console.error("Anymous source not found. Run 'bun install' in " + pkgDir)
24
- process.exit(1)
25
- }
26
-
27
- const bun = findBun()
28
- if (!bun) {
29
- console.error("Anymous requires Bun. Install: https://bun.sh")
30
- process.exit(1)
31
- }
32
-
33
- const child = spawn(bun, ["run", "--conditions=browser", src, ...process.argv.slice(2)], {
34
- stdio: "inherit",
35
- cwd: pkgDir,
36
- env: { ...process.env, ANYMOUS: "1" },
37
- })
38
-
39
- child.on("exit", (code, signal) => {
40
- if (signal) process.kill(process.pid, signal)
41
- else process.exit(typeof code === "number" ? code : 0)
42
- })
43
-
44
- const signals = ["SIGINT", "SIGTERM", "SIGHUP"]
45
- for (const sig of signals) process.on(sig, () => child.kill(sig))
1
+ #!/usr/bin/env node
2
+ const { spawnSync, spawn } = require("child_process")
3
+ const path = require("path")
4
+ const fs = require("fs")
5
+
6
+ function findBun() {
7
+ try {
8
+ const r = spawnSync("where", ["bun"], { shell: false, windowsHide: false, encoding: "utf8", timeout: 3000 })
9
+ if (r.status === 0) return r.stdout.trim().split("\n")[0]
10
+ } catch {}
11
+ try {
12
+ const r = spawnSync("which", ["bun"], { shell: false, windowsHide: false, encoding: "utf8", timeout: 3000 })
13
+ if (r.status === 0) return r.stdout.trim()
14
+ } catch {}
15
+ return null
16
+ }
17
+
18
+ const scriptDir = path.dirname(__filename)
19
+ const pkgDir = path.resolve(scriptDir, "..")
20
+ const src = path.join(pkgDir, "src", "index.ts")
21
+
22
+ if (!fs.existsSync(src)) {
23
+ console.error("Anymous source not found. Run 'bun install' in " + pkgDir)
24
+ process.exit(1)
25
+ }
26
+
27
+ const bun = findBun()
28
+ if (!bun) {
29
+ console.error("Anymous requires Bun. Install: https://bun.sh")
30
+ process.exit(1)
31
+ }
32
+
33
+ const child = spawn(bun, ["run", "--conditions=browser", src, ...process.argv.slice(2)], {
34
+ stdio: "inherit",
35
+ cwd: pkgDir,
36
+ env: { ...process.env, ANYMOUS: "1" },
37
+ })
38
+
39
+ child.on("exit", (code, signal) => {
40
+ if (signal) process.kill(process.pid, signal)
41
+ else process.exit(typeof code === "number" ? code : 0)
42
+ })
43
+
44
+ const signals = ["SIGINT", "SIGTERM", "SIGHUP"]
45
+ for (const sig of signals) process.on(sig, () => child.kill(sig))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymous",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "AI-powered reverse engineering platform",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,9 +24,9 @@ const archMap = {
24
24
 
25
25
  const platform = platformMap[os.platform()] ?? os.platform()
26
26
  const arch = archMap[os.arch()] ?? os.arch()
27
- const base = `opencode-${platform}-${arch}`
28
- const sourceBinary = platform === "windows" ? "opencode.exe" : "opencode"
29
- const targetBinary = path.join(__dirname, "bin", "opencode.exe")
27
+ const base = `anymous-${platform}-${arch}`
28
+ const sourceBinary = platform === "windows" ? "anymous.exe" : "anymous"
29
+ const targetBinary = path.join(__dirname, "bin", "anymous.exe")
30
30
 
31
31
  function supportsAvx2() {
32
32
  if (arch !== "x64") return false
@@ -127,7 +127,7 @@ function installPackage(name) {
127
127
  const version = packageJson.optionalDependencies?.[name]
128
128
  if (!version) return
129
129
 
130
- const temp = fs.mkdtempSync(path.join(os.tmpdir(), "opencode-install-"))
130
+ const temp = fs.mkdtempSync(path.join(os.tmpdir(), "anymous-install-"))
131
131
  try {
132
132
  const result = childProcess.spawnSync(
133
133
  "npm",
@@ -175,7 +175,7 @@ function main() {
175
175
  }
176
176
 
177
177
  throw new Error(
178
- `It seems your package manager failed to install the right opencode CLI package. Try manually installing ${packageNames()
178
+ `It seems your package manager failed to install the right anymous CLI package. Try manually installing ${packageNames()
179
179
  .map((name) => JSON.stringify(name))
180
180
  .join(" or ")}.`,
181
181
  )
@@ -1,7 +1,7 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
2
- import { httpClient } from "@opencode-ai/core/effect/app-node-platform"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
+ import { httpClient } from "@anymous-ai/core/effect/app-node-platform"
3
3
  import { Cache, Clock, Duration, Effect, Layer, Option, Schema, SchemaGetter, Context } from "effect"
4
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
4
+ import { serviceUse } from "@anymous-ai/core/effect/service-use"
5
5
  import {
6
6
  FetchHttpClient,
7
7
  HttpClient,
@@ -134,7 +134,7 @@ class TokenRefreshRequest extends Schema.Class<TokenRefreshRequest>("TokenRefres
134
134
  client_id: Schema.String,
135
135
  }) {}
136
136
 
137
- const clientId = "opencode-cli"
137
+ const clientId = "anymous-cli"
138
138
  const eagerRefreshThreshold = Duration.minutes(5)
139
139
  const eagerRefreshThresholdMs = Duration.toMillis(eagerRefreshThreshold)
140
140
 
@@ -182,7 +182,7 @@ export interface Interface {
182
182
  readonly poll: (input: Login) => Effect.Effect<PollResult, AccountError>
183
183
  }
184
184
 
185
- export class Service extends Context.Service<Service, Interface>()("@opencode/Account") {}
185
+ export class Service extends Context.Service<Service, Interface>()("@anymous/Account") {}
186
186
 
187
187
  export const use = serviceUse(Service)
188
188
 
@@ -1,10 +1,10 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
2
  import { eq } from "drizzle-orm"
3
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
3
+ import { serviceUse } from "@anymous-ai/core/effect/service-use"
4
4
  import { Effect, Layer, Option, Schema, Context } from "effect"
5
5
 
6
- import { Database } from "@opencode-ai/core/database/database"
7
- import { AccountStateTable, AccountTable } from "@opencode-ai/core/account/sql"
6
+ import { Database } from "@anymous-ai/core/database/database"
7
+ import { AccountStateTable, AccountTable } from "@anymous-ai/core/account/sql"
8
8
  import { AccessToken, AccountID, AccountRepoError, Info, OrgID, RefreshToken } from "./schema"
9
9
  import { normalizeServerUrl } from "./url"
10
10
 
@@ -35,7 +35,7 @@ export interface Interface {
35
35
  }) => Effect.Effect<void, AccountRepoError>
36
36
  }
37
37
 
38
- export class Service extends Context.Service<Service, Interface>()("@opencode/AccountRepo") {}
38
+ export class Service extends Context.Service<Service, Interface>()("@anymous/AccountRepo") {}
39
39
 
40
40
  export const use = serviceUse(Service)
41
41
 
package/src/acp/agent.ts CHANGED
@@ -17,11 +17,11 @@ import {
17
17
  type SetSessionModeRequest,
18
18
  } from "@agentclientprotocol/sdk"
19
19
  import { Effect } from "effect"
20
- import type { OpencodeClient } from "@opencode-ai/sdk/v2"
20
+ import type { anymousClient } from "@anymous-ai/sdk/v2"
21
21
  import * as ACPError from "./error"
22
22
  import * as ACPService from "./service"
23
23
 
24
- export function init({ sdk: _sdk }: { sdk: OpencodeClient }) {
24
+ export function init({ sdk: _sdk }: { sdk: anymousClient }) {
25
25
  return {
26
26
  create: (connection: AgentSideConnection) => {
27
27
  return new Agent(ACPService.make({ sdk: _sdk, connection }))
@@ -1,7 +1,7 @@
1
1
  import type { ContentBlock, ContentChunk, ResourceLink, Role } from "@agentclientprotocol/sdk"
2
2
  import path from "node:path"
3
3
  import { fileURLToPath, pathToFileURL } from "node:url"
4
- import { SessionV1 } from "@opencode-ai/core/v1/session"
4
+ import { SessionV1 } from "@anymous-ai/core/v1/session"
5
5
 
6
6
  export type PromptPart = SessionV1.TextPartInput | SessionV1.FilePartInput
7
7
 
@@ -3,9 +3,9 @@ import { Command } from "@/command"
3
3
  import { InstanceRef } from "@/effect/instance-ref"
4
4
  import { InstanceBootstrap } from "@/project/bootstrap"
5
5
  import { InstanceStore } from "@/project/instance-store"
6
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
7
- import { ProviderV2 } from "@opencode-ai/core/provider"
8
- import { ModelV2 } from "@opencode-ai/core/model"
6
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
7
+ import { ProviderV2 } from "@anymous-ai/core/provider"
8
+ import { ModelV2 } from "@anymous-ai/core/model"
9
9
  import { Provider } from "@/provider/provider"
10
10
  import { Context, Effect, Layer, SynchronizedRef } from "effect"
11
11
  import type * as ACPError from "./error"
@@ -51,9 +51,9 @@ export interface Interface {
51
51
  readonly variants: (snapshot: Snapshot, model: DefaultModel) => ModelVariants | undefined
52
52
  }
53
53
 
54
- export class Loader extends Context.Service<Loader, LoaderInterface>()("@opencode/ACPDirectoryLoader") {}
54
+ export class Loader extends Context.Service<Loader, LoaderInterface>()("@anymous/ACPDirectoryLoader") {}
55
55
 
56
- export class Service extends Context.Service<Service, Interface>()("@opencode/ACPDirectory") {}
56
+ export class Service extends Context.Service<Service, Interface>()("@anymous/ACPDirectory") {}
57
57
 
58
58
  export const modelKey = (model: DefaultModel) => `${model.providerID}/${model.modelID}`
59
59
 
package/src/acp/event.ts CHANGED
@@ -3,11 +3,11 @@ import type {
3
3
  Event,
4
4
  EventMessagePartDelta,
5
5
  EventMessagePartUpdated,
6
- OpencodeClient,
6
+ anymousClient,
7
7
  Part,
8
8
  SessionMessageResponse,
9
9
  ToolPart,
10
- } from "@opencode-ai/sdk/v2"
10
+ } from "@anymous-ai/sdk/v2"
11
11
  import { Effect } from "effect"
12
12
  import { ACPSession } from "./session"
13
13
  import { ACPPermission } from "./permission"
@@ -30,7 +30,7 @@ type GlobalEventStream = {
30
30
  stream: AsyncIterable<GlobalEventEnvelope>
31
31
  }
32
32
 
33
- export function start(input: { sdk: OpencodeClient; connection: Connection; session: ACPSession.Interface }) {
33
+ export function start(input: { sdk: anymousClient; connection: Connection; session: ACPSession.Interface }) {
34
34
  const subscription = new Subscription(input)
35
35
  subscription.start()
36
36
  return subscription
@@ -45,7 +45,7 @@ export class Subscription {
45
45
 
46
46
  constructor(
47
47
  private readonly input: {
48
- sdk: OpencodeClient
48
+ sdk: anymousClient
49
49
  connection: Connection
50
50
  session: ACPSession.Interface
51
51
  },
@@ -6,7 +6,7 @@ import type {
6
6
  ToolCallLocation,
7
7
  ToolCallUpdate,
8
8
  } from "@agentclientprotocol/sdk"
9
- import type { Event, OpencodeClient } from "@opencode-ai/sdk/v2"
9
+ import type { Event, anymousClient } from "@anymous-ai/sdk/v2"
10
10
  import { applyPatch } from "diff"
11
11
  import { exists, readText } from "@/util/filesystem"
12
12
  import type { ACPSession } from "./session"
@@ -28,7 +28,7 @@ export class Handler {
28
28
 
29
29
  constructor(
30
30
  private readonly input: {
31
- sdk: OpencodeClient
31
+ sdk: anymousClient
32
32
  connection: Connection
33
33
  session: ACPSession.Interface
34
34
  },
@@ -1,4 +1,4 @@
1
- const enabled = process.env.OPENCODE_ACP_PROFILE === "1"
1
+ const enabled = process.env.ANYMOUS_ACP_PROFILE === "1"
2
2
  const started = performance.now()
3
3
 
4
4
  export function mark(name: string, fields?: Record<string, string | number | boolean | undefined>) {
@@ -29,9 +29,9 @@ import {
29
29
  type SetSessionModeRequest,
30
30
  type SetSessionModeResponse,
31
31
  } from "@agentclientprotocol/sdk"
32
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
33
- import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
34
- import type { AssistantMessage, Message, OpencodeClient, SessionMessageResponse } from "@opencode-ai/sdk/v2"
32
+ import { InstallationVersion } from "@anymous-ai/core/installation/version"
33
+ import { AppNodeBuilder } from "@anymous-ai/core/effect/app-node-builder"
34
+ import type { AssistantMessage, Message, anymousClient, SessionMessageResponse } from "@anymous-ai/sdk/v2"
35
35
  import { Context, Effect, Layer, ManagedRuntime } from "effect"
36
36
  import * as ACPError from "./error"
37
37
  import { buildConfigOptions, parseModelSelection } from "./config-option"
@@ -41,12 +41,12 @@ import { ACPEvent } from "./event"
41
41
  import { ACPSession } from "./session"
42
42
  import { UsageService } from "./usage"
43
43
  import { ACPProfile } from "./profile"
44
- import { ProviderV2 } from "@opencode-ai/core/provider"
45
- import { ModelV2 } from "@opencode-ai/core/model"
44
+ import { ProviderV2 } from "@anymous-ai/core/provider"
45
+ import { ModelV2 } from "@anymous-ai/core/model"
46
46
  import { Provider } from "@/provider/provider"
47
47
  import type { Command } from "@/command"
48
48
 
49
- export const AuthMethodID = "opencode-login"
49
+ export const AuthMethodID = "anymous-login"
50
50
 
51
51
  export type Error = ACPError.Error
52
52
  type ServiceConnection = Pick<AgentSideConnection, "sessionUpdate"> &
@@ -70,10 +70,10 @@ export type Interface = {
70
70
  readonly cancel: (input: CancelNotification) => Effect.Effect<void, Error>
71
71
  }
72
72
 
73
- export class Service extends Context.Service<Service, Interface>()("@opencode/ACP/Service") {}
73
+ export class Service extends Context.Service<Service, Interface>()("@anymous/ACP/Service") {}
74
74
 
75
75
  export function make(input: {
76
- sdk: OpencodeClient
76
+ sdk: anymousClient
77
77
  connection?: ServiceConnection
78
78
  directory?: Directory.Interface
79
79
  session?: ACPSession.Interface
@@ -92,17 +92,17 @@ export function make(input: {
92
92
  const initialize = Effect.fn("ACP.initialize")(function* (params: InitializeRequest) {
93
93
  const started = performance.now()
94
94
  const authMethod: AuthMethod = {
95
- description: "Run `opencode auth login` in the terminal",
96
- name: "Login with opencode",
95
+ description: "Run `anymous auth login` in the terminal",
96
+ name: "Login with anymous",
97
97
  id: AuthMethodID,
98
98
  }
99
99
 
100
100
  if (params.clientCapabilities?._meta?.["terminal-auth"] === true) {
101
101
  authMethod._meta = {
102
102
  "terminal-auth": {
103
- command: "opencode",
103
+ command: "anymous",
104
104
  args: ["auth", "login"],
105
- label: "OpenCode Login",
105
+ label: "anymous Login",
106
106
  },
107
107
  }
108
108
  }
@@ -128,7 +128,7 @@ export function make(input: {
128
128
  },
129
129
  authMethods: [authMethod],
130
130
  agentInfo: {
131
- name: "OpenCode",
131
+ name: "anymous",
132
132
  version: InstallationVersion,
133
133
  },
134
134
  }
@@ -575,7 +575,7 @@ function makeSessionService() {
575
575
  )
576
576
  }
577
577
 
578
- function makeDirectoryService(sdk: OpencodeClient) {
578
+ function makeDirectoryService(sdk: anymousClient) {
579
579
  return ManagedRuntime.make(
580
580
  AppNodeBuilder.build(Directory.node, [
581
581
  [
@@ -591,7 +591,7 @@ function makeDirectoryService(sdk: OpencodeClient) {
591
591
  ).runSync(Directory.Service.use((service) => Effect.succeed(service)))
592
592
  }
593
593
 
594
- function makeUsageService(sdk: OpencodeClient) {
594
+ function makeUsageService(sdk: anymousClient) {
595
595
  const limits = new Map<string, Promise<number | undefined>>()
596
596
  const contextLimit: UsageService.Interface["contextLimit"] = Effect.fn("ACP.promptUsage.contextLimit")(
597
597
  function* (params) {
@@ -717,7 +717,7 @@ function profiledRequest<T>(name: string, fn: () => Promise<T | SdkResponse<T>>,
717
717
  return request(() => ACPProfile.measure(name, fn), service)
718
718
  }
719
719
 
720
- async function loadDirectorySnapshot(sdk: OpencodeClient, directory: string) {
720
+ async function loadDirectorySnapshot(sdk: anymousClient, directory: string) {
721
721
  return ACPProfile.measure("acp.directory.load", async () => {
722
722
  const [providersResponse, agentsResponse, commandsResponse, skillsResponse, configResponse] = await Promise.all([
723
723
  ACPProfile.measure("acp.directory.provider.list", () =>
@@ -782,11 +782,11 @@ function defaultModelFromConfig(
782
782
  if (configured && providers[configured.providerID]?.models[configured.modelID]) return configured
783
783
 
784
784
  // First-session ACP startup must not scan historical sessions just to infer
785
- // a default. Configured model, opencode provider, then sorted best model keep
785
+ // a default. Configured model, anymous provider, then sorted best model keep
786
786
  // the protocol response deterministic without extra session/message reads.
787
- const opencodeProvider = providers[ProviderV2.ID.make("opencode")]
788
- const opencodeModel = opencodeProvider ? Provider.sort(Object.values(opencodeProvider.models))[0] : undefined
789
- if (opencodeProvider && opencodeModel) return { providerID: opencodeProvider.id, modelID: opencodeModel.id }
787
+ const anymousProvider = providers[ProviderV2.ID.make("anymous")]
788
+ const anymousModel = anymousProvider ? Provider.sort(Object.values(anymousProvider.models))[0] : undefined
789
+ if (anymousProvider && anymousModel) return { providerID: anymousProvider.id, modelID: anymousModel.id }
790
790
 
791
791
  const best = Provider.sort(Object.values(providers).flatMap((provider) => Object.values(provider.models)))[0]
792
792
  if (best) return { providerID: best.providerID, modelID: best.id }
@@ -866,12 +866,12 @@ const promptResponse = Effect.fn("ACP.promptResponse")(function* (
866
866
 
867
867
  function promptErrorMessage(error: AssistantError) {
868
868
  if ("message" in error.data && typeof error.data.message === "string") return error.data.message
869
- return "OpenCode prompt failed"
869
+ return "anymous prompt failed"
870
870
  }
871
871
 
872
872
  function sendUsageUpdate(
873
873
  usage: UsageService.Interface | undefined,
874
- sdk: OpencodeClient,
874
+ sdk: anymousClient,
875
875
  connection: ServiceConnection | undefined,
876
876
  sessionID: string,
877
877
  directory: string,
@@ -948,7 +948,7 @@ function sendAvailableCommands(
948
948
  }
949
949
 
950
950
  function registerMcpServers(
951
- sdk: OpencodeClient,
951
+ sdk: anymousClient,
952
952
  registered: Map<string, Set<string>>,
953
953
  directory: string,
954
954
  sessionId: string,
@@ -1059,7 +1059,7 @@ function fromUnknownError(error: unknown, service?: string): Error {
1059
1059
  if (isAuthRequired(error)) {
1060
1060
  return new ACPError.AuthRequiredError({ providerId: findProviderID(error) })
1061
1061
  }
1062
- return new ACPError.ServiceFailureError({ safeMessage: "OpenCode service failure", service })
1062
+ return new ACPError.ServiceFailureError({ safeMessage: "anymous service failure", service })
1063
1063
  }
1064
1064
 
1065
1065
  function isACPError(error: unknown): error is Error {
@@ -1,8 +1,8 @@
1
1
  import type { McpServer } from "@agentclientprotocol/sdk"
2
- import type { Message, Part } from "@opencode-ai/sdk/v2"
3
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
4
- import { ProviderV2 } from "@opencode-ai/core/provider"
5
- import { ModelV2 } from "@opencode-ai/core/model"
2
+ import type { Message, Part } from "@anymous-ai/sdk/v2"
3
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
4
+ import { ProviderV2 } from "@anymous-ai/core/provider"
5
+ import { ModelV2 } from "@anymous-ai/core/model"
6
6
  import { Context, Effect, Layer, Ref } from "effect"
7
7
  import * as ACPError from "./error"
8
8
 
@@ -90,7 +90,7 @@ export type Interface = {
90
90
  readonly tryGetPartMetadata: (input: PartMetadataLookupInput) => Effect.Effect<KnownMessagePartMetadata | undefined>
91
91
  }
92
92
 
93
- export class Service extends Context.Service<Service, Interface>()("@opencode/ACP/Session") {}
93
+ export class Service extends Context.Service<Service, Interface>()("@anymous/ACP/Session") {}
94
94
 
95
95
  type State = Map<string, Info>
96
96
 
package/src/acp/usage.ts CHANGED
@@ -1,20 +1,20 @@
1
1
  import type { AgentSideConnection, Usage } from "@agentclientprotocol/sdk"
2
- import type { AssistantMessage as OpenCodeAssistantMessage, Message } from "@opencode-ai/sdk/v2"
2
+ import type { AssistantMessage as anymousAssistantMessage, Message } from "@anymous-ai/sdk/v2"
3
3
  import { InstanceRef } from "@/effect/instance-ref"
4
4
  import { InstanceBootstrap } from "@/project/bootstrap"
5
5
  import { InstanceStore } from "@/project/instance-store"
6
- import { makeGlobalNode, Node } from "@opencode-ai/core/effect/app-node"
7
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
8
- import { ProviderV2 } from "@opencode-ai/core/provider"
9
- import { ModelV2 } from "@opencode-ai/core/model"
6
+ import { makeGlobalNode, Node } from "@anymous-ai/core/effect/app-node"
7
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
8
+ import { ProviderV2 } from "@anymous-ai/core/provider"
9
+ import { ModelV2 } from "@anymous-ai/core/model"
10
10
  import { Provider } from "@/provider/provider"
11
11
  import { Context, Effect, Layer, SynchronizedRef } from "effect"
12
12
 
13
- export type AssistantTokenCost = Pick<OpenCodeAssistantMessage, "cost" | "tokens">
13
+ export type AssistantTokenCost = Pick<anymousAssistantMessage, "cost" | "tokens">
14
14
 
15
15
  export type AssistantMessage = AssistantTokenCost &
16
- Pick<OpenCodeAssistantMessage, "role"> &
17
- Partial<Pick<OpenCodeAssistantMessage, "providerID" | "modelID">>
16
+ Pick<anymousAssistantMessage, "role"> &
17
+ Partial<Pick<anymousAssistantMessage, "providerID" | "modelID">>
18
18
 
19
19
  export type SessionMessage = {
20
20
  readonly info: { readonly role: Message["role"] } | AssistantMessage
@@ -61,14 +61,14 @@ export interface Interface {
61
61
  }
62
62
 
63
63
  export class MessageLoader extends Context.Service<MessageLoader, MessageLoaderInterface>()(
64
- "@opencode/ACPUsageMessageLoader",
64
+ "@anymous/ACPUsageMessageLoader",
65
65
  ) {}
66
66
 
67
67
  export class ContextLimitLoader extends Context.Service<ContextLimitLoader, ContextLimitLoaderInterface>()(
68
- "@opencode/ACPUsageContextLimitLoader",
68
+ "@anymous/ACPUsageContextLimitLoader",
69
69
  ) {}
70
70
 
71
- export class Service extends Context.Service<Service, Interface>()("@opencode/ACPUsage") {}
71
+ export class Service extends Context.Service<Service, Interface>()("@anymous/ACPUsage") {}
72
72
 
73
73
  export function messageLoaderFromSDK(sdk: SDK): MessageLoaderInterface {
74
74
  return MessageLoader.of({
@@ -1,7 +1,7 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
2
- import { PermissionV1 } from "@opencode-ai/core/v1/permission"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
+ import { PermissionV1 } from "@anymous-ai/core/v1/permission"
3
3
  import { Config } from "@/config/config"
4
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
4
+ import { serviceUse } from "@anymous-ai/core/effect/service-use"
5
5
  import { Provider } from "@/provider/provider"
6
6
 
7
7
  import { generateObject, streamObject, type ModelMessage } from "ai"
@@ -34,7 +34,7 @@ import PROMPT_PENTEST_CRITIC from "./prompt/pentest-critic.txt"
34
34
  import PROMPT_PENTEST_REPORTER from "./prompt/pentest-reporter.txt"
35
35
  import { Permission } from "@/permission"
36
36
  import { mergeDeep, pipe, sortBy, values } from "remeda"
37
- import { Global } from "@opencode-ai/core/global"
37
+ import { Global } from "@anymous-ai/core/global"
38
38
  import path from "path"
39
39
  import { Plugin } from "@/plugin"
40
40
  import { Skill } from "../skill"
@@ -42,13 +42,13 @@ import { Effect, Context, Layer, Schema } from "effect"
42
42
  import { InstanceState } from "@/effect/instance-state"
43
43
  import * as Option from "effect/Option"
44
44
  import * as OtelTracer from "@effect/opentelemetry/Tracer"
45
- import { AbsolutePath, type DeepMutable } from "@opencode-ai/core/schema"
46
- import { ProviderV2 } from "@opencode-ai/core/provider"
47
- import { ModelV2 } from "@opencode-ai/core/model"
48
- import { LocationServiceMap, locationServiceMapLayer } from "@opencode-ai/core/location-services"
49
- import { Reference } from "@opencode-ai/core/reference"
50
- import { Location } from "@opencode-ai/core/location"
51
- import { PluginV2 } from "@opencode-ai/core/plugin"
45
+ import { AbsolutePath, type DeepMutable } from "@anymous-ai/core/schema"
46
+ import { ProviderV2 } from "@anymous-ai/core/provider"
47
+ import { ModelV2 } from "@anymous-ai/core/model"
48
+ import { LocationServiceMap, locationServiceMapLayer } from "@anymous-ai/core/location-services"
49
+ import { Reference } from "@anymous-ai/core/reference"
50
+ import { Location } from "@anymous-ai/core/location"
51
+ import { PluginV2 } from "@anymous-ai/core/plugin"
52
52
 
53
53
  export const Info = Schema.Struct({
54
54
  name: Schema.String,
@@ -99,7 +99,7 @@ export interface Interface {
99
99
 
100
100
  type State = Omit<Interface, "generate">
101
101
 
102
- export class Service extends Context.Service<Service, Interface>()("@opencode/Agent") {}
102
+ export class Service extends Context.Service<Service, Interface>()("@anymous/Agent") {}
103
103
 
104
104
  export const use = serviceUse(Service)
105
105
 
@@ -188,7 +188,7 @@ const layer = Layer.effect(
188
188
  },
189
189
  edit: {
190
190
  "*": "deny",
191
- [path.join(".opencode", "plans", "*.md")]: "allow",
191
+ [path.join(".anymous", "plans", "*.md")]: "allow",
192
192
  [path.relative(ctx.worktree, path.join(Global.Path.data, path.join("plans", "*.md")))]: "allow",
193
193
  },
194
194
  }),