@warlock.js/herald 5.34.1 → 5.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/llms-full.txt +31 -4
- package/llms.txt +5 -4
- package/package.json +3 -3
- package/skills/index.md +1 -1
- package/skills/README.md +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to `@warlock.js/herald` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 5.34.3 - 2026-10-20
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Condensed the package agent skill description to at most 450 characters, with API names and package routing guidance.
|
|
12
|
+
|
|
13
|
+
## 5.34.2 - 2026-10-19
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Remove the redundant loose skill catalog and include package orientation in generated LLM projections.
|
|
18
|
+
|
|
7
19
|
## 5.33.0 - 2026-10-19
|
|
8
20
|
|
|
9
21
|
### Changed
|
package/llms-full.txt
CHANGED
|
@@ -4,7 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
> Generated artifact. Concatenates every SKILL.md and reference file under `@warlock.js/herald/skills/`. Re-run `node scripts/generate-llms.mjs` after any change.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Package orientation
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
description: 'Broker messaging over RabbitMQ: `connectToBroker`, `herald`, `heraldChannel`, `defineEvent`, `defineConsumer`, `EventMessage` and `EventConsumer`. Use for "publish an event", "subscribe to a channel", "ack or nack", "request and reply" or cross-service pub/sub. Not this package → @warlock.js/queue for durable retried background jobs; @warlock.js/scheduler for cron; @warlock.js/notifications for user notifications.'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# @warlock.js/herald
|
|
14
|
+
|
|
15
|
+
Herald is the broker-agnostic message bus. `connectToBroker(config)` boots a broker once; `herald()` returns it (`herald("name")` for a named one); `.channel(name)` is the queue/topic you publish into and subscribe from. Channels are typed with generics and can validate with a seal schema. Server-only.
|
|
16
|
+
|
|
17
|
+
## The 80% path
|
|
18
|
+
|
|
19
|
+
1. Orient with `herald-basics.md` (the map and foundations).
|
|
20
|
+
2. Connect at startup, then publish: `publish-message.md`.
|
|
21
|
+
3. Consume with `subscribe` handlers or consumer classes: `consume-message.md`.
|
|
22
|
+
4. Need a reply? `request-and-respond.md`.
|
|
23
|
+
|
|
24
|
+
## Conventions and pitfalls
|
|
25
|
+
|
|
26
|
+
- Call `connectToBroker` once before any publish or subscribe.
|
|
27
|
+
- Smart auto-ack is the default: a clean return acks, a throw nacks with requeue. `autoAck: true` loses messages on a crash; avoid it.
|
|
28
|
+
- Use `ctx.reject()` / `ctx.retry(ms)` only for a non-default outcome.
|
|
29
|
+
- Herald is transport, not a job runner: no retries-as-jobs, no scheduling. Use `@warlock.js/queue` for retried jobs, `@warlock.js/scheduler` for cron.
|
|
30
|
+
- Install the driver (`amqplib`) yourself; Kafka is not shipped yet.
|
|
31
|
+
- Do not value-import from client code.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## consume-message `@warlock.js/herald/skills/consume-message/SKILL.md`
|
|
8
35
|
|
|
9
36
|
---
|
|
10
37
|
name: consume-message
|
|
@@ -229,7 +256,7 @@ await channel.delete(); // remove the queue entirely
|
|
|
229
256
|
- The `request-and-respond` topic — when you need to reply to a message
|
|
230
257
|
|
|
231
258
|
|
|
232
|
-
## herald-basics `@warlock.js/herald/herald-basics/SKILL.md`
|
|
259
|
+
## herald-basics `@warlock.js/herald/skills/herald-basics/SKILL.md`
|
|
233
260
|
|
|
234
261
|
---
|
|
235
262
|
name: herald-basics
|
|
@@ -334,7 +361,7 @@ herald("analytics").channel("events").publish({/* ... */}); // → analytics
|
|
|
334
361
|
- The `seal-basics` topic of the `warlock-js-seal` skill — schema validation
|
|
335
362
|
|
|
336
363
|
|
|
337
|
-
## publish-message `@warlock.js/herald/publish-message/SKILL.md`
|
|
364
|
+
## publish-message `@warlock.js/herald/skills/publish-message/SKILL.md`
|
|
338
365
|
|
|
339
366
|
---
|
|
340
367
|
name: publish-message
|
|
@@ -513,7 +540,7 @@ Set an optional `version` on the event (instance field) to drive the consumer's
|
|
|
513
540
|
- The `request-and-respond` topic — when you need a reply
|
|
514
541
|
|
|
515
542
|
|
|
516
|
-
## request-and-respond `@warlock.js/herald/request-and-respond/SKILL.md`
|
|
543
|
+
## request-and-respond `@warlock.js/herald/skills/request-and-respond/SKILL.md`
|
|
517
544
|
|
|
518
545
|
---
|
|
519
546
|
name: request-and-respond
|
package/llms.txt
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
## Skills
|
|
8
8
|
|
|
9
|
-
- [
|
|
10
|
-
- [
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
9
|
+
- [Package orientation](@warlock.js/herald/skills/index.md): Broker messaging over RabbitMQ: `connectToBroker`, `herald`, `heraldChannel`, `defineEvent`, `defineConsumer`, `EventMessage` and `EventConsumer`. Use for "publish an event", "subscribe to a channel", "ack or nack", "request and reply" or cross-service pub/sub. Not this package → @warlock.js/queue for durable retried background jobs; @warlock.js/scheduler for cron; @warlock.js/notifications for user notifications.
|
|
10
|
+
- [consume-message](@warlock.js/herald/skills/consume-message/SKILL.md): Subscribe to a channel via .subscribe(handler, options?) — handler receives (message, ctx). Control flow via ctx.ack / ctx.nack(requeue?) / ctx.reject / ctx.retry(delayMs). Configure prefetch, retry policy, dead-letter, consumer groups. Triggers: `subscribe`, `ctx.ack`, `ctx.nack`, `ctx.reject`, `ctx.retry`, `prefetch`, `group`, `retry`, `deadLetter`, `@Consumable`, `EventConsumer`, `defineConsumer`, `autoAck`; "consume messages from a queue", "implement a worker", "background queue processor", "set up retry and dead-letter", "class-based event consumer"; typical import `import { herald, Consumable, EventConsumer } from "@warlock.js/herald"`. Skip: setup — the `herald-basics` topic; producing — the `publish-message` topic; RPC reply — the `request-and-respond` topic; competing libs `amqplib`, `bullmq`, `kafkajs`; NestJS `@MessagePattern` / `@EventPattern`.
|
|
11
|
+
- [herald-basics](@warlock.js/herald/skills/herald-basics/SKILL.md): Start here for @warlock.js/herald event publishing, consumers, request-response messaging, and configuration.
|
|
12
|
+
- [publish-message](@warlock.js/herald/skills/publish-message/SKILL.md): Publish messages to a channel — .publish(payload, options?) for single, .publishBatch([...], options?) for batch, with priority / ttl / delay / persistent / correlationId / headers options. Optional schema validation via .channel(name, {schema}). Triggers: `publish`, `publishBatch`, `channel`, `priority`, `ttl`, `delay`, `persistent`, `correlationId`, `headers`, `schema`; "publish a message", "emit an event after a domain change", "fan out a notification", "schedule delayed work", "batch publish"; typical import `import { herald } from "@warlock.js/herald"`. Skip: setup — the `herald-basics` topic; consuming — the `consume-message` topic; RPC — the `request-and-respond` topic; competing libs `amqplib`, `kafkajs`, `bullmq`; NestJS `ClientProxy.emit`.
|
|
13
|
+
- [request-and-respond](@warlock.js/herald/skills/request-and-respond/SKILL.md): Synchronous-style RPC over the message bus — channel.request<R>(payload, {timeout}) waits for a reply, channel.respond(handler) registers the responder, ctx.reply(response) sends the answer. Triggers: `channel.request`, `channel.respond`, `ctx.reply`, `timeout`, `correlationId`, `headers.correlationId`; "RPC over message bus", "request-response across services", "wait for a reply", "internal service-to-service call instead of HTTP"; typical import `import { herald } from "@warlock.js/herald"`. Skip: setup — the `herald-basics` topic; fire-and-forget — the `publish-message` topic; consumer ctx flow — the `consume-message` topic; competing libs `amqplib` RPC, `nats` request/reply; NestJS `ClientProxy.send`; gRPC; HTTP.
|
package/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"@mongez/copper": "^2.1.3",
|
|
9
9
|
"@mongez/events": "^2.2.8",
|
|
10
10
|
"@mongez/reinforcements": "^4.0.2",
|
|
11
|
-
"@warlock.js/logger": "5.34.
|
|
12
|
-
"@warlock.js/seal": "5.34.
|
|
11
|
+
"@warlock.js/logger": "5.34.3",
|
|
12
|
+
"@warlock.js/seal": "5.34.3"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"author": "hassanzohdy",
|
|
39
39
|
"license": "MIT",
|
|
40
|
-
"version": "5.34.
|
|
40
|
+
"version": "5.34.3",
|
|
41
41
|
"main": "./cjs/index.cjs",
|
|
42
42
|
"module": "./esm/index.mjs",
|
|
43
43
|
"types": "./esm/index.d.mts",
|
package/skills/index.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: '
|
|
2
|
+
description: 'Broker messaging over RabbitMQ: `connectToBroker`, `herald`, `heraldChannel`, `defineEvent`, `defineConsumer`, `EventMessage` and `EventConsumer`. Use for "publish an event", "subscribe to a channel", "ack or nack", "request and reply" or cross-service pub/sub. Not this package → @warlock.js/queue for durable retried background jobs; @warlock.js/scheduler for cron; @warlock.js/notifications for user notifications.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# @warlock.js/herald
|
package/skills/README.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# `@warlock.js/herald` — skills index
|
|
2
|
-
|
|
3
|
-
Per-task skills. All cross-references use the form `@warlock.js/<pkg>/<skill>/SKILL.md`.
|
|
4
|
-
|
|
5
|
-
## Skills
|
|
6
|
-
|
|
7
|
-
### `consume-message`
|
|
8
|
-
|
|
9
|
-
Subscribe to a channel via .subscribe(handler, options?) — handler receives (message, ctx). Control flow via ctx.ack / ctx.nack(requeue?) / ctx.reject / ctx.retry(delayMs). Configure prefetch, retry policy, dead-letter, consumer groups. Load when implementing a worker processing events, a queue background processor, or consuming an event log.
|
|
10
|
-
|
|
11
|
-
### `herald-basics`
|
|
12
|
-
|
|
13
|
-
Start with @warlock.js/herald — connectToBroker config, herald() factory, channel concept, multi-broker support. Load when wiring connectToBroker at boot, choosing a herald skill, or wiring multiple brokers (notifications + analytics + events).
|
|
14
|
-
|
|
15
|
-
### `publish-message`
|
|
16
|
-
|
|
17
|
-
Publish messages to a channel — .publish(payload, options?) for single, .publishBatch([...], options?) for batch, with priority / ttl / delay / persistent / correlationId / headers options. Optional schema validation via .channel(name, {schema}). Load when emitting an event after a domain change, fanning out a notification, or scheduling delayed work.
|
|
18
|
-
|
|
19
|
-
### `request-and-respond`
|
|
20
|
-
|
|
21
|
-
Synchronous-style RPC over the message bus — channel.request<R>(payload, {timeout}) waits for a reply, channel.respond(handler) registers the responder, ctx.reply(response) sends the answer. Load when needing a request-response shape across services with loose coupling instead of direct HTTP.
|