replicas-engine 0.1.611 → 0.1.613

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/dist/src/index.js +25 -24
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -2546,6 +2546,7 @@ var DEFAULT_USER_PREFERENCES = {
2546
2546
  pr_user_attribution: false,
2547
2547
  auto_draft_prs: false,
2548
2548
  open_prs_in_graphite: false,
2549
+ open_links_in_desktop_app: false,
2549
2550
  default_fast_mode: false,
2550
2551
  agent_defaults: { ...EMPTY_AGENT_DEFAULT_SETTINGS },
2551
2552
  credential_priority: null
@@ -7686,13 +7687,13 @@ import { mkdir as mkdir7 } from "fs/promises";
7686
7687
  import { homedir as homedir9 } from "os";
7687
7688
  import { join as join12 } from "path";
7688
7689
  import { randomUUID } from "crypto";
7689
- var ENGINE_DIR2 = join12(homedir9(), ".replicas", "engine");
7690
- var EVENTS_FILE = join12(ENGINE_DIR2, "events.jsonl");
7690
+ var ENGINE_DIR = join12(homedir9(), ".replicas", "engine");
7691
+ var EVENTS_FILE = join12(ENGINE_DIR, "events.jsonl");
7691
7692
  var EventService = class {
7692
7693
  subscribers = /* @__PURE__ */ new Map();
7693
7694
  writer = new StreamWriter();
7694
7695
  async initialize() {
7695
- await mkdir7(ENGINE_DIR2, { recursive: true });
7696
+ await mkdir7(ENGINE_DIR, { recursive: true });
7696
7697
  this.writer.open(EVENTS_FILE);
7697
7698
  }
7698
7699
  subscribe(subscriber) {
@@ -10868,7 +10869,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
10868
10869
  var MIN_CODEX_CLI_VERSION = "0.144.6";
10869
10870
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
10870
10871
  var codexCliVersionEnsured = null;
10871
- var ENGINE_PACKAGE_VERSION = "0.1.611";
10872
+ var ENGINE_PACKAGE_VERSION = "0.1.613";
10872
10873
  var INITIALIZE_METHOD = "initialize";
10873
10874
  var INITIALIZED_NOTIFICATION = "initialized";
10874
10875
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -11797,14 +11798,14 @@ var TranscriptUpdateCoalescer = class {
11797
11798
  // src/services/chat/history-paths.ts
11798
11799
  import { homedir as homedir13 } from "os";
11799
11800
  import { join as join17 } from "path";
11800
- var ENGINE_DIR3 = join17(homedir13(), ".replicas", "engine");
11801
- var CHATS_FILE = join17(ENGINE_DIR3, "chats.json");
11802
- var CLAUDE_HISTORY_DIR = join17(ENGINE_DIR3, "claude-histories");
11803
- var RELAY_HISTORY_DIR = join17(ENGINE_DIR3, "relay-histories");
11804
- var CODEX_HISTORY_DIR = join17(ENGINE_DIR3, "codex-histories");
11805
- var CURSOR_HISTORY_DIR = join17(ENGINE_DIR3, "cursor-histories");
11806
- var OPENCODE_HISTORY_DIR = join17(ENGINE_DIR3, "opencode-histories");
11807
- var PI_HISTORY_DIR = join17(ENGINE_DIR3, "pi-histories");
11801
+ var ENGINE_DIR2 = join17(homedir13(), ".replicas", "engine");
11802
+ var CHATS_FILE = join17(ENGINE_DIR2, "chats.json");
11803
+ var CLAUDE_HISTORY_DIR = join17(ENGINE_DIR2, "claude-histories");
11804
+ var RELAY_HISTORY_DIR = join17(ENGINE_DIR2, "relay-histories");
11805
+ var CODEX_HISTORY_DIR = join17(ENGINE_DIR2, "codex-histories");
11806
+ var CURSOR_HISTORY_DIR = join17(ENGINE_DIR2, "cursor-histories");
11807
+ var OPENCODE_HISTORY_DIR = join17(ENGINE_DIR2, "opencode-histories");
11808
+ var PI_HISTORY_DIR = join17(ENGINE_DIR2, "pi-histories");
11808
11809
  var HISTORY_DIR_BY_PROVIDER = {
11809
11810
  claude: CLAUDE_HISTORY_DIR,
11810
11811
  relay: RELAY_HISTORY_DIR,
@@ -15248,7 +15249,7 @@ var AgentChatActivityBuffer = class {
15248
15249
  options.storageName,
15249
15250
  ...options.legacyStorageNames ?? []
15250
15251
  ];
15251
- this.liveFile = join22(ENGINE_DIR, `${options.storageName}.jsonl`);
15252
+ this.liveFile = join22(ENGINE_DIR2, `${options.storageName}.jsonl`);
15252
15253
  this.segmentFilePatterns = this.storageNames.map(
15253
15254
  (storageName) => new RegExp(`^${storageName}\\.(\\d+)\\.jsonl$`)
15254
15255
  );
@@ -15265,7 +15266,7 @@ var AgentChatActivityBuffer = class {
15265
15266
  failed: 0
15266
15267
  });
15267
15268
  append(record) {
15268
- const pending = mkdir14(ENGINE_DIR, { recursive: true }).then(
15269
+ const pending = mkdir14(ENGINE_DIR2, { recursive: true }).then(
15269
15270
  () => appendFile3(this.liveFile, `${JSON.stringify(record)}
15270
15271
  `, "utf-8")
15271
15272
  ).catch((error) => {
@@ -15307,19 +15308,19 @@ var AgentChatActivityBuffer = class {
15307
15308
  await Promise.allSettled([...this.pendingAppends]);
15308
15309
  for (const storageName of this.storageNames) {
15309
15310
  await rename2(
15310
- join22(ENGINE_DIR, `${storageName}.jsonl`),
15311
- join22(ENGINE_DIR, `${storageName}.${Date.now()}.jsonl`)
15311
+ join22(ENGINE_DIR2, `${storageName}.jsonl`),
15312
+ join22(ENGINE_DIR2, `${storageName}.${Date.now()}.jsonl`)
15312
15313
  ).catch(() => {
15313
15314
  });
15314
15315
  }
15315
- const entries = await readdir6(ENGINE_DIR).catch(() => []);
15316
+ const entries = await readdir6(ENGINE_DIR2).catch(() => []);
15316
15317
  let flushed = 0;
15317
15318
  let failed = 0;
15318
15319
  for (const entry of entries) {
15319
15320
  if (!this.segmentFilePatterns.some((pattern) => pattern.test(entry)))
15320
15321
  continue;
15321
15322
  try {
15322
- await this.uploadSegment(join22(ENGINE_DIR, entry));
15323
+ await this.uploadSegment(join22(ENGINE_DIR2, entry));
15323
15324
  flushed++;
15324
15325
  } catch (error) {
15325
15326
  failed++;
@@ -15351,7 +15352,7 @@ var AgentChatActivityBuffer = class {
15351
15352
  ) && entry.endsWith(UPLOADED_SUFFIX)
15352
15353
  ).sort();
15353
15354
  for (const entry of uploaded.slice(0, -MAX_UPLOADED_SEGMENTS)) {
15354
- await unlink3(join22(ENGINE_DIR, entry)).catch(() => {
15355
+ await unlink3(join22(ENGINE_DIR2, entry)).catch(() => {
15355
15356
  });
15356
15357
  }
15357
15358
  return { flushed, failed };
@@ -15820,7 +15821,7 @@ import { basename as basename2, join as join25 } from "path";
15820
15821
 
15821
15822
  // src/services/chat/chat-senders.ts
15822
15823
  import { join as join24 } from "path";
15823
- var CHAT_SENDERS_DIR = join24(ENGINE_DIR3, "chat-senders");
15824
+ var CHAT_SENDERS_DIR = join24(ENGINE_DIR2, "chat-senders");
15824
15825
  function chatMessageSendersFilePath(chatId) {
15825
15826
  return join24(CHAT_SENDERS_DIR, `${chatId}.jsonl`);
15826
15827
  }
@@ -15838,9 +15839,9 @@ function parseChatMessageSendersJsonl(content) {
15838
15839
 
15839
15840
  // src/services/upload-chat-transcripts.ts
15840
15841
  var HISTORY_DIRS = [
15841
- join25(ENGINE_DIR3, "claude-histories"),
15842
- join25(ENGINE_DIR3, "relay-histories"),
15843
- join25(ENGINE_DIR3, "codex-histories")
15842
+ join25(ENGINE_DIR2, "claude-histories"),
15843
+ join25(ENGINE_DIR2, "relay-histories"),
15844
+ join25(ENGINE_DIR2, "codex-histories")
15844
15845
  ];
15845
15846
  async function putTranscript(uploadUrl, filePath, size) {
15846
15847
  await new Promise((resolve5, reject) => {
@@ -16224,7 +16225,7 @@ var ChatService = class {
16224
16225
  persistInFlight = false;
16225
16226
  persistQueued = false;
16226
16227
  async initialize() {
16227
- await mkdir15(ENGINE_DIR3, { recursive: true });
16228
+ await mkdir15(ENGINE_DIR2, { recursive: true });
16228
16229
  await mkdir15(CLAUDE_HISTORY_DIR, { recursive: true });
16229
16230
  await mkdir15(RELAY_HISTORY_DIR, { recursive: true });
16230
16231
  await mkdir15(CODEX_HISTORY_DIR, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.611",
3
+ "version": "0.1.613",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",