proagents 1.6.16 → 1.6.18
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/.claude/settings.local.json +169 -0
- package/COMMANDS.md +595 -0
- package/README.md +22 -64
- package/bin/proagents.js +0 -2
- package/lib/commands/init.js +4 -174
- package/package.json +2 -7
- package/.proagents/ai-models/README.md +0 -141
- package/.proagents/ai-models/cost-management.md +0 -362
- package/.proagents/ai-models/fallbacks.md +0 -342
- package/.proagents/ai-models/model-config.md +0 -318
- package/.proagents/ai-models/task-routing.md +0 -503
- package/.proagents/ai-training/README.md +0 -155
- package/.proagents/ai-training/continuous-learning.md +0 -413
- package/.proagents/ai-training/domain-knowledge.md +0 -378
- package/.proagents/ai-training/pattern-learning.md +0 -455
- package/.proagents/ai-training/training-data.md +0 -337
- package/.proagents/ai-training/user-preferences.md +0 -346
- package/.proagents/approval-workflows/README.md +0 -146
- package/.proagents/approval-workflows/approval-config.md +0 -332
- package/.proagents/approval-workflows/approval-stages.md +0 -503
- package/.proagents/approval-workflows/emergency-bypass.md +0 -351
- package/.proagents/approval-workflows/examples.md +0 -859
- package/.proagents/approval-workflows/notifications.md +0 -320
- package/.proagents/compliance/README.md +0 -206
- package/.proagents/compliance/access-control.md +0 -310
- package/.proagents/compliance/audit-logging.md +0 -444
- package/.proagents/compliance/compliance-frameworks.md +0 -429
- package/.proagents/compliance/reports.md +0 -491
- package/.proagents/compliance/retention-policies.md +0 -454
- package/.proagents/config-versioning/README.md +0 -120
- package/.proagents/config-versioning/changelog.md +0 -300
- package/.proagents/config-versioning/rollback.md +0 -283
- package/.proagents/config-versioning/versioning.md +0 -330
- package/.proagents/contract-testing/README.md +0 -223
- package/.proagents/contract-testing/contract-testing.md +0 -614
- package/.proagents/contract-testing/pact-integration.md +0 -507
- package/.proagents/contract-testing/schema-validation.md +0 -565
- package/.proagents/dependency-management/README.md +0 -140
- package/.proagents/dependency-management/automation.md +0 -363
- package/.proagents/dependency-management/compatibility.md +0 -319
- package/.proagents/dependency-management/security-scanning.md +0 -413
- package/.proagents/dependency-management/update-policies.md +0 -374
- package/.proagents/disaster-recovery/README.md +0 -247
- package/.proagents/disaster-recovery/automation.md +0 -366
- package/.proagents/disaster-recovery/backup-recovery.md +0 -571
- package/.proagents/disaster-recovery/incident-response.md +0 -565
- package/.proagents/disaster-recovery/rollback-procedures.md +0 -499
- package/.proagents/disaster-recovery/runbooks.md +0 -603
- package/.proagents/disaster-recovery/scenarios.md +0 -892
- package/.proagents/disaster-recovery/testing.md +0 -438
- package/.proagents/environments/README.md +0 -244
- package/.proagents/environments/configuration.md +0 -437
- package/.proagents/environments/promotion.md +0 -434
- package/.proagents/environments/setup.md +0 -420
- package/.proagents/examples/README.md +0 -55
- package/.proagents/examples/backend-nodejs/README.md +0 -188
- package/.proagents/examples/backend-nodejs/complete-conversation.md +0 -601
- package/.proagents/examples/backend-nodejs/proagents.config.yaml +0 -415
- package/.proagents/examples/backend-nodejs/workflow-example.md +0 -909
- package/.proagents/examples/fullstack-nextjs/README.md +0 -155
- package/.proagents/examples/fullstack-nextjs/complete-conversation.md +0 -604
- package/.proagents/examples/fullstack-nextjs/proagents.config.yaml +0 -287
- package/.proagents/examples/fullstack-nextjs/workflow-example.md +0 -553
- package/.proagents/examples/mobile-react-native/README.md +0 -171
- package/.proagents/examples/mobile-react-native/complete-conversation.md +0 -825
- package/.proagents/examples/mobile-react-native/proagents.config.yaml +0 -330
- package/.proagents/examples/mobile-react-native/workflow-example.md +0 -723
- package/.proagents/examples/web-frontend-react/README.md +0 -125
- package/.proagents/examples/web-frontend-react/complete-conversation.md +0 -556
- package/.proagents/examples/web-frontend-react/proagents.config.yaml +0 -183
- package/.proagents/examples/web-frontend-react/workflow-example.md +0 -603
- package/.proagents/existing-projects/README.md +0 -65
- package/.proagents/existing-projects/challenges.md +0 -861
- package/.proagents/existing-projects/coexistence-mode.md +0 -483
- package/.proagents/existing-projects/compatibility-assessment.md +0 -541
- package/.proagents/existing-projects/gradual-adoption.md +0 -515
- package/.proagents/existing-projects/migration-strategies.md +0 -788
- package/.proagents/existing-projects/pattern-reconciliation.md +0 -489
- package/.proagents/existing-projects/team-onboarding.md +0 -617
- package/.proagents/existing-projects/technical-debt-handling.md +0 -644
- package/.proagents/feature-flags/README.md +0 -263
- package/.proagents/feature-flags/ab-testing.md +0 -413
- package/.proagents/feature-flags/configuration.md +0 -420
- package/.proagents/feature-flags/kill-switches.md +0 -444
- package/.proagents/feature-flags/rollout-strategies.md +0 -392
- package/.proagents/history.log +0 -12
- package/.proagents/i18n/README.md +0 -133
- package/.proagents/i18n/extraction.md +0 -433
- package/.proagents/i18n/tms-integration.md +0 -332
- package/.proagents/i18n/translation-workflow.md +0 -413
- package/.proagents/i18n/validation.md +0 -355
- package/.proagents/logging/README.md +0 -276
- package/.proagents/logging/aggregation.md +0 -475
- package/.proagents/logging/log-levels.md +0 -376
- package/.proagents/logging/sensitive-data.md +0 -423
- package/.proagents/logging/structured-logging.md +0 -406
- package/.proagents/metrics/README.md +0 -69
- package/.proagents/metrics/code-quality-kpis.md +0 -461
- package/.proagents/metrics/deployment-metrics.md +0 -517
- package/.proagents/metrics/developer-productivity.md +0 -368
- package/.proagents/metrics/learning-effectiveness.md +0 -478
- package/.proagents/migrations/README.md +0 -77
- package/.proagents/migrations/from-claude-projects.md +0 -313
- package/.proagents/migrations/from-cursor-rules.md +0 -345
- package/.proagents/migrations/from-custom-workflows.md +0 -410
- package/.proagents/monitoring/README.md +0 -308
- package/.proagents/monitoring/alerting.md +0 -449
- package/.proagents/monitoring/dashboards.md +0 -454
- package/.proagents/monitoring/health-checks.md +0 -436
- package/.proagents/monitoring/metrics.md +0 -434
- package/.proagents/multi-project/README.md +0 -170
- package/.proagents/multi-project/coordinated-deploy.md +0 -510
- package/.proagents/multi-project/cross-project-deps.md +0 -395
- package/.proagents/multi-project/unified-changelog.md +0 -477
- package/.proagents/multi-project/walkthroughs/monorepo-setup.md +0 -787
- package/.proagents/multi-project/workspace-config.md +0 -408
- package/.proagents/notifications/README.md +0 -151
- package/.proagents/notifications/channels.md +0 -457
- package/.proagents/notifications/preferences.md +0 -415
- package/.proagents/notifications/routing.md +0 -449
- package/.proagents/notifications/scheduling.md +0 -425
- package/.proagents/notifications/templates.md +0 -446
- package/.proagents/offline-mode/README.md +0 -145
- package/.proagents/offline-mode/caching.md +0 -344
- package/.proagents/offline-mode/offline-operations.md +0 -312
- package/.proagents/offline-mode/queue-specifications.md +0 -679
- package/.proagents/offline-mode/sync.md +0 -475
- package/.proagents/parallel-features/README.md +0 -85
- package/.proagents/parallel-features/conflict-detection.md +0 -226
- package/.proagents/parallel-features/dependency-management.md +0 -392
- package/.proagents/parallel-features/merge-coordination.md +0 -506
- package/.proagents/parallel-features/tracking-system.md +0 -416
- package/.proagents/performance/README.md +0 -59
- package/.proagents/performance/bundle-analysis.md +0 -375
- package/.proagents/performance/load-testing.md +0 -563
- package/.proagents/performance/runtime-metrics.md +0 -489
- package/.proagents/performance/web-vitals.md +0 -425
- package/.proagents/plugins/README.md +0 -139
- package/.proagents/plugins/creating-plugins.md +0 -504
- package/.proagents/plugins/plugin-api.md +0 -467
- package/.proagents/plugins/plugin-registry.md +0 -276
- package/.proagents/reporting/README.md +0 -158
- package/.proagents/reporting/dashboards.md +0 -366
- package/.proagents/reporting/exports.md +0 -524
- package/.proagents/reporting/quality-metrics.md +0 -385
- package/.proagents/reporting/templates/README.md +0 -56
- package/.proagents/reporting/templates/dashboard-config.json +0 -187
- package/.proagents/reporting/templates/metrics-queries.md +0 -427
- package/.proagents/reporting/templates/react-dashboard.tsx +0 -544
- package/.proagents/reporting/templates/widgets.md +0 -451
- package/.proagents/reporting/velocity-metrics.md +0 -340
- package/.proagents/reverse-engineering/README.md +0 -151
- package/.proagents/reverse-engineering/architecture-extraction.md +0 -325
- package/.proagents/reverse-engineering/code-analysis.md +0 -377
- package/.proagents/reverse-engineering/dependency-mapping.md +0 -567
- package/.proagents/reverse-engineering/diagram-generation.md +0 -586
- package/.proagents/reverse-engineering/documentation-generation.md +0 -468
- package/.proagents/reverse-engineering/pattern-detection.md +0 -569
- package/.proagents/reverse-engineering/quality-assessment.md +0 -733
- package/.proagents/secrets/README.md +0 -278
- package/.proagents/secrets/access-control.md +0 -443
- package/.proagents/secrets/rotation.md +0 -403
- package/.proagents/secrets/scanning.md +0 -487
- package/.proagents/secrets/storage.md +0 -394
- package/.proagents/webhooks/README.md +0 -126
- package/.proagents/webhooks/endpoints.md +0 -298
- package/.proagents/webhooks/events.md +0 -316
- package/.proagents/webhooks/payloads.md +0 -325
- package/.proagents/webhooks/reliability.md +0 -363
- package/.proagents/webhooks/security.md +0 -380
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
# Secret Storage
|
|
2
|
-
|
|
3
|
-
Secure storage solutions for sensitive data.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Storage Options
|
|
8
|
-
|
|
9
|
-
| Solution | Use Case | Pros | Cons |
|
|
10
|
-
|----------|----------|------|------|
|
|
11
|
-
| **Environment Variables** | Simple deployments | Easy, universal | Limited security |
|
|
12
|
-
| **AWS Secrets Manager** | AWS infrastructure | Integrated, rotation | AWS lock-in |
|
|
13
|
-
| **HashiCorp Vault** | Multi-cloud | Powerful, flexible | Complex setup |
|
|
14
|
-
| **Azure Key Vault** | Azure infrastructure | Integrated | Azure lock-in |
|
|
15
|
-
| **Google Secret Manager** | GCP infrastructure | Integrated | GCP lock-in |
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Environment Variables
|
|
20
|
-
|
|
21
|
-
### Basic Usage
|
|
22
|
-
|
|
23
|
-
```yaml
|
|
24
|
-
# proagents.config.yaml
|
|
25
|
-
secrets:
|
|
26
|
-
storage:
|
|
27
|
-
provider: "env"
|
|
28
|
-
|
|
29
|
-
# Environment variable naming
|
|
30
|
-
naming:
|
|
31
|
-
prefix: ""
|
|
32
|
-
style: "UPPER_SNAKE_CASE"
|
|
33
|
-
|
|
34
|
-
# .env file handling
|
|
35
|
-
dotenv:
|
|
36
|
-
enabled: true
|
|
37
|
-
files:
|
|
38
|
-
- ".env"
|
|
39
|
-
- ".env.${NODE_ENV}"
|
|
40
|
-
- ".env.local"
|
|
41
|
-
|
|
42
|
-
# Required secrets
|
|
43
|
-
required:
|
|
44
|
-
- "DATABASE_URL"
|
|
45
|
-
- "JWT_SECRET"
|
|
46
|
-
- "API_KEY"
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### .env Files
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# .env (base, committed)
|
|
53
|
-
NODE_ENV=development
|
|
54
|
-
LOG_LEVEL=debug
|
|
55
|
-
|
|
56
|
-
# .env.development (environment-specific)
|
|
57
|
-
DATABASE_URL=postgresql://localhost:5432/dev
|
|
58
|
-
|
|
59
|
-
# .env.local (local overrides, gitignored)
|
|
60
|
-
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb
|
|
61
|
-
JWT_SECRET=local-development-secret
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## AWS Secrets Manager
|
|
67
|
-
|
|
68
|
-
### Configuration
|
|
69
|
-
|
|
70
|
-
```yaml
|
|
71
|
-
secrets:
|
|
72
|
-
storage:
|
|
73
|
-
provider: "aws-secrets-manager"
|
|
74
|
-
|
|
75
|
-
aws:
|
|
76
|
-
region: "us-east-1"
|
|
77
|
-
|
|
78
|
-
# Secret naming
|
|
79
|
-
naming:
|
|
80
|
-
prefix: "myapp/"
|
|
81
|
-
separator: "/"
|
|
82
|
-
|
|
83
|
-
# Caching
|
|
84
|
-
cache:
|
|
85
|
-
enabled: true
|
|
86
|
-
ttl: "300s"
|
|
87
|
-
|
|
88
|
-
# Secret mappings
|
|
89
|
-
mappings:
|
|
90
|
-
DATABASE_URL: "myapp/database/url"
|
|
91
|
-
JWT_SECRET: "myapp/auth/jwt-secret"
|
|
92
|
-
STRIPE_KEY: "myapp/payments/stripe-key"
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Usage
|
|
96
|
-
|
|
97
|
-
```typescript
|
|
98
|
-
// secrets/aws.ts
|
|
99
|
-
import {
|
|
100
|
-
SecretsManagerClient,
|
|
101
|
-
GetSecretValueCommand,
|
|
102
|
-
} from '@aws-sdk/client-secrets-manager';
|
|
103
|
-
|
|
104
|
-
const client = new SecretsManagerClient({ region: 'us-east-1' });
|
|
105
|
-
|
|
106
|
-
export async function getSecret(secretName: string): Promise<string> {
|
|
107
|
-
const command = new GetSecretValueCommand({ SecretId: secretName });
|
|
108
|
-
const response = await client.send(command);
|
|
109
|
-
|
|
110
|
-
if (response.SecretString) {
|
|
111
|
-
return response.SecretString;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
throw new Error(`Secret ${secretName} not found`);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// With caching
|
|
118
|
-
const secretCache = new Map<string, { value: string; expires: number }>();
|
|
119
|
-
|
|
120
|
-
export async function getSecretCached(
|
|
121
|
-
secretName: string,
|
|
122
|
-
ttl = 300000
|
|
123
|
-
): Promise<string> {
|
|
124
|
-
const cached = secretCache.get(secretName);
|
|
125
|
-
if (cached && cached.expires > Date.now()) {
|
|
126
|
-
return cached.value;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const value = await getSecret(secretName);
|
|
130
|
-
secretCache.set(secretName, { value, expires: Date.now() + ttl });
|
|
131
|
-
return value;
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## HashiCorp Vault
|
|
138
|
-
|
|
139
|
-
### Configuration
|
|
140
|
-
|
|
141
|
-
```yaml
|
|
142
|
-
secrets:
|
|
143
|
-
storage:
|
|
144
|
-
provider: "vault"
|
|
145
|
-
|
|
146
|
-
vault:
|
|
147
|
-
address: "https://vault.company.com"
|
|
148
|
-
|
|
149
|
-
# Authentication
|
|
150
|
-
auth:
|
|
151
|
-
method: "kubernetes" # or "token", "approle", "aws"
|
|
152
|
-
role: "myapp"
|
|
153
|
-
mount_path: "auth/kubernetes"
|
|
154
|
-
|
|
155
|
-
# Secret engines
|
|
156
|
-
engines:
|
|
157
|
-
kv:
|
|
158
|
-
mount: "secret"
|
|
159
|
-
version: 2
|
|
160
|
-
|
|
161
|
-
database:
|
|
162
|
-
mount: "database"
|
|
163
|
-
role: "myapp-db"
|
|
164
|
-
|
|
165
|
-
# Secret paths
|
|
166
|
-
paths:
|
|
167
|
-
database: "secret/data/myapp/database"
|
|
168
|
-
api_keys: "secret/data/myapp/api-keys"
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Usage
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
// secrets/vault.ts
|
|
175
|
-
import Vault from 'node-vault';
|
|
176
|
-
|
|
177
|
-
const vault = Vault({
|
|
178
|
-
apiVersion: 'v1',
|
|
179
|
-
endpoint: process.env.VAULT_ADDR,
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
// Kubernetes auth
|
|
183
|
-
async function authenticate() {
|
|
184
|
-
const jwt = await fs.readFile(
|
|
185
|
-
'/var/run/secrets/kubernetes.io/serviceaccount/token',
|
|
186
|
-
'utf8'
|
|
187
|
-
);
|
|
188
|
-
|
|
189
|
-
await vault.kubernetesLogin({
|
|
190
|
-
role: 'myapp',
|
|
191
|
-
jwt,
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Get secret
|
|
196
|
-
export async function getSecret(path: string): Promise<Record<string, string>> {
|
|
197
|
-
const response = await vault.read(path);
|
|
198
|
-
return response.data.data;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Dynamic database credentials
|
|
202
|
-
export async function getDatabaseCredentials(): Promise<{
|
|
203
|
-
username: string;
|
|
204
|
-
password: string;
|
|
205
|
-
}> {
|
|
206
|
-
const response = await vault.read('database/creds/myapp-db');
|
|
207
|
-
return {
|
|
208
|
-
username: response.data.username,
|
|
209
|
-
password: response.data.password,
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
## Azure Key Vault
|
|
217
|
-
|
|
218
|
-
### Configuration
|
|
219
|
-
|
|
220
|
-
```yaml
|
|
221
|
-
secrets:
|
|
222
|
-
storage:
|
|
223
|
-
provider: "azure-key-vault"
|
|
224
|
-
|
|
225
|
-
azure:
|
|
226
|
-
vault_url: "https://myapp-vault.vault.azure.net"
|
|
227
|
-
|
|
228
|
-
# Authentication
|
|
229
|
-
auth:
|
|
230
|
-
method: "managed_identity" # or "service_principal"
|
|
231
|
-
|
|
232
|
-
# Secret mappings
|
|
233
|
-
mappings:
|
|
234
|
-
DATABASE_URL: "database-connection-string"
|
|
235
|
-
JWT_SECRET: "jwt-signing-key"
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### Usage
|
|
239
|
-
|
|
240
|
-
```typescript
|
|
241
|
-
// secrets/azure.ts
|
|
242
|
-
import { SecretClient } from '@azure/keyvault-secrets';
|
|
243
|
-
import { DefaultAzureCredential } from '@azure/identity';
|
|
244
|
-
|
|
245
|
-
const credential = new DefaultAzureCredential();
|
|
246
|
-
const client = new SecretClient(
|
|
247
|
-
'https://myapp-vault.vault.azure.net',
|
|
248
|
-
credential
|
|
249
|
-
);
|
|
250
|
-
|
|
251
|
-
export async function getSecret(secretName: string): Promise<string> {
|
|
252
|
-
const secret = await client.getSecret(secretName);
|
|
253
|
-
return secret.value!;
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## Google Secret Manager
|
|
260
|
-
|
|
261
|
-
### Configuration
|
|
262
|
-
|
|
263
|
-
```yaml
|
|
264
|
-
secrets:
|
|
265
|
-
storage:
|
|
266
|
-
provider: "gcp-secret-manager"
|
|
267
|
-
|
|
268
|
-
gcp:
|
|
269
|
-
project_id: "my-project"
|
|
270
|
-
|
|
271
|
-
# Secret paths
|
|
272
|
-
paths:
|
|
273
|
-
database: "projects/my-project/secrets/database-url/versions/latest"
|
|
274
|
-
jwt: "projects/my-project/secrets/jwt-secret/versions/latest"
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Usage
|
|
278
|
-
|
|
279
|
-
```typescript
|
|
280
|
-
// secrets/gcp.ts
|
|
281
|
-
import { SecretManagerServiceClient } from '@google-cloud/secret-manager';
|
|
282
|
-
|
|
283
|
-
const client = new SecretManagerServiceClient();
|
|
284
|
-
|
|
285
|
-
export async function getSecret(secretPath: string): Promise<string> {
|
|
286
|
-
const [version] = await client.accessSecretVersion({
|
|
287
|
-
name: secretPath,
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
return version.payload!.data!.toString();
|
|
291
|
-
}
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
---
|
|
295
|
-
|
|
296
|
-
## Secret Injection
|
|
297
|
-
|
|
298
|
-
### Application Startup
|
|
299
|
-
|
|
300
|
-
```typescript
|
|
301
|
-
// config/secrets.ts
|
|
302
|
-
import { loadSecrets } from '@proagents/secrets';
|
|
303
|
-
|
|
304
|
-
export async function initializeSecrets() {
|
|
305
|
-
const secrets = await loadSecrets({
|
|
306
|
-
provider: process.env.SECRETS_PROVIDER || 'env',
|
|
307
|
-
required: ['DATABASE_URL', 'JWT_SECRET'],
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
// Inject into process.env
|
|
311
|
-
Object.entries(secrets).forEach(([key, value]) => {
|
|
312
|
-
process.env[key] = value;
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
return secrets;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// index.ts
|
|
319
|
-
async function main() {
|
|
320
|
-
await initializeSecrets();
|
|
321
|
-
await startServer();
|
|
322
|
-
}
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
### Kubernetes Integration
|
|
326
|
-
|
|
327
|
-
```yaml
|
|
328
|
-
# kubernetes/deployment.yaml
|
|
329
|
-
apiVersion: v1
|
|
330
|
-
kind: Pod
|
|
331
|
-
spec:
|
|
332
|
-
containers:
|
|
333
|
-
- name: app
|
|
334
|
-
env:
|
|
335
|
-
# From Kubernetes secret
|
|
336
|
-
- name: DATABASE_URL
|
|
337
|
-
valueFrom:
|
|
338
|
-
secretKeyRef:
|
|
339
|
-
name: app-secrets
|
|
340
|
-
key: database-url
|
|
341
|
-
|
|
342
|
-
# From AWS Secrets Manager (with external-secrets)
|
|
343
|
-
- name: API_KEY
|
|
344
|
-
valueFrom:
|
|
345
|
-
secretKeyRef:
|
|
346
|
-
name: external-secrets
|
|
347
|
-
key: api-key
|
|
348
|
-
|
|
349
|
-
# Mount secrets as files
|
|
350
|
-
volumes:
|
|
351
|
-
- name: secrets
|
|
352
|
-
secret:
|
|
353
|
-
secretName: app-secrets
|
|
354
|
-
volumeMounts:
|
|
355
|
-
- name: secrets
|
|
356
|
-
mountPath: /etc/secrets
|
|
357
|
-
readOnly: true
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
---
|
|
361
|
-
|
|
362
|
-
## Commands
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
# List secrets
|
|
366
|
-
proagents secrets list
|
|
367
|
-
|
|
368
|
-
# Get secret value
|
|
369
|
-
proagents secrets get DATABASE_URL
|
|
370
|
-
|
|
371
|
-
# Set secret
|
|
372
|
-
proagents secrets set API_KEY "new-value" --env production
|
|
373
|
-
|
|
374
|
-
# Sync secrets to Kubernetes
|
|
375
|
-
proagents secrets sync --to kubernetes
|
|
376
|
-
|
|
377
|
-
# Validate required secrets
|
|
378
|
-
proagents secrets validate
|
|
379
|
-
|
|
380
|
-
# Export secrets (encrypted)
|
|
381
|
-
proagents secrets export --encrypted > secrets.enc
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## Best Practices
|
|
387
|
-
|
|
388
|
-
1. **Never Commit Secrets**: Use .gitignore and pre-commit hooks
|
|
389
|
-
2. **Least Privilege**: Grant minimal access to secrets
|
|
390
|
-
3. **Encryption at Rest**: Always encrypt stored secrets
|
|
391
|
-
4. **Audit Access**: Log all secret access
|
|
392
|
-
5. **Rotate Regularly**: Implement secret rotation
|
|
393
|
-
6. **Use Namespaces**: Organize secrets by environment/service
|
|
394
|
-
7. **Validate on Startup**: Fail fast if required secrets are missing
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
# Webhooks
|
|
2
|
-
|
|
3
|
-
Event-driven integrations for ProAgents workflow events.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
11
|
-
│ Webhook Architecture │
|
|
12
|
-
├─────────────────────────────────────────────────────────────┤
|
|
13
|
-
│ │
|
|
14
|
-
│ ProAgents Events │
|
|
15
|
-
│ ┌─────────────────┐ │
|
|
16
|
-
│ │ feature.started │──┐ │
|
|
17
|
-
│ │ phase.completed │──┤ │
|
|
18
|
-
│ │ test.failed │──┼───► Webhook Dispatcher │
|
|
19
|
-
│ │ deploy.success │──┤ │ │
|
|
20
|
-
│ │ pr.created │──┘ │ │
|
|
21
|
-
│ └─────────────────┘ ▼ │
|
|
22
|
-
│ ┌──────────────┐ │
|
|
23
|
-
│ │ Endpoint │ │
|
|
24
|
-
│ │ Registry │ │
|
|
25
|
-
│ └──────┬───────┘ │
|
|
26
|
-
│ │ │
|
|
27
|
-
│ ┌───────────┼───────────┐ │
|
|
28
|
-
│ ▼ ▼ ▼ │
|
|
29
|
-
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
30
|
-
│ │ Slack │ │ Discord │ │ Custom │ │
|
|
31
|
-
│ │ Webhook │ │ Webhook │ │ API │ │
|
|
32
|
-
│ └─────────┘ └─────────┘ └─────────┘ │
|
|
33
|
-
│ │
|
|
34
|
-
└─────────────────────────────────────────────────────────────┘
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Quick Start
|
|
40
|
-
|
|
41
|
-
### 1. Configure Webhook
|
|
42
|
-
|
|
43
|
-
```yaml
|
|
44
|
-
# proagents.config.yaml
|
|
45
|
-
webhooks:
|
|
46
|
-
enabled: true
|
|
47
|
-
|
|
48
|
-
endpoints:
|
|
49
|
-
- name: "slack-notifications"
|
|
50
|
-
url: "https://hooks.slack.com/services/xxx"
|
|
51
|
-
events: ["feature.*", "deploy.*"]
|
|
52
|
-
|
|
53
|
-
- name: "custom-api"
|
|
54
|
-
url: "https://api.company.com/webhooks/proagents"
|
|
55
|
-
events: ["*"]
|
|
56
|
-
auth:
|
|
57
|
-
type: "bearer"
|
|
58
|
-
token_env: "WEBHOOK_TOKEN"
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 2. Test Webhook
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# Send test event
|
|
65
|
-
proagents webhooks test slack-notifications
|
|
66
|
-
|
|
67
|
-
# Verify delivery
|
|
68
|
-
proagents webhooks history --endpoint slack-notifications
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Available Events
|
|
74
|
-
|
|
75
|
-
| Category | Events |
|
|
76
|
-
|----------|--------|
|
|
77
|
-
| **Feature** | `feature.started`, `feature.paused`, `feature.resumed`, `feature.completed` |
|
|
78
|
-
| **Phase** | `phase.started`, `phase.completed`, `phase.skipped` |
|
|
79
|
-
| **Analysis** | `analysis.started`, `analysis.completed`, `analysis.cached` |
|
|
80
|
-
| **Testing** | `test.started`, `test.passed`, `test.failed`, `coverage.changed` |
|
|
81
|
-
| **Review** | `review.requested`, `review.approved`, `review.rejected` |
|
|
82
|
-
| **Deploy** | `deploy.started`, `deploy.success`, `deploy.failed`, `rollback.triggered` |
|
|
83
|
-
| **Git** | `branch.created`, `commit.pushed`, `pr.created`, `pr.merged` |
|
|
84
|
-
| **Security** | `security.scan.completed`, `vulnerability.found`, `vulnerability.fixed` |
|
|
85
|
-
| **Approval** | `approval.requested`, `approval.granted`, `approval.denied` |
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Documentation
|
|
90
|
-
|
|
91
|
-
- [Endpoint Configuration](./endpoints.md) - Configure webhook endpoints
|
|
92
|
-
- [Event Reference](./events.md) - Complete event documentation
|
|
93
|
-
- [Payload Format](./payloads.md) - Request/response formats
|
|
94
|
-
- [Security](./security.md) - Authentication and verification
|
|
95
|
-
- [Retry & Reliability](./reliability.md) - Delivery guarantees
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Commands
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
# List configured webhooks
|
|
103
|
-
proagents webhooks list
|
|
104
|
-
|
|
105
|
-
# Test webhook delivery
|
|
106
|
-
proagents webhooks test <endpoint-name>
|
|
107
|
-
|
|
108
|
-
# View delivery history
|
|
109
|
-
proagents webhooks history
|
|
110
|
-
|
|
111
|
-
# Replay failed deliveries
|
|
112
|
-
proagents webhooks replay --failed
|
|
113
|
-
|
|
114
|
-
# Disable webhook temporarily
|
|
115
|
-
proagents webhooks disable <endpoint-name>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Best Practices
|
|
121
|
-
|
|
122
|
-
1. **Use Event Filtering**: Subscribe only to needed events
|
|
123
|
-
2. **Implement Idempotency**: Handle duplicate deliveries
|
|
124
|
-
3. **Verify Signatures**: Always validate webhook signatures
|
|
125
|
-
4. **Handle Failures**: Implement proper error handling
|
|
126
|
-
5. **Monitor Deliveries**: Track webhook health and latency
|