nexus-agents 2.79.4 → 2.80.0

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 (118) hide show
  1. package/dist/{child-mcp-config-DFRYTRBK.js → child-mcp-config-SM5I7USN.js} +3 -3
  2. package/dist/{chunk-NVSJXN4S.js → chunk-2DBPZQLO.js} +8 -5
  3. package/dist/chunk-2DBPZQLO.js.map +1 -0
  4. package/dist/chunk-2JQXC3CK.js +317 -0
  5. package/dist/chunk-2JQXC3CK.js.map +1 -0
  6. package/dist/{chunk-JMRCMMZ5.js → chunk-4XGKCVJL.js} +2 -2
  7. package/dist/{chunk-DW3UTO43.js → chunk-6CJIKX6I.js} +16 -14
  8. package/dist/chunk-6CJIKX6I.js.map +1 -0
  9. package/dist/{chunk-45NUO4FE.js → chunk-AYZ6P7CK.js} +2 -2
  10. package/dist/{chunk-UNRTM43V.js → chunk-BSIGP5XF.js} +2 -2
  11. package/dist/{chunk-LFTK5ZQG.js → chunk-CTSESEFA.js} +2 -2
  12. package/dist/{chunk-UWDVEMYZ.js → chunk-EKRMWVAH.js} +4 -4
  13. package/dist/{chunk-IPDUZJPH.js → chunk-EVZ7YR7H.js} +4 -4
  14. package/dist/{chunk-OGV7J5WG.js → chunk-FAJAWO42.js} +3 -3
  15. package/dist/{chunk-UNFS6YBY.js → chunk-FJHZW7CR.js} +2 -2
  16. package/dist/{chunk-3ENBGGYA.js → chunk-GNRANMQ3.js} +44 -37
  17. package/dist/chunk-GNRANMQ3.js.map +1 -0
  18. package/dist/{chunk-42MM7GKW.js → chunk-HBKZ2DJK.js} +2 -2
  19. package/dist/{chunk-ACP4YARI.js → chunk-J5XEJHIQ.js} +3 -3
  20. package/dist/{chunk-PAKVXGS2.js → chunk-JLWKHYIU.js} +2 -2
  21. package/dist/{chunk-NJPFN75N.js → chunk-JXDDSNEK.js} +2 -2
  22. package/dist/{chunk-NXNNT5XW.js → chunk-OO6MTUDS.js} +4 -4
  23. package/dist/{chunk-OFRDE7MK.js → chunk-Q2U6SFN2.js} +2 -2
  24. package/dist/{chunk-BXI6DKBU.js → chunk-QVHXEQFM.js} +3 -3
  25. package/dist/{chunk-TN5ZKSGC.js → chunk-RIUUFBX4.js} +2 -2
  26. package/dist/{chunk-PDCLBWH5.js → chunk-SHVGZK4A.js} +4 -4
  27. package/dist/{chunk-UOR2JWFH.js → chunk-SJUSQGKH.js} +82 -57
  28. package/dist/chunk-SJUSQGKH.js.map +1 -0
  29. package/dist/{chunk-SU3Y6LU2.js → chunk-UGXR4PAY.js} +32 -6
  30. package/dist/chunk-UGXR4PAY.js.map +1 -0
  31. package/dist/{chunk-BSQ4KTY4.js → chunk-UVALD724.js} +2 -2
  32. package/dist/{chunk-PHBRELUK.js → chunk-VS4KB3AX.js} +7 -7
  33. package/dist/{chunk-DOI7RE3X.js → chunk-YGKPWUJ6.js} +2 -2
  34. package/dist/{chunk-UQOSVOEU.js → chunk-YMT6H2HQ.js} +11 -13
  35. package/dist/chunk-YMT6H2HQ.js.map +1 -0
  36. package/dist/{chunk-BIH2CBC5.js → chunk-ZU2Q3DWE.js} +8 -6
  37. package/dist/{chunk-BIH2CBC5.js.map → chunk-ZU2Q3DWE.js.map} +1 -1
  38. package/dist/{cli-circuit-breaker-T75HOLZK.js → cli-circuit-breaker-JGX54DAD.js} +5 -5
  39. package/dist/cli.d.ts +1 -1
  40. package/dist/cli.js +561 -519
  41. package/dist/cli.js.map +1 -1
  42. package/dist/{composite-router-OPSK5FCQ.js → composite-router-UYFYSMBT.js} +3 -3
  43. package/dist/{consensus-vote-CYUPIJXR.js → consensus-vote-BZ6JSN67.js} +12 -12
  44. package/dist/{context-retriever-6AWHCHRP.js → context-retriever-G23VVJ5S.js} +6 -6
  45. package/dist/{doctor-deep-XBPRQ6ZP.js → doctor-deep-OF2LXZ6A.js} +4 -4
  46. package/dist/expert-bridge-6ZLD2NWD.js +11 -0
  47. package/dist/{factory-Y3TMP4OQ.js → factory-I54TX7OY.js} +5 -5
  48. package/dist/factory-UHDCLEUE.js +14 -0
  49. package/dist/index.d.ts +7 -5
  50. package/dist/index.js +25 -25
  51. package/dist/{init-opencode-RV6IQEMS.js → init-opencode-FE7HVWQL.js} +6 -6
  52. package/dist/issue-triage-7NR5NQUY.js +15 -0
  53. package/dist/{learning-persistence-Q3HTOGTU.js → learning-persistence-TGOBRUUU.js} +2 -2
  54. package/dist/{registry-command-6KJWW3W7.js → registry-command-NZLX7ZFV.js} +3 -3
  55. package/dist/{repo-security-plan-HNLMF7J7.js → repo-security-plan-74GJWJSV.js} +4 -4
  56. package/dist/{research-helpers-synthesize-77TLYSW4.js → research-helpers-synthesize-LFPEXRIV.js} +4 -4
  57. package/dist/{routing-memory-6DV6ZPAH.js → routing-memory-Y2LSEQVS.js} +3 -3
  58. package/dist/{session-memory-XZ3NJIR4.js → session-memory-RCNQJDJR.js} +4 -4
  59. package/dist/{setup-command-QOXG36UV.js → setup-command-ZPLPOJF2.js} +13 -11
  60. package/dist/setup-config-F7VRWXY3.js +10 -0
  61. package/dist/{setup-custom-api-PJ6TGHJH.js → setup-custom-api-XTJ6YZM6.js} +5 -5
  62. package/dist/{tool-memory-K2QPTPKV.js → tool-memory-COZK6SR7.js} +5 -5
  63. package/dist/{weather-report-ZB4AKOIA.js → weather-report-O4XOYGPK.js} +3 -3
  64. package/package.json +1 -1
  65. package/dist/chunk-3ENBGGYA.js.map +0 -1
  66. package/dist/chunk-7BMOZJYS.js +0 -83
  67. package/dist/chunk-7BMOZJYS.js.map +0 -1
  68. package/dist/chunk-DW3UTO43.js.map +0 -1
  69. package/dist/chunk-NVSJXN4S.js.map +0 -1
  70. package/dist/chunk-SU3Y6LU2.js.map +0 -1
  71. package/dist/chunk-UOR2JWFH.js.map +0 -1
  72. package/dist/chunk-UQOSVOEU.js.map +0 -1
  73. package/dist/expert-bridge-5YOPK5IT.js +0 -11
  74. package/dist/factory-DN7SJZ5Z.js +0 -14
  75. package/dist/issue-triage-UTWKXLKC.js +0 -15
  76. package/dist/setup-config-B4V4QHDP.js +0 -10
  77. /package/dist/{child-mcp-config-DFRYTRBK.js.map → child-mcp-config-SM5I7USN.js.map} +0 -0
  78. /package/dist/{chunk-JMRCMMZ5.js.map → chunk-4XGKCVJL.js.map} +0 -0
  79. /package/dist/{chunk-45NUO4FE.js.map → chunk-AYZ6P7CK.js.map} +0 -0
  80. /package/dist/{chunk-UNRTM43V.js.map → chunk-BSIGP5XF.js.map} +0 -0
  81. /package/dist/{chunk-LFTK5ZQG.js.map → chunk-CTSESEFA.js.map} +0 -0
  82. /package/dist/{chunk-UWDVEMYZ.js.map → chunk-EKRMWVAH.js.map} +0 -0
  83. /package/dist/{chunk-IPDUZJPH.js.map → chunk-EVZ7YR7H.js.map} +0 -0
  84. /package/dist/{chunk-OGV7J5WG.js.map → chunk-FAJAWO42.js.map} +0 -0
  85. /package/dist/{chunk-UNFS6YBY.js.map → chunk-FJHZW7CR.js.map} +0 -0
  86. /package/dist/{chunk-42MM7GKW.js.map → chunk-HBKZ2DJK.js.map} +0 -0
  87. /package/dist/{chunk-ACP4YARI.js.map → chunk-J5XEJHIQ.js.map} +0 -0
  88. /package/dist/{chunk-PAKVXGS2.js.map → chunk-JLWKHYIU.js.map} +0 -0
  89. /package/dist/{chunk-NJPFN75N.js.map → chunk-JXDDSNEK.js.map} +0 -0
  90. /package/dist/{chunk-NXNNT5XW.js.map → chunk-OO6MTUDS.js.map} +0 -0
  91. /package/dist/{chunk-OFRDE7MK.js.map → chunk-Q2U6SFN2.js.map} +0 -0
  92. /package/dist/{chunk-BXI6DKBU.js.map → chunk-QVHXEQFM.js.map} +0 -0
  93. /package/dist/{chunk-TN5ZKSGC.js.map → chunk-RIUUFBX4.js.map} +0 -0
  94. /package/dist/{chunk-PDCLBWH5.js.map → chunk-SHVGZK4A.js.map} +0 -0
  95. /package/dist/{chunk-BSQ4KTY4.js.map → chunk-UVALD724.js.map} +0 -0
  96. /package/dist/{chunk-PHBRELUK.js.map → chunk-VS4KB3AX.js.map} +0 -0
  97. /package/dist/{chunk-DOI7RE3X.js.map → chunk-YGKPWUJ6.js.map} +0 -0
  98. /package/dist/{cli-circuit-breaker-T75HOLZK.js.map → cli-circuit-breaker-JGX54DAD.js.map} +0 -0
  99. /package/dist/{composite-router-OPSK5FCQ.js.map → composite-router-UYFYSMBT.js.map} +0 -0
  100. /package/dist/{consensus-vote-CYUPIJXR.js.map → consensus-vote-BZ6JSN67.js.map} +0 -0
  101. /package/dist/{context-retriever-6AWHCHRP.js.map → context-retriever-G23VVJ5S.js.map} +0 -0
  102. /package/dist/{doctor-deep-XBPRQ6ZP.js.map → doctor-deep-OF2LXZ6A.js.map} +0 -0
  103. /package/dist/{expert-bridge-5YOPK5IT.js.map → expert-bridge-6ZLD2NWD.js.map} +0 -0
  104. /package/dist/{factory-DN7SJZ5Z.js.map → factory-I54TX7OY.js.map} +0 -0
  105. /package/dist/{factory-Y3TMP4OQ.js.map → factory-UHDCLEUE.js.map} +0 -0
  106. /package/dist/{init-opencode-RV6IQEMS.js.map → init-opencode-FE7HVWQL.js.map} +0 -0
  107. /package/dist/{issue-triage-UTWKXLKC.js.map → issue-triage-7NR5NQUY.js.map} +0 -0
  108. /package/dist/{learning-persistence-Q3HTOGTU.js.map → learning-persistence-TGOBRUUU.js.map} +0 -0
  109. /package/dist/{registry-command-6KJWW3W7.js.map → registry-command-NZLX7ZFV.js.map} +0 -0
  110. /package/dist/{repo-security-plan-HNLMF7J7.js.map → repo-security-plan-74GJWJSV.js.map} +0 -0
  111. /package/dist/{research-helpers-synthesize-77TLYSW4.js.map → research-helpers-synthesize-LFPEXRIV.js.map} +0 -0
  112. /package/dist/{routing-memory-6DV6ZPAH.js.map → routing-memory-Y2LSEQVS.js.map} +0 -0
  113. /package/dist/{session-memory-XZ3NJIR4.js.map → session-memory-RCNQJDJR.js.map} +0 -0
  114. /package/dist/{setup-command-QOXG36UV.js.map → setup-command-ZPLPOJF2.js.map} +0 -0
  115. /package/dist/{setup-config-B4V4QHDP.js.map → setup-config-F7VRWXY3.js.map} +0 -0
  116. /package/dist/{setup-custom-api-PJ6TGHJH.js.map → setup-custom-api-XTJ6YZM6.js.map} +0 -0
  117. /package/dist/{tool-memory-K2QPTPKV.js.map → tool-memory-COZK6SR7.js.map} +0 -0
  118. /package/dist/{weather-report-ZB4AKOIA.js.map → weather-report-O4XOYGPK.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createLogger
3
- } from "./chunk-UQOSVOEU.js";
3
+ } from "./chunk-YMT6H2HQ.js";
4
4
 
