{"_id":"@abeyjs/core","_rev":"2-add78f364842dacc2a01b51f4599be33","name":"@abeyjs/core","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@abeyjs/core","version":"0.1.0","license":"MIT","_id":"@abeyjs/core@0.1.0","maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"dist":{"shasum":"1a1247e12b04361ab8bd64246dc725c9972db536","tarball":"https://registry.npmjs.org/@abeyjs/core/-/core-0.1.0.tgz","fileCount":202,"integrity":"sha512-A6SopCD3TasUcU+iaR+WwdyBhPDa+1tW7pIFjq2oz9SfcCbSRwQ+JipuBLJVBxEFFcX/RFUOell+6hpTdmnoIQ==","signatures":[{"sig":"MEUCIQCqciKPVXl2jz7QvbZhtvB6GTxTiQ+PQXWQ3o/IcfhPqgIgFY+5+ZQ1T+8cA6J5YlrfqhQ2rEUyTZZQsv/7yV0L0sw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150645},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"24fe5ea792f5be4e8facf7c820025f89265c1467","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"abeyjs","email":"abeyjs98@gmail.com"},"_npmVersion":"10.8.2","description":"This package is AbeyJs stripped to the spine: **one channel**, **typed events**, **intents**, and the naming rules everything else hangs on. No screens, no network stack, no flow engine, no agents—those imports **this**.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1777684637695_0.2581242040788787","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@abeyjs/core","version":"0.1.1","license":"MIT","publishConfig":{"access":"public"},"type":"module","sideEffects":false,"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json"},"_id":"@abeyjs/core@0.1.1","gitHead":"8e89473e70d292931fe54ab9e184c613a03528d3","description":"This package is AbeyJs stripped to the spine: **one channel**, **typed events**, **intents**, and the naming rules everything else hangs on. No screens, no network stack, no flow engine, no agents—those imports **this**.","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-p4sHoZL1x6tWcAMyySoFVnzGI5bjwkqHwvM6GQBdmIz2phjrlrzeaSBSNAqawmPIpEV75o7JgIMLigSgmQft7A==","shasum":"aaf23bad1e8761e086ed12c3dd475a1c19e34976","tarball":"https://registry.npmjs.org/@abeyjs/core/-/core-0.1.1.tgz","fileCount":38,"unpackedSize":26198,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICghgpEGbGglGsPiebPX/MMSYNvVWfSPRxAvqb37fsDfAiAUJnPFN8PoD1s+V8jrtfZzwobIDrMJNLZrArj0TUDAaA=="}]},"_npmUser":{"name":"abeyjs","email":"abeyjs98@gmail.com"},"directories":{},"maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.1.1_1777735983616_0.33588803439259873"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-02T01:17:17.593Z","modified":"2026-05-02T15:33:03.883Z","0.1.0":"2026-05-02T01:17:17.875Z","0.1.1":"2026-05-02T15:33:03.758Z"},"license":"MIT","description":"This package is AbeyJs stripped to the spine: **one channel**, **typed events**, **intents**, and the naming rules everything else hangs on. No screens, no network stack, no flow engine, no agents—those imports **this**.","maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"readme":"# `@abeyjs/core`\r\n\r\nThis package is AbeyJs stripped to the spine: **one channel**, **typed events**, **intents**, and the naming rules everything else hangs on. No screens, no network stack, no flow engine, no agents—those imports **this**.\r\n\r\nThe boundary stays sharp on purpose—anything attaching to Omega is expected to speak the same `OmegaEvent` / `Intent` dialect and reuse the agreed ids and metadata.\r\n\r\n---\r\n\r\n## OmegaChannel\r\n\r\nThe channel is the **single bus** for the app. Parts of the system don’t call each other by deep imports; they **publish** and **listen**.\r\n\r\n- `publish(name, payload, meta?)` builds a full `OmegaEvent` (sequenced id, correlation, timestamp) and emits it.\r\n- `emit` / `emitTyped` are the primitive path when you already have the envelope.\r\n- `on` subscribes to one name; `onAll` sees the firehose (tracing, coordinators, inspectors).\r\n- `namespace(name)` returns a scoped view: emits are tagged; listeners resolve events that belong to that scope or carry no explicit namespace.\r\n\r\nYou normally get one channel instance from runtime setup and thread it everywhere that matters.\r\n\r\n---\r\n\r\n## Events versus intents\r\n\r\n**Events** (`OmegaEvent`) record what already occurred: bounded payload + `EventMeta` (correlation id, timestamp, optional source).\r\n\r\n**Intents** (`OmegaIntent`, alias `Intent`) are **commands**: “someone requested this”. Same rough envelope as events—the split is intentional so flows and tooling can branch on semantics without overloading strings.\r\n\r\nBuilders:\r\n\r\n- `omegaEventFromName(...)` assigns a sequential `ev:…` id unless you override.\r\n- `intentOf(...)` does the symmetric job for intents (`intent:…`).\r\n\r\n---\r\n\r\n## Correlation vs sequence\r\n\r\n**Correlation ids** tie a chain of publishes together (replay, diagnostics, tracing). **`createCorrelationId()`** hands you a branded id (UUID where the runtime allows).\r\n\r\n**Sequential ids** from **`omegaNextSequencedId(prefix)`** are for stable ordering inside logs and tooling. They answer a different question than correlation.\r\n\r\n---\r\n\r\n## Wire names\r\n\r\nStringly event names drift. Helpers here constrain them:\r\n\r\n| Shape | Meaning |\r\n|--------|---------|\r\n| `omegaEventNameDottedCamel(\"authLoginSuccess\")` | `\"auth.login.success\"` via camelCase breakpoints |\r\n| `omegaEventNameEnumWire(\"authLoginSuccess\")` | literal wire equals the identifier |\r\n| Same pair exists for intents (`omegaIntentNameDottedCamel` / `omegaIntentNameEnumWire`) |\r\n\r\n`OmegaAgentId` / `OmegaFlowId` helpers exist so registration strings stay coherent.\r\n\r\n---\r\n\r\n## OmegaObject and OmegaFailure\r\n\r\n`OmegaObject` is the minimalist contract (`id`, `meta`) shared by intents, failures, anything we treat as first-class instrumentation.\r\n\r\n`OmegaFailure` wraps a human-readable `message`, optional structured `details`, and the usual metadata.\r\n\r\n---\r\n\r\n## IntentHandler\r\n\r\n```ts\r\ntype IntentHandler<TPayload, TContext> = (payload: TPayload, ctx: TContext) => void | Promise<void>;\r\n```\r\n\r\nRuntime and glue layers compose these; definitions live here because every layer needs the same signature.\r\n\r\n---\r\n\r\n## Layout\r\n\r\n```\r\nchannel/     OmegaChannel + namespaced façade\r\nevents/      OmegaEvent, EventMeta, listeners\r\nsemantics/   intents, naming, typed envelopes, intentOf\r\ntypes/       OmegaObject, OmegaFailure\r\n```\r\n\r\nRoot-level `omega-correlation-id.ts` and `omega-sequencer.ts` are helpers too small for their own folder.\r\n\r\n---\r\n\r\n## Dependents\r\n\r\n`@abeyjs/runtime`, `@abeyjs/flows`, `@abeyjs/agents`, `@abeyjs/http`, and `@abeyjs/view` all anchor here. Respect the `\"sideEffects\": false` constraint: consumers should tree-shake what they never import.\r\n\r\n---\r\n\r\n## Build\r\n\r\n```bash\r\nnpm run build -w @abeyjs/core\r\n```\r\n","readmeFilename":"README.md"}