@letta-ai/letta-code 0.14.0 → 0.14.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.
Files changed (2) hide show
  1. package/letta.js +52 -9
  2. package/package.json +1 -1
package/letta.js CHANGED
@@ -3108,7 +3108,7 @@ var package_default;
3108
3108
  var init_package = __esm(() => {
3109
3109
  package_default = {
3110
3110
  name: "@letta-ai/letta-code",
3111
- version: "0.14.0",
3111
+ version: "0.14.1",
3112
3112
  description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
3113
3113
  type: "module",
3114
3114
  bin: {
@@ -33157,6 +33157,11 @@ var init_version = __esm(() => {
33157
33157
  });
33158
33158
 
33159
33159
  // src/cli/components/AnimatedLogo.tsx
33160
+ function fixBunEncoding(text) {
33161
+ if (typeof Bun === "undefined")
33162
+ return text;
33163
+ return text.replace(/█/g, String.fromCharCode(9608)).replace(/▓/g, String.fromCharCode(9619)).replace(/▒/g, String.fromCharCode(9618)).replace(/░/g, String.fromCharCode(9617));
33164
+ }
33160
33165
  function AnimatedLogo({
33161
33166
  color = colors.welcome.accent
33162
33167
  }) {
@@ -33254,7 +33259,7 @@ var init_AnimatedLogo = __esm(async () => {
33254
33259
  █▓ █▓ █▓
33255
33260
  █▓ █▓
33256
33261
  █████▓ `
33257
- ];
33262
+ ].map(fixBunEncoding);
33258
33263
  });
33259
33264
 
33260
33265
  // src/cli/components/WelcomeScreen.tsx
@@ -60330,12 +60335,18 @@ function SetupUI({ onComplete }) {
60330
60335
  }, undefined, false, undefined, this),
60331
60336
  /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
60332
60337
  dimColor: true,
60333
- children: "Use ↑/↓ to navigate, Enter to select"
60334
- }, undefined, false, undefined, this)
60338
+ children: [
60339
+ "Use ",
60340
+ upArrow,
60341
+ "/",
60342
+ downArrow,
60343
+ " to navigate, Enter to select"
60344
+ ]
60345
+ }, undefined, true, undefined, this)
60335
60346
  ]
60336
60347
  }, undefined, true, undefined, this);
60337
60348
  }
60338
- var import_react27, jsx_dev_runtime7;
60349
+ var import_react27, jsx_dev_runtime7, upArrow, downArrow;
60339
60350
  var init_setup_ui = __esm(async () => {
60340
60351
  init_colors();
60341
60352
  init_oauth();
@@ -60346,6 +60357,8 @@ var init_setup_ui = __esm(async () => {
60346
60357
  ]);
60347
60358
  import_react27 = __toESM(require_react(), 1);
60348
60359
  jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
60360
+ upArrow = String.fromCharCode(8593);
60361
+ downArrow = String.fromCharCode(8595);
60349
60362
  });
60350
60363
 
60351
60364
  // src/auth/setup.ts
@@ -63695,7 +63708,9 @@ async function handleHeadlessCommand(argv, model, skillsDirectory) {
63695
63708
  "init-blocks": { type: "string" },
63696
63709
  "base-tools": { type: "string" },
63697
63710
  "from-af": { type: "string" },
63698
- "no-skills": { type: "boolean" }
63711
+ "no-skills": { type: "boolean" },
63712
+ memfs: { type: "boolean" },
63713
+ "no-memfs": { type: "boolean" }
63699
63714
  },
63700
63715
  strict: false,
63701
63716
  allowPositionals: true
@@ -63758,6 +63773,7 @@ In headless mode, use:
63758
63773
  }
63759
63774
  const forceNewConversation = values.new ?? false;
63760
63775
  let agent = null;
63776
+ let isNewlyCreatedAgent = false;
63761
63777
  let specifiedAgentId = values.agent;
63762
63778
  let specifiedConversationId = values.conversation;
63763
63779
  const useDefaultConv = values.default;
@@ -63778,6 +63794,8 @@ In headless mode, use:
63778
63794
  const initBlocksRaw = values["init-blocks"];
63779
63795
  const baseToolsRaw = values["base-tools"];
63780
63796
  const sleeptimeFlag = values.sleeptime ?? undefined;
63797
+ const memfsFlag = values.memfs;
63798
+ const noMemfsFlag = values["no-memfs"];
63781
63799
  const fromAfFile = values["from-af"];
63782
63800
  if (specifiedConversationId?.startsWith("agent-")) {
63783
63801
  if (specifiedAgentId && specifiedAgentId !== specifiedConversationId) {
@@ -63923,6 +63941,7 @@ In headless mode, use:
63923
63941
  stripMessages: true
63924
63942
  });
63925
63943
  agent = result.agent;
63944
+ isNewlyCreatedAgent = true;
63926
63945
  }
63927
63946
  if (!agent && specifiedAgentId) {
63928
63947
  try {
@@ -63950,6 +63969,7 @@ In headless mode, use:
63950
63969
  };
63951
63970
  const result = await createAgent(createOptions);
63952
63971
  agent = result.agent;
63972
+ isNewlyCreatedAgent = true;
63953
63973
  }
63954
63974
  if (!agent) {
63955
63975
  await settingsManager.loadLocalProjectSettings();
@@ -64019,6 +64039,13 @@ In headless mode, use:
64019
64039
  console.log("Created missing skills blocks for agent compatibility");
64020
64040
  }
64021
64041
  }
64042
+ if (memfsFlag) {
64043
+ settingsManager.setMemfsEnabled(agent.id, true);
64044
+ } else if (noMemfsFlag) {
64045
+ settingsManager.setMemfsEnabled(agent.id, false);
64046
+ } else if (isNewlyCreatedAgent && !isSubagent) {
64047
+ settingsManager.setMemfsEnabled(agent.id, true);
64048
+ }
64022
64049
  if (settingsManager.isMemfsEnabled(agent.id)) {
64023
64050
  try {
64024
64051
  await ensureMemoryFilesystemBlock(agent.id);
@@ -99165,6 +99192,8 @@ OPTIONS
99165
99192
  --skills <path> Custom path to skills directory (default: .skills in current directory)
99166
99193
  --sleeptime Enable sleeptime memory management (only for new agents)
99167
99194
  --from-af <path> Create agent from an AgentFile (.af) template
99195
+ --memfs Enable memory filesystem for this agent
99196
+ --no-memfs Disable memory filesystem for this agent
99168
99197
 
99169
99198
  BEHAVIOR
99170
99199
  On startup, Letta Code checks for saved profiles:
@@ -99398,7 +99427,9 @@ Auto-update failed due to filesystem issue (ENOTEMPTY).`);
99398
99427
  skills: { type: "string" },
99399
99428
  sleeptime: { type: "boolean" },
99400
99429
  "from-af": { type: "string" },
99401
- "no-skills": { type: "boolean" }
99430
+ "no-skills": { type: "boolean" },
99431
+ memfs: { type: "boolean" },
99432
+ "no-memfs": { type: "boolean" }
99402
99433
  },
99403
99434
  strict: true,
99404
99435
  allowPositionals: true
@@ -99475,6 +99506,8 @@ Note: Flags should use double dashes for full names (e.g., --yolo, not -yolo)`);
99475
99506
  const specifiedToolset = values.toolset ?? undefined;
99476
99507
  const skillsDirectory = values.skills ?? undefined;
99477
99508
  const sleeptimeFlag = values.sleeptime ?? undefined;
99509
+ const memfsFlag = values.memfs;
99510
+ const noMemfsFlag = values["no-memfs"];
99478
99511
  const fromAfFile = values["from-af"];
99479
99512
  const isHeadless = values.prompt || values.run || !process.stdin.isTTY;
99480
99513
  if (command && !isHeadless) {
@@ -100047,6 +100080,7 @@ Error: ${message}`);
100047
100080
  const { createAgent: createAgent3 } = await init_create3().then(() => exports_create);
100048
100081
  const { getModelUpdateArgs: getModelUpdateArgs3 } = await Promise.resolve().then(() => (init_model2(), exports_model2));
100049
100082
  let agent = null;
100083
+ let isNewlyCreatedAgent = false;
100050
100084
  if (fromAfFile2) {
100051
100085
  setLoadingState("importing");
100052
100086
  const { importAgentFromFile: importAgentFromFile3 } = await init_import2().then(() => exports_import2);
@@ -100056,6 +100090,7 @@ Error: ${message}`);
100056
100090
  stripMessages: true
100057
100091
  });
100058
100092
  agent = result.agent;
100093
+ isNewlyCreatedAgent = true;
100059
100094
  setAgentProvenance({
100060
100095
  isNew: true,
100061
100096
  blocks: []
@@ -100105,6 +100140,7 @@ Error: ${message}`);
100105
100140
  const updateArgs = getModelUpdateArgs3(effectiveModel);
100106
100141
  const result = await createAgent3(undefined, effectiveModel, undefined, updateArgs, skillsDirectory2, true, sleeptimeFlag ?? settings.enableSleeptime, systemPromptPreset2, initBlocks2, baseTools2);
100107
100142
  agent = result.agent;
100143
+ isNewlyCreatedAgent = true;
100108
100144
  setAgentProvenance(result.provenance);
100109
100145
  }
100110
100146
  if (!agent && resumingAgentId) {
@@ -100141,6 +100177,14 @@ Error: ${message}`);
100141
100177
  console.log("Created missing skills blocks for agent compatibility");
100142
100178
  }
100143
100179
  setAgentContext(agent.id, skillsDirectory2);
100180
+ const isSubagent = process.env.LETTA_CODE_AGENT_ROLE === "subagent";
100181
+ if (memfsFlag) {
100182
+ settingsManager2.setMemfsEnabled(agent.id, true);
100183
+ } else if (noMemfsFlag) {
100184
+ settingsManager2.setMemfsEnabled(agent.id, false);
100185
+ } else if (isNewlyCreatedAgent && !isSubagent) {
100186
+ settingsManager2.setMemfsEnabled(agent.id, true);
100187
+ }
100144
100188
  initializeLoadedSkillsFlag().catch(() => {});
100145
100189
  (async () => {
100146
100190
  try {
@@ -100260,7 +100304,6 @@ Error: ${message}`);
100260
100304
  setResumeData(data);
100261
100305
  setResumedExistingConversation(true);
100262
100306
  }
100263
- const isSubagent = process.env.LETTA_CODE_AGENT_ROLE === "subagent";
100264
100307
  if (!isSubagent) {
100265
100308
  settingsManager2.setLocalLastSession({ agentId: agent.id, conversationId: conversationIdToUse }, process.cwd());
100266
100309
  settingsManager2.setGlobalLastSession({
@@ -100403,4 +100446,4 @@ Error during initialization: ${message}`);
100403
100446
  }
100404
100447
  main();
100405
100448
 
100406
- //# debugId=B0D0F579327E5C9264756E2164756E21
100449
+ //# debugId=4685A808C41D39B764756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
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": {