New modules: - server/mailer.mjs: nodemailer transport wrapper - server/mail_perms.mjs: runtime permission store, persisted to disk New actions: - send-email: checks (caller, to, topic) permission before sending - set-mail-permission: grant/revoke permissions, gated by canApprove - get-mail-permissions: list current permissions Handler signature extended to handler(params, ctx) where ctx carries caller, users, mail_perm_store and mailer_send. Existing handlers ignore ctx so the change is backwards-compatible. SMTP config lives in secrets.json under optional 'smtp' key. Mail permissions path via --mail-perms or CONDUIT_MAIL_PERMS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
332 B
JSON
14 lines
332 B
JSON
{
|
|
"smtp": {
|
|
"host": "smtp.example.com",
|
|
"port": 587,
|
|
"secure": false,
|
|
"auth": { "user": "relay@example.com", "pass": "<password>" },
|
|
"from": "agent@example.com"
|
|
},
|
|
"users": {
|
|
"<username>": { "secret": "<hex secret>", "canApprove": [] },
|
|
"<username>": { "secret": "<hex secret>", "canApprove": ["<username>"] }
|
|
}
|
|
}
|