Install 0.6
The SDK is ESM only and needs Node.js 20.20 or later.Update the key and host
Rename theSTATE_API_KEY variable to STATEMACHINES_API_KEY. The SDK reads only the new name.
The default host is now https://api.usestatemachines.com. If your code passes baseUrl: 'https://state-api.usestatemachines.workers.dev', delete that option.
Rename lifecycle calls
Pausing keeps the environment’s data. Deleting removes it. Map each old
stop call to delete only where the task is finished with the data.
Update app entries and credentials
For Salesforce SOAP, put
credentials.token in SessionHeader/sessionId in the envelope. See credentials and actors.
Update snapshots, requests and identity
Update error handling
Every 0.6 error code uses underscores. Check the error subclasses with
instanceof before you read StateMachinesError.code. Never match message text. The SDK error reference lists the classes and codes.
Confirm one complete task
Run the quickstart outside production. Confirm that creation reachesrunning, the app request succeeds, and deletion completes.
Pin the minor version
A0.x minor release can include breaking changes. Pin the minor version in package.json so an install does not move you to 0.7: