substrate-ai 0.1.7 → 0.1.8

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/dist/cli/index.js CHANGED
@@ -8,7 +8,7 @@ import { fileURLToPath } from "url";
8
8
  import { dirname, extname, isAbsolute, join, relative, resolve } from "path";
9
9
  import { access, mkdir, readFile, readdir, stat, writeFile } from "fs/promises";
10
10
  import { execFile } from "child_process";
11
- import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
11
+ import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
12
12
  import yaml, { dump, load } from "js-yaml";
13
13
  import { z } from "zod";
14
14
  import { fileURLToPath as fileURLToPath$1 } from "node:url";
@@ -14633,7 +14633,14 @@ async function main() {
14633
14633
  }
14634
14634
  }
14635
14635
  const __cli_filename = fileURLToPath(import.meta.url);
14636
- if (process.argv[1] === __cli_filename) main();
14636
+ const isMainModule = (() => {
14637
+ try {
14638
+ return realpathSync(process.argv[1]) === realpathSync(__cli_filename);
14639
+ } catch {
14640
+ return false;
14641
+ }
14642
+ })();
14643
+ if (isMainModule) main();
14637
14644
 
14638
14645
  //#endregion
14639
14646
  export { createProgram };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",