From da42ae6c955b5439cafd45c38860f7997bf2a643 Mon Sep 17 00:00:00 2001 From: Nicholai Date: Tue, 3 Mar 2026 06:02:02 -0700 Subject: [PATCH] 2026-03-03T13-02-02_auto_memory/2026-03-03-signet-daemon-1password-sdk-wasm --- ...3-signet-daemon-1password-sdk-wasm-crash-fix.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 memory/2026-03-03-signet-daemon-1password-sdk-wasm-crash-fix.md diff --git a/memory/2026-03-03-signet-daemon-1password-sdk-wasm-crash-fix.md b/memory/2026-03-03-signet-daemon-1password-sdk-wasm-crash-fix.md new file mode 100644 index 000000000..10eceda2e --- /dev/null +++ b/memory/2026-03-03-signet-daemon-1password-sdk-wasm-crash-fix.md @@ -0,0 +1,14 @@ +# 2026-03-03 Session Notes + +## Signet Daemon @1password/sdk WASM Crash Fix + +Nicholai initiated work on fixing a critical daemon startup crash caused by the @1password/sdk package. The issue stems from the SDK bundling a native WASM binary (core_bg.wasm) whose absolute path from the CI runner (/home/runner/work/signetai/...) gets baked into dist/daemon.js at build time. When users install the daemon, this hardcoded path no longer exists, triggering ENOENT crashes on every startup. + +The solution involves lazy-loading the 1Password module so the WASM binary is only loaded when 1Password features are actually used, rather than on daemon startup. This avoids the crash for users without 1Password integration. + +Three files require modification: +1. packages/daemon/src/onepassword.ts: Remove top-level SDK import and move it to dynamic import inside defaultOnePasswordClientFactory +2. packages/daemon/src/daemon.ts: Keep existing imports unchanged (they reference local code, not the SDK) +3. packages/daemon/package.json: Add --external @1password/sdk flag to bun build commands to prevent WASM bundling + +The session began with reading the source files to implement these changes. Verification will involve daemon startup, health check, testing 1Password features with OP_SERVICE_ACCOUNT_TOKEN, and running full test suite. \ No newline at end of file