lato-cli 1.0.1 → 1.0.3

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/lato ADDED
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+
3
+ 'use strict';
4
+
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+ const { spawnSync } = require('child_process');
8
+
9
+ const binName =
10
+ process.platform === 'win32'
11
+ ? 'lato-native.exe'
12
+ : 'lato-native';
13
+
14
+ const nativeBinary = path.join(__dirname, binName);
15
+
16
+ if (!fs.existsSync(nativeBinary)) {
17
+ console.error('Lato native binary is not installed yet.');
18
+ console.error('Please reinstall lato-cli.');
19
+ process.exit(1);
20
+ }
21
+
22
+ const result = spawnSync(nativeBinary, process.argv.slice(2), {
23
+ stdio: 'inherit'
24
+ });
25
+
26
+ if (result.error) {
27
+ console.error(`Failed to start Lato: ${result.error.message}`);
28
+ process.exit(1);
29
+ }
30
+
31
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lato-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Lato — AI coding agent CLI.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/lazyarjun2005-rgb/lato",
@@ -6,7 +6,7 @@ const os = require('os');
6
6
  const https = require('https');
7
7
  const { execFileSync } = require('child_process');
8
8
 
9
- const VERSION = 'v1.0.1';
9
+ const VERSION = 'v1.0.2';
10
10
  const REPO = 'lazyarjun2005-rgb/lato';
11
11
 
12
12
  function platformName() {
@@ -101,7 +101,7 @@ async function main() {
101
101
  const binDir = path.join(__dirname, '..', 'bin');
102
102
  const destination = path.join(
103
103
  binDir,
104
- platform === 'windows' ? 'lato.exe' : 'lato'
104
+ platform === 'windows' ? 'lato.exe' : 'lato-native'
105
105
  );
106
106
 
107
107
  fs.mkdirSync(binDir, { recursive: true });