@letta-ai/letta-agent-sdk 0.8.40 → 0.8.41
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/README.md +5 -0
- package/dist/client-entry.js +8 -2
- package/dist/client-entry.js.map +4 -4
- package/dist/index.js +8 -2
- package/dist/index.js.map +4 -4
- package/dist/remote-session-protocol.d.ts +2 -0
- package/dist/remote-session-protocol.d.ts.map +1 -1
- package/dist/remote-turn-coordinator.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/remote-session-protocol.ts +2 -0
- package/src/remote-turn-coordinator.ts +13 -1
package/dist/index.js
CHANGED
|
@@ -13337,6 +13337,7 @@ class RemoteTurnCoordinator {
|
|
|
13337
13337
|
runIds: new Set,
|
|
13338
13338
|
observedTurnEvidence: false,
|
|
13339
13339
|
observedRequiresApprovalStop: false,
|
|
13340
|
+
observedRunError: false,
|
|
13340
13341
|
pendingTerminal: null,
|
|
13341
13342
|
pendingTerminalTimeout: null,
|
|
13342
13343
|
deferredMessages: [],
|
|
@@ -13608,7 +13609,7 @@ class RemoteTurnCoordinator {
|
|
|
13608
13609
|
return;
|
|
13609
13610
|
}
|
|
13610
13611
|
if (status === "WAITING_ON_INPUT" && active.observedTurnEvidence) {
|
|
13611
|
-
if (active.pendingTerminal)
|
|
13612
|
+
if (active.pendingTerminal || active.observedRunError)
|
|
13612
13613
|
return;
|
|
13613
13614
|
this.completeActiveTurn({
|
|
13614
13615
|
runtime: active.runtime,
|
|
@@ -13801,6 +13802,11 @@ class RemoteTurnCoordinator {
|
|
|
13801
13802
|
runId
|
|
13802
13803
|
};
|
|
13803
13804
|
}
|
|
13805
|
+
if (messageType === "error_message" && runId !== undefined && typeof delta.error_type === "string" || messageType === "loop_error" && delta.is_terminal === false) {
|
|
13806
|
+
if (this.activeTurn)
|
|
13807
|
+
this.activeTurn.observedRunError = true;
|
|
13808
|
+
return { type: "stream_event", event: delta, uuid };
|
|
13809
|
+
}
|
|
13804
13810
|
if (messageType === "error_message" || messageType === "loop_error") {
|
|
13805
13811
|
const detail = (typeof delta.detail === "string" ? delta.detail : undefined) ?? (typeof delta.message === "string" ? delta.message : undefined) ?? `${this.label} turn failed`;
|
|
13806
13812
|
const stopReason = (typeof delta.stop_reason === "string" ? delta.stop_reason : undefined) ?? (typeof delta.error_type === "string" ? delta.error_type : undefined) ?? "error";
|
|
@@ -35799,4 +35805,4 @@ export {
|
|
|
35799
35805
|
CloudManagedSandboxExpiredError
|
|
35800
35806
|
};
|
|
35801
35807
|
|
|
35802
|
-
//# debugId=
|
|
35808
|
+
//# debugId=C9386DA7453F4EF864756E2164756E21
|