ai-cto 0.1.0 → 0.1.1

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/cli.js CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import readline from 'readline';
4
+ import { fileURLToPath } from 'url';
5
+ import fs from 'fs';
4
6
 
5
7
  // ---------------------------------------------------------
6
8
  // Game Data Definition
@@ -485,7 +487,20 @@ async function main() {
485
487
  process.exit(0);
486
488
  }
487
489
 
488
- if (process.argv[1] && process.argv[1].endsWith('cli.js')) {
490
+ function isMainModule() {
491
+ if (!process.argv[1]) return false;
492
+ try {
493
+ const mainPath = fs.realpathSync(process.argv[1]);
494
+ const currentPath = fileURLToPath(import.meta.url);
495
+ if (mainPath === currentPath) return true;
496
+ } catch {
497
+ // ignore
498
+ }
499
+ const argv1 = process.argv[1];
500
+ return argv1.endsWith('cli.js') || argv1.endsWith('ai-cto') || argv1.endsWith('aicto');
501
+ }
502
+
503
+ if (isMainModule()) {
489
504
  main().catch(console.error);
490
505
  }
491
506
 
package/docs/STACK.md CHANGED
@@ -33,7 +33,7 @@
33
33
  ## 🗂️ Project Directory Structure
34
34
 
35
35
  ```
36
- aicto/
36
+ ai-cto/
37
37
  ├── src/
38
38
  │ ├── assets/ # Sound FX, custom graphics, and icons
39
39
  │ │ ├── icons/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-cto",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Run an AI startup for 5 minutes (Terminal CLI Edition)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,4 +17,4 @@
17
17
  "simulation"
18
18
  ],
19
19
  "license": "MIT"
20
- }
20
+ }
package/docs/PLAN.md DELETED
File without changes