MCPcopy
hub / github.com/anomalyco/opencode / instructionLayer

Function instructionLayer

packages/core/test/instruction-context.test.ts:20–29  ·  view source on GitHub ↗
(input: {
  config: string
  locationServiceLayer: Layer.Layer<Location.Service>
  filesystemLayer?: Layer.Layer<FSUtil.Service>
})

Source from the content-addressed store, hash-verified

18const it = testEffect(Layer.empty)
19
20const instructionLayer = (input: {
21 config: string
22 locationServiceLayer: Layer.Layer<Location.Service>
23 filesystemLayer?: Layer.Layer<FSUtil.Service>
24}) =>
25 AppNodeBuilder.build(LayerNode.group([SystemContextRegistry.node, InstructionContext.node]), [
26 [Global.node, Global.layerWith({ config: input.config })],
27 [Location.node, input.locationServiceLayer],
28 ...(input.filesystemLayer ? [[FSUtil.node, input.filesystemLayer] as const] : []),
29 ])
30
31describe("InstructionContext", () => {
32 it.live("loads global and upward project AGENTS.md files as one aggregate context", () =>

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected