proagents 1.6.17 → 1.6.19

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.
Files changed (185) hide show
  1. package/.claude/settings.local.json +169 -0
  2. package/.proagents/AGENTS.md +2 -0
  3. package/.proagents/AI_INSTRUCTIONS.md +13 -0
  4. package/.proagents/ANTIGRAVITY.md +2 -0
  5. package/.proagents/BOLT.md +2 -0
  6. package/.proagents/CHATGPT.md +2 -0
  7. package/.proagents/CLAUDE.md +2 -0
  8. package/.proagents/GEMINI.md +2 -0
  9. package/.proagents/GROQ.md +2 -0
  10. package/.proagents/KIRO.md +2 -0
  11. package/.proagents/LOVABLE.md +2 -0
  12. package/.proagents/PROAGENTS.md +2 -0
  13. package/.proagents/REPLIT.md +2 -0
  14. package/.proagents/prompts/00-project-setup.md +878 -0
  15. package/.proagents/prompts/04-planning.md +38 -0
  16. package/.proagents/prompts/12-rnd.md +957 -0
  17. package/.proagents/workflow-modes/entry-modes.md +27 -0
  18. package/.proagents/worklog/_context.template.md +47 -0
  19. package/COMMANDS.md +654 -0
  20. package/README.md +16 -24
  21. package/package.json +2 -7
  22. package/.proagents/ai-models/README.md +0 -141
  23. package/.proagents/ai-models/cost-management.md +0 -362
  24. package/.proagents/ai-models/fallbacks.md +0 -342
  25. package/.proagents/ai-models/model-config.md +0 -318
  26. package/.proagents/ai-models/task-routing.md +0 -503
  27. package/.proagents/ai-training/README.md +0 -155
  28. package/.proagents/ai-training/continuous-learning.md +0 -413
  29. package/.proagents/ai-training/domain-knowledge.md +0 -378
  30. package/.proagents/ai-training/pattern-learning.md +0 -455
  31. package/.proagents/ai-training/training-data.md +0 -337
  32. package/.proagents/ai-training/user-preferences.md +0 -346
  33. package/.proagents/approval-workflows/README.md +0 -146
  34. package/.proagents/approval-workflows/approval-config.md +0 -332
  35. package/.proagents/approval-workflows/approval-stages.md +0 -503
  36. package/.proagents/approval-workflows/emergency-bypass.md +0 -351
  37. package/.proagents/approval-workflows/examples.md +0 -859
  38. package/.proagents/approval-workflows/notifications.md +0 -320
  39. package/.proagents/compliance/README.md +0 -206
  40. package/.proagents/compliance/access-control.md +0 -310
  41. package/.proagents/compliance/audit-logging.md +0 -444
  42. package/.proagents/compliance/compliance-frameworks.md +0 -429
  43. package/.proagents/compliance/reports.md +0 -491
  44. package/.proagents/compliance/retention-policies.md +0 -454
  45. package/.proagents/config-versioning/README.md +0 -120
  46. package/.proagents/config-versioning/changelog.md +0 -300
  47. package/.proagents/config-versioning/rollback.md +0 -283
  48. package/.proagents/config-versioning/versioning.md +0 -330
  49. package/.proagents/contract-testing/README.md +0 -223
  50. package/.proagents/contract-testing/contract-testing.md +0 -614
  51. package/.proagents/contract-testing/pact-integration.md +0 -507
  52. package/.proagents/contract-testing/schema-validation.md +0 -565
  53. package/.proagents/dependency-management/README.md +0 -140
  54. package/.proagents/dependency-management/automation.md +0 -363
  55. package/.proagents/dependency-management/compatibility.md +0 -319
  56. package/.proagents/dependency-management/security-scanning.md +0 -413
  57. package/.proagents/dependency-management/update-policies.md +0 -374
  58. package/.proagents/disaster-recovery/README.md +0 -247
  59. package/.proagents/disaster-recovery/automation.md +0 -366
  60. package/.proagents/disaster-recovery/backup-recovery.md +0 -571
  61. package/.proagents/disaster-recovery/incident-response.md +0 -565
  62. package/.proagents/disaster-recovery/rollback-procedures.md +0 -499
  63. package/.proagents/disaster-recovery/runbooks.md +0 -603
  64. package/.proagents/disaster-recovery/scenarios.md +0 -892
  65. package/.proagents/disaster-recovery/testing.md +0 -438
  66. package/.proagents/environments/README.md +0 -244
  67. package/.proagents/environments/configuration.md +0 -437
  68. package/.proagents/environments/promotion.md +0 -434
  69. package/.proagents/environments/setup.md +0 -420
  70. package/.proagents/examples/README.md +0 -55
  71. package/.proagents/examples/backend-nodejs/README.md +0 -188
  72. package/.proagents/examples/backend-nodejs/complete-conversation.md +0 -601
  73. package/.proagents/examples/backend-nodejs/proagents.config.yaml +0 -415
  74. package/.proagents/examples/backend-nodejs/workflow-example.md +0 -909
  75. package/.proagents/examples/fullstack-nextjs/README.md +0 -155
  76. package/.proagents/examples/fullstack-nextjs/complete-conversation.md +0 -604
  77. package/.proagents/examples/fullstack-nextjs/proagents.config.yaml +0 -287
  78. package/.proagents/examples/fullstack-nextjs/workflow-example.md +0 -553
  79. package/.proagents/examples/mobile-react-native/README.md +0 -171
  80. package/.proagents/examples/mobile-react-native/complete-conversation.md +0 -825
  81. package/.proagents/examples/mobile-react-native/proagents.config.yaml +0 -330
  82. package/.proagents/examples/mobile-react-native/workflow-example.md +0 -723
  83. package/.proagents/examples/web-frontend-react/README.md +0 -125
  84. package/.proagents/examples/web-frontend-react/complete-conversation.md +0 -556
  85. package/.proagents/examples/web-frontend-react/proagents.config.yaml +0 -183
  86. package/.proagents/examples/web-frontend-react/workflow-example.md +0 -603
  87. package/.proagents/existing-projects/README.md +0 -65
  88. package/.proagents/existing-projects/challenges.md +0 -861
  89. package/.proagents/existing-projects/coexistence-mode.md +0 -483
  90. package/.proagents/existing-projects/compatibility-assessment.md +0 -541
  91. package/.proagents/existing-projects/gradual-adoption.md +0 -515
  92. package/.proagents/existing-projects/migration-strategies.md +0 -788
  93. package/.proagents/existing-projects/pattern-reconciliation.md +0 -489
  94. package/.proagents/existing-projects/team-onboarding.md +0 -617
  95. package/.proagents/existing-projects/technical-debt-handling.md +0 -644
  96. package/.proagents/feature-flags/README.md +0 -263
  97. package/.proagents/feature-flags/ab-testing.md +0 -413
  98. package/.proagents/feature-flags/configuration.md +0 -420
  99. package/.proagents/feature-flags/kill-switches.md +0 -444
  100. package/.proagents/feature-flags/rollout-strategies.md +0 -392
  101. package/.proagents/history.log +0 -12
  102. package/.proagents/i18n/README.md +0 -133
  103. package/.proagents/i18n/extraction.md +0 -433
  104. package/.proagents/i18n/tms-integration.md +0 -332
  105. package/.proagents/i18n/translation-workflow.md +0 -413
  106. package/.proagents/i18n/validation.md +0 -355
  107. package/.proagents/logging/README.md +0 -276
  108. package/.proagents/logging/aggregation.md +0 -475
  109. package/.proagents/logging/log-levels.md +0 -376
  110. package/.proagents/logging/sensitive-data.md +0 -423
  111. package/.proagents/logging/structured-logging.md +0 -406
  112. package/.proagents/metrics/README.md +0 -69
  113. package/.proagents/metrics/code-quality-kpis.md +0 -461
  114. package/.proagents/metrics/deployment-metrics.md +0 -517
  115. package/.proagents/metrics/developer-productivity.md +0 -368
  116. package/.proagents/metrics/learning-effectiveness.md +0 -478
  117. package/.proagents/migrations/README.md +0 -77
  118. package/.proagents/migrations/from-claude-projects.md +0 -313
  119. package/.proagents/migrations/from-cursor-rules.md +0 -345
  120. package/.proagents/migrations/from-custom-workflows.md +0 -410
  121. package/.proagents/monitoring/README.md +0 -308
  122. package/.proagents/monitoring/alerting.md +0 -449
  123. package/.proagents/monitoring/dashboards.md +0 -454
  124. package/.proagents/monitoring/health-checks.md +0 -436
  125. package/.proagents/monitoring/metrics.md +0 -434
  126. package/.proagents/multi-project/README.md +0 -170
  127. package/.proagents/multi-project/coordinated-deploy.md +0 -510
  128. package/.proagents/multi-project/cross-project-deps.md +0 -395
  129. package/.proagents/multi-project/unified-changelog.md +0 -477
  130. package/.proagents/multi-project/walkthroughs/monorepo-setup.md +0 -787
  131. package/.proagents/multi-project/workspace-config.md +0 -408
  132. package/.proagents/notifications/README.md +0 -151
  133. package/.proagents/notifications/channels.md +0 -457
  134. package/.proagents/notifications/preferences.md +0 -415
  135. package/.proagents/notifications/routing.md +0 -449
  136. package/.proagents/notifications/scheduling.md +0 -425
  137. package/.proagents/notifications/templates.md +0 -446
  138. package/.proagents/offline-mode/README.md +0 -145
  139. package/.proagents/offline-mode/caching.md +0 -344
  140. package/.proagents/offline-mode/offline-operations.md +0 -312
  141. package/.proagents/offline-mode/queue-specifications.md +0 -679
  142. package/.proagents/offline-mode/sync.md +0 -475
  143. package/.proagents/parallel-features/README.md +0 -85
  144. package/.proagents/parallel-features/conflict-detection.md +0 -226
  145. package/.proagents/parallel-features/dependency-management.md +0 -392
  146. package/.proagents/parallel-features/merge-coordination.md +0 -506
  147. package/.proagents/parallel-features/tracking-system.md +0 -416
  148. package/.proagents/performance/README.md +0 -59
  149. package/.proagents/performance/bundle-analysis.md +0 -375
  150. package/.proagents/performance/load-testing.md +0 -563
  151. package/.proagents/performance/runtime-metrics.md +0 -489
  152. package/.proagents/performance/web-vitals.md +0 -425
  153. package/.proagents/plugins/README.md +0 -139
  154. package/.proagents/plugins/creating-plugins.md +0 -504
  155. package/.proagents/plugins/plugin-api.md +0 -467
  156. package/.proagents/plugins/plugin-registry.md +0 -276
  157. package/.proagents/reporting/README.md +0 -158
  158. package/.proagents/reporting/dashboards.md +0 -366
  159. package/.proagents/reporting/exports.md +0 -524
  160. package/.proagents/reporting/quality-metrics.md +0 -385
  161. package/.proagents/reporting/templates/README.md +0 -56
  162. package/.proagents/reporting/templates/dashboard-config.json +0 -187
  163. package/.proagents/reporting/templates/metrics-queries.md +0 -427
  164. package/.proagents/reporting/templates/react-dashboard.tsx +0 -544
  165. package/.proagents/reporting/templates/widgets.md +0 -451
  166. package/.proagents/reporting/velocity-metrics.md +0 -340
  167. package/.proagents/reverse-engineering/README.md +0 -151
  168. package/.proagents/reverse-engineering/architecture-extraction.md +0 -325
  169. package/.proagents/reverse-engineering/code-analysis.md +0 -377
  170. package/.proagents/reverse-engineering/dependency-mapping.md +0 -567
  171. package/.proagents/reverse-engineering/diagram-generation.md +0 -586
  172. package/.proagents/reverse-engineering/documentation-generation.md +0 -468
  173. package/.proagents/reverse-engineering/pattern-detection.md +0 -569
  174. package/.proagents/reverse-engineering/quality-assessment.md +0 -733
  175. package/.proagents/secrets/README.md +0 -278
  176. package/.proagents/secrets/access-control.md +0 -443
  177. package/.proagents/secrets/rotation.md +0 -403
  178. package/.proagents/secrets/scanning.md +0 -487
  179. package/.proagents/secrets/storage.md +0 -394
  180. package/.proagents/webhooks/README.md +0 -126
  181. package/.proagents/webhooks/endpoints.md +0 -298
  182. package/.proagents/webhooks/events.md +0 -316
  183. package/.proagents/webhooks/payloads.md +0 -325
  184. package/.proagents/webhooks/reliability.md +0 -363
  185. package/.proagents/webhooks/security.md +0 -380
