replicas-engine 0.1.1183 → 0.1.1185

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.
package/dist/src/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  evaluateCommandProtection,
28
28
  extractToolCommand,
29
29
  reportCommandProtectionBlock
30
- } from "./chunk-XG6BQ3DQ.js";
30
+ } from "./chunk-3MSUW7UR.js";
31
31
  import {
32
32
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
33
33
  AGENT_MESSAGE_DELTA_METHOD,
@@ -64,18 +64,27 @@ import {
64
64
  spawnMuseMsp,
65
65
  startMuseSession,
66
66
  uuidV7
67
- } from "./chunk-E6ZC5R42.js";
67
+ } from "./chunk-HI2JQFS4.js";
68
68
  import {
69
69
  publishedPullRequestUrls
70
- } from "./chunk-E5HOEAHV.js";
70
+ } from "./chunk-DVPKDEWH.js";
71
71
  import {
72
72
  ACCOUNT_RATE_LIMITS_READ_METHOD,
73
73
  AsyncLock,
74
74
  BaseRefreshManager,
75
+ CHATS_FILE,
76
+ CLAUDE_HISTORY_DIR,
77
+ CODEX_HISTORY_DIR,
75
78
  CODEX_ULTRAFAST_SERVICE_TIER,
79
+ CURSOR_HISTORY_DIR,
76
80
  CodexAspAuthMethodChangedError,
77
81
  CodexQuotaStatusTracker,
78
82
  DEFAULT_MODEL,
83
+ ENGINE_DIR,
84
+ FORKS_DIR,
85
+ HISTORY_DIR_BY_PROVIDER,
86
+ OPENCODE_HISTORY_DIR,
87
+ PI_HISTORY_DIR,
79
88
  SKILLS_LIST_METHOD,
80
89
  SUBAGENT_MCP_TOOL_TIMEOUT_MS,
81
90
  THREAD_BACKGROUND_TERMINALS_CLEAN_METHOD,
@@ -130,7 +139,7 @@ import {
130
139
  timestampFromSeconds,
131
140
  upsertCredentialFileLines,
132
141
  writeSecureCredentialFile
133
- } from "./chunk-6TR2W5B3.js";
142
+ } from "./chunk-4ZGWVW57.js";
134
143
  import {
135
144
  ENGINE_ENV,
136
145
  monolithRequest,
@@ -139,15 +148,15 @@ import {
139
148
  reloadEngineEnv,
140
149
  resolveDiffBase,
141
150
  setAgentCredentialSnapshot
142
- } from "./chunk-OKE4RCRY.js";
151
+ } from "./chunk-5LUEYBGK.js";
143
152
  import {
144
153
  getCodexModelProvider
145
- } from "./chunk-RB33U66A.js";
154
+ } from "./chunk-BWK6AIHV.js";
146
155
  import {
147
156
  SUBPROCESS_MAX_BUFFER,
148
157
  execAsync,
149
158
  execFileAsync
150
- } from "./chunk-2AG3DWDX.js";
159
+ } from "./chunk-DK47O5WV.js";
151
160
  import {
152
161
  isRecord as isRecord2
153
162
  } from "./chunk-UZSNFLDQ.js";
