@rikaidev/yomi 0.4.1 → 0.4.2

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.
@@ -149,10 +149,10 @@ class VolatileCacheStore {
149
149
  while (this.dirty) {
150
150
  this.dirty = false;
151
151
  try {
152
- const dir = this.filePath.substring(0, this.filePath.lastIndexOf('/'));
153
- if (dir) {
154
- await fs.mkdir(dir, { recursive: true, mode: 0o700 });
155
- }
152
+ await fs.mkdir(dirname(this.filePath), {
153
+ recursive: true,
154
+ mode: 0o700,
155
+ });
156
156
  const tmp = `${this.filePath}.tmp`;
157
157
  // Group shared keys live here — they decrypt group messages. The
158
158
  // default 0644 made them readable by every other account on the
@@ -268,8 +268,11 @@ export class CredentialStore {
268
268
  }
269
269
  try {
270
270
  const fs = await import('node:fs/promises');
271
- const dir = this.filePath.substring(0, this.filePath.lastIndexOf('/'));
272
- await fs.mkdir(dir, { recursive: true, mode: 0o700 });
271
+ // `dirname`, not a slice on '/': a Windows path has no forward slash, so
272
+ // the slice yielded '' and `mkdir('')` threw ENOENT — swallowed by the
273
+ // catch below, so every credential write on Windows silently failed and
274
+ // no session (auth token, mid, E2EE keypair) was ever persisted.
275
+ await fs.mkdir(dirname(this.filePath), { recursive: true, mode: 0o700 });
273
276
  await fs.writeFile(this.filePath, blob, { mode: 0o600 });
274
277
  // `mode` is ignored when the file already exists, so repair older installs.
275
278
  await fs.chmod(this.filePath, 0o600).catch(() => { });
package/dist/version.js CHANGED
@@ -4,4 +4,4 @@
4
4
  * virtual filesystem). MUST stay equal to the "version" field in
5
5
  * package.json — the test in version.test.ts enforces that.
6
6
  */
7
- export const YOMI_VERSION = '0.4.1';
7
+ export const YOMI_VERSION = '0.4.2';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=22.13.0 <23.0.0 || >=23.4.0"
5
5
  },
6
- "version": "0.4.1",
6
+ "version": "0.4.2",
7
7
  "description": "Open-source personal LINE MCP server for AI agents. Read, reply, send images, and search LINE conversations locally with Letter-Sealing E2EE.",
8
8
  "type": "module",
9
9
  "license": "MIT",