5
5
  // src/config/available-models-cache.ts
6
6
  var logger = createLogger({ component: "available-models-cache" });
@@ -150,4 +150,4 @@ export {
150
150
  getDefaultAvailableModelsCache,
151
151
  setDefaultAvailableModelsCache
152
152
  };
153
- //# sourceMappingURL=chunk-42MM7GKW.js.map
153
+ //# sourceMappingURL=chunk-HBKZ2DJK.js.map
@@ -2,14 +2,14 @@ import {
2
2
  CircuitBreakerRegistry,
3
3
  CircuitError,
4
4
  mapCliErrorToCategory
5
- } from "./chunk-NJPFN75N.js";
5
+ } from "./chunk-JXDDSNEK.js";
6
6
  import {
7
7
  createLogger,
8
8
  err,
9
9
  getFallbackChainForCategory,
10
10
  getTimeProvider,
11
11
  ok
12
- } from "./chunk-UQOSVOEU.js";
12
+ } from "./chunk-YMT6H2HQ.js";
13
13
 
14
14
  // src/cli-adapters/cli-circuit-breaker.ts
15
15
  var CATEGORY_TO_FALLBACK = {
@@ -152,4 +152,4 @@ export {
152
152
  CliCircuitBreakerIntegration,
153
153
  createCliCircuitBreakerIntegration
154
154
  };
155
- //# sourceMappingURL=chunk-ACP4YARI.js.map
155
+ //# sourceMappingURL=chunk-J5XEJHIQ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  ConfigError,
3
3
  err,
4
4
  ok
5
- } from "./chunk-UQOSVOEU.js";
5
+ } from "./chunk-YMT6H2HQ.js";
6
6
 
