@dexto/agent-management 1.5.1 → 1.5.2

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.
@@ -98,13 +98,23 @@ function scanCommandsDirectory(dir) {
98
98
  }
99
99
  return files;
100
100
  }
101
- const AGENT_INSTRUCTION_FILES = ["agent.md", "claude.md", "gemini.md"];
101
+ const AGENT_INSTRUCTION_FILES = ["agents.md", "claude.md", "gemini.md"];
102
102
  function discoverAgentInstructionFile() {
103
103
  const cwd = process.cwd();
104
+ let dirEntries;
105
+ try {
106
+ dirEntries = (0, import_fs.readdirSync)(cwd);
107
+ } catch {
108
+ return null;
109
+ }
110
+ const lowercaseMap = /* @__PURE__ */ new Map();
111
+ for (const entry of dirEntries) {
112
+ lowercaseMap.set(entry.toLowerCase(), entry);
113
+ }
104
114
  for (const filename of AGENT_INSTRUCTION_FILES) {
105
- const filePath = path.join(cwd, filename);
106
- if ((0, import_fs.existsSync)(filePath)) {
107
- return filePath;
115
+ const actualFilename = lowercaseMap.get(filename);
116
+ if (actualFilename) {
117
+ return path.join(cwd, actualFilename);
108
118
  }
109
119
  }
110
120
  return null;
@@ -28,10 +28,10 @@ export declare function discoverCommandPrompts(): FilePromptEntry[];
28
28
  /**
29
29
  * Discovers agent instruction files from the current working directory.
30
30
  *
31
- * Looks for files in this order of priority:
32
- * 1. agent.md
33
- * 2. claude.md
34
- * 3. gemini.md
31
+ * Looks for files in this order of priority (case-insensitive):
32
+ * 1. AGENTS.md (or agents.md, Agents.md, etc.)
33
+ * 2. CLAUDE.md (or claude.md, Claude.md, etc.)
34
+ * 3. GEMINI.md (or gemini.md, Gemini.md, etc.)
35
35
  *
36
36
  * Only the first found file is returned (we don't want multiple instruction files).
37
37
  *
@@ -1 +1 @@
1
- {"version":3,"file":"discover-prompts.d.ts","sourceRoot":"","sources":["../../src/config/discover-prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,EAAE,CA8D1D;AA4BD;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,GAAG,IAAI,CAW5D"}
1
+ {"version":3,"file":"discover-prompts.d.ts","sourceRoot":"","sources":["../../src/config/discover-prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,EAAE,CA8D1D;AAiCD;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,GAAG,IAAI,CA0B5D"}
@@ -68,13 +68,23 @@ function scanCommandsDirectory(dir) {
68
68
  }
69
69
  return files;
70
70
  }
71
- const AGENT_INSTRUCTION_FILES = ["agent.md", "claude.md", "gemini.md"];
71
+ const AGENT_INSTRUCTION_FILES = ["agents.md", "claude.md", "gemini.md"];
72
72
  function discoverAgentInstructionFile() {
73
73
  const cwd = process.cwd();
74
+ let dirEntries;
75
+ try {
76
+ dirEntries = readdirSync(cwd);
77
+ } catch {
78
+ return null;
79
+ }
80
+ const lowercaseMap = /* @__PURE__ */ new Map();
81
+ for (const entry of dirEntries) {
82
+ lowercaseMap.set(entry.toLowerCase(), entry);
83
+ }
74
84
  for (const filename of AGENT_INSTRUCTION_FILES) {
75
- const filePath = path.join(cwd, filename);
76
- if (existsSync(filePath)) {
77
- return filePath;
85
+ const actualFilename = lowercaseMap.get(filename);
86
+ if (actualFilename) {
87
+ return path.join(cwd, actualFilename);
78
88
  }
79
89
  }
80
90
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/agent-management",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "yaml": "^2.7.1",
18
18
  "zod": "^3.25.0",
19
- "@dexto/core": "1.5.1"
19
+ "@dexto/core": "1.5.2"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^22.13.5"