@@ -1,325 +0,0 @@
1
- # Webhook Payload Format
2
-
3
- Standard payload structure and customization options.
4
-
5
- ---
6
-
7
- ## Standard Payload Structure
8
-
9
- ### Base Format
10
-
11
- ```json
12
- {
13
- "id": "evt_abc123def456",
14
- "event": "feature.completed",
15
- "timestamp": "2024-01-15T14:30:00.000Z",
16
- "version": "1.0",
17
- "source": {
18
- "project": "my-project",
19
- "environment": "production",
20
- "proagents_version": "2.5.0"
21
- },
22
- "data": {
23
- // Event-specific data
24
- },
25
- "metadata": {
26
- "delivery_attempt": 1,
27
- "idempotency_key": "idem_xyz789"
28
- }
29
- }
30
- ```
31
-
32
- ---
33
-
34
- ## Field Descriptions
35
-
36
- | Field | Type | Description |
37
- |-------|------|-------------|
38
- | `id` | string | Unique event identifier |
39
- | `event` | string | Event type (e.g., `feature.completed`) |
40
- | `timestamp` | ISO 8601 | Event occurrence time |
41
- | `version` | string | Payload schema version |
42
- | `source.project` | string | Project name |
43
- | `source.environment` | string | Environment (dev/staging/prod) |
44
- | `source.proagents_version` | string | ProAgents version |
45
- | `data` | object | Event-specific payload |
46
- | `metadata.delivery_attempt` | number | Delivery attempt number |
47
- | `metadata.idempotency_key` | string | Key for deduplication |
48
-
49
- ---
50
-
51
- ## Custom Payload Transformation
52
-
53
- ### Template-Based
54
-
55
- ```yaml
56
- webhooks:
57
- endpoints:
58
- - name: "slack-webhook"
59
- url: "https://hooks.slack.com/services/xxx"
60
- events: ["feature.completed"]
61
- transform:
62
- template: |
63
- {
64
- "text": "Feature {{data.feature_name}} completed!",
65
- "attachments": [
66
- {
67
- "color": "good",
68
- "fields": [
69
- {
70
- "title": "Duration",
71
- "value": "{{data.duration_minutes}} minutes",
72
- "short": true
73
- },
74
- {
75
- "title": "Files Changed",
76
- "value": "{{data.files_changed}}",
77
- "short": true
78
- }
79
- ]
80
- }
81
- ]
82
- }
83
- ```
84
-
85
- ### Field Mapping
86
-
87
- ```yaml
88
- webhooks:
89
- endpoints:
90
- - name: "custom-api"
91
- url: "https://api.example.com/webhooks"
92
- events: ["*"]
93
- transform:
94
- mapping:
95
- event_type: "event"
96
- occurred_at: "timestamp"
97
- project_name: "source.project"
98
- payload: "data"
99
- ```
100
-
101
- ### JavaScript Transform
102
-
103
- ```yaml
104
- webhooks:
105
- endpoints:
106
- - name: "transformed-webhook"
107
- url: "https://api.example.com/webhooks"
108
- events: ["*"]
109
- transform:
110
- script: |
111
- function transform(payload) {
112
- return {
113
- type: payload.event,
114
- time: new Date(payload.timestamp).getTime(),
115
- info: payload.data,
116
- tags: [payload.source.project, payload.source.environment]
117
- };
118
- }
119
- ```
120
-
121
- ---
122
-
123
- ## Platform-Specific Formats
124
-
125
- ### Slack Format
126
-
127
- ```yaml
128
- webhooks:
129
- endpoints:
130
- - name: "slack"
131
- url: "https://hooks.slack.com/services/xxx"
132
- format: "slack"
133
- events: ["feature.*", "deploy.*"]
134
- ```
135
-
136
- **Auto-Generated Slack Payload:**
137
- ```json
138
- {
139
- "text": "ProAgents Event: feature.completed",
140
- "blocks": [
141
- {
142
- "type": "header",
143
- "text": {
144
- "type": "plain_text",
145
- "text": "Feature Completed"
146
- }
147
- },
148
- {
149
- "type": "section",
150
- "fields": [
151
- {
152
- "type": "mrkdwn",
153
- "text": "*Feature:*\nUser Authentication"
154
- },
155
- {
156
- "type": "mrkdwn",
157
- "text": "*Duration:*\n4 hours"
158
- }
159
- ]
160
- }
161
- ]
162
- }
163
- ```
164
-
165
- ### Discord Format
166
-
167
- ```yaml
168
- webhooks:
169
- endpoints:
170
- - name: "discord"
171
- url: "https://discord.com/api/webhooks/xxx"
172
- format: "discord"
173
- events: ["feature.*", "deploy.*"]
174
- ```
175
-
176
- **Auto-Generated Discord Payload:**
177
- ```json
178
- {
179
- "content": "ProAgents Event",
180
- "embeds": [
181
- {
182
- "title": "Feature Completed",
183
- "color": 5763719,
184
- "fields": [
185
- {
186
- "name": "Feature",
187
- "value": "User Authentication",
188
- "inline": true
189
- },
190
- {
191
- "name": "Duration",
192
- "value": "4 hours",
193
- "inline": true
194
- }
195
- ],
196
- "timestamp": "2024-01-15T14:30:00.000Z"
197
- }
198
- ]
199
- }
200
- ```
201
-
202
- ### Microsoft Teams Format
203
-
204
- ```yaml
205
- webhooks:
206
- endpoints:
207
- - name: "teams"
208
- url: "https://outlook.office.com/webhook/xxx"
209
- format: "teams"
210
- events: ["feature.*", "deploy.*"]
211
- ```
212
-
213
- **Auto-Generated Teams Payload:**
214
- ```json
215
- {
216
- "@type": "MessageCard",
217
- "@context": "http://schema.org/extensions",
218
- "summary": "ProAgents Event: feature.completed",
219
- "themeColor": "0076D7",
220
- "title": "Feature Completed",
221
- "sections": [
222
- {
223
- "facts": [
224
- {
225
- "name": "Feature",
226
- "value": "User Authentication"
227
- },
228
- {
229
- "name": "Duration",
230
- "value": "4 hours"
231
- }
232
- ]
233
- }
234
- ]
235
- }
236
- ```
237
-
238
- ---
239
-
240
- ## Payload Size Limits
241
-
242
- ### Default Limits
243
-
244
- ```yaml
245
- webhooks:
246
- limits:
247
- max_payload_size: "1MB"
248
- max_array_items: 100
249
- truncate_strings: 10000
250
- ```
251
-
252
- ### Large Payload Handling
253
-
254
- ```yaml
255
- webhooks:
256
- endpoints:
257
- - name: "large-payload-api"
258
- url: "https://api.example.com/webhooks"
259
- events: ["*"]
260
- large_payload:
261
- # If payload exceeds limit
262
- action: "link" # "truncate" | "link" | "split"
263
-
264
- # For "link" action
265
- storage: "s3"
266
- bucket: "proagents-webhooks"
267
- expiry: "24h"
268
- ```
269
-
270
- **Linked Payload Example:**
271
- ```json
272
- {
273
- "id": "evt_abc123",
274
- "event": "analysis.completed",
275
- "timestamp": "2024-01-15T14:30:00Z",
276
- "payload_truncated": true,
277
- "payload_url": "https://s3.amazonaws.com/proagents-webhooks/evt_abc123.json",
278
- "payload_expires": "2024-01-16T14:30:00Z"
279
- }
280
- ```
281
-
282
- ---
283
-
284
- ## Response Handling
285
-
286
- ### Expected Response
287
-
288
- ```json
289
- {
290
- "status": "received",
291
- "id": "your-internal-id"
292
- }
293
- ```
294
-
295
- ### Response Processing
296
-
297
- ```yaml
298
- webhooks:
299
- endpoints:
300
- - name: "response-aware"
301
- url: "https://api.example.com/webhooks"
302
- events: ["*"]
303
- response:
304
- # Expect acknowledgment
305
- expect_ack: true
306
-
307
- # Success status codes
308
- success_codes: [200, 201, 202]
309
-
310
- # Parse response
311
- parse_response: true
312
-
313
- # Store response
314
- log_response: true
315
- ```
316
-
317
- ---
318
-
319
- ## Best Practices
320
-
321
- 1. **Idempotent Processing**: Use `metadata.idempotency_key` for deduplication
322
- 2. **Verify Event ID**: Check `id` to prevent duplicate processing
323
- 3. **Handle Large Payloads**: Implement proper handling for large data
324
- 4. **Respond Quickly**: Acknowledge webhooks quickly, process async
325
- 5. **Log Webhooks**: Keep records for debugging
@@ -1,363 +0,0 @@
1
- # Webhook Reliability
2
-
3
- Retry logic, delivery guarantees, and failure handling.
4
-
5
- ---
6
-
7
- ## Delivery Guarantees
8
-
9
- ### At-Least-Once Delivery
10
-
11
- ProAgents guarantees at-least-once delivery:
12
-
13
- - Every event will be delivered at least once
14
- - Duplicate deliveries may occur
15
- - Use idempotency keys for deduplication
16
-
17
- ```json
18
- {
19
- "id": "evt_abc123",
20
- "metadata": {
21
- "idempotency_key": "idem_xyz789"
22
- }
23
- }
24
- ```
25
-
26
- ---
27
-
28
- ## Retry Configuration
29
-
30
- ### Basic Retry
31
-
32
- ```yaml
33
- webhooks:
34
- endpoints:
35
- - name: "reliable-webhook"
36
- url: "https://api.example.com/webhooks"
37
- retry:
38
- enabled: true
39
- max_attempts: 5
40
- initial_delay: 1000 # 1 second
41
- max_delay: 300000 # 5 minutes
42
- backoff: "exponential"
43
- ```
44
-
45
- ### Backoff Strategies
46
-
47
- **Exponential Backoff:**
48
- ```yaml
49
- retry:
50
- backoff: "exponential"
51
- initial_delay: 1000
52
- multiplier: 2
53
- max_delay: 300000
54
-
55
- # Retry schedule: 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s, 256s, 300s (capped)
56
- ```
57
-
58
- **Linear Backoff:**
59
- ```yaml
60
- retry:
61
- backoff: "linear"
62
- initial_delay: 5000
63
- increment: 5000
64
- max_delay: 60000
65
-
66
- # Retry schedule: 5s, 10s, 15s, 20s, 25s, ... 60s (capped)
67
- ```
68
-
69
- **Fixed Delay:**
70
- ```yaml
71
- retry:
72
- backoff: "fixed"
73
- delay: 30000
74
-
75
- # Retry schedule: 30s, 30s, 30s, 30s, ...
76
- ```
77
-
78
- ### Jitter
79
-
80
- ```yaml
81
- retry:
82
- backoff: "exponential"
83
- jitter:
84
- enabled: true
85
- type: "full" # "full" | "equal" | "decorrelated"
86
-
87
- # Adds randomness to prevent thundering herd
88
- ```
89
-
90
- ---
91
-
92
- ## Failure Handling
93
-
94
- ### Failure Detection
95
-
96
- ```yaml
97
- webhooks:
98
- endpoints:
99
- - name: "monitored-webhook"
100
- url: "https://api.example.com/webhooks"
101
- failure_detection:
102
- # Status codes considered failures
103
- failure_codes: [500, 502, 503, 504]
104
-
105
- # Timeout
106
- timeout: 30000 # 30 seconds
107
-
108
- # Connection errors are always failures
109
- connection_errors: true
110
- ```
111
-
112
- ### Dead Letter Queue
113
-
114
- ```yaml
115
- webhooks:
116
- dead_letter:
117
- enabled: true
118
-
119
- # After max retries, send to DLQ
120
- after_max_retries: true
121
-
122
- # DLQ destination
123
- queue:
124
- type: "database" # "database" | "sqs" | "redis"
125
-
126
- # Retention
127
- retention: "7d"
128
-
129
- # Alerting
130
- alert_on_dlq: true
131
- alert_threshold: 10
132
- ```
133
-
134
- ### Circuit Breaker
135
-
136
- ```yaml
137
- webhooks:
138
- endpoints:
139
- - name: "circuit-breaker-webhook"
140
- url: "https://api.example.com/webhooks"
141
- circuit_breaker:
142
- enabled: true
143
-
144
- # Open circuit after N consecutive failures
145
- failure_threshold: 5
146
-
147
- # Time to wait before trying again
148
- reset_timeout: 60000 # 1 minute
149
-
150
- # Half-open: allow limited requests
151
- half_open_requests: 3
152
- ```
153
-
154
- **Circuit States:**
155
- ```
156
- Closed (Normal)
157
-
158
- │ 5 consecutive failures
159
-
160
- Open (No requests sent)
161
-
162
- │ 60 seconds
163
-
164
- Half-Open (Limited requests)
165
-
166
- ├── Success → Closed
167
- └── Failure → Open
168
- ```
169
-
170
- ---
171
-
172
- ## Monitoring
173
-
174
- ### Health Metrics
175
-
176
- ```yaml
177
- webhooks:
178
- monitoring:
179
- metrics:
180
- enabled: true
181
- export:
182
- - "prometheus"
183
- - "datadog"
184
-
185
- # Tracked metrics
186
- track:
187
- - "delivery_success_rate"
188
- - "delivery_latency"
189
- - "retry_count"
190
- - "dlq_size"
191
- - "circuit_breaker_state"
192
- ```
193
-
194
- ### Health Dashboard
195
-
196
- ```
197
- ┌─────────────────────────────────────────────────────────────┐
198
- │ Webhook Health - Last 24 Hours │
199
- ├─────────────────────────────────────────────────────────────┤
200
- │ │
201
- │ Endpoint: slack-notifications │
202
- │ Status: ✅ Healthy │
203
- │ │
204
- │ Deliveries: 1,234 │
205
- │ Success Rate: 99.5% │
206
- │ Avg Latency: 245ms │
207
- │ Retries: 12 │
208
- │ Failed (DLQ): 2 │
209
- │ │
210
- │ Circuit Breaker: Closed │
211
- │ │
212
- ├─────────────────────────────────────────────────────────────┤
213
- │ Endpoint: custom-api │
214
- │ Status: ⚠️ Degraded │
215
- │ │
216
- │ Deliveries: 567 │
217
- │ Success Rate: 85.2% │
218
- │ Avg Latency: 2,450ms │
219
- │ Retries: 156 │
220
- │ Failed (DLQ): 45 │
221
- │ │
222
- │ Circuit Breaker: Half-Open │
223
- │ │
224
- └─────────────────────────────────────────────────────────────┘
225
- ```
226
-
227
- ### Alerting
228
-
229
- ```yaml
230
- webhooks:
231
- alerting:
232
- channels:
233
- - type: "slack"
234
- webhook: "${ALERT_SLACK_WEBHOOK}"
235
- - type: "email"
236
- recipients: ["devops@company.com"]
237
-
238
- rules:
239
- - name: "high_failure_rate"
240
- condition: "success_rate < 95%"
241
- duration: "5m"
242
- severity: "warning"
243
-
244
- - name: "circuit_open"
245
- condition: "circuit_breaker == open"
246
- severity: "critical"
247
-
248
- - name: "dlq_growing"
249
- condition: "dlq_size > 100"
250
- severity: "warning"
251
- ```
252
-
253
- ---
254
-
255
- ## Manual Intervention
256
-
257
- ### Replay Failed Webhooks
258
-
259
- ```bash
260
- # Replay all failed webhooks
261
- proagents webhooks replay --failed
262
-
263
- # Replay specific event
264
- proagents webhooks replay --event-id evt_abc123
265
-
266
- # Replay from DLQ
267
- proagents webhooks replay --dlq --last 24h
268
-
269
- # Dry run
270
- proagents webhooks replay --failed --dry-run
271
- ```
272
-
273
- ### Manual Trigger
274
-
275
- ```bash
276
- # Manually send webhook
277
- proagents webhooks send \
278
- --endpoint slack-notifications \
279
- --event feature.completed \
280
- --data '{"feature_name": "test"}'
281
- ```
282
-
283
- ### Pause/Resume
284
-
285
- ```bash
286
- # Pause webhook delivery
287
- proagents webhooks pause slack-notifications
288
-
289
- # Resume
290
- proagents webhooks resume slack-notifications
291
-
292
- # Pause all
293
- proagents webhooks pause --all
294
- ```
295
-
296
- ---
297
-
298
- ## Delivery History
299
-
300
- ### Query History
301
-
302
- ```bash
303
- # View recent deliveries
304
- proagents webhooks history
305
-
306
- # Filter by endpoint
307
- proagents webhooks history --endpoint slack-notifications
308
-
309
- # Filter by status
310
- proagents webhooks history --status failed
311
-
312
- # Filter by date
313
- proagents webhooks history --from "2024-01-01" --to "2024-01-15"
314
-
315
- # Export
316
- proagents webhooks history --export csv > webhooks.csv
317
- ```
318
-
319
- ### History Record
320
-
321
- ```json
322
- {
323
- "id": "del_abc123",
324
- "event_id": "evt_xyz789",
325
- "endpoint": "slack-notifications",
326
- "url": "https://hooks.slack.com/services/xxx",
327
- "timestamp": "2024-01-15T14:30:00Z",
328
- "status": "success",
329
- "attempts": 1,
330
- "latency_ms": 245,
331
- "request": {
332
- "method": "POST",
333
- "headers": {...},
334
- "body_size": 1234
335
- },
336
- "response": {
337
- "status_code": 200,
338
- "body": "ok"
339
- }
340
- }
341
- ```
342
-
343
- ---
344
-
345
- ## Best Practices
346
-
347
- ### For Senders (ProAgents)
348
-
349
- 1. **Implement Retries**: Always retry failed deliveries
350
- 2. **Use Exponential Backoff**: Prevent overwhelming endpoints
351
- 3. **Add Jitter**: Avoid thundering herd
352
- 4. **Use Circuit Breakers**: Protect unhealthy endpoints
353
- 5. **Monitor Health**: Track success rates and latency
354
- 6. **Provide DLQ**: Store failed events for replay
355
-
356
- ### For Receivers
357
-
358
- 1. **Respond Quickly**: Return 2xx immediately, process async
359
- 2. **Be Idempotent**: Handle duplicate deliveries gracefully
360
- 3. **Log Everything**: Keep records for debugging
361
- 4. **Handle Failures**: Return appropriate error codes
362
- 5. **Use Queues**: Queue webhooks for reliable processing
363
- 6. **Monitor**: Track incoming webhook health