Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
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