@@ -374,7 +383,7 @@ import {
374
383
  workspaceTokenRequestSchema,
375
384
  workspaceTokenResponseSchema,
376
385
  wrapInTag
377
- } from "./chunk-AGNQDFJU.js";
386
+ } from "./chunk-MRLYA3JT.js";
378
387
  import {
379
388
  cloneMcpConfig,
380
389
  ensureCompatibilityImports,
@@ -575,7 +584,7 @@ var require_lib = __commonJS({
575
584
  "../node_modules/.bun/which@5.0.0/node_modules/which/lib/index.js"(exports, module) {
576
585
  "use strict";
577
586
  var { isexe, sync: isexeSync } = require_index_min();
578
- var { join: join36, delimiter: delimiter3, sep: sep2, posix } = __require("path");
587
+ var { join: join35, delimiter: delimiter3, sep: sep2, posix } = __require("path");
579
588
  var isWindows = process.platform === "win32";
580
589
  var rSlash = new RegExp(`[${posix.sep}${sep2 === posix.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1"));
581
590
  var rRel = new RegExp(`^\\.${rSlash.source}`);
@@ -604,7 +613,7 @@ var require_lib = __commonJS({
604
613
  var getPathPart = (raw, cmd) => {
605
614
  const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
606
615
  const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
607
- return prefix + join36(pathPart, cmd);
616
+ return prefix + join35(pathPart, cmd);
608
617
  };
609
618
  var which = async (cmd, opt = {}) => {
610
619
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
@@ -10275,10 +10284,8 @@ var replicasConfigService = new ReplicasConfigService();
10275
10284
 
10276
10285
  // src/services/event-service.ts
10277
10286
  import { mkdir as mkdir5 } from "fs/promises";
10278
- import { homedir as homedir6 } from "os";
10279
10287
  import { join as join6 } from "path";
10280
10288
  import { randomUUID as randomUUID2 } from "crypto";
10281
- var ENGINE_DIR = join6(homedir6(), ".replicas", "engine");
10282
10289
  var EVENTS_FILE = join6(ENGINE_DIR, "events.jsonl");
10283
10290
  var EventService = class {
10284
10291
  subscribers = /* @__PURE__ */ new Map();
@@ -10313,9 +10320,9 @@ var eventService = new EventService();
10313
10320
  import { mkdir as mkdir6, readFile as readFile5 } from "fs/promises";
10314
10321
  import { existsSync as existsSync4 } from "fs";
10315
10322
  import { randomUUID as randomUUID3 } from "crypto";
10316
- import { homedir as homedir7 } from "os";
10323
+ import { homedir as homedir6 } from "os";
10317
10324
  import { dirname, join as join7 } from "path";
10318
- var PREVIEW_PORTS_FILE = join7(homedir7(), ".replicas", "preview-ports.json");
10325
+ var PREVIEW_PORTS_FILE = join7(homedir6(), ".replicas", "preview-ports.json");
10319
10326
  async function readPreviewsFile() {
10320
10327
  try {
10321
10328
  if (!existsSync4(PREVIEW_PORTS_FILE)) {
@@ -10430,7 +10437,7 @@ async function registerDesktopPreview(signal) {
10430
10437
 
10431
10438
  // src/services/chat/chat-service.ts
10432
10439
  import { appendFile as appendFile5, copyFile as copyFile2, mkdir as mkdir17, readFile as readFile16, rename as rename3, rm as rm4, stat as stat6 } from "fs/promises";
10433
- import { join as join29 } from "path";
10440
+ import { join as join28 } from "path";
10434
10441
  import { randomUUID as randomUUID10 } from "crypto";
10435
10442
 
10436
10443
  // ../shared/src/workspace-chat.ts
@@ -10612,7 +10619,7 @@ import {
10612
10619
  import { randomUUID as randomUUID4 } from "crypto";
10613
10620
  import { dirname as dirname3, join as join10 } from "path";
10614
10621
  import { mkdir as mkdir7, readdir as readdir3, readFile as readFile7 } from "fs/promises";
10615
- import { homedir as homedir8 } from "os";
10622
+ import { homedir as homedir7 } from "os";
10616
10623
 
10617
10624
  // src/utils/linear-converter.ts
10618
10625
  function linearThoughtToResponse(thought) {
@@ -12669,7 +12676,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
12669
12676
  });
12670
12677
  this.onChatCredential = options.onChatCredential ?? (() => {
12671
12678
  });
12672
- this.historyFilePath = options.historyFilePath ?? join10(homedir8(), ".replicas", "claude", "history.jsonl");
12679
+ this.historyFilePath = options.historyFilePath ?? join10(homedir7(), ".replicas", "claude", "history.jsonl");
12673
12680
  this.historyFile = new CodexHistoryFile(this.historyFilePath);
12674
12681
  this.initializeManager(this.processMessageInternal.bind(this));
12675
12682
  }
@@ -16766,7 +16773,7 @@ var OpencodeManager = class extends CodingAgentManager {
16766
16773
 
16767
16774
  // src/managers/pi-manager.ts
16768
16775
  import { mkdir as mkdir14, readFile as readFile11 } from "fs/promises";
16769
- import { dirname as dirname15, join as join22 } from "path";
16776
+ import { dirname as dirname15, join as join21 } from "path";
16770
16777
  import {
16771
16778
  createAgentSession,
16772
16779
  ModelRegistry,
@@ -16775,27 +16782,6 @@ import {
16775
16782
  DefaultResourceLoader
16776
16783
  } from "@earendil-works/pi-coding-agent";
16777
16784
 
16778
- // src/services/chat/history-paths.ts
16779
- import { homedir as homedir9 } from "os";
16780
- import { join as join15 } from "path";
16781
- var ENGINE_DIR2 = join15(homedir9(), ".replicas", "engine");
16782
- var CHATS_FILE = join15(ENGINE_DIR2, "chats.json");
16783
- var CLAUDE_HISTORY_DIR = join15(ENGINE_DIR2, "claude-histories");
16784
- var CODEX_HISTORY_DIR = join15(ENGINE_DIR2, "codex-histories");
16785
- var CURSOR_HISTORY_DIR = join15(ENGINE_DIR2, "cursor-histories");
16786
- var OPENCODE_HISTORY_DIR = join15(ENGINE_DIR2, "opencode-histories");
16787
- var PI_HISTORY_DIR = join15(ENGINE_DIR2, "pi-histories");
16788
- var MUSE_HISTORY_DIR = join15(ENGINE_DIR2, "muse-histories");
16789
- var FORKS_DIR = join15(ENGINE_DIR2, "forks");
16790
- var HISTORY_DIR_BY_PROVIDER = {
16791
- claude: CLAUDE_HISTORY_DIR,
16792
- codex: CODEX_HISTORY_DIR,
16793
- cursor: CURSOR_HISTORY_DIR,
16794
- muse: MUSE_HISTORY_DIR,
16795
- opencode: OPENCODE_HISTORY_DIR,
16796
- pi: PI_HISTORY_DIR
16797
- };
16798
-
16799
16785
  // ../node_modules/.bun/typebox@1.3.7/node_modules/typebox/build/system/memory/memory.mjs
16800
16786
  var memory_exports = {};
16801
16787
  __export(memory_exports, {
@@ -39326,7 +39312,7 @@ async function probeMcpEndpoint(url3) {
39326
39312
 
39327
39313
  // ../node_modules/.bun/pi-mcp-adapter@2.32.1+04b0d7b0bc944965/node_modules/pi-mcp-adapter/npx-resolver.ts
39328
39314
  import { existsSync as existsSync9, readFileSync as readFileSync2, realpathSync, readdirSync, statSync, writeFileSync as writeFileSync2, renameSync, mkdirSync as mkdirSync2, openSync, readSync, closeSync, unlinkSync } from "fs";
39329
- import { join as join16, dirname as dirname8, extname as extname2, resolve as resolve2, sep } from "path";
39315
+ import { join as join15, dirname as dirname8, extname as extname2, resolve as resolve2, sep } from "path";
39330
39316
 
39331
39317
  // ../node_modules/.bun/pi-mcp-adapter@2.32.1+04b0d7b0bc944965/node_modules/pi-mcp-adapter/abort.ts
39332
39318
  function throwIfAborted(signal) {
@@ -39483,7 +39469,7 @@ function resolveFromNpmCache(packageSpec, binName) {
39483
39469
  const { packageName, exactVersion } = parsedSpec;
39484
39470
  const packageDir = findCachedPackageDir(cacheDir, packageName, exactVersion);
39485
39471
  if (!packageDir) return null;
39486
- const packageJsonPath = join16(packageDir, "package.json");
39472
+ const packageJsonPath = join15(packageDir, "package.json");
39487
39473
  if (!existsSync9(packageJsonPath)) return null;
39488
39474
  let pkg = null;
39489
39475
  try {
@@ -39517,7 +39503,7 @@ function resolveFromNpmCache(packageSpec, binName) {
39517
39503
  }
39518
39504
  if (!binRel) return null;
39519
39505
  const nodeModulesDir = findNodeModulesDir(packageDir);
39520
- const binLink = chosenBinName ? join16(nodeModulesDir, ".bin", chosenBinName) : null;
39506
+ const binLink = chosenBinName ? join15(nodeModulesDir, ".bin", chosenBinName) : null;
39521
39507
  let resolvedBin = binLink && existsSync9(binLink) ? safeRealpath(binLink) : "";
39522
39508
  if (!resolvedBin) {
39523
39509
  resolvedBin = resolve2(packageDir, binRel);
@@ -39619,17 +39605,17 @@ function defaultBinName(packageName) {
39619
39605
  return packageName;
39620
39606
  }
39621
39607
  function findCachedPackageDir(cacheDir, packageName, exactVersion) {
39622
- const npxDir = join16(cacheDir, "_npx");
39608
+ const npxDir = join15(cacheDir, "_npx");
39623
39609
  if (!existsSync9(npxDir)) return null;
39624
39610
  const packagePathParts = packageName.startsWith("@") ? packageName.split("/") : [packageName];
39625
39611
  const candidates = readdirSync(npxDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => {
39626
- const full = join16(npxDir, entry.name);
39612
+ const full = join15(npxDir, entry.name);
39627
39613
  const mtime = safeStatMtime(full);
39628
39614
  return { name: entry.name, mtime };
39629
39615
  }).sort((a, b) => b.mtime - a.mtime);
39630
39616
  for (const entry of candidates) {
39631
- const pkgDir = join16(npxDir, entry.name, "node_modules", ...packagePathParts);
39632
- const packageJsonPath = join16(pkgDir, "package.json");
39617
+ const pkgDir = join15(npxDir, entry.name, "node_modules", ...packagePathParts);
39618
+ const packageJsonPath = join15(pkgDir, "package.json");
39633
39619
  if (!existsSync9(packageJsonPath)) continue;
39634
39620
  if (exactVersion) {
39635
39621
  try {
@@ -39649,7 +39635,7 @@ function findNodeModulesDir(packageDir) {
39649
39635
  if (idx >= 0) {
39650
39636
  return parts.slice(0, idx + 1).join(sep);
39651
39637
  }
39652
- return join16(packageDir, "..");
39638
+ return join15(packageDir, "..");
39653
39639
  }
39654
39640
  function detectJsBinary(binPath) {
39655
39641
  const ext = extname2(binPath).toLowerCase();
@@ -39841,7 +39827,7 @@ import { spawnSync } from "child_process";
39841
39827
  import { createHash as createHash2 } from "crypto";
39842
39828
  import { createRequire } from "module";
39843
39829
  import { readFileSync as readFileSync3, existsSync as existsSync10, rmSync as rmSync2 } from "fs";
39844
- import { dirname as dirname9, join as join17 } from "path";
39830
+ import { dirname as dirname9, join as join16 } from "path";
39845
39831
  import { fileURLToPath as fileURLToPath3 } from "url";
39846
39832
  var require2 = createRequire(import.meta.url);
39847
39833
  var AUTH_SECRET_SERVICE = "pi-mcp-adapter.oauth";
@@ -39997,7 +39983,7 @@ function loadKeyringNativeBindingFallback(keyringRequire, platform3, arch2) {
39997
39983
  for (const target of targets) {
39998
39984
  try {
39999
39985
  const packageJsonPath = keyringRequire.resolve(`${target.packageName}/package.json`);
40000
- return keyringRequire(join17(dirname9(packageJsonPath), target.bindingFile));
39986
+ return keyringRequire(join16(dirname9(packageJsonPath), target.bindingFile));
40001
39987
  } catch (error) {
40002
39988
  lastError = error;
40003
39989
  }
@@ -40102,7 +40088,7 @@ function getServerDir(serverName, options) {
40102
40088
  throw new Error(`Invalid MCP server name: ${JSON.stringify(serverName)}`);
40103
40089
  }
40104
40090
  const storageKey = getAuthEntryAccount(serverName);
40105
- return join17(getAuthBaseDir(options), storageKey);
40091
+ return join16(getAuthBaseDir(options), storageKey);
40106
40092
  }
40107
40093
  function getAuthEntryAccount(serverName) {
40108
40094
  if (typeof serverName !== "string") {
@@ -40111,7 +40097,7 @@ function getAuthEntryAccount(serverName) {
40111
40097
  return `sha256-${createHash2("sha256").update(serverName, "utf8").digest("hex")}`;
40112
40098
  }
40113
40099
  function getAuthEntryFilePath(serverName, options) {
40114
- return join17(getServerDir(serverName, options), "tokens.json");
40100
+ return join16(getServerDir(serverName, options), "tokens.json");
40115
40101
  }
40116
40102
  function parseJsonPayload(serverName, payload, source) {
40117
40103
  try {
@@ -42714,7 +42700,7 @@ async function shutdownOAuth(runtime = legacyRuntime) {
42714
42700
  // ../node_modules/.bun/pi-mcp-adapter@2.32.1+04b0d7b0bc944965/node_modules/pi-mcp-adapter/mcp-bearer-store.ts
42715
42701
  import { createHash as createHash3 } from "crypto";
42716
42702
  import { createRequire as createRequire2 } from "module";
42717
- import { dirname as dirname10, join as join18 } from "path";
42703
+ import { dirname as dirname10, join as join17 } from "path";
42718
42704
  var require3 = createRequire2(import.meta.url);
42719
42705
  var BEARER_SECRET_SERVICE = "pi-mcp-adapter.bearer";
42720
42706
  var TEST_AUTH_STORE_ENV2 = "PI_MCP_ADAPTER_TEST_AUTH_STORE";
@@ -42816,7 +42802,7 @@ function loadKeyringNativeBindingFallback2(keyringRequire, platform3, arch2) {
42816
42802
  for (const target of targets) {
42817
42803
  try {
42818
42804
  const packageJsonPath = keyringRequire.resolve(`${target.packageName}/package.json`);
42819
- return keyringRequire(join18(dirname10(packageJsonPath), target.bindingFile));
42805
+ return keyringRequire(join17(dirname10(packageJsonPath), target.bindingFile));
42820
42806
  } catch (error) {
42821
42807
  lastError = error;
42822
42808
  }
@@ -47283,7 +47269,7 @@ async function openMcpAuthPanel(state, pi, ctx, configOverridePath) {
47283
47269
  // ../node_modules/.bun/pi-mcp-adapter@2.32.1+04b0d7b0bc944965/node_modules/pi-mcp-adapter/tool-registrar.ts
47284
47270
  import { mkdtempSync, rmSync as rmSync3, writeFileSync as writeFileSync4 } from "fs";
47285
47271
  import { tmpdir } from "os";
47286
- import { join as join19 } from "path";
47272
+ import { join as join18 } from "path";
47287
47273
  var MAX_BINARY_RESOURCE_BYTES = 10 * 1024 * 1024;
47288
47274
  var MAX_SESSION_RESOURCE_BYTES = 100 * 1024 * 1024;
47289
47275
  var MAX_SESSION_RESOURCE_FILES = 1e4;
@@ -47390,11 +47376,11 @@ function materializeBinaryResource(resource, scope) {
47390
47376
  return omitBinaryResource(resource, "session resource limit reached");
47391
47377
  }
47392
47378
  try {
47393
- session.directory ??= mkdtempSync(join19(tmpdir(), "pi-mcp-resource-"));
47379
+ session.directory ??= mkdtempSync(join18(tmpdir(), "pi-mcp-resource-"));
47394
47380
  } catch {
47395
47381
  return omitBinaryResource(resource, "could not be saved");
47396
47382
  }
47397
- const filePath = join19(session.directory, `resource-${++session.sequence}.bin`);
47383
+ const filePath = join18(session.directory, `resource-${++session.sequence}.bin`);
47398
47384
  session.bytes += decodedBytes;
47399
47385
  session.files += 1;
47400
47386
  try {
@@ -47487,7 +47473,7 @@ function stringifyStructuredContent(value) {
47487
47473
  import { randomBytes as randomBytes3 } from "crypto";
47488
47474
  import { mkdtemp, rm as rm3, writeFile as writeFile7 } from "fs/promises";
47489
47475
  import { tmpdir as tmpdir2 } from "os";
47490
- import { dirname as dirname13, join as join20 } from "path";
47476
+ import { dirname as dirname13, join as join19 } from "path";
47491
47477
  var DEFAULT_MCP_OUTPUT_MAX_BYTES = 50 * 1024;
47492
47478
  var DEFAULT_MCP_OUTPUT_MAX_LINES = 2e3;
47493
47479
  var DEFAULT_MCP_DETAILS_MAX_BYTES = 16 * 1024;
@@ -47795,8 +47781,8 @@ function serializedObjectEntryBytes(key, value, hasPrevious) {
47795
47781
  }
47796
47782
  async function saveArtifact(kind, text) {
47797
47783
  try {
47798
- const dir = await mkdtemp(join20(tmpdir2(), "pi-mcp-output-"));
47799
- const path7 = join20(dir, `${kind}-${randomBytes3(4).toString("hex")}.txt`);
47784
+ const dir = await mkdtemp(join19(tmpdir2(), "pi-mcp-output-"));
47785
+ const path7 = join19(dir, `${kind}-${randomBytes3(4).toString("hex")}.txt`);
47800
47786
  await writeFile7(path7, text, { encoding: "utf8", mode: 384 });
47801
47787
  return { path: path7 };
47802
47788
  } catch (error) {
@@ -49443,7 +49429,7 @@ function sendText(res, status, text) {
49443
49429
  // ../node_modules/.bun/pi-mcp-adapter@2.32.1+04b0d7b0bc944965/node_modules/pi-mcp-adapter/glimpse-ui.ts
49444
49430
  import { existsSync as existsSync13 } from "fs";
49445
49431
  import { execFileSync as execFileSync2 } from "child_process";
49446
- import { join as join21, dirname as dirname14 } from "path";
49432
+ import { join as join20, dirname as dirname14 } from "path";
49447
49433
  import { platform as platform2 } from "os";
49448
49434
  import { createRequire as createRequire3 } from "module";
49449
49435
  var glimpseAvailable = null;
@@ -49465,20 +49451,20 @@ function getGlimpseBinaryPath() {
49465
49451
  try {
49466
49452
  const require6 = createRequire3(import.meta.url);
49467
49453
  const glimpseuiPath = require6.resolve("glimpseui");
49468
- const binaryPath = join21(dirname14(glimpseuiPath), "glimpse");
49454
+ const binaryPath = join20(dirname14(glimpseuiPath), "glimpse");
49469
49455
  if (existsSync13(binaryPath)) return binaryPath;
49470
49456
  } catch {
49471
49457
  }
49472
49458
  try {
49473
49459
  const globalRoot = execFileSync2("npm", ["root", "-g"], { encoding: "utf-8" }).trim();
49474
- const binaryPath = join21(globalRoot, "glimpseui", "src", "glimpse");
49460
+ const binaryPath = join20(globalRoot, "glimpseui", "src", "glimpse");
49475
49461
  if (existsSync13(binaryPath)) return binaryPath;
49476
49462
  } catch {
49477
49463
  }
49478
49464
  return null;
49479
49465
  }
49480
49466
  async function openGlimpseWindow(html, options) {
49481
- const modulePath = resolvedBinaryPath ? join21(dirname14(resolvedBinaryPath), "glimpse.mjs") : "glimpseui";
49467
+ const modulePath = resolvedBinaryPath ? join20(dirname14(resolvedBinaryPath), "glimpse.mjs") : "glimpseui";
49482
49468
  const glimpse = await import(modulePath);
49483
49469
  let active = true;
49484
49470
  const win = glimpse.open(html, {
@@ -57392,7 +57378,7 @@ var PiManager = class extends CodingAgentManager {
57392
57378
  modelRuntime = null;
57393
57379
  constructor(options) {
57394
57380
  super(options);
57395
- this.historyFilePath = options.historyFilePath ?? join22(PI_HISTORY_DIR, `${Date.now()}.jsonl`);
57381
+ this.historyFilePath = options.historyFilePath ?? join21(PI_HISTORY_DIR, `${Date.now()}.jsonl`);
57396
57382
  this.historyFile = new CodexHistoryFile(this.historyFilePath);
57397
57383
  this.initializeManager(this.processMessageInternal.bind(this));
57398
57384
  }
@@ -57551,7 +57537,7 @@ var PiManager = class extends CodingAgentManager {
57551
57537
  }
57552
57538
  const resourceLoader = new DefaultResourceLoader({
57553
57539
  cwd: this.workingDirectory,
57554
- agentDir: join22(ENGINE_ENV.HOME_DIR, ".pi", "agent"),
57540
+ agentDir: join21(ENGINE_ENV.HOME_DIR, ".pi", "agent"),
57555
57541
  extensionFactories,
57556
57542
  appendSystemPrompt: [instructions]
57557
57543
  });
@@ -57632,7 +57618,7 @@ import {
57632
57618
  unlink
57633
57619
  } from "fs/promises";
57634
57620
  import { existsSync as existsSync14, readFileSync as readFileSync5, readdirSync as readdirSync2 } from "fs";
57635
- import { join as join23 } from "path";
57621
+ import { join as join22 } from "path";
57636
57622
  var MAX_FAILED_RECORDS = 500;
57637
57623
  var FLUSH_DEBOUNCE_MS = 15e3;
57638
57624
  var MAX_UPLOADED_SEGMENTS = 50;
@@ -57644,7 +57630,7 @@ var AnalyticsRecordBuffer = class {
57644
57630
  options.storageName,
57645
57631
  ...options.legacyStorageNames ?? []
57646
57632
  ];
57647
- this.liveFile = join23(ENGINE_DIR2, `${options.storageName}.jsonl`);
57633
+ this.liveFile = join22(ENGINE_DIR, `${options.storageName}.jsonl`);
57648
57634
  this.segmentFilePatterns = this.storageNames.map(
57649
57635
  (storageName) => new RegExp(`^${storageName}\\.(\\d+)\\.jsonl$`)
57650
57636
  );
@@ -57667,7 +57653,7 @@ var AnalyticsRecordBuffer = class {
57667
57653
  if (this.recordIds.has(recordId)) return;
57668
57654
  this.recordIds.add(recordId);
57669
57655
  }
57670
- const pending = mkdir15(ENGINE_DIR2, { recursive: true }).then(() => appendFile4(this.liveFile, `${JSON.stringify(record3)}
57656
+ const pending = mkdir15(ENGINE_DIR, { recursive: true }).then(() => appendFile4(this.liveFile, `${JSON.stringify(record3)}
57671
57657
  `, "utf-8")).catch((error) => {
57672
57658
  console.error(
57673
57659
  `[${this.options.storageName}] Append failed, will retry on flush:`,
@@ -57679,10 +57665,10 @@ var AnalyticsRecordBuffer = class {
57679
57665
  void pending.finally(() => this.pendingAppends.delete(pending));
57680
57666
  }
57681
57667
  readStoredRecords() {
57682
- if (!existsSync14(ENGINE_DIR2)) return [];
57683
- return readdirSync2(ENGINE_DIR2, { withFileTypes: true }).filter((entry) => entry.isFile() && this.storageNames.some(
57668
+ if (!existsSync14(ENGINE_DIR)) return [];
57669
+ return readdirSync2(ENGINE_DIR, { withFileTypes: true }).filter((entry) => entry.isFile() && this.storageNames.some(
57684
57670
  (storageName) => entry.name === `${storageName}.jsonl` || entry.name.startsWith(`${storageName}.`) && (entry.name.endsWith(".jsonl") || entry.name.endsWith(`.jsonl${UPLOADED_SUFFIX}`))
57685
- )).map(({ name }) => name).sort().flatMap((name) => this.parseRecords(readFileSync5(join23(ENGINE_DIR2, name), "utf-8"))).map((record3) => {
57671
+ )).map(({ name }) => name).sort().flatMap((name) => this.parseRecords(readFileSync5(join22(ENGINE_DIR, name), "utf-8"))).map((record3) => {
57686
57672
  const recordId = this.options.getRecordId?.(record3);
57687
57673
  if (recordId) this.recordIds.add(recordId);
57688
57674
  return record3;
@@ -57717,18 +57703,18 @@ var AnalyticsRecordBuffer = class {
57717
57703
  }
57718
57704
  for (const storageName of this.storageNames) {
57719
57705
  await rename2(
57720
- join23(ENGINE_DIR2, `${storageName}.jsonl`),
57721
- join23(ENGINE_DIR2, `${storageName}.${Date.now()}.jsonl`)
57706
+ join22(ENGINE_DIR, `${storageName}.jsonl`),
57707
+ join22(ENGINE_DIR, `${storageName}.${Date.now()}.jsonl`)
57722
57708
  ).catch(() => {
57723
57709
  });
57724
57710
  }
57725
- const entries = await readdir5(ENGINE_DIR2).catch(() => []);
57711
+ const entries = await readdir5(ENGINE_DIR).catch(() => []);
57726
57712
  let flushed = 0;
57727
57713
  let failed = 0;
57728
57714
  for (const entry of entries) {
57729
57715
  if (!this.segmentFilePatterns.some((pattern) => pattern.test(entry))) continue;
57730
57716
  try {
57731
- await this.uploadSegment(join23(ENGINE_DIR2, entry));
57717
+ await this.uploadSegment(join22(ENGINE_DIR, entry));
57732
57718
  flushed++;
57733
57719
  } catch (error) {
57734
57720
  failed++;
@@ -57757,7 +57743,7 @@ var AnalyticsRecordBuffer = class {
57757
57743
  (storageName) => entry.startsWith(`${storageName}.`)
57758
57744
  ) && entry.endsWith(UPLOADED_SUFFIX)).sort();
57759
57745
  for (const entry of uploaded.slice(0, -MAX_UPLOADED_SEGMENTS)) {
57760
- await unlink(join23(ENGINE_DIR2, entry)).catch(() => {
57746
+ await unlink(join22(ENGINE_DIR, entry)).catch(() => {
57761
57747
  });
57762
57748
  }
57763
57749
  }
@@ -58567,8 +58553,8 @@ var keepAliveService = new KeepAliveService();
58567
58553
 
58568
58554
  // src/services/canvas-service.ts
58569
58555
  import { readdir as readdir6, readFile as readFile14, stat as stat3 } from "fs/promises";
58570
- import { homedir as homedir10 } from "os";
58571
- import { join as join24 } from "path";
58556
+ import { homedir as homedir8 } from "os";
58557
+ import { join as join23 } from "path";
58572
58558
 
58573
58559
  // src/utils/contained-file.ts
58574
58560
  import { realpath, stat as stat2 } from "fs/promises";
@@ -58610,15 +58596,15 @@ async function writeRevisionedTextFile(filePath, content, expectedRevision) {
58610
58596
 
58611
58597
  // src/services/canvas-service.ts
58612
58598
  var GLOBAL_CANVAS_DIRECTORIES = [
58613
- join24(homedir10(), ".claude", "plans"),
58614
- join24(process.env.XDG_DATA_HOME ?? join24(homedir10(), ".local", "share"), "opencode", "plans"),
58615
- join24(homedir10(), ".replicas", "canvas")
58599
+ join23(homedir8(), ".claude", "plans"),
58600
+ join23(process.env.XDG_DATA_HOME ?? join23(homedir8(), ".local", "share"), "opencode", "plans"),
58601
+ join23(homedir8(), ".replicas", "canvas")
58616
58602
  ];
58617
58603
  async function canvasDirectories() {
58618
58604
  const repositories = await gitService.listRepositories().catch(() => []);
58619
58605
  return [
58620
58606
  ...GLOBAL_CANVAS_DIRECTORIES,
58621
- ...repositories.map((repository) => join24(repository.path, ".opencode", "plans"))
58607
+ ...repositories.map((repository) => join23(repository.path, ".opencode", "plans"))
58622
58608
  ];
58623
58609
  }
58624
58610
  var CanvasService = class {
@@ -58643,7 +58629,7 @@ var CanvasService = class {
58643
58629
  for (const entry of entries) {
58644
58630
  if (entry.name.startsWith(".")) continue;
58645
58631
  const filename = current.relativePath ? `${current.relativePath}/${entry.name}` : entry.name;
58646
- const filePath = join24(current.directory, entry.name);
58632
+ const filePath = join23(current.directory, entry.name);
58647
58633
  if (entry.isDirectory()) {
58648
58634
  pending.push({ directory: filePath, relativePath: filename });
58649
58635
  continue;
@@ -58668,7 +58654,7 @@ var CanvasService = class {
58668
58654
  if (!safe) return null;
58669
58655
  const { kind, mimeType } = classifyCanvasFilename(safe);
58670
58656
  for (const directory of await this.directories()) {
58671
- const filePath = join24(directory, safe);
58657
+ const filePath = join23(directory, safe);
58672
58658
  let sizeBytes = 0;
58673
58659
  let updatedAt = "";
58674
58660
  try {
@@ -58852,13 +58838,13 @@ async function reconcileCanvasItems(filenames) {
58852
58838
  import { createReadStream as createReadStream3 } from "fs";
58853
58839
  import { createHash as createHash7 } from "crypto";
58854
58840
  import { readFile as readFile15, readdir as readdir7, stat as stat4 } from "fs/promises";
58855
- import { basename as basename3, join as join26 } from "path";
58841
+ import { basename as basename3, join as join25 } from "path";
58856
58842
 
58857
58843
  // src/services/chat/chat-senders.ts
58858
- import { join as join25 } from "path";
58859
- var CHAT_SENDERS_DIR = join25(ENGINE_DIR2, "chat-senders");
58844
+ import { join as join24 } from "path";
58845
+ var CHAT_SENDERS_DIR = join24(ENGINE_DIR, "chat-senders");
58860
58846
  function chatMessageSendersFilePath(chatId) {
58861
- return join25(CHAT_SENDERS_DIR, `${chatId}.jsonl`);
58847
+ return join24(CHAT_SENDERS_DIR, `${chatId}.jsonl`);
58862
58848
  }
58863
58849
  function parseChatMessageSendersJsonl(content) {
58864
58850
  return content.split("\n").flatMap((line) => {
@@ -58945,7 +58931,7 @@ async function flushAllChatTranscripts(chatsById = /* @__PURE__ */ new Map(), ca
58945
58931
  const chat = chatsById.get(chatId);
58946
58932
  if (!shouldFlushChatTranscript(dir, chat, chatsById, Boolean(capture))) continue;
58947
58933
  tasks.push(
58948
- uploadChatTranscript(chatId, join26(dir, entry), chat, capture).then(async (artifact) => {
58934
+ uploadChatTranscript(chatId, join25(dir, entry), chat, capture).then(async (artifact) => {
58949
58935
  flushed++;
58950
58936
  if (artifact && capture) revisions.push(artifact);
58951
58937
  await onUploaded?.(chatId, artifact).catch((err) => {
@@ -59073,7 +59059,7 @@ async function flushRepoState() {
59073
59059
  // src/services/upload-engine-logs.ts
59074
59060
  import { createReadStream as createReadStream4 } from "fs";
59075
59061
  import { readdir as readdir8, stat as stat5 } from "fs/promises";
59076
- import { join as join27 } from "path";
59062
+ import { join as join26 } from "path";
59077
59063
  var MAX_ENGINE_LOG_FLUSH_SESSIONS = 10;
59078
59064
  var MAX_ENGINE_LOG_FLUSH_BYTES = 5 * 1024 * 1024;
59079
59065
  var ENGINE_LOG_FLUSH_TIMEOUT_MS = 2e4;
@@ -59102,7 +59088,7 @@ async function flushAllEngineLogs() {
59102
59088
  const candidates = (await Promise.all(filenames.slice(0, MAX_ENGINE_LOG_FLUSH_SESSIONS).map(async (filename) => {
59103
59089
  try {
59104
59090
  const sessionId = filename.slice(0, -".log".length);
59105
- const filePath = join27(LOG_DIR, filename);
59091
+ const filePath = join26(LOG_DIR, filename);
59106
59092
  const fileStat = await runBeforeDeadline(() => stat5(filePath), deadline);
59107
59093
  if (!fileStat.isFile()) {
59108
59094
  skipped++;
@@ -59200,7 +59186,7 @@ async function uploadEngineLog(input, timeoutMs) {
59200
59186
  // src/services/chat/fork-handoff.ts
59201
59187
  import { createHash as createHash8 } from "crypto";
59202
59188
  import { mkdir as mkdir16, open as open3, writeFile as writeFile8 } from "fs/promises";
59203
- import { join as join28 } from "path";
59189
+ import { join as join27 } from "path";
59204
59190
  var EXCERPT_MAX_CHARS = 24e3;
59205
59191
  var MAX_SANITIZED_SOURCE_BYTES = 32 * 1024 * 1024;
59206
59192
  function unansweredRequest(blocks) {
@@ -59248,7 +59234,7 @@ function unseenTurnsExcerpt(seenHashes, blocks) {
59248
59234
  ${excerpt}` : excerpt;
59249
59235
  }
59250
59236
  async function buildForkHandoff(input) {
59251
- const rawHistoryPath = join28(HISTORY_DIR_BY_PROVIDER[input.sourceProvider], `${input.sourceChatId}.jsonl`);
59237
+ const rawHistoryPath = join27(HISTORY_DIR_BY_PROVIDER[input.sourceProvider], `${input.sourceChatId}.jsonl`);
59252
59238
  const { content, truncated: sourceTruncated } = await readHistoryTail(rawHistoryPath, MAX_SANITIZED_SOURCE_BYTES);
59253
59239
  let blocks = canonicalizeChatTranscriptBlocks(content, input.sourceProvider, input.senders);
59254
59240
  if (input.turnLimit !== void 0) {
@@ -59256,9 +59242,9 @@ async function buildForkHandoff(input) {
59256
59242
  const start = blocks.findLastIndex((block) => block.startsWith("## User") && ++turns === input.turnLimit);
59257
59243
  blocks = blocks.slice(Math.max(0, start));
59258
59244
  }
59259
- const forkDir = join28(FORKS_DIR, input.targetChatId);
59245
+ const forkDir = join27(FORKS_DIR, input.targetChatId);
59260
59246
  await mkdir16(forkDir, { recursive: true });
59261
- const transcriptPath = join28(forkDir, "source-transcript.md");
59247
+ const transcriptPath = join27(forkDir, "source-transcript.md");
59262
59248
  const header = sourceTruncated ? `_This file was generated from only the most recent ${MAX_SANITIZED_SOURCE_BYTES / 1024 / 1024} MB of the source chat.${input.turnLimit === void 0 ? ` The complete raw event log is at ${rawHistoryPath}; grep it for anything earlier.` : ""}_
59263
59249
 
59264
59250
  ` : "";
@@ -59418,7 +59404,7 @@ var ChatService = class {
59418
59404
  persistPromise = null;
59419
59405
  persistQueued = false;
59420
59406
  async initialize() {
59421
- await mkdir17(ENGINE_DIR2, { recursive: true });
59407
+ await mkdir17(ENGINE_DIR, { recursive: true });
59422
59408
  await mkdir17(CLAUDE_HISTORY_DIR, { recursive: true });
59423
59409
  await mkdir17(CODEX_HISTORY_DIR, { recursive: true });
59424
59410
  await mkdir17(CURSOR_HISTORY_DIR, { recursive: true });
@@ -60070,7 +60056,7 @@ var ChatService = class {
60070
60056
  `${historyPath}.pages.index.json`
60071
60057
  ].map((path7) => rm4(path7, { force: true })));
60072
60058
  await rm4(chatMessageSendersFilePath(persisted.id), { force: true });
60073
- await rm4(join29(FORKS_DIR, persisted.id), { recursive: true, force: true });
60059
+ await rm4(join28(FORKS_DIR, persisted.id), { recursive: true, force: true });
60074
60060
  }
60075
60061
  /** Resolves once the target chat exists; the handoff and its first turn run in the background. */
60076
60062
  async forkChat(sourceChatId, request, trigger = "manual", reason) {
@@ -60272,7 +60258,7 @@ var ChatService = class {
60272
60258
  };
60273
60259
  }
60274
60260
  historyPath(persisted) {
60275
- return join29(HISTORY_DIR_BY_PROVIDER[persisted.provider], `${persisted.id}.jsonl`);
60261
+ return join28(HISTORY_DIR_BY_PROVIDER[persisted.provider], `${persisted.id}.jsonl`);
60276
60262
  }
60277
60263
  async recordUploadedHistory(chatId, artifact) {
60278
60264
  const chat = this.getRuntimeChat(chatId);
@@ -60391,7 +60377,7 @@ var ChatService = class {
60391
60377
  persisted.parentChatId = null;
60392
60378
  }
60393
60379
  const baseProvider = persisted.provider;
60394
- const historyFilePath = join29(HISTORY_DIR_BY_PROVIDER[persisted.provider], `${persisted.id}.jsonl`);
60380
+ const historyFilePath = join28(HISTORY_DIR_BY_PROVIDER[persisted.provider], `${persisted.id}.jsonl`);
60395
60381
  const managerOptions = {
60396
60382
  provider: baseProvider,
60397
60383
  workingDirectory: this.workingDirectory,
@@ -60869,14 +60855,14 @@ var ChatService = class {
60869
60855
  // src/services/repo-file-service.ts
60870
60856
  import { execFile as execFile7 } from "child_process";
60871
60857
  import { readFile as readFile17 } from "fs/promises";
60872
- import { homedir as homedir11 } from "os";
60873
- import { extname as extname3, join as join31 } from "path";
60858
+ import { homedir as homedir9 } from "os";
60859
+ import { extname as extname3, join as join30 } from "path";
60874
60860
 
60875
60861
  // src/services/language-server-service.ts
60876
60862
  import { spawn as spawn4 } from "child_process";
60877
60863
  import { existsSync as existsSync15, readFileSync as readFileSync6 } from "fs";
60878
60864
  import { createRequire as createRequire5 } from "module";
60879
- import { delimiter as delimiter2, dirname as dirname16, join as join30, relative as relative2 } from "path";
60865
+ import { delimiter as delimiter2, dirname as dirname16, join as join29, relative as relative2 } from "path";
60880
60866
  import { setTimeout as setTimeout3 } from "timers/promises";
60881
60867
  import { fileURLToPath as fileURLToPath5, pathToFileURL } from "url";
60882
60868
  import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from "vscode-jsonrpc/node.js";
@@ -60995,7 +60981,7 @@ var LanguageServerService = class {
60995
60981
  if (config.package && config.bin) command = process.execPath;
60996
60982
  else if (config.command) {
60997
60983
  const commandName = config.command;
60998
- command = process.env.PATH?.split(delimiter2).map((directory) => join30(directory, commandName)).find(existsSync15);
60984
+ command = process.env.PATH?.split(delimiter2).map((directory) => join29(directory, commandName)).find(existsSync15);
60999
60985
  }
61000
60986
  const args = config.package && config.bin ? [packageBin(config.package, config.bin), ...config.args] : config.args;
61001
60987
  if (!command) return null;
@@ -61088,7 +61074,7 @@ function execGitAsync(args, cwd, timeoutMs) {
61088
61074
  });
61089
61075
  }
61090
61076
  var RepoFileService = class {
61091
- constructor(gitService2, homeDir = homedir11()) {
61077
+ constructor(gitService2, homeDir = homedir9()) {
61092
61078
  this.homeDir = homeDir;
61093
61079
  this.gitService = gitService2;
61094
61080
  }
@@ -61282,7 +61268,7 @@ var RepoFileService = class {
61282
61268
  return await resolveContainedFile(repo.path, filePath);
61283
61269
  }
61284
61270
  async resolveSkillFile(filePath) {
61285
- const skillRoots = SANDBOX_SKILL_DIRS.map((dir) => join31(this.homeDir, dir));
61271
+ const skillRoots = SANDBOX_SKILL_DIRS.map((dir) => join30(this.homeDir, dir));
61286
61272
  if (!skillRoots.some((root) => filePath.startsWith(`${root}/`))) return null;
61287
61273
  const repos = await this.gitService.listRepositories();
61288
61274
  for (const root of [...skillRoots, ...repos.map((repo) => repo.path)]) {
@@ -61356,20 +61342,20 @@ var RepoFileService = class {
61356
61342
  import { Hono } from "hono";
61357
61343
  import { z as z4 } from "zod";
61358
61344
  import { readdir as readdir10, stat as stat7, readFile as readFile20 } from "fs/promises";
61359
- import { join as join34, resolve as resolve5 } from "path";
61345
+ import { join as join33, resolve as resolve5 } from "path";
61360
61346
 
61361
61347
  // src/services/warm-hooks-service.ts
61362
61348
  import { spawn as spawn5 } from "child_process";
61363
61349
  import { readFile as readFile19 } from "fs/promises";
61364
61350
  import { existsSync as existsSync16 } from "fs";
61365
- import { join as join33 } from "path";
61351
+ import { join as join32 } from "path";
61366
61352
 
61367
61353
  // src/services/warm-hook-logs-service.ts
61368
61354
  import { mkdir as mkdir18, readFile as readFile18, writeFile as writeFile9, readdir as readdir9, appendFile as appendFile6, unlink as unlink2 } from "fs/promises";
61369
- import { homedir as homedir12 } from "os";
61370
- import { join as join32 } from "path";
61371
- var LOGS_DIR2 = join32(homedir12(), ".replicas", "warm-hook-logs");
61372
- var CURRENT_RUN_LOG = join32(LOGS_DIR2, "current-run.log");
61355
+ import { homedir as homedir10 } from "os";
61356
+ import { join as join31 } from "path";
61357
+ var LOGS_DIR2 = join31(homedir10(), ".replicas", "warm-hook-logs");
61358
+ var CURRENT_RUN_LOG = join31(LOGS_DIR2, "current-run.log");
61373
61359
  function withPreview2(stored) {
61374
61360
  const preview = buildHookOutputPreview(stored.output);
61375
61361
  return { ...stored, ...preview };
@@ -61385,7 +61371,7 @@ var WarmHookLogsService = class {
61385
61371
  hookName: "environment",
61386
61372
  ...entry
61387
61373
  };
61388
- await writeFile9(join32(LOGS_DIR2, ENVIRONMENT_HOOK_LOG_FILENAME), `${JSON.stringify(log, null, 2)}
61374
+ await writeFile9(join31(LOGS_DIR2, ENVIRONMENT_HOOK_LOG_FILENAME), `${JSON.stringify(log, null, 2)}
61389
61375
  `, "utf-8");
61390
61376
  }
61391
61377
  async saveRepoHookLog(repoName, entry) {
@@ -61395,7 +61381,7 @@ var WarmHookLogsService = class {
61395
61381
  hookName: repoName,
61396
61382
  ...entry
61397
61383
  };
61398
- await writeFile9(join32(LOGS_DIR2, repoHookLogFilename(repoName)), `${JSON.stringify(log, null, 2)}
61384
+ await writeFile9(join31(LOGS_DIR2, repoHookLogFilename(repoName)), `${JSON.stringify(log, null, 2)}
61399
61385
  `, "utf-8");
61400
61386
  }
61401
61387
  async getAllLogs() {
@@ -61414,7 +61400,7 @@ var WarmHookLogsService = class {
61414
61400
  continue;
61415
61401
  }
61416
61402
  try {
61417
- const raw = await readFile18(join32(LOGS_DIR2, file), "utf-8");
61403
+ const raw = await readFile18(join31(LOGS_DIR2, file), "utf-8");
61418
61404
  const stored = JSON.parse(raw);
61419
61405
  if (stored.hookType !== "environment" && stored.hookType !== "repository") continue;
61420
61406
  logs.push(withPreview2(stored));
@@ -61450,7 +61436,7 @@ var WarmHookLogsService = class {
61450
61436
  async getFullOutput(hookType, hookName) {
61451
61437
  const filename = hookType === "environment" ? ENVIRONMENT_HOOK_LOG_FILENAME : repoHookLogFilename(hookName);
61452
61438
  try {
61453
- const raw = await readFile18(join32(LOGS_DIR2, filename), "utf-8");
61439
+ const raw = await readFile18(join31(LOGS_DIR2, filename), "utf-8");
61454
61440
  const stored = JSON.parse(raw);
61455
61441
  if (stored.hookType !== hookType || stored.hookName !== hookName) {
61456
61442
  return null;
@@ -61469,7 +61455,7 @@ var warmHookLogsService = new WarmHookLogsService();
61469
61455
  // src/services/warm-hooks-service.ts
61470
61456
  async function readRepoWarmHook(repoPath) {
61471
61457
  for (const filename of REPLICAS_CONFIG_FILENAMES) {
61472
- const configPath = join33(repoPath, filename);
61458
+ const configPath = join32(repoPath, filename);
61473
61459
  if (!existsSync16(configPath)) {
61474
61460
  continue;
61475
61461
  }
@@ -62832,7 +62818,7 @@ data: ${JSON.stringify("Terminal session not found")}
62832
62818
  const logFiles = files.filter((f) => f.endsWith(".log"));
62833
62819
  const sessions = await Promise.all(
62834
62820
  logFiles.map(async (filename) => {
62835
- const filePath = join34(LOG_DIR, filename);
62821
+ const filePath = join33(LOG_DIR, filename);
62836
62822
  const fileStat = await stat7(filePath);
62837
62823
  const sessionId = filename.replace(/\.log$/, "");
62838
62824
  return {
@@ -63058,8 +63044,8 @@ async function installWorkspaceSdk() {
63058
63044
  // src/services/git-push-tracker.ts
63059
63045
  import { mkdir as mkdir20, rm as rm5 } from "fs/promises";
63060
63046
  import { createServer as createServer2 } from "net";
63061
- import { join as join35 } from "path";
63062
- var SOCKET_PATH = join35(ENGINE_DIR2, "git-trace2.sock");
63047
+ import { join as join34 } from "path";
63048
+ var SOCKET_PATH = join34(ENGINE_DIR, "git-trace2.sock");
63063
63049
  var MAX_LINE_LENGTH = 1024 * 1024;
63064
63050
  var listening = null;
63065
63051
  function startGitPushTracker() {
@@ -63069,7 +63055,7 @@ function startGitPushTracker() {
63069
63055
  });
63070
63056
  }
63071
63057
  async function listen() {
63072
- await mkdir20(ENGINE_DIR2, { recursive: true });
63058
+ await mkdir20(ENGINE_DIR, { recursive: true });
63073
63059
  await rm5(SOCKET_PATH, { force: true });
63074
63060
  const server3 = createServer2((socket) => {
63075
63061
  let buffered = "";