leryk-modules-core-mova
v0.1.1
Published
MOVA core executable modules (object-agnostic) with IO schemas and a tiny runtime dispatcher
Maintainers
Readme
leryk-modules-core-mova
Core executable modules for MOVA (object-agnostic). Pair with leryk-verbs-core-mova / leryk-verbs-extend-mova.
Install
npm i leryk-modules-core-movaUse
import { runModule, registry } from "leryk-modules-core-mova";
const res = await runModule("http.fetch", { url: "https://httpbin.org/get" }, {
fetch: fetch,
log: (lvl, msg) => console.log(`[${lvl}]`, msg)
});
console.log(res.status);Modules included
- Networking:
http.fetch - Key-Value:
kv.get,kv.set,kv.delete(requiresctx.kv) - Codecs:
codec.encode,codec.decode,codec.compress,codec.decompress(ctx.node.gzip/gunzipfor compression) - Transforms:
transform.parse,transform.normalize,transform.validate - Observability:
obs.log,obs.metric,obs.trace,obs.audit - Scheduling:
schedule.schedule,schedule.unschedule(callsctx.schedule) - Messaging:
messaging.publish,messaging.subscribe,messaging.ack,messaging.nack(ctx.bus, with in-memory fallback) - Control flow:
control.run,control.call,control.route,control.cancel,control.timeout - Crypto (WebCrypto/HMAC):
crypto.hash,crypto.encrypt,crypto.decrypt,crypto.sign,crypto.verify(expects WebCrypto viactx.crypto.subtleor adapter helpers)
Every module is listed with IO schemas in schemas/index.json.
Required adapters
Pass adapters through ctx depending on the module surface:
| capability | ctx shape |
|------------|-----------|
| HTTP fetch | ctx.fetch(input, init) |
| Key-value | ctx.kv.{get,set,del} |
| Logging / metrics / traces / audit | ctx.log, ctx.metric, ctx.trace, ctx.audit |
| Scheduler | ctx.schedule.{schedule,unschedule} |
| Messaging | ctx.bus.{publish,subscribe,ack,nack} |
| Crypto | ctx.crypto.{hash,encrypt,decrypt,sign,verify} or ctx.crypto.subtle (WebCrypto) |
| Compression (Node) | ctx.node.{gzip,gunzip} |
If an adapter is missing, modules fall back to lightweight in-memory/logging behaviour where practical so flows remain testable.
Each schema file lives under schemas/ and is copied to the published bundle.
Лицензия
Этот пакет распространяется по лицензии Apache-2.0. Полный текст — в файле LICENSE.
