@tangle-network/agent-app 0.45.10 → 0.45.12
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-EPOPI77J.js → chunk-AIZZU6ZW.js} +17 -4
- package/dist/chunk-AIZZU6ZW.js.map +1 -0
- package/dist/{chunk-ZSJRDHCN.js → chunk-S24VVLKV.js} +2 -1
- package/dist/chunk-S24VVLKV.js.map +1 -0
- package/dist/peer-floors/check.js +1 -1
- package/dist/peer-floors/cli.js +1 -1
- package/dist/sandbox/index.d.ts +14 -1
- package/dist/sandbox/index.js +3 -1
- package/package.json +1 -1
- package/dist/chunk-EPOPI77J.js.map +0 -1
- package/dist/chunk-ZSJRDHCN.js.map +0 -1
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
flattenHistory,
|
|
101
101
|
readSandboxBinaryBytes,
|
|
102
102
|
statSandboxFileSize
|
|
103
|
-
} from "../chunk-
|
|
103
|
+
} from "../chunk-AIZZU6ZW.js";
|
|
104
104
|
import "../chunk-73F3CKVK.js";
|
|
105
105
|
import "../chunk-LWSJK546.js";
|
|
106
106
|
import "../chunk-C5OIABSB.js";
|
|
@@ -529,6 +529,13 @@ function isSandboxHostCapacityFailure(diagnostics) {
|
|
|
529
529
|
return /host has no available slot|host capacity reservation failed/i.test(cause.message);
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
+
function isSandboxBoxConfigFailure(diagnostics) {
|
|
533
|
+
return diagnostics.causes.some((cause) => {
|
|
534
|
+
if (cause.origin !== "sandbox-api") return false;
|
|
535
|
+
if (typeof cause.message !== "string") return false;
|
|
536
|
+
return /has no recorded egress policy|cannot rebuild the proxy config/i.test(cause.message);
|
|
537
|
+
});
|
|
538
|
+
}
|
|
532
539
|
function sandboxApiEndpointPath(endpoint) {
|
|
533
540
|
if (endpoint.startsWith("/")) return endpoint;
|
|
534
541
|
try {
|
|
@@ -1330,6 +1337,7 @@ async function deleteBox(box) {
|
|
|
1330
1337
|
var SHELL_PROMPT_BUDGET_HINT = "If this prompt size is a decision you already made at compose time, mirror it on the shell as `promptBudget: { maxSystemPromptBytes, overBudgetReason }` \u2014 the shell gate is the one that sees the profile actually sent.";
|
|
1331
1338
|
var PROVISION_PAYLOAD_MAX_BYTES = 24e4;
|
|
1332
1339
|
var ENV_VALUE_MAX_BYTES = 12e4;
|
|
1340
|
+
var DEFAULT_PROVISION_TIMEOUT_MS = 12e4;
|
|
1333
1341
|
var ENV_TOTAL_MAX_BYTES = 2e5;
|
|
1334
1342
|
function utf8ByteLength(value) {
|
|
1335
1343
|
return new TextEncoder().encode(typeof value === "string" ? value : JSON.stringify(value ?? null)).byteLength;
|
|
@@ -1661,7 +1669,8 @@ async function ensureWorkspaceSandbox(shell, options) {
|
|
|
1661
1669
|
}
|
|
1662
1670
|
function isUnbringableBoxError(error) {
|
|
1663
1671
|
if (error instanceof SandboxRecoveryFailedError) return true;
|
|
1664
|
-
|
|
1672
|
+
const diagnostics = serializeSandboxProvisioningError(error);
|
|
1673
|
+
return isSandboxHostCapacityFailure(diagnostics) || isSandboxBoxConfigFailure(diagnostics);
|
|
1665
1674
|
}
|
|
1666
1675
|
async function provisionWorkspaceSandbox(shell, options) {
|
|
1667
1676
|
const { workspaceId, userId, harness, forceNew, onProgress, billingOwnerId } = options;
|
|
@@ -1670,7 +1679,7 @@ async function provisionWorkspaceSandbox(shell, options) {
|
|
|
1670
1679
|
let name = resolved.name;
|
|
1671
1680
|
let recoveryRestore;
|
|
1672
1681
|
const resources = shell.resources ?? DEFAULT_SANDBOX_RESOURCES;
|
|
1673
|
-
const resumeTimeout =
|
|
1682
|
+
const resumeTimeout = shell.provisionTimeoutMs ?? DEFAULT_PROVISION_TIMEOUT_MS;
|
|
1674
1683
|
const existing = await listRunning(client, name);
|
|
1675
1684
|
if (existing.succeeded && existing.value) {
|
|
1676
1685
|
const found = existing.value;
|
|
@@ -1814,7 +1823,10 @@ async function provisionWorkspaceSandbox(shell, options) {
|
|
|
1814
1823
|
);
|
|
1815
1824
|
assertProvisionPayloadWithinCap(payload ?? {});
|
|
1816
1825
|
let box = await client.create(payload);
|
|
1817
|
-
await box.waitFor("running", {
|
|
1826
|
+
await box.waitFor("running", {
|
|
1827
|
+
timeoutMs: shell.provisionTimeoutMs ?? DEFAULT_PROVISION_TIMEOUT_MS,
|
|
1828
|
+
...onProgress ? { onProgress } : {}
|
|
1829
|
+
});
|
|
1818
1830
|
box = await refreshRuntimeConnection(client, box);
|
|
1819
1831
|
if (deferredFiles.length > 0) {
|
|
1820
1832
|
const written = await writeProfileFilesToBox(box, deferredFiles);
|
|
@@ -2199,6 +2211,7 @@ export {
|
|
|
2199
2211
|
deferredCorpusHash,
|
|
2200
2212
|
PROVISION_PAYLOAD_MAX_BYTES,
|
|
2201
2213
|
ENV_VALUE_MAX_BYTES,
|
|
2214
|
+
DEFAULT_PROVISION_TIMEOUT_MS,
|
|
2202
2215
|
ENV_TOTAL_MAX_BYTES,
|
|
2203
2216
|
assertProvisionPayloadWithinCap,
|
|
2204
2217
|
assertEnvWithinLimits,
|
|
@@ -2224,4 +2237,4 @@ export {
|
|
|
2224
2237
|
isTerminalPromptEvent,
|
|
2225
2238
|
detectInteractiveQuestion
|
|
2226
2239
|
};
|
|
2227
|
-
//# sourceMappingURL=chunk-
|
|
2240
|
+
//# sourceMappingURL=chunk-AIZZU6ZW.js.map
|