@runeya/runeya 2.0.126 → 2.0.127

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.
@@ -27,10 +27,10 @@ import {
27
27
  reviewWindow,
28
28
  runCompanionNow,
29
29
  takeRelaunchSlot
30
- } from "./chunk-SG2ACPOE.js";
30
+ } from "./chunk-UKLNK5YA.js";
31
31
  import "./chunk-MD3VW4HQ.js";
32
- import "./chunk-WLZQDWJT.js";
33
- import "./chunk-HK5QNU6P.js";
32
+ import "./chunk-WQWRTPPJ.js";
33
+ import "./chunk-BDQOBEZ3.js";
34
34
  import "./chunk-TTPL2M74.js";
35
35
  import "./chunk-ZFELQG4B.js";
36
36
  export {
@@ -63,4 +63,4 @@ export {
63
63
  runCompanionNow,
64
64
  takeRelaunchSlot
65
65
  };
66
- //# sourceMappingURL=companion-5DPH3HIO.js.map
66
+ //# sourceMappingURL=companion-YB3SDDTU.js.map
package/index.js CHANGED
@@ -135,7 +135,7 @@ if (subCommand === "install-desktop" || subCommand === "uninstall-desktop") {
135
135
  }
136
136
  }
137
137
  if (subCommand === "instances") {
138
- const { listInstances, killInstance, restartInstance } = await import("./src-XCI5NILM.js");
138
+ const { listInstances, killInstance, restartInstance } = await import("./src-J3RBNMRJ.js");
139
139
  const { runInstancesCommand } = await import("./instances-command-KZ5UGXOR.js");
140
140
  process.exit(await runInstancesCommand(args.slice(1), {
141
141
  listInstances,
@@ -299,7 +299,7 @@ async function main() {
299
299
  ensureNodeBinOnPath();
300
300
  await ensureUserBinsOnPath();
301
301
  if (!isPullEnv) stampConsole();
302
- const { createLocalServer, pullEnv, PullEnvError, registerInstance, registerCliLocation } = await import("./src-XCI5NILM.js");
302
+ const { createLocalServer, pullEnv, PullEnvError, registerInstance, registerCliLocation } = await import("./src-J3RBNMRJ.js");
303
303
  registerCliLocation({ execPath: process.execPath, cliEntry: fileURLToPath(import.meta.url) });
304
304
  if (isPullEnv) {
305
305
  if (!serviceArg) {
@@ -408,7 +408,7 @@ async function main() {
408
408
  networkInfo,
409
409
  setLanMode,
410
410
  resolveTrayIcon
411
- } = await import("./src-XCI5NILM.js");
411
+ } = await import("./src-J3RBNMRJ.js");
412
412
  tray = await startInstanceTray({
413
413
  info: { cwd: process.cwd(), port, version, url: appUrl },
414
414
  assetsDir: join(__dirname, "assets"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeya/runeya",
3
- "version": "2.0.126",
3
+ "version": "2.0.127",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "runeya": "./index.js"
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  settingsManager
3
- } from "./chunk-K7A3Q62R.js";
4
- import "./chunk-HK5QNU6P.js";
3
+ } from "./chunk-QPII36FL.js";
4
+ import "./chunk-BDQOBEZ3.js";
5
5
  import "./chunk-TTPL2M74.js";
6
6
  import "./chunk-ZFELQG4B.js";
7
7
  export {
8
8
  settingsManager
9
9
  };
10
- //# sourceMappingURL=settings-manager-E3L56VAY.js.map
10
+ //# sourceMappingURL=settings-manager-4EDX7NIB.js.map
@@ -65,7 +65,7 @@ import {
65
65
  soleAccountScope,
66
66
  startCliSession,
67
67
  vaultOfProject
68
- } from "./chunk-2EDVDRKV.js";
68
+ } from "./chunk-LHVTBWM7.js";
69
69
  import {
70
70
  resolveCliInvocation,
71
71
  whichCommand
@@ -88,7 +88,7 @@ import {
88
88
  stopClaudeTranscriptWatcher,
89
89
  stopCodexTranscriptWatcher,
90
90
  verifyJwt
91
- } from "./chunk-SG2ACPOE.js";
91
+ } from "./chunk-UKLNK5YA.js";
92
92
  import "./chunk-MD3VW4HQ.js";
93
93
  import {
94
94
  agentManager,
@@ -130,15 +130,16 @@ import {
130
130
  stableEncryptValue,
131
131
  traefikManager,
132
132
  unregisterInstance
133
- } from "./chunk-WLZQDWJT.js";
133
+ } from "./chunk-WQWRTPPJ.js";
134
134
  import {
135
135
  settingsManager
136
- } from "./chunk-K7A3Q62R.js";
136
+ } from "./chunk-QPII36FL.js";
137
137
  import {
138
138
  atomicWriteSecure,
139
+ renameWithRetry,
139
140
  resolveConversationRunDir,
140
141
  sweepStaleTempFiles
141
- } from "./chunk-HK5QNU6P.js";
142
+ } from "./chunk-BDQOBEZ3.js";
142
143
  import {
143
144
  AGENT_LONG_FETCH_TIMEOUT,
144
145
  AGENT_STOP_FETCH_TIMEOUT,
@@ -547,7 +548,7 @@ import { mkdir } from "fs/promises";
547
548
 
548
549
  // ../server/src/services/master-password.ts
549
550
  import { randomBytes, createCipheriv, createDecipheriv } from "crypto";
550
- import { readFile, writeFile, chmod, stat, rename } from "fs/promises";
551
+ import { readFile, writeFile, chmod, stat } from "fs/promises";
551
552
  import { join as join2 } from "path";
552
553
  import { Entry } from "@napi-rs/keyring";
553
554
  import { hashRaw as argon2HashRaw } from "@node-rs/argon2";
@@ -593,7 +594,7 @@ async function writePepperToFile(dataDir, pepper) {
593
594
  const tmpPath = filePath + ".tmp";
594
595
  await writeFile(tmpPath, pepper.toString("hex"), "utf-8");
595
596
  await chmod(tmpPath, 384);
596
- await rename(tmpPath, filePath);
597
+ await renameWithRetry(tmpPath, filePath);
597
598
  }
598
599
  function tryKeyringGet() {
599
600
  try {
@@ -644,7 +645,7 @@ async function writeEncryptedKey(dataDir, masterPassword, encryptionKey, pepperD
644
645
  const tmpPath = filePath + ".tmp";
645
646
  await writeFile(tmpPath, encoded, "utf-8");
646
647
  await chmod(tmpPath, 384);
647
- await rename(tmpPath, filePath);
648
+ await renameWithRetry(tmpPath, filePath);
648
649
  }
649
650
  async function readEncryptedKey(dataDir, masterPassword, pepperDir = dataDir) {
650
651
  const filePath = join2(dataDir, ENCRYPTED_KEY_FILENAME);
@@ -670,7 +671,7 @@ async function writeVerifyFile(dataDir, encryptionKey) {
670
671
  const filePath = join2(dataDir, VERIFY_FILENAME);
671
672
  const tmpPath = filePath + ".tmp";
672
673
  await writeFile(tmpPath, payload.toString("base64"), "utf-8");
673
- await rename(tmpPath, filePath);
674
+ await renameWithRetry(tmpPath, filePath);
674
675
  }
675
676
  async function verifyEncryptionKey(dataDir, encryptionKey) {
676
677
  const filePath = join2(dataDir, VERIFY_FILENAME);
@@ -3091,7 +3092,7 @@ import { resolve, join as join4 } from "path";
3091
3092
  import { homedir as homedir2 } from "os";
3092
3093
 
3093
3094
  // ../server/src/services/user-config-manager.ts
3094
- import { readFile as readFile2, writeFile as writeFile2, rename as rename2, mkdir as mkdir2, chmod as chmod2 } from "fs/promises";
3095
+ import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2, chmod as chmod2 } from "fs/promises";
3095
3096
  import { join as join3 } from "path";
3096
3097
  import { homedir } from "os";
3097
3098
  import { z as z11 } from "zod";
@@ -3122,7 +3123,7 @@ var UserConfigManager = class {
3122
3123
  const filePath = join3(CONFIG_DIR, CONFIG_FILE);
3123
3124
  const tmpPath = filePath + ".tmp";
3124
3125
  await writeFile2(tmpPath, JSON.stringify(data, null, 2), "utf-8");
3125
- await rename2(tmpPath, filePath);
3126
+ await renameWithRetry(tmpPath, filePath);
3126
3127
  await chmod2(filePath, 384);
3127
3128
  }
3128
3129
  async getConfig() {
@@ -6456,7 +6457,7 @@ var utilityRouter = router({
6456
6457
  // ../server/src/trpc/routers/wiki.ts
6457
6458
  import { z as z22 } from "zod";
6458
6459
  import { TRPCError as TRPCError18 } from "@trpc/server";
6459
- import { readFile as readFile3, readdir as readdir2, stat as stat4, realpath, writeFile as writeFile5, mkdir as mkdir6, rename as rename3, rm as rm2 } from "fs/promises";
6460
+ import { readFile as readFile3, readdir as readdir2, stat as stat4, realpath, writeFile as writeFile5, mkdir as mkdir6, rename, rm as rm2 } from "fs/promises";
6460
6461
  import { resolve as resolvePath, join as join8, relative, sep, dirname as dirname3 } from "path";
6461
6462
  var SCOPE_SCHEMA = z22.union([
6462
6463
  z22.literal("global"),
@@ -6653,7 +6654,7 @@ var wikiRouter = router({
6653
6654
  if (err instanceof TRPCError18) throw err;
6654
6655
  }
6655
6656
  await mkdir6(dirname3(to), { recursive: true });
6656
- await rename3(from, to);
6657
+ await rename(from, to);
6657
6658
  return { fromPath: input.fromPath, toPath: input.toPath, ok: true };
6658
6659
  }),
6659
6660
  ensureRoot: protectedProcedure.input(z22.object({ scope: SCOPE_SCHEMA })).mutation(async ({ input }) => {
@@ -7800,7 +7801,7 @@ var CloudSyncBridge = class {
7800
7801
  var cloudSyncBridge = new CloudSyncBridge();
7801
7802
 
7802
7803
  // ../server/src/services/key-adoption.ts
7803
- import { readdir as readdir3, readFile as readFile5, writeFile as writeFile6, mkdir as mkdir8, copyFile, rename as rename4, stat as stat5 } from "fs/promises";
7804
+ import { readdir as readdir3, readFile as readFile5, writeFile as writeFile6, mkdir as mkdir8, copyFile, rename as rename2, stat as stat5 } from "fs/promises";
7804
7805
  import { join as join11 } from "path";
7805
7806
  import { createCipheriv as createCipheriv2, createDecipheriv as createDecipheriv2, randomBytes as randomBytes2 } from "crypto";
7806
7807
  var ALGORITHM = "aes-256-gcm";
@@ -7913,7 +7914,7 @@ async function adoptOrgKey(orgId, newKey, masterPassword, now) {
7913
7914
  for (const item of pending) {
7914
7915
  const tmp = item.path + ".tmp";
7915
7916
  await writeFile6(tmp, item.content, "utf-8");
7916
- await rename4(tmp, item.path);
7917
+ await rename2(tmp, item.path);
7917
7918
  }
7918
7919
  await installOrgKey(orgId, newKey, masterPassword);
7919
7920
  clearVaultLock(orgId);
@@ -8675,7 +8676,7 @@ async function ensureFilePermissions() {
8675
8676
  }
8676
8677
 
8677
8678
  // ../server/src/services/vault-migration.ts
8678
- import { readdir as readdir5, readFile as readFile6, writeFile as writeFile7, mkdir as mkdir9, copyFile as copyFile2, unlink, rename as rename5, stat as stat8 } from "fs/promises";
8679
+ import { readdir as readdir5, readFile as readFile6, writeFile as writeFile7, mkdir as mkdir9, copyFile as copyFile2, unlink, rename as rename3, stat as stat8 } from "fs/promises";
8679
8680
  import { join as join13 } from "path";
8680
8681
  var KEY_FILES = [".encryption.key.enc", ".runeya-verify"];
8681
8682
  var MACHINE_FILES = [
@@ -8728,7 +8729,7 @@ async function migrateLegacyVault(legacyRoot, machineRootDir, legacyKey, machine
8728
8729
  if (counter.n === 0) continue;
8729
8730
  const tmp = join13(legacyRoot, `${name}.tmp`);
8730
8731
  await writeFile7(tmp, JSON.stringify(converted, null, 2), "utf-8");
8731
- await rename5(tmp, join13(legacyRoot, name));
8732
+ await rename3(tmp, join13(legacyRoot, name));
8732
8733
  rekeyed.push({ file: name, values: counter.n });
8733
8734
  }
8734
8735
  for (const { file, values } of rekeyed) {
@@ -8764,7 +8765,7 @@ async function migrateLegacyVault(legacyRoot, machineRootDir, legacyKey, machine
8764
8765
  }
8765
8766
 
8766
8767
  // ../server/src/services/settings-migration.ts
8767
- import { readFile as readFile7, writeFile as writeFile8, rename as rename6, unlink as unlink2, mkdir as mkdir10, chmod as chmod4, stat as stat9 } from "fs/promises";
8768
+ import { readFile as readFile7, writeFile as writeFile8, rename as rename4, unlink as unlink2, mkdir as mkdir10, chmod as chmod4, stat as stat9 } from "fs/promises";
8768
8769
  import { join as join14 } from "path";
8769
8770
  var SETTINGS_FILE = "settings.json";
8770
8771
  var SETTINGS_PRIVATE_FILE = "settings.private.json";
@@ -8783,7 +8784,7 @@ async function moveInto(root, filename, from) {
8783
8784
  const contents = await readFile7(from, "utf-8");
8784
8785
  const tmp = to + ".tmp";
8785
8786
  await writeFile8(tmp, contents, "utf-8");
8786
- await rename6(tmp, to);
8787
+ await rename4(tmp, to);
8787
8788
  await chmod4(to, 384);
8788
8789
  await unlink2(from);
8789
8790
  }
@@ -8822,7 +8823,7 @@ import { randomUUID as randomUUID8 } from "crypto";
8822
8823
  import {
8823
8824
  readFile as readFile8,
8824
8825
  writeFile as writeFile9,
8825
- rename as rename7,
8826
+ rename as rename5,
8826
8827
  mkdir as mkdir11,
8827
8828
  access as access2,
8828
8829
  readdir as readdir6
@@ -8965,7 +8966,7 @@ async function decryptLegacyFile(filePath, key, sodium) {
8965
8966
  async function atomicWrite(path, data) {
8966
8967
  const tmp = path + ".tmp";
8967
8968
  await writeFile9(tmp, JSON.stringify(data, null, 2), "utf-8");
8968
- await rename7(tmp, path);
8969
+ await rename5(tmp, path);
8969
8970
  }
8970
8971
  async function runLegacyMigration(dataDir) {
8971
8972
  const legacyRoot = env.DATA_DIR;
@@ -8978,10 +8979,10 @@ async function runLegacyMigration(dataDir) {
8978
8979
  console.log("[legacy-migration] Legacy Runeya data detected, starting migration\u2026");
8979
8980
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").substring(0, 19);
8980
8981
  const legacyTmp = `${legacyRoot}-tmp`;
8981
- await rename7(legacyRoot, legacyTmp);
8982
+ await rename5(legacyRoot, legacyTmp);
8982
8983
  await mkdir11(dataDir, { recursive: true });
8983
8984
  const legacyOld = join15(dataDir, `backup-${timestamp}`);
8984
- await rename7(legacyTmp, legacyOld);
8985
+ await rename5(legacyTmp, legacyOld);
8985
8986
  console.log(`[legacy-migration] Legacy data backed up to ${legacyOld}`);
8986
8987
  const keyJson = JSON.parse(await readFile8(join15(legacyOld, "dbs", "encryption-key.json"), "utf-8"));
8987
8988
  const sodium = await getSodium();
@@ -9608,7 +9609,7 @@ async function runOverrideOnlyMigration(dataDir) {
9608
9609
  }
9609
9610
  const migratedDir = overridesDir.replace(/overrides$/, "overrides-migrated");
9610
9611
  try {
9611
- await rename7(overridesDir, migratedDir);
9612
+ await rename5(overridesDir, migratedDir);
9612
9613
  console.log(`[override-migration] Moved overrides/ \u2192 overrides-migrated/`);
9613
9614
  } catch (err) {
9614
9615
  console.warn(`[override-migration] Could not rename overrides dir: ${err.message}`);
@@ -10800,7 +10801,7 @@ async function createLocalServer() {
10800
10801
  ]);
10801
10802
  console.log("[server] Shutdown complete");
10802
10803
  };
10803
- const { initCompanion } = await import("./companion-5DPH3HIO.js");
10804
+ const { initCompanion } = await import("./companion-YB3SDDTU.js");
10804
10805
  initCompanion();
10805
10806
  return { app, server, wss, shutdown };
10806
10807
  }
@@ -10930,7 +10931,7 @@ function onTrayServicesChanged(listener) {
10930
10931
  }
10931
10932
 
10932
10933
  // ../server/src/services/tray-icon.ts
10933
- import { mkdir as mkdir12, writeFile as writeFile10, rename as rename8 } from "fs/promises";
10934
+ import { mkdir as mkdir12, writeFile as writeFile10, rename as rename6 } from "fs/promises";
10934
10935
  import { join as join17 } from "path";
10935
10936
 
10936
10937
  // ../server/src/services/png-to-ico.ts
@@ -11130,7 +11131,7 @@ async function writeTrayIcon(stem, png, platform) {
11130
11131
  async function writeAtomic(path, bytes) {
11131
11132
  const tmp = `${path}.${process.pid}.tmp`;
11132
11133
  await writeFile10(tmp, bytes);
11133
- await rename8(tmp, path);
11134
+ await rename6(tmp, path);
11134
11135
  return path;
11135
11136
  }
11136
11137
  async function resolveOrgLogo(orgId, platform) {
@@ -11247,4 +11248,4 @@ export {
11247
11248
  startProcess,
11248
11249
  stopProcess
11249
11250
  };
11250
- //# sourceMappingURL=src-XCI5NILM.js.map
11251
+ //# sourceMappingURL=src-J3RBNMRJ.js.map