@letta-ai/letta-code 0.12.3 → 0.12.4

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 +36 -62
  2. package/package.json +1 -1
package/letta.js CHANGED
@@ -3237,7 +3237,7 @@ var package_default;
3237
3237
  var init_package = __esm(() => {
3238
3238
  package_default = {
3239
3239
  name: "@letta-ai/letta-code",
3240
- version: "0.12.3",
3240
+ version: "0.12.4",
3241
3241
  description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
3242
3242
  type: "module",
3243
3243
  bin: {
@@ -43995,9 +43995,12 @@ function handleApprovalRequestEvent(event, state) {
43995
43995
  }
43996
43996
  }
43997
43997
  function handleAutoApprovalEvent(event, state, subagentId) {
43998
- const { tool_call_id, tool_name, tool_args = "{}" } = event;
43999
- if (tool_call_id && tool_name) {
44000
- recordToolCall(subagentId, tool_call_id, tool_name, tool_args, state.displayedToolCalls);
43998
+ const tc = event.tool_call;
43999
+ if (!tc)
44000
+ return;
44001
+ const { tool_call_id, name, arguments: tool_args = "{}" } = tc;
44002
+ if (tool_call_id && name) {
44003
+ recordToolCall(subagentId, tool_call_id, name, tool_args, state.displayedToolCalls);
44001
44004
  }
44002
44005
  }
44003
44006
  function handleResultEvent(event, state, subagentId) {
@@ -44025,7 +44028,10 @@ function processStreamEvent(line, state, baseURL, subagentId) {
44025
44028
  const event = JSON.parse(line);
44026
44029
  switch (event.type) {
44027
44030
  case "init":
44028
- handleInitEvent(event, state, baseURL, subagentId);
44031
+ case "system":
44032
+ if (event.type === "init" || event.subtype === "init") {
44033
+ handleInitEvent(event, state, baseURL, subagentId);
44034
+ }
44029
44035
  break;
44030
44036
  case "message":
44031
44037
  if (event.message_type === "approval_request_message") {
@@ -68505,7 +68511,7 @@ var init_SubagentGroupDisplay = __esm(async () => {
68505
68511
  AgentRow = import_react68.memo(({ agent, isLast, expanded }) => {
68506
68512
  const { treeChar, continueChar } = getTreeChars(isLast);
68507
68513
  const columns = useTerminalWidth();
68508
- const gutterWidth = 6;
68514
+ const gutterWidth = 7;
68509
68515
  const contentWidth = Math.max(0, columns - gutterWidth);
68510
68516
  const getDotElement = () => {
68511
68517
  switch (agent.status) {
@@ -68582,33 +68588,17 @@ var init_SubagentGroupDisplay = __esm(async () => {
68582
68588
  agent.agentURL && /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Box_default, {
68583
68589
  flexDirection: "row",
68584
68590
  children: [
68585
- /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Box_default, {
68586
- width: gutterWidth,
68587
- flexShrink: 0,
68588
- children: /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68589
- children: [
68590
- /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68591
- color: colors.subagent.treeChar,
68592
- children: continueChar
68593
- }, undefined, false, undefined, this),
68594
- /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68595
- dimColor: true,
68596
- children: " ⎿ "
68597
- }, undefined, false, undefined, this)
68598
- ]
68599
- }, undefined, true, undefined, this)
68591
+ /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68592
+ color: colors.subagent.treeChar,
68593
+ children: continueChar
68600
68594
  }, undefined, false, undefined, this),
68601
- /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Box_default, {
68602
- flexGrow: 1,
68603
- width: contentWidth,
68604
- children: /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68605
- wrap: "wrap",
68606
- dimColor: true,
68607
- children: [
68608
- "Subagent: ",
68609
- agent.agentURL
68610
- ]
68611
- }, undefined, true, undefined, this)
68595
+ /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68596
+ dimColor: true,
68597
+ children: " ⎿ Subagent: "
68598
+ }, undefined, false, undefined, this),
68599
+ /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68600
+ dimColor: true,
68601
+ children: agent.agentURL
68612
68602
  }, undefined, false, undefined, this)
68613
68603
  ]
68614
68604
  }, undefined, true, undefined, this),
@@ -68715,7 +68705,7 @@ var init_SubagentGroupDisplay = __esm(async () => {
68715
68705
  children: [
68716
68706
  allCompleted ? /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(Text, {
68717
68707
  color: dotColor,
68718
- children: ""
68708
+ children: ""
68719
68709
  }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime46.jsxDEV(BlinkDot, {
68720
68710
  color: colors.subagent.header
68721
68711
  }, undefined, false, undefined, this),
@@ -68778,7 +68768,7 @@ var init_SubagentGroupStatic = __esm(async () => {
68778
68768
  AgentRow2 = import_react69.memo(({ agent, isLast }) => {
68779
68769
  const { treeChar, continueChar } = getTreeChars(isLast);
68780
68770
  const columns = useTerminalWidth();
68781
- const gutterWidth = 6;
68771
+ const gutterWidth = 7;
68782
68772
  const contentWidth = Math.max(0, columns - gutterWidth);
68783
68773
  const dotColor = agent.status === "completed" ? colors.subagent.completed : colors.subagent.error;
68784
68774
  const stats = formatStats(agent.toolCount, agent.totalTokens);
@@ -68831,33 +68821,17 @@ var init_SubagentGroupStatic = __esm(async () => {
68831
68821
  agent.agentURL && /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Box_default, {
68832
68822
  flexDirection: "row",
68833
68823
  children: [
68834
- /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Box_default, {
68835
- width: gutterWidth,
68836
- flexShrink: 0,
68837
- children: /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68838
- children: [
68839
- /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68840
- color: colors.subagent.treeChar,
68841
- children: continueChar
68842
- }, undefined, false, undefined, this),
68843
- /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68844
- dimColor: true,
68845
- children: " ⎿ "
68846
- }, undefined, false, undefined, this)
68847
- ]
68848
- }, undefined, true, undefined, this)
68824
+ /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68825
+ color: colors.subagent.treeChar,
68826
+ children: continueChar
68849
68827
  }, undefined, false, undefined, this),
68850
- /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Box_default, {
68851
- flexGrow: 1,
68852
- width: contentWidth,
68853
- children: /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68854
- wrap: "wrap",
68855
- dimColor: true,
68856
- children: [
68857
- "Subagent: ",
68858
- agent.agentURL
68859
- ]
68860
- }, undefined, true, undefined, this)
68828
+ /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68829
+ dimColor: true,
68830
+ children: " ⎿ Subagent: "
68831
+ }, undefined, false, undefined, this),
68832
+ /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68833
+ dimColor: true,
68834
+ children: agent.agentURL
68861
68835
  }, undefined, false, undefined, this)
68862
68836
  ]
68863
68837
  }, undefined, true, undefined, this),
@@ -68923,7 +68897,7 @@ var init_SubagentGroupStatic = __esm(async () => {
68923
68897
  children: [
68924
68898
  /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68925
68899
  color: dotColor,
68926
- children: ""
68900
+ children: ""
68927
68901
  }, undefined, false, undefined, this),
68928
68902
  /* @__PURE__ */ jsx_dev_runtime47.jsxDEV(Text, {
68929
68903
  color: colors.subagent.header,
@@ -79598,4 +79572,4 @@ Error during initialization: ${message}`);
79598
79572
  }
79599
79573
  main();
79600
79574
 
79601
- //# debugId=11A19B3B80D4230464756E2164756E21
79575
+ //# debugId=893788A26E933AF064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.12.3",
3
+ "version": "0.12.4",
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": {