
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@layers/amba-functions
Advanced tools
The SDK Cloudflare Workers import to build amba functions. Provides defineFunction + a typed ctx (auth, collections, AI, events, storage, email, queue, fan-out, secrets).
The SDK customer Cloudflare Workers import to build amba functions.
defineFunction wraps your handler with HMAC verification of the incoming
dispatched request and constructs a typed ctx object exposing auth,
collections, AI, events, storage, email, queue, fan-out, and secrets.
npm install @layers/amba-functions
# or: pnpm add @layers/amba-functions
# or: yarn add @layers/amba-functions
import { defineFunction } from '@layers/amba-functions';
export default defineFunction(async (req, ctx) => {
const userId = ctx.auth.assertUser();
const letters = await ctx.collections.letters.asUser(userId).find();
return Response.json({ letters });
});
The handler receives the Worker Request and a ctx:
ctx.auth — userId / developerId, plus assertUser() / assertDeveloper().ctx.collections.<name> — typed CRUD against your tenant database.ctx.ai.anthropic / ctx.ai.openai / ctx.ai.embeddings — proxied AI calls.ctx.events.track({ name, properties }) — record an engagement event.ctx.storage — upload, delete, presign against your project's R2.ctx.email.send — templated or ad-hoc transactional email.ctx.queue.send — enqueue a background job.ctx.fanOut.forUsersInSegment — invoke a function for every user in a segment.ctx.secrets.get('STRIPE_KEY') — read a Workers Secret bound to this script.Errors thrown by the SDK are subclasses of AmbaError (AmbaAuthError,
AmbaNotFoundError, AmbaValidationError, AmbaRateLimitError,
AmbaTenantUnavailableError, AmbaInternalError).
MIT
FAQs
The SDK Cloudflare Workers import to build amba functions. Provides defineFunction + a typed ctx (auth, collections, AI, events, storage, email, queue, fan-out, secrets).
The npm package @layers/amba-functions receives a total of 0 weekly downloads. As such, @layers/amba-functions popularity was classified as not popular.
We found that @layers/amba-functions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.