7
7
  // src/adapters/sdk/types.ts
8
8
  var PROVIDER_ENV_KEYS = {
@@ -117,4 +117,4 @@ export {
117
117
  CUSTOM_API_ALLOW_PRIVATE_ENV,
118
118
  validateCustomApiBaseUrl
119
119
  };
120
- //# sourceMappingURL=chunk-PAKVXGS2.js.map
120
+ //# sourceMappingURL=chunk-JLWKHYIU.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getErrorMessage,
6
6
  getTimeProvider,
7
7
  ok
8
- } from "./chunk-UQOSVOEU.js";
8
+ } from "./chunk-YMT6H2HQ.js";
9
9
 
10
10
  // src/cli-adapters/circuit-breaker-types.ts
11
11
  var CircuitErrorCode = {
@@ -353,4 +353,4 @@ export {
353
353
  CircuitBreakerRegistry,
354
354
  mapCliErrorToCategory
355
355
  };
356
- //# sourceMappingURL=chunk-NJPFN75N.js.map
356
+ //# sourceMappingURL=chunk-JXDDSNEK.js.map
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-PQHVC4BD.js";
9
9
  import {
10
10
  SessionMemory
11
- } from "./chunk-45NUO4FE.js";
11
+ } from "./chunk-AYZ6P7CK.js";
12
12
  import {
13
13
  ErrorCode,
14
14
  NexusError,
@@ -22,10 +22,10 @@ import {
22
22
  getTimeProvider,
23
23
  ok,
24
24
  setSharedMobiMemDbPathResolver
25
- } from "./chunk-UQOSVOEU.js";
25
+ } from "./chunk-YMT6H2HQ.js";
26
26
  import {
27
27
  nexusDataPath
28
- } from "./chunk-7BMOZJYS.js";
28
+ } from "./chunk-2JQXC3CK.js";
29
29
 
