File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,16 +15,11 @@ import { Layer } from "effect";
1515
1616import { WorkOSAuth } from "../auth/workos" ;
1717import { AutumnService } from "../services/autumn" ;
18- import { PostHogFeatureFlags } from "../services/feature-flags" ;
1918
2019/**
2120 * Services that are independent of how the DB or tracer is provisioned —
2221 * both the stateless HTTP path (per-request DB via Hyperdrive) and the MCP
2322 * session DO (long-lived DB + isolate-local tracer SDK) merge this with
2423 * their own `DbLive` + `UserStoreLive` + telemetry layer.
2524 */
26- export const CoreSharedServices = Layer . mergeAll (
27- WorkOSAuth . Default ,
28- AutumnService . Default ,
29- PostHogFeatureFlags ,
30- ) ;
25+ export const CoreSharedServices = Layer . mergeAll ( WorkOSAuth . Default , AutumnService . Default ) ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { UserStoreService } from "./auth/context";
3131import { resolveOrganization } from "./auth/resolve-organization" ;
3232import { DbService , combinedSchema , resolveConnectionString } from "./services/db" ;
3333import { makeExecutionStack } from "./services/execution-stack" ;
34+ import { PostHogFeatureFlags } from "./services/feature-flags" ;
3435import { makeMcpWorkerTransport , type McpWorkerTransport } from "./services/mcp-worker-transport" ;
3536import { DoTelemetryLive } from "./services/telemetry" ;
3637import { captureCause } from "./observability" ;
@@ -230,7 +231,8 @@ const makeResolveOrganizationServices = (dbHandle: DbHandle) => {
230231// child span from the outer `McpSessionDO.init` / `McpSessionDO.handleRequest`
231232// trace. Tracer comes from the outermost `Effect.provide(DoTelemetryLive)`
232233// at the DO method boundary.
233- const makeSessionServices = ( dbHandle : DbHandle ) => makeResolveOrganizationServices ( dbHandle ) ;
234+ const makeSessionServices = ( dbHandle : DbHandle ) =>
235+ Layer . mergeAll ( makeResolveOrganizationServices ( dbHandle ) , PostHogFeatureFlags ) ;
234236
235237const resolveSessionMeta = Effect . fn ( "McpSessionDO.resolveSessionMeta" ) ( function * (
236238 organizationId : string ,
You can’t perform that action at this time.
0 commit comments