Skip to content

feat: extract @wraith-protocol/sdk-agent companion package (#185) - #193

Open
lamborghini21 wants to merge 4 commits into
wraith-protocol:developfrom
lamborghini21:feat/185-extract-sdk-agent-package
Open

feat: extract @wraith-protocol/sdk-agent companion package (#185)#193
lamborghini21 wants to merge 4 commits into
wraith-protocol:developfrom
lamborghini21:feat/185-extract-sdk-agent-package

Conversation

@lamborghini21

Copy link
Copy Markdown
Contributor

Extracts agent functionality (Wraith, WraithAgent, Chain, Claude tools) into a separate @wraith-protocol/sdk-agent package to reduce root bundle size and improve API surface. Root package now provides deprecated compatibility shims for backward compatibility.

  • Create packages/sdk-agent/ with client.ts, tools.ts, types.ts
  • Move agent tests to packages/sdk-agent/test/
  • Update examples to use new @wraith-protocol/sdk-agent package
  • Add compatibility shims in src/agent/ with deprecation warnings
  • Update root package.json exports to include agent entry point
  • Configure tsup to mark @wraith-protocol/sdk-agent as external
  • Add README for sdk-agent package with adapter shape documentation

Closes #185

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

Thanks @lamborghini21. Same gate as a few other PRs this wave: test (20) and test (22) fail on pnpm api:check, not on a test.

Moving src/agent/ out to packages/sdk-agent/ changes what the root entry exports, which is exactly the kind of change the api-extractor baseline exists to catch, so it needs regenerating:

pnpm build
git add etc/
git commit -m "chore: refresh api-extractor baseline"
git push

Given this PR is specifically about shrinking the root bundle, it is worth eyeballing the regenerated etc/sdk.api.md diff rather than just committing it. The agent symbols should be leaving the root surface, and if they are still there the compatibility shim is re-exporting more than intended.

Remove extracted agent exports from the root entry point and refresh the root API baseline.
@lamborghini21

lamborghini21 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @lamborghini21. Same gate as a few other PRs this wave: test (20) and test (22) fail on pnpm api:check, not on a test.

Moving src/agent/ out to packages/sdk-agent/ changes what the root entry exports, which is exactly the kind of change the api-extractor baseline exists to catch, so it needs regenerating:

pnpm build
git add etc/
git commit -m "chore: refresh api-extractor baseline"
git push

Given this PR is specifically about shrinking the root bundle, it is worth eyeballing the regenerated etc/sdk.api.md diff rather than just committing it. The agent symbols should be leaving the root surface, and if they are still there the compatibility shim is re-exporting more than intended.

Thank you for the insight.

Please check once again.

@truthixify

Copy link
Copy Markdown
Contributor

Went conflicted just now because #191 and #192 landed ahead of it. Nothing wrong with your work, it was mergeable minutes ago.

git fetch origin
git rebase origin/develop

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.

@lamborghini21

Copy link
Copy Markdown
Contributor Author

Went conflicted just now because #191 and #192 landed ahead of it. Nothing wrong with your work, it was mergeable minutes ago.

git fetch origin
git rebase origin/develop

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract @wraith-protocol/sdk-agent companion package

2 participants