soraacode 0.1.0 → 0.1.2

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 (188) hide show
  1. package/package.json +12 -26
  2. package/parsers-config.ts +1 -1
  3. package/script/bench-search.ts +3 -3
  4. package/script/build.ts +1 -1
  5. package/script/publish.ts +1 -1
  6. package/script/schema.ts +2 -2
  7. package/specs/tui-plugins.md +7 -7
  8. package/specs/v2/api.ts +2 -2
  9. package/src/account/account.ts +3 -3
  10. package/src/account/repo.ts +4 -4
  11. package/src/acp/agent.ts +1 -1
  12. package/src/acp/content.ts +1 -1
  13. package/src/acp/directory.ts +3 -3
  14. package/src/acp/event.ts +1 -1
  15. package/src/acp/permission.ts +1 -1
  16. package/src/acp/service.ts +5 -5
  17. package/src/acp/session.ts +4 -4
  18. package/src/acp/usage.ts +5 -5
  19. package/src/agent/agent.ts +11 -11
  20. package/src/agent/subagent-permissions.ts +1 -1
  21. package/src/auth/index.ts +4 -4
  22. package/src/background/job.ts +3 -3
  23. package/src/cli/cmd/serve.ts +1 -1
  24. package/src/cli/error.ts +1 -1
  25. package/src/cli/heap.ts +2 -2
  26. package/src/cli/network.ts +1 -1
  27. package/src/command/index.ts +2 -2
  28. package/src/config/agent.ts +2 -2
  29. package/src/config/command.ts +3 -3
  30. package/src/config/config.ts +15 -15
  31. package/src/config/markdown.ts +2 -2
  32. package/src/config/parse.ts +2 -2
  33. package/src/config/paths.ts +3 -3
  34. package/src/config/plugin.ts +2 -2
  35. package/src/config/v2-compat.ts +4 -4
  36. package/src/config/variable.ts +1 -1
  37. package/src/control-plane/adapters/index.ts +1 -1
  38. package/src/control-plane/dev/debug-workspace-plugin.ts +1 -1
  39. package/src/control-plane/types.ts +3 -3
  40. package/src/control-plane/workspace-context.ts +1 -1
  41. package/src/control-plane/workspace.ts +13 -13
  42. package/src/effect/app-node-builder-v1.ts +2 -2
  43. package/src/effect/app-runtime.ts +9 -9
  44. package/src/effect/bootstrap-runtime.ts +4 -4
  45. package/src/effect/bridge.ts +1 -1
  46. package/src/effect/instance-ref.ts +1 -1
  47. package/src/effect/run-service.ts +2 -2
  48. package/src/effect/runtime-flags.ts +1 -1
  49. package/src/env/index.ts +2 -2
  50. package/src/event-manifest.ts +1 -1
  51. package/src/event-v2-bridge.ts +5 -5
  52. package/src/format/formatter.ts +2 -2
  53. package/src/format/index.ts +3 -3
  54. package/src/git/index.ts +2 -2
  55. package/src/ide/index.ts +2 -2
  56. package/src/image/image.ts +2 -2
  57. package/src/index-headless.ts +1 -1
  58. package/src/index.ts +1 -1
  59. package/src/installation/index.ts +9 -9
  60. package/src/lsp/lsp.ts +4 -4
  61. package/src/lsp/server.ts +4 -4
  62. package/src/mcp/auth.ts +5 -5
  63. package/src/mcp/browser.ts +1 -1
  64. package/src/mcp/index.ts +9 -9
  65. package/src/mcp/oauth-callback.ts +1 -1
  66. package/src/node.ts +1 -1
  67. package/src/patch/index.ts +1 -1
  68. package/src/permission/index.ts +4 -4
  69. package/src/plugin/github-copilot/copilot.ts +3 -3
  70. package/src/plugin/github-copilot/models.ts +1 -1
  71. package/src/plugin/index.ts +5 -5
  72. package/src/plugin/install.ts +2 -2
  73. package/src/plugin/loader.ts +2 -2
  74. package/src/plugin/meta.ts +3 -3
  75. package/src/plugin/openai/codex.ts +3 -3
  76. package/src/plugin/pty-environment.ts +1 -1
  77. package/src/plugin/shared.ts +1 -1
  78. package/src/project/bootstrap.ts +1 -1
  79. package/src/project/instance-context.ts +1 -1
  80. package/src/project/instance-store.ts +4 -4
  81. package/src/project/project.ts +16 -16
  82. package/src/project/vcs.ts +4 -4
  83. package/src/provider/auth.ts +5 -5
  84. package/src/provider/error.ts +2 -2
  85. package/src/provider/model-status.ts +1 -1
  86. package/src/provider/provider.ts +13 -13
  87. package/src/provider/transform.ts +1 -1
  88. package/src/question/index.ts +2 -2
  89. package/src/question/schema.ts +1 -1
  90. package/src/server/auth.ts +1 -1
  91. package/src/server/event.ts +1 -1
  92. package/src/server/routes/instance/httpapi/api.ts +7 -7
  93. package/src/server/routes/instance/httpapi/groups/config.ts +1 -1
  94. package/src/server/routes/instance/httpapi/groups/control-plane.ts +1 -1
  95. package/src/server/routes/instance/httpapi/groups/control.ts +1 -1
  96. package/src/server/routes/instance/httpapi/groups/experimental.ts +3 -3
  97. package/src/server/routes/instance/httpapi/groups/file.ts +2 -2
  98. package/src/server/routes/instance/httpapi/groups/global.ts +3 -3
  99. package/src/server/routes/instance/httpapi/groups/mcp.ts +1 -1
  100. package/src/server/routes/instance/httpapi/groups/permission.ts +1 -1
  101. package/src/server/routes/instance/httpapi/groups/project-copy.ts +1 -1
  102. package/src/server/routes/instance/httpapi/groups/project.ts +1 -1
  103. package/src/server/routes/instance/httpapi/groups/provider.ts +1 -1
  104. package/src/server/routes/instance/httpapi/groups/pty.ts +3 -3
  105. package/src/server/routes/instance/httpapi/groups/session.ts +4 -4
  106. package/src/server/routes/instance/httpapi/groups/sync.ts +2 -2
  107. package/src/server/routes/instance/httpapi/handlers/control-plane.ts +2 -2
  108. package/src/server/routes/instance/httpapi/handlers/control.ts +1 -1
  109. package/src/server/routes/instance/httpapi/handlers/event.ts +1 -1
  110. package/src/server/routes/instance/httpapi/handlers/file.ts +6 -6
  111. package/src/server/routes/instance/httpapi/handlers/global.ts +2 -2
  112. package/src/server/routes/instance/httpapi/handlers/instance.ts +1 -1
  113. package/src/server/routes/instance/httpapi/handlers/permission.ts +1 -1
  114. package/src/server/routes/instance/httpapi/handlers/project-copy.ts +2 -2
  115. package/src/server/routes/instance/httpapi/handlers/project.ts +1 -1
  116. package/src/server/routes/instance/httpapi/handlers/provider.ts +2 -2
  117. package/src/server/routes/instance/httpapi/handlers/pty.ts +9 -9
  118. package/src/server/routes/instance/httpapi/handlers/session.ts +3 -3
  119. package/src/server/routes/instance/httpapi/handlers/sync.ts +3 -3
  120. package/src/server/routes/instance/httpapi/middleware/authorization.ts +1 -1
  121. package/src/server/routes/instance/httpapi/middleware/error.ts +2 -2
  122. package/src/server/routes/instance/httpapi/middleware/fence.ts +2 -2
  123. package/src/server/routes/instance/httpapi/middleware/workspace-routing.ts +2 -2
  124. package/src/server/routes/instance/httpapi/server.ts +27 -27
  125. package/src/server/routes/instance/httpapi/websocket-tracker.ts +1 -1
  126. package/src/server/server.ts +2 -2
  127. package/src/server/shared/fence.ts +3 -3
  128. package/src/server/shared/ui.ts +1 -1
  129. package/src/server/tui-event.ts +1 -1
  130. package/src/session/compaction.ts +8 -8
  131. package/src/session/instruction.ts +6 -6
  132. package/src/session/llm/AGENTS.md +8 -8
  133. package/src/session/llm/ai-sdk.ts +2 -2
  134. package/src/session/llm/native-request.ts +4 -4
  135. package/src/session/llm/native-runtime.ts +4 -4
  136. package/src/session/llm/request.ts +3 -3
  137. package/src/session/llm.ts +10 -10
  138. package/src/session/message-error.ts +1 -1
  139. package/src/session/message-v2.ts +7 -7
  140. package/src/session/message.ts +3 -3
  141. package/src/session/overflow.ts +2 -2
  142. package/src/session/processor.ts +5 -5
  143. package/src/session/prompt.ts +13 -13
  144. package/src/session/reminders.ts +2 -2
  145. package/src/session/retry.ts +2 -2
  146. package/src/session/revert.ts +2 -2
  147. package/src/session/run-state.ts +2 -2
  148. package/src/session/schema.ts +2 -2
  149. package/src/session/session.ts +20 -20
  150. package/src/session/status.ts +2 -2
  151. package/src/session/summary.ts +2 -2
  152. package/src/session/system.ts +6 -6
  153. package/src/session/todo.ts +4 -4
  154. package/src/session/tools.ts +3 -3
  155. package/src/share/session.ts +1 -1
  156. package/src/share/share-next.ts +9 -9
  157. package/src/skill/discovery.ts +4 -4
  158. package/src/skill/index.ts +7 -7
  159. package/src/snapshot/index.ts +6 -6
  160. package/src/storage/schema.ts +5 -5
  161. package/src/storage/storage.ts +4 -4
  162. package/src/sync/schema.ts +1 -1
  163. package/src/temporary.ts +1 -1
  164. package/src/tool/apply_patch.ts +3 -3
  165. package/src/tool/code-mode.ts +1 -1
  166. package/src/tool/edit.ts +3 -3
  167. package/src/tool/external-directory.ts +1 -1
  168. package/src/tool/glob.ts +2 -2
  169. package/src/tool/grep.ts +2 -2
  170. package/src/tool/lsp.ts +1 -1
  171. package/src/tool/plan.ts +1 -1
  172. package/src/tool/read.ts +2 -2
  173. package/src/tool/registry.ts +11 -11
  174. package/src/tool/schema.ts +1 -1
  175. package/src/tool/shell/prompt.ts +2 -2
  176. package/src/tool/shell.ts +2 -2
  177. package/src/tool/skill.ts +1 -1
  178. package/src/tool/task.ts +2 -2
  179. package/src/tool/tool.ts +2 -2
  180. package/src/tool/truncate.ts +2 -2
  181. package/src/tool/truncation-dir.ts +1 -1
  182. package/src/tool/websearch.ts +2 -2
  183. package/src/tool/write.ts +3 -3
  184. package/src/util/bom.ts +1 -1
  185. package/src/util/filesystem.ts +2 -2
  186. package/src/util/repository.ts +1 -1
  187. package/src/util/token.ts +1 -1
  188. package/src/worktree/index.ts +10 -10
