@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "CLI tools for vellum-assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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 assistantDir = join(import.meta.dir, "..", "..", "..", "assistant");
793
- const assistantIndex = join(assistantDir, "src", "index.ts");
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 {