Skip to content

docs: simplify ESM init file in SDK instrumentation prompt#211

Merged
sohankshirsagar merged 1 commit intomainfrom
sohan/update-esm-prompt
Mar 25, 2026
Merged

docs: simplify ESM init file in SDK instrumentation prompt#211
sohankshirsagar merged 1 commit intomainfrom
sohan/update-esm-prompt

Conversation

@sohankshirsagar
Copy link
Contributor

Summary

Updates the agent's SDK instrumentation prompt to reflect that @use-tusk/drift-node-sdk now auto-registers ESM loader hooks inside TuskDrift.initialize(). Users no longer need to manually call register() / pathToFileURL() in their init file — the ESM init file is now identical to the CJS one.

Corresponding Node SDK change: Use-Tusk/drift-node-sdk#146

Changes

  • Removed the separate ESM init file code block from phase_instrument_sdk.md that included manual register("@use-tusk/drift-node-sdk/hook.mjs", ...) and pathToFileURL imports
  • Consolidated CJS and ESM init file examples into a single block, since they are now identical
  • Added a note that the SDK automatically registers ESM loader hooks when needed
  • Entry point setup (Step 3) is unchanged — --import is still required for ESM, and CJS still uses first-import

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@sohankshirsagar sohankshirsagar merged commit 5dff91d into main Mar 25, 2026
14 checks passed
@sohankshirsagar sohankshirsagar deleted the sohan/update-esm-prompt branch March 25, 2026 18:54
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