Skip to content

refactor(agents): replace uuid with crypto.randomUUID - #1392

Merged
toubatbrian merged 3 commits into
livekit:mainfrom
benasher44:chore/replace-uuid-with-node-crypto
May 6, 2026
Merged

refactor(agents): replace uuid with crypto.randomUUID#1392
toubatbrian merged 3 commits into
livekit:mainfrom
benasher44:chore/replace-uuid-with-node-crypto

Conversation

@benasher44

@benasher44 benasher44 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the uuid npm dependency from @livekit/agents.
  • Implement shortuuid using randomUUID() from node:crypto (same RFC 4122 string shape as before and available since node 14.17, so .slice(0, 12) behavior is unchanged).
  • Refresh pnpm-lock.yaml and drop the Renovate minimum-release-age exclude entry for uuid.

Verification

  • pnpm --filter @livekit/agents build
  • pnpm test -- agents/src/utils.test.ts

Made with Cursor

Use Node built-in randomUUID from node:crypto for shortuuid generation
and drop the uuid dependency.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b10792b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 29 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-assemblyai Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant

CLAassistant commented May 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@toubatbrian

Copy link
Copy Markdown
Contributor

@benasher44 could you fix the linting error?

Prettier/import-sort expects node:async_hooks before node:crypto.

Co-authored-by: Cursor <cursoragent@cursor.com>
@benasher44

Copy link
Copy Markdown
Contributor Author

Done!

@toubatbrian
toubatbrian merged commit 657f9ad into livekit:main May 6, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request May 6, 2026
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.

3 participants