@tangle-network/agent-app 0.63.25 → 0.63.26
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 +7 -7
- package/dist/chat-react/index.js +3 -3
- package/dist/chat-routes/hybrid-producer.d.ts +4 -0
- package/dist/chat-routes/index.js +24 -24
- package/dist/chat-routes/wire.d.ts +2 -0
- package/dist/chat-store/index.js +4 -4
- package/dist/chat-store/parts.d.ts +2 -0
- package/dist/{chunk-6RGNXPXW.js → chunk-36HSG7HU.js} +5 -5
- package/dist/chunk-36HSG7HU.js.map +1 -0
- package/dist/{chunk-VOXKDO4T.js → chunk-56JUV4DK.js} +110 -35
- package/dist/chunk-56JUV4DK.js.map +1 -0
- package/dist/{chunk-QJ5DSIHV.js → chunk-6LMM3OVX.js} +3 -3
- package/dist/{chunk-56OUN2WP.js → chunk-BQGJ5IDP.js} +10 -10
- package/dist/{chunk-KADVQCAS.js → chunk-CWO2LHXH.js} +2 -2
- package/dist/{chunk-3WU6HDEZ.js → chunk-DCJCZ7EP.js} +38 -29
- package/dist/chunk-DCJCZ7EP.js.map +1 -0
- package/dist/{chunk-VUBJZEZB.js → chunk-O5AUJQIA.js} +2 -2
- package/dist/{chunk-NHVSO47Q.js → chunk-P7UB7ZVP.js} +2 -2
- package/dist/{chunk-WRCMVBUJ.js → chunk-PFTOGTHH.js} +3 -3
- package/dist/{chunk-5TSRFF5W.js → chunk-QGJOT6R6.js} +1 -1
- package/dist/chunk-QGJOT6R6.js.map +1 -0
- package/dist/{chunk-6VQCFJWP.js → chunk-SRZTL3Z5.js} +3 -3
- package/dist/{chunk-6VQCFJWP.js.map → chunk-SRZTL3Z5.js.map} +1 -1
- package/dist/{chunk-ZLP75JF5.js → chunk-ZZTPTCMY.js} +2 -2
- package/dist/interactions/contract.d.ts +3 -1
- package/dist/interactions/index.js +2 -2
- package/dist/operator/index.js +2 -2
- package/dist/preset-cloudflare/index.js +6 -6
- package/dist/public-consultation/index.js +8 -8
- package/dist/sandbox/app-tools.d.ts +24 -4
- package/dist/sandbox/index.js +4 -1
- package/dist/sandbox/payload-limits.d.ts +29 -0
- package/dist/sandbox/prompt-options.d.ts +5 -0
- package/dist/sandbox/sandbox-run-tool.d.ts +14 -3
- package/dist/stream/index.js +2 -2
- package/dist/web-react/index.js +29 -29
- package/package.json +1 -1
- package/dist/chunk-3WU6HDEZ.js.map +0 -1
- package/dist/chunk-5TSRFF5W.js.map +0 -1
- package/dist/chunk-6RGNXPXW.js.map +0 -1
- package/dist/chunk-VOXKDO4T.js.map +0 -1
- /package/dist/{chunk-QJ5DSIHV.js.map → chunk-6LMM3OVX.js.map} +0 -0
- /package/dist/{chunk-56OUN2WP.js.map → chunk-BQGJ5IDP.js.map} +0 -0
- /package/dist/{chunk-KADVQCAS.js.map → chunk-CWO2LHXH.js.map} +0 -0
- /package/dist/{chunk-VUBJZEZB.js.map → chunk-O5AUJQIA.js.map} +0 -0
- /package/dist/{chunk-NHVSO47Q.js.map → chunk-P7UB7ZVP.js.map} +0 -0
- /package/dist/{chunk-WRCMVBUJ.js.map → chunk-PFTOGTHH.js.map} +0 -0
- /package/dist/{chunk-ZLP75JF5.js.map → chunk-ZZTPTCMY.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toChatMessageParts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-36HSG7HU.js";
|
|
4
4
|
import {
|
|
5
5
|
asRecord
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O5AUJQIA.js";
|
|
7
7
|
|
|
8
8
|
// src/chat-routes/draft-persistence.ts
|
|
9
9
|
var CONTENT_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -222,4 +222,4 @@ export {
|
|
|
222
222
|
assistantRowIdForTurn,
|
|
223
223
|
addStepFinishUsage
|
|
224
224
|
};
|
|
225
|
-
//# sourceMappingURL=chunk-
|
|
225
|
+
//# sourceMappingURL=chunk-6LMM3OVX.js.map
|
|
@@ -52,14 +52,7 @@ import {
|
|
|
52
52
|
} from "./chunk-AVP5SNIG.js";
|
|
53
53
|
import {
|
|
54
54
|
attachmentPartsFromMessageParts
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import {
|
|
57
|
-
TURN_INTENT_EVENT,
|
|
58
|
-
TURN_PHASE_EVENT,
|
|
59
|
-
isTurnIntentEvent,
|
|
60
|
-
isTurnPhaseEvent,
|
|
61
|
-
settleTurnResponse
|
|
62
|
-
} from "./chunk-5TSRFF5W.js";
|
|
55
|
+
} from "./chunk-36HSG7HU.js";
|
|
63
56
|
import {
|
|
64
57
|
cancelStatusFor,
|
|
65
58
|
fieldAcceptsFreeText,
|
|
@@ -69,7 +62,14 @@ import {
|
|
|
69
62
|
parseInteractionRequest,
|
|
70
63
|
persistedPartToInteraction,
|
|
71
64
|
questionInteractionContentSignature
|
|
72
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-SRZTL3Z5.js";
|
|
66
|
+
import {
|
|
67
|
+
TURN_INTENT_EVENT,
|
|
68
|
+
TURN_PHASE_EVENT,
|
|
69
|
+
isTurnIntentEvent,
|
|
70
|
+
isTurnPhaseEvent,
|
|
71
|
+
settleTurnResponse
|
|
72
|
+
} from "./chunk-QGJOT6R6.js";
|
|
73
73
|
import {
|
|
74
74
|
parsePlanSubmittedEvent,
|
|
75
75
|
persistedPartToPlan
|
|
@@ -8414,4 +8414,4 @@ export {
|
|
|
8414
8414
|
AgentProfileChoices,
|
|
8415
8415
|
ComposerProfilePill
|
|
8416
8416
|
};
|
|
8417
|
-
//# sourceMappingURL=chunk-
|
|
8417
|
+
//# sourceMappingURL=chunk-BQGJ5IDP.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
interactionFromWireRequest,
|
|
3
3
|
isSafeInteractionFieldKey,
|
|
4
4
|
questionInteractionContentSignature
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SRZTL3Z5.js";
|
|
6
6
|
import {
|
|
7
7
|
parseJsonObjectBody
|
|
8
8
|
} from "./chunk-ALIWB2P3.js";
|
|
@@ -378,4 +378,4 @@ export {
|
|
|
378
378
|
mapInteractionRespondFailure,
|
|
379
379
|
createInteractionAnswerRoute
|
|
380
380
|
};
|
|
381
|
-
//# sourceMappingURL=chunk-
|
|
381
|
+
//# sourceMappingURL=chunk-CWO2LHXH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createInteractionAnswerRoute
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CWO2LHXH.js";
|
|
4
4
|
import {
|
|
5
5
|
noteMeasuredTurnFacts,
|
|
6
6
|
readableTurnFailure
|
|
@@ -24,9 +24,10 @@ import {
|
|
|
24
24
|
runForegroundSandboxSingleFlight,
|
|
25
25
|
sandboxPromptExecutionOptions,
|
|
26
26
|
sandboxPromptRunner,
|
|
27
|
+
sandboxRunFailureDetail,
|
|
27
28
|
streamSandboxPrompt,
|
|
28
29
|
turnStorageBindings
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-56JUV4DK.js";
|
|
30
31
|
import {
|
|
31
32
|
redactErrorMessage
|
|
32
33
|
} from "./chunk-MH74DY2I.js";
|
|
@@ -36,7 +37,7 @@ import {
|
|
|
36
37
|
createAssistantDraftWriter,
|
|
37
38
|
rowIdOf,
|
|
38
39
|
storeSupportsDraftPersistence
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6LMM3OVX.js";
|
|
40
41
|
import {
|
|
41
42
|
normalizeClientTurnId,
|
|
42
43
|
resolveChatTurn
|
|
@@ -45,26 +46,7 @@ import {
|
|
|
45
46
|
historyContentWithAttachments,
|
|
46
47
|
mentionInputToPart,
|
|
47
48
|
toChatMessageParts
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import {
|
|
50
|
-
ChatTurnInputError,
|
|
51
|
-
DISPATCH_MAX_PARTS,
|
|
52
|
-
DISPATCH_REQUEST_MAX_BYTES,
|
|
53
|
-
DISPATCH_STRUCTURAL_RESERVE_BYTES,
|
|
54
|
-
INLINE_PARTS_MAX_BYTES,
|
|
55
|
-
TURN_INTENT_EVENT,
|
|
56
|
-
TURN_PROGRESS_FIRST,
|
|
57
|
-
TURN_PROGRESS_HEADER,
|
|
58
|
-
TURN_ROUTE_PHASE_MESSAGES,
|
|
59
|
-
assertPromptPartsWithinCap,
|
|
60
|
-
base64WireLen,
|
|
61
|
-
buildTurnPhaseEvent,
|
|
62
|
-
chatTurnRequestInit,
|
|
63
|
-
mediaTypeForMentionPath,
|
|
64
|
-
parseChatTurnParts,
|
|
65
|
-
parseFileMentions,
|
|
66
|
-
turnResponseEventFor
|
|
67
|
-
} from "./chunk-5TSRFF5W.js";
|
|
49
|
+
} from "./chunk-36HSG7HU.js";
|
|
68
50
|
import {
|
|
69
51
|
asRecord,
|
|
70
52
|
asString,
|
|
@@ -76,7 +58,7 @@ import {
|
|
|
76
58
|
normalizePersistedPart,
|
|
77
59
|
normalizeToolEvent,
|
|
78
60
|
terminalizeDanglingAssistantToolUpdates
|
|
79
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-O5AUJQIA.js";
|
|
80
62
|
import {
|
|
81
63
|
cancelStatusFor,
|
|
82
64
|
interactionPartKey,
|
|
@@ -86,7 +68,7 @@ import {
|
|
|
86
68
|
noticePartKey,
|
|
87
69
|
parseInteractionCancel,
|
|
88
70
|
parseInteractionRequest
|
|
89
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-SRZTL3Z5.js";
|
|
90
72
|
import {
|
|
91
73
|
parseJsonObjectBody
|
|
92
74
|
} from "./chunk-ALIWB2P3.js";
|
|
@@ -96,6 +78,25 @@ import {
|
|
|
96
78
|
replayTurnEvents,
|
|
97
79
|
stampReplaySeq
|
|
98
80
|
} from "./chunk-3Q3UEWKK.js";
|
|
81
|
+
import {
|
|
82
|
+
ChatTurnInputError,
|
|
83
|
+
DISPATCH_MAX_PARTS,
|
|
84
|
+
DISPATCH_REQUEST_MAX_BYTES,
|
|
85
|
+
DISPATCH_STRUCTURAL_RESERVE_BYTES,
|
|
86
|
+
INLINE_PARTS_MAX_BYTES,
|
|
87
|
+
TURN_INTENT_EVENT,
|
|
88
|
+
TURN_PROGRESS_FIRST,
|
|
89
|
+
TURN_PROGRESS_HEADER,
|
|
90
|
+
TURN_ROUTE_PHASE_MESSAGES,
|
|
91
|
+
assertPromptPartsWithinCap,
|
|
92
|
+
base64WireLen,
|
|
93
|
+
buildTurnPhaseEvent,
|
|
94
|
+
chatTurnRequestInit,
|
|
95
|
+
mediaTypeForMentionPath,
|
|
96
|
+
parseChatTurnParts,
|
|
97
|
+
parseFileMentions,
|
|
98
|
+
turnResponseEventFor
|
|
99
|
+
} from "./chunk-QGJOT6R6.js";
|
|
99
100
|
import {
|
|
100
101
|
ModelFailoverExhaustedError,
|
|
101
102
|
buildModelChain,
|
|
@@ -435,9 +436,10 @@ function createHybridTurnProducer(options) {
|
|
|
435
436
|
})();
|
|
436
437
|
try {
|
|
437
438
|
const warnings = /* @__PURE__ */ new Map();
|
|
439
|
+
const details = /* @__PURE__ */ new Map();
|
|
438
440
|
const withWarnings = (parts) => parts.flatMap((part) => {
|
|
439
441
|
const warning = warnings.get(String(part.callID ?? part.id ?? ""));
|
|
440
|
-
return warning ? [part, noticePart(warning.noticeKind, warning.id, warning.text, warning.code)] : [part];
|
|
442
|
+
return warning ? [part, noticePart(warning.noticeKind, warning.id, warning.text, warning.code, warning.detail)] : [part];
|
|
441
443
|
});
|
|
442
444
|
const sandboxRun = createSandboxRunTool({
|
|
443
445
|
box: () => acquire(),
|
|
@@ -459,7 +461,12 @@ function createHybridTurnProducer(options) {
|
|
|
459
461
|
timeoutMs,
|
|
460
462
|
signal: stop,
|
|
461
463
|
...box.warm ? { warm: box.warm } : {},
|
|
462
|
-
|
|
464
|
+
onFailure: (error, call) => {
|
|
465
|
+
const detail = sandboxRunFailureDetail(error);
|
|
466
|
+
if (call.callId) details.set(call.callId, detail);
|
|
467
|
+
if (box.onFailure) box.onFailure(error, call);
|
|
468
|
+
else console.error(JSON.stringify({ event: "agent_app_sandbox_run_failed", callId: call.callId ?? null, code: error.code, detail }));
|
|
469
|
+
},
|
|
463
470
|
...box.name ? { name: box.name } : {},
|
|
464
471
|
...box.description ? { description: box.description } : {}
|
|
465
472
|
});
|
|
@@ -487,12 +494,14 @@ ${extra}` : { ...prompt, stable: [...prompt.stable ?? [], extra] }),
|
|
|
487
494
|
const code = event.error.code;
|
|
488
495
|
if (code === "sandbox_unconfirmed") unconfirmed = true;
|
|
489
496
|
if (code === "sandbox_unavailable" || code === "sandbox_failed" || code === "sandbox_unconfirmed" || code === "sandbox_empty") {
|
|
497
|
+
const detail = details.get(event.callId);
|
|
490
498
|
warnings.set(event.callId, {
|
|
491
499
|
type: "notice",
|
|
492
500
|
noticeKind: "warning",
|
|
493
501
|
id: `sandbox-warning:${event.callId}`,
|
|
494
502
|
code,
|
|
495
|
-
text: code === "sandbox_unavailable" ? "The workspace computer is unavailable. I can continue with work that does not need it." : "The computer step did not return a confirmed answer. I can continue with work that does not need it."
|
|
503
|
+
text: code === "sandbox_unavailable" ? "The workspace computer is unavailable. I can continue with work that does not need it." : "The computer step did not return a confirmed answer. I can continue with work that does not need it.",
|
|
504
|
+
...detail ? { detail } : {}
|
|
496
505
|
});
|
|
497
506
|
}
|
|
498
507
|
}
|
|
@@ -3916,4 +3925,4 @@ export {
|
|
|
3916
3925
|
createChatTurnRoutes,
|
|
3917
3926
|
streamChatRouteAsSandboxEvents
|
|
3918
3927
|
};
|
|
3919
|
-
//# sourceMappingURL=chunk-
|
|
3928
|
+
//# sourceMappingURL=chunk-DCJCZ7EP.js.map
|