S3-compatible virtual sandbox alongside the R2 one? #86
Replies: 5 comments
-
|
Good idea for sure! It's the reason i lean more to Cloudflare instead of the other options. |
Beta Was this translation helpful? Give feedback.
-
|
@davidmyriel — sketching this out as a fellow contributor in case it helps the maintainers shape the work. One-line proposal. Mirror the existing The three substantive choices
Other details (peer-dep wiring, package layout, symlink encoding, empty-dir markers, conditional-write strategy, multipart thresholds) all follow from these three. API sketchexport interface S3SandboxOptions {
bucket: string;
prefix?: string; // session isolation; default 'default'
metadataMode?: 'auto' | 'sidecar'; // 'auto' = headers (v1); 'sidecar' = ENOTSUP in v1
maxEntries?: number; // readdir cap, default 10_000
statTtlMs?: number; // default 60_000
listTtlMs?: number; // default 30_000
multipartThreshold?: number; // default 5 * 1024 * 1024
}
export async function getS3Sandbox(): Promise<BashFactory>;
export async function getS3Sandbox(client: S3Client, options: S3SandboxOptions): Promise<BashFactory>;
Four PRs to land it
Trade-offs being accepted (would go in the connector doc)
Real open questions for maintainers
Out of v1, deliberatelySidecar SQLite, external SQL metadata, cross-bucket OfferDavid — if the shape lands well with maintainers, happy to take Phase 1 as a contract-locking PR for you to build on, or hand the whole thing to you. Either way works. |
Beta Was this translation helpful? Give feedback.
-
|
+1! Can this just be a generic just-bash + S3 adapter? We're intentionally trying to treat the sandbox setup as "outside" of Flue, so living inside the Flue package doesn't make sense. Over time we'll probably make this even more explicit. You could publish this as an npm package, and than anyone using just-bash or Flue could use it. I was considering suggesting this as a connector for |
Beta Was this translation helpful? Give feedback.
-
|
@FredKSchott - that framing makes sense. Reading my earlier sketch back through that lens, the @davidmyriel - proposed reshape: publish If it'd help with discoverability, Flue could optionally ship a Happy to write a contract-locking starter PR against just-bash to anchor the FS shape if that helps you avoid moving targets; let me know. |
Beta Was this translation helpful? Give feedback.
-
|
Possibly related contribution from @Xe — opened #171 which appears to be addressing this. Their summary: Adds a new connector specification document for @tigrisdata/agent-shell, which provides sandboxed command execution and file I/O backed by Tigris object storage. This enables agents to operate on dedicated buckets, shared long-lived buckets, or per-invocation bucket forks for isolation. Implementation: Xe/flue@Xe/sandbox-agent-shell (diff) This comment was posted automatically when #171 was redirected. The implementation is preserved on the branch above so it can inform the work here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'd like to write a generic S3 adapter for our users (I work at Tigris data).
@flue/sdk/cloudflare#getVirtualSandbox(R2) is great if you're on Cloudflare.However, there's no equivalent for Node, GitHub Actions, Workers without an R2 binding, or buckets that aren't R2.
The virtual sandbox falls back to in-memory and the agent forgets everything between calls.
I'd like to add
@flue/sdk/s3#getS3Sandbox. It is the same BashFactory shape as the existing one, generic over any S3-compatible endpoint (AWS, Tigris, MinIO, R2's S3 API).@aws-sdk/client-s3as an optional peer dep, the way wrangler is today. Lazy-imported, so projects that don't use it pay nothing.Happy to share the implementation if it'd help you decide.
Dave
Beta Was this translation helpful? Give feedback.
All reactions