30
30
  // src/mcp/tools/tool-memory.ts
31
31
  import * as fs3 from "fs";
@@ -5578,4 +5578,4 @@ export {
5578
5578
  reinitializeMemoryBackends,
5579
5579
  ToolMemoryManager
5580
5580
  };
5581
- //# sourceMappingURL=chunk-NXNNT5XW.js.map
5581
+ //# sourceMappingURL=chunk-OO6MTUDS.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_MODEL_PER_CLI,
3
3
  getTimeProvider
4
- } from "./chunk-UQOSVOEU.js";
4
+ } from "./chunk-YMT6H2HQ.js";
5
5
 
6
6
  // src/config/model-availability.ts
7
7
  var DEFAULT_TTL_MS = 6e4;
@@ -133,4 +133,4 @@ export {
133
133
  resetAvailabilityCache,
134
134
  filterAvailableModels
135
135
  };
136
- //# sourceMappingURL=chunk-OFRDE7MK.js.map
136
+ //# sourceMappingURL=chunk-Q2U6SFN2.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-BSQ4KTY4.js";
4
+ } from "./chunk-UVALD724.js";
5
5
  import {
6
6
  CACHE_TIMEOUTS,
7
7
  createLogger,
8
8
  err,
9
9
  getTimeProvider,
10
10
  ok
11
- } from "./chunk-UQOSVOEU.js";
11
+ } from "./chunk-YMT6H2HQ.js";
12
12
 
