What is the purpose of the event-factories.ts in @ag-ui/core?
#1206
SteffanEnnis
started this conversation in
Ideas
Replies: 1 comment
-
|
I think your second option is the cleanest. Keeping those factories buried in core but unused outside tests makes them look like semi-public API surface without actually supporting consumers, and exporting them from runtime code feels like the wrong tradeoff if bundle size matters. |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am in the process of migrating of a bespoke solution for handling events via websocket coming from our agentitc solution.
I have noticed that testing utilities are not exposed via the sdk packages. This makes sense because you don't want to bloat the package size of the run time code.
However this means for those who are working on a migration and need to impelmented unit tests/E2E tests such as myself. We cannot make use of the factories in the typescript sdk here https://github.com/ag-ui-protocol/ag-ui/blob/main/sdks/typescript/packages/core/src/event-factories.ts
I have also looked for instances these factories are being consumed outside of the event-factories.test.ts. I did not find any, I could be wrong here though.
I see three possible solutions
@ag-ui/corepackage and place them in their own build tools package so that consumers can bring them in as a dev dependency@ag-ui/coreso they are bundled with the main core packageBeta Was this translation helpful? Give feedback.
All reactions