@@ -1,11 +1,11 @@
1
- import type { Hooks, PluginInput } from "@opencode-ai/plugin"
2
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
1
+ import type { Hooks, PluginInput } from "@soraacode/plugin"
2
+ import { InstallationVersion } from "@soraacode/core/installation/version"
3
3
  import { OAUTH_DUMMY_KEY } from "../../auth"
4
4
  import os from "os"
5
5
  import { setTimeout as sleep } from "node:timers/promises"
6
6
  import { createServer } from "http"
7
7
  import { OpenAIWebSocketPool } from "./ws-pool"
8
- import { OauthCallbackPage } from "@opencode-ai/core/oauth/page"
8
+ import { OauthCallbackPage } from "@soraacode/core/oauth/page"
9
9
 
10
10
  const CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann"
11
11
  const ISSUER = "https://auth.openai.com"
@@ -1,6 +1,6 @@
1
1
  export * as PluginPtyEnvironment from "./pty-environment"
2
2
 
3
- import { PtyEnvironment } from "@opencode-ai/server/pty-environment"
3
+ import { PtyEnvironment } from "@soraacode/server/pty-environment"
4
4
  import { Effect, Layer } from "effect"
5
5
  import { InstanceStore } from "@/project/instance-store"
6
6
  import { Plugin } from "."
@@ -4,7 +4,7 @@ import npa from "npm-package-arg"
4
4
  import semver from "semver"
5
5
  import { Filesystem } from "@/util/filesystem"
6
6
  import { isRecord } from "@/util/record"
7
- import { Npm } from "@opencode-ai/core/npm"
7
+ import { Npm } from "@soraacode/core/npm"
8
8
 
9
9
  // Old npm package names for plugins that are now built-in
10
10
  export const DEPRECATED_PLUGIN_PACKAGES = ["opencode-openai-codex-auth", "opencode-copilot-auth"]
@@ -1,4 +1,4 @@
1
- import { makeGlobalNode } from "@opencode-ai/core/effect/app-node"
1
+ import { makeGlobalNode } from "@soraacode/core/effect/app-node"
2
2
  import { Plugin } from "../plugin"
3
3
  import { Format } from "../format"
4
4
  import { LSP } from "@/lsp/lsp"
@@ -1,5 +1,5 @@
1
1
  import { LocalContext } from "@/util/local-context"
2
- import { FSUtil } from "@opencode-ai/core/fs-util"
2
+ import { FSUtil } from "@soraacode/core/fs-util"
3
3
  import type * as Project from "./project"
4
4
 
5
5
  export interface InstanceContext {
@@ -1,11 +1,11 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
2
- import { makeGlobalNode, Node } from "@opencode-ai/core/effect/app-node"
1
+ import { LayerNode } from "@soraacode/core/effect/layer-node"
2
+ import { makeGlobalNode, Node } from "@soraacode/core/effect/app-node"
3
3
  import { GlobalBus } from "@/bus/global"
4
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
4
+ import { serviceUse } from "@soraacode/core/effect/service-use"
5
5
  import { WorkspaceContext } from "@/control-plane/workspace-context"
6
6
  import { InstanceRef } from "@/effect/instance-ref"
7
7
  import { disposeInstance as runDisposers } from "@/effect/instance-registry"
8
- import { FSUtil } from "@opencode-ai/core/fs-util"
8
+ import { FSUtil } from "@soraacode/core/fs-util"
9
9
  import { Context, Deferred, Duration, Effect, Exit, Layer, Scope } from "effect"
10
10
  import { type InstanceContext } from "./instance-context"
11
11
  import { InstanceBootstrap } from "./bootstrap-service"
@@ -1,27 +1,27 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@soraacode/core/effect/layer-node"
2
2
  import { and, eq, sql } from "drizzle-orm"
3
- import { Database } from "@opencode-ai/core/database/database"
4
- import { ProjectDirectoryTable, ProjectTable } from "@opencode-ai/core/project/sql"
5
- import { ProjectDirectories } from "@opencode-ai/core/project/directories"
6
- import { SessionTable } from "@opencode-ai/core/session/sql"
7
- import { WorkspaceTable } from "@opencode-ai/core/control-plane/workspace.sql"
8
- import { Flag } from "@opencode-ai/core/flag/flag"
3
+ import { Database } from "@soraacode/core/database/database"
4
+ import { ProjectDirectoryTable, ProjectTable } from "@soraacode/core/project/sql"
5
+ import { ProjectDirectories } from "@soraacode/core/project/directories"
6
+ import { SessionTable } from "@soraacode/core/session/sql"
7
+ import { WorkspaceTable } from "@soraacode/core/control-plane/workspace.sql"
8
+ import { Flag } from "@soraacode/core/flag/flag"
9
9
  import { GlobalBus } from "@/bus/global"
10
- import { which } from "@opencode-ai/core/util/which"
10
+ import { which } from "@soraacode/core/util/which"
11
11
  import { Command } from "@/command"
12
12
  import { InstanceState } from "@/effect/instance-state"
13
13
  import { Effect, Layer, Scope, Context, Stream, Types, Schema } from "effect"
14
14
  import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"
15
- import { FSUtil } from "@opencode-ai/core/fs-util"
16
- import { AppProcess } from "@opencode-ai/core/process"
17
- import { ProjectV2 } from "@opencode-ai/core/project"
18
- import { CrossSpawnSpawner } from "@opencode-ai/core/cross-spawn-spawner"
19
- import { AbsolutePath } from "@opencode-ai/core/schema"
20
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
15
+ import { FSUtil } from "@soraacode/core/fs-util"
16
+ import { AppProcess } from "@soraacode/core/process"
17
+ import { ProjectV2 } from "@soraacode/core/project"
18
+ import { CrossSpawnSpawner } from "@soraacode/core/cross-spawn-spawner"
19
+ import { AbsolutePath } from "@soraacode/core/schema"
20
+ import { serviceUse } from "@soraacode/core/effect/service-use"
21
21
  import { RuntimeFlags } from "@/effect/runtime-flags"
22
22
  import { EventV2Bridge } from "@/event-v2-bridge"
23
- import { EventV2 } from "@opencode-ai/core/event"
24
- import { Project } from "@opencode-ai/schema/project"
23
+ import { EventV2 } from "@soraacode/core/event"
24
+ import { Project } from "@soraacode/schema/project"
25
25
 
26
26
  export const Info = Project.Info
27
27
  export type Info = Types.DeepMutable<Schema.Schema.Type<typeof Info>>
@@ -1,12 +1,12 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@soraacode/core/effect/layer-node"
2
2
  import { Effect, Layer, Context, Schema, Scope } from "effect"
3
3
  import { formatPatch, structuredPatch } from "diff"
4
4
  import { InstanceState } from "@/effect/instance-state"
5
- import { Watcher } from "@opencode-ai/core/filesystem/watcher"
5
+ import { Watcher } from "@soraacode/core/filesystem/watcher"
6
6
  import { Git } from "@/git"
7
7
  import { EventV2Bridge } from "@/event-v2-bridge"
8
- import { EventV2 } from "@opencode-ai/core/event"
9
- import { VcsEvent } from "@opencode-ai/schema/vcs-event"
8
+ import { EventV2 } from "@soraacode/core/event"
9
+ import { VcsEvent } from "@soraacode/schema/vcs-event"
10
10
 
11
11
  const PATCH_CONTEXT_LINES = 2_147_483_647
12
12
  const MAX_PATCH_BYTES = 10_000_000
@@ -1,11 +1,11 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
2
- import type { AuthOAuthResult, Hooks } from "@opencode-ai/plugin"
3
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
1
+ import { LayerNode } from "@soraacode/core/effect/layer-node"
2
+ import type { AuthOAuthResult, Hooks } from "@soraacode/plugin"
3
+ import { serviceUse } from "@soraacode/core/effect/service-use"
4
4
  import { Auth } from "@/auth"
5
5
  import { InstanceState } from "@/effect/instance-state"
6
- import { optional } from "@opencode-ai/core/schema"
6
+ import { optional } from "@soraacode/core/schema"
7
7
  import { Plugin } from "../plugin"
8
- import { ProviderV2 } from "@opencode-ai/core/provider"
8
+ import { ProviderV2 } from "@soraacode/core/provider"
9
9
  import { Array as Arr, Effect, Layer, Record, Result, Context, Schema } from "effect"
10
10
 
11
11
  const When = Schema.Struct({
@@ -1,8 +1,8 @@
1
1
  import { APICallError } from "ai"
2
2
  import { STATUS_CODES } from "http"
3
3
  import { iife } from "@/util/iife"
4
- import type { ProviderV2 } from "@opencode-ai/core/provider"
5
- import { isContextOverflow } from "@opencode-ai/llm"
4
+ import type { ProviderV2 } from "@soraacode/core/provider"
5
+ import { isContextOverflow } from "@soraacode/llm"
6
6
 
7
7
  export class HeaderTimeoutError extends Error {
8
8
  public override readonly name = "ProviderHeaderTimeoutError"
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect"
2
2
 
3
- export { CatalogModelStatus } from "@opencode-ai/core/models-dev"
3
+ export { CatalogModelStatus } from "@soraacode/core/models-dev"
4
4
 
5
5
  export const ModelStatus = Schema.Literals(["alpha", "beta", "deprecated", "active"])
6
6
  export type ModelStatus = typeof ModelStatus.Type
@@ -1,33 +1,33 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@soraacode/core/effect/layer-node"
2
2
  import os from "os"
3
- import { ConfigV1 } from "@opencode-ai/core/v1/config/config"
3
+ import { ConfigV1 } from "@soraacode/core/v1/config/config"
4
4
  import fuzzysort from "fuzzysort"
5
5
  import { Config } from "@/config/config"
6
6
  import { mapValues, mergeDeep, omit, pickBy, sortBy } from "remeda"
7
7
  import { NoSuchModelError, type Provider as SDK } from "ai"
8
- import { Npm } from "@opencode-ai/core/npm"
9
- import { Hash } from "@opencode-ai/core/util/hash"
8
+ import { Npm } from "@soraacode/core/npm"
9
+ import { Hash } from "@soraacode/core/util/hash"
10
10
  import { Plugin } from "../plugin"
11
- import { serviceUse } from "@opencode-ai/core/effect/service-use"
11
+ import { serviceUse } from "@soraacode/core/effect/service-use"
12
12
  import { type LanguageModelV3 } from "@ai-sdk/provider"
13
- import { ModelsDev } from "@opencode-ai/core/models-dev"
13
+ import { ModelsDev } from "@soraacode/core/models-dev"
14
14
  import { Auth } from "../auth"
15
15
  import { Env } from "../env"
16
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
16
+ import { InstallationVersion } from "@soraacode/core/installation/version"
17
17
  import { iife } from "@/util/iife"
18
- import { Global } from "@opencode-ai/core/global"
18
+ import { Global } from "@soraacode/core/global"
19
19
  import path from "path"
20
20
  import { pathToFileURL } from "url"
21
21
  import { Effect, Layer, Context, Schema, Types } from "effect"
22
22
  import { EffectBridge } from "@/effect/bridge"
23
23
  import { InstanceState } from "@/effect/instance-state"
24
24
  import { EffectPromise } from "@/effect/promise"
25
- import { FSUtil } from "@opencode-ai/core/fs-util"
25
+ import { FSUtil } from "@soraacode/core/fs-util"
26
26
  import { isRecord } from "@/util/record"
27
- import { optional } from "@opencode-ai/core/schema"
27
+ import { optional } from "@soraacode/core/schema"
28
28
  import { ProviderTransform } from "./transform"
29
- import { ProviderV2 } from "@opencode-ai/core/provider"
30
- import { ModelV2 } from "@opencode-ai/core/model"
29
+ import { ProviderV2 } from "@soraacode/core/provider"
30
+ import { ModelV2 } from "@soraacode/core/model"
31
31
  import { ModelStatus } from "./model-status"
32
32
  import { RuntimeFlags } from "@/effect/runtime-flags"
33
33
  import { ProviderError } from "./error"
@@ -135,7 +135,7 @@ const BUNDLED_PROVIDERS: Record<string, () => Promise<(opts: any) => BundledSDK>
135
135
  "@ai-sdk/alibaba": () => import("@ai-sdk/alibaba").then((m) => m.createAlibaba),
136
136
  "gitlab-ai-provider": () => import("gitlab-ai-provider").then((m) => m.createGitLab),
137
137
  "@ai-sdk/github-copilot": () =>
138
- import("@opencode-ai/core/github-copilot/copilot-provider").then((m) => m.createOpenaiCompatible),
138
+ import("@soraacode/core/github-copilot/copilot-provider").then((m) => m.createOpenaiCompatible),
139
139
  "venice-ai-sdk-provider": () => import("venice-ai-sdk-provider").then((m) => m.createVenice),
140
140
  }
141
141
 
@@ -2,7 +2,7 @@ import type { ModelMessage, ToolResultPart } from "ai"
2
2
  import { mergeDeep, unique } from "remeda"
3
3
  import type { JSONSchema7 } from "@ai-sdk/provider"
4
4
  import type * as Provider from "./provider"
5
- import type * as ModelsDev from "@opencode-ai/core/models-dev"
5
+ import type * as ModelsDev from "@soraacode/core/models-dev"
6
6
  import { iife } from "@/util/iife"
7
7
 
8
8
  type Modality = NonNullable<ModelsDev.Model["modalities"]>["input"][number]
@@ -1,10 +1,10 @@
1
- import { LayerNode } from "@opencode-ai/core/effect/layer-node"
1
+ import { LayerNode } from "@soraacode/core/effect/layer-node"
2
2
  import { Deferred, Effect, Layer, Schema, Context } from "effect"
3
3
  import { InstanceState } from "@/effect/instance-state"
4
4
  import { SessionID } from "@/session/schema"
5
5
  import { QuestionID } from "./schema"
6
6
  import { EventV2Bridge } from "@/event-v2-bridge"
7
- import { QuestionV1 } from "@opencode-ai/schema/question-v1"
7
+ import { QuestionV1 } from "@soraacode/schema/question-v1"
8
8
 
9
9
  export const Option = QuestionV1.Option
10
10
  export type Option = typeof Option.Type
@@ -1,4 +1,4 @@
1
- import { QuestionV1 } from "@opencode-ai/schema/question-v1"
1
+ import { QuestionV1 } from "@soraacode/schema/question-v1"
2
2
 
3
3
  export const QuestionID = QuestionV1.ID
4
4
  export type QuestionID = typeof QuestionID.Type
@@ -1,7 +1,7 @@
1
1
  export * as ServerAuth from "./auth"
2
2
 
3
3
  import { ConfigService } from "@/effect/config-service"
4
- import { Flag } from "@opencode-ai/core/flag/flag"
4
+ import { Flag } from "@soraacode/core/flag/flag"
5
5
  import { Config as EffectConfig, Context, Option, Redacted } from "effect"
6
6
 
7
7
  export type Credentials = {
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect"
2
- import { ServerEvent } from "@opencode-ai/schema/server-event"
2
+ import { ServerEvent } from "@soraacode/schema/server-event"
3
3
 
4
4
  export const Event = ServerEvent
5
5
 
@@ -1,10 +1,10 @@
1
1
  import { Schema } from "effect"
2
2
  import { HttpApi } from "effect/unstable/httpapi"
3
- import { EventV2 } from "@opencode-ai/core/event"
3
+ import { EventV2 } from "@soraacode/core/event"
4
4
  import { EventManifest } from "@/event-manifest"
5
- import { Credential } from "@opencode-ai/core/credential"
6
- import { Integration } from "@opencode-ai/core/integration"
7
- import { SkillV2 } from "@opencode-ai/core/skill"
5
+ import { Credential } from "@soraacode/core/credential"
6
+ import { Integration } from "@soraacode/core/integration"
7
+ import { SkillV2 } from "@soraacode/core/skill"
8
8
  import { InstanceDisposed } from "@/server/event"
9
9
  import { Question } from "@/question"
10
10
  import { ConfigApi } from "./groups/config"
@@ -25,9 +25,9 @@ import { SessionApi } from "./groups/session"
25
25
  import { SyncApi } from "./groups/sync"
26
26
  import { TuiApi } from "./groups/tui"
27
27
  import { WorkspaceApi } from "./groups/workspace"
28
- import { makeApi } from "@opencode-ai/protocol/api"
29
- import { LocationMiddleware } from "@opencode-ai/server/location"
30
- import { SessionLocationMiddleware } from "@opencode-ai/server/middleware/session-location"
28
+ import { makeApi } from "@soraacode/protocol/api"
29
+ import { LocationMiddleware } from "@soraacode/server/location"
30
+ import { SessionLocationMiddleware } from "@soraacode/server/middleware/session-location"
31
31
  import { GlobalApi } from "./groups/global"
32
32
  import { Authorization } from "./middleware/authorization"
33
33
  import { SchemaErrorMiddleware } from "./middleware/schema-error"
@@ -1,5 +1,5 @@
1
1
  import { Config } from "@/config/config"
2
- import { ConfigV1 } from "@opencode-ai/core/v1/config/config"
2
+ import { ConfigV1 } from "@soraacode/core/v1/config/config"
3
3
  import { Provider } from "@/provider/provider"
4
4
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
5
5
  import { Authorization } from "../middleware/authorization"
@@ -1,4 +1,4 @@
1
- import { MoveSession } from "@opencode-ai/core/control-plane/move-session"
1
+ import { MoveSession } from "@soraacode/core/control-plane/move-session"
2
2
  import { Schema } from "effect"
3
3
  import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
4
4
  import { described } from "./metadata"
@@ -3,7 +3,7 @@ import { Auth } from "@/auth"
3
3
  import { Schema } from "effect"
4
4
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
5
5
  import { described } from "./metadata"
6
- import { ProviderV2 } from "@opencode-ai/core/provider"
6
+ import { ProviderV2 } from "@soraacode/core/provider"
7
7
 
8
8
  const AuthParams = Schema.Struct({
9
9
  providerID: ProviderV2.ID,
@@ -4,7 +4,7 @@ import { MCP } from "@/mcp"
4
4
  import { Session } from "@/session/session"
5
5
  import { SessionID } from "@/session/schema"
6
6
  import { Worktree } from "@/worktree"
7
- import { NonNegativeInt } from "@opencode-ai/core/schema"
7
+ import { NonNegativeInt } from "@soraacode/core/schema"
8
8
  import { Schema } from "effect"
9
9
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
10
10
  import { Authorization } from "../middleware/authorization"
@@ -16,8 +16,8 @@ import {
16
16
  } from "../middleware/workspace-routing"
17
17
  import { described } from "./metadata"
18
18
  import { QueryBoolean } from "./query"
19
- import { ProviderV2 } from "@opencode-ai/core/provider"
20
- import { ModelV2 } from "@opencode-ai/core/model"
19
+ import { ProviderV2 } from "@soraacode/core/provider"
20
+ import { ModelV2 } from "@soraacode/core/model"
21
21
 
22
22
  const ConsoleStateResponse = Schema.Struct({
23
23
  consoleManagedProviders: Schema.mutable(Schema.Array(Schema.String)),
@@ -1,5 +1,5 @@
1
- import { FileSystem } from "@opencode-ai/core/filesystem"
2
- import { NonNegativeInt } from "@opencode-ai/core/schema"
1
+ import { FileSystem } from "@soraacode/core/filesystem"
2
+ import { NonNegativeInt } from "@soraacode/core/schema"
3
3
  import { LSP } from "@/lsp/lsp"
4
4
  import { Schema } from "effect"
5
5
  import { HttpApi, HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
@@ -1,8 +1,8 @@
1
- import { ConfigV1 } from "@opencode-ai/core/v1/config/config"
2
- import { EventV2 } from "@opencode-ai/core/event"
1
+ import { ConfigV1 } from "@soraacode/core/v1/config/config"
2
+ import { EventV2 } from "@soraacode/core/event"
3
3
  import { EventManifest } from "@/event-manifest"
4
4
  import { InstanceDisposed } from "@/server/event"
5
- import "@opencode-ai/core/account"
5
+ import "@soraacode/core/account"
6
6
  import "@/server/event"
7
7
  import { Schema } from "effect"
8
8
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
@@ -1,5 +1,5 @@
1
1
  import { MCP } from "@/mcp"
2
- import { ConfigMCPV1 } from "@opencode-ai/core/v1/config/mcp"
2
+ import { ConfigMCPV1 } from "@soraacode/core/v1/config/mcp"
3
3
  import { Schema } from "effect"
4
4
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
5
5
  import { McpServerNotFoundError } from "../errors"
@@ -1,4 +1,4 @@
1
- import { PermissionV1 } from "@opencode-ai/core/v1/permission"
1
+ import { PermissionV1 } from "@soraacode/core/v1/permission"
2
2
  import { Permission } from "@/permission"
3
3
  import { Schema } from "effect"
4
4
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
@@ -1,4 +1,4 @@
1
- import { ProjectV2 } from "@opencode-ai/core/project"
1
+ import { ProjectV2 } from "@soraacode/core/project"
2
2
  import { Schema } from "effect"
3
3
  import { HttpApi, HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
4
4
  import { Authorization } from "../middleware/authorization"
@@ -1,5 +1,5 @@
1
1
  import { Project } from "@/project/project"
2
- import { ProjectV2 } from "@opencode-ai/core/project"
2
+ import { ProjectV2 } from "@soraacode/core/project"
3
3
  import { Schema } from "effect"
4
4
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
5
5
  import { ProjectNotFoundError } from "../errors"
@@ -7,7 +7,7 @@ import { Authorization } from "../middleware/authorization"
7
7
  import { InstanceContextMiddleware } from "../middleware/instance-context"
8
8
  import { WorkspaceRoutingMiddleware, WorkspaceRoutingQuery } from "../middleware/workspace-routing"
9
9
  import { described } from "./metadata"
10
- import { ProviderV2 } from "@opencode-ai/core/provider"
10
+ import { ProviderV2 } from "@soraacode/core/provider"
11
11
 
12
12
  const root = "/provider"
13
13
 
@@ -1,6 +1,6 @@
1
- import { Pty } from "@opencode-ai/core/pty"
2
- import { PtyTicket } from "@opencode-ai/core/pty/ticket"
3
- import { PtyID } from "@opencode-ai/core/pty/schema"
1
+ import { Pty } from "@soraacode/core/pty"
2
+ import { PtyTicket } from "@soraacode/core/pty/ticket"
3
+ import { PtyID } from "@soraacode/core/pty/schema"
4
4
  import { PTY_CONNECT_TICKET_QUERY } from "@/server/shared/pty-ticket"
5
5
  import { Schema } from "effect"
6
6
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
@@ -1,6 +1,6 @@
1
- import { PermissionV1 } from "@opencode-ai/core/v1/permission"
1
+ import { PermissionV1 } from "@soraacode/core/v1/permission"
2
2
  import { Permission } from "@/permission"
3
- import { SessionV1 } from "@opencode-ai/core/v1/session"
3
+ import { SessionV1 } from "@soraacode/core/v1/session"
4
4
 
5
5
  import { Session } from "@/session/session"
6
6
  import { MessageV2 } from "@/session/message-v2"
@@ -23,8 +23,8 @@ import {
23
23
  import { ApiNotFoundError, PermissionNotFoundError, SessionBusyError } from "../errors"
24
24
  import { described } from "./metadata"
25
25
  import { QueryBoolean } from "./query"
26
- import { ProviderV2 } from "@opencode-ai/core/provider"
27
- import { ModelV2 } from "@opencode-ai/core/model"
26
+ import { ProviderV2 } from "@soraacode/core/provider"
27
+ import { ModelV2 } from "@soraacode/core/model"
28
28
 
29
29
  const root = "/session"
30
30
  export const ListQuery = Schema.Struct({
@@ -1,5 +1,5 @@
1
- import { NonNegativeInt } from "@opencode-ai/core/schema"
2
- import { EventV2 } from "@opencode-ai/core/event"
1
+ import { NonNegativeInt } from "@soraacode/core/schema"
2
+ import { EventV2 } from "@soraacode/core/event"
3
3
  import { SessionID } from "@/session/schema"
4
4
  import { Schema } from "effect"
5
5
  import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
@@ -1,5 +1,5 @@
1
- import { MoveSession } from "@opencode-ai/core/control-plane/move-session"
2
- import { SessionV2 } from "@opencode-ai/core/session"
1
+ import { MoveSession } from "@soraacode/core/control-plane/move-session"
2
+ import { SessionV2 } from "@soraacode/core/session"
3
3
  import { Effect } from "effect"
4
4
  import { HttpApiBuilder } from "effect/unstable/httpapi"
5
5
  import { RootHttpApi } from "../api"
@@ -4,7 +4,7 @@ import { Effect } from "effect"
4
4
  import { HttpApiBuilder } from "effect/unstable/httpapi"
5
5
  import { RootHttpApi } from "../api"
6
6
  import { LogInput } from "../groups/control"
7
- import { ProviderV2 } from "@opencode-ai/core/provider"
7
+ import { ProviderV2 } from "@soraacode/core/provider"
8
8
 
9
9
  export const controlHandlers = HttpApiBuilder.group(RootHttpApi, "control", (handlers) =>
10
10
  Effect.gen(function* () {
@@ -1,7 +1,7 @@
1
1
  import { EventV2Bridge } from "@/event-v2-bridge"
2
2
  import { InstanceState } from "@/effect/instance-state"
3
3
  import { GlobalBus } from "@/bus/global"
4
- import { EventV2 } from "@opencode-ai/core/event"
4
+ import { EventV2 } from "@soraacode/core/event"
5
5
  import { Effect, Queue } from "effect"
6
6
  import * as Stream from "effect/Stream"
7
7
  import { HttpServerResponse } from "effect/unstable/http"
@@ -1,10 +1,10 @@
1
1
  import * as InstanceState from "@/effect/instance-state"
2
- import { FileSystem } from "@opencode-ai/core/filesystem"
3
- import { LocationServiceMap, locationServiceMapLayer } from "@opencode-ai/core/location-services"
4
- import { Ripgrep } from "@opencode-ai/core/ripgrep"
5
- import { FSUtil } from "@opencode-ai/core/fs-util"
6
- import { Location } from "@opencode-ai/core/location"
7
- import { AbsolutePath, RelativePath } from "@opencode-ai/core/schema"
2
+ import { FileSystem } from "@soraacode/core/filesystem"
3
+ import { LocationServiceMap, locationServiceMapLayer } from "@soraacode/core/location-services"
4
+ import { Ripgrep } from "@soraacode/core/ripgrep"
5
+ import { FSUtil } from "@soraacode/core/fs-util"
6
+ import { Location } from "@soraacode/core/location"
7
+ import { AbsolutePath, RelativePath } from "@soraacode/core/schema"
8
8
  import { Effect, Layer, Option } from "effect"
9
9
  import ignore from "ignore"
10
10
  import path from "path"
@@ -1,10 +1,10 @@
1
1
  import { Config } from "@/config/config"
2
2
  import { GlobalBus, type GlobalEvent as GlobalBusEvent } from "@/bus/global"
3
3
  import { EffectBridge } from "@/effect/bridge"
4
- import { EventV2 } from "@opencode-ai/core/event"
4
+ import { EventV2 } from "@soraacode/core/event"
5
5
  import { Installation } from "@/installation"
6
6
  import { disposeAllInstancesAndEmitGlobalDisposed } from "@/server/global-lifecycle"
7
- import { InstallationVersion } from "@opencode-ai/core/installation/version"
7
+ import { InstallationVersion } from "@soraacode/core/installation/version"
8
8
  import { Effect, Queue } from "effect"
9
9
  import * as Stream from "effect/Stream"
10
10
  import { HttpServerResponse } from "effect/unstable/http"
@@ -2,7 +2,7 @@ import { Agent } from "@/agent/agent"
2
2
  import { Command } from "@/command"
3
3
  import * as InstanceState from "@/effect/instance-state"
4
4
  import { Format } from "@/format"
5
- import { Global } from "@opencode-ai/core/global"
5
+ import { Global } from "@soraacode/core/global"
6
6
  import { LSP } from "@/lsp/lsp"
7
7
  import { Vcs } from "@/project/vcs"
8
8
  import { Skill } from "@/skill"
@@ -1,4 +1,4 @@
1
- import { PermissionV1 } from "@opencode-ai/core/v1/permission"
1
+ import { PermissionV1 } from "@soraacode/core/v1/permission"
2
2
  import { Permission } from "@/permission"
3
3
  import { Effect } from "effect"
4
4
  import { HttpApiBuilder } from "effect/unstable/httpapi"
@@ -2,8 +2,8 @@ import { Agent } from "@/agent/agent"
2
2
  import { Provider } from "@/provider/provider"
3
3
  import { LLM } from "@/session/llm"
4
4
  import { MessageID, SessionID } from "@/session/schema"
5
- import { Slug } from "@opencode-ai/core/util/slug"
6
- import { LLMEvent } from "@opencode-ai/llm"
5
+ import { Slug } from "@soraacode/core/util/slug"
6
+ import { LLMEvent } from "@soraacode/llm"
7
7
  import { Effect, Stream } from "effect"
8
8
  import { HttpApiBuilder } from "effect/unstable/httpapi"
9
9
  import { InstanceHttpApi } from "../api"
@@ -1,6 +1,6 @@
1
1
  import * as InstanceState from "@/effect/instance-state"
2
2
  import { Project } from "@/project/project"
3
- import { ProjectV2 } from "@opencode-ai/core/project"
3
+ import { ProjectV2 } from "@soraacode/core/project"
4
4
  import { Effect } from "effect"
5
5
  import { HttpApiBuilder } from "effect/unstable/httpapi"
6
6
  import { InstanceHttpApi } from "../api"
@@ -1,6 +1,6 @@
1
1
  import { ProviderAuth } from "@/provider/auth"
2
2
  import { Config } from "@/config/config"
3
- import { ModelsDev } from "@opencode-ai/core/models-dev"
3
+ import { ModelsDev } from "@soraacode/core/models-dev"
4
4
  import { Provider } from "@/provider/provider"
5
5
  import { Auth } from "@/auth"
6
6
 
@@ -10,7 +10,7 @@ import { HttpServerRequest, HttpServerResponse } from "effect/unstable/http"
10
10
  import { HttpApiBuilder } from "effect/unstable/httpapi"
11
11
  import { InstanceHttpApi } from "../api"
12
12
  import { ProviderAuthApiError } from "../groups/provider"
13
- import { ProviderV2 } from "@opencode-ai/core/provider"
13
+ import { ProviderV2 } from "@soraacode/core/provider"
14
14
 
15
15
  function mapProviderAuthError<A, R>(self: Effect.Effect<A, ProviderAuth.Error, R>) {
16
16
  return self.pipe(
@@ -2,15 +2,15 @@ import * as InstanceState from "@/effect/instance-state"
2
2
  import { registerDisposer } from "@/effect/instance-registry"
3
3
  import { InstanceRef, WorkspaceRef } from "@/effect/instance-ref"
4
4
  import { Plugin } from "@/plugin"
5
- import { Pty } from "@opencode-ai/core/pty"
6
- import { PtyProtocol } from "@opencode-ai/core/pty/protocol"
7
- import { PtyID } from "@opencode-ai/core/pty/schema"
8
- import { PtyTicket } from "@opencode-ai/core/pty/ticket"
9
- import { LocationServiceMap, locationServiceMapLayer } from "@opencode-ai/core/location-services"
10
- import { Location } from "@opencode-ai/core/location"
11
- import { AbsolutePath } from "@opencode-ai/core/schema"
12
- import { Shell } from "@opencode-ai/core/shell"
13
- import { CorsConfig, isAllowedRequestOrigin, type CorsOptions } from "@opencode-ai/server/cors"
5
+ import { Pty } from "@soraacode/core/pty"
6
+ import { PtyProtocol } from "@soraacode/core/pty/protocol"
7
+ import { PtyID } from "@soraacode/core/pty/schema"
8
+ import { PtyTicket } from "@soraacode/core/pty/ticket"
9
+ import { LocationServiceMap, locationServiceMapLayer } from "@soraacode/core/location-services"
10
+ import { Location } from "@soraacode/core/location"
11
+ import { AbsolutePath } from "@soraacode/core/schema"
12
+ import { Shell } from "@soraacode/core/shell"
13
+ import { CorsConfig, isAllowedRequestOrigin, type CorsOptions } from "@soraacode/server/cors"
14
14
  import {
15
15
  PTY_CONNECT_TICKET_QUERY,
16
16
  PTY_CONNECT_TOKEN_HEADER,