MCPcopy Create free account
hub / github.com/anomalyco/opencode / readLayer

Function readLayer

packages/core/test/tool-read.test.ts:132–143  ·  view source on GitHub ↗
(imageLayer: Layer.Layer<Image.Service>)

Source from the content-addressed store, hash-verified

130 Image.Service.of({ normalize: () => Effect.fail(new Image.ResizerUnavailableError()) }),
131)
132const readLayer = (imageLayer: Layer.Layer<Image.Service>) =>
133 AppNodeBuilder.build(LayerNode.group([ToolRegistry.node, ToolRegistry.toolsNode, ReadTool.node]), [
134 [ReadToolFileSystem.node, reader],
135 [PermissionV2.node, permission],
136 [Config.node, config],
137 [Image.node, imageLayer],
138 [LocationMutation.node, mutation],
139 [FSUtil.node, testFileSystem],
140 [Location.node, locationLayer],
141 [Global.node, Global.layerWith({ data: Global.Path.data })],
142 [ToolOutputStore.node, ToolOutputStore.nodeWithoutConfig],
143 ])
144const it = testEffect(readLayer(imageLayer))
145const itWithoutResizer = testEffect(readLayer(unavailableImage))
146const sessionID = SessionV2.ID.make("ses_read_tool_test")

Callers 1

tool-read.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected