Add Node.js 22 Lambda function for PPAL Discord Bot: - Discord Interactions API with Ed25519 signature verification - Slash commands: /ppal status/help, /miyabi issue/status, /help - DynamoDB integration for user state management - Secrets Manager integration for token retrieval - GitHub API integration for issue creation Files: - package.json: Dependencies (aws-sdk v3, discord-api-types, tweetnacl) - tsconfig.json: TypeScript strict mode, ES2022 target - Dockerfile: Multi-stage Node.js 22 Alpine build - src/index.ts: Lambda handler with signature verification - src/discord/verify.ts: Ed25519 signature validation - src/discord/commands.ts: Command handlers for /ppal, /miyabi, /help - src/services/secrets.ts: AWS Secrets Manager client - src/services/dynamodb.ts: DynamoDB DocumentClient operations Commands: - /ppal status: System status with user info - /ppal help: PPAL commands help - /miyabi issue <title>: Create GitHub issue - /miyabi status: Miyabi agent society status - /help: Full command list Co-Authored-By: Claude <noreply@anthropic.com>
24 lines
570 B
JSON
24 lines
570 B
JSON
{
|
|
"name": "ppal-discord-handler",
|
|
"version": "1.0.0",
|
|
"description": "PPAL Discord Bot Lambda Handler",
|
|
"main": "dist/index.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"watch": "tsc --watch",
|
|
"type-check": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@aws-sdk/client-dynamodb": "^3.709.0",
|
|
"@aws-sdk/client-secrets-manager": "^3.709.0",
|
|
"@aws-sdk/lib-dynamodb": "^3.709.0",
|
|
"tweetnacl": "^1.0.3"
|
|
},
|
|
"devDependencies": {
|
|
"@types/aws-lambda": "^8.10.145",
|
|
"@types/node": "^22.10.5",
|
|
"typescript": "^5.7.3"
|
|
}
|
|
}
|