Repository navigation
Upload cloud files outside model context without storage - #3354
reachjalil wants to merge 4 commits into
Conversation
fraimz — ❌ FAILED0 passed · 1 failed · 0 skipped — run Full frame proof with validated screenshots: ❌ google-workspace-gmail-draft-attachments — Google Workspace uploads carry workspace bytes outside model context without storageInternal demo
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@reachjalil is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
fraimz — ✅ PASSED1 passed · 0 failed · 0 skipped — run Full frame proof with validated screenshots: ✅ google-workspace-gmail-draft-attachments — Google Workspace uploads carry workspace bytes outside model context without storageInternal demo
|
d7119ca to
566d2a3
Compare
|
Upload cloud files outside model context without storage
It uploads workspace files directly to Drive or Gmail—without stuffing the bytes into model context or storing them in Den. |
|
Superseded by #3458, which carries this work forward onto current dev (with co-authorship): #3441 rewrote the same regions of google-workspace.ts making this branch unmergeable, and the legacy flow corpus froze under the proof. The successor keeps the design exactly as authored here — storage-free multipart carrier, path-based extension actions, base64 lanes removed — resolves the conflicts, and replaces the flow with an @openwork/testkit spec (real Den boot, byte-exact mock-Google witness). Branch left untouched for reference. |
…ext, storage-free (#3458) Revives #3354 by @reachjalil onto current dev. - apps/server: new openwork-cloud-uploads extension (drive_upload_file, gmail_create_draft_with_attachments) — authorized workspace paths in, multipart FormData out to Den; 4 MiB total enforced before network I/O; realpath containment incl. symlink escapes. - den-api: POST /v1/direct-uploads/google-workspace/{drive-files,gmail-drafts} behind new cloudTransportRoute() (MCP bearer + mcp:write + org membership); bytes forward straight to Google, never persisted. - Removes the model-facing base64 lanes: gmail-draft attachments field and the drive-files base64 upload capability. Gmail draft logic extracted into executeGmailDraft, shared by the JSON capability and the multipart route, preserving dev behavior (#3441 binary read lanes and #3449 formatting kept). - Legacy flow deleted per the frozen corpus; successor proof is evals/specs/google-workspace-direct-uploads.slow.test.ts (real Den boot, mock-Google byte-exact witness, pre-network 413, no bytes in results). - evals/tsconfig.json stops typechecking the frozen flow corpus, fixing the pre-existing red evals:typecheck (FlowContext.page in den-trim-page-headers). Co-authored-by: Jalil <[email protected]>
|
Superseded by merged #3458, which carries forward the storage-free multipart upload design and its real Den/mock-provider journey. This follows the replacement already identified in review. The original branch remains preserved. |
Pull request was closed
Summary
Replaces model-facing base64 uploads with one storage-free multipart carrier.
openwork-cloud-uploadsactions that accept authorized workspace paths.Why
Inline base64 expands files, consumes model context, and can be truncated before Google receives the complete file. The previous advertised 10 MiB raw limit also exceeded the current hosted proxy boundary after encoding.
The model now supplies only an authorized workspace path plus normal operation arguments. File bytes never enter tool JSON or model context.
Deliberate scope
This PR has no database migration, file-reference table, persistent staging, resumable-upload lifecycle, or
convertTobehavior. Bytes exist only for the immediate provider operation and are discarded afterward.The shared carrier can be adopted by future upload capabilities. This first PR migrates the existing Google upload surfaces: Drive file creation and Gmail draft attachments. Gmail attachment downloads are unchanged.
packages/docs/openapi.jsonis a generated, minified snapshot of roughly 500 KB on one line, so any semantic edit renders as replacement of the whole file in GitHub. It is intentionally restored todevin this PR; the route source and focused contract tests carry the change.Verification
Cleanup head:
566d2a3bccb24b95dc706906999fdc2649b7d625, based ondev@d8b869ec07a044ef35841da54526c3d17f52a2bd.pnpm --filter openwork-server exec bun test src/extensions/cloud-uploads.test.ts src/extensions-connect-gating.test.ts— 9 passed, 62 expectations.pnpm --filter openwork-server exec tsc --noEmit— passed.pnpm --filter @openwork-ee/den-api exec tsc --noEmit— passed.node evals/runner/run.mjs --mode automation --flow google-workspace-gmail-draft-attachments— passed with Fraimz proof on the original feature head.git diff --check— passed.The database-backed Den Google Workspace suite was not rerun locally after rebase because the isolated checkout had no MySQL service on
127.0.0.1:3306. Four Vercel project checks remain red because the fork author is not authorized for those team deployments; the landing deployment passed.Replacement
Supersedes closed #3353 with the requested storage-free scope. #3353's branch remains preserved for reference.