13
13
  // src/security/trust-types.ts
14
14
  import { z } from "zod";
@@ -1656,4 +1656,4 @@ export {
1656
1656
  IssueTriage,
1657
1657
  createIssueTriage
1658
1658
  };
1659
- //# sourceMappingURL=chunk-BXI6DKBU.js.map
1659
+ //# sourceMappingURL=chunk-QVHXEQFM.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider
7
- } from "./chunk-UQOSVOEU.js";
7
+ } from "./chunk-YMT6H2HQ.js";
8
8
 
9
9
  // src/mcp/tools/scanner-registry-fetcher.ts
10
10
  import { z } from "zod";
@@ -721,4 +721,4 @@ export {
721
721
  generateSecurityPlan,
722
722
  buildPlanFromAnalysis
723
723
  };
724
- //# sourceMappingURL=chunk-TN5ZKSGC.js.map
724
+ //# sourceMappingURL=chunk-RIUUFBX4.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getToolMemory
3
- } from "./chunk-NXNNT5XW.js";
3
+ } from "./chunk-OO6MTUDS.js";
4
4
  import {
5
5
  CLI_NAMES,
6
6
  StrategyDistiller,
7
7
  createLogger,
8
8
  getOutcomeStore,
9
9
  registerPersistentDistillerFactory
10
- } from "./chunk-UQOSVOEU.js";
10
+ } from "./chunk-YMT6H2HQ.js";
11
11
  import {
12
12
  ensureLearningDir,
13
13
  getRulesFile
14
- } from "./chunk-7BMOZJYS.js";
14
+ } from "./chunk-2JQXC3CK.js";
15
15
 
16
16
  // src/learning/strategy-distiller-persistence.ts
17
17
  import { writeFileSync, readFileSync, renameSync, unlinkSync, existsSync } from "fs";
@@ -273,4 +273,4 @@ export {
273
273
  inferTaskCategory,
274
274
  summarizeContextForPrompt
275
275
  };
276
- //# sourceMappingURL=chunk-PDCLBWH5.js.map
276
+ //# sourceMappingURL=chunk-SHVGZK4A.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULTS
3
- } from "./chunk-UNRTM43V.js";
3
+ } from "./chunk-BSIGP5XF.js";
4
4
  import {
5
5
  resolveInsideRoot
6
6
  } from "./chunk-NUBSJGQZ.js";
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  createAllAdapters,
12
12
  probeCli
13
- } from "./chunk-BIH2CBC5.js";
13
+ } from "./chunk-ZU2Q3DWE.js";
14
14
  import {
15
15
  CliNameSchema,
16
16
  DEFAULT_CAPABILITIES,
@@ -26,18 +26,21 @@ import {
26
26
  ok,
27
27
  symbols,
28
28
  writeLine
29
- } from "./chunk-UQOSVOEU.js";
29
+ } from "./chunk-YMT6H2HQ.js";
30
30
  import {
31
31
  detectSandbox,
32
32
  getLearningDir,
33
33
  getNexusDataDir,
34
+ getNexusRepoDir,
34
35
  getOutcomesFile,
36
+ getPerRepoSubdirs,
35
37
  getRulesFile,
36
- isPersistenceEnabled
37
- } from "./chunk-7BMOZJYS.js";
38
+ isPersistenceEnabled,
39
+ nexusDataPath
40
+ } from "./chunk-2JQXC3CK.js";
38
41
 
