refactor(core): rename guidance modules (#37207)

This commit is contained in:
Kit Langton 2026-07-16 10:05:09 -04:00 committed by GitHub
commit a5b28c2af2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 103 additions and 97 deletions

View file

@ -1,4 +1,4 @@
export * as McpGuidance from "./guidance"
export * as McpInstructions from "./instructions"
import { makeLocationNode } from "../effect/app-node"
import { Context, Effect, Layer, Schema } from "effect"
@ -54,7 +54,7 @@ export interface Interface {
readonly load: (agent: AgentV2.Selection) => Effect.Effect<Instructions.Instructions>
}
export class Service extends Context.Service<Service, Interface>()("@opencode/v2/McpGuidance") {}
export class Service extends Context.Service<Service, Interface>()("@opencode/v2/McpInstructions") {}
export const layer = Layer.effect(
Service,
@ -62,7 +62,7 @@ export const layer = Layer.effect(
const mcp = yield* MCP.Service
return Service.of({
load: Effect.fn("McpGuidance.load")(function* (selection) {
load: Effect.fn("McpInstructions.load")(function* (selection) {
const agent = selection.info
if (!agent) return Instructions.empty
const source = (value: ReadonlyArray<Summary> | Instructions.Removed) =>