|
| 1 | +import { Layer, ManagedRuntime } from "effect" |
| 2 | +import { memoMap } from "./run-service" |
| 3 | +import { Observability } from "./oltp" |
| 4 | + |
| 5 | +import { AppFileSystem } from "@/filesystem" |
| 6 | +import { Bus } from "@/bus" |
| 7 | +import { Auth } from "@/auth" |
| 8 | +import { Account } from "@/account" |
| 9 | +import { Config } from "@/config/config" |
| 10 | +import { Git } from "@/git" |
| 11 | +import { Ripgrep } from "@/file/ripgrep" |
| 12 | +import { FileTime } from "@/file/time" |
| 13 | +import { File } from "@/file" |
| 14 | +import { FileWatcher } from "@/file/watcher" |
| 15 | +import { Storage } from "@/storage/storage" |
| 16 | +import { Snapshot } from "@/snapshot" |
| 17 | +import { Plugin } from "@/plugin" |
| 18 | +import { Provider } from "@/provider/provider" |
| 19 | +import { ProviderAuth } from "@/provider/auth" |
| 20 | +import { Agent } from "@/agent/agent" |
| 21 | +import { Skill } from "@/skill" |
| 22 | +import { Discovery } from "@/skill/discovery" |
| 23 | +import { Question } from "@/question" |
| 24 | +import { Permission } from "@/permission" |
| 25 | +import { Todo } from "@/session/todo" |
| 26 | +import { Session } from "@/session" |
| 27 | +import { SessionStatus } from "@/session/status" |
| 28 | +import { SessionRunState } from "@/session/run-state" |
| 29 | +import { SessionProcessor } from "@/session/processor" |
| 30 | +import { SessionCompaction } from "@/session/compaction" |
| 31 | +import { SessionRevert } from "@/session/revert" |
| 32 | +import { SessionSummary } from "@/session/summary" |
| 33 | +import { SessionPrompt } from "@/session/prompt" |
| 34 | +import { Instruction } from "@/session/instruction" |
| 35 | +import { LLM } from "@/session/llm" |
| 36 | +import { LSP } from "@/lsp" |
| 37 | +import { MCP } from "@/mcp" |
| 38 | +import { McpAuth } from "@/mcp/auth" |
| 39 | +import { Command } from "@/command" |
| 40 | +import { Truncate } from "@/tool/truncate" |
| 41 | +import { ToolRegistry } from "@/tool/registry" |
| 42 | +import { Format } from "@/format" |
| 43 | +import { Project } from "@/project/project" |
| 44 | +import { Vcs } from "@/project/vcs" |
| 45 | +import { Worktree } from "@/worktree" |
| 46 | +import { Pty } from "@/pty" |
| 47 | +import { Installation } from "@/installation" |
| 48 | +import { ShareNext } from "@/share/share-next" |
| 49 | +import { SessionShare } from "@/share/session" |
| 50 | + |
| 51 | +export const AppLayer = Layer.mergeAll( |
| 52 | + Observability.layer, |
| 53 | + AppFileSystem.defaultLayer, |
| 54 | + Bus.defaultLayer, |
| 55 | + Auth.defaultLayer, |
| 56 | + Account.defaultLayer, |
| 57 | + Config.defaultLayer, |
| 58 | + Git.defaultLayer, |
| 59 | + Ripgrep.defaultLayer, |
| 60 | + FileTime.defaultLayer, |
| 61 | + File.defaultLayer, |
| 62 | + FileWatcher.defaultLayer, |
| 63 | + Storage.defaultLayer, |
| 64 | + Snapshot.defaultLayer, |
| 65 | + Plugin.defaultLayer, |
| 66 | + Provider.defaultLayer, |
| 67 | + ProviderAuth.defaultLayer, |
| 68 | + Agent.defaultLayer, |
| 69 | + Skill.defaultLayer, |
| 70 | + Discovery.defaultLayer, |
| 71 | + Question.defaultLayer, |
| 72 | + Permission.defaultLayer, |
| 73 | + Todo.defaultLayer, |
| 74 | + Session.defaultLayer, |
| 75 | + SessionStatus.defaultLayer, |
| 76 | + SessionRunState.defaultLayer, |
| 77 | + SessionProcessor.defaultLayer, |
| 78 | + SessionCompaction.defaultLayer, |
| 79 | + SessionRevert.defaultLayer, |
| 80 | + SessionSummary.defaultLayer, |
| 81 | + SessionPrompt.defaultLayer, |
| 82 | + Instruction.defaultLayer, |
| 83 | + LLM.defaultLayer, |
| 84 | + LSP.defaultLayer, |
| 85 | + MCP.defaultLayer, |
| 86 | + McpAuth.defaultLayer, |
| 87 | + Command.defaultLayer, |
| 88 | + Truncate.defaultLayer, |
| 89 | + ToolRegistry.defaultLayer, |
| 90 | + Format.defaultLayer, |
| 91 | + Project.defaultLayer, |
| 92 | + Vcs.defaultLayer, |
| 93 | + Worktree.defaultLayer, |
| 94 | + Pty.defaultLayer, |
| 95 | + Installation.defaultLayer, |
| 96 | + ShareNext.defaultLayer, |
| 97 | + SessionShare.defaultLayer, |
| 98 | +) |
| 99 | + |
| 100 | +export const AppRuntime = ManagedRuntime.make(AppLayer, { memoMap }) |
0 commit comments