- 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>
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
# Build-time compose file for the wbxStoreProvision remote agent.
|
|
# This one BUILDS from source; the runtime-only version used inside the
|
|
# deploy ZIP lives at deploy/docker-compose.yml.
|
|
#
|
|
# docker compose -f docker/remote-agent/docker-compose.yml up -d --build
|
|
#
|
|
# Environment values come from docker/remote-agent/.env (copy the .env.example
|
|
# next to it). Set WS_URL to the main wbxStoreProvision bot's public
|
|
# websocket endpoint, and WS_TOKEN to the shared secret configured on the
|
|
# bot side.
|
|
|
|
services:
|
|
remote-agent:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: wbxprov-remote-agent:latest
|
|
container_name: wbxprov-remote-agent
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
# The agent is a websocket CLIENT — nothing to publish. It just
|
|
# needs outbound network access to:
|
|
# - the main wbxStoreProvision bot (WS_URL)
|
|
# - Store Info Web (whatever internal SIW endpoint it proxies)
|
|
#
|
|
# If those live on the host's Docker network, uncomment
|
|
# `network_mode: host` (Linux only) or attach to a shared
|
|
# user-defined network.
|
|
#
|
|
# network_mode: host
|
|
|
|
stop_signal: SIGTERM
|
|
stop_grace_period: 10s
|
|
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: '10m'
|
|
max-file: '3'
|