feat: implement AI dispute mediation, webhook DLQ, GSN gas sponsorship, and collaborative config editing#555
Merged
Smartdevs17 merged 4 commits intoJun 28, 2026
Conversation
- Add ai-mediator.ts: NLP signal extraction, pattern-based classification, confidence scoring, auto-resolution at >95% confidence, human escalation - Add resolution-engine.ts: dispute lifecycle management, SLA enforcement, mediator decision recording, analytics dashboard data - Add disputes-ai.ts route: mediate, human-resolve, escalation-queue, analytics, and mediation-log endpoints
…nager - Add delivery-manager.ts: configurable retry policies per endpoint, delivery logs with latency/status/payload preview, health dashboard with 99% success rate alerting, CSV export of delivery logs - Add dead-letter-queue.ts: permanent failure categorization, single/batch/ all replay from DLQ, purge operations, DLQ stats - Add webhooks-dlq.ts route: health, delivery-logs, DLQ CRUD, replay, endpoint retry policy management, CSV export endpoint
…sorship - Add GSNForwarder.sol: EIP-2771/EIP-712 meta-transaction forwarder with authorized relayer management and on-chain nonce tracking - Add SponsorshipPolicy.sol: on-chain budget deposits, per-wallet rate limiting, and relay-server billing integration - Add relay-server.ts: meta-tx validation, EIP-1559 fee estimation with configurable multiplier, Redis-compatible nonce store, budget check, fallback-to-user-gas when budget exhausted - Add budget-manager.ts: per-merchant budget CRUD, top-up, rate-limit enforcement, gas spend recording, billing summaries - Add gsn.ts route: relay, estimate, budget management endpoints
…ig editing - Add collaboration.ts WS handler: OT-based operation sync, presence tracking, critical-section locks (apiKey, webhookUrl, signingSecret), offline op queue/replay, per-user edit history with rollback - Add collaboration.ts REST route: history, participants, locked fields - Add useCollaboration hook: Socket.IO client, operation send with 300ms debounce, offline queue flush on reconnect, lock acquire/release - Add PresenceIndicators: avatar stack with cursor field tooltip - Add CollaborativeField: input with remote cursor, lock state styles - Add EditHistoryPanel: per-user attributed history with rollback confirm - Add CollaborativeProjectConfig: full project config form wired to collab
|
@akintewe is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@akintewe Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements four high-priority features across the AgenticPay platform:
Issue #452 — AI-Powered Payment Dispute Mediation System
backend/src/services/disputes/ai-mediator.ts: NLP signal extraction pipeline (fraud, non-delivery, quality, duplicate patterns), confidence-scored resolution classification, historical pattern boost, auto-resolution at >95% confidence, human escalation with AI-generated summarybackend/src/services/disputes/resolution-engine.ts: Full dispute lifecycle, SLA enforcement (72h deadline), mediator decision recording for continuous model improvement, analytics dashboard (resolution breakdown, SLA breach count, average resolution hours)backend/src/routes/disputes-ai.ts: REST endpoints —POST /:id/mediate,POST /:id/human-resolve,GET /escalation-queue,GET /analytics,GET /:id/mediation-logIssue #453 — Webhook Event Replay and Dead-Letter Queue Management
backend/src/services/webhooks/delivery-manager.ts: Configurable retry policy per endpoint (max retries, backoff multiplier, timeout, window days), delivery logs with status/latency/payload preview, success-rate health dashboard with <99% alert, CSV exportbackend/src/services/webhooks/dead-letter-queue.ts: DLQ with permanent failure categorization (8 categories), single/batch/all replay, purge operations, sync from delivery logs, DLQ statsbackend/src/routes/webhooks-dlq.ts: REST endpoints — health, delivery-logs, CSV export, DLQ CRUD, replay (single/batch/all), endpoint retry policy managementIssue #454 — Gas Station Network for EVM Gas Sponsorship
contracts/evm/gsn/GSNForwarder.sol: EIP-2771/EIP-712 trusted forwarder with authorized relayer management, on-chain per-sender nonce tracking, replay protectioncontracts/evm/gsn/SponsorshipPolicy.sol: On-chain merchant budget deposits, per-wallet daily rate limiting, relay-server billing integration, budget exhaustion eventsbackend/src/services/gsn/relay-server.ts: Meta-tx validation (signature format, deadline, replay protection), EIP-1559 fee estimation with configurable multiplier, nonce store, fallback-to-user-gas when budget exhaustedbackend/src/services/gsn/budget-manager.ts: Per-merchant budget CRUD, top-up, rate-limit enforcement (rolling 24h window), gas spend recording, billing summariesbackend/src/routes/gsn.ts: REST endpoints — relay, estimate, budget management, billing summary, sponsored tx listIssue #455 — Real-Time Collaborative Project Config Editing
backend/src/websocket/collaboration.ts: Socket.IO namespace handler with OT-based operation sync (<200ms), presence tracking with cursor positions, critical field locking (apiKey, webhookUrl, signingSecret), offline op queue/replay on reconnect, edit history with per-user attribution and rollbackbackend/src/routes/collaboration.ts: REST endpoints — edit history, active participants, locked fieldsfrontend/components/collaboration/useCollaboration.ts: React hook — Socket.IO client, operation send with 300ms debounce, offline queue flush on reconnect, lock acquire/release Promise APIfrontend/components/collaboration/PresenceIndicators.tsx: Avatar stack with cursor field tooltip, active dot indicator, overflow counterfrontend/components/collaboration/CollaborativeField.tsx: Input with remote cursor indicator, lock state visual styles, critical field lock acquire/release on focus/blurfrontend/components/collaboration/EditHistoryPanel.tsx: Slide-in panel with per-user attributed history, version display, rollback with confirmation dialogfrontend/components/collaboration/CollaborativeProjectConfig.tsx: Full project config form wired to collaboration hook — general, redirect, and critical security fieldsTest plan
closes #452 closes #453 closes #454 closes #455