Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Conversation

@anshss
Copy link
Contributor

@anshss anshss commented Jan 27, 2025

Making SDK workable in both browser and cli environments

@vercel
Copy link

vercel bot commented Jan 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-wallet ❌ Failed (Inspect) Feb 6, 2025 7:12pm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this change would keep the aw-tool-registry from having the tool IPFS CIDs when building the monorepo locally if isNode isn't true. If so, how were you getting the tool IPFS CIDs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line says if the environment is node, user will be able to build and deploy tools using i.e using. the command pnpm deploy:tools

hitting this command makes list of tools and all tool-registry features available in browser app built over this sdk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmk if this question is about something else

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without these changes were you having trouble using the packages within a browser env?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they were needed to make the SDK build-compatible with browsers, this is because CommonJS modules cannot directly run in browsers. They are designed for Node.js like environments, converting the exports will allow to ship a dual package that supports both ESM and CommonJS

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the this.log from this file. These will show up in user applications such as the CLI with no way for the user to silence these

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Spacesai1or Spacesai1or changed the base branch from main to develop February 6, 2025 19:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants