Repository navigation
Tags
Tags
fix(ci): reuse release quality gate (ChatbotXIO#1584) * fix(ci): reuse release quality gate * fix(ci): stabilize release quality gate * fix(ci): let the turbo cache server pick a free port rharkor/caching-for-turbo binds a fixed port (41230) by default and the Tests (2/8) shard on PR ChatbotXIO#1584 died before running a single test with EADDRINUSE on that port. server-port: 0 makes the action bind an ephemeral port and export TURBO_API from the one it actually got.
perf(worker): consolidate worker processes (ChatbotXIO#1566) * perf(worker): consolidate worker processes * fix(worker): bound consolidated worker memory growth * fix(worker): make heap cap and shutdown timeout opt-in outside consolidated modes Drop the implicit 256MB heap cap for legacy all-mode and make WORKER_SHUTDOWN_TIMEOUT_MS optional, defaulting it in the entrypoint only for standalone/core. Raise SHARD_POOL_MAX alongside DATABASE_POOL_MAX, and install source-mapped stacks explicitly from the worker so the logger no longer pulls node:module into every consumer. * fix(worker): drop source-mapped stack install and update logger mocks Worker tests mock the logger with fatal and stub the business realtime flush so the affected suites pass. * refactor(worker): share queue worker setup and queue events across consumers Add createQueueWorker so every consumer handles the Worker `error` event (an unhandled one restarts all queues in a consolidated process), logs failures and drains on shutdown. Share one QueueEvents per queue instead of per-queue singletons, and document the shutdown grace period and job lock. * fix(worker): harden queue worker lifecycle and remove source-mapped stack logging createQueueWorker now refuses to start once shutdown has begun, and catches rejections from async onFailed handlers (BullMQ never awaits listeners, so they would surface as unhandledRejection and drain every queue in a consolidated process). Also drops the source-mapped stack mapper from the logger, removes the getHeavyQueueEvents wrapper in favour of getQueueEvents, dedupes the consolidated-mode env defaults in the docker entrypoint, and downgrades the per-job trigger completion log to debug. * fix(worker): size job locks to job budgets and bound fatal shutdown Lock durations now cover the full heavy/integration job budgets so slow provider calls are not redelivered mid-run. Fatal-error shutdown is bounded at 30s and sets exitCode, the sequence consumer skips startup after shutdown began, and consolidated DB pool defaults are raised to 80. * fix(worker): close startup/shutdown races and isolate schedule registration failure A shutdown that begins while a worker is still starting could leak the workers, event listeners or scheduler ticks started afterwards. runWorker now skips or tolerates starts that race shutdown, and the events and sequence scheduler entries re-check the shutdown flag after their async startup. A schedule registration failure no longer takes down the shared process. Docs and the pool-ceiling test follow the env-driven pool and heap defaults. * fix(worker): isolate marketing message worker process
feat(ecommerce): add orders, web shop, discount codes, sales analytic… …s and store automation (ChatbotXIO#1549) * feat(ecommerce): add orders, web shop, discount codes, sales analytics and store automation - Orders, vendors, open hours and store settings (COD, per-workspace order numbers, stock locking, status transitions) with public API. - Customer web shop at /shop (signed shop token, cart, checkout, ratings) and order notifications for customers and members. - Discount codes (percentage, fixed amount, free shipping; limits, once per customer, contact-filter eligibility, auto-apply). - Sales analytics, Messenger product collection flow step, product search by message, store trigger/webhook events, abandoned-cart reminder cron and purchase contact filters. - One migration (20261021152239_ecommerce) for all ecommerce tables. * feat(ecommerce): pin shop link bar, add order confirmation mode and per-line stock taken - Shop link (Public URL + preview) pinned to the bottom of every Ecommerce page; product edit page pins its own product link beside Save. - webshop.getLink accepts productId; Select inputs show option labels. - Order confirmation mode (default / flow / none) in store settings. - OrderItem.stockTaken so a cancel or delete returns exactly what was taken. - Web shop polish: loading skeletons, image carousel, related products, coupon ticket, checkout and bottom bars, shop locale. - All ecommerce tables in one migration, 20261023162208_ecommerce, last in the chain after main's latest migrations. * fix(ecommerce): drop non-web product links and images from collection cards Meta refuses a whole carousel over one bad URL, so a product link or image that is not an http(s) URL is left off the card: Buy falls back to the product's shop page and the card goes without its image. toSafeWebUrl moves to @chatbotx.io/utils so the web shop and the cards share one check. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Deathgiver <anonymous@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ci(tests): run affected suites on pull requests (ChatbotXIO#1522)
feat(ads): keep Conversions API settings on reconnect and fix the Ins… …tagram account lookup (ChatbotXIO#1506)
feat(reflinks): read and update the chat widget through the public api ( ChatbotXIO#1454) Add GET and PUT /v1/ref-links/{id}/chat-widget so workspace tokens (and the CLI/MCP) can manage a ref link's chat widget settings and fetch its script URL and ready-to-paste embed code. The embed code builder moves to a shared lib so the dashboard dialog and the API hand out the same snippet. Co-authored-by: Deathgiver <anonymous@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
feat(comment-automation): process missed comments from the last 7 days ( ChatbotXIO#1368) * feat(comment-automation): process missed comments from the last 7 days Adds a "Process missed comments" row action to the Facebook, Instagram, TikTok and Threads comment tables, shown only for an automation that targets exactly one specific post. It replays the post's comments from the last 7 days through that automation only, skipping comments the automation already has an event or miss row for. - New comment-list APIs per channel (messenger, instagram, instagram-facebook, threads); TikTok reuses listTiktokComments. - Builder scanners shape each comment exactly like its channel webhook. - Replays run on the low queue, paced one comment per second per channel account via a Redis timeline (reserveTimeWindow), and run the automation inline with onlyAutomationId. - Every send a replay makes carries a low BullMQ priority so it yields to live traffic on the chat, integration and aiAgent queues. - Refuses inactive automations, runs outside the automation schedule or workspace active hours, and concurrent runs of the same automation. - Counts pending replays per automation so the tables show a "processing" label (polled) and disable the action until the last replay finishes. * perf(worker): let live sends run ahead of broadcasts on shared queues Broadcast sends and comment replies shared the chat queue FIFO with no priority, so a large broadcast held comment replies behind it. Broadcast jobs (first send and every later flow step) now carry BROADCAST_SEND_PRIORITY, and the chat worker concurrency is tunable via CHAT_WORKER_CONCURRENCY (default unchanged at 5). --------- Co-authored-by: Deathgiver <anonymous@users.noreply.github.com>
fix(worker): ignore accents in comment and story automation keywords (C… …hatbotXIO#1327) Keyword matching lowercased the text and every keyword but never folded diacritics, so a keyword only matched when both sides used identical accents: "café" never matched "cafe" or "CAFÉ", and "giá" never matched "gia". The same comparison lived in three places: matchKeywords (include and exclude keywords), the hide-comments keyword check, and the story reply include keywords. Add normalizeForMatch to automation-matching.ts and use it in all three. It folds text the way normalizeContactHeader (packages/imports) already does: NFD, drop the Combining Diacritical Marks block (U+0300-U+036F), map đ to d, then lowercase. The block is kept narrow on purpose: \p{Diacritic} would also strip ASCII ^ and ` and kana marks, so a "^^" keyword would normalize to "" and match every comment. docs/comment-automation.md now describes the keyword checks as case- and accent-insensitive. Trade-off, disclosed in the linked issue: this also folds ñ into n (año/ano) and Vietnamese tone marks into the bare vowel (má/ma), the usual behavior of accent-insensitive matching.
ci: notify chatbotx-agent's upstream-drift check on publish (ChatbotX… …IO#1273) Follow-up to ChatbotXIO/chatbotx-agent#6. Adds an optional step to the end of publish-cli.yml and publish-chatbotx-mcp.yml that fires a repository_dispatch (event_type: upstream-published) at ChatbotXIO/chatbotx-agent right after a successful, non-dry-run npm publish, so that repo's upstream-drift-check workflow can run immediately instead of waiting for its next scheduled run. Gated on a CHATBOTX_AGENT_DISPATCH_TOKEN secret (a fine-grained PAT scoped to only that repo, Contents: write) that does not exist yet — the step no-ops with a step-summary note and continue-on-error when it's unset, so publishing is never blocked by this. Setup instructions are inline as comments in both workflow files. Also points the cli-mcp-docs skill at this new safety net alongside the existing manual-sync instructions. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
PreviousNext