@letta-ai/letta-code 0.11.2-next.4 → 0.12.0

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 +28 -3
  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.11.2-next.4",
3240
+ version: "0.12.0",
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: {
@@ -71338,6 +71338,7 @@ function App2({
71338
71338
  buffersRef.current.byId.delete(statusId);
71339
71339
  buffersRef.current.order = buffersRef.current.order.filter((id) => id !== statusId);
71340
71340
  refreshDerived();
71341
+ buffersRef.current.interrupted = false;
71341
71342
  continue;
71342
71343
  }
71343
71344
  const errorToShow = lastFailureMessage || `An error occurred during agent execution
@@ -71377,6 +71378,7 @@ function App2({
71377
71378
  buffersRef.current.order = buffersRef.current.order.filter((id) => id !== statusId);
71378
71379
  refreshDerived();
71379
71380
  if (!cancelled) {
71381
+ buffersRef.current.interrupted = false;
71380
71382
  continue;
71381
71383
  }
71382
71384
  }
@@ -73330,7 +73332,11 @@ DO NOT respond to these messages or otherwise consider them in your response unl
73330
73332
  }
73331
73333
  }
73332
73334
  setIsExecutingTool(true);
73335
+ const approvalResultsSnapshot = [...approvalResults];
73336
+ const autoHandledSnapshot = [...autoHandledResults];
73337
+ const autoDeniedSnapshot = [...autoDeniedApprovals];
73333
73338
  const allDecisions = [
73339
+ ...approvalResultsSnapshot,
73334
73340
  { type: "approve", approval: currentApproval2 },
73335
73341
  ...nowAutoAllowed.map((r) => ({
73336
73342
  type: "approve",
@@ -73350,12 +73356,29 @@ DO NOT respond to these messages or otherwise consider them in your response unl
73350
73356
  onChunk(buffersRef.current, chunk);
73351
73357
  refreshDerived();
73352
73358
  });
73359
+ const allResults = [
73360
+ ...autoHandledSnapshot.map((ar) => ({
73361
+ type: "tool",
73362
+ tool_call_id: ar.toolCallId,
73363
+ tool_return: ar.result.toolReturn,
73364
+ status: ar.result.status,
73365
+ stdout: ar.result.stdout,
73366
+ stderr: ar.result.stderr
73367
+ })),
73368
+ ...autoDeniedSnapshot.map((ad) => ({
73369
+ type: "approval",
73370
+ tool_call_id: ad.approval.toolCallId,
73371
+ approve: false,
73372
+ reason: ad.reason
73373
+ })),
73374
+ ...executedResults
73375
+ ];
73353
73376
  setThinkingMessage(getRandomThinkingVerb());
73354
73377
  refreshDerived();
73355
73378
  await processConversation([
73356
73379
  {
73357
73380
  type: "approval",
73358
- approvals: executedResults
73381
+ approvals: allResults
73359
73382
  }
73360
73383
  ]);
73361
73384
  } finally {
@@ -73369,6 +73392,8 @@ DO NOT respond to these messages or otherwise consider them in your response unl
73369
73392
  approvalResults,
73370
73393
  approvalContexts,
73371
73394
  pendingApprovals,
73395
+ autoHandledResults,
73396
+ autoDeniedApprovals,
73372
73397
  handleApproveCurrent,
73373
73398
  processConversation,
73374
73399
  refreshDerived,
@@ -77770,4 +77795,4 @@ Error during initialization: ${message}`);
77770
77795
  }
77771
77796
  main();
77772
77797
 
77773
- //# debugId=91C0453F45E8BBAD64756E2164756E21
77798
+ //# debugId=6EE8B666F8368EAC64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.11.2-next.4",
3
+ "version": "0.12.0",
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": {