@@ -29,6 +29,10 @@ import { canvasCoreModule } from "@posthog/core/canvas/canvas.module";
2929import { taskThreadCoreModule } from "@posthog/core/canvas/taskThread.module" ;
3030import type { CloudTaskService } from "@posthog/core/cloud-task/cloud-task" ;
3131import { cloudTaskModule } from "@posthog/core/cloud-task/cloud-task.module" ;
32+ import {
33+ CLOUD_TASK_CLIENT ,
34+ type CloudTaskClient ,
35+ } from "@posthog/core/cloud-task/cloudTaskClient" ;
3236import {
3337 CLOUD_TASK_AUTH ,
3438 CLOUD_TASK_SERVICE ,
@@ -86,10 +90,14 @@ import {
8690 type GithubConnectClient as OnboardingGithubConnectContract ,
8791} from "@posthog/core/onboarding/identifiers" ;
8892import { onboardingModule } from "@posthog/core/onboarding/onboarding.module" ;
93+ import { PI_RUNNER } from "@posthog/core/pi-runtime/identifiers" ;
8994import { piRuntimeModule } from "@posthog/core/pi-runtime/pi-runtime.module" ;
95+ import type { PiRunner } from "@posthog/core/pi-runtime/piRunner" ;
9096import {
91- PI_SESSION_CLIENT ,
92- type PiSessionClient ,
97+ LOCAL_PI_SESSION_FACTORY ,
98+ PI_SESSION_PROVIDER ,
99+ type PiSessionFactory ,
100+ type PiSessionProvider ,
93101} from "@posthog/core/pi-runtime/piSessionController" ;
94102import {
95103 type BundleLocalSkill ,
@@ -161,7 +169,9 @@ import {
161169 HOST_TRPC_CLIENT ,
162170 type HostTrpcClient ,
163171} from "@posthog/host-router/client" ;
164- import { TrpcPiSessionClient } from "@posthog/host-router/pi-session-client" ;
172+ import { TrpcCloudTaskClient } from "@posthog/host-router/cloud-task-client" ;
173+ import { TrpcPiRunner } from "@posthog/host-router/pi-runner" ;
174+ import { TrpcPiSessionFactory } from "@posthog/host-router/pi-session-factory" ;
165175import {
166176 ANALYTICS_SERVICE ,
167177 type IAnalytics ,
@@ -314,7 +324,10 @@ import { hostTrpcClient } from "./web-trpc";
314324
315325interface WebBindings {
316326 [ HOST_TRPC_CLIENT ] : HostTrpcClient ;
317- [ PI_SESSION_CLIENT ] : PiSessionClient ;
327+ [ PI_SESSION_PROVIDER ] : PiSessionProvider ;
328+ [ LOCAL_PI_SESSION_FACTORY ] : PiSessionFactory ;
329+ [ CLOUD_TASK_CLIENT ] : CloudTaskClient ;
330+ [ PI_RUNNER ] : PiRunner ;
318331 [ ROOT_LOGGER ] : RootLogger ;
319332 [ HOST_LOGGER ] : HostLogger ;
320333 [ FEATURE_FLAGS ] : FeatureFlags ;
@@ -395,7 +408,9 @@ export const container = new TypedContainer<WebBindings>({
395408// Keystone: the same typed host client the renderer binds — served in-process
396409// here (web-trpc.ts) instead of over Electron IPC.
397410container . bind ( HOST_TRPC_CLIENT ) . toConstantValue ( hostTrpcClient ) ;
398- container . bind ( PI_SESSION_CLIENT ) . to ( TrpcPiSessionClient ) ;
411+ container . bind ( LOCAL_PI_SESSION_FACTORY ) . to ( TrpcPiSessionFactory ) ;
412+ container . bind ( CLOUD_TASK_CLIENT ) . to ( TrpcCloudTaskClient ) ;
413+ container . bind ( PI_RUNNER ) . to ( TrpcPiRunner ) ;
399414container . load ( piRuntimeModule ) ;
400415
401416// Logger: web uses console; electron uses electron-log. Same RootLogger shape.
0 commit comments