Last 12 weeks · 120 commits
3 of 6 standards met
Workflow payloads created by a TypeScript client on Vercel are AES-GCM encrypted, and reported as a format this SDK cannot read. This adds read support; writing stays plain , which the TypeScript reader accepts unchanged. opens and re-dispatches on the plaintext's own prefix. lets a caller skip resolving a key it does not need. : HKDF-SHA256 over the deployment secret (32 zero-byte salt, ) and the AES-GCM envelope. : pure-Python AES-256-GCM decryption, so this needs no new dependency. is used automatically when installed; both paths are tested. : by default, so the local world is unaffected. derives in-process from for a run of the current deployment, and otherwise fetches , where means the run is not encrypted. The API path is also the fallback if the platform does not inject into a Python function. The runtime resolves the key once per run and threads it to all five call sites. (X25519) is still reported as unsupported by name. 🤖 Generated with Claude Code
Summary add add the invocation-context callback used by the Vercel Python runtime safely no-op when no compatible runtime invocation is active Why This gives Python Functions the same custom metric helper as , while keeping transport details owned by the runtime. Documentation is intentionally omitted during the soft launch. This PR pairs with the Python runtime IPC change in https://github.com/vercel/vercel-internal/pull/178. Validation (1062 passed, 27 credential-gated tests skipped) focused metric/context tests (13 passed) The required feature and internal news fragments are included. The local command could not run because uv 0.11.2 removed the option still used by the repository script.
The Vercel world put workflow queue messages on the wire as JSON, but every producer at sends CBOR, so a deployed Python app could not read a single delivery from one. What changed mirrors in : it sends CBOR, and decodes CBOR-first with a JSON fallback for a producer that predates the CBOR transport or sends JSON unlabelled. CBOR and typed arrays resolve to their Python equivalents on the way in. The send and the subscribed both carry it, so the codec travels with the topic rather than with a client. That matters on push: the client that accepts a delivery is the one builds, not one this world configured.
Closes #262 Closes #263 Two gaps, both about naming the wire codec for a subscription. A could already hold a transport, but only the send and poll paths read it. A push delivery's codec was always the kind inferred from the subscriber's payload annotation — one of five fixed kinds (json, byte/text buffer, byte/text stream) — so a concrete was silently ignored on push. And a wildcard subscriber could not use a at all, because rejected . What changed A new names or a trailing- prefix. It is a sibling of , not a subclass, so and — which take a — reject a pattern statically. Its stays a plain , since means "safe in a request path". A transport on the subscribed or is recorded on the subscription, so push deliveries use it too. It has to live there rather than on a client: the client that handles a push is often not one you configured — builds its own. Using it Deliveries on any topic are decoded with and validated into . A concrete behaves as before, and now honours its transport on push as well.
Repository: vercel/vercel-py. Description: Develop. Preview. Ship. Python. Stars: 23, Forks: 8. Primary language: Python. Languages: Python (99.7%), Shell (0.3%). License: MIT. Homepage: https://vercel.com/docs Latest release: vercel-dramatiq-bundle-v0.7.2 (3d ago). Open PRs: 20, open issues: 13. Last activity: 36m ago. Community health: 62%. Top contributors: ricardo-agz, scotttrinh, msullivan, brookemosby, elprans, fantix, vercel[bot], vvo, nsidnev, 1st1 and others.