Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "Running tag system tool before push..."
cd tools/tag_system && node tag_system.js
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
"build:all": "yarn --cwd specs build && yarn --cwd website build",
"clean": "yarn --cwd website clean",
"install:all": "yarn install",
"postinstall": "yarn build:specs && yarn --cwd website build:plugins && yarn --cwd website build:api-docs"
},
"postinstall": "yarn build:specs && yarn --cwd website build:plugins && yarn --cwd website build:api-docs",
"prepare": "husky"
},
"devDependencies": {
"husky": "^9.1.7",
"typescript": "^5.5.4"
},
"resolutions": {
"@signalwire/webrtc": "3.14.0-dev.202506111650.ad2f5be.0"
}
}
}
9 changes: 5 additions & 4 deletions tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
"add-seo-metadata": "node scripts/add-seo-metadata.js"
},
"dependencies": {
"gray-matter": "^4.0.3"
"gray-matter": "^4.0.3",
"mustache": "^4.2.0"
},
"devDependencies": {
"@types/node": "^22.13.10",
"typescript": "^5.5.4",
"ts-node": "^10.9.1"
"ts-node": "^10.9.1",
"typescript": "^5.5.4"
}
}
}
1 change: 1 addition & 0 deletions tools/tag_system/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config_template.*.ts
204 changes: 204 additions & 0 deletions tools/tag_system/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
export interface TagConfig {
startingDirs: string[];
allowedExtensions: string[];
pathTags: Record<string, string[]>;
}

