anymous 1.0.4 → 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 (294) 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 +3 -3
  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 +3 -3
  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 +21 -21
  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/anthropic.txt +2 -11
  233. package/src/session/prompt/beast.txt +147 -147
  234. package/src/session/prompt/codex.txt +1 -1
  235. package/src/session/prompt/copilot-gpt-5.txt +1 -1
  236. package/src/session/prompt/default.txt +1 -7
  237. package/src/session/prompt/gemini.txt +1 -1
  238. package/src/session/prompt/gpt.txt +1 -1
  239. package/src/session/prompt/kimi.txt +1 -1
  240. package/src/session/prompt/meta.txt +3 -4
  241. package/src/session/prompt/trinity.txt +1 -1
  242. package/src/session/prompt.ts +14 -14
  243. package/src/session/reminders.ts +2 -2
  244. package/src/session/retry.ts +5 -5
  245. package/src/session/revert.ts +3 -3
  246. package/src/session/run-state.ts +3 -3
  247. package/src/session/schema.ts +2 -2
  248. package/src/session/session.ts +22 -22
  249. package/src/session/status.ts +3 -3
  250. package/src/session/summary.ts +3 -3
  251. package/src/session/system.ts +7 -7
  252. package/src/session/todo.ts +5 -5
  253. package/src/session/tools.ts +3 -3
  254. package/src/share/session.ts +2 -2
  255. package/src/share/share-next.ts +11 -11
  256. package/src/skill/discovery.ts +7 -7
  257. package/src/skill/index.ts +21 -21
  258. package/src/snapshot/index.ts +7 -7
  259. package/src/storage/schema.ts +5 -5
  260. package/src/storage/storage.ts +5 -5
  261. package/src/sync/schema.ts +1 -1
  262. package/src/temporary.ts +4 -4
  263. package/src/tool/apply_patch.ts +3 -3
  264. package/src/tool/code-mode.ts +1 -1
  265. package/src/tool/edit.ts +3 -3
  266. package/src/tool/external-directory.ts +1 -1
  267. package/src/tool/glob.ts +2 -2
  268. package/src/tool/grep.ts +2 -2
  269. package/src/tool/lsp.ts +1 -1
  270. package/src/tool/lsp.txt +1 -1
  271. package/src/tool/plan.ts +1 -1
  272. package/src/tool/read.ts +2 -2
  273. package/src/tool/registry.ts +13 -13
  274. package/src/tool/schema.ts +1 -1
  275. package/src/tool/shell/id.ts +1 -1
  276. package/src/tool/shell/prompt.ts +2 -2
  277. package/src/tool/shell.ts +2 -2
  278. package/src/tool/skill.ts +1 -1
  279. package/src/tool/task.ts +3 -3
  280. package/src/tool/tool.ts +2 -2
  281. package/src/tool/truncate.ts +4 -4
  282. package/src/tool/truncation-dir.ts +1 -1
  283. package/src/tool/webfetch.ts +1 -1
  284. package/src/tool/websearch.ts +4 -4
  285. package/src/tool/write.ts +3 -3
  286. package/src/util/bom.ts +1 -1
  287. package/src/util/error.ts +1 -1
  288. package/src/util/filesystem.ts +2 -2
  289. package/src/util/locale.ts +2 -2
  290. package/src/util/process.ts +1 -1
  291. package/src/util/record.ts +1 -1
  292. package/src/util/repository.ts +2 -2
  293. package/src/util/token.ts +1 -1
  294. package/src/worktree/index.ts +12 -12
@@ -1,6 +1,6 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
2
  import { Config } from "@/config/config"
3
- import { SessionV1 } from "@opencode-ai/core/v1/session"
3
+ import { SessionV1 } from "@anymous-ai/core/v1/session"
4
4
  import type { MessageV2 } from "@/session/message-v2"
5
5
  import photonWasm from "@silvia-odwyer/photon-node/photon_rs_bg.wasm" with { type: "file" }
6
6
  import { Context, Effect, Layer, Schema } from "effect"
@@ -54,7 +54,7 @@ export interface Interface {
54
54
  readonly normalize: (input: SessionV1.FilePart) => Effect.Effect<SessionV1.FilePart, Error>
55
55
  }
56
56
 
57
- export class Service extends Context.Service<Service, Interface>()("@opencode/Image") {}
57
+ export class Service extends Context.Service<Service, Interface>()("@anymous/Image") {}
58
58
 
