pybao-cli 1.4.15 → 1.4.17

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 (152) hide show
  1. package/dist/REPL-2HTMFGA5.js +47 -0
  2. package/dist/{acp-RPMY76QL.js → acp-2LOJ6G5I.js} +29 -29
  3. package/dist/{agentsValidate-PX32PNPA.js → agentsValidate-JHFP6CBL.js} +7 -7
  4. package/dist/{ask-P3GOQDEX.js → ask-7S7OPAEK.js} +28 -28
  5. package/dist/{autoUpdater-R4EXAJ7P.js → autoUpdater-JB2N6XSK.js} +3 -3
  6. package/dist/{chunk-6RKXEEHI.js → chunk-26DNH5MY.js} +2 -2
  7. package/dist/{chunk-33NX2JEV.js → chunk-26VECGIJ.js} +5 -3
  8. package/dist/{chunk-33NX2JEV.js.map → chunk-26VECGIJ.js.map} +2 -2
  9. package/dist/{chunk-BB7V4QKI.js → chunk-3H7JCOX7.js} +1 -1
  10. package/dist/{chunk-L3W3K3QU.js → chunk-5IIJ6XQX.js} +27 -26
  11. package/dist/chunk-5IIJ6XQX.js.map +7 -0
  12. package/dist/{chunk-PD6OTVLV.js → chunk-5KZB52GW.js} +1 -1
  13. package/dist/{chunk-C6ZACFHI.js → chunk-7SGVFJWX.js} +1 -1
  14. package/dist/{chunk-IB6KSWDZ.js → chunk-AHK3NVAX.js} +6 -6
  15. package/dist/chunk-AHK3NVAX.js.map +7 -0
  16. package/dist/{chunk-37NXYZZP.js → chunk-AHO6SRRR.js} +3 -3
  17. package/dist/{chunk-THJLROJB.js → chunk-CDKFT2GF.js} +12 -2
  18. package/dist/chunk-CDKFT2GF.js.map +7 -0
  19. package/dist/{chunk-MRMEHFMO.js → chunk-CIUNX2UP.js} +1 -1
  20. package/dist/{chunk-ELWN7R7M.js → chunk-CZRFLOQG.js} +9 -6
  21. package/dist/{chunk-ELWN7R7M.js.map → chunk-CZRFLOQG.js.map} +2 -2
  22. package/dist/{chunk-4YNWFMHH.js → chunk-DXIIHIJG.js} +1 -1
  23. package/dist/{chunk-3D4D72TA.js → chunk-EHFY3DA7.js} +1 -1
  24. package/dist/{chunk-LOOXNX5Y.js → chunk-JUVESM6V.js} +4 -4
  25. package/dist/{chunk-5N64T4FL.js → chunk-K45LL6PV.js} +2 -2
  26. package/dist/{chunk-UO5X5SXI.js → chunk-KEBVFZAX.js} +1 -1
  27. package/dist/{chunk-ONPK4QYB.js → chunk-KKILDPBV.js} +2 -2
  28. package/dist/{chunk-BUEOTCMA.js → chunk-NSID4TSV.js} +3 -3
  29. package/dist/{chunk-PVPXTCJH.js → chunk-PPTMKZPO.js} +1 -1
  30. package/dist/{chunk-PVPXTCJH.js.map → chunk-PPTMKZPO.js.map} +1 -1
  31. package/dist/{chunk-5TAP3RGJ.js → chunk-QKOT6XYY.js} +2 -2
  32. package/dist/{chunk-EASHVVK6.js → chunk-QSP2L4AM.js} +3 -3
  33. package/dist/{chunk-2GNIL5UE.js → chunk-RJK6AYKB.js} +3 -3
  34. package/dist/{chunk-YY4XF7AZ.js → chunk-S4KCBRDZ.js} +54 -43
  35. package/dist/chunk-S4KCBRDZ.js.map +7 -0
  36. package/dist/{chunk-2WZY23LE.js → chunk-ULOUEAT2.js} +22 -21
  37. package/dist/chunk-ULOUEAT2.js.map +7 -0
  38. package/dist/{chunk-TJOLXDG6.js → chunk-X6LUQUI4.js} +4 -4
  39. package/dist/{chunk-YV4PKPBH.js → chunk-XM7MBTOO.js} +2 -2
  40. package/dist/{chunk-ZTVPEF2F.js → chunk-XVZ7ZX2L.js} +1 -1
  41. package/dist/{chunk-4E4ZHEYH.js → chunk-YJWJ5DGO.js} +2 -2
  42. package/dist/{chunk-NA7ROPOY.js → chunk-ZHPKJVUT.js} +3 -3
  43. package/dist/{chunk-2WZXH6PI.js → chunk-ZQ4IZUPH.js} +3 -3
  44. package/dist/{cli-GPDT2IJU.js → cli-HMY2IU2T.js} +120 -102
  45. package/dist/cli-HMY2IU2T.js.map +7 -0
  46. package/dist/commands-AAP4MYTL.js +51 -0
  47. package/dist/{config-LWY7BZXJ.js → config-A7PN2NDW.js} +4 -4
  48. package/dist/{context-5AE67GYL.js → context-SXT7XLXT.js} +6 -6
  49. package/dist/{customCommands-7UNIEUFP.js → customCommands-KXTQJO3S.js} +4 -4
  50. package/dist/{env-EFQJVSUY.js → env-MACCQLTW.js} +2 -2
  51. package/dist/{file-VRVRLDK2.js → file-HC4EKI7Z.js} +4 -4
  52. package/dist/index.js +3 -3
  53. package/dist/{llm-6BUSXSBZ.js → llm-OTFTXTXY.js} +29 -29
  54. package/dist/{llmLazy-6WFEDUPC.js → llmLazy-PQ5HCZ4E.js} +1 -1
  55. package/dist/{loader-HQ56KK4K.js → loader-VHBERR5P.js} +4 -4
  56. package/dist/{lsp-4GTQX6SE.js → lsp-Y5UUXXVU.js} +6 -6
  57. package/dist/{lspAnchor-4IEM6SQM.js → lspAnchor-FJ2SXT5X.js} +8 -8
  58. package/dist/lspAnchor-FJ2SXT5X.js.map +7 -0
  59. package/dist/{mcp-RFRGVPYG.js → mcp-V3E2FBYM.js} +7 -7
  60. package/dist/{mentionProcessor-J4U4MFY5.js → mentionProcessor-FCHEM7NU.js} +5 -5
  61. package/dist/{messages-5JAJG44H.js → messages-UYHRONQS.js} +1 -1
  62. package/dist/{model-VR6QZCYI.js → model-YPKZ4DQ3.js} +5 -5
  63. package/dist/{openai-LUD3GHJ5.js → openai-P2TQWQKC.js} +5 -5
  64. package/dist/{outputStyles-TJM65BMJ.js → outputStyles-CSGYX64E.js} +4 -4
  65. package/dist/{pluginRuntime-OW54XVUW.js → pluginRuntime-EP4ATLRC.js} +6 -6
  66. package/dist/{pluginValidation-X2LVT22X.js → pluginValidation-3ZURFUHM.js} +6 -6
  67. package/dist/prompts-ATUILKIJ.js +53 -0
  68. package/dist/{pybAgentSessionLoad-YI2EVD6F.js → pybAgentSessionLoad-QZIINLCD.js} +4 -4
  69. package/dist/{pybAgentSessionResume-VJIKNW7O.js → pybAgentSessionResume-3XND5AZG.js} +4 -4
  70. package/dist/{pybAgentStreamJsonSession-6DZUR3ME.js → pybAgentStreamJsonSession-JQPASPNN.js} +1 -1
  71. package/dist/{pybHooks-U24NOHX7.js → pybHooks-J3KPSFJI.js} +4 -4
  72. package/dist/query-ID3RUBSI.js +55 -0
  73. package/dist/{registry-2U2WP7ZB.js → registry-HBS4R3GL.js} +5 -5
  74. package/dist/{ripgrep-EO24IKYT.js → ripgrep-IDPG6V7P.js} +3 -3
  75. package/dist/{skillMarketplace-CAGSV3Z6.js → skillMarketplace-VA7VL5D5.js} +3 -3
  76. package/dist/{state-56C2ROYY.js → state-GU2VJXIZ.js} +8 -4
  77. package/dist/{theme-DYILR2QC.js → theme-GZQWHNWP.js} +5 -5
  78. package/dist/{toolPermissionSettings-ZPBRNODI.js → toolPermissionSettings-XJ6CKWDG.js} +6 -6
  79. package/dist/tools-EVR75R24.js +52 -0
  80. package/dist/{userInput-3A7OKG4S.js → userInput-ABKKAHHH.js} +30 -30
  81. package/package.json +1 -1
  82. package/dist/REPL-3X2W4SUH.js +0 -47
  83. package/dist/chunk-2WZY23LE.js.map +0 -7
  84. package/dist/chunk-IB6KSWDZ.js.map +0 -7
  85. package/dist/chunk-L3W3K3QU.js.map +0 -7
  86. package/dist/chunk-THJLROJB.js.map +0 -7
  87. package/dist/chunk-YY4XF7AZ.js.map +0 -7
  88. package/dist/cli-GPDT2IJU.js.map +0 -7
  89. package/dist/commands-YV373ZFU.js +0 -51
  90. package/dist/lspAnchor-4IEM6SQM.js.map +0 -7
  91. package/dist/prompts-KTT5FAYF.js +0 -53
  92. package/dist/query-PSDZBJSO.js +0 -55
  93. package/dist/tools-M4GJRWEU.js +0 -52
  94. /package/dist/{REPL-3X2W4SUH.js.map → REPL-2HTMFGA5.js.map} +0 -0
  95. /package/dist/{acp-RPMY76QL.js.map → acp-2LOJ6G5I.js.map} +0 -0
  96. /package/dist/{agentsValidate-PX32PNPA.js.map → agentsValidate-JHFP6CBL.js.map} +0 -0
  97. /package/dist/{ask-P3GOQDEX.js.map → ask-7S7OPAEK.js.map} +0 -0
  98. /package/dist/{autoUpdater-R4EXAJ7P.js.map → autoUpdater-JB2N6XSK.js.map} +0 -0
  99. /package/dist/{chunk-6RKXEEHI.js.map → chunk-26DNH5MY.js.map} +0 -0
  100. /package/dist/{chunk-BB7V4QKI.js.map → chunk-3H7JCOX7.js.map} +0 -0
  101. /package/dist/{chunk-PD6OTVLV.js.map → chunk-5KZB52GW.js.map} +0 -0
  102. /package/dist/{chunk-C6ZACFHI.js.map → chunk-7SGVFJWX.js.map} +0 -0
  103. /package/dist/{chunk-37NXYZZP.js.map → chunk-AHO6SRRR.js.map} +0 -0
  104. /package/dist/{chunk-MRMEHFMO.js.map → chunk-CIUNX2UP.js.map} +0 -0
  105. /package/dist/{chunk-4YNWFMHH.js.map → chunk-DXIIHIJG.js.map} +0 -0
  106. /package/dist/{chunk-3D4D72TA.js.map → chunk-EHFY3DA7.js.map} +0 -0
  107. /package/dist/{chunk-LOOXNX5Y.js.map → chunk-JUVESM6V.js.map} +0 -0
  108. /package/dist/{chunk-5N64T4FL.js.map → chunk-K45LL6PV.js.map} +0 -0
  109. /package/dist/{chunk-UO5X5SXI.js.map → chunk-KEBVFZAX.js.map} +0 -0
  110. /package/dist/{chunk-ONPK4QYB.js.map → chunk-KKILDPBV.js.map} +0 -0
  111. /package/dist/{chunk-BUEOTCMA.js.map → chunk-NSID4TSV.js.map} +0 -0
  112. /package/dist/{chunk-5TAP3RGJ.js.map → chunk-QKOT6XYY.js.map} +0 -0
  113. /package/dist/{chunk-EASHVVK6.js.map → chunk-QSP2L4AM.js.map} +0 -0
  114. /package/dist/{chunk-2GNIL5UE.js.map → chunk-RJK6AYKB.js.map} +0 -0
  115. /package/dist/{chunk-TJOLXDG6.js.map → chunk-X6LUQUI4.js.map} +0 -0
  116. /package/dist/{chunk-YV4PKPBH.js.map → chunk-XM7MBTOO.js.map} +0 -0
  117. /package/dist/{chunk-ZTVPEF2F.js.map → chunk-XVZ7ZX2L.js.map} +0 -0
  118. /package/dist/{chunk-4E4ZHEYH.js.map → chunk-YJWJ5DGO.js.map} +0 -0
  119. /package/dist/{chunk-NA7ROPOY.js.map → chunk-ZHPKJVUT.js.map} +0 -0
  120. /package/dist/{chunk-2WZXH6PI.js.map → chunk-ZQ4IZUPH.js.map} +0 -0
  121. /package/dist/{commands-YV373ZFU.js.map → commands-AAP4MYTL.js.map} +0 -0
  122. /package/dist/{config-LWY7BZXJ.js.map → config-A7PN2NDW.js.map} +0 -0
  123. /package/dist/{context-5AE67GYL.js.map → context-SXT7XLXT.js.map} +0 -0
  124. /package/dist/{customCommands-7UNIEUFP.js.map → customCommands-KXTQJO3S.js.map} +0 -0
  125. /package/dist/{env-EFQJVSUY.js.map → env-MACCQLTW.js.map} +0 -0
  126. /package/dist/{file-VRVRLDK2.js.map → file-HC4EKI7Z.js.map} +0 -0
  127. /package/dist/{llm-6BUSXSBZ.js.map → llm-OTFTXTXY.js.map} +0 -0
  128. /package/dist/{llmLazy-6WFEDUPC.js.map → llmLazy-PQ5HCZ4E.js.map} +0 -0
  129. /package/dist/{loader-HQ56KK4K.js.map → loader-VHBERR5P.js.map} +0 -0
  130. /package/dist/{lsp-4GTQX6SE.js.map → lsp-Y5UUXXVU.js.map} +0 -0
  131. /package/dist/{mcp-RFRGVPYG.js.map → mcp-V3E2FBYM.js.map} +0 -0
  132. /package/dist/{mentionProcessor-J4U4MFY5.js.map → mentionProcessor-FCHEM7NU.js.map} +0 -0
  133. /package/dist/{messages-5JAJG44H.js.map → messages-UYHRONQS.js.map} +0 -0
  134. /package/dist/{model-VR6QZCYI.js.map → model-YPKZ4DQ3.js.map} +0 -0
  135. /package/dist/{openai-LUD3GHJ5.js.map → openai-P2TQWQKC.js.map} +0 -0
  136. /package/dist/{outputStyles-TJM65BMJ.js.map → outputStyles-CSGYX64E.js.map} +0 -0
  137. /package/dist/{pluginRuntime-OW54XVUW.js.map → pluginRuntime-EP4ATLRC.js.map} +0 -0
  138. /package/dist/{pluginValidation-X2LVT22X.js.map → pluginValidation-3ZURFUHM.js.map} +0 -0
  139. /package/dist/{prompts-KTT5FAYF.js.map → prompts-ATUILKIJ.js.map} +0 -0
  140. /package/dist/{pybAgentSessionLoad-YI2EVD6F.js.map → pybAgentSessionLoad-QZIINLCD.js.map} +0 -0
  141. /package/dist/{pybAgentSessionResume-VJIKNW7O.js.map → pybAgentSessionResume-3XND5AZG.js.map} +0 -0
  142. /package/dist/{pybAgentStreamJsonSession-6DZUR3ME.js.map → pybAgentStreamJsonSession-JQPASPNN.js.map} +0 -0
  143. /package/dist/{pybHooks-U24NOHX7.js.map → pybHooks-J3KPSFJI.js.map} +0 -0
  144. /package/dist/{query-PSDZBJSO.js.map → query-ID3RUBSI.js.map} +0 -0
  145. /package/dist/{registry-2U2WP7ZB.js.map → registry-HBS4R3GL.js.map} +0 -0
  146. /package/dist/{ripgrep-EO24IKYT.js.map → ripgrep-IDPG6V7P.js.map} +0 -0
  147. /package/dist/{skillMarketplace-CAGSV3Z6.js.map → skillMarketplace-VA7VL5D5.js.map} +0 -0
  148. /package/dist/{state-56C2ROYY.js.map → state-GU2VJXIZ.js.map} +0 -0
  149. /package/dist/{theme-DYILR2QC.js.map → theme-GZQWHNWP.js.map} +0 -0
  150. /package/dist/{toolPermissionSettings-ZPBRNODI.js.map → toolPermissionSettings-XJ6CKWDG.js.map} +0 -0
  151. /package/dist/{tools-M4GJRWEU.js.map → tools-EVR75R24.js.map} +0 -0
  152. /package/dist/{userInput-3A7OKG4S.js.map → userInput-ABKKAHHH.js.map} +0 -0
