Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
AdonisJS 모듈 수준 AsyncLocalStorage로 사용자·테넌트·traceId를 HTTP·큐·내구성·ace 전반에 전달
A module-level AsyncLocalStorage for AdonisJS that carries user, tenant and traceId across every boundary — HTTP, queue, durable and ace.
개발 도구TypeScript · JavaScriptGitHub @DavideCarvalho온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
Ambient request/tenant/correlation context for AdonisJS — @agora/context
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗@adonis-agora/contextShared AsyncLocalStorage context for AdonisJS — carries
user/tenant/traceIdacross the request and the Agora ecosystem (HTTP, queue workers, durable, ace commands).
AdonisJS already ships an ALS-backed HttpContext — but it only lives inside an
HTTP request (HttpContext.getOrFail() throws outside one). @adonis-agora/context is
the thin, serializable layer that crosses the boundaries HttpContext can't:
@adonisjs/queue workers, durable workflows, ace commands, and ORM hooks.
npm i @adonis-agora/context
node ace configure @adonis-agora/context
configure registers the provider, plugs the context middleware onto the server
stack, and publishes config/context.ts.
import { Context } from '@adonis-agora/context'
// anywhere — HTTP handler, service, queue worker, ace command:
Context.traceId() // current trace id
Context.tenantId() // current tenant
Context.userRef() // { type, id } — never the full user entity
// after auth, stamp the principal onto the active context:
Context.set('userRef', { type: 'user', id: user.id })
Carry the context across a queue/process boundary:
queue.dispatch('send-email', { ...payload, __ctx: Context.serialize() })
// in the worker:
Context.deserialize(job.__ctx, () => handler(job))
See DESIGN.md for the full contract (customization levels,
cross-boundary semantics, W3C baggage).
| Entry point | What |
|---|---|
@adonis-agora/context | core — ALS, middleware, provider, config, serialize, baggage, traceparent |
@adonis-agora/context/testing | runWithContext() / enterContext() test helpers |
Agora is the AdonisJS port of the aviary
NestJS ecosystem. @adonis-agora/context is the foundation other Agora libs build on
(diagnostics, telescope, authz, filter, durable).
Every Agora library is MIT and stays free. The work is funded by partners and sponsors — become one.
MIT © Davi Carvalho