@recallai/desktop-sdk 0.0.0-nightly.20260128T201337-4cc5a0e3e419f7da80edac872cfea1f1358c022e → 0.0.0-nightly.20260129T000010-60f79b1365fc291318c6e63ae17a19c26e33df7c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +21 -2
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -78,6 +78,23 @@ let unexpectedShutdown = false;
78
78
  let exiting = false;
79
79
  let logBuffer = [];
80
80
  let logIndex = 0;
81
+ let packageVersion;
82
+ function getPackageVersion() {
83
+ if (packageVersion !== undefined) {
84
+ return packageVersion;
85
+ }
86
+ try {
87
+ const packagePath = path.join(__dirname, "package.json");
88
+ const packageJson = JSON.parse(fs.readFileSync(packagePath, "utf8"));
89
+ if (typeof packageJson.version === "string") {
90
+ packageVersion = packageJson.version;
91
+ }
92
+ }
93
+ catch {
94
+ packageVersion = undefined;
95
+ }
96
+ return packageVersion;
97
+ }
81
98
  process.on("exit", () => {
82
99
  exiting = true;
83
100
  if (proc && !proc.killed) {
@@ -372,8 +389,10 @@ async function init(options) {
372
389
  if (options.restartOnError === undefined) {
373
390
  options.restartOnError = true;
374
391
  }
375
- lastOptions = options;
376
- await doInit(options);
392
+ const version = getPackageVersion();
393
+ const initConfig = version ? { ...options, sdkVersion: version } : { ...options };
394
+ lastOptions = initConfig;
395
+ await doInit(initConfig);
377
396
  return null;
378
397
  }
379
398
  async function shutdown() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recallai/desktop-sdk",
3
- "version": "0.0.0-nightly.20260128T201337-4cc5a0e3e419f7da80edac872cfea1f1358c022e",
3
+ "version": "0.0.0-nightly.20260129T000010-60f79b1365fc291318c6e63ae17a19c26e33df7c",
4
4
  "description": "Recall Desktop SDK",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -20,5 +20,5 @@
20
20
  "@types/node": "^24.2.0",
21
21
  "typescript": "^5.3.3"
22
22
  },
23
- "commit_sha": "4cc5a0e3e419f7da80edac872cfea1f1358c022e"
23
+ "commit_sha": "60f79b1365fc291318c6e63ae17a19c26e33df7c"
24
24
  }