Files
sim/packages
Waleed Latif d64e212eb7 refactor(security): consolidate crypto primitives into @sim/security
Move general-purpose crypto primitives out of apps/sim into the
@sim/security package so both apps/sim and apps/realtime can share them.

@sim/security exports (all pure, dependency-free):
  ./compare    safeCompare (constant-time HMAC-wrapped equality)
  ./encryption encrypt/decrypt (AES-256-GCM, iv:cipher:tag format)
  ./hash       sha256Hex
  ./tokens     generateSecureToken (base64url)

Migrate apps/sim call sites to use these + @sim/utils helpers:
  crypto.randomUUID()            -> generateId() from @sim/utils/id
  createHash('sha256').digest    -> sha256Hex
  timingSafeEqual on hashed hex  -> safeCompare
  new Promise(setTimeout)        -> sleep from @sim/utils/helpers

No behavior change: encryption format, digest output, and token
length are preserved exactly.
2026-04-22 21:53:39 -07:00
..
2026-03-13 21:02:08 -07:00
2026-04-22 20:45:59 -07:00

Packages

Internal

Package Description
@sim/tsconfig Shared TypeScript configs (base, nextjs, library, library-build)
@sim/db Database schema and Drizzle ORM utilities
@sim/logger Structured logging with colored output
@sim/testing Test factories, builders, and assertions

Published

Package npm Description
cli simstudio Run Sim locally via Docker
ts-sdk simstudio-ts-sdk TypeScript SDK for workflow execution
python-sdk simstudio-sdk Python SDK for workflow execution