@omnixal/openclaw-nats-plugin 0.2.6 → 0.2.7
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/dashboard/src/App.svelte
CHANGED
|
@@ -88,6 +88,9 @@
|
|
|
88
88
|
onclick={() => activeTab = tab.id}
|
|
89
89
|
>
|
|
90
90
|
{tab.label}
|
|
91
|
+
{#if tab.id === 'pending' && pending.length > 0}
|
|
92
|
+
<span class="ml-1.5 inline-flex items-center justify-center rounded-full bg-destructive/15 text-destructive text-xs font-semibold min-w-5 h-5 px-1.5">{pending.length}</span>
|
|
93
|
+
{/if}
|
|
91
94
|
</button>
|
|
92
95
|
{/each}
|
|
93
96
|
</div>
|
package/package.json
CHANGED
|
@@ -26,16 +26,18 @@ export class ConsumerController extends BaseController {
|
|
|
26
26
|
this.logger.info(`Queue connected, consuming as ${consumerName}`);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
@Subscribe('agent.events
|
|
29
|
+
@Subscribe('agent.events.#', {
|
|
30
30
|
ackMode: 'manual',
|
|
31
31
|
group: 'openclaw-main',
|
|
32
32
|
})
|
|
33
33
|
async handleInbound(message: Message<unknown>): Promise<void> {
|
|
34
34
|
try {
|
|
35
35
|
const envelope = this.extractEnvelope(message);
|
|
36
|
+
this.logger.info(`Inbound event: ${envelope.subject} (id=${envelope.id})`);
|
|
36
37
|
|
|
37
38
|
const { result, ctx } = await this.pipeline.process(envelope);
|
|
38
39
|
if (result === 'drop') {
|
|
40
|
+
this.logger.debug(`Event dropped by pipeline: ${envelope.id}`);
|
|
39
41
|
await message.ack();
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
@@ -43,10 +45,12 @@ export class ConsumerController extends BaseController {
|
|
|
43
45
|
// Check routing rules
|
|
44
46
|
const routes = await this.routerService.findMatchingRoutes(envelope.subject);
|
|
45
47
|
if (routes.length === 0) {
|
|
48
|
+
this.logger.debug(`No matching routes for ${envelope.subject}`);
|
|
46
49
|
// No route — just ack (event is in JetStream for audit)
|
|
47
50
|
await message.ack();
|
|
48
51
|
return;
|
|
49
52
|
}
|
|
53
|
+
this.logger.info(`Matched ${routes.length} route(s) for ${envelope.subject}`);
|
|
50
54
|
|
|
51
55
|
// Deliver to each matching target
|
|
52
56
|
if (this.gatewayClient.isAlive()) {
|
|
@@ -13,7 +13,11 @@ export class PendingController extends BaseController {
|
|
|
13
13
|
@Get('/:sessionKey')
|
|
14
14
|
async fetchPending(@Param('sessionKey') sessionKey: string): Promise<OneBunResponse> {
|
|
15
15
|
const events = await this.pendingService.fetchPending(sessionKey);
|
|
16
|
-
return this.success(events
|
|
16
|
+
return this.success(events.map(e => ({
|
|
17
|
+
...e,
|
|
18
|
+
createdAt: e.createdAt.getTime(),
|
|
19
|
+
deliveredAt: e.deliveredAt?.getTime() ?? null,
|
|
20
|
+
})));
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
@Post('/mark-delivered')
|
|
@@ -92,7 +92,7 @@ export class SchedulerController extends BaseController {
|
|
|
92
92
|
return this.success({ deleted: true });
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
@Subscribe('scheduler.fire.*')
|
|
95
|
+
@Subscribe('scheduler.fire.*', { group: 'scheduler-handler' })
|
|
96
96
|
async handleFire(message: Message<unknown>): Promise<void> {
|
|
97
97
|
const jobName = message.pattern?.split('.').pop();
|
|
98
98
|
if (jobName) {
|