Replies: 1 comment 6 replies
-
|
Hey @stefanofa, I agree with your assessment, peerDependencies is definitely the safer and more correct choice imo (unless i'm missing some important detail about this monorepo). It's also currently a bit cumbersome to get the agents sdk working with different package versions other than the hardcoded ones (e.g ai sdk 6, mcp server 1.24, zod 4). @threepointone @whoiskatrin are we missing something here or would you be fine with us creating a PR? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
while looking at the source code of the monorepo, I noticed something interesting, eg. some dependencies aren’t listed in the packages itself but are marked as external in the tsup config.
for example, the
agents-sdkpackage doesn’t declareai,@ai-sdk/react, orreactas dependencies, even though they’re used in the code. instead, the built ES modules keep them as external imports instead of bundling them. that makes sense, but I’m wondering if it’s the best approach.I assume the idea is to let users install only the dependencies they actually need, for example, skipping react if they don’t use it. but doesn’t this make it harder to control dependency versions and compatibility? wouldn’t it be better to list them as
peerDependenciesinstead? and if that’s the case, it would probably be safe to just remove them fromexternalin tsup config, since by default tsup automatically excludes packages specified in thedependenciesandpeerDependencies.also, in the
hono-agentspackage,agents-sdkandhonoare both listed aspeerDependenciesanddevDependencies. wouldn’t it make more sense to pick just one? or maybe even declare them as regulardependencies?Beta Was this translation helpful? Give feedback.
All reactions