@chakresh/kresh 0.1.25 → 0.1.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chakresh/kresh",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "bin": {
5
5
  "kresh": "./src/index.js"
6
6
  },
@@ -6,7 +6,18 @@ const BASE_DIRS = ['skills', '.agents/skills', '.claude/skills', '.codex/skills'
6
6
  /**
7
7
  * Helper to find the workspace or project root directory by scanning up.
8
8
  */
9
- export async function getWorkspaceRoot(startDir = process.cwd()) {
9
+ export async function getWorkspaceRoot(startDir) {
10
+ if (!startDir) {
11
+ try {
12
+ startDir = process.cwd();
13
+ } catch (e) {
14
+ if (process.env.PWD) {
15
+ startDir = process.env.PWD;
16
+ } else {
17
+ startDir = '/';
18
+ }
19
+ }
20
+ }
10
21
  let currentDir = startDir;
11
22
  while (true) {
12
23
  try {