39
42
  // src/version.ts
40
- var VERSION = true ? "2.79.4" : "dev";
43
+ var VERSION = true ? "2.80.0" : "dev";
41
44
 
42
45
  // src/config/schemas-core.ts
43
46
  import { z } from "zod";
@@ -1006,6 +1009,12 @@ import { resolve, join } from "path";
1006
1009
  import * as yaml from "yaml";
1007
1010
  var DEFAULT_CONFIG_FILE = "nexus-agents.yaml";
1008
1011
  var ALTERNATE_CONFIG_FILE = "nexus-agents.yml";
1012
+ var CONFIG_LOOKUP_PATHS = [
1013
+ `.nexus-agents/${DEFAULT_CONFIG_FILE}`,
1014
+ `.nexus-agents/${ALTERNATE_CONFIG_FILE}`,
1015
+ DEFAULT_CONFIG_FILE,
1016
+ ALTERNATE_CONFIG_FILE
1017
+ ];
1009
1018
  var ConfigLoadError = class extends Error {
1010
1019
  code;
1011
1020
  constructor(message, code, cause) {
@@ -1034,13 +1043,11 @@ function findConfigPath(cwd) {
1034
1043
  return validation.value;
1035
1044
  }
1036
1045
  }
1037
- const yamlPath = resolve(cwd, DEFAULT_CONFIG_FILE);
1038
- if (existsSync(yamlPath)) {
1039
- return yamlPath;
1040
- }
1041
- const ymlPath = resolve(cwd, ALTERNATE_CONFIG_FILE);
1042
- if (existsSync(ymlPath)) {
1043
- return ymlPath;
1046
+ for (const rel of CONFIG_LOOKUP_PATHS) {
1047
+ const abs = resolve(cwd, rel);
1048
+ if (existsSync(abs)) {
1049
+ return abs;
1050
+ }
1044
1051
  }
1045
1052
  const globalDir = getNexusDataDir();
1046
1053
  const globalYamlPath = join(globalDir, DEFAULT_CONFIG_FILE);
@@ -1174,7 +1181,6 @@ function getConfig(options) {
1174
1181
 
1175
1182
  // src/cli/setup-data-dir.ts
1176
1183
  import { mkdirSync, existsSync as existsSync4 } from "fs";
1177
- import { join as join4 } from "path";
1178
1184
 
1179
1185
  // src/cli/doctor.ts
1180
1186
  import {
@@ -1184,7 +1190,6 @@ import {
1184
1190
  accessSync,
1185
1191
  constants as fsConstants
1186
1192
  } from "fs";
1187
- import { join as join3 } from "path";
1188
1193
 
1189
1194
  // src/mcp/server.ts
1190
1195
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -1529,34 +1534,36 @@ function printSqliteCheck(check) {
1529
1534
  writeLine(` ${colors.dim}Fix: npm install -g better-sqlite3${colors.reset}`);
1530
1535
  }
1531
1536
  }
1537
+ function printDataDirGroup(label, rootHint, subdirs) {
1538
+ if (subdirs.length === 0) return;
1539
+ const existCount = subdirs.filter((d) => d.exists).length;
1540
+ writeLine(
1541
+ ` ${colors.dim}${label} \u2014 ${rootHint} (${String(existCount)}/${String(subdirs.length)})${colors.reset}`
1542
+ );
1543
+ for (const dir of subdirs) {
1544
+ let marker;
1545
+ if (!dir.exists) marker = `${colors.dim}\xB7${colors.reset}`;
1546
+ else if (!dir.writable) marker = `${colors.yellow}!${colors.reset}`;
1547
+ else marker = `${colors.green}\u2713${colors.reset}`;
1548
+ const note = !dir.exists ? ` ${colors.dim}(missing \u2014 created on first use)${colors.reset}` : !dir.writable ? ` ${colors.yellow}(not writable)${colors.reset}` : "";
1549
+ writeLine(` ${marker} ${dir.name} ${colors.dim}${dir.path}${colors.reset}${note}`);
1550
+ }
1551
+ }
1532
1552
  function printDataDirectory(check) {
1533
- if (check.rootExists) {
1534
- const existCount = check.subdirectories.filter((d) => d.exists).length;
1535
- const totalCount = check.subdirectories.length;
1536
- const allExist = existCount === totalCount;
1537
- const allWritable = check.subdirectories.every((d) => !d.exists || d.writable);
1538
- const healthy = allExist && allWritable;
1539
- writeLine(
1540
- `${formatStatus(healthy, !healthy)} Data directory: ${check.rootPath} (${String(existCount)}/${String(totalCount)} subdirs)`
1541
- );
1542
- if (!allExist) {
1543
- const missing = check.subdirectories.filter((d) => !d.exists);
1544
- for (const dir of missing) {
1545
- writeLine(` ${colors.dim}Missing: ${dir.name}/${colors.reset}`);
1546
- }
1547
- writeLine(` ${colors.dim}Fix: nexus-agents setup${colors.reset}`);
1548
- }
1549
- if (!allWritable) {
1550
- const readonly_ = check.subdirectories.filter((d) => d.exists && !d.writable);
1551
- for (const dir of readonly_) {
1552
- writeLine(` ${colors.yellow}Not writable: ${dir.name}/${colors.reset}`);
1553
- }
1554
- }
1553
+ const allExist = check.subdirectories.every((d) => d.exists);
1554
+ const allWritable = check.subdirectories.every((d) => !d.exists || d.writable);
1555
+ const healthy = check.rootExists && allWritable;
1556
+ writeLine(`${formatStatus(healthy, !healthy)} Data directory layout:`);
1557
+ const perRepo = check.subdirectories.filter((d) => d.scope === "per-repo");
1558
+ const crossRepo = check.subdirectories.filter((d) => d.scope === "cross-repo");
1559
+ if (check.repoRoot !== null) {
1560
+ printDataDirGroup("Per-repo", check.repoRoot, perRepo);
1555
1561
  } else {
1556
- writeLine(
1557
- `${formatStatus(false, true)} Data directory: ${colors.yellow}Not created${colors.reset}`
1558
- );
1559
- writeLine(` ${colors.dim}Run: nexus-agents setup${colors.reset}`);
1562
+ printDataDirGroup("Per-repo (homedir \u2014 repo-preferred off)", check.rootPath, perRepo);
1563
+ }
1564
+ printDataDirGroup("Cross-repo", check.rootPath, crossRepo);
1565
+ if (!allExist) {
1566
+ writeLine(` ${colors.dim}Fix: nexus-agents setup${colors.reset}`);
1560
1567
  }
1561
1568
  }
1562
1569
  function printSandboxHeader(check) {
@@ -1744,7 +1751,12 @@ function inspectFile(harness, relativePath, absolutePath) {
1744
1751
  // src/cli/doctor.ts
1745
1752
  var REQUIRED_NODE_MAJOR2 = 22;
1746
1753
  var API_KEY_VARS = ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GOOGLE_AI_API_KEY"];
1747
- var CONFIG_FILE_PATHS = ["./nexus-agents.yaml", "./nexus-agents.yml"];
1754
+ var CONFIG_FILE_PATHS = [
1755
+ "./.nexus-agents/nexus-agents.yaml",
1756
+ "./.nexus-agents/nexus-agents.yml",
1757
+ "./nexus-agents.yaml",
1758
+ "./nexus-agents.yml"
1759
+ ];
1748
1760
  var DATA_SUBDIRECTORIES = [
1749
1761
  "memory",
1750
1762
  "memory/beliefs",
@@ -2003,12 +2015,16 @@ async function checkSqlite() {
2003
2015
  function checkDataDirectory() {
2004
2016
  const rootPath = getNexusDataDir();
2005
2017
  const rootExists = existsSync3(rootPath);
2018
+ const repoRoot = getNexusRepoDir();
2019
+ const perRepoSet = getPerRepoSubdirs();
2006
2020
  const subdirectories = DATA_SUBDIRECTORIES.map((name) => {
2007
- const fullPath = join3(rootPath, name);
2021
+ const segments = name.split("/");
2022
+ const fullPath = nexusDataPath(...segments);
2008
2023
  const exists = existsSync3(fullPath);
2009
- return { name, path: fullPath, exists, writable: exists && isWritable(fullPath) };
2024
+ const scope = perRepoSet.has(segments[0] ?? "") ? "per-repo" : "cross-repo";
2025
+ return { name, path: fullPath, scope, exists, writable: exists && isWritable(fullPath) };
2010
2026
  });
2011
- return { rootExists, rootPath, subdirectories };
2027
+ return { rootExists, rootPath, repoRoot, subdirectories };
2012
2028
  }
2013
2029
  function isWritable(dirPath) {
2014
2030
  try {
@@ -2091,7 +2107,7 @@ async function runDoctorFix(result) {
2091
2107
  writeLine2("\u2500".repeat(40));
2092
2108
  let fixCount = 0;
2093
2109
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2094
- const { runSetup } = await import("./setup-command-QOXG36UV.js");
2110
+ const { runSetup } = await import("./setup-command-ZPLPOJF2.js");
2095
2111
  const setupResult = runSetup({
2096
2112
  skipMcp: true,
2097
2113
  skipRules: true,
@@ -2105,7 +2121,7 @@ async function runDoctorFix(result) {
2105
2121
  }
2106
2122
  }
2107
2123
  if (!result.configFile.found) {
2108
- const { runConfigInitSync } = await import("./setup-config-B4V4QHDP.js");
2124
+ const { runConfigInitSync } = await import("./setup-config-F7VRWXY3.js");
2109
2125
  const configResult = runConfigInitSync(process.cwd(), false, false);
2110
2126
  if (configResult.success && configResult.created) {
2111
2127
  writeLine2(`\u2713 Generated config: ${configResult.path}`);
@@ -2134,17 +2150,26 @@ var RESTRICTED_DIRS = /* @__PURE__ */ new Set(["auth"]);
2134
2150
  function initDataDirectories(dryRun = false) {
2135
2151
  const created = [];
2136
2152
  const alreadyExisted = [];
2137
- try {
2138
- ensureDir(NEXUS_DATA_DIR, dryRun, created, alreadyExisted);
2139
- for (const subdir of DATA_SUBDIRECTORIES) {
2140
- const mode = RESTRICTED_DIRS.has(subdir) ? 448 : void 0;
2141
- ensureDir(join4(NEXUS_DATA_DIR, subdir), dryRun, created, alreadyExisted, mode);
2153
+ const failures = [];
2154
+ for (const subdir of DATA_SUBDIRECTORIES) {
2155
+ const mode = RESTRICTED_DIRS.has(subdir) ? 448 : void 0;
2156
+ const target = nexusDataPath(...subdir.split("/"));
2157
+ try {
2158
+ ensureDir(target, dryRun, created, alreadyExisted, mode);
2159
+ } catch (error) {
2160
+ failures.push(`${target}: ${error instanceof Error ? error.message : String(error)}`);
2142
2161
  }
2143
- return { success: true, rootPath: NEXUS_DATA_DIR, created, alreadyExisted, error: null };
2144
- } catch (error) {
2145
- const msg = error instanceof Error ? error.message : String(error);
2146
- return { success: false, rootPath: NEXUS_DATA_DIR, created, alreadyExisted, error: msg };
2147
2162
  }
2163
+ if (failures.length > 0) {
2164
+ return {
2165
+ success: false,
2166
+ rootPath: NEXUS_DATA_DIR,
2167
+ created,
2168
+ alreadyExisted,
2169
+ error: `Failed to create ${String(failures.length)} dir(s): ${failures.join("; ")}`
2170
+ };
2171
+ }
2172
+ return { success: true, rootPath: NEXUS_DATA_DIR, created, alreadyExisted, error: null };
2148
2173
  }
2149
2174
  function ensureDir(dirPath, dryRun, created, alreadyExisted, mode) {
2150
2175
  if (existsSync4(dirPath)) {
@@ -2194,4 +2219,4 @@ export {
2194
2219
  startStdioServer,
2195
2220
  closeServer
2196
2221
  };
2197
- //# sourceMappingURL=chunk-UOR2JWFH.js.map
2222
+ //# sourceMappingURL=chunk-SJUSQGKH.js.map