- Refactor monolithic index.js (2646 lines) into src/{webex,integrations,
cards,flows,commands,services} modules; replace node-fetch/form-data
with native fetch/FormData; move all secrets to .env via dotenv
- Add dockerized remote SIW agent (docker/remote-agent/) with cross-arch
buildx packaging (arm64 Mac -> linux/amd64), idempotent install.sh
deploy bundle, and docker-free ZIP inspector for arch verification
- Bot hosts a WebSocket server; agent proxies SIW requests with a
per-request insecure:true flag, replacing the process-wide
NODE_TLS_REJECT_UNAUTHORIZED bypass
- Add ESLint flat config + Prettier, rewrite Dockerfile as non-root
multi-stage node:22-alpine build, README covering setup / deploy /
remote agent workflow
- Fix parseStoreArg to read trigger.prompt correctly (was indexing past
the framework's post-match slice); register /help as regex (string
matcher only compares the first token); switch catch-all to /.+/
(previous /.*/gim was stateful due to the g flag); remove
/fixDisplayNames command and its flow/card
Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
2 KiB
Text
50 lines
2 KiB
Text
# Copy this file to .env and fill in real values.
|
|
# .env is git-ignored. NEVER commit real secrets.
|
|
|
|
# --- Webex bot (webex-node-bot-framework) ---
|
|
WEBEX_BOT_TOKEN=your-webex-bot-token
|
|
WEBEX_BOT_NAME=AEO Call Provisioning
|
|
WEBEX_BOT_USERNAME=aeoCallProvisioning@webex.bot
|
|
WEBEX_BOT_ID=your-webex-bot-id
|
|
|
|
# --- Webex service account (integration used for admin API calls) ---
|
|
WEBEX_SVC_CLIENT_ID=your-webex-integration-client-id
|
|
WEBEX_SVC_CLIENT_SECRET=your-webex-integration-client-secret
|
|
|
|
# Path to the JSON file that persists the service-account access/refresh tokens.
|
|
# Created and rewritten automatically by the token-refresh cron.
|
|
WEBEX_TOKEN_STORE=./config/wbxTokens.json
|
|
|
|
# --- Twilio (phone number validation) ---
|
|
TWILIO_ACCOUNT_SID=your-twilio-account-sid
|
|
TWILIO_AUTH_TOKEN=your-twilio-auth-token
|
|
|
|
# --- Store Info Web (SIW) ---
|
|
# SIW requests are proxied through the on-prem remote agent (see WS_* below),
|
|
# so the base URL and credentials are forwarded to the agent per-request. This
|
|
# bot never talks to SIW directly.
|
|
SIW_BASE_URL=https://storeinfoweb-prod.ae.com
|
|
SIW_USERNAME=your-siw-user
|
|
SIW_PASSWORD=your-siw-password
|
|
|
|
# --- Remote agent WebSocket bridge ---
|
|
# This bot listens on WS_PORT; the on-prem agent (a second instance of the
|
|
# netanalyzer remoteAgent.js) dials in with WS_URL=wss://.../ and this token
|
|
# as its Bearer credential. Rotate WS_TOKEN with any high-entropy string.
|
|
WS_PORT=8080
|
|
WS_TOKEN=change-me-to-a-long-random-string
|
|
|
|
# --- Google ---
|
|
# Simple REST API key used by Address Validation + Time Zone endpoints.
|
|
GOOGLE_API_KEY=your-google-api-key
|
|
|
|
# Optional. Path to a Google service-account JSON key file (the one shaped
|
|
# like { type: "service_account", private_key: "-----BEGIN...", ... }).
|
|
# Not required for the REST calls above, but standard for any future code
|
|
# that uses google-auth-library / googleapis. Keep the file itself outside
|
|
# of git (config/google-service-account.json is already ignored).
|
|
GOOGLE_APPLICATION_CREDENTIALS=./config/google-service-account.json
|
|
|
|
# --- Runtime ---
|
|
NODE_ENV=production
|
|
LOG_LEVEL=info
|