{"_id":"@abeyjs/agents","_rev":"3-eea44e365ac43a7fbbe12a3849e354a1","name":"@abeyjs/agents","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@abeyjs/agents","version":"0.1.0","license":"MIT","_id":"@abeyjs/agents@0.1.0","maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"dist":{"shasum":"070b6883fc54c7af10a86d4479b0dc7d3bffb2fe","tarball":"https://registry.npmjs.org/@abeyjs/agents/-/agents-0.1.0.tgz","fileCount":42,"integrity":"sha512-2d8sQ3R+t2/KXPH5ZyzHtHcdFFYeX4Y058cstj2wohod04ChqXIPbwbk4RCgqeLwcGHkwWLZwdG+3X/tSpRd9g==","signatures":[{"sig":"MEQCIADsMB/zQ1thUucCLREaXe8+87bjZONDI1AT8/7DnO/nAiAya+NDTPZnIWJu+wXju/OdnWI/g9hGjzBTAaQVSj226Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31817},"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":"Agents package the **orthogonal logic** AbeyJs hangs next to flows: same `OmegaChannel` everyone listens to, but routing is **rule-first** instead of a long switchboard of manual subscriptions.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@abeyjs/core":"0.1.0","@abeyjs/state":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/agents_0.1.0_1777684849176_0.21683181132649598","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@abeyjs/agents","version":"0.1.1","license":"MIT","_id":"@abeyjs/agents@0.1.1","maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"dist":{"shasum":"fc2422861c0cc0781841ad1c39ea14f94c38b5b1","tarball":"https://registry.npmjs.org/@abeyjs/agents/-/agents-0.1.1.tgz","fileCount":22,"integrity":"sha512-MnigvvFJoUL0h+lvsmJSa/xH5NkzMzW3GxAjAE+x7dJuUGkhbAcwaLPf4msJM3UAUcBh9rU6ewiT4JiqTa8IdQ==","signatures":[{"sig":"MEUCIGGWBNIrHP0ofE3vhzRuu4a7a9qtFJm0KErntvOOUwXTAiEA7oOgJYwSf8UOXTEzopJS1bbXppRjSUMAAtd0Ocq/U00=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18435},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8e89473e70d292931fe54ab9e184c613a03528d3","scripts":{"build":"tsc -p tsconfig.json"},"_npmUser":{"name":"abeyjs","email":"abeyjs98@gmail.com"},"_npmVersion":"10.8.2","description":"Agents package the **orthogonal logic** AbeyJs hangs next to flows: same `OmegaChannel` everyone listens to, but routing is **rule-first** instead of a long switchboard of manual subscriptions.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@abeyjs/core":"0.1.1","@abeyjs/state":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/agents_0.1.1_1777736055464_0.8005072110653411","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@abeyjs/agents","version":"0.1.2","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","@abeyjs/state":"0.1.1"},"devDependencies":{"typescript":"^5.7.0"},"gitHead":"2ee889a6b54b40657459eb706bad2ed62d755dda","description":"Agents package the **orthogonal logic** AbeyJs hangs next to flows: same `OmegaChannel` everyone listens to, but routing is **rule-first** instead of a long switchboard of manual subscriptions.","_id":"@abeyjs/agents@0.1.2","_nodeVersion":"22.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-sOQm0O8yWgvV0MyuSXP5fca5sClhnYYAP7nyxEJ9IjYrzId7F9F3I69PmaU1ZzgwSMK8TSjM6cy2yRDhAvLwlg==","shasum":"1d651c2e360178aa39a6a0d2fd63806b8edae84b","tarball":"https://registry.npmjs.org/@abeyjs/agents/-/agents-0.1.2.tgz","fileCount":22,"unpackedSize":18435,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDcBW/US3oxAJAUne1d25MyWn3RglbMvXj6+ebuRXXJVAiEA+rtjSwqCJTLf1uaW3U/rk3GaVjzhBTbWqF4iqA2ybWQ="}]},"_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/agents_0.1.2_1778322314643_0.30037523669523014"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-02T01:20:49.058Z","modified":"2026-05-09T10:25:14.933Z","0.1.0":"2026-05-02T01:20:49.319Z","0.1.1":"2026-05-02T15:34:15.609Z","0.1.2":"2026-05-09T10:25:14.807Z"},"license":"MIT","description":"Agents package the **orthogonal logic** AbeyJs hangs next to flows: same `OmegaChannel` everyone listens to, but routing is **rule-first** instead of a long switchboard of manual subscriptions.","maintainers":[{"name":"abeyjs","email":"abeyjs98@gmail.com"}],"readme":"# `@abeyjs/agents`\r\n\r\nAgents package the **orthogonal logic** AbeyJs hangs next to flows: same `OmegaChannel` everyone listens to, but routing is **rule-first** instead of a long switchboard of manual subscriptions.\r\n\r\nConcrete pieces:\r\n\r\n### `OmegaAgent`\r\n\r\n- Fixed `id`, shared `OmegaChannel`, pluggable **`OmegaAgentBehaviorEngine`**, mutable `state` bag, **`OmegaAgentInbox`** for queued direct mail.\r\n- Subscribes to **all channel events**. Each delivery becomes an `OmegaAgentBehaviorContext`; the behavior engine evaluates rules; **the first matching rule wins** → `OmegaAgentReaction` → subclass implements `onAction`.\r\n- **`receiveIntent`**: flows (or coordinators) invoke this so intent-shaped traffic hits the exact same evaluation path—no duplicated parsing.\r\n- **`connect()`**: hook for wiring timers, narrower channel listeners via `protected on`, outbound publishes, whatever the subclass needs once construction finished.\r\n- **`publish` / `emit`**: forwards to `OmegaChannel`; default `source` metadata is stamped with `this.id` so traces stay attributable.\r\n- **`receiveMessage`** / **`onMessage`**: opt-in pathway for **`OmegaAgentProtocol`** point-to-point traffic.\r\n\r\nAgents do **not** own the UI—they react and emit—so `@abeyjs/view` or `@abeyjs/runtime` chooses when to instantiate and register them.\r\n\r\n### Behavior stack\r\n\r\nAn **`OmegaAgentBehaviorEngine`** collects ordered **`OmegaAgentBehaviorRule`** entries: `(condition, reactionFactory)`. Matching is deterministic: top-to-bottom, first boolean `true`.\r\n\r\n**`OmegaAgentReaction`** is intentionally tiny: `{ action: string; payload?: unknown }`, enough for subclasses to fork without dragging entire channel envelopes through every branch.\r\n\r\nContexts carry either an **`OmegaEvent`** or an **`Intent`**, plus the shared `state` map rules may read or poke.\r\n\r\n### `OmegaStatefulAgent<TState>`\r\n\r\nWraps **`StateCell`** from `@abeyjs/state` for **view-facing snapshots** (`viewState`). The opaque `state` map remains available for coarse rule data (`OmegaAgent.state`).\r\n\r\n### Messaging\r\n\r\n**`OmegaAgentMessage`** is `from → to → action (+ payload)`. **`OmegaAgentProtocol`** keeps a registry, supports `send` to one id or `broadcast` (system envelopes fan out individually). **`OmegaAgentInbox`** is FIFO; optional capped length drops oldest on overflow—useful during storms.\r\n\r\n---\r\n\r\n## Dependency graph\r\n\r\nDepends on **`@abeyjs/core`** (channel/events/intents) and **`@abeyjs/state`** (`StateCell` helper). Typical upstream partner: **`OmegaRuntime`** registers agents beside flows.\r\n\r\n---\r\n\r\n## Build\r\n\r\n```bash\r\nnpm run build -w @abeyjs/agents\r\n```\r\n","readmeFilename":"README.md"}