export const config: TagConfig = {
// Starting directories for the tag system
startingDirs: [
'../../website/docs/main',
'../../website/docs/browser-sdk',
'../../website/docs/realtime-sdk'
],

// File extensions to process
allowedExtensions: ['.md', '.mdx'],

// Path-to-tags mapping
// Add your tags for each path below
// More specific paths take precedence over general ones
pathTags: {
'/cantina': ['cantina', 'tools'],
'/cantina/user-guide': ['user-guide', 'documentation'],
'/compatibility-api': ['compatibility-api', 'twilio', 'migration', 'api'],
'/compatibility-api/api-reference': ['api-reference', 'endpoints'],
'/compatibility-api/api-reference/rest-client-sdks': ['sdk', 'rest-client'],
'/compatibility-api/api-reference/rest-client-sdks/methods': ['methods', 'functions'],
'/compatibility-api/cxml': ['cxml', 'xml', 'markup'],
'/compatibility-api/cxml/fax': ['fax', 'documents'],
'/compatibility-api/cxml/messaging': ['messaging', 'sms', 'mms'],
'/compatibility-api/cxml/voice': ['voice', 'calling'],
'/compatibility-api/cxml/voice/pay': ['payments', 'billing'],
'/compatibility-api/guides': ['guides', 'tutorials'],
'/compatibility-api/guides/fax': ['fax', 'documents'],
'/compatibility-api/guides/general': ['general', 'basics'],
'/compatibility-api/guides/general/phone-numbers': ['phone-numbers', 'telephony'],
'/compatibility-api/guides/messaging': ['messaging', 'sms', 'mms'],
'/compatibility-api/guides/messaging/general': ['general', 'basics'],
'/compatibility-api/guides/messaging/python': ['python', 'sdk'],
'/compatibility-api/guides/voice': ['voice', 'calling'],
'/compatibility-api/guides/voice/general': ['general', 'basics'],
'/compatibility-api/guides/voice/nodejs': ['nodejs', 'javascript', 'sdk'],
'/compatibility-api/guides/voice/python': ['python', 'sdk'],
'/compatibility-api/guides/voice/ruby': ['ruby', 'sdk'],
'/compatibility-api/sdks': ['sdk', 'libraries'],
'/events': ['events', 'workshops', 'community'],
'/events/demos': ['demos', 'examples', 'showcase'],
'/events/demos/server': ['server', 'backend'],
'/events/demos/server/ai-cal': ['ai', 'calendar', 'scheduling'],
'/events/demos/server/esp8266-sensor-bot': ['iot', 'sensors', 'hardware'],
'/events/demos/server/flos-flowers-2': ['commerce', 'ordering'],
'/events/demos/server/mfa': ['security', 'authentication', 'mfa'],
'/events/demos/server/restaurant-reservation': ['restaurant', 'reservations', 'hospitality'],
'/events/demos/server/room-service': ['hospitality', 'room-service'],
'/events/demos/server/tier-1-support': ['support', 'customer-service'],
'/events/demos/serverless': ['serverless', 'cloud-functions'],
'/events/demos/serverless/admin-assistant': ['ai', 'assistant', 'admin'],
'/events/demos/serverless/virtual-flowers-demo': ['commerce', 'virtual-assistant'],
'/events/demos/serverless/weather-bot-demo': ['weather', 'bot', 'assistant'],
'/events/hackathons': ['hackathons', 'competitions'],
'/events/hackathons/cluecon-2024': ['cluecon', '2024', 'conference'],
'/events/livewire': ['livewire', 'live-demos'],
'/events/livewire/smart-biz-ai': ['ai', 'business', 'smart-assistant'],
'/events/livewire/swaig-plus-zendesk': ['swaig', 'zendesk', 'integration'],
'/events/livewire/swaig-plus-zendesk/functions': ['functions', 'serverless'],
'/home': ['home', 'overview'],
'/home/calling': ['calling', 'voice', 'telephony'],
'/home/calling/ai': ['ai', 'artificial-intelligence', 'voice-ai'],
'/home/calling/ai/get-started': ['get-started', 'quickstart'],
'/home/calling/ai/guides': ['guides', 'tutorials'],
'/home/calling/ai/pom': ['pom', 'peace-of-mind'],
'/home/calling/fax': ['fax', 'documents', 'transmission'],
'/home/calling/fax/getting-started': ['getting-started', 'quickstart'],
'/home/calling/video': ['video', 'webrtc', 'conferencing'],
'/home/calling/video/get-started': ['get-started', 'quickstart'],
'/home/calling/video/guides': ['guides', 'tutorials'],
'/home/calling/voice': ['voice', 'calling', 'telephony'],
'/home/calling/voice/getting-started': ['getting-started', 'quickstart'],
'/home/calling/voice/guides': ['guides', 'tutorials'],
'/home/calling/voice/sip': ['sip', 'protocol', 'voip'],
'/home/calling/voice/tts': ['tts', 'text-to-speech', 'synthesis'],
'/home/messaging': ['messaging', 'sms', 'mms', 'chat'],
'/home/messaging/chat': ['chat', 'real-time', 'messaging'],
'/home/messaging/chat/getting-started': ['getting-started', 'quickstart'],
'/home/messaging/chat/guides': ['guides', 'tutorials'],
'/home/messaging/sms': ['sms', 'text-messaging'],
'/home/messaging/sms/campaign-registry': ['campaign-registry', 'compliance', '10dlc'],
'/home/messaging/sms/getting-started': ['getting-started', 'quickstart'],
'/home/messaging/sms/guides': ['guides', 'tutorials'],
'/home/overview': ['overview', 'introduction'],
'/home/platform': ['platform', 'infrastructure'],
'/home/platform/basics': ['basics', 'fundamentals'],
'/home/platform/basics/general': ['general', 'concepts'],
'/home/platform/basics/guides': ['guides', 'tutorials'],
'/home/platform/basics/security-and-compliance': ['security', 'compliance', 'privacy'],
'/home/platform/call-fabric': ['call-fabric', 'routing', 'infrastructure'],
'/home/platform/call-fabric/addresses': ['addresses', 'routing'],
'/home/platform/call-fabric/resources': ['resources', 'management'],
'/home/platform/call-fabric/subscribers': ['subscribers', 'users'],
'/home/platform/dashboard': ['dashboard', 'ui', 'management'],
'/home/platform/dashboard/administration': ['administration', 'management'],
'/home/platform/dashboard/api': ['api', 'keys', 'credentials'],
'/home/platform/dashboard/billing': ['billing', 'payments', 'usage'],
'/home/platform/dashboard/logs': ['logs', 'monitoring', 'debugging'],
'/home/platform/dashboard/navigate': ['navigation', 'ui'],
'/home/platform/dashboard/phone-numbers': ['phone-numbers', 'telephony'],
'/home/platform/integrations': ['integrations', 'third-party'],
'/home/platform/integrations/carriers': ['carriers', 'telecom'],
'/home/platform/integrations/crm': ['crm', 'customer-management'],
'/home/platform/integrations/dialogflow': ['dialogflow', 'google', 'ai'],
'/home/platform/integrations/freeswitch': ['freeswitch', 'pbx'],
'/home/platform/integrations/messaging-services': ['messaging-services', 'sms'],
'/home/platform/integrations/pbx-systems': ['pbx', 'phone-systems'],
'/home/platform/integrations/serverless-functions': ['serverless', 'functions'],
'/home/platform/integrations/softphones': ['softphones', 'sip-clients'],
'/home/platform/integrations/workflow-tools': ['workflow', 'automation'],
'/home/platform/phone-numbers': ['phone-numbers', 'did', 'telephony'],
'/home/platform/phone-numbers/getting-started': ['getting-started', 'quickstart'],
'/home/platform/phone-numbers/guides': ['guides', 'tutorials'],
'/home/tools': ['tools', 'utilities'],
'/home/tools/c2c': ['c2c', 'click-to-call'],
'/home/tools/call-flow-builder': ['call-flow-builder', 'visual-editor', 'ivr'],
'/home/tools/call-flow-builder/nodes': ['nodes', 'components'],
'/home/tools/call-flow-builder/variables': ['variables', 'data'],
'/home/tools/call-flow-builder/version': ['versioning', 'releases'],
'/home/tools/swsh': ['swsh', 'cli', 'command-line'],
'/home/tools/wirestarter': ['wirestarter', 'generator', 'scaffolding'],
'/rest': ['rest', 'api', 'http'],
'/rest/compatibility-api': ['compatibility-api', 'twilio', 'migration'],
'/rest/compatibility-api/endpoints': ['endpoints', 'api-reference'],
'/rest/compatibility-api/overview': ['overview', 'introduction'],
'/rest/overview': ['overview', 'introduction'],
'/rest/signalwire-rest': ['signalwire-rest', 'native-api'],
'/rest/signalwire-rest/endpoints': ['endpoints', 'api-reference'],
'/rest/signalwire-rest/endpoints/calling': ['calling', 'voice', 'telephony'],
'/rest/signalwire-rest/endpoints/chat': ['chat', 'messaging', 'real-time'],
'/rest/signalwire-rest/endpoints/datasphere': ['datasphere', 'data', 'analytics'],
'/rest/signalwire-rest/endpoints/fabric': ['fabric', 'call-fabric', 'routing'],
'/rest/signalwire-rest/endpoints/fax': ['fax', 'documents'],
'/rest/signalwire-rest/endpoints/logs': ['logs', 'monitoring', 'debugging'],
'/rest/signalwire-rest/endpoints/messaging': ['messaging', 'sms', 'mms'],
'/rest/signalwire-rest/endpoints/project': ['project', 'management'],
'/rest/signalwire-rest/endpoints/pubsub': ['pubsub', 'publish-subscribe', 'events'],
'/rest/signalwire-rest/endpoints/space': ['space', 'domain'],
'/rest/signalwire-rest/endpoints/video': ['video', 'webrtc', 'conferencing'],
'/rest/signalwire-rest/endpoints/voice': ['voice', 'calling', 'telephony'],
'/rest/signalwire-rest/guides': ['guides', 'tutorials'],
'/rest/signalwire-rest/guides/campaign-registry': ['campaign-registry', 'compliance'],
'/rest/signalwire-rest/guides/datasphere': ['datasphere', 'data', 'analytics'],
'/rest/signalwire-rest/overview': ['overview', 'introduction'],
'/sdks': ['sdks', 'libraries', 'client-libraries'],
'/sdks/01-overview': ['overview', 'introduction'],
'/swml': ['swml', 'signalml', 'xml', 'call-control'],
'/swml/agents-sdk': ['agents-sdk', 'ai', 'conversational-ai', 'python'],
'/swml/agents-sdk/api': ['api', 'reference', 'methods'],
'/swml/agents-sdk/composition': ['composition', 'agent-building'],
'/swml/agents-sdk/composition/advanced': ['advanced', 'complex-agents'],
'/swml/agents-sdk/composition/contexts': ['contexts', 'conversation-state'],
'/swml/agents-sdk/composition/create': ['create', 'building', 'setup'],
'/swml/agents-sdk/composition/datamap': ['datamap', 'data-handling'],
'/swml/agents-sdk/composition/dynamic-config': ['dynamic-config', 'runtime-config'],
'/swml/agents-sdk/composition/languages-voices': ['languages', 'voices', 'tts'],
'/swml/agents-sdk/composition/prefabs': ['prefabs', 'templates', 'pre-built'],
'/swml/agents-sdk/composition/prompt': ['prompt', 'ai-prompting'],
'/swml/agents-sdk/composition/skills': ['skills', 'capabilities', 'functions'],
'/swml/agents-sdk/composition/swaig': ['swaig', 'signalwire-ai-gateway'],
'/swml/agents-sdk/get-started': ['get-started', 'quickstart'],
'/swml/agents-sdk/guides': ['guides', 'tutorials'],
'/swml/get-started': ['get-started', 'quickstart'],
'/swml/guides': ['guides', 'tutorials'],
'/swml/guides/AI': ['ai', 'artificial-intelligence'],
'/swml/guides/AI/holiday-special-santa-ai': ['santa-ai', 'holiday', 'demo'],
'/swml/guides/AI/swaig': ['swaig', 'signalwire-ai-gateway'],
'/swml/guides/call-whisper': ['call-whisper', 'monitoring'],
'/swml/guides/creating-ivr-with-swml': ['ivr', 'interactive-voice-response'],
'/swml/guides/methods': ['methods', 'functions'],
'/swml/guides/methods/goto-execute-transfer-disambiguation': ['goto', 'execute', 'transfer'],
'/swml/guides/methods/request': ['request', 'http', 'webhooks'],
'/swml/methods': ['methods', 'functions', 'reference'],
'/swml/methods/ai': ['ai', 'artificial-intelligence'],
'/swml/methods/ai/ai_params': ['parameters', 'configuration'],
'/swml/methods/ai/ai_swaig': ['swaig', 'signalwire-ai-gateway'],
'/swml/methods/ai/prompt': ['prompt', 'ai-prompting'],
'/swml/methods/connect': ['connect', 'call-routing'],
'/swml/methods/live_transcribe': ['transcription', 'speech-to-text', 'real-time'],
'/swml/methods/live_transcribe/action': ['actions', 'callbacks'],
'/swml/methods/live_translate': ['translation', 'language-translation', 'real-time'],
'/swml/methods/live_translate/action': ['actions', 'callbacks'],
'/swml/methods/pay': ['payments', 'billing', 'credit-card'],
'/swml/methods/pay/parameters': ['parameters', 'configuration'],
'/swml/methods/pay/prompts': ['prompts', 'user-input'],

// Browser SDK paths
'/browser-sdk': ['browser-sdk', 'javascript', 'webrtc', 'client-side'],
'/browser-sdk/guides': ['guides', 'tutorials'],
'/browser-sdk/tech-ref': ['api-reference', 'technical-reference'],

// Realtime SDK paths
'/realtime-sdk': ['realtime-sdk', 'javascript', 'websockets', 'real-time'],
'/realtime-sdk/guides': ['guides', 'tutorials'],
'/realtime-sdk/tech-ref': ['api-reference', 'technical-reference'],
'/realtime-sdk/language': ['language-bindings', 'client-libraries'],
}
};
26 changes: 26 additions & 0 deletions tools/tag_system/config_template.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface TagConfig {
startingDirs: string[];
allowedExtensions: string[];
pathTags: Record<string, string[]>;
}

export const config: TagConfig = {
// Starting directories for the tag system
startingDirs: [
{{#startingDirs}}
'{{{.}}}',
{{/startingDirs}}
],

// File extensions to process
allowedExtensions: ['.md', '.mdx'],

// Path-to-tags mapping
// Add your tags for each path below
// More specific paths take precedence over general ones
pathTags: {
{{#directories}}
'{{{path}}}': [],
{{/directories}}
}
};
Loading