@tangle-network/agent-app 0.46.51 → 0.46.52
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 +1 -1
- package/dist/{chunk-TCNH6XDK.js → chunk-FS6YF4ZV.js} +1 -32
- package/dist/chunk-FS6YF4ZV.js.map +1 -0
- package/dist/preset-cloudflare/detached-turn-workflow.d.ts +0 -28
- package/dist/preset-cloudflare/index.d.ts +1 -1
- package/dist/preset-cloudflare/index.js +1 -37
- package/dist/preset-cloudflare/index.js.map +1 -1
- package/dist/sandbox/index.d.ts +0 -1
- package/dist/sandbox/index.js +1 -3
- package/package.json +1 -1
- package/dist/chunk-TCNH6XDK.js.map +0 -1
- package/dist/sandbox/session-turn.d.ts +0 -41
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
flattenHistory,
|
|
113
113
|
readSandboxBinaryBytes,
|
|
114
114
|
statSandboxFileSize
|
|
115
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-FS6YF4ZV.js";
|
|
116
116
|
import "../chunk-MCYJON3F.js";
|
|
117
117
|
import "../chunk-LWSJK546.js";
|
|
118
118
|
import "../chunk-P5PIAQVS.js";
|
|
@@ -155,36 +155,6 @@ async function readSandboxBinaryBytes(box, absolutePath, expectedSize, options)
|
|
|
155
155
|
return { succeeded: true, value: { bytes, size: expectedSize } };
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
// src/sandbox/session-turn.ts
|
|
159
|
-
function stableId(value, field) {
|
|
160
|
-
const normalized = value.trim();
|
|
161
|
-
if (!normalized) throw new Error(`Sandbox session turn requires a non-empty ${field}`);
|
|
162
|
-
return normalized;
|
|
163
|
-
}
|
|
164
|
-
async function admitSandboxSessionTurn(options) {
|
|
165
|
-
const sessionId = stableId(options.sessionId, "sessionId");
|
|
166
|
-
const turnId = stableId(options.turnId, "turnId");
|
|
167
|
-
if (options.message.parts.length === 0) {
|
|
168
|
-
throw new Error("Sandbox session turn requires at least one message part");
|
|
169
|
-
}
|
|
170
|
-
const created = await options.box.createSession({
|
|
171
|
-
sessionId,
|
|
172
|
-
backend: options.backend,
|
|
173
|
-
...options.title !== void 0 ? { title: options.title } : {}
|
|
174
|
-
});
|
|
175
|
-
if (!isExpectedSession(created, sessionId)) {
|
|
176
|
-
throw new Error(`Sandbox returned a different session for ${sessionId}`);
|
|
177
|
-
}
|
|
178
|
-
const receipt = await created.session.sendMessage(
|
|
179
|
-
{ ...options.message, turnId },
|
|
180
|
-
options.sendOptions
|
|
181
|
-
);
|
|
182
|
-
return { sessionId, turnId, receipt };
|
|
183
|
-
}
|
|
184
|
-
function isExpectedSession(created, sessionId) {
|
|
185
|
-
return created.info.id === sessionId && created.session.id === sessionId;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
158
|
// src/sandbox/recovery.ts
|
|
189
159
|
var EGRESS_PROXY_RECOVERY_REQUIRED = "EGRESS_PROXY_RECOVERY_REQUIRED";
|
|
190
160
|
var EGRESS_PROXY_RECOVERY_PHASE = "egress_proxy_recovery";
|
|
@@ -2765,7 +2735,6 @@ export {
|
|
|
2765
2735
|
shellQuote,
|
|
2766
2736
|
statSandboxFileSize,
|
|
2767
2737
|
readSandboxBinaryBytes,
|
|
2768
|
-
admitSandboxSessionTurn,
|
|
2769
2738
|
EGRESS_PROXY_RECOVERY_REQUIRED,
|
|
2770
2739
|
EGRESS_PROXY_RECOVERY_PHASE,
|
|
2771
2740
|
WORKSPACE_SANDBOX_MISSING,
|
|
@@ -2860,4 +2829,4 @@ export {
|
|
|
2860
2829
|
isTerminalPromptEvent,
|
|
2861
2830
|
detectInteractiveQuestion
|
|
2862
2831
|
};
|
|
2863
|
-
//# sourceMappingURL=chunk-
|
|
2832
|
+
//# sourceMappingURL=chunk-FS6YF4ZV.js.map
|