@runeya/runeya 2.0.58 → 2.0.59

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.
@@ -0,0 +1,7 @@
1
+ import {
2
+ agentManager
3
+ } from "./chunk-F7HMKPFB.js";
4
+ export {
5
+ agentManager
6
+ };
7
+ //# sourceMappingURL=agent-manager-4EKOSJBR.js.map
@@ -4091,6 +4091,7 @@ export {
4091
4091
  localVaultRoot,
4092
4092
  orgVaultRoot,
4093
4093
  projectVaultRoot,
4094
+ orgIdOfRoot,
4094
4095
  vaultIdOfRoot,
4095
4096
  vaultFor,
4096
4097
  stampOrgCloud,
@@ -4168,4 +4169,4 @@ export {
4168
4169
  traefikManager,
4169
4170
  agentManager
4170
4171
  };
4171
- //# sourceMappingURL=chunk-NLVDO4EC.js.map
4172
+ //# sourceMappingURL=chunk-F7HMKPFB.js.map
package/index.js CHANGED
@@ -270,7 +270,7 @@ function listenWithRetry(server, port, host, wss, maxRetries = 20, delay = 500)
270
270
  });
271
271
  }
272
272
  async function main() {
273
- const { createLocalServer, pullEnv, PullEnvError, registerInstance } = await import("./src-V3J62F6F.js");
273
+ const { createLocalServer, pullEnv, PullEnvError, registerInstance } = await import("./src-7YQHXQ6L.js");
274
274
  if (isPullEnv) {
275
275
  if (!serviceArg) {
276
276
  console.error("Error: --service (-s) is required with --pull-env");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeya/runeya",
3
- "version": "2.0.58",
3
+ "version": "2.0.59",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "runeya": "./index.js"
@@ -70,6 +70,7 @@ import {
70
70
  machineRoot,
71
71
  markVaultLocked,
72
72
  nativeParsers,
73
+ orgIdOfRoot,
73
74
  orgVaultRoot,
74
75
  projectKey,
75
76
  projectVaultRoot,
@@ -95,7 +96,7 @@ import {
95
96
  vaultFor,
96
97
  vaultIdOfRoot,
97
98
  writeEntity
98
- } from "./chunk-NLVDO4EC.js";
99
+ } from "./chunk-F7HMKPFB.js";
99
100
 
100
101
  // ../server/src/create-server.ts
101
102
  import express from "express";
@@ -231,6 +232,7 @@ var ApiKeyStore = class {
231
232
  async load() {
232
233
  if (this.loaded) return;
233
234
  this.loaded = true;
235
+ this.unreadable.clear();
234
236
  const owners = [null, ...await listOrgVaults()];
235
237
  for (const owner of owners) {
236
238
  await this.loadFile(await this.filePath(true, owner), owner);
@@ -3503,6 +3505,30 @@ var ConversationStore = class {
3503
3505
  const json = decryptValue(encrypted, vault);
3504
3506
  return JSON.parse(json);
3505
3507
  }
3508
+ /**
3509
+ * Refuser d'écrire dans le coffre d'une organisation sans nommer sa clé.
3510
+ *
3511
+ * `getEncryptionKey(undefined)` rend la clé machine, et c'est le bon défaut
3512
+ * pour le coffre local. Appliqué à un fichier rangé sous `orgs/<org>/`, il
3513
+ * produit un chiffré que ce coffre n'emploie pas — lisible par personne à la
3514
+ * relecture, et impossible à distinguer d'une corruption.
3515
+ *
3516
+ * Le cas a été observé plusieurs fois sans qu'on parvienne à nommer le
3517
+ * chemin fautif : les garde-fous en place traitent le coffre fermé, le
3518
+ * coffre mal résolu et la copie périmée, aucun ne couvrait « coffre non
3519
+ * précisé ». Ces écritures-là n'ont jamais fonctionné — elles échouaient en
3520
+ * silence, ce qui est pire. On les saute désormais en le disant, avec la
3521
+ * pile d'appels qui manquait pour remonter au chemin fautif.
3522
+ */
3523
+ isVaultNamed(root, vault) {
3524
+ const orgId = orgIdOfRoot(root);
3525
+ if (!orgId || vault) return true;
3526
+ console.error(
3527
+ `[conversation-store] \xC9criture ignor\xE9e dans le coffre de l'organisation ${orgId} (${root}) : aucune cl\xE9 d'organisation nomm\xE9e, le contenu serait chiffr\xE9 par la cl\xE9 machine et illisible \xE0 la relecture.
3528
+ ${new Error("trace").stack}`
3529
+ );
3530
+ return false;
3531
+ }
3506
3532
  toDisk(conv, vault) {
3507
3533
  return {
3508
3534
  id: conv.id,
@@ -3558,6 +3584,7 @@ var ConversationStore = class {
3558
3584
  return;
3559
3585
  }
3560
3586
  this.loaded = true;
3587
+ this.unreadable.clear();
3561
3588
  await ensureProjectsLoaded();
3562
3589
  const vaults = await allVaultRoots();
3563
3590
  const legacyPaths = [this.getLegacyFilePath(), await keyedFilePath(FILENAME5)];
@@ -3633,7 +3660,9 @@ var ConversationStore = class {
3633
3660
  const root = await this.rootFor(conv);
3634
3661
  this.roots.set(conv.id, root);
3635
3662
  const bucket = byRoot.get(root) ?? [];
3636
- bucket.push(this.toDisk(conv, vaultIdOfRoot(root)));
3663
+ const vault = vaultIdOfRoot(root);
3664
+ if (!this.isVaultNamed(root, vault)) continue;
3665
+ bucket.push(this.toDisk(conv, vault));
3637
3666
  byRoot.set(root, bucket);
3638
3667
  }
3639
3668
  for (const [root, items] of this.unreadable) {
@@ -7715,7 +7744,7 @@ function tailTranscript(opts) {
7715
7744
 
7716
7745
  // ../server/src/services/ai-runners/claude-pty-runner.ts
7717
7746
  async function getAgentManager() {
7718
- const { agentManager: agentManager2 } = await import("./agent-manager-EDFP4VXP.js");
7747
+ const { agentManager: agentManager2 } = await import("./agent-manager-4EKOSJBR.js");
7719
7748
  return agentManager2;
7720
7749
  }
7721
7750
  function buildPtyArgs(params, sessionId, opts) {
@@ -8368,7 +8397,7 @@ async function shutdownCodexAppServer() {
8368
8397
  }
8369
8398
  }
8370
8399
  async function getAgentManager2() {
8371
- const { agentManager: agentManager2 } = await import("./agent-manager-EDFP4VXP.js");
8400
+ const { agentManager: agentManager2 } = await import("./agent-manager-4EKOSJBR.js");
8372
8401
  return agentManager2;
8373
8402
  }
8374
8403
  function parseRuneyaCurlCommand(command) {
@@ -17193,4 +17222,4 @@ export {
17193
17222
  pullEnv,
17194
17223
  registerInstance
17195
17224
  };
17196
- //# sourceMappingURL=src-V3J62F6F.js.map
17225
+ //# sourceMappingURL=src-7YQHXQ6L.js.map