{"_id":"@abeyjs/flows","_rev":"2-f51b07666d2005c5d31eed5044343b27","name":"@abeyjs/flows","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@abeyjs/flows","version":"0.1.0","license":"MIT","_id":"@abeyjs/flows@0.1.0","maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"dist":{"shasum":"1488930f29136b272b181305214b2b9fd8cd3552","tarball":"https://registry.npmjs.org/@abeyjs/flows/-/flows-0.1.0.tgz","fileCount":70,"integrity":"sha512-BYwYwm3NOS/x79Tset5Ed1ThEw3YgDqPASifYqugtj0O7WkHN0YbTFArMt0f0+XCWszOTpNn5Q1abQBmRfGXcg==","signatures":[{"sig":"MEUCICxecQNb/GTy+OsQbNfHLDX7nfuP3qNVvXrOu1Z26465AiEAzWdQnHUxDR8nS9VfTiY45F3/F0igvFXVi9BFrnx1V1Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":93825},"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":"Long-lived **orchestration** for AbeyJs: flows sit on the same `OmegaChannel` as everything else, but they own **state machines**, **intent reactions**, and **UI hints** that never needed to be raw bus traffic.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@abeyjs/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/flows_0.1.0_1777684788320_0.5077927906307846","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@abeyjs/flows","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"},"dependencies":{"@abeyjs/core":"0.1.1"},"devDependencies":{"typescript":"^5.7.0"},"_id":"@abeyjs/flows@0.1.1","gitHead":"8e89473e70d292931fe54ab9e184c613a03528d3","description":"Long-lived **orchestration** for AbeyJs: flows sit on the same `OmegaChannel` as everything else, but they own **state machines**, **intent reactions**, and **UI hints** that never needed to be raw bus traffic.","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-VfR896O2WvpXd6KGB8QnGbrHMkNvZ3w2+6w/9AO3badV9r/X6lcgXVWNDL7iSi6b0jdOPW2Rmn94QRmbVvdFaw==","shasum":"f8f6098079ae9305e40cad1d4e9eadef8b289afc","tarball":"https://registry.npmjs.org/@abeyjs/flows/-/flows-0.1.1.tgz","fileCount":30,"unpackedSize":42481,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCh1Rp1lHSX6KiUukcIj+KxFhmRqQttte5+vzC3HCm5lQIhAMXiu6gpFmnVWrs434AqK3wJku9pAsnj7Np6acOuRJf1"}]},"_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/flows_0.1.1_1777736037627_0.4320634376061754"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-02T01:19:48.208Z","modified":"2026-05-02T15:33:57.938Z","0.1.0":"2026-05-02T01:19:48.475Z","0.1.1":"2026-05-02T15:33:57.787Z"},"license":"MIT","description":"Long-lived **orchestration** for AbeyJs: flows sit on the same `OmegaChannel` as everything else, but they own **state machines**, **intent reactions**, and **UI hints** that never needed to be raw bus traffic.","maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"readme":"# `@abeyjs/flows`\r\n\r\nLong-lived **orchestration** for AbeyJs: flows sit on the same `OmegaChannel` as everything else, but they own **state machines**, **intent reactions**, and **UI hints** that never needed to be raw bus traffic.\r\n\r\n### `OmegaFlow`\r\n\r\n- Subscribes to **all** channel events; `onEvent` only runs while `state === running`.\r\n- `receiveIntent` mirrors that contract for intents pushed by `OmegaFlowManager`.\r\n- `memory` is the scratch map persisted inside snapshots; `emitExpression` fans out to local listeners (loading banners, wizard copy, etc.) without polluting the global channel.\r\n- `publish` / `emit` helpers stamp `source` with the flow id so traces stay attributable.\r\n- Lifecycle hooks (`start`, `pause`, `sleep`, `end`, …) flip `OmegaFlowState` and keep the manager’s running list in sync.\r\n\r\n### `OmegaFlowManager`\r\n\r\n- Registry of flows plus **two intent pathways**:\r\n  1. **`registerIntentHandler`** — lightweight predicates that may **`consumeIntent`** and short-circuit before running flows.\r\n  2. **`registerHandler` + `dispatch`** — async-only fan-out for imperative glue (often wired from runtime helpers).\r\n- **`handleIntent`** publishes `omega/intent:*` lifecycle markers, runs intent handlers, optionally consumes, then fans out to every **running** flow.\r\n- **`activate` / `switchTo` / `activateExclusive`** coordinate which flows stay hot versus paused—think stacked modals or exclusive wizards.\r\n- **`wireNavigator`** listens for `navigation.intent` (payload is a full `Intent`) and synthetic `navigate.*` events, forwarding them into whatever navigator object you inject—keeps router adapters out of the flows themselves.\r\n\r\n### `OmegaWorkflowFlow`\r\n\r\nStructured variant of `OmegaFlow`: register named steps (`defineStep`), jump with `startAt` / `next`, emit canonical `workflow.step`, `workflow.error`, `workflow.done` expressions. Base `onIntent` / `onEvent` are intentionally empty so subclasses drive everything through step ids.\r\n\r\n### Supporting pieces\r\n\r\n| Export | Role |\r\n|--------|------|\r\n| `OmegaIntentHandlerPipeline` | Fluent micro-pipeline (validate → execute → success/error hooks) that registers itself as an intent handler. |\r\n| `OmegaIntentReducer` | Tiny fold over a single value driven by intent handlers. |\r\n| `Omega` facade | One-liner `Omega.handle(manager, name, handler, { consumeIntent })`. |\r\n| Snapshots + `OmegaSnapshotStorage` | Serialize / hydrate `memory`, `state`, `lastExpression`, `activeFlowId`. |\r\n\r\n---\r\n\r\n## Dependencies\r\n\r\n`@abeyjs/core` for channel + intent types. Consumers: `@abeyjs/runtime`, ecosystems, CLI scaffolds.\r\n\r\n---\r\n\r\n## Build\r\n\r\n```bash\r\nnpm run build -w @abeyjs/flows\r\n```\r\n","readmeFilename":"README.md"}