@tangle-network/agent-app 0.60.71 → 0.60.73
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-GIJZAJ5W.js → chunk-MBEJPQW6.js} +19 -11
- package/dist/{chunk-GIJZAJ5W.js.map → chunk-MBEJPQW6.js.map} +1 -1
- package/dist/sandbox/index.js +1 -1
- package/dist/workspace-export/index.d.ts +1 -0
- package/dist/workspace-export/index.js +29 -1
- package/dist/workspace-export/index.js.map +1 -1
- package/dist/workspace-export/sandbox.d.ts +38 -0
- package/package.json +1 -1
package/dist/sandbox/index.js
CHANGED
|
@@ -12,5 +12,6 @@ export { createExportEngine, MANIFEST_SCHEMA, type ExportEngine, type ExportEngi
|
|
|
12
12
|
export { createR2ExportStorage, createMemoryExportStorage, type ExportStorage, type R2ExportBucket } from './storage';
|
|
13
13
|
export { d1WorkspaceTables, type D1ExportDatabase, type D1TableCoverage, type D1WorkspaceTablesOptions } from './d1';
|
|
14
14
|
export { r2Files, kvFiles, type R2FilesBucket, type KVFilesNamespace } from './sources';
|
|
15
|
+
export { sandboxArchive, type ArchivableBox } from './sandbox';
|
|
15
16
|
export { createSecretScanner, isSecretName, isCredentialFile, REDACTED, type SecretScanner } from './secrets';
|
|
16
17
|
export type { ExportArchiveSource, ExportDataClass, ExportFile, ExportFilesSource, ExportJob, ExportJsonSource, ExportPlan, ExportPrincipal, ExportProgress, ExportRow, ExportRowsSource, ExportSource, ExportStatus, ExportUnit, StoredEntry, UnitStatus, } from './types';
|
|
@@ -1476,6 +1476,33 @@ function kvFiles(args) {
|
|
|
1476
1476
|
}
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
1479
|
+
|
|
1480
|
+
// src/workspace-export/sandbox.ts
|
|
1481
|
+
var GONE = /* @__PURE__ */ new Set(["deleted", "expired", "failed"]);
|
|
1482
|
+
function sandboxArchive(args) {
|
|
1483
|
+
return {
|
|
1484
|
+
kind: "archive",
|
|
1485
|
+
name: args.name,
|
|
1486
|
+
dataClass: args.dataClass ?? "sandbox",
|
|
1487
|
+
description: args.description,
|
|
1488
|
+
async open() {
|
|
1489
|
+
const box = await args.getBox();
|
|
1490
|
+
if (!box || GONE.has(box.status)) return null;
|
|
1491
|
+
const wasStopped = box.status === "stopped";
|
|
1492
|
+
if (wasStopped) await box.resume();
|
|
1493
|
+
if (box.status !== "running" || wasStopped) await box.waitFor("running", { timeoutMs: args.resumeTimeoutMs ?? 12e4 });
|
|
1494
|
+
const archive = await box.fs.openArchive(args.dir ?? ".");
|
|
1495
|
+
if (!wasStopped || !box.stop) return archive;
|
|
1496
|
+
const restore = () => box.stop().catch(() => {
|
|
1497
|
+
});
|
|
1498
|
+
return archive.pipeThrough(
|
|
1499
|
+
new TransformStream({
|
|
1500
|
+
flush: () => restore()
|
|
1501
|
+
})
|
|
1502
|
+
);
|
|
1503
|
+
}
|
|
1504
|
+
};
|
|
1505
|
+
}
|
|
1479
1506
|
export {
|
|
1480
1507
|
MANIFEST_SCHEMA,
|
|
1481
1508
|
REDACTED,
|
|
@@ -1488,6 +1515,7 @@ export {
|
|
|
1488
1515
|
isCredentialFile,
|
|
1489
1516
|
isSecretName,
|
|
1490
1517
|
kvFiles,
|
|
1491
|
-
r2Files
|
|
1518
|
+
r2Files,
|
|
1519
|
+
sandboxArchive
|
|
1492
1520
|
};
|
|
1493
1521
|
//# sourceMappingURL=index.js.map
|