fix(server): restore provider node deps after dev merge
This commit is contained in:
parent
95cf5039be
commit
4a90ffedfb
3 changed files with 12 additions and 8 deletions
|
|
@ -1 +0,0 @@
|
||||||
File to save in: ~/.local/share/opencode/worktree/012780/location-layer-tiers/packages/core/src/effect/
|
|
||||||
|
|
@ -110,8 +110,13 @@ export const providerLayer = providerLayerWithCell(defaultCell)
|
||||||
|
|
||||||
export const node = makeGlobalNode({ service: Service, layer, deps: [] })
|
export const node = makeGlobalNode({ service: Service, layer, deps: [] })
|
||||||
|
|
||||||
export const providerNode = makeGlobalNode({
|
// Raw layer replacements are compiled without dependencies, so cell-scoped
|
||||||
name: "plugin-runtime-provider",
|
// provider replacements must go through this node to keep their deps wired.
|
||||||
layer: providerLayer,
|
export const providerNodeWithCell = (cell: Cell) =>
|
||||||
deps: [node, SessionV2.node, Job.node, LocationServiceMap.node],
|
makeGlobalNode({
|
||||||
})
|
name: "plugin-runtime-provider",
|
||||||
|
layer: providerLayerWithCell(cell),
|
||||||
|
deps: [node, SessionV2.node, Job.node, LocationServiceMap.node],
|
||||||
|
})
|
||||||
|
|
||||||
|
export const providerNode = providerNodeWithCell(defaultCell)
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export function createRoutes(password?: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createEmbeddedRoutes(sdkPlugins?: SdkPlugins.Store) {
|
export function createEmbeddedRoutes(sdkPlugins?: SdkPlugins.Store) {
|
||||||
return makeRoutes(ServerAuth.Config.layer({ username: "opencode", password: Option.none() }), sdkPlugins)
|
return makeRoutes(ServerAuth.Config.configLayer({ username: "opencode", password: Option.none() }), sdkPlugins)
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeRoutes<AuthError, AuthServices>(
|
function makeRoutes<AuthError, AuthServices>(
|
||||||
|
|
@ -63,7 +63,7 @@ function makeRoutes<AuthError, AuthServices>(
|
||||||
[
|
[
|
||||||
[SessionExecution.node, SessionExecutionLocal.node],
|
[SessionExecution.node, SessionExecutionLocal.node],
|
||||||
[PluginRuntime.node, PluginRuntime.layerWithCell(pluginRuntimeCell)],
|
[PluginRuntime.node, PluginRuntime.layerWithCell(pluginRuntimeCell)],
|
||||||
[PluginRuntime.providerNode, PluginRuntime.providerLayerWithCell(pluginRuntimeCell)],
|
[PluginRuntime.providerNode, PluginRuntime.providerNodeWithCell(pluginRuntimeCell)],
|
||||||
...(sdkPlugins ? [[SdkPlugins.node, SdkPlugins.layerWithStore(sdkPlugins)] as const] : []),
|
...(sdkPlugins ? [[SdkPlugins.node, SdkPlugins.layerWithStore(sdkPlugins)] as const] : []),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue