@letta-ai/letta-code 0.16.4 → 0.16.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 +19 -9
- package/package.json +1 -1
package/letta.js
CHANGED
|
@@ -3122,7 +3122,7 @@ var package_default;
|
|
|
3122
3122
|
var init_package = __esm(() => {
|
|
3123
3123
|
package_default = {
|
|
3124
3124
|
name: "@letta-ai/letta-code",
|
|
3125
|
-
version: "0.16.
|
|
3125
|
+
version: "0.16.6",
|
|
3126
3126
|
description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
3127
3127
|
type: "module",
|
|
3128
3128
|
bin: {
|
|
@@ -65310,10 +65310,19 @@ var init_checker = __esm(async () => {
|
|
|
65310
65310
|
var exports_loader = {};
|
|
65311
65311
|
__export(exports_loader, {
|
|
65312
65312
|
savePermissionRule: () => savePermissionRule,
|
|
65313
|
-
loadPermissions: () => loadPermissions
|
|
65313
|
+
loadPermissions: () => loadPermissions,
|
|
65314
|
+
getUserSettingsPaths: () => getUserSettingsPaths
|
|
65314
65315
|
});
|
|
65315
65316
|
import { homedir as homedir9 } from "node:os";
|
|
65316
65317
|
import { join as join14 } from "node:path";
|
|
65318
|
+
function getUserSettingsPaths(options = {}) {
|
|
65319
|
+
const homeDir = options.homeDir || homedir9();
|
|
65320
|
+
const xdgConfigHome = options.xdgConfigHome || process.env.XDG_CONFIG_HOME || join14(homeDir, ".config");
|
|
65321
|
+
return {
|
|
65322
|
+
canonical: join14(homeDir, ".letta", "settings.json"),
|
|
65323
|
+
legacy: join14(xdgConfigHome, "letta", "settings.json")
|
|
65324
|
+
};
|
|
65325
|
+
}
|
|
65317
65326
|
async function loadPermissions(workingDirectory = process.cwd()) {
|
|
65318
65327
|
const merged = {
|
|
65319
65328
|
allow: [],
|
|
@@ -65321,9 +65330,10 @@ async function loadPermissions(workingDirectory = process.cwd()) {
|
|
|
65321
65330
|
ask: [],
|
|
65322
65331
|
additionalDirectories: []
|
|
65323
65332
|
};
|
|
65333
|
+
const { canonical: userSettingsPath, legacy: legacyUserSettingsPath } = getUserSettingsPaths();
|
|
65324
65334
|
const sources = [
|
|
65325
|
-
|
|
65326
|
-
|
|
65335
|
+
legacyUserSettingsPath,
|
|
65336
|
+
userSettingsPath,
|
|
65327
65337
|
join14(workingDirectory, ".letta", "settings.json"),
|
|
65328
65338
|
join14(workingDirectory, ".letta", "settings.local.json")
|
|
65329
65339
|
];
|
|
@@ -65370,7 +65380,7 @@ async function savePermissionRule(rule, ruleType, scope, workingDirectory = proc
|
|
|
65370
65380
|
let settingsPath;
|
|
65371
65381
|
switch (scope) {
|
|
65372
65382
|
case "user":
|
|
65373
|
-
settingsPath =
|
|
65383
|
+
settingsPath = getUserSettingsPaths().canonical;
|
|
65374
65384
|
break;
|
|
65375
65385
|
case "project":
|
|
65376
65386
|
settingsPath = join14(workingDirectory, ".letta", "settings.json");
|
|
@@ -74112,7 +74122,7 @@ In headless mode, use:
|
|
|
74112
74122
|
blockValues[label] = value;
|
|
74113
74123
|
}
|
|
74114
74124
|
}
|
|
74115
|
-
if (specifiedConversationId) {
|
|
74125
|
+
if (specifiedConversationId && specifiedConversationId !== "default") {
|
|
74116
74126
|
try {
|
|
74117
74127
|
const conversation = await client.conversations.retrieve(specifiedConversationId);
|
|
74118
74128
|
agent = await client.agents.retrieve(conversation.agent_id);
|
|
@@ -117217,7 +117227,7 @@ BEHAVIOR
|
|
|
117217
117227
|
- Use /profile save <name> to bookmark your current agent
|
|
117218
117228
|
|
|
117219
117229
|
Profiles are stored in:
|
|
117220
|
-
- Global: ~/.
|
|
117230
|
+
- Global: ~/.letta/settings.json (available everywhere)
|
|
117221
117231
|
- Local: .letta/settings.local.json (pinned to project)
|
|
117222
117232
|
|
|
117223
117233
|
If no credentials are configured, you'll be prompted to authenticate via
|
|
@@ -117745,7 +117755,7 @@ Error: ${message}`);
|
|
|
117745
117755
|
console.error("Failed to connect to Letta server");
|
|
117746
117756
|
console.error(`Base URL: ${baseURL}`);
|
|
117747
117757
|
console.error("Your credentials may be invalid or the server may be unreachable.");
|
|
117748
|
-
console.error("Delete ~/.
|
|
117758
|
+
console.error("Delete ~/.letta/settings.json then run 'letta' to re-authenticate");
|
|
117749
117759
|
process.exit(1);
|
|
117750
117760
|
}
|
|
117751
117761
|
console.log("Failed to connect to Letta server.");
|
|
@@ -118574,4 +118584,4 @@ Error during initialization: ${message}`);
|
|
|
118574
118584
|
}
|
|
118575
118585
|
main();
|
|
118576
118586
|
|
|
118577
|
-
//# debugId=
|
|
118587
|
+
//# debugId=F77C42EE35B5DE0464756E2164756E21
|