fix: serve v2 server routes in the production listener

The merge rebuilt createListenerRoutes without serverRoutes, so
kilo serve 404'd every /api v2 endpoint (Integration, Credential,
ProjectCopy) that the regenerated SDK and the v1.17.5 TUI now call.
Include serverRoutes in the listener and expose EventV2 via AppRuntime.
This commit is contained in:
marius-kilocode
2026-07-21 11:01:25 +02:00
parent 2ff1ad8253
commit c3c704e67f
2 changed files with 2 additions and 1 deletions
@@ -123,6 +123,7 @@ const FeatureLayer = Layer.mergeAll( // kilocode_change
Project.defaultLayer,
// kilocode_change start
ProjectV2.defaultLayer,
EventV2.defaultLayer,
ProjectCopy.layer.pipe(
Layer.provide(Database.defaultLayer),
Layer.provide(FSUtil.defaultLayer),
@@ -316,7 +316,7 @@ export function createRoutes(
// kilocode_change start - keep listener routes local while application services come from AppRuntime
export function createListenerRoutes(corsOptions?: CorsOptions) {
return Layer.mergeAll(rootApiRoutes, eventApiRoutes, ptyConnectApiRoutes, instanceRoutes, docRoute, uiRoute).pipe(
return Layer.mergeAll(rootApiRoutes, eventApiRoutes, ptyConnectApiRoutes, instanceRoutes, serverRoutes, docRoute, uiRoute).pipe(
provideKiloListenerRoutes(corsOptions),
)
}