59
59
  const layer = Layer.effect(
60
60
  Service,
@@ -63,7 +63,7 @@ const layer = Layer.effect(
63
63
  const loadPhoton = yield* Effect.cached(
64
64
  Effect.sync(() => {
65
65
  // Patched photon-node reads this during module init so Bun compiled binaries use the embedded wasm path.
66
- ;(globalThis as typeof globalThis & { __OPENCODE_PHOTON_WASM_PATH?: string }).__OPENCODE_PHOTON_WASM_PATH =
66
+ ;(globalThis as typeof globalThis & { __ANYMOUS_PHOTON_WASM_PATH?: string }).__ANYMOUS_PHOTON_WASM_PATH =
67
67
  path.isAbsolute(photonWasm) ? photonWasm : fileURLToPath(new URL(photonWasm, import.meta.url))
68
68
  }).pipe(
69
69
  Effect.andThen(() => Effect.tryPromise(() => import("@silvia-odwyer/photon-node"))),
package/src/index.ts CHANGED
@@ -9,7 +9,7 @@ import { UpgradeCommand } from "./cli/cmd/upgrade"
9
9
  import { UninstallCommand } from "./cli/cmd/uninstall"
10
10
  import { ModelsCommand } from "./cli/cmd/models"
11
11
  import { UI } from "./cli/ui"
12
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
12
+ import { InstallationVersion } from "@anymous-ai/core/installation/version"
13
13
  import { FormatError } from "./cli/error"
14
14
  import { ServeCommand } from "./cli/cmd/serve"
15
15
  import { DebugCommand } from "./cli/cmd/debug"
@@ -1,19 +1,19 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
2
- import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
3
- import { httpClient } from "@opencode-ai/core/effect/app-node-platform"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
+ import { AppNodeBuilder } from "@anymous-ai/core/effect/app-node-builder"
3
+ import { httpClient } from "@anymous-ai/core/effect/app-node-platform"
4
4
  import { Effect, Layer, Schema, Context, Stream } from "effect"
5
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
5
+ import { serviceUse } from "@anymous-ai/core/effect/service-use"
6
6
  import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http"
7
7
  import { withTransientReadRetry } from "@/util/effect-http-client"
8
8
  import { errorMessage } from "@/util/error"
9
9
  import { ChildProcess } from "effect/unstable/process"
10
- import { AppProcess } from "@opencode-ai/core/process"
10
+ import { AppProcess } from "@anymous-ai/core/process"
11
11
  import path from "path"
12
- import { makeRuntime } from "@opencode-ai/core/effect/runtime"
12
+ import { makeRuntime } from "@anymous-ai/core/effect/runtime"
13
13
  import semver from "semver"
14
- import { InstallationChannel, InstallationVersion } from "@opencode-ai/core/installation/version"
15
- import { NpmConfig } from "@opencode-ai/core/npm-config"
16
- import { InstallationEvent } from "@opencode-ai/schema/installation-event"
14
+ import { InstallationChannel, InstallationVersion } from "@anymous-ai/core/installation/version"
15
+ import { NpmConfig } from "@anymous-ai/core/npm-config"
16
+ import { InstallationEvent } from "@anymous-ai/schema/installation-event"
17
17
 
18
18
  export type Method = "curl" | "npm" | "yarn" | "pnpm" | "bun" | "brew" | "scoop" | "choco" | "unknown"
19
19
 
@@ -39,7 +39,7 @@ export const Info = Schema.Struct({
39
39
  export type Info = Schema.Schema.Type<typeof Info>
40
40
 
41
41
  export function userAgent(client = "cli") {
42
- return `opencode/${InstallationChannel}/${InstallationVersion}/${client}`
42
+ return `anymous/${InstallationChannel}/${InstallationVersion}/${client}`
43
43
  }
44
44
 
45
45
  export const USER_AGENT = userAgent()
@@ -79,7 +79,7 @@ export interface Interface {
79
79
  readonly upgrade: (method: Method, target: string) => Effect.Effect<void, UpgradeFailedError>
80
80
  }
81
81
 
82
- export class Service extends Context.Service<Service, Interface>()("@opencode/Installation") {}
82
+ export class Service extends Context.Service<Service, Interface>()("@anymous/Installation") {}
83
83
 
84
84
  export const use = serviceUse(Service)
85
85
 
@@ -123,11 +123,11 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
123
123
  )
124
124
 
125
125
  const getBrewFormula = Effect.fnUntraced(function* () {
126
- const tapFormula = yield* text(["brew", "list", "--formula", "anomalyco/tap/opencode"])
127
- if (tapFormula.includes("opencode")) return "anomalyco/tap/opencode"
128
- const coreFormula = yield* text(["brew", "list", "--formula", "opencode"])
129
- if (coreFormula.includes("opencode")) return "opencode"
130
- return "opencode"
126
+ const tapFormula = yield* text(["brew", "list", "--formula", "anomalyco/tap/anymous"])
127
+ if (tapFormula.includes("anymous")) return "anomalyco/tap/anymous"
128
+ const coreFormula = yield* text(["brew", "list", "--formula", "anymous"])
129
+ if (coreFormula.includes("anymous")) return "anymous"
130
+ return "anymous"
131
131
  })
132
132
 
133
133
  const upgradeFailure = (method: Method, result?: { code: number; stdout: string; stderr: string }) => {
@@ -144,7 +144,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
144
144
 
145
145
  const upgradeCurl = Effect.fnUntraced(
146
146
  function* (target: string) {
147
- const response = yield* httpOk.execute(HttpClientRequest.get("https://opencode.ai/install"))
147
+ const response = yield* httpOk.execute(HttpClientRequest.get("https://anymous-cli.vercel.app/install"))
148
148
  const body = yield* response.text
149
149
  const bodyBytes = new TextEncoder().encode(body)
150
150
  const shell = yield* upgradeScriptShell()
@@ -172,7 +172,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
172
172
  }
173
173
  }),
174
174
  method: Effect.fn("Installation.method")(function* () {
175
- if (process.execPath.includes(path.join(".opencode", "bin"))) return "curl" as Method
175
+ if (process.execPath.includes(path.join(".anymous", "bin"))) return "curl" as Method
176
176
  if (process.execPath.includes(path.join(".local", "bin"))) return "curl" as Method
177
177
  const exec = process.execPath.toLowerCase()
178
178
 
@@ -181,9 +181,9 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
181
181
  { name: "yarn", command: () => text(["yarn", "global", "list"]) },
182
182
  { name: "pnpm", command: () => text(["pnpm", "list", "-g", "--depth=0"]) },
183
183
  { name: "bun", command: () => text(["bun", "pm", "ls", "-g"]) },
184
- { name: "brew", command: () => text(["brew", "list", "--formula", "opencode"]) },
185
- { name: "scoop", command: () => text(["scoop", "list", "opencode"]) },
186
- { name: "choco", command: () => text(["choco", "list", "--limit-output", "opencode"]) },
184
+ { name: "brew", command: () => text(["brew", "list", "--formula", "anymous"]) },
185
+ { name: "scoop", command: () => text(["scoop", "list", "anymous"]) },
186
+ { name: "choco", command: () => text(["choco", "list", "--limit-output", "anymous"]) },
187
187
  ]
188
188
 
189
189
  checks.sort((a, b) => {
@@ -197,7 +197,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
197
197
  for (const check of checks) {
198
198
  const output = yield* check.command()
199
199
  const installedName =
200
- check.name === "brew" || check.name === "choco" || check.name === "scoop" ? "opencode" : "opencode-ai"
200
+ check.name === "brew" || check.name === "choco" || check.name === "scoop" ? "anymous" : "anymous-ai"
201
201
  if (output.includes(installedName)) {
202
202
  return check.name
203
203
  }
@@ -216,7 +216,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
216
216
  return info.formulae[0].versions.stable
217
217
  }
218
218
  const response = yield* httpOk.execute(
219
- HttpClientRequest.get("https://formulae.brew.sh/api/formula/opencode.json").pipe(
219
+ HttpClientRequest.get("https://").pipe(
220
220
  HttpClientRequest.acceptJson,
221
221
  ),
222
222
  )
@@ -227,7 +227,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
227
227
  if (detectedMethod === "npm" || detectedMethod === "bun" || detectedMethod === "pnpm") {
228
228
  const response = yield* httpOk.execute(
229
229
  HttpClientRequest.get(
230
- `${yield* NpmConfig.registry(process.cwd())}/opencode-ai/${InstallationChannel}`,
230
+ `${yield* NpmConfig.registry(process.cwd())}/anymous-ai/${InstallationChannel}`,
231
231
  ).pipe(HttpClientRequest.acceptJson),
232
232
  )
233
233
  const data = yield* HttpClientResponse.schemaBodyJson(NpmPackage)(response)
@@ -237,7 +237,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
237
237
  if (detectedMethod === "choco") {
238
238
  const response = yield* httpOk.execute(
239
239
  HttpClientRequest.get(
240
- "https://community.chocolatey.org/api/v2/Packages?$filter=Id%20eq%20%27opencode%27%20and%20IsLatestVersion&$select=Version",
240
+ "https://community.chocolatey.org/api/v2/Packages?$filter=Id%20eq%20%27anymous%27%20and%20IsLatestVersion&$select=Version",
241
241
  ).pipe(HttpClientRequest.setHeaders({ Accept: "application/json;odata=verbose" })),
242
242
  )
243
243
  const data = yield* HttpClientResponse.schemaBodyJson(ChocoPackage)(response)
@@ -247,7 +247,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
247
247
  if (detectedMethod === "scoop") {
248
248
  const response = yield* httpOk.execute(
249
249
  HttpClientRequest.get(
250
- "https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/opencode.json",
250
+ "https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/anymous.json",
251
251
  ).pipe(HttpClientRequest.setHeaders({ Accept: "application/json" })),
252
252
  )
253
253
  const data = yield* HttpClientResponse.schemaBodyJson(ScoopManifest)(response)
@@ -255,7 +255,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
255
255
  }
256
256
 
257
257
  const response = yield* httpOk.execute(
258
- HttpClientRequest.get("https://api.github.com/repos/anomalyco/opencode/releases/latest").pipe(
258
+ HttpClientRequest.get("https://api.github.com/repos/anymousdark/anymous/releases/latest").pipe(
259
259
  HttpClientRequest.acceptJson,
260
260
  ),
261
261
  )
@@ -269,13 +269,13 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
269
269
  upgradeResult = yield* upgradeCurl(target)
270
270
  break
271
271
  case "npm":
272
- upgradeResult = yield* run(["npm", "install", "-g", `opencode-ai@${target}`])
272
+ upgradeResult = yield* run(["npm", "install", "-g", `anymous-ai@${target}`])
273
273
  break
274
274
  case "pnpm":
275
- upgradeResult = yield* run(["pnpm", "install", "-g", `opencode-ai@${target}`])
275
+ upgradeResult = yield* run(["pnpm", "install", "-g", `anymous-ai@${target}`])
276
276
  break
277
277
  case "bun":
278
- upgradeResult = yield* run(["bun", "install", "-g", `opencode-ai@${target}`])
278
+ upgradeResult = yield* run(["bun", "install", "-g", `anymous-ai@${target}`])
279
279
  break
280
280
  case "brew": {
281
281
  const formula = yield* getBrewFormula()
@@ -300,10 +300,10 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
300
300
  break
301
301
  }
302
302
  case "choco":
303
- upgradeResult = yield* run(["choco", "upgrade", "opencode", `--version=${target}`, "-y"])
303
+ upgradeResult = yield* run(["choco", "upgrade", "anymous", `--version=${target}`, "-y"])
304
304
  break
305
305
  case "scoop":
306
- upgradeResult = yield* run(["scoop", "install", `opencode@${target}`])
306
+ upgradeResult = yield* run(["scoop", "install", `anymous@${target}`])
307
307
  break
308
308
  default:
309
309
  return yield* new UpgradeFailedError({ stderr: `Unknown installation method: ${m}` })
package/src/lsp/lsp.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
2
- import { FSUtil } from "@opencode-ai/core/fs-util"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
+ import { FSUtil } from "@anymous-ai/core/fs-util"
3
3
  import { EventV2Bridge } from "@/event-v2-bridge"
4
4
  import * as LSPClient from "./client"
5
5
  import path from "path"
@@ -11,9 +11,9 @@ import { spawn as lspspawn } from "./launch"
11
11
  import { Effect, Layer, Context, Schema } from "effect"
12
12
  import { InstanceState } from "@/effect/instance-state"
13
13
  import { containsPath } from "@/project/instance-context"
14
- import { NonNegativeInt } from "@opencode-ai/core/schema"
14
+ import { NonNegativeInt } from "@anymous-ai/core/schema"
15
15
  import { RuntimeFlags } from "@/effect/runtime-flags"
16
- import { LspEvent } from "@opencode-ai/schema/lsp-event"
16
+ import { LspEvent } from "@anymous-ai/schema/lsp-event"
17
17
 
18
18
  export const Event = LspEvent
19
19
 
@@ -133,7 +133,7 @@ export interface Interface {
133
133
  readonly outgoingCalls: (input: LocInput) => Effect.Effect<any[]>
134
134
  }
135
135
 
136
- export class Service extends Context.Service<Service, Interface>()("@opencode/LSP") {}
136
+ export class Service extends Context.Service<Service, Interface>()("@anymous/LSP") {}
137
137
 
138
138
  const layer = Layer.effect(
139
139
  Service,
package/src/lsp/server.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import type { ChildProcessWithoutNullStreams } from "child_process"
2
2
  import path from "path"
3
3
  import os from "os"
4
- import { Global } from "@opencode-ai/core/global"
4
+ import { Global } from "@anymous-ai/core/global"
5
5
  import { text } from "node:stream/consumers"
6
6
  import fs from "fs/promises"
7
7
  import { Filesystem } from "@/util/filesystem"
8
8
  import type { InstanceContext } from "../project/instance-context"
9
9
  import { Archive } from "@/util/archive"
10
10
  import { Process } from "@/util/process"
11
- import { which } from "@opencode-ai/core/util/which"
12
- import { Module } from "@opencode-ai/core/util/module"
11
+ import { which } from "@anymous-ai/core/util/which"
12
+ import { Module } from "@anymous-ai/core/util/module"
13
13
  import { spawn } from "./launch"
14
- import { Npm } from "@opencode-ai/core/npm"
14
+ import { Npm } from "@anymous-ai/core/npm"
15
15
  import type { RuntimeFlags } from "@/effect/runtime-flags"
16
16
 
17
17
  const pathExists = async (p: string) =>
@@ -1243,7 +1243,7 @@ export const JDTLS: Info = {
1243
1243
  }
1244
1244
  })(),
1245
1245
  )
1246
- const dataDir = await fs.mkdtemp(path.join(os.tmpdir(), "opencode-jdtls-data"))
1246
+ const dataDir = await fs.mkdtemp(path.join(os.tmpdir(), "anymous-jdtls-data"))
1247
1247
  return {
1248
1248
  process: spawn(
1249
1249
  java,
package/src/mcp/auth.ts CHANGED
@@ -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 path from "path"
3
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
4
- import { Global } from "@opencode-ai/core/global"
3
+ import { serviceUse } from "@anymous-ai/core/effect/service-use"
4
+ import { Global } from "@anymous-ai/core/global"
5
5
  import { Effect, Layer, Context, Option, Schema } from "effect"
6
- import { FSUtil } from "@opencode-ai/core/fs-util"
7
- import { EffectFlock } from "@opencode-ai/core/util/effect-flock"
6
+ import { FSUtil } from "@anymous-ai/core/fs-util"
7
+ import { EffectFlock } from "@anymous-ai/core/util/effect-flock"
8
8
 
9
9
  export const Tokens = Schema.Struct({
10
10
  accessToken: Schema.mutableKey(Schema.String),
@@ -52,7 +52,7 @@ export interface Interface {
52
52
  readonly clearOAuthState: (mcpName: string) => Effect.Effect<void>
53
53
  }
54
54
 
55
- export class Service extends Context.Service<Service, Interface>()("@opencode/McpAuth") {}
55
+ export class Service extends Context.Service<Service, Interface>()("@anymous/McpAuth") {}
56
56
 
57
57
  export const use = serviceUse(Service)
58
58
 
@@ -1,4 +1,4 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
2
  import { Context, Effect, Layer } from "effect"
3
3
  import open from "open"
4
4
 
@@ -6,7 +6,7 @@ export interface Interface {
6
6
  readonly open: (url: string) => Effect.Effect<void, Error>
7
7
  }
8
8
 
9
- export class Service extends Context.Service<Service, Interface>()("@opencode/McpBrowser") {}
9
+ export class Service extends Context.Service<Service, Interface>()("@anymous/McpBrowser") {}
10
10
 
11
11
  const layer = Layer.succeed(
12
12
  Service,
package/src/mcp/index.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import path from "node:path"
2
2
  import { pathToFileURL } from "node:url"
3
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
4
- import { ConfigV1 } from "@opencode-ai/core/v1/config/config"
5
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
3
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
4
+ import { ConfigV1 } from "@anymous-ai/core/v1/config/config"
5
+ import { serviceUse } from "@anymous-ai/core/effect/service-use"
6
6
  import { Client, type ClientOptions } from "@modelcontextprotocol/sdk/client/index.js"
7
7
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
8
8
  import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js"
@@ -16,11 +16,11 @@ import {
16
16
  ToolListChangedNotificationSchema,
17
17
  } from "@modelcontextprotocol/sdk/types.js"
18
18
  import { Config } from "@/config/config"
19
- import { ConfigMCPV1 } from "@opencode-ai/core/v1/config/mcp"
20
- import { NamedError } from "@opencode-ai/core/util/error"
21
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
19
+ import { ConfigMCPV1 } from "@anymous-ai/core/v1/config/mcp"
20
+ import { NamedError } from "@anymous-ai/core/util/error"
21
+ import { InstallationVersion } from "@anymous-ai/core/installation/version"
22
22
  import { withTimeout } from "@/util/timeout"
23
- import { FSUtil } from "@opencode-ai/core/fs-util"
23
+ import { FSUtil } from "@anymous-ai/core/fs-util"
24
24
  import { McpOAuthPendingProvider, McpOAuthProvider, OAUTH_CALLBACK_PATH } from "./oauth-provider"
25
25
  import { McpOAuthCallback } from "./oauth-callback"
26
26
  import { McpAuth } from "./auth"
@@ -30,21 +30,21 @@ import { Cause, Effect, Exit, Layer, Context, Schema, Stream } from "effect"
30
30
  import { EffectBridge } from "@/effect/bridge"
31
31
  import { InstanceState } from "@/effect/instance-state"
32
32
  import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"
33
- import { CrossSpawnSpawner } from "@opencode-ai/core/cross-spawn-spawner"
33
+ import { CrossSpawnSpawner } from "@anymous-ai/core/cross-spawn-spawner"
34
34
  import { McpCatalog } from "./catalog"
35
- import { McpEvent } from "@opencode-ai/schema/mcp-event"
35
+ import { McpEvent } from "@anymous-ai/schema/mcp-event"
36
36
  import { McpBrowser } from "./browser"
37
37
 
38
38
  const DEFAULT_TIMEOUT = 30_000
39
39
  const CLIENT_OPTIONS = {
40
40
  capabilities: {
41
- // https://github.com/anomalyco/opencode/issues/11948
41
+ // https://github.com/anymousdark/anymous/issues/11948
42
42
  // sampling: {},
43
- // https://github.com/anomalyco/opencode/issues/23066
43
+ // https://github.com/anymousdark/anymous/issues/23066
44
44
  // elicitation: {},
45
- // https://github.com/anomalyco/opencode/issues/2308
45
+ // https://github.com/anymousdark/anymous/issues/2308
46
46
  roots: {},
47
- // https://github.com/anomalyco/opencode/issues/28567
47
+ // https://github.com/anymousdark/anymous/issues/28567
48
48
  // tasks: {},
49
49
  },
50
50
  } satisfies ClientOptions
@@ -73,7 +73,7 @@ export class NotFoundError extends Schema.TaggedErrorClass<NotFoundError>()("MCP
73
73
  type MCPClient = Client
74
74
 
75
75
  function createClient(directory: string) {
76
- const client = new Client({ name: "opencode", version: InstallationVersion }, CLIENT_OPTIONS)
76
+ const client = new Client({ name: "anymous", version: InstallationVersion }, CLIENT_OPTIONS)
77
77
  client.setRequestHandler(ListRootsRequestSchema, () =>
78
78
  Promise.resolve({ roots: [{ uri: pathToFileURL(directory).href }] }),
79
79
  )
@@ -197,7 +197,7 @@ export interface Interface {
197
197
  readonly getAuthStatus: (mcpName: string) => Effect.Effect<AuthStatus>
198
198
  }
199
199
 
200
- export class Service extends Context.Service<Service, Interface>()("@opencode/MCP") {}
200
+ export class Service extends Context.Service<Service, Interface>()("@anymous/MCP") {}
201
201
 
202
202
  export const use = serviceUse(Service)
203
203
 
@@ -314,7 +314,7 @@ const layer = Layer.effect(
314
314
  return events
315
315
  .publish(TuiEvent.ToastShow, {
316
316
  title: "MCP Authentication Required",
317
- message: `Server "${key}" requires authentication. Run: opencode mcp auth ${key}`,
317
+ message: `Server "${key}" requires authentication. Run: anymous mcp auth ${key}`,
318
318
  variant: "warning",
319
319
  duration: 8000,
320
320
  })
@@ -351,7 +351,7 @@ const layer = Layer.effect(
351
351
  cwd,
352
352
  env: {
353
353
  ...process.env,
354
- ...(cmd === "opencode" ? { BUN_BE_BUN: "1" } : {}),
354
+ ...(cmd === "anymous" ? { BUN_BE_BUN: "1" } : {}),
355
355
  ...mcp.environment,
356
356
  },
357
357
  })
@@ -1,6 +1,6 @@
1
1
  import { createConnection } from "net"
2
2
  import { createServer } from "http"
3
- import { OauthCallbackPage } from "@opencode-ai/core/oauth/page"
3
+ import { OauthCallbackPage } from "@anymous-ai/core/oauth/page"
4
4
  import { OAUTH_CALLBACK_PORT, OAUTH_CALLBACK_PATH, parseRedirectUri } from "./oauth-provider"
5
5
 
6
6
  const OAUTH_CALLBACK_HOST = "127.0.0.1"
@@ -43,8 +43,8 @@ export class McpOAuthProvider implements OAuthClientProvider {
43
43
  get clientMetadata(): OAuthClientMetadata {
44
44
  return {
45
45
  redirect_uris: [this.redirectUrl],
46
- client_name: "OpenCode",
47
- client_uri: "https://opencode.ai",
46
+ client_name: "anymous",
47
+ client_uri: "https://anymous-cli.vercel.app",
48
48
  grant_types: ["authorization_code", "refresh_token"],
49
49
  response_types: ["code"],
50
50
  token_endpoint_auth_method: this.config.clientSecret ? "client_secret_post" : "none",
package/src/node.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Config } from "@/config/config"
2
2
  export { Server } from "./server/server"
3
3
  export { bootstrap } from "./cli/bootstrap"
4
- export { Database } from "@opencode-ai/core/database/database"
4
+ export { Database } from "@anymous-ai/core/database/database"
@@ -1,6 +1,6 @@
1
1
  import { Effect, Schema } from "effect"
2
2
  import * as path from "path"
3
- import { FSUtil } from "@opencode-ai/core/fs-util"
3
+ import { FSUtil } from "@anymous-ai/core/fs-util"
4
4
  import * as Bom from "../util/bom"
5
5
 
6
6
  export const PatchSchema = Schema.Struct({
@@ -1,10 +1,10 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
2
- import { ConfigPermissionV1 } from "@opencode-ai/core/v1/config/permission"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
+ import { ConfigPermissionV1 } from "@anymous-ai/core/v1/config/permission"
3
3
  import { InstanceState } from "@/effect/instance-state"
4
- import { Wildcard } from "@opencode-ai/core/util/wildcard"
4
+ import { Wildcard } from "@anymous-ai/core/util/wildcard"
5
5
  import { Deferred, Effect, Layer, Context } from "effect"
6
6
  import os from "os"
7
- import { PermissionV1 } from "@opencode-ai/core/v1/permission"
7
+ import { PermissionV1 } from "@anymous-ai/core/v1/permission"
8
8
  import { EventV2Bridge } from "@/event-v2-bridge"
9
9
 
10
10
  export const Event = PermissionV1.Event
@@ -41,7 +41,7 @@ export function evaluate(permission: string, pattern: string, ...rulesets: Permi
41
41
  )
42
42
  }
43
43
 
44
- export class Service extends Context.Service<Service, Interface>()("@opencode/Permission") {}
44
+ export class Service extends Context.Service<Service, Interface>()("@anymous/Permission") {}
45
45
 
46
46
  const layer = Layer.effect(
47
47
  Service,
@@ -1,4 +1,4 @@
1
- import type { Hooks, PluginInput } from "@opencode-ai/plugin"
1
+ import type { Hooks, PluginInput } from "@anymous-ai/plugin"
2
2
 
3
3
  export async function AzureAuthPlugin(_input: PluginInput): Promise<Hooks> {
4
4
  const prompts = []
@@ -1,4 +1,4 @@
1
- import type { Hooks, PluginInput } from "@opencode-ai/plugin"
1
+ import type { Hooks, PluginInput } from "@anymous-ai/plugin"
2
2
 
3
3
  export async function CloudflareWorkersAuthPlugin(_input: PluginInput): Promise<Hooks> {
4
4
  const prompts = !process.env.CLOUDFLARE_ACCOUNT_ID
@@ -1,7 +1,7 @@
1
- import type { Hooks, PluginInput } from "@opencode-ai/plugin"
2
- import type { Model } from "@opencode-ai/sdk/v2"
3
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
4
- import { OauthCallbackPage } from "@opencode-ai/core/oauth/page"
1
+ import type { Hooks, PluginInput } from "@anymous-ai/plugin"
2
+ import type { Model } from "@anymous-ai/sdk/v2"
3
+ import { InstallationVersion } from "@anymous-ai/core/installation/version"
4
+ import { OauthCallbackPage } from "@anymous-ai/core/oauth/page"
5
5
  import { createServer } from "http"
6
6
  import open from "open"
7
7
 
@@ -171,7 +171,7 @@ async function listRouters(
171
171
  headers: {
172
172
  Authorization: `Bearer ${bearer}`,
173
173
  Accept: "application/json",
174
- "User-Agent": `opencode/${InstallationVersion}`,
174
+ "User-Agent": `anymous/${InstallationVersion}`,
175
175
  },
176
176
  signal: AbortSignal.timeout(10_000),
177
177
  }).catch(() => undefined)
@@ -283,7 +283,7 @@ export async function DigitalOceanAuthPlugin(input: PluginInput): Promise<Hooks>
283
283
  return {
284
284
  url,
285
285
  instructions:
286
- "Sign in to DigitalOcean in your browser. OpenCode will use your DigitalOcean API token directly for inference and load your Inference Routers. Re-run /connect to refresh routers later.",
286
+ "Sign in to DigitalOcean in your browser. anymous will use your DigitalOcean API token directly for inference and load your Inference Routers. Re-run /connect to refresh routers later.",
287
287
  method: "auto" as const,
288
288
  async callback() {
289
289
  try {
@@ -1,6 +1,6 @@
1
- import type { Hooks, PluginInput } from "@opencode-ai/plugin"
2
- import type { Model } from "@opencode-ai/sdk/v2"
3
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
1
+ import type { Hooks, PluginInput } from "@anymous-ai/plugin"
2
+ import type { Model } from "@anymous-ai/sdk/v2"
3
+ import { InstallationVersion } from "@anymous-ai/core/installation/version"
4
4
  import { iife } from "@/util/iife"
5
5
  import { setTimeout as sleep } from "node:timers/promises"
6
6
  import { CopilotModels } from "./models"
@@ -72,7 +72,7 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
72
72
  {
73
73
  ...(provider.options?.headers as Record<string, string> | undefined),
74
74
  Authorization: `Bearer ${auth.refresh}`,
75
- "User-Agent": `opencode/${InstallationVersion}`,
75
+ "User-Agent": `anymous/${InstallationVersion}`,
76
76
  "X-GitHub-Api-Version": API_VERSION,
77
77
  },
78
78
  provider.models,
@@ -160,7 +160,7 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
160
160
  const headers: Record<string, string> = {
161
161
  "x-initiator": isAgent ? "agent" : "user",
162
162
  ...(init?.headers as Record<string, string>),
163
- "User-Agent": `opencode/${InstallationVersion}`,
163
+ "User-Agent": `anymous/${InstallationVersion}`,
164
164
  Authorization: `Bearer ${info.refresh}`,
165
165
  "Openai-Intent": "conversation-edits",
166
166
  }
@@ -236,7 +236,7 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
236
236
  headers: {
237
237
  Accept: "application/json",
238
238
  "Content-Type": "application/json",
239
- "User-Agent": `opencode/${InstallationVersion}`,
239
+ "User-Agent": `anymous/${InstallationVersion}`,
240
240
  },
241
241
  body: JSON.stringify({
242
242
  client_id: CLIENT_ID,
@@ -266,7 +266,7 @@ export async function CopilotAuthPlugin(input: PluginInput): Promise<Hooks> {
266
266
  headers: {
267
267
  Accept: "application/json",
268
268
  "Content-Type": "application/json",
269
- "User-Agent": `opencode/${InstallationVersion}`,
269
+ "User-Agent": `anymous/${InstallationVersion}`,
270
270
  },
271
271
  body: JSON.stringify({
272
272
  client_id: CLIENT_ID,
@@ -1,4 +1,4 @@
1
- import type { Model } from "@opencode-ai/sdk/v2"
1
+ import type { Model } from "@anymous-ai/sdk/v2"
2
2
  import { Option, Schema } from "effect"
3
3
 
4
4
  const item = Schema.Struct({
@@ -98,7 +98,7 @@ function build(key: string, remote: SelectableItem, url: string, prev?: Model):
98
98
  ? "chat"
99
99
  : undefined
100
100
  const prices = remote.billing?.token_prices
101
- // Copilot prices are AIC per billing batch; OpenCode stores USD per million tokens.
101
+ // Copilot prices are AIC per billing batch; anymous stores USD per million tokens.
102
102
  const usdPerMillion = prices && prices.batch_size > 0 ? 10_000 / prices.batch_size : 0
103
103
 
104
104
  const model: CopilotModel = {
@@ -1,17 +1,17 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@anymous-ai/core/effect/layer-node"
2
2
  import type {
3
3
  Hooks,
4
4
  PluginInput,
5
5
  Plugin as PluginInstance,
6
6
  PluginModule,
7
7
  WorkspaceAdapter as PluginWorkspaceAdapter,
8
- } from "@opencode-ai/plugin"
8
+ } from "@anymous-ai/plugin"
9
9
  import { Config } from "@/config/config"
10
- import { createOpencodeClient } from "@opencode-ai/sdk"
10
+ import { createanymousClient } from "@anymous-ai/sdk"
11
11
  import { ServerAuth } from "@/server/auth"
12
12
  import { CodexAuthPlugin } from "./openai/codex"
13
13
  import { Session } from "@/session/session"
14
- import { NamedError } from "@opencode-ai/core/util/error"
14
+ import { NamedError } from "@anymous-ai/core/util/error"
15
15
  import { CopilotAuthPlugin } from "./github-copilot/copilot"
16
16
  import { gitlabAuthPlugin as GitlabAuthPlugin } from "opencode-gitlab-auth"
17
17
  import { PoeAuthPlugin } from "opencode-poe-auth"
@@ -30,7 +30,7 @@ import { registerAdapter } from "@/control-plane/adapters"
30
30
  import type { WorkspaceAdapter } from "@/control-plane/types"
31
31
  import { RuntimeFlags } from "@/effect/runtime-flags"
32
32
  import { EventV2Bridge } from "@/event-v2-bridge"
33
- import { InstallationChannel } from "@opencode-ai/core/installation/version"
33
+ import { InstallationChannel } from "@anymous-ai/core/installation/version"
34
34
 
35
35
  type State = {
36
36
  hooks: Hooks[]
@@ -55,7 +55,7 @@ export interface Interface {
55
55
  readonly init: () => Effect.Effect<void>
56
56
  }
57
57
 
58
- export class Service extends Context.Service<Service, Interface>()("@opencode/Plugin") {}
58
+ export class Service extends Context.Service<Service, Interface>()("@anymous/Plugin") {}
59
59
 
60
60
  export function experimentalWebSocketsEnabled(input: { enabled: boolean; channel?: string }) {
61
61
  return input.enabled || ["local", "dev", "beta"].includes(input.channel ?? InstallationChannel)
@@ -139,7 +139,7 @@ const layer = Layer.effect(
139
139
  const { Server } = yield* Effect.promise(() => import("../server/server"))
140
140
 
141
141
  const serverUrl = Server.url
142
- const client = createOpencodeClient({
142
+ const client = createanymousClient({
143
143
  baseUrl: serverUrl?.toString() ?? "http://localhost:4096",
144
144
  directory: ctx.directory,
145
145
  headers: ServerAuth.headers(),