You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ef0db73
Browse filesBrowse the repository at this point in the historyBrowse files
ben
authored
chore(features): graduate cloud task recovery and per-chat storage (#6274)
member("GET","/v1/documents/google-drive/files/:fileId/editor","tenant_access","documents.google_drive.open","documents.editor","google_drive_file","fileId",{notes: "Reads bounded document content with pinned authorized connector; both Workbot features required. No content in audit evidence."}),
206
206
member("GET","/v1/documents/google-drive/files/:fileId/content","tenant_access","documents.google_drive.preview","documents.editor","google_drive_file","fileId",{notes: "Bounded PDF/image bytes, current pinned connection, no-store; both flags required."}),
207
207
member("POST","/v1/documents/google-drive/files/:fileId/editor","tenant_external","documents.google_drive.save","documents.editor","google_drive_file","fileId",{external: "Google Docs/Sheets/Drive API",notes: "Explicit targeted edits, live write permission, pinned connection and revision check. Native Docs also require revision writeControl. No content in audit evidence. Stored files/Sheets have a check-then-write concurrency window."}),
208
-
route("POST","/v1/workbot/run-token","tenant_access","workbot.run_token.issue","workbot.execution","oauth_access_token",null,"handler",{notes: "Handler verifies the MCP OAuth token, membership and workbot capability, then mints a ≤1h headless-run MCP token (credential issuance; plaintext returned once, never snapshot). mintHeadlessRunMcpToken is also called by the headless automation executor without an HTTP route. With headlessDurableTurns on and sessionId/messageId given it also returns a resume grant (plaintext once; only its SHA-256 hash is stored). With sessionId given it also returns an index capability (HMAC-signed, bound to org, member, session and kind workbot; nothing stored)."}),
209
-
route("POST","/v1/headless/resume-token","tenant_access","headless.resume_token.issue","headless.execution","oauth_access_token",null,"handler",{notes: "Headless runner callback (Internal, never MCP). Handler verifies DEN_HEADLESS_RUNNER_CALLBACK_TOKEN (constant time; 404 when unset, 401 otherwise) and looks the resume grant up by its SHA-256 hash; unknown grants answer 403 before attribution (request evidence only). Then attributes actor service headless-runner:<grantId> for the grant's organization and active member, checks revoked, expired, turn binding, membership, headlessDurableTurns and the per-grant rate limit, and mints a ≤1h headless-run MCP token (credential issuance; grant and token never logged or snapshot)."}),
208
+
route("POST","/v1/workbot/run-token","tenant_access","workbot.run_token.issue","workbot.execution","oauth_access_token",null,"handler",{notes: "Handler verifies the MCP OAuth token, membership and workbot capability, then mints a ≤1h headless-run MCP token (credential issuance; plaintext returned once, never snapshot). mintHeadlessRunMcpToken is also called by the headless automation executor without an HTTP route. With sessionId/messageId given it also returns a resume grant (plaintext once; only its SHA-256 hash is stored). With sessionId given it also returns an index capability (HMAC-signed, bound to org, member, session and kind workbot; nothing stored)."}),
209
+
route("POST","/v1/headless/resume-token","tenant_access","headless.resume_token.issue","headless.execution","oauth_access_token",null,"handler",{notes: "Headless runner callback (Internal, never MCP). Handler verifies DEN_HEADLESS_RUNNER_CALLBACK_TOKEN (constant time; 404 when unset, 401 otherwise) and looks the resume grant up by its SHA-256 hash; unknown grants answer 403 before attribution (request evidence only). Then attributes actor service headless-runner:<grantId> for the grant's organization and active member, checks revoked, expired, turn binding, membership and the per-grant rate limit, and mints a ≤1h headless-run MCP token (credential issuance; grant and token never logged or snapshot)."}),
210
210
route("POST","/v1/internal/headless/index","platform","headless.session_index.update","headless.session_index","headless_session_index",null,"none",{notes: "Headless runner callback (Internal, never MCP). Handler verifies DEN_HEADLESS_RUNNER_CALLBACK_TOKEN (constant time; 404 when unset, 401 otherwise). One request carries up to 50 updates that may belong to several organizations, so the request evidence stays in the platform store. Each update's organization, member and kind come only from its HMAC-verified index capability (bound to the session, 30-day expiry; a capability for a deleted organization is refused as capability_invalid, so its rows never return); content-free fields only (sizes, dates, state, title). Every rejected update (invalid update, bad/expired/mismatched capability, rate_limited, session_conflict) also writes headless.session_index.update.attempted (outcome denied, reasonCode = the rejection, target the capability's verified organization when there is one) and a throttled Sentry event by code. Capabilities are never logged or stored."}),
211
211
route("GET","/v1/brand-assets/:organizationId/:kind/:version","tenant_read","brand_asset.download","organization.branding","brand_asset","version","handler",{notes: "Public capability URL: the HMAC signature binds organizationId, kind, version and extension, so the handler attributes the path organization only after verifyBrandAssetSignature; actor is the anonymous signed-URL holder. Public, immutable, CDN-cached logo (login pages, emails): read category, not access. Invalid signatures 404 before attribution (platform)."}),
summary: "Exchange a headless turn's resume grant for a fresh MCP token",
127
127
description:
128
-
"For the headless runner only, with `Authorization: Bearer $DEN_HEADLESS_RUNNER_CALLBACK_TOKEN`. Body `{ grant, sessionId, messageId }`. Exchanges the resume grant Den minted with a turn for a fresh member-scoped MCP token (at most an hour, same read-only setting) for that turn, its background tasks and their reports, while the member is still active and `headlessDurableTurns` is on. 403 answers are permanent for the grant. Answers 404 when DEN_HEADLESS_RUNNER_CALLBACK_TOKEN is not configured.",
128
+
"For the headless runner only, with `Authorization: Bearer $DEN_HEADLESS_RUNNER_CALLBACK_TOKEN`. Body `{ grant, sessionId, messageId }`. Exchanges the resume grant Den minted with a turn for a fresh member-scoped MCP token (at most an hour, same read-only setting) for that turn, its background tasks and their reports, while the member is still active. 403 answers are permanent for the grant. Answers 404 when DEN_HEADLESS_RUNNER_CALLBACK_TOKEN is not configured.",
129
129
responses: {
130
130
200: jsonResponse("A fresh MCP token for the turn.",exchangeResponseSchema),
131
131
400: jsonResponse("The body is not `{ grant, sessionId, messageId }`.",exchangeErrorSchema),
0 commit comments