@vellumai/cli 0.1.6 → 0.1.7
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 +1 -1
- package/src/commands/hatch.ts +12 -3
package/package.json
CHANGED
package/src/commands/hatch.ts
CHANGED
|
@@ -789,8 +789,17 @@ async function hatchLocal(species: Species, name: string | null): Promise<void>
|
|
|
789
789
|
console.warn("⚠️ Daemon socket did not appear within 10s — continuing anyway");
|
|
790
790
|
}
|
|
791
791
|
} else {
|
|
792
|
-
const
|
|
793
|
-
|
|
792
|
+
const sourceTreeIndex = join(import.meta.dir, "..", "..", "..", "assistant", "src", "index.ts");
|
|
793
|
+
let assistantIndex = sourceTreeIndex;
|
|
794
|
+
|
|
795
|
+
if (!existsSync(assistantIndex)) {
|
|
796
|
+
try {
|
|
797
|
+
const vellumPkgPath = _require.resolve("vellum/package.json");
|
|
798
|
+
assistantIndex = join(dirname(vellumPkgPath), "src", "index.ts");
|
|
799
|
+
} catch {
|
|
800
|
+
// resolve failed, will fall through to existsSync check below
|
|
801
|
+
}
|
|
802
|
+
}
|
|
794
803
|
|
|
795
804
|
if (!existsSync(assistantIndex)) {
|
|
796
805
|
throw new Error(
|
|
@@ -852,7 +861,7 @@ async function hatchLocal(species: Species, name: string | null): Promise<void>
|
|
|
852
861
|
|
|
853
862
|
function getCliVersion(): string {
|
|
854
863
|
try {
|
|
855
|
-
const pkgPath = join(import.meta.dir, "..", "package.json");
|
|
864
|
+
const pkgPath = join(import.meta.dir, "..", "..", "package.json");
|
|
856
865
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
857
866
|
return pkg.version ?? "unknown";
|
|
858
867
|
} catch {
|