@letta-ai/letta-code 0.1.4 → 0.1.6
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/letta.js +151027 -0
- package/package.json +8 -9
- package/bin/letta-linux-arm64 +0 -0
- package/bin/letta-linux-x64 +0 -0
- package/bin/letta-macos-arm64 +0 -0
- package/bin/letta-macos-x64 +0 -0
- package/bin/letta-windows-x64.exe +0 -0
- package/bin/letta.js +0 -86
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"letta": "
|
|
7
|
+
"letta": "letta.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"LICENSE",
|
|
11
11
|
"README.md",
|
|
12
|
-
"
|
|
12
|
+
"letta.js",
|
|
13
13
|
"scripts",
|
|
14
14
|
"vendor"
|
|
15
15
|
],
|
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
|
+
"dependencies": {},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/bun": "latest",
|
|
26
27
|
"@types/diff": "^8.0.0",
|
|
27
28
|
"typescript": "^5.0.0",
|
|
28
29
|
"husky": "9.1.7",
|
|
29
|
-
"lint-staged": "16.2.4"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
30
|
+
"lint-staged": "16.2.4",
|
|
32
31
|
"@letta-ai/letta-client": "1.0.0-alpha.2",
|
|
33
32
|
"diff": "^8.0.2",
|
|
34
33
|
"ink": "^5.0.0",
|
|
@@ -40,9 +39,9 @@
|
|
|
40
39
|
"scripts": {
|
|
41
40
|
"lint": "bunx --bun @biomejs/biome@2.2.5 check src",
|
|
42
41
|
"fix": "bunx --bun @biomejs/biome@2.2.5 check --write src",
|
|
43
|
-
"dev
|
|
44
|
-
"build": "bun build
|
|
45
|
-
"
|
|
42
|
+
"dev": "bun --loader:.md=text --loader:.mdx=text --loader:.txt=text run src/index.ts",
|
|
43
|
+
"build": "bun run build.js",
|
|
44
|
+
"prepare": "bun run build",
|
|
46
45
|
"postinstall": "bun scripts/postinstall-patches.js || true"
|
|
47
46
|
},
|
|
48
47
|
"lint-staged": {
|
package/bin/letta-linux-arm64
DELETED
|
Binary file
|
package/bin/letta-linux-x64
DELETED
|
Binary file
|
package/bin/letta-macos-arm64
DELETED
|
Binary file
|
package/bin/letta-macos-x64
DELETED
|
Binary file
|
|
Binary file
|
package/bin/letta.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Unified entry point for the Letta CLI.
|
|
5
|
-
* Detects the platform and spawns the appropriate compiled binary.
|
|
6
|
-
*
|
|
7
|
-
* Note: Uses #!/usr/bin/env node (not bun) for maximum compatibility
|
|
8
|
-
* when users install via npm/npx. Bun can still run this file.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import path from "path";
|
|
12
|
-
import { fileURLToPath } from "url";
|
|
13
|
-
import { spawn } from "child_process";
|
|
14
|
-
|
|
15
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
-
const __dirname = path.dirname(__filename);
|
|
17
|
-
|
|
18
|
-
const { platform, arch } = process;
|
|
19
|
-
|
|
20
|
-
// Map platform/arch to binary name
|
|
21
|
-
let binaryName = null;
|
|
22
|
-
switch (platform) {
|
|
23
|
-
case "linux":
|
|
24
|
-
switch (arch) {
|
|
25
|
-
case "x64":
|
|
26
|
-
binaryName = "letta-linux-x64";
|
|
27
|
-
break;
|
|
28
|
-
case "arm64":
|
|
29
|
-
binaryName = "letta-linux-arm64";
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
break;
|
|
33
|
-
case "darwin":
|
|
34
|
-
switch (arch) {
|
|
35
|
-
case "x64":
|
|
36
|
-
binaryName = "letta-macos-x64";
|
|
37
|
-
break;
|
|
38
|
-
case "arm64":
|
|
39
|
-
binaryName = "letta-macos-arm64";
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
break;
|
|
43
|
-
case "win32":
|
|
44
|
-
switch (arch) {
|
|
45
|
-
case "x64":
|
|
46
|
-
binaryName = "letta-windows-x64.exe";
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!binaryName) {
|
|
53
|
-
console.error(`Error: Unsupported platform: ${platform} ${arch}`);
|
|
54
|
-
console.error("Supported platforms:");
|
|
55
|
-
console.error(" - macOS: arm64, x64");
|
|
56
|
-
console.error(" - Linux: arm64, x64");
|
|
57
|
-
console.error(" - Windows: x64");
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const binaryPath = path.join(__dirname, binaryName);
|
|
62
|
-
|
|
63
|
-
// Spawn the binary with all arguments
|
|
64
|
-
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
65
|
-
stdio: "inherit",
|
|
66
|
-
env: process.env,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Forward signals to child process
|
|
70
|
-
function forwardSignal(signal) {
|
|
71
|
-
process.on(signal, () => {
|
|
72
|
-
child.kill(signal);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
forwardSignal("SIGINT");
|
|
77
|
-
forwardSignal("SIGTERM");
|
|
78
|
-
|
|
79
|
-
// Exit with the same code as the child process
|
|
80
|
-
child.on("exit", (code, signal) => {
|
|
81
|
-
if (signal) {
|
|
82
|
-
process.kill(process.pid, signal);
|
|
83
|
-
} else {
|
|
84
|
-
process.exit(code || 0);
|
|
85
|
-
}
|
|
86
|
-
});
|