├── .husky ├── pre-commit └── pre-merge-commit ├── bots ├── hello-world │ ├── .gitignore │ ├── tsconfig.json │ └── eslint.config.mjs ├── knowledgiani │ ├── readme.md │ ├── tsconfig.json │ └── eslint.config.mjs ├── sheetzy │ ├── src │ │ ├── types.ts │ │ └── bot.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── echo │ ├── src │ │ └── bot.ts │ ├── tsconfig.json │ ├── bot.definition.ts │ └── eslint.config.mjs ├── bugbuster │ ├── src │ │ ├── utils │ │ │ ├── linear-utils │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── promise-utils.ts │ │ │ └── string-utils.ts │ │ ├── services │ │ │ └── issue-processor │ │ │ │ └── issue-title-format-validator.ts │ │ └── handlers │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── drop-weaver │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── clog │ ├── tsconfig.json │ └── eslint.config.mjs ├── sinlin │ ├── tsconfig.json │ └── eslint.config.mjs ├── doppel-doer │ ├── tsconfig.json │ └── eslint.config.mjs ├── hit-looper │ ├── tsconfig.json │ └── eslint.config.mjs ├── notionaut │ ├── tsconfig.json │ └── eslint.config.mjs └── synchrotron │ ├── tsconfig.json │ └── eslint.config.mjs ├── integrations ├── asana │ ├── .gitignore │ ├── src │ │ ├── const.ts │ │ ├── setup │ │ │ ├── index.ts │ │ │ └── handler.ts │ │ ├── utils │ │ │ └── index.ts │ │ └── actions │ │ │ └── index.ts │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── gmail │ ├── .gitignore │ ├── src │ │ ├── channels │ │ │ └── index.ts │ │ ├── webhook-events │ │ │ └── index.ts │ │ ├── utils │ │ │ ├── datetime-utils.ts │ │ │ └── string-utils.ts │ │ └── google-api │ │ │ └── index.ts │ ├── extract.vrl │ ├── .sentryclirc │ ├── definitions │ │ ├── events.ts │ │ ├── actions │ │ │ └── types.ts │ │ ├── index.ts │ │ └── user-tags.ts │ └── eslint.config.mjs ├── notion │ ├── .gitignore │ ├── extract.vrl │ ├── src │ │ ├── webhook-events │ │ │ ├── index.ts │ │ │ └── handlers │ │ │ │ └── index.ts │ │ ├── notion-api │ │ │ ├── db-structure │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── files-readonly │ │ │ └── index.ts │ │ └── actions │ │ │ ├── delete-block.ts │ │ │ └── get-db.ts │ ├── .sentryclirc │ ├── definitions │ │ ├── index.ts │ │ └── user-tags.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── slack │ ├── .gitignore │ ├── definitions │ │ ├── channels │ │ │ └── index.ts │ │ └── index.ts │ ├── src │ │ ├── webhook-events │ │ │ └── index.ts │ │ └── slack-api │ │ │ └── index.ts │ ├── extract.vrl │ ├── fallbackHandler.vrl │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── sunco │ ├── .gitignore │ ├── src │ │ ├── setup │ │ │ ├── index.ts │ │ │ └── unregister.ts │ │ └── events │ │ │ └── index.ts │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── teams │ ├── .gitignore │ ├── src │ │ ├── channels │ │ │ └── constants.ts │ │ ├── types.ts │ │ └── markdown │ │ │ └── turndown-rules │ │ │ ├── common.ts │ │ │ └── custom │ │ │ └── underline.ts │ ├── .sentryclirc │ ├── definitions │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── viber │ ├── .gitignore │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── workable │ ├── hub.md │ ├── src │ │ └── mapping │ │ │ └── pagination.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── freshchat │ ├── .gitignore │ ├── src │ │ ├── const.ts │ │ ├── definitions │ │ │ └── channels.ts │ │ └── actions │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── github │ ├── .gitignore │ ├── src │ │ ├── actions │ │ │ └── index.ts │ │ ├── const.ts │ │ └── definitions │ │ │ └── zui.ts │ ├── .sentryclirc │ ├── tsconfig.json │ ├── linkTemplate.vrl │ └── eslint.config.mjs ├── intercom │ ├── .gitignore │ ├── extract.vrl │ ├── .sentryclirc │ ├── tsconfig.json │ ├── src │ │ └── actions │ │ │ └── index.ts │ ├── eslint.config.mjs │ └── linkTemplate.vrl ├── linear │ ├── .gitignore │ ├── extract.vrl │ ├── .sentryclirc │ ├── tsconfig.json │ ├── src │ │ └── setup.ts │ └── eslint.config.mjs ├── messenger │ ├── .gitignore │ ├── src │ │ ├── webhook │ │ │ ├── index.ts │ │ │ └── handlers │ │ │ │ └── index.ts │ │ └── channels │ │ │ └── index.ts │ ├── extract.vrl │ ├── .sentryclirc │ ├── linkTemplate.vrl │ ├── sandboxShareableIdExtract.vrl │ ├── sandboxLinkTemplate.vrl │ ├── tsconfig.json │ └── eslint.config.mjs ├── telegram │ ├── .gitignore │ ├── .sentryclirc │ ├── tests │ │ └── types.ts │ ├── src │ │ └── misc │ │ │ └── string-utils.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── twilio │ ├── .gitignore │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── vonage │ ├── .gitignore │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── zendesk │ ├── .gitignore │ ├── .sentryclirc │ ├── linkTemplate.vrl │ ├── src │ │ └── definitions │ │ │ └── channels.ts │ ├── icon.svg │ ├── eslint.config.mjs │ └── tsconfig.json ├── chat │ ├── .gitignore │ ├── src │ │ ├── signal-emitter │ │ │ └── index.ts │ │ └── id-store │ │ │ ├── index.ts │ │ │ └── errors.ts │ ├── hub.md │ ├── tsconfig.json │ └── eslint.config.mjs ├── todoist │ ├── extract.vrl │ ├── .gitignore │ ├── src │ │ ├── webhook-events │ │ │ └── index.ts │ │ ├── todoist-api │ │ │ ├── mapping │ │ │ │ ├── index.ts │ │ │ │ └── common │ │ │ │ │ └── math-utils.ts │ │ │ └── index.ts │ │ ├── actions │ │ │ └── implementations │ │ │ │ └── get-all-projects.ts │ │ └── channels │ │ │ └── index.ts │ ├── .sentryclirc │ ├── definitions │ │ ├── index.ts │ │ └── user-tags.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── zendesk-messaging-hitl │ ├── .gitignore │ ├── src │ │ ├── events │ │ │ └── index.ts │ │ ├── actions │ │ │ └── index.ts │ │ └── setup │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── instagram │ ├── src │ │ ├── webhook │ │ │ └── index.ts │ │ ├── channels │ │ │ └── index.ts │ │ └── actions │ │ │ └── index.ts │ ├── extract.vrl │ ├── .sentryclirc │ ├── sandboxLinkTemplate.vrl │ ├── tsconfig.json │ ├── sandboxShareableIdExtract.vrl │ └── eslint.config.mjs ├── confluence │ ├── definitions │ │ └── index.ts │ ├── tsconfig.json │ ├── eslint.config.mjs │ └── src │ │ └── channels │ │ └── index.ts ├── feature-base │ ├── definitions │ │ ├── events │ │ │ └── index.ts │ │ └── actions │ │ │ └── index.ts │ ├── src │ │ └── feature-base-api │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── hubspot │ ├── src │ │ ├── webhook │ │ │ ├── index.ts │ │ │ └── handlers │ │ │ │ └── index.ts │ │ ├── hubspot-api │ │ │ └── index.ts │ │ └── index.ts │ ├── extract.vrl │ ├── definitions │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── mintlify │ ├── definitions │ │ ├── index.ts │ │ └── actions │ │ │ └── index.ts │ ├── src │ │ ├── actions │ │ │ └── index.ts │ │ └── index.ts │ └── tsconfig.json ├── whatsapp │ ├── src │ │ ├── webhook │ │ │ └── index.ts │ │ ├── channels │ │ │ └── index.ts │ │ └── misc │ │ │ └── constants.ts │ ├── sandboxShareableIdExtract.vrl │ ├── .sentryclirc │ ├── extract.vrl │ ├── linkTemplate.vrl │ ├── sandboxLinkTemplate.vrl │ ├── eslint.config.mjs │ └── tsconfig.json ├── gsheets │ ├── src │ │ ├── channels │ │ │ ├── index.ts │ │ │ └── publisher-dispatcher.ts │ │ ├── webhook-events │ │ │ └── index.ts │ │ ├── google-api │ │ │ └── index.ts │ │ └── actions │ │ │ └── implementations │ │ │ ├── add-sheet.ts │ │ │ └── append-values-utils.ts │ ├── definitions │ │ ├── user-tags.ts │ │ ├── channels.ts │ │ └── index.ts │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── dropbox │ ├── src │ │ ├── webhook-events │ │ │ └── index.ts │ │ ├── dropbox-api │ │ │ ├── mapping │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ └── action-wrapper.ts │ ├── .sentryclirc │ ├── definitions │ │ ├── index.ts │ │ └── secrets.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── googlecalendar │ ├── src │ │ ├── webhook-events │ │ │ └── index.ts │ │ ├── google-api │ │ │ ├── index.ts │ │ │ └── mapping │ │ │ │ └── index.ts │ │ └── actions │ │ │ └── implementations │ │ │ ├── create-event.ts │ │ │ ├── update-event.ts │ │ │ └── delete-event.ts │ ├── definitions │ │ ├── events.ts │ │ └── index.ts │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── trello │ ├── src │ │ ├── webhook-events │ │ │ └── index.ts │ │ ├── string-utils.ts │ │ ├── actions │ │ │ └── implementations │ │ │ │ ├── interfaces │ │ │ │ └── boardList.ts │ │ │ │ ├── getAllBoards.ts │ │ │ │ ├── getCardById.ts │ │ │ │ ├── getBoardById.ts │ │ │ │ ├── getListById.ts │ │ │ │ ├── getAllCardMembers.ts │ │ │ │ └── getCardsInList.ts │ │ └── trello-api │ │ │ └── error-handling │ │ │ └── error-handler-decorator.ts │ ├── .sentryclirc │ ├── definitions │ │ ├── schemas │ │ │ └── index.ts │ │ ├── configuration.ts │ │ ├── index.ts │ │ └── user.ts │ └── eslint.config.mjs ├── docusign │ ├── src │ │ ├── config.ts │ │ ├── actions │ │ │ └── index.ts │ │ ├── docusign-api │ │ │ └── types.ts │ │ ├── types.ts │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── attio │ ├── src │ │ ├── setup │ │ │ └── index.ts │ │ └── index.ts │ ├── definitions │ │ ├── index.ts │ │ └── common.ts │ └── tsconfig.json ├── googledrive │ ├── src │ │ └── setup.ts │ ├── .sentryclirc │ ├── linkTemplate.vrl │ ├── eslint.config.mjs │ └── tsconfig.json ├── resend │ ├── src │ │ ├── misc │ │ │ ├── types.ts │ │ │ ├── ResendError.ts │ │ │ └── markdown-utils.ts │ │ └── actions │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── sendgrid │ ├── src │ │ ├── actions │ │ │ └── index.ts │ │ ├── webhook-events │ │ │ └── schemas │ │ │ │ └── ignored.ts │ │ └── misc │ │ │ └── markdown-utils.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── calendly │ ├── src │ │ ├── actions │ │ │ └── index.ts │ │ ├── index.ts │ │ └── types.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── bamboohr │ ├── src │ │ └── types.ts │ ├── linkTemplate.vrl │ └── definitions │ │ └── index.ts ├── stripe │ ├── src │ │ ├── setup │ │ │ └── index.ts │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── zoho │ ├── src │ │ ├── setup │ │ │ ├── index.ts │ │ │ ├── handler.ts │ │ │ └── unregister.ts │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── line │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── webhook │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── zapier │ ├── .sentryclirc │ ├── tsconfig.json │ └── eslint.config.mjs ├── dalle │ ├── src │ │ └── types.ts │ ├── tsconfig.json │ ├── eslint.config.mjs │ └── hub.md ├── calcom │ ├── hub.md │ ├── tsconfig.json │ └── eslint.config.mjs ├── bigcommerce-sync │ ├── src │ │ └── actions │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── airtable │ ├── tsconfig.json │ └── eslint.config.mjs ├── browser │ ├── tsconfig.json │ ├── eslint.config.mjs │ └── icon.svg ├── cerebras │ ├── tsconfig.json │ ├── eslint.config.mjs │ └── hub.md ├── charts │ ├── tsconfig.json │ ├── icon.svg │ ├── eslint.config.mjs │ └── src │ │ └── index.ts ├── groq │ ├── tsconfig.json │ └── eslint.config.mjs ├── hunter │ └── tsconfig.json ├── make │ ├── tsconfig.json │ ├── hub.md │ └── eslint.config.mjs ├── monday │ ├── tsconfig.json │ ├── src │ │ └── index.ts │ └── eslint.config.mjs ├── openai │ ├── tsconfig.json │ └── eslint.config.mjs ├── webflow │ ├── tsconfig.json │ └── eslint.config.mjs ├── anthropic │ ├── tsconfig.json │ └── eslint.config.mjs ├── fireworks-ai │ ├── tsconfig.json │ └── eslint.config.mjs ├── google-ai │ ├── tsconfig.json │ └── eslint.config.mjs ├── loops │ ├── src │ │ └── actions │ │ │ └── index.ts │ └── tsconfig.json ├── mailchimp │ ├── tsconfig.json │ ├── eslint.config.mjs │ └── src │ │ └── index.ts ├── pdf-generator │ ├── tsconfig.json │ └── eslint.config.mjs ├── clickup │ ├── src │ │ └── actions │ │ │ └── deleteTask.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── email │ ├── tsconfig.json │ └── eslint.config.mjs └── canny │ └── tsconfig.json ├── packages ├── chat-client │ ├── .gitignore │ ├── src │ │ ├── consts.ts │ │ ├── index.ts │ │ └── jsonwebtoken.ts │ ├── .npmignore │ ├── tsconfig.json │ ├── vitest.config.ts │ ├── tsconfig.build.json │ └── eslint.config.mjs ├── llmz │ ├── examples │ │ ├── .gitignore │ │ ├── 01_chat_basic │ │ │ └── README.md │ │ ├── 12_worker_fs │ │ │ └── README.md │ │ ├── 11_worker_minimal │ │ │ └── README.md │ │ ├── 13_worker_sandbox │ │ │ └── README.md │ │ ├── 14_worker_snapshot │ │ │ └── README.md │ │ ├── 15_worker_stacktraces │ │ │ └── README.md │ │ ├── 17_worker_error_recovery │ │ │ └── README.md │ │ ├── utils │ │ │ └── tools │ │ │ │ └── browser │ │ │ │ └── index.ts │ │ ├── 04_chat_small_models │ │ │ └── README.md │ │ ├── 06_chat_confirm_tool │ │ │ └── README.md │ │ ├── 07_chat_guardrails │ │ │ └── README.md │ │ ├── .env.example │ │ └── 19_worker_wrap_tool │ │ │ └── README.md │ ├── .gitignore │ ├── docs │ │ └── .gitignore │ ├── src │ │ ├── __tests__ │ │ │ └── corgi.png │ │ ├── compiler │ │ │ └── index.ts │ │ └── prompts │ │ │ ├── worker-mode │ │ │ ├── user.md │ │ │ └── user.md.ts │ │ │ └── chat-mode │ │ │ ├── user.md │ │ │ └── user.md.ts │ └── .npmignore ├── cli │ ├── init.js │ ├── bin.js │ ├── templates │ │ ├── empty-bot │ │ │ ├── .gitignore │ │ │ ├── bot.definition.ts │ │ │ └── src │ │ │ │ └── index.ts │ │ ├── empty-plugin │ │ │ ├── .gitignore │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ └── plugin.definition.ts │ │ ├── hello-world │ │ │ └── .gitignore │ │ ├── webhook-message │ │ │ └── .gitignore │ │ └── empty-integration │ │ │ ├── .gitignore │ │ │ └── integration.definition.ts │ ├── src │ │ ├── tables │ │ │ └── index.ts │ │ ├── sdk │ │ │ └── index.ts │ │ ├── worker │ │ │ └── index.ts │ │ ├── utils │ │ │ ├── object-utils.ts │ │ │ └── guard-utils.ts │ │ ├── api │ │ │ └── index.ts │ │ ├── code-generation │ │ │ └── interface-implementation │ │ │ │ └── index.ts │ │ └── root.ts │ ├── e2e │ │ ├── fixtures │ │ │ ├── bots │ │ │ │ └── bot-with-plugin-dependency │ │ │ │ │ └── src │ │ │ │ │ └── index.ts │ │ │ └── plugins │ │ │ │ └── plugin-with-interface-dependency │ │ │ │ └── src │ │ │ │ └── index.ts │ │ └── retry.ts │ ├── .npmignore │ ├── build.ts │ └── tsconfig.json ├── cognitive │ ├── .gitignore │ ├── .npmignore │ ├── tsconfig.json │ ├── tsconfig.build.json │ ├── src │ │ └── index.ts │ └── eslint.config.mjs ├── sdk │ ├── src │ │ ├── plugin │ │ │ ├── server │ │ │ │ └── index.ts │ │ │ ├── common │ │ │ │ └── index.ts │ │ │ ├── action-proxy │ │ │ │ └── index.ts │ │ │ ├── event-proxy │ │ │ │ └── index.ts │ │ │ ├── state-proxy │ │ │ │ └── index.ts │ │ │ ├── user-proxy │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── message-proxy │ │ │ │ └── index.ts │ │ │ └── conversation-proxy │ │ │ │ └── index.ts │ │ ├── interface │ │ │ ├── common │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── integration │ │ │ ├── common │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── common │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── bot │ │ │ ├── common │ │ │ │ └── index.ts │ │ │ ├── server │ │ │ │ └── responses.ts │ │ │ ├── workflow-proxy │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── version.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── array-utils.ts │ │ │ ├── function-utils.ts │ │ │ └── error-utils.ts │ │ ├── public-consts.ts │ │ └── log.ts │ ├── .npmignore │ ├── tsconfig.json │ ├── tsconfig.package.json │ ├── readme.md │ └── eslint.config.mjs ├── chat-api │ ├── src │ │ ├── version.ts │ │ ├── models │ │ │ └── index.ts │ │ └── operations │ │ │ ├── types.ts │ │ │ └── auth.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── client │ ├── .npmignore │ ├── e2e │ │ └── consts.ts │ ├── tsconfig.json │ ├── tsconfig.build.json │ ├── src │ │ └── common │ │ │ ├── index.ts │ │ │ └── errors.ts │ └── eslint.config.mjs ├── common │ ├── src │ │ ├── error-handling │ │ │ └── index.ts │ │ ├── posthog │ │ │ └── index.ts │ │ ├── entity-helpers │ │ │ └── index.ts │ │ ├── text-to-image │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── collectable-async-generator │ │ │ └── index.ts │ │ ├── user-resolver │ │ │ └── index.ts │ │ ├── integration-wrappers │ │ │ └── index.ts │ │ ├── speech-to-text │ │ │ └── index.ts │ │ ├── llm │ │ │ └── index.ts │ │ ├── markdown-transformer │ │ │ └── index.ts │ │ ├── meta │ │ │ └── index.ts │ │ ├── html-dialogs │ │ │ └── components │ │ │ │ └── index.ts │ │ ├── conversation-transcript │ │ │ └── index.ts │ │ └── oauth-wizard │ │ │ ├── consts.ts │ │ │ └── index.ts │ └── eslint.config.mjs ├── vai │ ├── .npmignore │ ├── src │ │ ├── hooks │ │ │ └── setupClient.ts │ │ └── llm.ts │ ├── tsconfig.json │ ├── build.ts │ ├── tsup.config.ts │ ├── ensure-env.cjs │ ├── eslint.config.mjs │ └── vitest.config.ts ├── zai │ ├── src │ │ ├── operations │ │ │ └── constants.ts │ │ └── adapters │ │ │ └── memory.ts │ ├── .npmignore │ ├── e2e │ │ └── mocks │ │ │ └── server.ts │ ├── build.ts │ ├── tsup.config.ts │ ├── ensure-env.cjs │ ├── eslint.config.mjs │ └── tsconfig.json └── sdk-addons │ ├── src │ └── index.ts │ ├── tsconfig.json │ ├── readme.md │ ├── package.json │ └── eslint.config.mjs ├── .npmrc ├── plugins ├── file-synchronizer │ ├── hub.md │ ├── src │ │ ├── utils │ │ │ ├── index.ts │ │ │ └── json-lines │ │ │ │ └── index.ts │ │ ├── consts.ts │ │ ├── actions │ │ │ └── index.ts │ │ ├── hooks │ │ │ ├── workflow-continued │ │ │ │ └── index.ts │ │ │ ├── workflow-started │ │ │ │ ├── index.ts │ │ │ │ └── process-queue.ts │ │ │ ├── workflow-timed-out │ │ │ │ ├── index.ts │ │ │ │ ├── build-queue.ts │ │ │ │ └── process-queue.ts │ │ │ ├── index.ts │ │ │ └── on-event │ │ │ │ └── index.ts │ │ └── sync-queue │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── hitl │ ├── src │ │ ├── hooks │ │ │ ├── before-incoming-message │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── before-incoming-event │ │ │ │ └── index.ts │ │ │ └── consts.ts │ │ ├── actions │ │ │ └── index.ts │ │ └── consts.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── conversation-insights │ ├── src │ │ └── handlers │ │ │ └── index.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── logger │ ├── plugin.definition.ts │ ├── tsconfig.json │ └── eslint.config.mjs ├── analytics │ ├── tsconfig.json │ ├── src │ │ └── index.ts │ └── eslint.config.mjs ├── knowledge │ ├── tsconfig.json │ ├── eslint.config.mjs │ └── plugin.definition.ts ├── personality │ ├── tsconfig.json │ └── eslint.config.mjs └── synchronizer │ ├── tsconfig.json │ ├── src │ └── vanilla-client.ts │ └── eslint.config.mjs ├── .tool-versions ├── .gitattributes ├── .vscode └── extensions.json ├── tilt_config.json.sample ├── pnpm-workspace.yaml ├── interfaces ├── hitl │ ├── tsconfig.json │ └── eslint.config.mjs ├── llm │ ├── tsconfig.json │ └── eslint.config.mjs ├── creatable │ ├── tsconfig.json │ └── eslint.config.mjs ├── deletable │ ├── tsconfig.json │ └── eslint.config.mjs ├── listable │ ├── tsconfig.json │ └── eslint.config.mjs ├── readable │ ├── tsconfig.json │ └── eslint.config.mjs ├── updatable │ ├── tsconfig.json │ └── eslint.config.mjs ├── files-readonly │ ├── tsconfig.json │ └── eslint.config.mjs ├── proactive-user │ ├── tsconfig.json │ └── eslint.config.mjs ├── speech-to-text │ ├── tsconfig.json │ └── eslint.config.mjs ├── text-to-image │ ├── tsconfig.json │ └── eslint.config.mjs ├── typing-indicator │ ├── tsconfig.json │ └── eslint.config.mjs └── proactive-conversation │ ├── tsconfig.json │ └── eslint.config.mjs ├── .prettierrc ├── .editorconfig ├── .gitignore ├── vitest.config.ts └── .github └── scripts └── ls-sentry-integrations.sh /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | pnpx lint-staged -------------------------------------------------------------------------------- /.husky/pre-merge-commit: -------------------------------------------------------------------------------- 1 | pnpm check -------------------------------------------------------------------------------- /bots/hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/asana/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/gmail/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/notion/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress -------------------------------------------------------------------------------- /integrations/slack/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/sunco/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/teams/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/viber/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/workable/hub.md: -------------------------------------------------------------------------------- 1 | # Workable 2 | -------------------------------------------------------------------------------- /packages/chat-client/.gitignore: -------------------------------------------------------------------------------- 1 | src/gen/ -------------------------------------------------------------------------------- /packages/llmz/examples/.gitignore: -------------------------------------------------------------------------------- 1 | *.cast -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | link-workspace-packages=true 2 | 3 | -------------------------------------------------------------------------------- /bots/knowledgiani/readme.md: -------------------------------------------------------------------------------- 1 | # Knowledgiani 2 | -------------------------------------------------------------------------------- /integrations/freshchat/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/github/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/intercom/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/linear/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/messenger/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/telegram/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/twilio/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/vonage/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /integrations/zendesk/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /packages/cli/init.js: -------------------------------------------------------------------------------- 1 | require("./dist/init.js"); -------------------------------------------------------------------------------- /packages/cognitive/.gitignore: -------------------------------------------------------------------------------- 1 | src/gen.ts 2 | .env -------------------------------------------------------------------------------- /integrations/chat/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | src/gen -------------------------------------------------------------------------------- /bots/sheetzy/src/types.ts: -------------------------------------------------------------------------------- 1 | export * from '.botpress' 2 | -------------------------------------------------------------------------------- /integrations/todoist/extract.vrl: -------------------------------------------------------------------------------- 1 | parse_json!(.body).user_id 2 | -------------------------------------------------------------------------------- /integrations/zendesk-messaging-hitl/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | -------------------------------------------------------------------------------- /packages/llmz/.gitignore: -------------------------------------------------------------------------------- 1 | *.md.js 2 | 3 | !examples/.env.example -------------------------------------------------------------------------------- /packages/llmz/docs/.gitignore: -------------------------------------------------------------------------------- 1 | all-examples.md 2 | competitor.md -------------------------------------------------------------------------------- /plugins/file-synchronizer/hub.md: -------------------------------------------------------------------------------- 1 | # File Synchronizer Plugin 2 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | pnpm 10.12.4 2 | nodejs 22.17.0 3 | tilt 0.35.0 4 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/server/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types' 2 | -------------------------------------------------------------------------------- /integrations/gmail/src/channels/index.ts: -------------------------------------------------------------------------------- 1 | export * from './channels' 2 | -------------------------------------------------------------------------------- /integrations/instagram/src/webhook/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handler' 2 | -------------------------------------------------------------------------------- /integrations/linear/extract.vrl: -------------------------------------------------------------------------------- 1 | parse_json!(.body).organizationId 2 | -------------------------------------------------------------------------------- /integrations/todoist/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress 2 | node_modules 3 | dist 4 | -------------------------------------------------------------------------------- /packages/chat-api/src/version.ts: -------------------------------------------------------------------------------- 1 | export const apiVersion = '0.7.4' 2 | -------------------------------------------------------------------------------- /packages/cli/bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require("./dist/cli.js"); 3 | -------------------------------------------------------------------------------- /packages/sdk/src/interface/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generic' 2 | -------------------------------------------------------------------------------- /integrations/asana/src/const.ts: -------------------------------------------------------------------------------- 1 | export const INTEGRATION_NAME = 'asana' 2 | -------------------------------------------------------------------------------- /integrations/confluence/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './entities' 2 | -------------------------------------------------------------------------------- /integrations/gmail/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handler' 2 | -------------------------------------------------------------------------------- /packages/sdk/src/integration/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generic' 2 | -------------------------------------------------------------------------------- /integrations/feature-base/definitions/events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './posts' 2 | -------------------------------------------------------------------------------- /integrations/freshchat/src/const.ts: -------------------------------------------------------------------------------- 1 | export const INTEGRATION_NAME = 'freshchat' 2 | -------------------------------------------------------------------------------- /integrations/hubspot/src/webhook/index.ts: -------------------------------------------------------------------------------- 1 | export { handler } from './handler' 2 | -------------------------------------------------------------------------------- /integrations/mintlify/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export { actions } from './actions' 2 | -------------------------------------------------------------------------------- /integrations/notion/extract.vrl: -------------------------------------------------------------------------------- 1 | to_string!(parse_json!(.body).workspace_id) 2 | -------------------------------------------------------------------------------- /integrations/slack/definitions/channels/index.ts: -------------------------------------------------------------------------------- 1 | export * from './channels' 2 | -------------------------------------------------------------------------------- /integrations/whatsapp/src/webhook/index.ts: -------------------------------------------------------------------------------- 1 | export { handler } from './handler' 2 | -------------------------------------------------------------------------------- /packages/client/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !dist/**/* 3 | !package.json 4 | !readme.md 5 | -------------------------------------------------------------------------------- /packages/common/src/error-handling/index.ts: -------------------------------------------------------------------------------- 1 | export * from './try-catch-wrapper' 2 | -------------------------------------------------------------------------------- /packages/common/src/posthog/index.ts: -------------------------------------------------------------------------------- 1 | export * as posthogHelper from './helper' 2 | -------------------------------------------------------------------------------- /packages/sdk/src/common/index.ts: -------------------------------------------------------------------------------- 1 | export type * as commonTypes from './types' 2 | -------------------------------------------------------------------------------- /integrations/gsheets/src/channels/index.ts: -------------------------------------------------------------------------------- 1 | export * from './publisher-dispatcher' 2 | -------------------------------------------------------------------------------- /integrations/notion/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handler-dispatcher' 2 | -------------------------------------------------------------------------------- /packages/cli/templates/empty-bot/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress/ 2 | bp_modules/ 3 | node_modules/ -------------------------------------------------------------------------------- /packages/common/src/entity-helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-or-update-user' 2 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * as jsonl from './json-lines' 2 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/utils/json-lines/index.ts: -------------------------------------------------------------------------------- 1 | export * from './parser' 2 | -------------------------------------------------------------------------------- /plugins/hitl/src/hooks/before-incoming-message/index.ts: -------------------------------------------------------------------------------- 1 | export * as all from './all' 2 | -------------------------------------------------------------------------------- /integrations/dropbox/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handler-dispatcher' 2 | -------------------------------------------------------------------------------- /integrations/gsheets/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handler-dispatcher' 2 | -------------------------------------------------------------------------------- /integrations/hubspot/extract.vrl: -------------------------------------------------------------------------------- 1 | body = parse_json!(.body) 2 | to_string!(body[0].portalId) -------------------------------------------------------------------------------- /integrations/intercom/extract.vrl: -------------------------------------------------------------------------------- 1 | to_string!(parse_json!(.body).data.item.admin_assignee_id) -------------------------------------------------------------------------------- /integrations/notion/src/notion-api/db-structure/index.ts: -------------------------------------------------------------------------------- 1 | export * from './db-structure' 2 | -------------------------------------------------------------------------------- /integrations/todoist/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handler-dispatcher' 2 | -------------------------------------------------------------------------------- /packages/cli/src/tables/index.ts: -------------------------------------------------------------------------------- 1 | export { TablesPublisher } from './tables-publisher' 2 | -------------------------------------------------------------------------------- /packages/cli/templates/empty-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress/ 2 | bp_modules/ 3 | node_modules/ -------------------------------------------------------------------------------- /packages/cli/templates/hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress/ 2 | bp_modules/ 3 | node_modules/ -------------------------------------------------------------------------------- /packages/cli/templates/webhook-message/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress/ 2 | bp_modules/ 3 | node_modules/ -------------------------------------------------------------------------------- /packages/llmz/examples/01_chat_basic/README.md: -------------------------------------------------------------------------------- 1 | ## 🎥 Demo 2 | 3 | ![Demo](./demo.svg) 4 | -------------------------------------------------------------------------------- /packages/llmz/examples/12_worker_fs/README.md: -------------------------------------------------------------------------------- 1 | ## 🎥 Demo 2 | 3 | ![Demo](./demo.svg) 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | .oxlintrc.json linguist-language=jsonc gitlab-language=jsonc -------------------------------------------------------------------------------- /integrations/googlecalendar/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export * from './handler-dispatcher' 2 | -------------------------------------------------------------------------------- /integrations/hubspot/src/hubspot-api/index.ts: -------------------------------------------------------------------------------- 1 | export { HubspotClient } from './hubspot-client' 2 | -------------------------------------------------------------------------------- /integrations/slack/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export { handler } from './handler-dispatcher' 2 | -------------------------------------------------------------------------------- /integrations/trello/src/webhook-events/index.ts: -------------------------------------------------------------------------------- 1 | export { handler } from './handler-dispatcher' 2 | -------------------------------------------------------------------------------- /packages/cli/templates/empty-integration/.gitignore: -------------------------------------------------------------------------------- 1 | .botpress/ 2 | bp_modules/ 3 | node_modules/ -------------------------------------------------------------------------------- /packages/llmz/examples/11_worker_minimal/README.md: -------------------------------------------------------------------------------- 1 | ## 🎥 Demo 2 | 3 | ![Demo](./demo.svg) 4 | -------------------------------------------------------------------------------- /packages/llmz/examples/13_worker_sandbox/README.md: -------------------------------------------------------------------------------- 1 | ## 🎥 Demo 2 | 3 | ![Demo](./demo.svg) 4 | -------------------------------------------------------------------------------- /packages/llmz/examples/14_worker_snapshot/README.md: -------------------------------------------------------------------------------- 1 | ## 🎥 Demo 2 | 3 | ![Demo](./demo.svg) 4 | -------------------------------------------------------------------------------- /packages/llmz/examples/15_worker_stacktraces/README.md: -------------------------------------------------------------------------------- 1 | ## 🎥 Demo 2 | 3 | ![Demo](./demo.svg) 4 | -------------------------------------------------------------------------------- /packages/sdk/src/bot/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './generic' 2 | export * from './types' 3 | -------------------------------------------------------------------------------- /packages/sdk/src/interface/index.ts: -------------------------------------------------------------------------------- 1 | export * from './definition' 2 | export * from './common' 3 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types' 2 | export * from './generic' 3 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/consts.ts: -------------------------------------------------------------------------------- 1 | export const MAX_BATCH_SIZE_BYTES = 104857600 // 100MB 2 | -------------------------------------------------------------------------------- /plugins/hitl/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './start-hitl' 2 | export * from './stop-hitl' 3 | -------------------------------------------------------------------------------- /integrations/gmail/src/utils/datetime-utils.ts: -------------------------------------------------------------------------------- 1 | export const MS_IN_12_HOURS = 43_200_000 as const 2 | -------------------------------------------------------------------------------- /integrations/messenger/src/webhook/index.ts: -------------------------------------------------------------------------------- 1 | import handler from './handler' 2 | export { handler } 3 | -------------------------------------------------------------------------------- /integrations/slack/extract.vrl: -------------------------------------------------------------------------------- 1 | parse_json!(replace(decode_percent!(.body), "payload=", "")).team_id 2 | -------------------------------------------------------------------------------- /packages/chat-client/src/consts.ts: -------------------------------------------------------------------------------- 1 | export const defaultBaseApiUrl = 'https://chat.botpress.cloud' 2 | -------------------------------------------------------------------------------- /packages/cognitive/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | tsconfig.tsbuildinfo 3 | src/ 4 | tsconfig.json 5 | .env -------------------------------------------------------------------------------- /packages/llmz/examples/17_worker_error_recovery/README.md: -------------------------------------------------------------------------------- 1 | ## 🎥 Demo 2 | 3 | ![Demo](./demo.svg) 4 | -------------------------------------------------------------------------------- /packages/sdk/src/bot/server/responses.ts: -------------------------------------------------------------------------------- 1 | export const SUCCESS_RESPONSE = { status: 200 } as const 2 | -------------------------------------------------------------------------------- /packages/sdk/src/bot/workflow-proxy/index.ts: -------------------------------------------------------------------------------- 1 | export * from './proxy' 2 | export * from './types' 3 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/action-proxy/index.ts: -------------------------------------------------------------------------------- 1 | export * from './proxy' 2 | export * from './types' 3 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/event-proxy/index.ts: -------------------------------------------------------------------------------- 1 | export * from './proxy' 2 | export * from './types' 3 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/state-proxy/index.ts: -------------------------------------------------------------------------------- 1 | export * from './proxy' 2 | export * from './types' 3 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["esbenp.prettier-vscode", "oxc.oxc-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /integrations/docusign/src/config.ts: -------------------------------------------------------------------------------- 1 | export const CONVERSATION_ID_FIELD_KEY = 'Botpress-Conversation-ID' 2 | -------------------------------------------------------------------------------- /integrations/gmail/extract.vrl: -------------------------------------------------------------------------------- 1 | parse_json!(decode_base64!(parse_json!(.body).message.data)).emailAddress 2 | -------------------------------------------------------------------------------- /packages/cli/src/sdk/index.ts: -------------------------------------------------------------------------------- 1 | export * from './validate-integration' 2 | export * from './validate-bot' 3 | -------------------------------------------------------------------------------- /packages/cli/src/worker/index.ts: -------------------------------------------------------------------------------- 1 | export { Config } from './config' 2 | export { Worker } from './worker' 3 | -------------------------------------------------------------------------------- /packages/sdk/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | tsconfig.tsbuildinfo 3 | src/ 4 | tsconfig.json 5 | build.ts 6 | -------------------------------------------------------------------------------- /packages/vai/.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | node_modules/ 3 | *.test.ts 4 | *.test.js 5 | .env 6 | .env.local 7 | .turbo -------------------------------------------------------------------------------- /bots/sheetzy/src/bot.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | export const bot = new bp.Bot({ actions: {} }) 3 | -------------------------------------------------------------------------------- /integrations/notion/src/files-readonly/index.ts: -------------------------------------------------------------------------------- 1 | export * from './mapping' 2 | export * from './path-utils' 3 | -------------------------------------------------------------------------------- /packages/common/src/text-to-image/index.ts: -------------------------------------------------------------------------------- 1 | export * as schemas from './schemas' 2 | export * from './types' 3 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | export * as syncFilesToBotpess from './sync-files-to-botpress' 2 | -------------------------------------------------------------------------------- /integrations/feature-base/src/feature-base-api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './client' 2 | export * from './webhook' 3 | -------------------------------------------------------------------------------- /integrations/gsheets/src/google-api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './google-client' 2 | export * from './error-handling' 3 | -------------------------------------------------------------------------------- /integrations/notion/src/notion-api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './notion-client' 2 | export * from './error-handling' 3 | -------------------------------------------------------------------------------- /packages/sdk/src/version.ts: -------------------------------------------------------------------------------- 1 | import { version } from '../package.json' 2 | 3 | export const SDK_VERSION = version 4 | -------------------------------------------------------------------------------- /bots/echo/src/bot.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export const bot = new bp.Bot({ 4 | actions: {}, 5 | }) 6 | -------------------------------------------------------------------------------- /integrations/hubspot/src/webhook/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './oauth-callback' 2 | export * from './batch-update' 3 | -------------------------------------------------------------------------------- /packages/client/e2e/consts.ts: -------------------------------------------------------------------------------- 1 | export const successMessage = '__SUCCESS__' 2 | export const failureMessage = '__FAIL__' 3 | -------------------------------------------------------------------------------- /packages/common/src/collectable-async-generator/index.ts: -------------------------------------------------------------------------------- 1 | export { collectableGenerator } from './collectable-generator' 2 | -------------------------------------------------------------------------------- /packages/common/src/user-resolver/index.ts: -------------------------------------------------------------------------------- 1 | export { type UserResolver, UserResolverWithCaching } from './user-resolver' 2 | -------------------------------------------------------------------------------- /integrations/attio/src/setup/index.ts: -------------------------------------------------------------------------------- 1 | export { register, unregister } from './setup' 2 | export { handler } from './handler' 3 | -------------------------------------------------------------------------------- /integrations/googlecalendar/src/google-api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './google-client' 2 | export * from './error-handling' 3 | -------------------------------------------------------------------------------- /integrations/googledrive/src/setup.ts: -------------------------------------------------------------------------------- 1 | export const register = async () => {} 2 | export const unregister = async () => {} 3 | -------------------------------------------------------------------------------- /integrations/resend/src/misc/types.ts: -------------------------------------------------------------------------------- 1 | export type Result = { success: true; data: T } | { success: false; error: Error } 2 | -------------------------------------------------------------------------------- /integrations/sunco/src/setup/index.ts: -------------------------------------------------------------------------------- 1 | export { register } from './register' 2 | export { unregister } from './unregister' 3 | -------------------------------------------------------------------------------- /packages/common/src/integration-wrappers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './action-wrapper' 2 | export * from './channel-wrapper' 3 | -------------------------------------------------------------------------------- /packages/zai/src/operations/constants.ts: -------------------------------------------------------------------------------- 1 | export const PROMPT_INPUT_BUFFER = 1048 2 | export const PROMPT_OUTPUT_BUFFER = 512 3 | -------------------------------------------------------------------------------- /bots/bugbuster/src/utils/linear-utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './client' 2 | export { Issue, Pagination } from './graphql-queries' 3 | -------------------------------------------------------------------------------- /integrations/dropbox/src/dropbox-api/mapping/index.ts: -------------------------------------------------------------------------------- 1 | export * from './response-mapping' 2 | export * from './request-mapping' 3 | -------------------------------------------------------------------------------- /integrations/resend/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { sendMail } from './send-mail' 2 | 3 | export default { 4 | sendMail, 5 | } 6 | -------------------------------------------------------------------------------- /integrations/sendgrid/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { sendMail } from './send-mail' 2 | 3 | export default { 4 | sendMail, 5 | } 6 | -------------------------------------------------------------------------------- /integrations/todoist/src/todoist-api/mapping/index.ts: -------------------------------------------------------------------------------- 1 | export * from './response-mapping' 2 | export * from './request-mapping' 3 | -------------------------------------------------------------------------------- /integrations/whatsapp/sandboxShareableIdExtract.vrl: -------------------------------------------------------------------------------- 1 | body = parse_json!(.body) 2 | body.entry[0].changes[0].value.messages[0].text.body -------------------------------------------------------------------------------- /packages/llmz/src/__tests__/corgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-botpress/master/packages/llmz/src/__tests__/corgi.png -------------------------------------------------------------------------------- /integrations/dropbox/src/dropbox-api/index.ts: -------------------------------------------------------------------------------- 1 | export { DropboxClient } from './dropbox-client' 2 | export * from './error-handling' 3 | -------------------------------------------------------------------------------- /integrations/github/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { findTarget } from './find-target' 2 | 3 | export default { 4 | findTarget, 5 | } 6 | -------------------------------------------------------------------------------- /integrations/googlecalendar/src/google-api/mapping/index.ts: -------------------------------------------------------------------------------- 1 | export * from './response-mapping' 2 | export * from './request-mapping' 3 | -------------------------------------------------------------------------------- /integrations/todoist/src/todoist-api/index.ts: -------------------------------------------------------------------------------- 1 | export { TodoistClient } from './todoist-client' 2 | export * from './error-handling' 3 | -------------------------------------------------------------------------------- /integrations/feature-base/definitions/actions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './boards' 2 | export * from './comments' 3 | export * from './posts' 4 | -------------------------------------------------------------------------------- /integrations/github/src/const.ts: -------------------------------------------------------------------------------- 1 | export const INTEGRATION_NAME = 'github' 2 | export const GITHUB_SIGNATURE_HEADER = 'x-hub-signature-256' 3 | -------------------------------------------------------------------------------- /packages/cli/templates/empty-bot/bot.definition.ts: -------------------------------------------------------------------------------- 1 | import { BotDefinition } from '@botpress/sdk' 2 | export default new BotDefinition({}) 3 | -------------------------------------------------------------------------------- /integrations/calendly/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { scheduleEvent } from './schedule-event' 2 | 3 | export default { 4 | scheduleEvent, 5 | } 6 | -------------------------------------------------------------------------------- /integrations/messenger/extract.vrl: -------------------------------------------------------------------------------- 1 | body = parse_json!(.body) 2 | if body.object == "page" { 3 | body.entry[0].id 4 | } else { 5 | null 6 | } -------------------------------------------------------------------------------- /packages/chat-client/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | src/ 3 | tsconfig.json 4 | build.ts 5 | openapi.ts 6 | readme.md 7 | *.tsbuildinfo 8 | .ignore.me.* -------------------------------------------------------------------------------- /packages/llmz/src/compiler/index.ts: -------------------------------------------------------------------------------- 1 | export { Identifiers, compile } from './compiler.js' 2 | export type { CompiledCode } from './compiler.js' 3 | -------------------------------------------------------------------------------- /bots/drop-weaver/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | const bot = new bp.Bot({ 4 | actions: {}, 5 | }) 6 | 7 | export default bot 8 | -------------------------------------------------------------------------------- /integrations/gmail/src/google-api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './error-handling' 2 | export * from './google-client' 3 | export * from './jwt-validation' 4 | -------------------------------------------------------------------------------- /integrations/instagram/extract.vrl: -------------------------------------------------------------------------------- 1 | body = parse_json!(.body) 2 | if body.object == "instagram" { 3 | body.entry[0].id 4 | } else { 5 | null 6 | } -------------------------------------------------------------------------------- /integrations/slack/src/slack-api/index.ts: -------------------------------------------------------------------------------- 1 | export { SlackClient } from './slack-client' 2 | export { wrapAsyncFnWithTryCatch } from './error-handling' 3 | -------------------------------------------------------------------------------- /packages/common/src/speech-to-text/index.ts: -------------------------------------------------------------------------------- 1 | export * as openai from './openai' 2 | export * as schemas from './schemas' 3 | export * from './types' 4 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/user-proxy/index.ts: -------------------------------------------------------------------------------- 1 | export { proxyUsers, proxyUser } from './proxy' 2 | export { UserFinder, ActionableUser } from './types' 3 | -------------------------------------------------------------------------------- /tilt_config.json.sample: -------------------------------------------------------------------------------- 1 | { 2 | "bp-domain": "botpress.dev", 3 | "bp-workspace-id": "11111111-1111-1111-aaaa-111111111111", 4 | "bp-token": "" 5 | } -------------------------------------------------------------------------------- /integrations/attio/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export { actions } from './actions' 2 | export { states } from './state' 3 | export { events } from './events' 4 | -------------------------------------------------------------------------------- /integrations/hubspot/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export { actions } from './actions' 2 | export { states } from './states' 3 | export { events } from './events' 4 | -------------------------------------------------------------------------------- /packages/llmz/examples/utils/tools/browser/index.ts: -------------------------------------------------------------------------------- 1 | export * from './browsePages' 2 | export * from './captureScreenshot' 3 | export * from './webSearch' 4 | -------------------------------------------------------------------------------- /integrations/bamboohr/src/types.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export type CommonHandlerProps = Pick 4 | -------------------------------------------------------------------------------- /packages/sdk-addons/src/index.ts: -------------------------------------------------------------------------------- 1 | // TODO: move this to the new `common` package and get rid of this `sdk-addons` package 2 | export * as sentry from './sentry' 3 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/index.ts: -------------------------------------------------------------------------------- 1 | export * from './definition' 2 | export * from './implementation' 3 | export * from './server' 4 | export * from './common' 5 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/workflow-continued/index.ts: -------------------------------------------------------------------------------- 1 | export * as buildQueue from './build-queue' 2 | export * as processQueue from './process-queue' 3 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/workflow-started/index.ts: -------------------------------------------------------------------------------- 1 | export * as buildQueue from './build-queue' 2 | export * as processQueue from './process-queue' 3 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/workflow-timed-out/index.ts: -------------------------------------------------------------------------------- 1 | export * as buildQueue from './build-queue' 2 | export * as processQueue from './process-queue' 3 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - packages/* 3 | - packages/cli/templates/* 4 | - integrations/* 5 | - interfaces/* 6 | - bots/* 7 | - plugins/* 8 | -------------------------------------------------------------------------------- /integrations/chat/src/signal-emitter/index.ts: -------------------------------------------------------------------------------- 1 | export * from './typings' 2 | export * from './pushpin' 3 | export * from './webhook' 4 | export * from './composite' 5 | -------------------------------------------------------------------------------- /integrations/slack/fallbackHandler.vrl: -------------------------------------------------------------------------------- 1 | challenge = parse_json!(.body).challenge 2 | 3 | { 4 | "body": encode_json({ 5 | "challenge": challenge 6 | }) 7 | } 8 | -------------------------------------------------------------------------------- /integrations/stripe/src/setup/index.ts: -------------------------------------------------------------------------------- 1 | export { register } from './register' 2 | export { unregister } from './unregister' 3 | export { handler } from './handler' 4 | -------------------------------------------------------------------------------- /integrations/teams/src/channels/constants.ts: -------------------------------------------------------------------------------- 1 | export const DROPDOWN_VALUE_KIND = 'dropdown_value' as const 2 | export const DROPDOWN_VALUE_ID = 'choice' as const 3 | -------------------------------------------------------------------------------- /integrations/zoho/src/setup/index.ts: -------------------------------------------------------------------------------- 1 | export { register } from './register' 2 | export { unregister } from './unregister' 3 | export { handler } from './handler' 4 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/message-proxy/index.ts: -------------------------------------------------------------------------------- 1 | export { proxyMessage, proxyMessages } from './proxy' 2 | export { ActionableMessage, MessageFinder } from './types' 3 | -------------------------------------------------------------------------------- /integrations/sunco/src/setup/unregister.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '../../.botpress' 2 | 3 | export const unregister: bp.IntegrationProps['unregister'] = async ({}) => {} 4 | -------------------------------------------------------------------------------- /packages/cli/templates/empty-bot/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | const bot = new bp.Bot({ 4 | actions: {}, 5 | }) 6 | 7 | export default bot 8 | -------------------------------------------------------------------------------- /packages/common/src/llm/index.ts: -------------------------------------------------------------------------------- 1 | export * as openai from './openai' 2 | export * as schemas from './schemas' 3 | export * from './types' 4 | export * from './errors' 5 | -------------------------------------------------------------------------------- /plugins/hitl/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * as beforeIncomingMessage from './before-incoming-message' 2 | export * as beforeIncomingEvent from './before-incoming-event' 3 | -------------------------------------------------------------------------------- /integrations/gmail/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-gmail 3 | 4 | [auth] 5 | dsn=https://9c142bbdec69455e84856e569ef30ef8@o363631.ingest.sentry.io/4505274805846016 -------------------------------------------------------------------------------- /integrations/gmail/definitions/events.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export const events = {} as const satisfies sdk.IntegrationDefinitionProps['events'] 4 | -------------------------------------------------------------------------------- /integrations/gsheets/definitions/user-tags.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export const user = {} as const satisfies sdk.IntegrationDefinitionProps['user'] 4 | -------------------------------------------------------------------------------- /integrations/gsheets/src/channels/publisher-dispatcher.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export const channels: bp.IntegrationProps['channels'] = async () => {} 4 | -------------------------------------------------------------------------------- /integrations/line/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-line 3 | 4 | [auth] 5 | dsn=https://404f56d2d04c41aab1255f4081f6e146@o363631.ingest.sentry.io/4505274815021056 -------------------------------------------------------------------------------- /integrations/mintlify/definitions/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { actions as agentActions } from './agent' 2 | 3 | export const actions = { 4 | ...agentActions, 5 | } as const 6 | -------------------------------------------------------------------------------- /integrations/slack/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-slack 3 | 4 | [auth] 5 | dsn=https://46c9c3a6245e44b38d5de5325735b839@o363631.ingest.sentry.io/4505274823344128 -------------------------------------------------------------------------------- /integrations/sunco/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-sunco 3 | 4 | [auth] 5 | dsn=https://eb10b9ff00c242d18cbb9d6ef5adf539@o363631.ingest.sentry.io/4505274826162176 -------------------------------------------------------------------------------- /integrations/teams/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-teams 3 | 4 | [auth] 5 | dsn=https://0646152191534952a77c35baceb795c3@o363631.ingest.sentry.io/4505274828783616 -------------------------------------------------------------------------------- /integrations/viber/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-viber 3 | 4 | [auth] 5 | dsn=https://3385f2e13e1f4ab397d5bea198086929@o363631.ingest.sentry.io/4505274837893120 -------------------------------------------------------------------------------- /packages/common/src/markdown-transformer/index.ts: -------------------------------------------------------------------------------- 1 | export { transformMarkdown, stripAllHandlers } from './markdown-transformer' 2 | export { MarkdownHandlers } from './types' 3 | -------------------------------------------------------------------------------- /integrations/asana/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-asana 3 | 4 | [auth] 5 | dsn=https://fee5d1472b33cd6c7fa53b8f34aee871@o363631.ingest.sentry.io/4505675573559296 6 | -------------------------------------------------------------------------------- /integrations/bamboohr/linkTemplate.vrl: -------------------------------------------------------------------------------- 1 | webhookId = to_string!(.webhookId) 2 | webhookUrl = to_string!(.webhookUrl) 3 | 4 | "{{ webhookUrl }}/oauth/wizard/start?state={{ webhookId }}" -------------------------------------------------------------------------------- /integrations/github/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-github 3 | 4 | [auth] 5 | dsn=https://532cd4b9c2824be2bfbc490074c54d3b@o363631.ingest.sentry.io/4505274800144384 -------------------------------------------------------------------------------- /integrations/gsheets/definitions/channels.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export const channels = {} as const satisfies sdk.IntegrationDefinitionProps['channels'] 4 | -------------------------------------------------------------------------------- /integrations/linear/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-linear 3 | 4 | [auth] 5 | dsn=https://166dae5f279f4f21a84a22bb4f073fa5@o363631.ingest.sentry.io/4505274818428928 -------------------------------------------------------------------------------- /integrations/notion/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-notion 3 | 4 | [auth] 5 | dsn=https://e13977e1aa9210d00b80cad3baeba052@o363631.ingest.us.sentry.io/4509084003729408 -------------------------------------------------------------------------------- /integrations/sunco/src/events/index.ts: -------------------------------------------------------------------------------- 1 | export { executeConversationCreated } from './conversation-created' 2 | export { handleConversationMessage } from './conversation-message' 3 | -------------------------------------------------------------------------------- /integrations/twilio/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-twilio 3 | 4 | [auth] 5 | dsn=https://3b3f9635b7be4d67b455b2854bc04a3a@o363631.ingest.sentry.io/4505274835599360 -------------------------------------------------------------------------------- /integrations/vonage/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-vonage 3 | 4 | [auth] 5 | dsn=https://bb218009290c4604bda3a67474c4d2e2@o363631.ingest.sentry.io/4505274840514560 -------------------------------------------------------------------------------- /integrations/webhook/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-webhook 3 | 4 | [auth] 5 | dsn=https://2b0e608a99074030b02eb2b5b1192219@o363631.ingest.sentry.io/4505274844708864 -------------------------------------------------------------------------------- /integrations/zapier/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-zapier 3 | 4 | [auth] 5 | dsn=https://12ba088287b54d6dab91e61bfa78fc3f@o363631.ingest.sentry.io/4505274849755136 -------------------------------------------------------------------------------- /packages/cli/templates/empty-plugin/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | const plugin = new bp.Plugin({ 4 | actions: {}, 5 | }) 6 | 7 | export default plugin 8 | -------------------------------------------------------------------------------- /packages/common/src/meta/index.ts: -------------------------------------------------------------------------------- 1 | export { handler as subscribeHandler } from './subscribe-handler' 2 | export { validateRequestSignature } from './validate-request-signature' 3 | -------------------------------------------------------------------------------- /integrations/bamboohr/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './bamboohr-schemas' 2 | export * from './common' 3 | export { actions } from './actions' 4 | export { events } from './events' 5 | -------------------------------------------------------------------------------- /integrations/dropbox/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-dropbox 3 | 4 | [auth] 5 | dsn=https://637b68d27272f81c8e9e7289b43a86f8@o363631.ingest.us.sentry.io/4508740248403968 -------------------------------------------------------------------------------- /integrations/googledrive/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-gdrive 3 | 4 | [auth] 5 | dsn=https://bc5f70c41c32d53adb940255537bf675@o363631.ingest.us.sentry.io/4508366096302080 -------------------------------------------------------------------------------- /integrations/instagram/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-instagram 3 | 4 | [auth] 5 | dsn=https://6ac4fbf6f0964bf5a5330534208f4af3@o363631.ingest.sentry.io/4505274809974784 -------------------------------------------------------------------------------- /integrations/intercom/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-intercom 3 | 4 | [auth] 5 | dsn=https://02ea973384064af58cb07172edcb1334@o363631.ingest.sentry.io/4505274812203008 -------------------------------------------------------------------------------- /integrations/messenger/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-messenger 3 | 4 | [auth] 5 | dsn=https://23b9556ffdac49abae0cd9f2c1302c42@o363631.ingest.sentry.io/4505274820853760 -------------------------------------------------------------------------------- /integrations/messenger/linkTemplate.vrl: -------------------------------------------------------------------------------- 1 | webhookId = to_string!(.webhookId) 2 | webhookUrl = to_string!(.webhookUrl) 3 | 4 | "{{ webhookUrl }}/oauth/wizard/start?state={{ webhookId }}" 5 | -------------------------------------------------------------------------------- /integrations/telegram/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-telegram 3 | 4 | [auth] 5 | dsn=https://34a176084b804ad1ba6f484a76da1479@o363631.ingest.sentry.io/4505274792673280 -------------------------------------------------------------------------------- /integrations/trello/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-trello 3 | 4 | [auth] 5 | dsn=https://3eff74f9ec846c8b60bca9e10cef6a02@o363631.ingest.sentry.io/4505750271688704 6 | -------------------------------------------------------------------------------- /integrations/whatsapp/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-whatsapp 3 | 4 | [auth] 5 | dsn=https://1a0cf9b880644bed97ddfca4c57ca333@o363631.ingest.sentry.io/4505274847461376 -------------------------------------------------------------------------------- /integrations/whatsapp/extract.vrl: -------------------------------------------------------------------------------- 1 | metaId = null 2 | body = parse_json!(.body) 3 | if body.object == "whatsapp_business_account" { 4 | metaId = body.entry[0].id 5 | } 6 | metaId 7 | -------------------------------------------------------------------------------- /integrations/zendesk/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-zendesk 3 | 4 | [auth] 5 | dsn=https://cd50676f9cf896c5b3b238ce2ad8a375@o363631.ingest.sentry.io/4505686832906240 6 | -------------------------------------------------------------------------------- /integrations/zendesk/linkTemplate.vrl: -------------------------------------------------------------------------------- 1 | webhookId = to_string!(.webhookId) 2 | webhookUrl = to_string!(.webhookUrl) 3 | 4 | "{{ webhookUrl }}/oauth/wizard/start?state={{ webhookId }}" 5 | -------------------------------------------------------------------------------- /integrations/googledrive/linkTemplate.vrl: -------------------------------------------------------------------------------- 1 | webhookId = to_string!(.webhookId) 2 | webhookUrl = to_string!(.webhookUrl) 3 | 4 | "{{ webhookUrl }}/oauth/wizard/start?state={{ webhookId }}" 5 | -------------------------------------------------------------------------------- /integrations/gsheets/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-gsheets 3 | 4 | [auth] 5 | dsn=https://302f1b38be88851b1529ae8cfd9b0a18@o363631.ingest.us.sentry.io/4508246681255936 6 | -------------------------------------------------------------------------------- /integrations/teams/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export { states } from './states' 2 | export { actions } from './actions' 3 | export { channels } from './channels' 4 | export { user } from './user' 5 | -------------------------------------------------------------------------------- /integrations/teams/src/types.ts: -------------------------------------------------------------------------------- 1 | export type TestCase = { 2 | input: INPUT 3 | expects: EXPECTED 4 | description: string 5 | skip?: boolean 6 | } 7 | -------------------------------------------------------------------------------- /integrations/todoist/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-todoist 3 | 4 | [auth] 5 | dsn=https://fa68fcfce70bce07a62093f6c7298634@o363631.ingest.us.sentry.io/4508602637221888 6 | -------------------------------------------------------------------------------- /interfaces/hitl/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/llm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/chat-client/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as axios from 'axios' 2 | export * from './types' 3 | export * from './errors' 4 | export * from './client' 5 | export * from './signal-listener' 6 | -------------------------------------------------------------------------------- /packages/sdk/src/plugin/conversation-proxy/index.ts: -------------------------------------------------------------------------------- 1 | export { proxyConversation, proxyConversations } from './proxy' 2 | export { ActionableConversation, ConversationFinder } from './types' 3 | -------------------------------------------------------------------------------- /integrations/dalle/src/types.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | type ValueOf = T[keyof T] 4 | 5 | export type ActionArgs = Parameters>[0] 6 | -------------------------------------------------------------------------------- /integrations/dropbox/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './configuration' 2 | export * from './actions' 3 | export * from './entities' 4 | export * from './secrets' 5 | export * from './states' 6 | -------------------------------------------------------------------------------- /integrations/googlecalendar/definitions/events.ts: -------------------------------------------------------------------------------- 1 | import { default as sdk } from '@botpress/sdk' 2 | 3 | export const events = {} as const satisfies sdk.IntegrationDefinitionProps['events'] 4 | -------------------------------------------------------------------------------- /integrations/telegram/tests/types.ts: -------------------------------------------------------------------------------- 1 | export type TestCase = { 2 | input: INPUT 3 | expects: EXPECTED 4 | description: string 5 | skip?: boolean 6 | } 7 | -------------------------------------------------------------------------------- /integrations/whatsapp/linkTemplate.vrl: -------------------------------------------------------------------------------- 1 | webhookId = to_string!(.webhookId) 2 | webhookUrl = to_string!(.webhookUrl) 3 | 4 | "{{ webhookUrl }}/oauth/wizard/start-confirm?state={{ webhookId }}" 5 | -------------------------------------------------------------------------------- /interfaces/creatable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/deletable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/listable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/readable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/updatable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cli/e2e/fixtures/bots/bot-with-plugin-dependency/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | const bot = new bp.Bot({ 4 | actions: {}, 5 | }) 6 | 7 | export default bot 8 | -------------------------------------------------------------------------------- /packages/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["src/**/*", "./e2e/**/*", "./*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/sdk/src/integration/index.ts: -------------------------------------------------------------------------------- 1 | export * from './definition' 2 | export * from './implementation' 3 | export * from './client' 4 | export * from './server' 5 | export * from './common' 6 | -------------------------------------------------------------------------------- /integrations/chat/hub.md: -------------------------------------------------------------------------------- 1 | The Chat integration allows you to chat with your bot using HTTP requests. Check out the [documentation](https://botpress.com/reference/introduction) for more information. 2 | -------------------------------------------------------------------------------- /integrations/zendesk/src/definitions/channels.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationDefinitionProps } from '@botpress/sdk' 2 | 3 | export const channels = undefined satisfies IntegrationDefinitionProps['channels'] 4 | -------------------------------------------------------------------------------- /interfaces/files-readonly/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/proactive-user/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/speech-to-text/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/text-to-image/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/chat-api/src/models/index.ts: -------------------------------------------------------------------------------- 1 | export * as conversation from './conversation' 2 | export * as message from './message' 3 | export * as user from './user' 4 | export * as event from './event' 5 | -------------------------------------------------------------------------------- /integrations/asana/src/setup/index.ts: -------------------------------------------------------------------------------- 1 | export { register } from './register' 2 | export { unregister } from './unregister' 3 | export { channels } from './channels' 4 | export { handler } from './handler' 5 | -------------------------------------------------------------------------------- /integrations/chat/src/id-store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types' 2 | export * from './errors' 3 | export * from './in-memory-store' 4 | export * from './dynamo-db-store' 5 | export * from './validate-fid' 6 | -------------------------------------------------------------------------------- /integrations/freshchat/src/definitions/channels.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationDefinitionProps } from '@botpress/sdk' 2 | 3 | export const channels = undefined satisfies IntegrationDefinitionProps['channels'] 4 | -------------------------------------------------------------------------------- /integrations/googlecalendar/.sentryclirc: -------------------------------------------------------------------------------- 1 | [defaults] 2 | project=integration-googlecalendar 3 | 4 | [auth] 5 | dsn=https://af740fa88390218c1ba3e7bcb2b519be@o363631.ingest.us.sentry.io/4508292498980864 6 | -------------------------------------------------------------------------------- /integrations/whatsapp/src/channels/index.ts: -------------------------------------------------------------------------------- 1 | import { channel } from './channel' 2 | import * as bp from '.botpress' 3 | 4 | export default { 5 | channel, 6 | } satisfies bp.IntegrationProps['channels'] 7 | -------------------------------------------------------------------------------- /interfaces/typing-indicator/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cli/.npmignore: -------------------------------------------------------------------------------- 1 | .ignore.me.* 2 | node_modules 3 | tsconfig.tsbuildinfo 4 | 5 | /src 6 | /e2e 7 | /tsconfig.json 8 | 9 | /templates/*/dist 10 | /templates/*/node_modules 11 | build.ts 12 | -------------------------------------------------------------------------------- /packages/cli/src/utils/object-utils.ts: -------------------------------------------------------------------------------- 1 | export const omit = (obj: O, property: K): Omit => { 2 | const { [property]: _, ...rest } = obj 3 | return rest 4 | } 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": true, 3 | "printWidth": 120, 4 | "tabWidth": 2, 5 | "semi": false, 6 | "singleQuote": true, 7 | "trailingComma": "es5", 8 | "endOfLine": "lf" 9 | } 10 | -------------------------------------------------------------------------------- /integrations/zendesk-messaging-hitl/src/events/index.ts: -------------------------------------------------------------------------------- 1 | export { handleConversationMessage } from './conversation-message' 2 | export { handleSwitchboardReleaseControl } from './switchboard-release-control' 3 | -------------------------------------------------------------------------------- /interfaces/proactive-conversation/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/chat-api/src/operations/types.ts: -------------------------------------------------------------------------------- 1 | import { ChatApi } from '../api' 2 | 3 | export type Operation = Parameters[0] 4 | export type OperationFunc = (api: ChatApi) => Operation 5 | -------------------------------------------------------------------------------- /packages/chat-client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | }, 6 | "include": ["src/**/*", "e2e/**/*", "package.json", "*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/cli/e2e/fixtures/plugins/plugin-with-interface-dependency/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | const plugin = new bp.Plugin({ 4 | actions: {}, 5 | }) 6 | 7 | export default plugin 8 | -------------------------------------------------------------------------------- /packages/cli/src/utils/guard-utils.ts: -------------------------------------------------------------------------------- 1 | export const is = { 2 | defined: (value: T | undefined): value is T => value !== undefined, 3 | notNull: (value: T | null): value is T => value !== null, 4 | } 5 | -------------------------------------------------------------------------------- /packages/sdk/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * as records from './record-utils' 2 | export * as arrays from './array-utils' 3 | export * as types from './type-utils' 4 | export * as functions from './function-utils' 5 | -------------------------------------------------------------------------------- /packages/zai/.npmignore: -------------------------------------------------------------------------------- 1 | vitest.config.ts 2 | vitest.setup.ts 3 | tsup.config.ts 4 | 5 | node_modules/ 6 | scripts/ 7 | .turbo 8 | 9 | *.test.ts 10 | *.test.js 11 | *.mts 12 | 13 | .env 14 | .env.local -------------------------------------------------------------------------------- /bots/clog/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/echo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/sinlin/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cognitive/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "strict": false 6 | }, 7 | "include": ["src/**/*", "e2e/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/bugbuster/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * as string from './string-utils' 2 | export * as promise from './promise-utils' 3 | export * as linear from './linear-utils' 4 | export * as botpress from './botpress-utils' 5 | -------------------------------------------------------------------------------- /bots/bugbuster/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/doppel-doer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/drop-weaver/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/hello-world/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/hit-looper/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/notionaut/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/sheetzy/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/synchrotron/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/calcom/hub.md: -------------------------------------------------------------------------------- 1 | This integration allows you to interact with the Cal.com scheduling platform. It provides actions to list all available events for a sepecific user and to book an event on behalf of a user. 2 | -------------------------------------------------------------------------------- /integrations/docusign/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { sendEnvelope } from './send-envelope' 2 | import * as bp from '.botpress' 3 | 4 | export default { 5 | sendEnvelope, 6 | } satisfies bp.IntegrationProps['actions'] 7 | -------------------------------------------------------------------------------- /packages/sdk/src/bot/index.ts: -------------------------------------------------------------------------------- 1 | export * from './definition' 2 | export * from './implementation' 3 | export * from './client' 4 | export * from './server' 5 | export * from './common' 6 | export * from './bot-logger' 7 | -------------------------------------------------------------------------------- /packages/vai/src/hooks/setupClient.ts: -------------------------------------------------------------------------------- 1 | import { Client } from '@botpress/client' 2 | import { Context } from '../context' 3 | 4 | export const setupClient = (client: Client) => { 5 | Context.setClient(client) 6 | } 7 | -------------------------------------------------------------------------------- /bots/knowledgiani/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/asana/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { AsanaApi } from '../client' 2 | import type { Configuration } from '../misc/types' 3 | 4 | export const getClient = (config: Configuration) => new AsanaApi(config.apiToken) 5 | -------------------------------------------------------------------------------- /integrations/bigcommerce-sync/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import syncProducts from './sync-products' 2 | import * as bp from '.botpress' 3 | 4 | export default { 5 | syncProducts, 6 | } satisfies bp.IntegrationProps['actions'] 7 | -------------------------------------------------------------------------------- /integrations/instagram/sandboxLinkTemplate.vrl: -------------------------------------------------------------------------------- 1 | env = to_string!(.env) 2 | 3 | profile = if env == "production" { 4 | "botpresssandbox" 5 | } else { 6 | "botpresssandboxstaging" 7 | } 8 | 9 | "https://ig.me/m/{{ profile }}" -------------------------------------------------------------------------------- /integrations/mintlify/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import * as agentActions from './agent' 2 | import * as bp from '.botpress' 3 | 4 | export default { 5 | ...agentActions, 6 | } as const satisfies bp.IntegrationProps['actions'] 7 | -------------------------------------------------------------------------------- /integrations/telegram/src/misc/string-utils.ts: -------------------------------------------------------------------------------- 1 | export const spliceText = (text: string, start: number, end: number, replacement: string) => { 2 | return text.substring(0, start) + replacement + text.substring(end) 3 | } 4 | -------------------------------------------------------------------------------- /integrations/workable/src/mapping/pagination.ts: -------------------------------------------------------------------------------- 1 | export function parseNextToken(url: string): string | undefined { 2 | const parsedUrl = new URL(url) 3 | return parsedUrl.searchParams.get('since_id') ?? undefined 4 | } 5 | -------------------------------------------------------------------------------- /packages/cli/src/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './client' 2 | export * from './types' 3 | export * from './integration-body' 4 | export * from './interface-body' 5 | export * from './bot-body' 6 | export * from './plugin-body' 7 | -------------------------------------------------------------------------------- /plugins/conversation-insights/src/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './after-incoming-message' 2 | export * from './after-outgoing-message' 3 | export * from './update-ai-insight' 4 | export * from './update-all-conversations' 5 | -------------------------------------------------------------------------------- /integrations/github/src/definitions/zui.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | const { z } = sdk 3 | 4 | export const multiLineString = z.string().displayAs({ id: 'text', params: { multiLine: true, growVertically: true } }) 5 | -------------------------------------------------------------------------------- /integrations/googlecalendar/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './actions' 2 | export * from './configuration' 3 | export * from './entities' 4 | export * from './events' 5 | export * from './secrets' 6 | export * from './states' 7 | -------------------------------------------------------------------------------- /packages/llmz/src/prompts/worker-mode/user.md: -------------------------------------------------------------------------------- 1 | ■■■recap■■■ 2 | 3 | Considering the **Instructions, Tools and Guidelines (Part 3)**, what should you do next? 4 | Remember to start your reply with ■fn_start followed by TSX code. 5 | -------------------------------------------------------------------------------- /packages/vai/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "strict": false 5 | }, 6 | "exclude": ["node_modules", "dist"], 7 | "include": ["src/**/*", "e2e/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/zai/e2e/mocks/server.ts: -------------------------------------------------------------------------------- 1 | import { setupServer } from 'msw/node' 2 | import { handlers } from './handlers' 3 | 4 | // Setup MSW server for Node.js environment (Vitest) 5 | export const server = setupServer(...handlers) 6 | -------------------------------------------------------------------------------- /plugins/logger/plugin.definition.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export default new sdk.PluginDefinition({ 4 | name: 'logger', 5 | version: '0.0.1', 6 | configuration: { schema: sdk.z.object({}) }, 7 | }) 8 | -------------------------------------------------------------------------------- /integrations/gmail/definitions/actions/types.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export type ActionDefinitions = NonNullable 4 | export type ActionDef = ActionDefinitions[string] 5 | -------------------------------------------------------------------------------- /packages/llmz/src/prompts/chat-mode/user.md: -------------------------------------------------------------------------------- 1 | ■■■recap■■■ 2 | 3 | Considering the **Instructions, Tools and Guidelines (Part 3)**, what should you do or reply next? 4 | Remember to start your reply with ■fn_start followed by TSX code. 5 | -------------------------------------------------------------------------------- /packages/llmz/src/prompts/worker-mode/user.md.ts: -------------------------------------------------------------------------------- 1 | export default "■■■recap■■■\n\nConsidering the **Instructions, Tools and Guidelines (Part 3)**, what should you do next?\nRemember to start your reply with ■fn_start followed by TSX code.\n" -------------------------------------------------------------------------------- /packages/sdk-addons/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "baseUrl": ".", 6 | "rootDir": "src" 7 | }, 8 | "include": ["src/**/*"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/src/utils/array-utils.ts: -------------------------------------------------------------------------------- 1 | export const safePush = (arr: T[] | undefined, ...values: T[]): T[] => (arr ? [...arr, ...values] : [...values]) 2 | 3 | export const unique = (arr: T[]): T[] => Array.from(new Set(arr)) 4 | -------------------------------------------------------------------------------- /packages/vai/src/llm.ts: -------------------------------------------------------------------------------- 1 | import { llm } from '@botpress/common' 2 | 3 | export type GenerateContentInput = llm.GenerateContentInput 4 | export type GenerateContentOutput = llm.GenerateContentOutput 5 | export type Model = llm.Model 6 | -------------------------------------------------------------------------------- /bots/bugbuster/src/services/issue-processor/issue-title-format-validator.ts: -------------------------------------------------------------------------------- 1 | const PATTERN = /^\w{0,} {0,}((\[.{1,}\])|(\(.{1,}\)))/ 2 | 3 | export function isIssueTitleFormatValid(title: string) { 4 | return !title.match(PATTERN) 5 | } 6 | -------------------------------------------------------------------------------- /integrations/gmail/src/utils/string-utils.ts: -------------------------------------------------------------------------------- 1 | export const encodeBase64URL = (str: string | Buffer) => Buffer.from(str).toString('base64url') 2 | 3 | export const decodeBase64URL = (str: string) => Buffer.from(str, 'base64url').toString() 4 | -------------------------------------------------------------------------------- /packages/chat-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": ["src/**/*", "openapi.ts", "package.json", "gen-api.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/client/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": "./src", 6 | "outDir": "./dist" 7 | }, 8 | "include": ["src/**/*"] 9 | } 10 | -------------------------------------------------------------------------------- /plugins/hitl/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /plugins/logger/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/airtable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/asana/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/browser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/calcom/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/calendly/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/cerebras/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/charts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/dalle/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/github/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/groq/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/hunter/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/intercom/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/line/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/linear/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/make/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/mintlify/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/monday/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/openai/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/resend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/sendgrid/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/stripe/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/sunco/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/teams/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/telegram/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/twilio/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/viber/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/vonage/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/webflow/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/webhook/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/workable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/zapier/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/zoho/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/cognitive/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": "./src", 6 | "outDir": "./dist" 7 | }, 8 | "include": ["src/**/*"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/llmz/src/prompts/chat-mode/user.md.ts: -------------------------------------------------------------------------------- 1 | export default "■■■recap■■■\n\nConsidering the **Instructions, Tools and Guidelines (Part 3)**, what should you do or reply next?\nRemember to start your reply with ■fn_start followed by TSX code.\n" -------------------------------------------------------------------------------- /packages/sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "noErrorTruncation": true 6 | }, 7 | "include": ["src/**/*", "*.ts"], 8 | "exclude": ["dist"] 9 | } 10 | -------------------------------------------------------------------------------- /plugins/analytics/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /plugins/knowledge/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /plugins/personality/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /plugins/synchronizer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | charset = utf-8 10 | -------------------------------------------------------------------------------- /integrations/anthropic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/chat/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "noErrorTruncation": true 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/feature-base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/fireworks-ai/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/freshchat/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/google-ai/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/instagram/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/loops/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { sendTransactionalEmail } from './send-transactional-email' 2 | import * as bp from '.botpress' 3 | 4 | export default { 5 | sendTransactionalEmail, 6 | } satisfies bp.IntegrationProps['actions'] 7 | -------------------------------------------------------------------------------- /integrations/mailchimp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/messenger/sandboxShareableIdExtract.vrl: -------------------------------------------------------------------------------- 1 | # https://developers.facebook.com/docs/messenger-platform/reference/webhook-events/messages#text-message 2 | body = parse_json!(.body) 3 | message = body.entry[0].messaging[0].message 4 | message.text -------------------------------------------------------------------------------- /integrations/pdf-generator/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/trello/src/string-utils.ts: -------------------------------------------------------------------------------- 1 | const _canonicalize = (identifier: string) => identifier.trim().toUpperCase().normalize() 2 | 3 | export const nameCompare = (name1: string, name2: string) => _canonicalize(name1) === _canonicalize(name2) 4 | -------------------------------------------------------------------------------- /packages/vai/build.ts: -------------------------------------------------------------------------------- 1 | import esbuild from 'esbuild' 2 | import glob from 'glob' 3 | 4 | const entryPoints = glob.sync('./src/**/*.ts') 5 | void esbuild.build({ 6 | entryPoints, 7 | platform: 'neutral', 8 | outdir: './dist', 9 | }) 10 | -------------------------------------------------------------------------------- /packages/zai/build.ts: -------------------------------------------------------------------------------- 1 | import esbuild from 'esbuild' 2 | import glob from 'glob' 3 | 4 | const entryPoints = glob.sync('./src/**/*.ts') 5 | void esbuild.build({ 6 | entryPoints, 7 | platform: 'neutral', 8 | outdir: './dist', 9 | }) 10 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/bigcommerce-sync/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/gmail/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './configuration' 2 | export * from './channels' 3 | export * from './user-tags' 4 | export * from './actions' 5 | export * from './events' 6 | export * from './states' 7 | export * from './secrets' 8 | -------------------------------------------------------------------------------- /integrations/gsheets/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './actions' 2 | export * from './channels' 3 | export * from './configuration' 4 | export * from './events' 5 | export * from './secrets' 6 | export * from './states' 7 | export * from './user-tags' 8 | -------------------------------------------------------------------------------- /integrations/slack/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './actions' 2 | export * from './channels' 3 | export * from './configuration' 4 | export * from './events' 5 | export * from './secrets' 6 | export * from './states' 7 | export * from './user-tags' 8 | -------------------------------------------------------------------------------- /packages/cli/src/code-generation/interface-implementation/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * An interface has no implementation, but its typings are used by the plugin and bot implementations. 3 | */ 4 | export { InterfaceTypingsModule } from './integration-typings' 5 | -------------------------------------------------------------------------------- /packages/common/src/text-to-image/types.ts: -------------------------------------------------------------------------------- 1 | import { z } from '@botpress/sdk' 2 | import * as schemas from './schemas' 3 | 4 | export type ImageModel = z.infer 5 | export type ImageModelDetails = Omit 6 | -------------------------------------------------------------------------------- /plugins/conversation-insights/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /bots/bugbuster/src/utils/promise-utils.ts: -------------------------------------------------------------------------------- 1 | export const some = async (xs: T[], fn: (x: T) => Promise): Promise => { 2 | for (const x of xs) { 3 | if (await fn(x)) { 4 | return true 5 | } 6 | } 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /integrations/zendesk-messaging-hitl/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/chat-client/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config' 2 | import { defineConfig } from 'vitest/config' 3 | 4 | export default defineConfig({ 5 | test: { 6 | testTimeout: 20_000, 7 | include: ['./e2e/**/*.test.ts'], 8 | }, 9 | }) 10 | -------------------------------------------------------------------------------- /packages/cli/templates/empty-plugin/plugin.definition.ts: -------------------------------------------------------------------------------- 1 | import { PluginDefinition } from '@botpress/sdk' 2 | import { pluginName } from './package.json' 3 | 4 | export default new PluginDefinition({ 5 | name: pluginName, 6 | version: '0.1.0', 7 | }) 8 | -------------------------------------------------------------------------------- /packages/vai/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsup' 2 | 3 | export default defineConfig({ 4 | entry: ['src/index.ts'], 5 | dts: true, 6 | outDir: 'dist', 7 | platform: 'neutral', 8 | clean: true, 9 | bundle: false, 10 | }) 11 | -------------------------------------------------------------------------------- /packages/zai/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsup' 2 | 3 | export default defineConfig({ 4 | entry: ['src/index.ts'], 5 | dts: true, 6 | outDir: 'dist', 7 | platform: 'neutral', 8 | clean: true, 9 | bundle: false, 10 | }) 11 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/workflow-started/process-queue.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export const handleEvent: bp.WorkflowHandlers['processQueue'] = async (props) => { 4 | await props.workflow.acknowledgeStartOfProcessing() 5 | } 6 | -------------------------------------------------------------------------------- /integrations/trello/definitions/schemas/index.ts: -------------------------------------------------------------------------------- 1 | export * from './actions/inputSchemas' 2 | export * from './actions/outputSchemas' 3 | export * from './configuration' 4 | export * from './entities' 5 | export * from './states' 6 | export * from './webhookEvents' 7 | -------------------------------------------------------------------------------- /packages/client/src/common/index.ts: -------------------------------------------------------------------------------- 1 | export * as consts from './consts' 2 | export * as types from './types' 3 | export * as config from './config' 4 | export * as listing from './listing' 5 | export * as axios from './axios' 6 | export * as errors from './errors' 7 | -------------------------------------------------------------------------------- /packages/common/src/html-dialogs/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ButtonDialogPage } from './pages/button-dialog' 2 | export { default as SelectDialogPage } from './pages/select-dialog' 3 | export { default as InputDialogPage } from './pages/input-dialog' 4 | -------------------------------------------------------------------------------- /packages/sdk/tsconfig.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": "src", 6 | "outDir": "dist" 7 | }, 8 | "include": ["src/**/*"], 9 | "exclude": ["dist"] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/hitl/src/hooks/before-incoming-event/index.ts: -------------------------------------------------------------------------------- 1 | export * as hitlAssigned from './hitl-assigned' 2 | export * as hitlStopped from './hitl-stopped' 3 | export * as humanAgentAssignedTimeout from './human-agent-assigned-timeout' 4 | export * as all from './all' 5 | -------------------------------------------------------------------------------- /integrations/docusign/src/docusign-api/types.ts: -------------------------------------------------------------------------------- 1 | export type GetAccessTokenParams = 2 | | { 3 | grant_type: 'authorization_code' 4 | code: string 5 | } 6 | | { 7 | grant_type: 'refresh_token' 8 | refresh_token: string 9 | } 10 | -------------------------------------------------------------------------------- /integrations/docusign/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist" 6 | }, 7 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "integration.definition.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /integrations/freshchat/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { startHitl, stopHitl, createUser } from './hitl' 2 | import * as bp from '.botpress' 3 | 4 | export const actions = { 5 | startHitl, 6 | stopHitl, 7 | createUser, 8 | } satisfies bp.IntegrationProps['actions'] 9 | -------------------------------------------------------------------------------- /integrations/resend/src/misc/ResendError.ts: -------------------------------------------------------------------------------- 1 | import { ErrorResponse } from 'resend' 2 | 3 | export class ResendError extends Error { 4 | public constructor(errorResp: ErrorResponse) { 5 | super(errorResp.message) 6 | this.name = errorResp.name 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /integrations/sendgrid/src/webhook-events/schemas/ignored.ts: -------------------------------------------------------------------------------- 1 | import { z } from '@botpress/sdk' 2 | 3 | export const ignoredWebhookSchemas = z 4 | .object({ 5 | // Add other events as necessary 6 | event: z.literal('dropped'), 7 | }) 8 | .passthrough() 9 | -------------------------------------------------------------------------------- /packages/common/src/conversation-transcript/index.ts: -------------------------------------------------------------------------------- 1 | export type { MessageFormatter } from './message-formatter' 2 | export { buildConversationTranscript, type TranscriptFormatter } from './conversation-transcript' 3 | export type { Message } from './message-types' 4 | -------------------------------------------------------------------------------- /packages/llmz/examples/04_chat_small_models/README.md: -------------------------------------------------------------------------------- 1 | ## Working with small models 2 | 3 | This example shows how LLMz works well even with small models, which usually don't perform well on complex tasks and tool calls. 4 | 5 | ## 🎥 Demo 6 | 7 | ![Demo](./demo.svg) 8 | -------------------------------------------------------------------------------- /packages/vai/ensure-env.cjs: -------------------------------------------------------------------------------- 1 | ;(function () { 2 | if (!process.env.CLOUD_BOT_ID) { 3 | throw new Error('Env: CLOUD_BOT_ID is required') 4 | } 5 | 6 | if (!process.env.CLOUD_PAT) { 7 | throw new Error('Env: CLOUD_PAT is required') 8 | } 9 | })() 10 | -------------------------------------------------------------------------------- /packages/zai/ensure-env.cjs: -------------------------------------------------------------------------------- 1 | ;(function () { 2 | if (!process.env.CLOUD_BOT_ID) { 3 | throw new Error('Env: CLOUD_BOT_ID is required') 4 | } 5 | 6 | if (!process.env.CLOUD_PAT) { 7 | throw new Error('Env: CLOUD_PAT is required') 8 | } 9 | })() 10 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * as onEvent from './on-event' 2 | export * as onWorkflowStart from './workflow-started' 3 | export * as onWorkflowContinue from './workflow-continued' 4 | export * as onWorkflowTimeout from './workflow-timed-out' 5 | -------------------------------------------------------------------------------- /plugins/synchronizer/src/vanilla-client.ts: -------------------------------------------------------------------------------- 1 | import * as client from '@botpress/client' 2 | import * as bp from '.botpress' 3 | 4 | export * from '@botpress/client' 5 | export const clientFrom = (client: bp.Client): client.Client => { 6 | return client._inner 7 | } 8 | -------------------------------------------------------------------------------- /integrations/messenger/src/channels/index.ts: -------------------------------------------------------------------------------- 1 | import channel from './channel' 2 | import commentReplies from './comment-replies' 3 | import * as bp from '.botpress' 4 | 5 | export default { 6 | channel, 7 | commentReplies, 8 | } satisfies bp.IntegrationProps['channels'] 9 | -------------------------------------------------------------------------------- /integrations/messenger/src/webhook/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export { handler as oauthHandler } from './oauth' 2 | export { handler as messagingHandler } from './message' 3 | export { handler as feedHandler } from './feed' 4 | export { handler as sandboxHandler } from './sandbox' 5 | -------------------------------------------------------------------------------- /integrations/notion/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export { actions } from './actions' 2 | export { configuration, configurations, identifier } from './configuration' 3 | export { secrets } from './secrets' 4 | export { states } from './states' 5 | export { user } from './user-tags' 6 | -------------------------------------------------------------------------------- /integrations/notion/src/webhook-events/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './database-deleted' 2 | export * from './oauth-callback' 3 | export * from './page-created' 4 | export * from './page-deleted' 5 | export * from './page-moved' 6 | export * from './webhook-verification' 7 | -------------------------------------------------------------------------------- /packages/common/src/oauth-wizard/consts.ts: -------------------------------------------------------------------------------- 1 | export const DISABLE_INTERSTITIAL_HEADER = { 'x-bp-disable-interstitial': 'true' } as const 2 | export const BASE_WIZARD_PATH = '/oauth/wizard/' 3 | export const CHOICE_PARAM = 'wizchoice' 4 | export const INPUT_PARAM = 'wizinput' 5 | -------------------------------------------------------------------------------- /packages/sdk/src/utils/function-utils.ts: -------------------------------------------------------------------------------- 1 | export type Func = (...args: X) => Y 2 | 3 | export const setName = (f: Func, name: string): Func => { 4 | Object.defineProperty(f, 'name', { value: name }) 5 | return f 6 | } 7 | -------------------------------------------------------------------------------- /integrations/chat/src/id-store/errors.ts: -------------------------------------------------------------------------------- 1 | import * as errors from '../gen/errors' 2 | 3 | export class IdAlreadyAssignedError extends errors.InternalError { 4 | public constructor(id: string) { 5 | super(`The id "${id}" is already assigned to another value`) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /integrations/teams/src/markdown/turndown-rules/common.ts: -------------------------------------------------------------------------------- 1 | export const isElementOfType = ( 2 | el: Element, 3 | tagName: K 4 | ): el is HTMLElementTagNameMap[K] => { 5 | return el.tagName.toLowerCase() === tagName.toLowerCase() 6 | } 7 | -------------------------------------------------------------------------------- /integrations/todoist/src/todoist-api/mapping/common/math-utils.ts: -------------------------------------------------------------------------------- 1 | export const reverseScale = (value: number, min: number, max: number) => max - _clamp(value, min, max) + min 2 | 3 | const _clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value)) 4 | -------------------------------------------------------------------------------- /packages/sdk/src/public-consts.ts: -------------------------------------------------------------------------------- 1 | // This file contains constants that are exported for public use. 2 | 3 | export const WELL_KNOWN_ATTRIBUTES = { 4 | HIDDEN_IN_STUDIO: { bpActionHiddenInStudio: 'true' }, 5 | AWAIT_RETURN: { bpActionAwaitReturn: 'true' }, 6 | } as const 7 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/workflow-timed-out/build-queue.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export const handleEvent: bp.WorkflowHandlers['buildQueue'] = async (props) => { 4 | await props.workflow.setFailed({ failureReason: 'Workflow timed out' }) 5 | } 6 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/workflow-timed-out/process-queue.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export const handleEvent: bp.WorkflowHandlers['processQueue'] = async (props) => { 4 | await props.workflow.setFailed({ failureReason: 'Workflow timed out' }) 5 | } 6 | -------------------------------------------------------------------------------- /plugins/hitl/src/consts.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export const SUPPORTED_MESSAGE_TYPES = [ 4 | 'text', 5 | 'image', 6 | 'video', 7 | 'audio', 8 | 'file', 9 | 'bloc', 10 | ] as const satisfies (keyof typeof sdk.messages.defaults)[] 11 | -------------------------------------------------------------------------------- /integrations/gmail/definitions/user-tags.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export const user = { 4 | tags: { 5 | id: { title: 'Email address', description: 'The email address of the user' }, 6 | }, 7 | } as const satisfies sdk.IntegrationDefinitionProps['user'] 8 | -------------------------------------------------------------------------------- /integrations/instagram/src/channels/index.ts: -------------------------------------------------------------------------------- 1 | import { channel } from './channel' 2 | import { commentReplies } from './comment-replies' 3 | import * as bp from '.botpress' 4 | 5 | export default { 6 | channel, 7 | commentReplies, 8 | } satisfies bp.IntegrationProps['channels'] 9 | -------------------------------------------------------------------------------- /integrations/zendesk-messaging-hitl/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { startHitl, stopHitl, createUser } from './hitl' 2 | import * as bp from '.botpress' 3 | 4 | export const actions = { 5 | startHitl, 6 | stopHitl, 7 | createUser, 8 | } satisfies bp.IntegrationProps['actions'] 9 | -------------------------------------------------------------------------------- /integrations/zoho/src/setup/handler.ts: -------------------------------------------------------------------------------- 1 | import type { Handler } from '../misc/types' 2 | 3 | export const handler: Handler = async ({ req }) => { 4 | if (!req.body) { 5 | console.warn('Handler received an empty body') 6 | return {} 7 | } 8 | return {} 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk-addons/readme.md: -------------------------------------------------------------------------------- 1 | # SDK Addons 2 | 3 | This repository contains common code shared by all botpress-owned integrations. It is not meant to be used by our community, but it can be used as a reference for building your own tooling to interact with the Botpress SDK and API. 4 | -------------------------------------------------------------------------------- /integrations/dropbox/definitions/secrets.ts: -------------------------------------------------------------------------------- 1 | import sdk from '@botpress/sdk' 2 | import { sentry as sentryHelpers } from '@botpress/sdk-addons' 3 | 4 | export const secrets = { 5 | ...sentryHelpers.COMMON_SECRET_NAMES, 6 | } as const satisfies sdk.IntegrationDefinitionProps['secrets'] 7 | -------------------------------------------------------------------------------- /integrations/messenger/sandboxLinkTemplate.vrl: -------------------------------------------------------------------------------- 1 | env = to_string!(.env) 2 | shareableId = to_string!(.shareableId) 3 | 4 | pageId = if env == "production" { 5 | "647427158463603" 6 | } else { 7 | "757871147405221" 8 | } 9 | 10 | "https://m.me/{{ pageId }}?text={{ shareableId }}" -------------------------------------------------------------------------------- /integrations/todoist/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './actions' 2 | export * from './channels' 3 | export * from './configuration' 4 | export * from './entities' 5 | export * from './events' 6 | export * from './secrets' 7 | export * from './states' 8 | export * from './user-tags' 9 | -------------------------------------------------------------------------------- /integrations/zoho/src/setup/unregister.ts: -------------------------------------------------------------------------------- 1 | import type { UnregisterFunction } from '../misc/types' 2 | 3 | export const unregister: UnregisterFunction = async ({ logger }) => { 4 | logger.forBot().info('Unregister process for Zoho integration invoked. No resources to clean up.') 5 | } 6 | -------------------------------------------------------------------------------- /integrations/docusign/src/types.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export type Result = { success: true; data: T } | { success: false; error: Error } 4 | 5 | export type CommonHandlerProps = { 6 | ctx: bp.Context 7 | client: bp.Client 8 | logger: bp.Logger 9 | } 10 | -------------------------------------------------------------------------------- /packages/chat-client/src/jsonwebtoken.ts: -------------------------------------------------------------------------------- 1 | import { isBrowser } from 'browser-or-node' 2 | import type * as jwt from 'jsonwebtoken' 3 | 4 | const requireJwt = (): typeof jwt => require('jsonwebtoken') 5 | const packageModule = isBrowser ? null : requireJwt() 6 | export default packageModule 7 | -------------------------------------------------------------------------------- /packages/llmz/.npmignore: -------------------------------------------------------------------------------- 1 | tsup.config.ts 2 | 3 | node_modules/ 4 | scripts/ 5 | .turbo 6 | 7 | *.test.ts 8 | *.test.js 9 | *.tgz 10 | 11 | tsconfig.json 12 | vitest.*.ts 13 | 14 | .env 15 | .env.local 16 | 17 | src 18 | scripts 19 | TODO 20 | 21 | examples/ 22 | e2e/ 23 | scripts/ -------------------------------------------------------------------------------- /packages/sdk/src/utils/error-utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility to throw an error in ternary or nullish coalescing expressions 3 | */ 4 | export const throwError = (thrown: string | Error): never => { 5 | const error = thrown instanceof Error ? thrown : new Error(thrown) 6 | throw error 7 | } 8 | -------------------------------------------------------------------------------- /integrations/instagram/sandboxShareableIdExtract.vrl: -------------------------------------------------------------------------------- 1 | # https://developers.facebook.com/docs/instagram-platform/webhooks/examples#message 2 | body = parse_json!(.body) 3 | message = body.entry[0].messaging[0].message 4 | if to_bool!(message.is_echo) { 5 | null 6 | } else { 7 | message.text 8 | } -------------------------------------------------------------------------------- /integrations/trello/src/actions/implementations/interfaces/boardList.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../../action-wrapper' 2 | 3 | export const boardList = wrapAction({ actionName: 'boardList' }, async ({ trelloClient }) => ({ 4 | items: await trelloClient.getAllBoards(), 5 | meta: {}, 6 | })) 7 | -------------------------------------------------------------------------------- /integrations/whatsapp/src/misc/constants.ts: -------------------------------------------------------------------------------- 1 | export namespace WHATSAPP { 2 | export const API_VERSION = 'v22.0' 3 | export const API_URL = `https://graph.facebook.com/${API_VERSION}` 4 | 5 | export const INTERACTIVE_MAX_BUTTONS_COUNT = 3 6 | export const BUTTON_LABEL_MAX_LENGTH = 20 7 | } 8 | -------------------------------------------------------------------------------- /integrations/zendesk-messaging-hitl/src/setup/index.ts: -------------------------------------------------------------------------------- 1 | export { register } from './register' 2 | export { unregister } from './unregister' 3 | export { 4 | getBotpressIntegrationDisplayName, 5 | getSwitchboardIntegrationId, 6 | getAgentWorkspaceSwitchboardIntegrationId, 7 | } from './util' 8 | -------------------------------------------------------------------------------- /packages/llmz/examples/06_chat_confirm_tool/README.md: -------------------------------------------------------------------------------- 1 | ## Impossible to Jailbreak 2 | 3 | In this demo, we show how we can make tools virtually impossible to jailbreak with programmatic protection against unwanted executions and prompt injections. 4 | 5 | ## 🎥 Demo 6 | 7 | ![Demo](./demo.svg) 8 | -------------------------------------------------------------------------------- /packages/llmz/examples/07_chat_guardrails/README.md: -------------------------------------------------------------------------------- 1 | ## Guardrails 2 | 3 | This demo shows how to implement robust guardrails that runs before any code or answers are executed. 4 | In this example, we have a guardrail against "speaking in french". 5 | 6 | ## 🎥 Demo 7 | 8 | ![Demo](./demo.svg) 9 | -------------------------------------------------------------------------------- /plugins/hitl/src/hooks/consts.ts: -------------------------------------------------------------------------------- 1 | export * from '../consts' 2 | 3 | export const LET_BOT_HANDLE_EVENT = { stop: false } as const // let the event / message propagate to the bot 4 | export const STOP_EVENT_HANDLING = { stop: true } as const // prevent the event / message from propagating to the bot 5 | -------------------------------------------------------------------------------- /integrations/charts/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /integrations/clickup/src/actions/deleteTask.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from './action-wrapper' 2 | 3 | export const deleteTask = wrapAction( 4 | { actionName: 'deleteTask', errorMessage: 'Failed to delete the task' }, 5 | async ({ clickupClient }, input) => await clickupClient.deleteTask(input) 6 | ) 7 | -------------------------------------------------------------------------------- /integrations/monday/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as actions from 'src/actions' 2 | import * as bp from '.botpress' 3 | 4 | export default new bp.Integration({ 5 | register: async () => {}, 6 | unregister: async () => {}, 7 | actions, 8 | channels: {}, 9 | handler: async () => {}, 10 | }) 11 | -------------------------------------------------------------------------------- /integrations/trello/src/trello-api/error-handling/error-handler-decorator.ts: -------------------------------------------------------------------------------- 1 | import { createErrorHandlingDecorator } from '@botpress/common' 2 | import { wrapAsyncFnWithTryCatch } from './error-redactor' 3 | 4 | export const handleErrorsDecorator = createErrorHandlingDecorator(wrapAsyncFnWithTryCatch) 5 | -------------------------------------------------------------------------------- /integrations/attio/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import { register, unregister, handler } from './setup' 3 | import * as bp from '.botpress' 4 | 5 | export default new bp.Integration({ 6 | register, 7 | unregister, 8 | actions, 9 | channels: {}, 10 | handler, 11 | }) 12 | -------------------------------------------------------------------------------- /integrations/stripe/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import { register, unregister, handler } from './setup' 3 | import * as bp from '.botpress' 4 | 5 | export default new bp.Integration({ 6 | register, 7 | unregister, 8 | actions, 9 | handler, 10 | channels: {}, 11 | }) 12 | -------------------------------------------------------------------------------- /integrations/trello/src/actions/implementations/getAllBoards.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getAllBoards = wrapAction({ actionName: 'getAllBoards' }, async ({ trelloClient }) => { 4 | const boards = await trelloClient.getAllBoards() 5 | return { boards } 6 | }) 7 | -------------------------------------------------------------------------------- /integrations/zoho/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import { register, unregister, handler } from './setup' 3 | import * as bp from '.botpress' 4 | 5 | export default new bp.Integration({ 6 | register, 7 | unregister, 8 | actions, 9 | handler, 10 | channels: {}, 11 | }) 12 | -------------------------------------------------------------------------------- /packages/sdk/src/log.ts: -------------------------------------------------------------------------------- 1 | export type Logger = { 2 | debug(message: string, metadata?: unknown): void 3 | info(message: string, metadata?: unknown): void 4 | warn(message: string, metadata?: unknown): void 5 | error(message: string, metadata?: unknown): void 6 | } 7 | export const log: Logger = console 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | bp_modules 3 | dist 4 | gen 5 | local/data 6 | .DS_Store 7 | *.tsbuildinfo 8 | __snapshots__ 9 | .ignore.me.* 10 | .env* 11 | .botpress 12 | .botpresshome 13 | .botpresshome.* 14 | .turbo 15 | .genenv/ 16 | .genenv.* 17 | tilt_config.json 18 | /.idea 19 | hubspot.config.yml 20 | -------------------------------------------------------------------------------- /integrations/asana/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { addCommentToTask } from './add-comment-to-task' 2 | import { createTask } from './create-task' 3 | import { findUser } from './find-user' 4 | import { updateTask } from './update-task' 5 | 6 | export default { createTask, updateTask, findUser, addCommentToTask } 7 | -------------------------------------------------------------------------------- /integrations/github/linkTemplate.vrl: -------------------------------------------------------------------------------- 1 | webhookId = to_string!(.webhookId) 2 | env = to_string!(.env) 3 | 4 | appName = "botpress-staging" 5 | 6 | if env == "production" { 7 | appName = "botpress" 8 | } 9 | 10 | "https://github.com/apps/{{ appName }}/installations/select_target?state={{ webhookId }}" 11 | -------------------------------------------------------------------------------- /integrations/linear/src/setup.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | export const register: bp.IntegrationProps['register'] = async () => { 4 | // nothing to register 5 | } 6 | 7 | export const unregister: bp.IntegrationProps['unregister'] = async () => { 8 | // nothing to unregister 9 | } 10 | -------------------------------------------------------------------------------- /integrations/make/hub.md: -------------------------------------------------------------------------------- 1 | # Make (Deprecated) 2 | 3 | **Note:** This integration is deprecated in favor of [this one](https://app.botpress.cloud/hub/integrations/intver_01HXA4418H5ANXPRVQZE62FPN4), maintained by _[Decay](https://app.botpress.cloud/decay)_. We encourage you to install it for better maintenance. 4 | -------------------------------------------------------------------------------- /integrations/trello/definitions/configuration.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationDefinitionProps } from '@botpress/sdk' 2 | import { TrelloConfigSchema } from './schemas' 3 | 4 | export const configuration = { 5 | schema: TrelloConfigSchema, 6 | } as const satisfies NonNullable 7 | -------------------------------------------------------------------------------- /integrations/whatsapp/sandboxLinkTemplate.vrl: -------------------------------------------------------------------------------- 1 | env = to_string!(.env) 2 | shareableId = to_string!(.shareableId) 3 | 4 | phoneNumber = if env == "production" { 5 | "15817019840" 6 | } else { 7 | "15817021047" 8 | } 9 | 10 | "https://api.whatsapp.com/send?phone={{ phoneNumber }}&text={{ shareableId }}" -------------------------------------------------------------------------------- /packages/chat-client/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "rootDir": "./src", 6 | "outDir": "./dist", 7 | "emitDeclarationOnly": true, 8 | "declaration": true 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /bots/bugbuster/src/handlers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './github-issue-opened' 2 | export * from './linear-issue-updated' 3 | export * from './linear-issue-created' 4 | export * from './message-created' 5 | export * from './lint-all' 6 | export * from './time-to-lint-all' 7 | export * from './time-to-check-issues-state' 8 | -------------------------------------------------------------------------------- /bots/echo/bot.definition.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | import chat from './bp_modules/chat' 3 | 4 | export default new sdk.BotDefinition({ 5 | integrations: {}, 6 | states: {}, 7 | events: {}, 8 | recurringEvents: {}, 9 | }).addIntegration(chat, { enabled: true, configuration: {} }) 10 | -------------------------------------------------------------------------------- /integrations/mintlify/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import { register, unregister } from './setup' 3 | import * as bp from '.botpress' 4 | 5 | export default new bp.Integration({ 6 | register, 7 | unregister, 8 | actions, 9 | channels: {}, 10 | handler: async () => {}, 11 | }) 12 | -------------------------------------------------------------------------------- /packages/sdk-addons/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@botpress/sdk-addons", 3 | "private": true, 4 | "main": "./src/index.ts", 5 | "scripts": { 6 | "check:type": "tsc --noEmit" 7 | }, 8 | "dependencies": { 9 | "@botpress/sdk": "workspace:*", 10 | "@sentry/node": "^7.53.1" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { configDefaults, defineConfig } from 'vitest/config' 2 | 3 | export default defineConfig({ 4 | test: { 5 | exclude: [...configDefaults.exclude, '**/*.utils.test.ts', '**/e2e/**', '**/llmz/**'], 6 | chaiConfig: { 7 | truncateThreshold: 200, 8 | }, 9 | }, 10 | }) 11 | -------------------------------------------------------------------------------- /integrations/asana/src/setup/handler.ts: -------------------------------------------------------------------------------- 1 | import type { Handler } from '../misc/types' 2 | 3 | class NotImplementedError extends Error { 4 | public constructor() { 5 | super('Not implemented') 6 | } 7 | } 8 | 9 | export const handler: Handler = async () => { 10 | throw new NotImplementedError() 11 | } 12 | -------------------------------------------------------------------------------- /integrations/messenger/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "jsxImportSource": "preact", 6 | "baseUrl": ".", 7 | "outDir": "dist" 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/trello/definitions/index.ts: -------------------------------------------------------------------------------- 1 | export { actions } from './actions' 2 | export { channels } from './channels' 3 | export { configuration } from './configuration' 4 | export { events } from './events' 5 | export { states } from './states' 6 | export { user } from './user' 7 | export { entities } from './entities' 8 | -------------------------------------------------------------------------------- /integrations/trello/src/actions/implementations/getCardById.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getCardById = wrapAction({ actionName: 'getCardById' }, async ({ trelloClient }, { cardId }) => { 4 | const card = await trelloClient.getCardById({ cardId }) 5 | return { card } 6 | }) 7 | -------------------------------------------------------------------------------- /packages/chat-api/src/operations/auth.ts: -------------------------------------------------------------------------------- 1 | import { Parameter } from '@bpinternal/opapi' 2 | 3 | export const authHeaders = { 4 | 'x-user-key': { 5 | in: 'header', 6 | type: 'string', 7 | description: 'Authentication Key', 8 | required: true, 9 | }, 10 | } satisfies Record 11 | -------------------------------------------------------------------------------- /plugins/analytics/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as bp from '.botpress' 2 | 3 | const plugin = new bp.Plugin({ 4 | actions: { 5 | track: async ({ input, client }) => { 6 | return await client.trackAnalytics({ name: input.name, count: input.count }) 7 | }, 8 | }, 9 | }) 10 | 11 | export default plugin 12 | -------------------------------------------------------------------------------- /integrations/notion/definitions/user-tags.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | 3 | export const user = { 4 | tags: { 5 | id: { 6 | title: 'Notion User ID', 7 | description: 'The ID of the user on Notion.', 8 | }, 9 | }, 10 | } as const satisfies sdk.IntegrationDefinitionProps['user'] 11 | -------------------------------------------------------------------------------- /integrations/trello/src/actions/implementations/getBoardById.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getBoardById = wrapAction({ actionName: 'getBoardById' }, async ({ trelloClient }, { boardId }) => { 4 | const board = await trelloClient.getBoardById({ boardId }) 5 | return { board } 6 | }) 7 | -------------------------------------------------------------------------------- /integrations/trello/src/actions/implementations/getListById.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getListById = wrapAction({ actionName: 'getListById' }, async ({ trelloClient }, { listId }) => { 4 | const list = await trelloClient.getListById({ listId }) 5 | 6 | return { list } 7 | }) 8 | -------------------------------------------------------------------------------- /integrations/zendesk/icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/cli/src/root.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Important: 3 | * 4 | * This file must be kept at the root of the src directory (and dist directory when built) 5 | */ 6 | import * as utils from './utils' 7 | 8 | const SRC_DIR = __dirname as utils.path.AbsolutePath 9 | export const CLI_ROOT_DIR = utils.path.join(SRC_DIR, '..') 10 | -------------------------------------------------------------------------------- /packages/cognitive/src/index.ts: -------------------------------------------------------------------------------- 1 | export { Events, BotpressClientLike } from './types' 2 | export * from './client' 3 | export { ModelPreferences, ModelProvider, RemoteModelProvider, Model } from './models' 4 | export { type GenerateContentInput, type GenerateContentOutput } from './schemas.gen' 5 | export * from './cognitive-v2' 6 | -------------------------------------------------------------------------------- /packages/llmz/examples/.env.example: -------------------------------------------------------------------------------- 1 | # A Botpress Bot ID that belongs to you. 2 | # Can be any bot, as long as it has 'openai' integration and 'browser' integration installed 3 | CLOUD_BOT_ID=your_bot_id 4 | 5 | # Your Personal Access Token for Botpress, you can create one from the Botpress dashboard 6 | CLOUD_TOKEN=pat_.... 7 | -------------------------------------------------------------------------------- /packages/sdk/readme.md: -------------------------------------------------------------------------------- 1 | # Botpress SDK 2 | 3 | Official Botpress SDK for TypeScript. Made for building bots, plugins and integrations as code. 4 | 5 | ## Installation 6 | 7 | ```bash 8 | npm install --save @botpress/sdk # for npm 9 | yarn add @botpress/sdk # for yarn 10 | pnpm add @botpress/sdk # for pnpm 11 | ``` 12 | -------------------------------------------------------------------------------- /bots/clog/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/echo/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/sheetzy/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/sinlin/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/attio/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/clickup/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/dropbox/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/email/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/gsheets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/hubspot/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/instagram/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { getOrCreateConversationDm } from './proactive-conversation' 2 | import { getOrCreateUser } from './proactive-user' 3 | import * as bp from '.botpress' 4 | 5 | export default { 6 | getOrCreateUser, 7 | getOrCreateConversationDm, 8 | } satisfies bp.IntegrationProps['actions'] 9 | -------------------------------------------------------------------------------- /integrations/notion/src/actions/delete-block.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const deleteBlock = wrapAction( 4 | { actionName: 'deleteBlock', errorMessage: 'Failed to delete block' }, 5 | async ({ notionClient }, { blockId }) => { 6 | await notionClient.deleteBlock({ blockId }) 7 | } 8 | ) 9 | -------------------------------------------------------------------------------- /integrations/notion/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/slack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/todoist/definitions/user-tags.ts: -------------------------------------------------------------------------------- 1 | import sdk from '@botpress/sdk' 2 | 3 | export const user = { 4 | tags: { 5 | id: { 6 | title: 'Todoist User ID', 7 | description: 'The unique ID of the user on Todoist', 8 | }, 9 | }, 10 | } as const satisfies sdk.IntegrationDefinitionProps['user'] 11 | -------------------------------------------------------------------------------- /integrations/todoist/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/cli/build.ts: -------------------------------------------------------------------------------- 1 | import esbuild from 'esbuild' 2 | import glob from 'glob' 3 | 4 | const entryPoints = glob.sync('./src/**/*.ts') 5 | void esbuild.build({ 6 | entryPoints, 7 | bundle: false, 8 | platform: 'node', 9 | format: 'cjs', 10 | external: [], 11 | outdir: './dist', 12 | sourcemap: true, 13 | }) 14 | -------------------------------------------------------------------------------- /packages/client/src/common/errors.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import * as errors from '../errors' 3 | 4 | export const toApiError = (err: unknown): Error => { 5 | if (axios.isAxiosError(err) && err.response?.data) { 6 | return errors.errorFrom(err.response.data) 7 | } 8 | return errors.errorFrom(err) 9 | } 10 | -------------------------------------------------------------------------------- /packages/sdk/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/vai/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/zai/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /plugins/hitl/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/bugbuster/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/doppel-doer/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/hello-world/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/hit-looper/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/knowledgiani/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/notionaut/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/synchrotron/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/asana/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/chat/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/confluence/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/dalle/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/dalle/hub.md: -------------------------------------------------------------------------------- 1 | # Dalle (Deprecated) 2 | 3 | **Note:** This integration is deprecated in favor of [this one](https://app.botpress.cloud/hub/integrations/intver_01HX9TS0ZX98NAE1AR3D2QBPKM), maintained by _[Simply Great Bots](https://app.botpress.cloud/simplygreatbots)_. We encourage you to install it for better maintenance. 4 | -------------------------------------------------------------------------------- /integrations/email/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/gmail/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/groq/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/intercom/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | import { getOrCreateConversation } from './proactive-conversation' 2 | import { getOrCreateUser } from './proactive-user' 3 | import * as bp from '.botpress' 4 | 5 | export const actions = { 6 | getOrCreateConversation, 7 | getOrCreateUser, 8 | } satisfies bp.IntegrationProps['actions'] 9 | -------------------------------------------------------------------------------- /integrations/line/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/make/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/notion/src/actions/get-db.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getDb = wrapAction( 4 | { actionName: 'getDb', errorMessage: 'Failed to fetch database' }, 5 | async ({ notionClient }, { databaseId }) => { 6 | return await notionClient.getDbWithStructure({ databaseId }) 7 | } 8 | ) 9 | -------------------------------------------------------------------------------- /integrations/slack/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/sunco/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/teams/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/viber/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/zoho/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/hitl/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/llm/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/chat-api/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/client/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/cognitive/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/common/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/sdk/src/common/types.ts: -------------------------------------------------------------------------------- 1 | import * as typeUtils from '../utils/type-utils' 2 | 3 | // TODO: find a way to make ToTags evaluate to Record when TTags is never 4 | 5 | export type ToTags = typeUtils.Cast< 6 | Partial>, 7 | Record 8 | > 9 | -------------------------------------------------------------------------------- /packages/zai/src/adapters/memory.ts: -------------------------------------------------------------------------------- 1 | import { Adapter } from './adapter' 2 | 3 | export class MemoryAdapter extends Adapter { 4 | public constructor(public examples: any[]) { 5 | super() 6 | } 7 | 8 | public async getExamples() { 9 | return this.examples 10 | } 11 | 12 | public async saveExample() {} 13 | } 14 | -------------------------------------------------------------------------------- /plugins/analytics/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /plugins/knowledge/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /plugins/logger/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/airtable/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/anthropic/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/browser/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/calcom/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/calendly/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/calendly/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import { handler } from './handler' 3 | import { register, unregister } from './setup' 4 | import * as bp from '.botpress' 5 | 6 | export default new bp.Integration({ 7 | register, 8 | unregister, 9 | actions, 10 | channels: {}, 11 | handler, 12 | }) 13 | -------------------------------------------------------------------------------- /integrations/calendly/src/types.ts: -------------------------------------------------------------------------------- 1 | import type * as bp from '.botpress' 2 | 3 | export type Supplier = () => T 4 | 5 | export type Result = { success: true; data: T } | { success: false; error: Error } 6 | 7 | export type CommonHandlerProps = { 8 | ctx: bp.Context 9 | client: bp.Client 10 | logger: bp.Logger 11 | } 12 | -------------------------------------------------------------------------------- /integrations/cerebras/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/charts/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/charts/src/index.ts: -------------------------------------------------------------------------------- 1 | import { actionImplementations } from './actions' 2 | 3 | import * as bp from '.botpress' 4 | 5 | export default new bp.Integration({ 6 | register: async () => {}, 7 | unregister: async () => {}, 8 | actions: actionImplementations, 9 | channels: {}, 10 | handler: async () => {}, 11 | }) 12 | -------------------------------------------------------------------------------- /integrations/clickup/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/confluence/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/docusign/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/docusign/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import { handler } from './handler' 3 | import { register, unregister } from './setup' 4 | import * as bp from '.botpress' 5 | 6 | export default new bp.Integration({ 7 | register, 8 | unregister, 9 | actions, 10 | channels: {}, 11 | handler, 12 | }) 13 | -------------------------------------------------------------------------------- /integrations/dropbox/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/freshchat/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/github/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/google-ai/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/googlecalendar/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/gsheets/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/hubspot/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/hubspot/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import { register, unregister } from './setup' 3 | import { handler } from './webhook' 4 | import * as bp from '.botpress' 5 | 6 | export default new bp.Integration({ 7 | register, 8 | unregister, 9 | actions, 10 | channels: {}, 11 | handler, 12 | }) 13 | -------------------------------------------------------------------------------- /integrations/instagram/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/intercom/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/linear/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/mailchimp/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/messenger/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/monday/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/notion/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/openai/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/resend/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/resend/src/misc/markdown-utils.ts: -------------------------------------------------------------------------------- 1 | import MarkdownIt from 'markdown-it' 2 | 3 | const md = MarkdownIt({ 4 | xhtmlOut: true, 5 | linkify: true, 6 | breaks: true, 7 | typographer: true, 8 | }).disable('table') 9 | 10 | export function markdownToHtml(markdown: string) { 11 | return md.render(markdown) 12 | } 13 | -------------------------------------------------------------------------------- /integrations/sendgrid/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/sendgrid/src/misc/markdown-utils.ts: -------------------------------------------------------------------------------- 1 | import MarkdownIt from 'markdown-it' 2 | 3 | const md = MarkdownIt({ 4 | xhtmlOut: true, 5 | linkify: true, 6 | breaks: true, 7 | typographer: true, 8 | }).disable('table') 9 | 10 | export function markdownToHtml(markdown: string) { 11 | return md.render(markdown) 12 | } 13 | -------------------------------------------------------------------------------- /integrations/stripe/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/telegram/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/todoist/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/trello/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/trello/src/actions/implementations/getAllCardMembers.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getAllCardMembers = wrapAction( 4 | { actionName: 'getAllCardMembers' }, 5 | async ({ trelloClient }, { cardId }) => ({ 6 | members: await trelloClient.getCardMembers({ cardId }), 7 | }) 8 | ) 9 | -------------------------------------------------------------------------------- /integrations/twilio/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/vonage/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/webflow/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/webhook/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/whatsapp/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/workable/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/zapier/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/zendesk/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/creatable/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/deletable/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/listable/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/readable/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/updatable/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/chat-client/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/cli/templates/empty-integration/integration.definition.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationDefinition } from '@botpress/sdk' 2 | import { integrationName } from './package.json' 3 | 4 | export default new IntegrationDefinition({ 5 | name: integrationName, 6 | version: '0.1.0', 7 | readme: 'hub.md', 8 | icon: 'icon.svg', 9 | }) 10 | -------------------------------------------------------------------------------- /packages/cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "esModuleInterop": true, 7 | "sourceMap": true 8 | }, 9 | "include": ["./src/**/*", "./e2e/**/*", "*.ts"], 10 | "exclude": ["./templates/**", "./e2e/fixtures/**"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/sdk-addons/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/zai/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "strict": false, 6 | "paths": { 7 | "@botpress/zai": ["./src/zai.ts"] 8 | } 9 | }, 10 | "exclude": ["node_modules", "dist"], 11 | "include": ["src/**/*", "e2e/**/*", "*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/hooks/on-event/index.ts: -------------------------------------------------------------------------------- 1 | export * as fileCreated from './file-created' 2 | export * as fileDeleted from './file-deleted' 3 | export * as fileUpdated from './file-updated' 4 | export * as folderDeletedRecursive from './folder-deleted-recursive' 5 | export * as aggregateFileChanges from './aggregate-file-changes' 6 | -------------------------------------------------------------------------------- /plugins/personality/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /plugins/synchronizer/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/feature-base/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/fireworks-ai/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/googlecalendar/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/googledrive/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/intercom/linkTemplate.vrl: -------------------------------------------------------------------------------- 1 | env = to_string!(.env) 2 | webhookId = to_string!(.webhookId) 3 | 4 | clientId = "5eba547d-60b2-4ca6-91bf-053a37bd7710" 5 | 6 | if env == "production" { 7 | clientId = "f153fcea-a0db-48a0-8575-bbd2a7cfc05e" 8 | } 9 | 10 | "https://app.intercom.com/oauth?client_id={{ clientId }}&state={{ webhookId }}" -------------------------------------------------------------------------------- /integrations/pdf-generator/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/teams/src/markdown/turndown-rules/custom/underline.ts: -------------------------------------------------------------------------------- 1 | import TurndownService from 'turndown' 2 | 3 | export const stripUnderline = (turndownService: TurndownService) => { 4 | turndownService.addRule('underline', { 5 | filter: ['u'], 6 | replacement(content) { 7 | return content 8 | }, 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /integrations/zendesk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "jsxImportSource": "preact", 6 | "baseUrl": ".", 7 | "outDir": "dist", 8 | "types": ["preact"] 9 | }, 10 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /interfaces/files-readonly/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/proactive-user/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/speech-to-text/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/text-to-image/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /interfaces/typing-indicator/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /packages/cli/e2e/retry.ts: -------------------------------------------------------------------------------- 1 | import * as client from '@botpress/client' 2 | 3 | export const config: client.RetryConfig = { 4 | retries: 3, 5 | retryCondition: (err) => 6 | client.axiosRetry.isNetworkOrIdempotentRequestError(err) || [429, 502].includes(err.response?.status ?? 0), 7 | retryDelay: (retryCount) => retryCount * 1000, 8 | } 9 | -------------------------------------------------------------------------------- /packages/common/src/oauth-wizard/index.ts: -------------------------------------------------------------------------------- 1 | export { OAuthWizardBuilder } from './wizard-builder' 2 | export { getWizardStepUrl, isOAuthWizardUrl, getInterstitialUrl } from './wizard-handler' 3 | export { CHOICE_PARAM, DISABLE_INTERSTITIAL_HEADER } from './consts' 4 | export type { WizardStep, WizardStepHandler, WizardStepInputProps } from './types' 5 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /bots/bugbuster/src/utils/string-utils.ts: -------------------------------------------------------------------------------- 1 | const _splitSpecialChars = (text: string) => text.split(/[^a-zA-Z0-9]/).filter((t) => !!t) 2 | export const toSnakeCase = (text: string): string => _splitSpecialChars(text).join('_').toLowerCase() 3 | export const toScreamingSnakeCase = (text: string): string => _splitSpecialChars(text).join('_').toUpperCase() 4 | -------------------------------------------------------------------------------- /integrations/attio/definitions/common.ts: -------------------------------------------------------------------------------- 1 | import { z } from '@botpress/sdk' 2 | 3 | export const baseIdentifierSchema = z 4 | .object({ 5 | workspace_id: z.string().title('Workspace ID').describe('The Attio workspace ID'), 6 | object_id: z.string().title('Object ID').describe('The Attio object ID'), 7 | }) 8 | .title('Record Identifier') 9 | -------------------------------------------------------------------------------- /integrations/bigcommerce-sync/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /integrations/canny/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "integration.definition.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/googlecalendar/src/actions/implementations/create-event.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const createEvent = wrapAction( 4 | { actionName: 'createEvent', errorMessageWhenFailed: 'Failed to create calendar event' }, 5 | async ({ googleClient }, event) => await googleClient.createEvent({ event }) 6 | ) 7 | -------------------------------------------------------------------------------- /integrations/googlecalendar/src/actions/implementations/update-event.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const updateEvent = wrapAction( 4 | { actionName: 'updateEvent', errorMessageWhenFailed: 'Failed to update calendar event' }, 5 | async ({ googleClient }, event) => await googleClient.updateEvent({ event }) 6 | ) 7 | -------------------------------------------------------------------------------- /integrations/googledrive/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "jsxImportSource": "preact", 6 | "types": ["preact"], 7 | "baseUrl": ".", 8 | "outDir": "dist" 9 | }, 10 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /integrations/loops/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "baseUrl": ".", 5 | "outDir": "dist", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true 8 | }, 9 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "integration.definition.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /integrations/mailchimp/src/index.ts: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import * as bp from '.botpress' 3 | 4 | export default new bp.Integration({ 5 | register: async () => {}, 6 | unregister: async () => {}, 7 | actions, 8 | channels: {}, 9 | handler: async () => { 10 | throw new Error('Not implemented') 11 | }, 12 | }) 13 | -------------------------------------------------------------------------------- /integrations/whatsapp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "jsxImportSource": "preact", 6 | "baseUrl": ".", 7 | "outDir": "dist", 8 | "types": ["preact"] 9 | }, 10 | "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /interfaces/proactive-conversation/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /plugins/conversation-insights/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /plugins/file-synchronizer/src/sync-queue/index.ts: -------------------------------------------------------------------------------- 1 | export * as queueProcessor from './queue-processor' 2 | export * as fileProcessor from './file-processor' 3 | export * as jobFileManager from './job-file-manager' 4 | export * as globMatcher from './glob-matcher' 5 | export * as directoryTraversalWithBatching from './directory-traversal-with-batching' 6 | -------------------------------------------------------------------------------- /integrations/browser/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /integrations/dropbox/src/action-wrapper.ts: -------------------------------------------------------------------------------- 1 | import { createActionWrapper } from '@botpress/common' 2 | import { DropboxClient } from './dropbox-api' 3 | import * as bp from '.botpress' 4 | 5 | export const wrapAction = createActionWrapper()({ 6 | toolFactories: { 7 | dropboxClient: DropboxClient.create, 8 | }, 9 | }) 10 | -------------------------------------------------------------------------------- /integrations/googlecalendar/src/actions/implementations/delete-event.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const deleteEvent = wrapAction( 4 | { actionName: 'deleteEvent', errorMessageWhenFailed: 'Failed to delete calendar event' }, 5 | async ({ googleClient }, { eventId }) => await googleClient.deleteEvent({ eventId }) 6 | ) 7 | -------------------------------------------------------------------------------- /integrations/todoist/src/actions/implementations/get-all-projects.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getAllProjects = wrapAction( 4 | { actionName: 'getAllProjects', errorMessageWhenFailed: 'Failed to retrieve projects' }, 5 | async ({ todoistClient }) => ({ projects: await todoistClient.getAllProjects() }) 6 | ) 7 | -------------------------------------------------------------------------------- /integrations/trello/definitions/user.ts: -------------------------------------------------------------------------------- 1 | import { IntegrationDefinitionProps } from '@botpress/sdk' 2 | 3 | export const user = { 4 | tags: { 5 | userId: { 6 | title: 'User ID', 7 | description: 'Unique identifier of the Trello user', 8 | }, 9 | }, 10 | } as const satisfies NonNullable 11 | -------------------------------------------------------------------------------- /integrations/zendesk-messaging-hitl/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import rootConfig from '../../eslint.config.mjs' 2 | 3 | export default [ 4 | ...rootConfig, 5 | { 6 | languageOptions: { 7 | parserOptions: { 8 | project: ['./tsconfig.json'], 9 | tsconfigRootDir: import.meta.dirname, 10 | }, 11 | }, 12 | }, 13 | ] 14 | -------------------------------------------------------------------------------- /.github/scripts/ls-sentry-integrations.sh: -------------------------------------------------------------------------------- 1 | sentry_integrations=( $(ls integrations/*/.sentryclirc) ) 2 | 3 | filter="" 4 | 5 | for sentry_integration in "${sentry_integrations[@]}"; 6 | do 7 | actual_integration=$(echo $sentry_integration | sed 's/\.sentryclirc//g') 8 | filter="-F ./$actual_integration $filter" 9 | done 10 | 11 | echo $filter 12 | -------------------------------------------------------------------------------- /integrations/cerebras/hub.md: -------------------------------------------------------------------------------- 1 | # Cerebras Integration 2 | 3 | This integration allows your bot to choose from a curated list of models from [Cerebras](https://cerebras.ai/developers/) for content generation and chat completions. 4 | 5 | Usage is charged to the AI Spend of your workspace in Botpress Cloud at the same pricing (at cost) as directly with Cerebras. 6 | -------------------------------------------------------------------------------- /integrations/gsheets/src/actions/implementations/add-sheet.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const addSheet = wrapAction( 4 | { actionName: 'addSheet', errorMessageWhenFailed: 'Failed to add new sheet' }, 5 | async ({ googleClient }, { title: sheetTitle }) => await googleClient.createNewSheetInSpreadsheet({ sheetTitle }) 6 | ) 7 | -------------------------------------------------------------------------------- /integrations/gsheets/src/actions/implementations/append-values-utils.ts: -------------------------------------------------------------------------------- 1 | const MAX_ROW_NUMBER = 100000 2 | 3 | export const constructRangeFromStartColumn = (sheetName: string | undefined, startColumn: string): string => { 4 | const sheetPrefix = sheetName ? `${sheetName}!` : '' 5 | return `${sheetPrefix}${startColumn}:${startColumn}${MAX_ROW_NUMBER}` 6 | } 7 | -------------------------------------------------------------------------------- /integrations/todoist/src/channels/index.ts: -------------------------------------------------------------------------------- 1 | import { TaskCommentPublisher } from './publishers/task-comment' 2 | import * as bp from '.botpress' 3 | 4 | export const channels = { 5 | comments: { 6 | messages: { 7 | text: TaskCommentPublisher.publishTextMessage, 8 | }, 9 | }, 10 | } as const satisfies bp.IntegrationProps['channels'] 11 | -------------------------------------------------------------------------------- /integrations/trello/src/actions/implementations/getCardsInList.ts: -------------------------------------------------------------------------------- 1 | import { wrapAction } from '../action-wrapper' 2 | 3 | export const getCardsInList = wrapAction({ actionName: 'getCardsInList' }, async ({ trelloClient }, { listId }) => { 4 | const matchingCards = await trelloClient.getCardsInList({ listId }) 5 | 6 | return { cards: matchingCards } 7 | }) 8 | -------------------------------------------------------------------------------- /packages/llmz/examples/19_worker_wrap_tool/README.md: -------------------------------------------------------------------------------- 1 | ## Wrapping existing tools 2 | 3 | This is an example of how you can clone and mutate the schema and logic of existing tools. 4 | In this example, we fork a tool to add extra output properties and add extra logging before/after calling the original tool logic. 5 | 6 | ## 🎥 Demo 7 | 8 | ![Demo](./demo.svg) 9 | -------------------------------------------------------------------------------- /packages/vai/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config' 2 | import { defineConfig } from 'vitest/config' 3 | 4 | export default defineConfig({ 5 | test: { 6 | retry: 2, // because LLMs can fail 7 | testTimeout: 60_000, // because LLMs can be slow 8 | include: ['./e2e/**/*.test.ts'], 9 | setupFiles: './vitest.setup.ts', 10 | }, 11 | }) 12 | -------------------------------------------------------------------------------- /plugins/knowledge/plugin.definition.ts: -------------------------------------------------------------------------------- 1 | import * as sdk from '@botpress/sdk' 2 | import llm from './bp_modules/llm' 3 | 4 | export default new sdk.PluginDefinition({ 5 | name: 'knowledge', 6 | version: '1.0.0', 7 | configuration: { schema: sdk.z.object({}) }, 8 | interfaces: { 9 | llm: sdk.version.allWithinMajorOf(llm), 10 | }, 11 | }) 12 | -------------------------------------------------------------------------------- /integrations/confluence/src/channels/index.ts: -------------------------------------------------------------------------------- 1 | import { PageCommentPublisher } from './publishers/page-comment' 2 | import * as bp from '.botpress' 3 | 4 | export const channels = { 5 | comment: { 6 | messages: { 7 | text: PageCommentPublisher.publishFooterComment, 8 | }, 9 | }, 10 | } as const satisfies bp.IntegrationProps['channels'] 11 | --------------------------------------------------------------------------------