@@ -4,16 +4,17 @@ import {
4
4
  LspServerRegistry,
5
5
  findNearestRoot,
6
6
  getInstallNotices
7
- } from "./chunk-IB6KSWDZ.js";
7
+ } from "./chunk-AHK3NVAX.js";
8
8
  import {
9
9
  levenshtein
10
10
  } from "./chunk-UZ34JEUK.js";
11
11
  import {
12
12
  debug
13
- } from "./chunk-3D4D72TA.js";
13
+ } from "./chunk-EHFY3DA7.js";
14
14
  import {
15
- getCwd
16
- } from "./chunk-THJLROJB.js";
15
+ getCwd,
16
+ getSessionRoot
17
+ } from "./chunk-CDKFT2GF.js";
17
18
 
18
19
  // src/lsp/index.ts
19
20
  import { extname as extname2 } from "path";
@@ -529,9 +530,9 @@ var LspClientManager = class _LspClientManager {
529
530
  if (serverInfo) {
530
531
  return this.resolveRootForServer(filePath, serverInfo);
531
532
  }
532
- const cwd = getCwd();
533
- if (filePath.startsWith(cwd)) {
534
- return cwd;
533
+ const sessionRoot = getSessionRoot();
534
+ if (filePath.startsWith(sessionRoot)) {
535
+ return sessionRoot;
535
536
  }
536
537
  return dirname(filePath);
537
538
  }
@@ -564,7 +565,7 @@ var LspClientManager = class _LspClientManager {
564
565
  const safeCwd = /[^\x00-\x7F]/.test(resolvedRoot) ? process.cwd() : resolvedRoot;
565
566
  let initOpts = serverInfo.initializationOptions;
566
567
  if (serverInfo.id === "pyright" || serverInfo.id === "ty") {
567
- const { detectPythonVenv } = await import("./registry-2U2WP7ZB.js");
568
+ const { detectPythonVenv } = await import("./registry-HBS4R3GL.js");
568
569
  const pythonPath = detectPythonVenv(resolvedRoot);
569
570
  if (pythonPath) {
570
571
  initOpts = { ...initOpts ?? {}, pythonPath };
@@ -604,7 +605,7 @@ var LspClientManager = class _LspClientManager {
604
605
  this.qualitySamples.clear();
605
606
  this.fileVersions.clear();
606
607
  }
607
- async workspaceSymbol(query, rootPath = getCwd(), options) {
608
+ async workspaceSymbol(query, rootPath = getSessionRoot(), options) {
608
609
  await this.maybeEnsureWorkspaceClients(rootPath);
609
610
  if (this.clients.size === 0) {
610
611
  await this.ensureWorkspaceClients(rootPath);
@@ -731,7 +732,7 @@ var LspClientManager = class _LspClientManager {
731
732
  }
732
733
  return filtered;
733
734
  }
734
- async documentSymbol(filePath, rootPath = getCwd()) {
735
+ async documentSymbol(filePath, rootPath = getSessionRoot()) {
735
736
  try {
736
737
  const touched = await this.touchFile(filePath, rootPath, {
737
738
  wait: true,
@@ -751,14 +752,14 @@ var LspClientManager = class _LspClientManager {
751
752
  return null;
752
753
  }
753
754
  }
754
- async getDiagnostics(filePath, rootPath = getCwd()) {
755
+ async getDiagnostics(filePath, rootPath = getSessionRoot()) {
755
756
  const client = await this.getClient(filePath, rootPath);
756
757
  if (!client) {
757
758
  return [];
758
759
  }
759
760
  return client.getDiagnostics(filePath);
760
761
  }
761
- async getAllDiagnostics(filePath, rootPath = getCwd()) {
762
+ async getAllDiagnostics(filePath, rootPath = getSessionRoot()) {
762
763
  const servers = LspServerRegistry.getInstance().getServersForExtension(extname(filePath));
763
764
  debug.info("LSP_DIAGNOSTICS", {
764
765
  action: "multi-server",
@@ -957,8 +958,8 @@ var LspClientManager = class _LspClientManager {
957
958
  };
958
959
  }
959
960
  // New helper to expose waitForReadiness to clients who only have a manager
960
- async waitForReadiness(filePath, rootPath = getCwd(), timeoutMs = 2e3) {
961
- const client = await this.getClientForFile(filePath);
961
+ async waitForReadiness(filePath, rootPath = getSessionRoot(), timeoutMs = 2e3) {
962
+ const client = await this.getClient(filePath, rootPath);
962
963
  if (client) {
963
964
  const ready = await client.waitForReadiness(filePath, timeoutMs);
964
965
  if (ready) {
@@ -981,7 +982,7 @@ var LspClientManager = class _LspClientManager {
981
982
  const serverKey = client.serverKey ?? client.serverId ?? "unknown";
982
983
  return `${serverKey}::${filePath}`;
983
984
  }
984
- async touchFile(filePath, rootPath = getCwd(), options) {
985
+ async touchFile(filePath, rootPath = getSessionRoot(), options) {
985
986
  const client = await this.getClient(filePath, rootPath);
986
987
  if (!client) {
987
988
  return false;
@@ -1012,7 +1013,7 @@ var LspClientManager = class _LspClientManager {
1012
1013
  matchesServerFilters(filePath, serverInfo) {
1013
1014
  const normalizePath = (value) => value.replace(/\\/g, "/");
1014
1015
  const normalizedFile = normalizePath(filePath);
1015
- const relativeToCwd = normalizePath(relative(getCwd(), filePath));
1016
+ const relativeToCwd = normalizePath(relative(getSessionRoot(), filePath));
1016
1017
  const matches = (patterns) => patterns.some((pattern) => {
1017
1018
  if (minimatch(normalizedFile, pattern, { dot: true })) return true;
1018
1019
  if (relativeToCwd && !relativeToCwd.startsWith("..")) {
@@ -1025,7 +1026,7 @@ var LspClientManager = class _LspClientManager {
1025
1026
  return true;
1026
1027
  }
1027
1028
  async resolveRootForServer(filePath, serverInfo) {
1028
- const cwd = getCwd();
1029
+ const sessionRoot = getSessionRoot();
1029
1030
  let defaultRoot;
1030
1031
  if (serverInfo.rootMarkers.length > 0) {
1031
1032
  defaultRoot = await findNearestRoot(dirname(filePath), serverInfo.rootMarkers, {
@@ -1036,7 +1037,7 @@ var LspClientManager = class _LspClientManager {
1036
1037
  });
1037
1038
  }
1038
1039
  if (!defaultRoot) {
1039
- defaultRoot = filePath.startsWith(cwd) ? cwd : dirname(filePath);
1040
+ defaultRoot = filePath.startsWith(sessionRoot) ? sessionRoot : dirname(filePath);
1040
1041
  }
1041
1042
  if (serverInfo.resolveRoot) {
1042
1043
  const resolved = await serverInfo.resolveRoot(filePath, defaultRoot);
@@ -3039,7 +3040,7 @@ function serveStatusWithProvider(statusProvider, options) {
3039
3040
  }
3040
3041
  var LspAPI = {
3041
3042
  async run(input) {
3042
- const rootPath = input.rootPath ?? getCwd();
3043
+ const rootPath = input.rootPath ?? getSessionRoot();
3043
3044
  const manager = LspClientManager.getInstance();
3044
3045
  const client = await manager.getClient(
3045
3046
  input.filePath,
@@ -3422,7 +3423,7 @@ var LspAPI = {
3422
3423
  return Promise.all(inputs.map((input) => this.run(input)));
3423
3424
  },
3424
3425
  async touchFile(filePath, options = {}) {
3425
- const rootPath = options.rootPath ?? getCwd();
3426
+ const rootPath = options.rootPath ?? getSessionRoot();
3426
3427
  clearDiagnosticsCache(filePath, rootPath);
3427
3428
  return LspClientManager.getInstance().touchFile(filePath, rootPath, {
3428
3429
  wait: options.wait,
@@ -3430,7 +3431,7 @@ var LspAPI = {
3430
3431
  });
3431
3432
  },
3432
3433
  async diagnostics(filePath, rootPath) {
3433
- const resolvedRoot = rootPath ?? getCwd();
3434
+ const resolvedRoot = rootPath ?? getSessionRoot();
3434
3435
  const ttlMs = resolveDiagnosticsTtlMs();
3435
3436
  if (ttlMs > 0) {
3436
3437
  const key = buildDiagnosticsCacheKey(filePath, resolvedRoot);
@@ -3460,7 +3461,7 @@ var LspAPI = {
3460
3461
  },
3461
3462
  async documentSymbolRaw(filePath, rootPath) {
3462
3463
  const manager = LspClientManager.getInstance();
3463
- const resolvedRoot = rootPath ?? getCwd();
3464
+ const resolvedRoot = rootPath ?? getSessionRoot();
3464
3465
  const managerDocumentSymbol = manager.documentSymbol;
3465
3466
  if (typeof managerDocumentSymbol === "function") {
3466
3467
  return managerDocumentSymbol.call(manager, filePath, resolvedRoot);
@@ -3479,7 +3480,7 @@ var LspAPI = {
3479
3480
  async findReferencesRaw(filePath, line, character, rootPath) {
3480
3481
  const client = await LspClientManager.getInstance().getClient(
3481
3482
  filePath,
3482
- rootPath ?? getCwd()
3483
+ rootPath ?? getSessionRoot()
3483
3484
  );
3484
3485
  if (!client) return null;
3485
3486
  return await client.findReferences(filePath, line, character);
@@ -3489,7 +3490,7 @@ var LspAPI = {
3489
3490
  const { rootPath, ...rest } = options ?? {};
3490
3491
  return LspClientManager.getInstance().workspaceSymbol(
3491
3492
  query,
3492
- rootPath ?? getCwd(),
3493
+ rootPath ?? getSessionRoot(),
3493
3494
  rest
3494
3495
  );
3495
3496
  },
@@ -3502,7 +3503,7 @@ var LspAPI = {
3502
3503
  };
3503
3504
  var LspFacade = {
3504
3505
  async run(input) {
3505
- const rootPath = input.rootPath ?? getCwd();
3506
+ const rootPath = input.rootPath ?? getSessionRoot();
3506
3507
  if (input.operation === "documentSymbol") {
3507
3508
  const flag = String(process.env.PYB_LSP_STRICT_FIRST ?? "").trim().toLowerCase();
3508
3509
  const lspFirst = flag === "" ? true : !(flag === "0" || flag === "false" || flag === "off" || flag === "no");
@@ -3857,7 +3858,7 @@ var LspFacade = {
3857
3858
  return LspAPI.diagnosticsPretty(filePath, options);
3858
3859
  },
3859
3860
  async checkFileReferences(filePath) {
3860
- const rootPath = getCwd();
3861
+ const rootPath = getSessionRoot();
3861
3862
  const fileUri = LspAPI.normalizeUri(filePath);
3862
3863
  const symbols = await LspAPI.documentSymbolRaw(filePath, rootPath);
3863
3864
  if (symbols === null) {