@decocms/sandbox-controller 0.7.0 → 0.7.2
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/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -812,7 +812,7 @@ interface AgentSandboxProviderOptions {
|
|
|
812
812
|
* API key from first provision, and Better Auth deletes that key once it
|
|
813
813
|
* expires — so replaying the persisted config on recovery mounts org-fs with
|
|
814
814
|
* a credential that no longer exists. Every WebDAV call then 401s and the
|
|
815
|
-
* agent sees `Input/output error` on every
|
|
815
|
+
* agent sees `Input/output error` on every `/app/org/` path, silently, for the
|
|
816
816
|
* life of the sandbox. Returns null when it can't mint (no org slug, mint
|
|
817
817
|
* error); the runner then falls back to the persisted config. Must never
|
|
818
818
|
* throw.
|
|
@@ -3715,10 +3715,10 @@ interface FreestyleSandboxProviderOptions {
|
|
|
3715
3715
|
image?: string;
|
|
3716
3716
|
/** The org-fs sidecar image. Default: the chart's `orgFs.image`. */
|
|
3717
3717
|
orgFsSidecarImage?: string;
|
|
3718
|
-
/** Pause a VM after this long without network activity. Default
|
|
3718
|
+
/** Pause a VM after this long without network activity. Default 5 min. */
|
|
3719
3719
|
idleTimeoutSeconds?: number;
|
|
3720
3720
|
/**
|
|
3721
|
-
* Delete a VM after this long without running. Default
|
|
3721
|
+
* Delete a VM after this long without running. Default 1 day. A plan
|
|
3722
3722
|
* that caps it lower gets its cap.
|
|
3723
3723
|
*/
|
|
3724
3724
|
autoDeleteSeconds?: number;
|
package/dist/index.js
CHANGED
|
@@ -6759,7 +6759,7 @@ var Freestyle = class {
|
|
|
6759
6759
|
// ../sandbox/package.json
|
|
6760
6760
|
var package_default = {
|
|
6761
6761
|
name: "@decocms/sandbox",
|
|
6762
|
-
version: "1.80.
|
|
6762
|
+
version: "1.80.4",
|
|
6763
6763
|
private: true,
|
|
6764
6764
|
type: "module",
|
|
6765
6765
|
description: "Sandbox runtime for isolated Studio tool execution",
|
|
@@ -6838,7 +6838,7 @@ var WORKDIR = "/app";
|
|
|
6838
6838
|
var DEFAULT_DEV_PORT2 = 3e3;
|
|
6839
6839
|
var CONTAINER = "sandbox";
|
|
6840
6840
|
var SIDECAR = "orgfs";
|
|
6841
|
-
var DEFAULT_SIDECAR_IMAGE = "ghcr.io/decocms/studio/orgfs-sidecar:0.
|
|
6841
|
+
var DEFAULT_SIDECAR_IMAGE = "ghcr.io/decocms/studio/orgfs-sidecar:0.2.0";
|
|
6842
6842
|
var HOST_ORG_DIR = "/srv/sandbox/org";
|
|
6843
6843
|
var HOST_CTL_DIR = "/srv/sandbox/orgfs-ctl";
|
|
6844
6844
|
var CTL_DIR = "/run/orgfs";
|
|
@@ -6890,8 +6890,8 @@ var FreestyleSandboxProvider = class {
|
|
|
6890
6890
|
});
|
|
6891
6891
|
this.image = opts.image ?? `ghcr.io/decocms/studio/studio-sandbox-go:${package_default.version}`;
|
|
6892
6892
|
this.sidecarImage = opts.orgFsSidecarImage ?? DEFAULT_SIDECAR_IMAGE;
|
|
6893
|
-
this.idleTimeoutSeconds = opts.idleTimeoutSeconds ??
|
|
6894
|
-
this.autoDeleteSeconds = opts.autoDeleteSeconds ??
|
|
6893
|
+
this.idleTimeoutSeconds = opts.idleTimeoutSeconds ?? 5 * 60;
|
|
6894
|
+
this.autoDeleteSeconds = opts.autoDeleteSeconds ?? 24 * 60 * 60;
|
|
6895
6895
|
this.domainSuffix = opts.domainSuffix ?? "style.dev";
|
|
6896
6896
|
this.timeDaemonRequest = daemonProxyTimer(opts.meter);
|
|
6897
6897
|
}
|
|
@@ -7070,7 +7070,7 @@ ${sidecarImage}`).digest("hex").slice(0, 16)}`;
|
|
|
7070
7070
|
const envFlags = Object.keys(env).map((k) => `-e ${shellQuote(k)}`).join(" ");
|
|
7071
7071
|
await this.run(
|
|
7072
7072
|
vm,
|
|
7073
|
-
`sudo sh -c ${shellQuote(HOST_SETUP)} && docker run -d --name ${SIDECAR} --restart=always --privileged --device /dev/fuse -e APP_ROOT=${WORKDIR} -v ${HOST_ORG_DIR}:${WORKDIR}/org:rshared -v ${HOST_CTL_DIR}:${CTL_DIR} ${shellQuote(this.sidecarImage)}`,
|
|
7073
|
+
`sudo sh -c ${shellQuote(HOST_SETUP)} && docker run -d --name ${SIDECAR} --restart=always --privileged --device /dev/fuse -e APP_ROOT=${WORKDIR} -e ORGFS_FEED_IDLE_MS=60000 -v ${HOST_ORG_DIR}:${WORKDIR}/org:rshared -v ${HOST_CTL_DIR}:${CTL_DIR} ${shellQuote(this.sidecarImage)}`,
|
|
7074
7074
|
{ timeoutMs: IMAGE_PULL_TIMEOUT_MS }
|
|
7075
7075
|
);
|
|
7076
7076
|
await this.run(
|