@tangle-network/agent-app 4.0.29 → 4.0.31
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/chat-routes/index.js +5 -5
- package/dist/{chunk-RK2VCJQW.js → chunk-5L3X42ES.js} +2 -2
- package/dist/{chunk-LSUJ2RIC.js → chunk-AG5Q273U.js} +2 -2
- package/dist/{chunk-WXK2AKRZ.js → chunk-DSFMSRWT.js} +11 -9
- package/dist/chunk-DSFMSRWT.js.map +1 -0
- package/dist/{chunk-7TZX2KSH.js → chunk-G3W3EIP4.js} +11 -4
- package/dist/chunk-G3W3EIP4.js.map +1 -0
- package/dist/{chunk-H7NMUXNZ.js → chunk-JLKH2VYF.js} +5 -4
- package/dist/chunk-JLKH2VYF.js.map +1 -0
- package/dist/preset-cloudflare/index.js +1 -1
- package/dist/public-consultation/index.js +4 -4
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/router-turn.js +2 -2
- package/dist/sandbox/index.js +2 -2
- package/dist/turn-trace/index.js +1 -1
- package/dist/turn-trace/recorder.d.ts +2 -1
- package/package.json +1 -1
- package/dist/chunk-7TZX2KSH.js.map +0 -1
- package/dist/chunk-H7NMUXNZ.js.map +0 -1
- package/dist/chunk-WXK2AKRZ.js.map +0 -1
- /package/dist/{chunk-RK2VCJQW.js.map → chunk-5L3X42ES.js.map} +0 -0
- /package/dist/{chunk-LSUJ2RIC.js.map → chunk-AG5Q273U.js.map} +0 -0
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "../chunk-UFR4BXCC.js";
|
|
44
44
|
import {
|
|
45
45
|
runProtectedRouterTurn
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-5L3X42ES.js";
|
|
47
47
|
import {
|
|
48
48
|
HYBRID_TURN_GUIDANCE,
|
|
49
49
|
INTENT_LINE_HISTORY_MESSAGES,
|
|
@@ -74,14 +74,14 @@ import {
|
|
|
74
74
|
turnPromptText,
|
|
75
75
|
valueRedactor,
|
|
76
76
|
withProducerStream
|
|
77
|
-
} from "../chunk-
|
|
77
|
+
} from "../chunk-DSFMSRWT.js";
|
|
78
78
|
import "../chunk-SBHFMDR7.js";
|
|
79
79
|
import "../chunk-H6BRJU5M.js";
|
|
80
80
|
import "../chunk-4DBHC63F.js";
|
|
81
81
|
import "../chunk-RN4WPTBH.js";
|
|
82
82
|
import "../chunk-MM6RLOXF.js";
|
|
83
83
|
import "../chunk-M4QITAQV.js";
|
|
84
|
-
import "../chunk-
|
|
84
|
+
import "../chunk-G3W3EIP4.js";
|
|
85
85
|
import "../chunk-F4TUZYMX.js";
|
|
86
86
|
import {
|
|
87
87
|
redactErrorMessage
|
|
@@ -187,9 +187,9 @@ import "../chunk-S5SRJJQG.js";
|
|
|
187
187
|
import "../chunk-GD4ONMKJ.js";
|
|
188
188
|
import "../chunk-UGWQLQDS.js";
|
|
189
189
|
import "../chunk-R32MULDK.js";
|
|
190
|
-
import "../chunk-
|
|
190
|
+
import "../chunk-AG5Q273U.js";
|
|
191
191
|
import "../chunk-D6UJEOZQ.js";
|
|
192
|
-
import "../chunk-
|
|
192
|
+
import "../chunk-JLKH2VYF.js";
|
|
193
193
|
import "../chunk-KSLTD4FI.js";
|
|
194
194
|
import {
|
|
195
195
|
sniffMimeFromName
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRouterTurn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AG5Q273U.js";
|
|
4
4
|
|
|
5
5
|
// src/runtime/protected-model.ts
|
|
6
6
|
var GATEWAY_ORIGIN = "https://candidate-router.tangle.tools";
|
|
@@ -217,4 +217,4 @@ export {
|
|
|
217
217
|
createRouterProtectedModelPort,
|
|
218
218
|
runProtectedRouterTurn
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-5L3X42ES.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
nextCallIndex,
|
|
6
6
|
tracedModelFetch,
|
|
7
7
|
turnTraceId
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JLKH2VYF.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeModelId
|
|
11
11
|
} from "./chunk-KSLTD4FI.js";
|
|
@@ -1104,4 +1104,4 @@ export {
|
|
|
1104
1104
|
composeRouterTurnPrompt,
|
|
1105
1105
|
runRouterTurn
|
|
1106
1106
|
};
|
|
1107
|
-
//# sourceMappingURL=chunk-
|
|
1107
|
+
//# sourceMappingURL=chunk-AG5Q273U.js.map
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
sandboxRunFailureDetail,
|
|
31
31
|
streamSandboxPrompt,
|
|
32
32
|
turnStorageBindings
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-G3W3EIP4.js";
|
|
34
34
|
import {
|
|
35
35
|
redactErrorMessage
|
|
36
36
|
} from "./chunk-MH74DY2I.js";
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
composeRouterTurnPromptSections,
|
|
147
147
|
narratesBefore,
|
|
148
148
|
runRouterTurn
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-AG5Q273U.js";
|
|
150
150
|
import {
|
|
151
151
|
createIntelligenceTurnTraceReader,
|
|
152
152
|
createIntelligenceTurnTraceSink,
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
formatServerTiming,
|
|
155
155
|
otlpTraceId,
|
|
156
156
|
turnTraceId
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-JLKH2VYF.js";
|
|
158
158
|
import {
|
|
159
159
|
readSandboxBinaryBytes,
|
|
160
160
|
statSandboxFileSize
|
|
@@ -848,17 +848,19 @@ function createHybridTurnProducer(options) {
|
|
|
848
848
|
});
|
|
849
849
|
};
|
|
850
850
|
let settled;
|
|
851
|
+
const step = (name, work) => router.trace ? router.trace.measure(`hybrid.settle.${name}`, "sandbox", work) : work();
|
|
851
852
|
const settle = () => settled ??= (async () => {
|
|
852
853
|
abort.abort(new Error("The hybrid turn settled"));
|
|
853
|
-
|
|
854
|
-
|
|
854
|
+
const starting = box.started ?? start;
|
|
855
|
+
if (starting) await step("box_start", () => starting.catch(() => void 0));
|
|
856
|
+
const results = await step("release", () => Promise.allSettled([Promise.resolve().then(() => box.dispose?.()), Promise.resolve().then(() => onSettled?.())]));
|
|
855
857
|
for (const result of results) if (result.status === "rejected") {
|
|
856
858
|
console.error(JSON.stringify({ event: "hybrid_turn_settle_failed", error: redactErrorMessage(result.reason) }));
|
|
857
859
|
}
|
|
858
860
|
})();
|
|
859
861
|
try {
|
|
860
|
-
const
|
|
861
|
-
const runBoxTask = box.runTask ??
|
|
862
|
+
const step2 = box.computer ? createComputerStep({ ...box.computer, parentExecutionId: box.computer.parentExecutionId ?? router.traceId }) : void 0;
|
|
863
|
+
const runBoxTask = box.runTask ?? step2?.runTask;
|
|
862
864
|
if (!runBoxTask) throw new Error("A hybrid box needs runTask or computer");
|
|
863
865
|
const warnings = /* @__PURE__ */ new Map();
|
|
864
866
|
const details = /* @__PURE__ */ new Map();
|
|
@@ -906,7 +908,7 @@ function createHybridTurnProducer(options) {
|
|
|
906
908
|
...onSpeculate ? { onSpeculate } : {}
|
|
907
909
|
});
|
|
908
910
|
speculator.onInput({ text: speculateOn ?? router.userMessage, ...attachments ? { attachments } : {} });
|
|
909
|
-
const extra = guidance === false ? "" : [guidance ?? HYBRID_TURN_GUIDANCE,
|
|
911
|
+
const extra = guidance === false ? "" : [guidance ?? HYBRID_TURN_GUIDANCE, step2?.guidance].filter(Boolean).join("\n\n");
|
|
910
912
|
const producer = createRouterTurnProducer({
|
|
911
913
|
...router,
|
|
912
914
|
systemPrompt: Promise.resolve(router.systemPrompt).then((prompt) => !extra ? prompt : typeof prompt === "string" ? `${prompt}
|
|
@@ -3745,4 +3747,4 @@ export {
|
|
|
3745
3747
|
createChatTurnRoutes,
|
|
3746
3748
|
streamChatRouteAsSandboxEvents
|
|
3747
3749
|
};
|
|
3748
|
-
//# sourceMappingURL=chunk-
|
|
3750
|
+
//# sourceMappingURL=chunk-DSFMSRWT.js.map
|