@tangle-network/agent-app 0.45.17 → 0.45.19
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 +1 -1
- package/dist/{chunk-GWSBBSEW.js → chunk-AH3IOSWF.js} +2 -2
- package/dist/chunk-AH3IOSWF.js.map +1 -0
- package/dist/{chunk-6JPFYXEU.js → chunk-OS62B34S.js} +32 -1
- package/dist/chunk-OS62B34S.js.map +1 -0
- package/dist/sandbox/index.d.ts +24 -1
- package/dist/sandbox/index.js +3 -1
- package/dist/web-react/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6JPFYXEU.js.map +0 -1
- package/dist/chunk-GWSBBSEW.js.map +0 -1
|
@@ -1885,6 +1885,36 @@ function attachReasoningEffort(profile, harness, effort) {
|
|
|
1885
1885
|
}
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
|
+
function adaptSandboxStream(events) {
|
|
1889
|
+
return (async function* () {
|
|
1890
|
+
for await (const rawEvent of events) {
|
|
1891
|
+
if (!rawEvent || typeof rawEvent !== "object" || Array.isArray(rawEvent)) continue;
|
|
1892
|
+
const event = rawEvent;
|
|
1893
|
+
const rawData = event.data;
|
|
1894
|
+
const dataRecord = rawData && typeof rawData === "object" && !Array.isArray(rawData) ? rawData : null;
|
|
1895
|
+
const data = {};
|
|
1896
|
+
const rawPart = dataRecord?.part;
|
|
1897
|
+
if (rawPart && typeof rawPart === "object" && !Array.isArray(rawPart)) {
|
|
1898
|
+
const part = rawPart;
|
|
1899
|
+
const normalizedPart = {};
|
|
1900
|
+
if (typeof part.type === "string") normalizedPart.type = part.type;
|
|
1901
|
+
if (typeof part.text === "string") normalizedPart.text = part.text;
|
|
1902
|
+
if (Object.keys(normalizedPart).length > 0) data.part = normalizedPart;
|
|
1903
|
+
}
|
|
1904
|
+
if (typeof dataRecord?.delta === "string") data.delta = dataRecord.delta;
|
|
1905
|
+
if (typeof dataRecord?.finalText === "string") data.finalText = dataRecord.finalText;
|
|
1906
|
+
const rawInputRequired = dataRecord?.inputRequired;
|
|
1907
|
+
if (rawInputRequired && typeof rawInputRequired === "object" && !Array.isArray(rawInputRequired)) {
|
|
1908
|
+
const prompt = rawInputRequired.prompt;
|
|
1909
|
+
data.inputRequired = typeof prompt === "string" ? { prompt } : {};
|
|
1910
|
+
}
|
|
1911
|
+
yield {
|
|
1912
|
+
...typeof event.type === "string" ? { type: event.type } : {},
|
|
1913
|
+
...Object.keys(data).length > 0 ? { data } : {}
|
|
1914
|
+
};
|
|
1915
|
+
}
|
|
1916
|
+
})();
|
|
1917
|
+
}
|
|
1888
1918
|
async function* streamSandboxPrompt(shell, box, message, options) {
|
|
1889
1919
|
const harness = options?.harness ?? "opencode";
|
|
1890
1920
|
const model = requireTransportableModel(
|
|
@@ -2221,6 +2251,7 @@ export {
|
|
|
2221
2251
|
mergeHistoryIntoParts,
|
|
2222
2252
|
mergeExtraMcp,
|
|
2223
2253
|
attachReasoningEffort,
|
|
2254
|
+
adaptSandboxStream,
|
|
2224
2255
|
streamSandboxPrompt,
|
|
2225
2256
|
collectSandboxPromptText,
|
|
2226
2257
|
runSandboxPrompt,
|
|
@@ -2237,4 +2268,4 @@ export {
|
|
|
2237
2268
|
isTerminalPromptEvent,
|
|
2238
2269
|
detectInteractiveQuestion
|
|
2239
2270
|
};
|
|
2240
|
-
//# sourceMappingURL=chunk-
|
|
2271
|
+
//# sourceMappingURL=chunk-OS62B34S.js.map
|