You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/opencode/specs/effect-migration.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ Use `InstanceState` (from `src/effect/instance-state.ts`) for services that need
8
8
9
9
Use `makeRuntime` (from `src/effect/run-service.ts`) to create a per-service `ManagedRuntime` that lazily initializes and shares layers via a global `memoMap`. Returns `{ runPromise, runFork, runCallback }`.
10
10
11
-
- Global services (no per-directory state): Account, Auth, Installation, Truncate
12
-
- Instance-scoped (per-directory state via InstanceState): File, FileTime, FileWatcher, Format, Permission, Question, Skill, Snapshot, Vcs, ProviderAuth
11
+
- Global services (no per-directory state): Account, Auth, AppFileSystem, Installation, Truncate, Worktree
12
+
- Instance-scoped (per-directory state via InstanceState): Agent, Bus, Command, Config, File, FileTime, FileWatcher, Format, LSP, MCP, Permission, Plugin, ProviderAuth, Pty, Question, SessionStatus, Skill, Snapshot, ToolRegistry, Vcs
13
13
14
14
Rule of thumb: if two open directories should not share one copy of the service, it needs `InstanceState`.
15
15
@@ -181,36 +181,39 @@ That is fine for leaf files like `schema.ts`. Keep the service surface in the ow
181
181
Fully migrated (single namespace, InstanceState where needed, flattened facade):
182
182
183
183
-[x]`Account` — `account/index.ts`
184
+
-[x]`Agent` — `agent/agent.ts`
185
+
-[x]`AppFileSystem` — `filesystem/index.ts`
184
186
-[x]`Auth` — `auth/index.ts` (uses `zod()` helper for Schema→Zod interop)
187
+
-[x]`Bus` — `bus/index.ts`
188
+
-[x]`Command` — `command/index.ts`
189
+
-[x]`Config` — `config/config.ts`
190
+
-[x]`Discovery` — `skill/discovery.ts` (dependency-only layer, no standalone runtime)
0 commit comments