@tangle-network/agent-app 0.50.4 → 0.50.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/dist/assistant/index.js +1 -1
- package/dist/chat-routes/index.js +22 -12
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-routes/sandbox-producer.d.ts +4 -0
- package/dist/{chunk-KJEW23GR.js → chunk-3MIQCPUX.js} +2 -2
- package/dist/{chunk-DEXBRUZR.js → chunk-63EKFZOE.js} +31 -5
- package/dist/chunk-63EKFZOE.js.map +1 -0
- package/dist/{chunk-3NM4GCAY.js → chunk-DPO7FGCN.js} +9 -6
- package/dist/chunk-DPO7FGCN.js.map +1 -0
- package/dist/{chunk-TFW7OB4L.js → chunk-P5ZJQKOI.js} +3 -2
- package/dist/{chunk-TFW7OB4L.js.map → chunk-P5ZJQKOI.js.map} +1 -1
- package/dist/model-resolution/failover.d.ts +6 -0
- package/dist/model-resolution/index.js +1 -1
- package/dist/public-consultation/index.js +2 -2
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/recovery.d.ts +2 -0
- package/dist/stream/index.js +1 -1
- package/dist/stream/turn-identity.d.ts +16 -11
- package/dist/teams/index.js +5 -5
- package/dist/teams/invitations-api.js +4 -4
- package/dist/web-react/index.js +3 -3
- package/dist/workspace-apps/index.d.ts +66 -0
- package/dist/workspace-apps/index.js +99 -0
- package/dist/workspace-apps/index.js.map +1 -0
- package/dist/workspace-react/index.d.ts +15 -1
- package/dist/workspace-react/index.js +28 -7
- package/dist/workspace-react/index.js.map +1 -1
- package/package.json +6 -1
- package/dist/chunk-3NM4GCAY.js.map +0 -1
- package/dist/chunk-DEXBRUZR.js.map +0 -1
- /package/dist/{chunk-KJEW23GR.js.map → chunk-3MIQCPUX.js.map} +0 -0
package/dist/assistant/index.js
CHANGED
|
@@ -35,13 +35,14 @@ import {
|
|
|
35
35
|
buildModelChain,
|
|
36
36
|
isUpstreamUnavailable,
|
|
37
37
|
readHttpStatusHint,
|
|
38
|
+
readUpstreamUnavailableCode,
|
|
38
39
|
runWithModelFailover
|
|
39
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-63EKFZOE.js";
|
|
40
41
|
import {
|
|
41
42
|
flattenHistory,
|
|
42
43
|
readSandboxBinaryBytes,
|
|
43
44
|
statSandboxFileSize
|
|
44
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-P5ZJQKOI.js";
|
|
45
46
|
import "../chunk-MCYJON3F.js";
|
|
46
47
|
import "../chunk-LWSJK546.js";
|
|
47
48
|
import "../chunk-FZOGDD2E.js";
|
|
@@ -61,7 +62,7 @@ import {
|
|
|
61
62
|
rowIdOf,
|
|
62
63
|
storeSupportsDraftPersistence,
|
|
63
64
|
streamChatRouteAsSandboxEvents
|
|
64
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-3MIQCPUX.js";
|
|
65
66
|
import "../chunk-TZEEGDHS.js";
|
|
66
67
|
import "../chunk-3NCPXNBZ.js";
|
|
67
68
|
import "../chunk-ZSSCVT6H.js";
|
|
@@ -95,7 +96,7 @@ import "../chunk-ZVEEWGDK.js";
|
|
|
95
96
|
import {
|
|
96
97
|
isWorkspaceFileExportable
|
|
97
98
|
} from "../chunk-TXD5HXLE.js";
|
|
98
|
-
import "../chunk-
|
|
99
|
+
import "../chunk-DPO7FGCN.js";
|
|
99
100
|
import {
|
|
100
101
|
asRecord,
|
|
101
102
|
asString,
|
|
@@ -176,7 +177,7 @@ function classifyTerminalFailure(event) {
|
|
|
176
177
|
const data = asRecord(record2.data);
|
|
177
178
|
const outage = isUpstreamUnavailable(data) || isUpstreamUnavailable(record2);
|
|
178
179
|
const reason = asString(data?.message) ?? asString(data?.error) ?? asString(data?.reason) ?? asString(record2.message) ?? `sandbox stream reported ${type}`;
|
|
179
|
-
const code = asString(data?.errorCode) ?? asString(data?.code);
|
|
180
|
+
const code = readUpstreamUnavailableCode(data) ?? asString(data?.errorCode) ?? asString(data?.code) ?? readUpstreamUnavailableCode(record2) ?? asString(record2.errorCode) ?? asString(record2.code);
|
|
180
181
|
return { outage, reason, ...code ? { code } : {} };
|
|
181
182
|
}
|
|
182
183
|
var DEFAULT_MODEL_STREAM_OPEN_TIMEOUT_MS = 12e4;
|
|
@@ -671,7 +672,12 @@ function sandboxStreamFailureDiagnostic(error) {
|
|
|
671
672
|
"Please retry. If it repeats, send these support details to the team."
|
|
672
673
|
].join("\n\n");
|
|
673
674
|
const failureNote = diagnosticText ? `sandbox-stream: ${message}; ${diagnosticText}` : `sandbox-stream: ${message}`;
|
|
674
|
-
|
|
675
|
+
let code = "sandbox.stream_failed";
|
|
676
|
+
if (error instanceof ModelFailoverTimeoutError) {
|
|
677
|
+
code = error.code;
|
|
678
|
+
} else if (error instanceof ModelFailoverExhaustedError) {
|
|
679
|
+
code = error.upstreamCode ?? code;
|
|
680
|
+
}
|
|
675
681
|
return { userMessage, failureNote, code };
|
|
676
682
|
}
|
|
677
683
|
function createSandboxChatProducer(options) {
|
|
@@ -1033,13 +1039,15 @@ function createSandboxChatProducer(options) {
|
|
|
1033
1039
|
Error: ${message}` : `The sandbox agent returned an error before producing a visible answer.
|
|
1034
1040
|
|
|
1035
1041
|
Error: ${message}`;
|
|
1036
|
-
|
|
1042
|
+
if (options.includeErrorText !== false) {
|
|
1043
|
+
const errorDelta = fullText ? `
|
|
1037
1044
|
|
|
1038
1045
|
---
|
|
1039
1046
|
${errorContent}` : errorContent;
|
|
1040
|
-
|
|
1047
|
+
fullText += errorDelta;
|
|
1048
|
+
yield { type: "text", text: errorDelta };
|
|
1049
|
+
}
|
|
1041
1050
|
interactionOutcome = "expired";
|
|
1042
|
-
yield { type: "text", text: errorDelta };
|
|
1043
1051
|
yield* emitTerminalizedTools();
|
|
1044
1052
|
yield toProducerWireEvent(record2);
|
|
1045
1053
|
continue;
|
|
@@ -1053,13 +1061,15 @@ ${errorContent}` : errorContent;
|
|
|
1053
1061
|
failureNote: diagnostic.failureNote,
|
|
1054
1062
|
error: streamErr instanceof Error ? streamErr.message : String(streamErr)
|
|
1055
1063
|
});
|
|
1056
|
-
|
|
1064
|
+
if (options.includeErrorText !== false) {
|
|
1065
|
+
const errorDelta = fullText ? `
|
|
1057
1066
|
|
|
1058
1067
|
---
|
|
1059
1068
|
${diagnostic.userMessage}` : diagnostic.userMessage;
|
|
1060
|
-
|
|
1069
|
+
fullText += errorDelta;
|
|
1070
|
+
yield { type: "text", text: errorDelta };
|
|
1071
|
+
}
|
|
1061
1072
|
interactionOutcome = "expired";
|
|
1062
|
-
yield { type: "text", text: errorDelta };
|
|
1063
1073
|
yield* emitTerminalizedTools();
|
|
1064
1074
|
yield {
|
|
1065
1075
|
type: "error",
|