feat: extract @wraith-protocol/sdk-agent companion package (#185) - #193
Conversation
|
@lamborghini21 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Thanks @lamborghini21. Same gate as a few other PRs this wave: Moving Given this PR is specifically about shrinking the root bundle, it is worth eyeballing the regenerated |
Thank you for the insight. Please check once again. |
|
Went conflicted just now because #191 and #192 landed ahead of it. Nothing wrong with your work, it was mergeable minutes ago. I checked the api surface diff before the conflict appeared and the agent symbols do leave the root, so the extraction is doing what it should rather than just re-exporting. |
okay |
|
I attempted to rebase this for you and backed out, because the conflict is a real port rather than a text merge. Nothing was pushed, your branch is untouched.
Resolving it means deciding how the extracted package gets at the core's telemetry: whether
Happy to pair on the telemetry boundary question if it is easier to talk through than to write out. |
okay, checking out |
|
Thanks @lamborghini21, you answered the boundary question: One thing to fix before this lands, though, because the current shape quietly breaks telemetry.
The consequence is that there are now two independent tracer registries. A user who does this: import { setTracer } from '@wraith-protocol/sdk';
setTracer(otelAdapter);will get spans from scanning and RPC, and no spans from agent tool calls, because your local Since the package already depends on the core, the fix is to delete the local declarations and import instead: import { withSpan, type Tracer } from '@wraith-protocol/sdk';On the remaining conflicts: Worth eyeballing the regenerated |
Noted. I will work on it |
Remove extracted agent exports from the root entry point and refresh the root API baseline.
5c0e5ae to
910b816
Compare
|
Merged @lamborghini21. Both points from the last review are fixed: The regenerated Thanks for working through three rounds on this one, including a rebase over a moving target after #191 landed telemetry into the file you were extracting. |
Extracts agent functionality (Wraith, WraithAgent, Chain, Claude tools) into a separate
@wraith-protocol/sdk-agentpackage to reduce root bundle size and improve API surface. Root package now provides deprecated compatibility shims for backward compatibility.packages/sdk-agent/with client.ts, tools.ts, types.tspackages/sdk-agent/test/@wraith-protocol/sdk-agentpackagesrc/agent/with deprecation warnings@wraith-protocol/sdk-agentas externalCloses #185