feat(sendblue): add Sendblue iMessage/SMS integration with tools and triggers (#4917)

* feat(sendblue): add Sendblue iMessage/SMS integration with tools and triggers

* fix(sendblue): address review — status-aware webhook dedup, shared routing map, uniform output casing, api-key authType

* fix(docs-gen): skip nested array `items` descriptor in tool input tables

* chore(sendblue): use SendblueSendStyle type, trim URL identifiers

* fix(sendblue): keep is_outbound routing map local to the webhook handler

Avoids a webhook-providers -> triggers cross-subgraph import (single source
of truth in the handler, its only runtime consumer).

* fix(sendblue): remove invalid `tags` from block config (belongs on BlockMeta)
This commit is contained in:
Waleed
2026-06-08 19:41:09 -07:00
committed by GitHub
parent 4f00baf6b4
commit a72e35e2f4
28 changed files with 1757 additions and 0 deletions
+7
View File
@@ -535,6 +535,10 @@ async function buildToolDescriptionMap(): Promise<ToolMaps> {
* 'api-key' if it uses a plain API key field, or 'none' otherwise.
*/
function extractAuthType(blockContent: string): 'oauth' | 'api-key' | 'none' {
// Prefer the authoritative `authMode` declaration when present.
if (/authMode\s*:\s*AuthMode\.OAuth\b/.test(blockContent)) return 'oauth'
if (/authMode\s*:\s*AuthMode\.(?:ApiKey|BotToken)\b/.test(blockContent)) return 'api-key'
// Fall back to credential subBlock heuristics for blocks without authMode.
if (/type\s*:\s*['"]oauth-input['"]/.test(blockContent)) return 'oauth'
if (/\bid\s*:\s*['"](?:apiKey|api_key|accessToken)['"]/.test(blockContent)) return 'api-key'
return 'none'
@@ -1775,6 +1779,9 @@ function extractToolInfo(
if (endPos !== -1) {
const paramBlock = paramsContent.substring(startPos + 1, endPos - 1).trim()
paramPositions.push({ name: paramName, start: startPos, content: paramBlock })
// Resume scanning after this param's block so nested descriptors
// (e.g. an array param's `items: {...}`) are not parsed as params.
paramBlocksRegex.lastIndex = endPos
}
}