Summary
The Braintrust simplification correctly moved spawn trace construction into the pure, backend-neutral acpToTrace(ctx) -> AcpTrace path in @poe-code/acp-telemetry. Braintrust and OTEL are now optional emitters over the same trace value.
External poe-code SDK consumers cannot currently use that intended neutral path from the published package:
@poe-code/acp-telemetry is marked private: true and is not published.
poe-code does not re-export acpToTrace, AcpTrace, or a ready-made trace consumer middleware.
SpawnOptions.middlewares is public, but its AcpMiddleware type comes from the non-published @poe-code/agent-spawn package.
Use case
Persist every completed Poe Code ACP trace directly in a consumer-owned database without routing through Braintrust or re-emitting it as OTEL.
The desired consumer code is conceptually:
const middleware = async (ctx, next) => {
await next();
await database.insert(acpToTrace(ctx));
};
await spawn("codex", { prompt, middlewares: [middleware] });
This is exactly the architecture enabled by the Braintrust refactor, but the converter/type API is not reachable from a normal npm installation.
Expected capability
Expose a supported backend-neutral trace consumer API from published poe-code. Any of these would solve it:
- Re-export
acpToTrace, AcpTrace, AcpTraceSpan, and the required middleware/context types from poe-code.
- Publish
@poe-code/acp-telemetry and the necessary public middleware types.
- Add a
traceSink/onTrace spawn option that receives each completed AcpTrace value.
A traceSink option would be the simplest consumer API and would avoid requiring users to reproduce event-stream-finalization middleware behavior.
Acceptance criteria
- A normal npm
poe-code SDK consumer can receive each completed backend-neutral AcpTrace value.
- No Braintrust or OpenTelemetry dependency/configuration is required.
- Streaming and non-streaming ACP spawn paths emit exactly once after trace data is complete.
- Aborted/failed runs have documented behavior.
- SDK types are exported from published packages without unresolved private workspace-package imports.
Summary
The Braintrust simplification correctly moved spawn trace construction into the pure, backend-neutral
acpToTrace(ctx) -> AcpTracepath in@poe-code/acp-telemetry. Braintrust and OTEL are now optional emitters over the same trace value.External
poe-codeSDK consumers cannot currently use that intended neutral path from the published package:@poe-code/acp-telemetryis markedprivate: trueand is not published.poe-codedoes not re-exportacpToTrace,AcpTrace, or a ready-made trace consumer middleware.SpawnOptions.middlewaresis public, but itsAcpMiddlewaretype comes from the non-published@poe-code/agent-spawnpackage.Use case
Persist every completed Poe Code ACP trace directly in a consumer-owned database without routing through Braintrust or re-emitting it as OTEL.
The desired consumer code is conceptually:
This is exactly the architecture enabled by the Braintrust refactor, but the converter/type API is not reachable from a normal npm installation.
Expected capability
Expose a supported backend-neutral trace consumer API from published
poe-code. Any of these would solve it:acpToTrace,AcpTrace,AcpTraceSpan, and the required middleware/context types frompoe-code.@poe-code/acp-telemetryand the necessary public middleware types.traceSink/onTracespawn option that receives each completedAcpTracevalue.A
traceSinkoption would be the simplest consumer API and would avoid requiring users to reproduce event-stream-finalization middleware behavior.Acceptance criteria
poe-codeSDK consumer can receive each completed backend-neutralAcpTracevalue.