tycono 0.1.23 → 0.1.25
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/bin/tycono.ts
CHANGED
|
@@ -97,9 +97,24 @@ async function startServer(): Promise<void> {
|
|
|
97
97
|
process.env.COMPANY_ROOT = process.cwd();
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
// Check for CLAUDE.md
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
// Check for CLAUDE.md — also scan one level deep (for ~/acme-corp/ scenario)
|
|
101
|
+
let claudeMdPath = path.join(process.env.COMPANY_ROOT, 'CLAUDE.md');
|
|
102
|
+
let initialized = fs.existsSync(claudeMdPath);
|
|
103
|
+
if (!initialized) {
|
|
104
|
+
// Look for .tycono/ marker in subdirectories (faster than scanning all dirs for CLAUDE.md)
|
|
105
|
+
try {
|
|
106
|
+
const entries = fs.readdirSync(process.env.COMPANY_ROOT, { withFileTypes: true });
|
|
107
|
+
for (const entry of entries) {
|
|
108
|
+
if (!entry.isDirectory() || entry.name.startsWith('.')) continue;
|
|
109
|
+
if (fs.existsSync(path.join(process.env.COMPANY_ROOT, entry.name, '.tycono', 'config.json'))) {
|
|
110
|
+
process.env.COMPANY_ROOT = path.join(process.env.COMPANY_ROOT, entry.name);
|
|
111
|
+
claudeMdPath = path.join(process.env.COMPANY_ROOT, 'CLAUDE.md');
|
|
112
|
+
initialized = fs.existsSync(claudeMdPath);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
} catch { /* permission denied etc — ignore */ }
|
|
117
|
+
}
|
|
103
118
|
|
|
104
119
|
// Production mode + auto-detect execution engine (soft-fail)
|
|
105
120
|
process.env.NODE_ENV = 'production';
|