refactor(acp): keep protocol implementation exports private#10165

merged2
main
cleanup-packages/acp-internals
openedSep 5, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago
1 unresolved thread · Jump to file
Selected thread: packages/effect-acp/src/agent.ts:257 — <!-- MURMUR_IGNORE --> `src/agent.ts:257` `agent.ts` owns construction of the `AcpAgent` service, so `make` should stay part of the module's public shape alongside `layer`/`layerStdio` (the sibling `client.ts` still exports its `make`). Consumers that need to build an agent inside an existing scope rather than via a layer lose that entry point here. Consider keeping the export: ```suggestion export const make = Effect.fn("effect-acp/AcpAgent.make")(function* ( ``` No longer relevant as of 913f03875dda49579b78d72ec85471b5c3ad2b7f <!-- macroscope-meta: {"kind":"code_review"} -->
0 / 4 viewed4 files changedLine totals unavailable

packages/effect-acp/src/agent.ts · Earlier revision 9fecf16d · right 257

Original diff
@@ -254,7 +254,7 @@ interface AcpCoreAgentRequestHandlers {
 
 const decodeCancelNotification = Schema.decodeUnknownEffect(AcpSchema.CancelNotification);
 
-export const make = Effect.fn("effect-acp/AcpAgent.make")(function* (
+const make = Effect.fn("effect-acp/AcpAgent.make")(function* (
M
macroscopeappBotSep 5, 2026

src/agent.ts:257

agent.ts owns construction of the AcpAgent service, so make should stay part of the module's public shape alongside layer/layerStdio (the sibling client.ts still exports its make). Consumers that need to build an agent inside an existing scope rather than via a layer lose that entry point here. Consider keeping the export:

suggestion
1export const make = Effect.fn("effect-acp/AcpAgent.make")(function* (

No longer relevant as of 913f03875dda49579b78d72ec85471b5c3ad2b7f

J
Julius MarmingeSep 5, 2026

Restored the public agent constructor in 913f038. The adjacent @public comment explains that construction is part of the canonical Effect module API. The expanded Knip check passes with the constructor retained.