-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclawless.config.js
More file actions
62 lines (56 loc) · 1.45 KB
/
Copy pathclawless.config.js
File metadata and controls
62 lines (56 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/** @type {import('clawless').Config} */
export default {
name: 'pr-review-agent',
entry: './index.js',
// Serverless runtime settings
runtime: {
timeout: 120, // seconds — PR reviews can take time
memory: 512, // MB
region: 'us-east-1',
},
// Webhook triggers — fires the agent on GitHub PR events
triggers: [
{
type: 'webhook',
provider: 'github',
events: ['pull_request.opened', 'pull_request.synchronize', 'pull_request.reopened'],
// Map GitHub webhook payload to agent env vars
env: {
PR_NUMBER: '{{ event.pull_request.number }}',
GITHUB_REPO: '{{ event.repository.full_name }}',
COMMIT_SHA: '{{ event.pull_request.head.sha }}',
},
},
],
// Secrets — loaded from your Clawless project secrets store
secrets: [
'GITHUB_TOKEN',
'ANTHROPIC_API_KEY',
],
// Persist the audit log across invocations via a mounted volume
volumes: [
{
name: 'audit-trail',
mountPath: '.gitagent',
persistent: true,
},
],
// Build step — nothing to compile for pure ESM, but ensures deps are installed
build: {
command: 'npm install --production',
includeFiles: [
'agent.yaml',
'SOUL.md',
'RULES.md',
'skills/**',
'tools/**',
'index.js',
'package.json',
],
},
// Observability
logs: {
level: 'info',
structured: true, // JSON logs for easy parsing
},
};