agentgate 0.3.0 → 0.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgate",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "API gateway for AI agents with human-in-the-loop write approval",
6
6
  "main": "src/index.js",
@@ -1,5 +1,6 @@
1
1
  import { getAccountCredentials, setAccountCredentials, updateQueueStatus, getQueueEntry } from './db.js';
2
2
  import { notifyClawdbot } from './notifier.js';
3
+ import { notifyAgentQueueStatus } from './agentNotifier.js';
3
4
 
4
5
  // Service base URLs
5
6
  const SERVICE_URLS = {
@@ -277,6 +278,9 @@ function finalizeEntry(entryId, status, results) {
277
278
 
278
279
  // Send notification to Clawdbot (async, don't block)
279
280
  const updatedEntry = getQueueEntry(entryId);
281
+ notifyAgentQueueStatus(updatedEntry).catch(err => {
282
+ console.error('[agentNotifier] Failed to notify agent:', err.message);
283
+ });
280
284
  notifyClawdbot(updatedEntry).catch(err => {
281
285
  console.error('[notifier] Failed to notify Clawdbot:', err.message);
282
286
  });
package/src/routes/ui.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  import { connectHsync, disconnectHsync, getHsyncUrl, isHsyncConnected } from '../lib/hsyncManager.js';
12
12
  import { executeQueueEntry } from '../lib/queueExecutor.js';
13
13
  import { notifyClawdbot, retryNotification } from '../lib/notifier.js';
14
- import { notifyAgentMessage, notifyMessageRejected } from '../lib/agentNotifier.js';
14
+ import { notifyAgentMessage, notifyMessageRejected, notifyAgentQueueStatus } from '../lib/agentNotifier.js';
15
15
  import { registerAllRoutes, renderAllCards } from './ui/index.js';
16
16
 
17
17
  const router = Router();
@@ -412,8 +412,11 @@ router.post('/queue/:id/reject', async (req, res) => {
412
412
 
413
413
  updateQueueStatus(id, 'rejected', { rejection_reason: reason || 'No reason provided' });
414
414
 
415
- // Send notification to Clawdbot
415
+ // Send notification to submitting agent and global Clawdbot webhook
416
416
  const updated = getQueueEntry(id);
417
+ notifyAgentQueueStatus(updated).catch(err => {
418
+ console.error('[agentNotifier] Failed to notify agent:', err.message);
419
+ });
417
420
  notifyClawdbot(updated).catch(err => {
418
421
  console.error('[notifier] Failed to notify Clawdbot:', err.message);
419
422
  });