@velaro/cli 1.4.243 → 1.4.244

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/velaro.js CHANGED
@@ -1,360 +1,343 @@
1
- #!/usr/bin/env node
2
- import yargs from 'yargs';
3
- import { hideBin } from 'yargs/helpers';
4
-
5
- import { loginCommand, logoutCommand } from '../lib/commands/login.js';
6
- import { envCommand } from '../lib/commands/env.js';
7
- import { whoamiCommand } from '../lib/commands/whoami.js';
8
- import { kbCommand } from '../lib/commands/kb.js';
9
- import { botCommand } from '../lib/commands/bot.js';
10
- import { indexCommand } from '../lib/commands/index.js';
11
- import { ingestCommand } from '../lib/commands/ingest.js';
12
- import { indexMoveCommand } from '../lib/commands/index-move.js';
13
- import { safetyCommand } from '../lib/commands/safety.js';
14
- import { knowledgeAdvisorCommand } from '../lib/commands/knowledge-advisor.js';
15
- import { productMatchCommand } from '../lib/commands/product-match.js';
16
- import { partFinderCommand } from '../lib/commands/part-finder.js';
17
- import { knowledgeCommand } from '../lib/commands/knowledge.js';
18
- import { productCommand } from '../lib/commands/product.js';
19
- import { apiUsageCommand } from '../lib/commands/api-usage.js';
20
- import { conversationActionCommand } from '../lib/commands/conversation-action.js';
21
- import { mcpKeyCommand } from '../lib/commands/mcp-key.js';
22
- import { checkCommand } from '../lib/commands/check.js';
23
- import { siteCommand } from '../lib/commands/site.js';
24
- import { statusCommand } from '../lib/commands/status.js';
25
- import { ruleCommand } from '../lib/commands/rule.js';
26
- import { teamCommand } from '../lib/commands/team.js';
27
- import { dynamicsCommand } from '../lib/commands/dynamics.js';
28
- import { workflowCommand } from '../lib/commands/workflow.js';
29
- import { aiConfigCommand } from '../lib/commands/ai-config.js';
30
- import { updateCommand } from '../lib/commands/update.js';
31
- import { agentCommand } from '../lib/commands/agent.js';
32
- import { linkedIdentityCommand } from '../lib/commands/linked-identity.js';
33
- import { notificationsCommand } from '../lib/commands/notifications.js';
34
- import { signatureCommand } from '../lib/commands/signature.js';
35
- import { articleCommand } from '../lib/commands/article.js';
36
- import { imageCommand } from '../lib/commands/image.js';
37
- import { copilotStudioCommand } from '../lib/commands/copilotstudio.js';
38
- import { applePayPresetCommand } from '../lib/commands/apple-pay-preset.js';
39
- import { integrationCommand } from '../lib/commands/integration.js';
40
- import { appointmentsCommand } from '../lib/commands/appointments.js';
41
- import { schedulerCommand } from '../lib/commands/scheduler.js';
42
- import { publicApiCommand } from '../lib/commands/public-api.js';
43
- import { bookingDefaultsCommand } from '../lib/commands/booking-defaults.js';
44
- import { bookingCommand } from '../lib/commands/booking.js';
45
- import { reportCommand } from '../lib/commands/report.js';
46
- import { reportSubscriptionCommand } from '../lib/commands/report-subscription.js';
47
- import { experienceImpactCommand } from '../lib/commands/experience-impact.js';
48
- import { commerceSafetyCommand } from '../lib/commands/commerce-safety.js';
49
- import { enterpriseReportsCommand } from '../lib/commands/enterprise-reports.js';
50
- import { reportBackfillCommand } from '../lib/commands/report-backfill.js';
51
- import { reportExplainCommand } from '../lib/commands/report-explain.js';
52
- import { conversationEfficiencyCommand } from '../lib/commands/conversation-efficiency.js';
53
- import { executiveInsightsCommand } from '../lib/commands/executive-insights.js';
54
- import { skillRoutingCommand } from '../lib/commands/skill-routing.js';
55
- import { keywordIntelligenceCommand } from '../lib/commands/keyword-intelligence.js';
56
- import { aiFieldExtractionCommand } from '../lib/commands/ai-field-extraction.js';
57
- import { sentimentCommand, qualityCommand, chatIntelligenceThemesCommand } from '../lib/commands/quality-reports.js';
58
- import { cannedLearningCommand } from '../lib/commands/canned-learning.js';
59
- import { csatOverrideUnapproveCommand } from '../lib/commands/csat-override.js';
60
- import { moshkyWriteAccessCommand } from '../lib/commands/moshky-write-access.js';
61
- import { translationCommand } from '../lib/commands/translation.js';
62
- import { chatIntelligenceTopicsCommand } from '../lib/commands/chat-intelligence-topics.js';
63
- import { focusCommand } from '../lib/commands/focus.js';
64
- import { automationDraftCommand } from '../lib/commands/automation-draft.js';
65
- import { serviceStateCommand } from '../lib/commands/service-state.js';
66
- import { magentoCommand } from '../lib/commands/magento.js';
67
- import { sapCommand } from '../lib/commands/sap.js';
68
- import { salesforceCommand } from '../lib/commands/salesforce.js';
69
- import { actionsCommand } from '../lib/commands/actions.js';
70
- import { mondayCommand } from '../lib/commands/monday.js';
71
- import { makeCommand } from '../lib/commands/make.js';
72
- import { notionCommand } from '../lib/commands/notion.js';
73
- import { apolloCommand } from '../lib/commands/apollo.js';
74
- import { callrailCommand } from '../lib/commands/callrail.js';
75
- import { emailCampaignCommand } from '../lib/commands/email-campaign.js';
76
- import { outboundActivityCommand } from '../lib/commands/outbound-activity.js';
77
- import { klaviyoMigrationCommand } from '../lib/commands/klaviyo-migration.js';
78
- import { telephonyCommand } from '../lib/commands/telephony.js';
79
- import { teamsPhoneCommand } from '../lib/commands/teams-phone.js';
80
- import { zoomPhoneCommand } from '../lib/commands/zoom-phone.js';
81
- import { smsCommand } from '../lib/commands/sms.js';
82
- import { teamsCommand } from '../lib/commands/teams.js';
83
- import { slackCommand } from '../lib/commands/slack.js';
84
- import { webflowCommand } from '../lib/commands/webflow.js';
85
- import { shopifyCommand } from '../lib/commands/shopify.js';
86
- import { commerceRoutingCommand } from '../lib/commands/commerce-routing.js';
87
- import { netsuiteCommand } from '../lib/commands/netsuite.js';
88
- import { woocommerceCommand } from '../lib/commands/woocommerce.js';
89
- import { squarespaceCommand } from '../lib/commands/squarespace.js';
90
- import { complianceCommand } from '../lib/commands/compliance.js';
91
- import { billingContactsCommand } from '../lib/commands/billing-contacts.js';
92
- import { billingSubscriptionCommand } from '../lib/commands/billing-subscription.js';
93
- import { billingAutomationCommand } from '../lib/commands/billing-automation.js';
94
- import { orderFormCommand } from '../lib/commands/order-form.js';
95
- import { priceIncreaseCommand } from '../lib/commands/price-increase.js';
96
- import { billingEmailPreferenceCommand } from '../lib/commands/billing-email-preference.js';
97
- import { billingCommand } from '../lib/commands/billing.js';
98
- import { signCommand } from '../lib/commands/sign.js';
99
- import { widgetContainerCommand } from '../lib/commands/widget-container.js';
100
- import { inlineWidgetConfigCommand } from '../lib/commands/inline-widget-config.js';
101
- import { billingAgentsCommand } from '../lib/commands/billing-agents.js';
102
- import { packageBuilderCommand } from '../lib/commands/package-builder.js';
103
- import { routingCommand } from '../lib/commands/routing.js';
104
- import { statusNotifyCommand } from '../lib/commands/status-notify.js';
105
- import { callbackCommand } from '../lib/commands/callback.js';
106
- import { ticketNumberingCommand } from '../lib/commands/ticket-numbering.js';
107
- import { cobrowseCommand } from '../lib/commands/cobrowse.js';
108
- import { callpresenceCommand } from '../lib/commands/callpresence.js';
109
- import { signupFormCommand } from '../lib/commands/signup-form.js';
110
- import { authorityCommand } from '../lib/commands/authority.js';
111
- import { caseCommand } from '../lib/commands/case.js';
112
- import { dealCommand } from '../lib/commands/deal.js';
113
- import { salesCommand } from '../lib/commands/sales.js';
114
- import { ticketCommand } from '../lib/commands/ticket.js';
115
- import { crmCommand } from '../lib/commands/crm-studio.js';
116
- import { emailRouteCommand } from '../lib/commands/email-route.js';
117
- import { emailRouteOverrideCommand } from '../lib/commands/email-route-override.js';
118
- import { pickupCommand } from '../lib/commands/pickup.js';
119
- import { siteSaleCommand } from '../lib/commands/site-sale.js';
120
- import { visitorMonitorCommand } from '../lib/commands/visitor-monitor.js';
121
- import { visitorLinkCommand } from '../lib/commands/visitor-link.js';
122
- import { applePayCommand } from '../lib/commands/apple-pay.js';
123
- import { siteBuilderCommand } from '../lib/commands/site-builder.js';
124
- import { paymentRecoveryCommand } from '../lib/commands/payment-recovery.js';
125
- import { recruitingCommand } from '../lib/commands/recruiting.js';
126
- import { workforceCommand } from '../lib/commands/workforce.js';
127
- import { surveyCommand } from '../lib/commands/survey.js';
128
- import { bundleCommand } from '../lib/commands/bundle.js';
129
- import { chatWindowCommand } from '../lib/commands/chat-window.js';
130
- import { featureDiscoveryCommand } from '../lib/commands/feature-discovery.js';
131
- import { usageCommand } from '../lib/commands/usage.js';
132
- import { campaignsCommand } from '../lib/commands/campaigns.js';
133
- import { senderDomainHealthCommand } from '../lib/commands/sender-domain-health.js';
134
- import { contactsCommand } from '../lib/commands/contacts.js';
135
- import { contactsApiCommand } from '../lib/commands/contacts-rest-extras.js';
136
- import { contactListCommand } from '../lib/commands/contact-list.js';
137
- import { contactSegmentCommand } from '../lib/commands/contact-segment.js';
138
- import { recycleBinCommand, aiUsageCommand, siteInfoCommand, billingReceiptsCommand } from '../lib/commands/endpoint-parity.js';
139
- import { aiFollowupsCommand, businessActionCommand, callCommand, conversationCommand, conversionCommand, ivrCommand } from '../lib/commands/ops-groups.js';
140
- import { crmViewCommand, crmBulkCommand, crmWebformCommand } from '../lib/commands/crm-views-bulk-webforms.js';
141
- import { crmImportCommand, crmTagCommand, crmDedupeCommand, crmAuditCommand } from '../lib/commands/crm-import-dedupe-audit.js';
142
- import { crmObjectCommand, crmRelCommand } from '../lib/commands/crm-objects-relationships.js';
143
- import { crmDocTemplateCommand, crmDealDocCommand } from '../lib/commands/crm-document-templates.js';
144
- import { crmOrderCommand, crmFulfillmentCommand, crmReturnCommand } from '../lib/commands/crm-orders-returns.js';
145
- import { crmApprovalCommand, crmScoreCommand } from '../lib/commands/crm-approvals-scoring.js';
146
- import { featureDiscoveryGroup } from '../lib/commands/feature-discovery.js';
147
- import { billingInsightsGroup } from '../lib/commands/billing-insights.js';
148
- import { supportTicketsCommand } from '../lib/commands/support-tickets.js';
149
- import { aiAckGroup } from '../lib/commands/ai-ack.js';
150
- import { afterHoursSupportCommand } from '../lib/commands/after-hours-support.js';
151
- import { automationAddonCommand } from '../lib/commands/automation-addon.js';
152
- import { startUpdateCheck } from '../lib/update-check.js';
153
- import { printBanner, printBannerIfFirstRun } from '../lib/banner.js';
154
- import { createRequire } from 'module';
155
-
156
- // Banner on first run, and on the "front door" commands (bare `velaro`, help, login, update).
157
- // Never on data commands or --version: their output is parsed by scripts.
158
- const cliVersion = createRequire(import.meta.url)('../package.json').version;
159
- const firstArg = process.argv[2];
160
- const frontDoor = !firstArg || ['help', '--help', '-h', 'login', 'update'].includes(firstArg);
161
- if (!printBannerIfFirstRun() && frontDoor) printBanner({ version: cliVersion });
162
-
163
- const printUpdateNoticeIfStale = startUpdateCheck();
164
-
165
- // Staff commands live in cli/staff, which is NOT in the "files" allowlist of package.json, so the public npm install does not have it.
166
- // A dev checkout or a staff install does; load it only when present (scripts/validate-cli-no-staff-commands.js guards the split).
167
- let registerStaffCommands = null;
168
- try {
169
- ({ registerStaffCommands } = await import('../staff/register.js'));
170
- } catch (e) {
171
- if (e?.code !== 'ERR_MODULE_NOT_FOUND' || !/staff[\\/]register\.js/.test(String(e.message))) throw e;
172
- }
173
- const baseYargs = yargs(hideBin(process.argv));
174
-
175
- await (registerStaffCommands ? registerStaffCommands(baseYargs) : baseYargs)
176
- .scriptName('velaro')
177
- .usage('$0 <command> [options]')
178
- .command(loginCommand)
179
- .command(logoutCommand)
180
- .command(envCommand)
181
- .command(whoamiCommand)
182
- .command(kbCommand)
183
- .command(botCommand)
184
- .command(indexCommand)
185
- .command(ingestCommand)
186
- .command(indexMoveCommand)
187
- .command(safetyCommand)
188
- .command(knowledgeAdvisorCommand)
189
- .command(productMatchCommand)
190
- .command(partFinderCommand)
191
- .command(knowledgeCommand)
192
- .command(productCommand)
193
- .command(mcpKeyCommand)
194
- .command(apiUsageCommand)
195
- .command(conversationActionCommand)
196
- .command(checkCommand)
197
- .command(siteCommand)
198
- .command(statusCommand)
199
- .command(ruleCommand)
200
- .command(teamCommand)
201
- .command(dynamicsCommand)
202
- .command(workflowCommand)
203
- .command(aiConfigCommand)
204
- .command(updateCommand)
205
- .command(agentCommand)
206
- .command(linkedIdentityCommand)
207
- .command(notificationsCommand)
208
- .command(signatureCommand)
209
- .command(articleCommand)
210
- .command(imageCommand)
211
- .command(copilotStudioCommand)
212
- .command(applePayPresetCommand)
213
- .command(integrationCommand)
214
- .command(appointmentsCommand)
215
- .command(schedulerCommand)
216
- .command(publicApiCommand)
217
- .command(bookingDefaultsCommand)
218
- .command(bookingCommand)
219
- .command(reportCommand)
220
- .command(conversationEfficiencyCommand)
221
- .command(executiveInsightsCommand)
222
- .command(experienceImpactCommand)
223
- .command(commerceSafetyCommand)
224
- .command(enterpriseReportsCommand)
225
- .command(reportSubscriptionCommand)
226
- .command(reportBackfillCommand)
227
- .command(reportExplainCommand)
228
- .command(skillRoutingCommand)
229
- .command(keywordIntelligenceCommand)
230
- .command(aiFieldExtractionCommand)
231
- .command(sentimentCommand)
232
- .command(qualityCommand)
233
- .command(chatIntelligenceThemesCommand)
234
- .command(cannedLearningCommand)
235
- .command(chatIntelligenceTopicsCommand)
236
- .command(csatOverrideUnapproveCommand)
237
- .command(moshkyWriteAccessCommand)
238
- .command(translationCommand)
239
- .command(focusCommand)
240
- .command(automationDraftCommand)
241
- .command(serviceStateCommand)
242
- .command(magentoCommand)
243
- .command(sapCommand)
244
- .command(salesforceCommand)
245
- .command(actionsCommand)
246
- .command(mondayCommand)
247
- .command(makeCommand)
248
- .command(notionCommand)
249
- .command(apolloCommand)
250
- .command(callrailCommand)
251
- .command(emailCampaignCommand)
252
- .command(outboundActivityCommand)
253
- .command(klaviyoMigrationCommand)
254
- .command(telephonyCommand)
255
- .command(teamsPhoneCommand)
256
- .command(zoomPhoneCommand)
257
- .command(smsCommand)
258
- .command(teamsCommand)
259
- .command(slackCommand)
260
- .command(webflowCommand)
261
- .command(shopifyCommand)
262
- .command(commerceRoutingCommand)
263
- .command(netsuiteCommand)
264
- .command(woocommerceCommand)
265
- .command(squarespaceCommand)
266
- .command(complianceCommand)
267
- .command(billingContactsCommand)
268
- .command(billingSubscriptionCommand)
269
- .command(billingAutomationCommand)
270
- .command(orderFormCommand)
271
- .command(priceIncreaseCommand)
272
- .command(billingEmailPreferenceCommand)
273
- .command(billingCommand)
274
- .command(signCommand)
275
- .command(widgetContainerCommand)
276
- .command(inlineWidgetConfigCommand)
277
- .command({ command: 'billing-agents', desc: 'Run and review the billing agents (staff)', builder: billingAgentsCommand, handler: () => {} })
278
- .command({ command: 'package-builder', desc: 'Package graph, drafts, simulation, audit (staff)', builder: packageBuilderCommand, handler: () => {} })
279
- .command(routingCommand)
280
- .command(statusNotifyCommand)
281
- .command(callbackCommand)
282
- .command(ticketNumberingCommand)
283
- // The staff build already registers a cobrowse group that includes seats/seat set; only the public build adds this one.
284
- .command(registerStaffCommands ? { command: 'cobrowse-seats-in-staff-group', describe: false, builder: (y) => y, handler: () => {} } : cobrowseCommand)
285
- .command(callpresenceCommand)
286
- .command(signupFormCommand)
287
- .command(authorityCommand)
288
- .command(caseCommand)
289
- .command(dealCommand)
290
- .command(salesCommand)
291
- .command(ticketCommand)
292
- .command(crmCommand)
293
- .command(emailRouteCommand)
294
- .command(emailRouteOverrideCommand)
295
- .command(pickupCommand)
296
- .command(siteSaleCommand)
297
- .command(visitorMonitorCommand)
298
- .command(visitorLinkCommand)
299
- .command(applePayCommand)
300
- .command(siteBuilderCommand)
301
- .command(paymentRecoveryCommand)
302
- .command(recruitingCommand)
303
- .command(workforceCommand)
304
- .command(surveyCommand)
305
- .command(bundleCommand)
306
- .command(chatWindowCommand)
307
- .command(featureDiscoveryGroup)
308
- .command(billingInsightsGroup)
309
- .command(supportTicketsCommand)
310
- .command(aiAckGroup)
311
- .command(afterHoursSupportCommand)
312
- .command(automationAddonCommand)
313
- .command(usageCommand)
314
- .command(campaignsCommand)
315
- .command(senderDomainHealthCommand)
316
- .command(contactsCommand)
317
- .command(contactsApiCommand)
318
- .command(contactListCommand)
319
- .command(contactSegmentCommand)
320
- .command(recycleBinCommand)
321
- .command(aiUsageCommand)
322
- .command(siteInfoCommand)
323
- .command(billingReceiptsCommand)
324
- .command(aiFollowupsCommand)
325
- .command(businessActionCommand)
326
- .command(callCommand)
327
- .command(conversationCommand)
328
- .command(conversionCommand)
329
- .command(ivrCommand)
330
- .command(crmViewCommand)
331
- .command(crmBulkCommand)
332
- .command(crmWebformCommand)
333
- .command(crmImportCommand)
334
- .command(crmTagCommand)
335
- .command(crmDedupeCommand)
336
- .command(crmAuditCommand)
337
- .command(crmObjectCommand)
338
- .command(crmRelCommand)
339
- .command(crmDocTemplateCommand)
340
- .command(crmDealDocCommand)
341
- .command(crmOrderCommand)
342
- .command(crmFulfillmentCommand)
343
- .command(crmReturnCommand)
344
- .command(crmApprovalCommand)
345
- .command(crmScoreCommand)
346
- .demandCommand(1, 'Specify a command. Run "velaro --help" for options.')
347
- .strict()
348
- .fail((msg, err, y) => {
349
- if (err) throw err;
350
- y.showHelp('error');
351
- console.error(`\n${msg}`);
352
- if (!registerStaffCommands && /unknown (command|argument)/i.test(String(msg))) {
353
- console.error('If that is an internal command, it is only in the staff build (a dev checkout or staff install), not the public npm package.');
354
- }
355
- process.exit(1);
356
- })
357
- .help()
358
- .parseAsync();
359
-
360
- await printUpdateNoticeIfStale();
1
+ #!/usr/bin/env node
2
+ import yargs from 'yargs';
3
+ import { hideBin } from 'yargs/helpers';
4
+
5
+ import { loginCommand, logoutCommand } from '../lib/commands/login.js';
6
+ import { envCommand } from '../lib/commands/env.js';
7
+ import { whoamiCommand } from '../lib/commands/whoami.js';
8
+ import { kbCommand } from '../lib/commands/kb.js';
9
+ import { botCommand } from '../lib/commands/bot.js';
10
+ import { indexCommand } from '../lib/commands/index.js';
11
+ import { ingestCommand } from '../lib/commands/ingest.js';
12
+ import { indexMoveCommand } from '../lib/commands/index-move.js';
13
+ import { safetyCommand } from '../lib/commands/safety.js';
14
+ import { knowledgeAdvisorCommand } from '../lib/commands/knowledge-advisor.js';
15
+ import { productMatchCommand } from '../lib/commands/product-match.js';
16
+ import { partFinderCommand } from '../lib/commands/part-finder.js';
17
+ import { knowledgeCommand } from '../lib/commands/knowledge.js';
18
+ import { productCommand } from '../lib/commands/product.js';
19
+ import { apiUsageCommand } from '../lib/commands/api-usage.js';
20
+ import { conversationActionCommand } from '../lib/commands/conversation-action.js';
21
+ import { mcpKeyCommand } from '../lib/commands/mcp-key.js';
22
+ import { checkCommand } from '../lib/commands/check.js';
23
+ import { siteCommand } from '../lib/commands/site.js';
24
+ import { statusCommand } from '../lib/commands/status.js';
25
+ import { ruleCommand } from '../lib/commands/rule.js';
26
+ import { teamCommand } from '../lib/commands/team.js';
27
+ import { dynamicsCommand } from '../lib/commands/dynamics.js';
28
+ import { workflowCommand } from '../lib/commands/workflow.js';
29
+ import { aiConfigCommand } from '../lib/commands/ai-config.js';
30
+ import { updateCommand } from '../lib/commands/update.js';
31
+ import { agentCommand } from '../lib/commands/agent.js';
32
+ import { linkedIdentityCommand } from '../lib/commands/linked-identity.js';
33
+ import { notificationsCommand } from '../lib/commands/notifications.js';
34
+ import { signatureCommand } from '../lib/commands/signature.js';
35
+ import { articleCommand } from '../lib/commands/article.js';
36
+ import { imageCommand } from '../lib/commands/image.js';
37
+ import { copilotStudioCommand } from '../lib/commands/copilotstudio.js';
38
+ import { applePayPresetCommand } from '../lib/commands/apple-pay-preset.js';
39
+ import { integrationCommand } from '../lib/commands/integration.js';
40
+ import { appointmentsCommand } from '../lib/commands/appointments.js';
41
+ import { schedulerCommand } from '../lib/commands/scheduler.js';
42
+ import { publicApiCommand } from '../lib/commands/public-api.js';
43
+ import { bookingDefaultsCommand } from '../lib/commands/booking-defaults.js';
44
+ import { bookingCommand } from '../lib/commands/booking.js';
45
+ import { reportCommand } from '../lib/commands/report.js';
46
+ import { reportSubscriptionCommand } from '../lib/commands/report-subscription.js';
47
+ import { experienceImpactCommand } from '../lib/commands/experience-impact.js';
48
+ import { commerceSafetyCommand } from '../lib/commands/commerce-safety.js';
49
+ import { enterpriseReportsCommand } from '../lib/commands/enterprise-reports.js';
50
+ import { reportBackfillCommand } from '../lib/commands/report-backfill.js';
51
+ import { reportExplainCommand } from '../lib/commands/report-explain.js';
52
+ import { conversationEfficiencyCommand } from '../lib/commands/conversation-efficiency.js';
53
+ import { executiveInsightsCommand } from '../lib/commands/executive-insights.js';
54
+ import { skillRoutingCommand } from '../lib/commands/skill-routing.js';
55
+ import { keywordIntelligenceCommand } from '../lib/commands/keyword-intelligence.js';
56
+ import { aiFieldExtractionCommand } from '../lib/commands/ai-field-extraction.js';
57
+ import { sentimentCommand, qualityCommand, chatIntelligenceThemesCommand } from '../lib/commands/quality-reports.js';
58
+ import { cannedLearningCommand } from '../lib/commands/canned-learning.js';
59
+ import { csatOverrideUnapproveCommand } from '../lib/commands/csat-override.js';
60
+ import { moshkyWriteAccessCommand } from '../lib/commands/moshky-write-access.js';
61
+ import { translationCommand } from '../lib/commands/translation.js';
62
+ import { chatIntelligenceTopicsCommand } from '../lib/commands/chat-intelligence-topics.js';
63
+ import { focusCommand } from '../lib/commands/focus.js';
64
+ import { automationDraftCommand } from '../lib/commands/automation-draft.js';
65
+ import { serviceStateCommand } from '../lib/commands/service-state.js';
66
+ import { magentoCommand } from '../lib/commands/magento.js';
67
+ import { sapCommand } from '../lib/commands/sap.js';
68
+ import { salesforceCommand } from '../lib/commands/salesforce.js';
69
+ import { actionsCommand } from '../lib/commands/actions.js';
70
+ import { mondayCommand } from '../lib/commands/monday.js';
71
+ import { makeCommand } from '../lib/commands/make.js';
72
+ import { notionCommand } from '../lib/commands/notion.js';
73
+ import { apolloCommand } from '../lib/commands/apollo.js';
74
+ import { callrailCommand } from '../lib/commands/callrail.js';
75
+ import { emailCampaignCommand } from '../lib/commands/email-campaign.js';
76
+ import { outboundActivityCommand } from '../lib/commands/outbound-activity.js';
77
+ import { klaviyoMigrationCommand } from '../lib/commands/klaviyo-migration.js';
78
+ import { telephonyCommand } from '../lib/commands/telephony.js';
79
+ import { teamsPhoneCommand } from '../lib/commands/teams-phone.js';
80
+ import { zoomPhoneCommand } from '../lib/commands/zoom-phone.js';
81
+ import { smsCommand } from '../lib/commands/sms.js';
82
+ import { teamsCommand } from '../lib/commands/teams.js';
83
+ import { slackCommand } from '../lib/commands/slack.js';
84
+ import { webflowCommand } from '../lib/commands/webflow.js';
85
+ import { shopifyCommand } from '../lib/commands/shopify.js';
86
+ import { commerceRoutingCommand } from '../lib/commands/commerce-routing.js';
87
+ import { netsuiteCommand } from '../lib/commands/netsuite.js';
88
+ import { woocommerceCommand } from '../lib/commands/woocommerce.js';
89
+ import { squarespaceCommand } from '../lib/commands/squarespace.js';
90
+ import { complianceCommand } from '../lib/commands/compliance.js';
91
+ import { billingContactsCommand } from '../lib/commands/billing-contacts.js';
92
+ import { billingCommand } from '../lib/commands/billing.js';
93
+ import { packageBuilderMyCommand } from '../lib/commands/package-builder-my.js';
94
+ import { widgetContainerCommand } from '../lib/commands/widget-container.js';
95
+ import { inlineWidgetConfigCommand } from '../lib/commands/inline-widget-config.js';
96
+ import { routingCommand } from '../lib/commands/routing.js';
97
+ import { callbackCommand } from '../lib/commands/callback.js';
98
+ import { ticketNumberingCommand } from '../lib/commands/ticket-numbering.js';
99
+ import { cobrowseCommand } from '../lib/commands/cobrowse.js';
100
+ import { callpresenceCommand } from '../lib/commands/callpresence.js';
101
+ import { signupFormCommand } from '../lib/commands/signup-form.js';
102
+ import { authorityCommand } from '../lib/commands/authority.js';
103
+ import { caseCommand } from '../lib/commands/case.js';
104
+ import { dealCommand } from '../lib/commands/deal.js';
105
+ import { salesCommand } from '../lib/commands/sales.js';
106
+ import { ticketCommand } from '../lib/commands/ticket.js';
107
+ import { crmCommand } from '../lib/commands/crm-studio.js';
108
+ import { emailRouteCommand } from '../lib/commands/email-route.js';
109
+ import { emailRouteOverrideCommand } from '../lib/commands/email-route-override.js';
110
+ import { pickupCommand } from '../lib/commands/pickup.js';
111
+ import { siteSaleCommand } from '../lib/commands/site-sale.js';
112
+ import { visitorMonitorCommand } from '../lib/commands/visitor-monitor.js';
113
+ import { visitorLinkCommand } from '../lib/commands/visitor-link.js';
114
+ import { applePayCommand } from '../lib/commands/apple-pay.js';
115
+ import { siteBuilderCommand } from '../lib/commands/site-builder.js';
116
+ import { paymentRecoveryCommand } from '../lib/commands/payment-recovery.js';
117
+ import { recruitingCommand } from '../lib/commands/recruiting.js';
118
+ import { workforceCommand } from '../lib/commands/workforce.js';
119
+ import { surveyCommand } from '../lib/commands/survey.js';
120
+ import { bundleCommand } from '../lib/commands/bundle.js';
121
+ import { chatWindowCommand } from '../lib/commands/chat-window.js';
122
+ import { featureDiscoveryCommand } from '../lib/commands/feature-discovery.js';
123
+ import { usageCommand } from '../lib/commands/usage.js';
124
+ import { campaignsCommand } from '../lib/commands/campaigns.js';
125
+ import { senderDomainHealthCommand } from '../lib/commands/sender-domain-health.js';
126
+ import { contactsCommand } from '../lib/commands/contacts.js';
127
+ import { contactsApiCommand } from '../lib/commands/contacts-rest-extras.js';
128
+ import { contactListCommand } from '../lib/commands/contact-list.js';
129
+ import { contactSegmentCommand } from '../lib/commands/contact-segment.js';
130
+ import { recycleBinCommand, aiUsageCommand, siteInfoCommand } from '../lib/commands/endpoint-parity.js';
131
+ import { aiFollowupsCommand, businessActionCommand, callCommand, conversationCommand, conversionCommand, ivrCommand } from '../lib/commands/ops-groups.js';
132
+ import { crmViewCommand, crmBulkCommand, crmWebformCommand } from '../lib/commands/crm-views-bulk-webforms.js';
133
+ import { crmImportCommand, crmTagCommand, crmDedupeCommand, crmAuditCommand } from '../lib/commands/crm-import-dedupe-audit.js';
134
+ import { crmObjectCommand, crmRelCommand } from '../lib/commands/crm-objects-relationships.js';
135
+ import { crmDocTemplateCommand, crmDealDocCommand } from '../lib/commands/crm-document-templates.js';
136
+ import { crmOrderCommand, crmFulfillmentCommand, crmReturnCommand } from '../lib/commands/crm-orders-returns.js';
137
+ import { crmApprovalCommand, crmScoreCommand } from '../lib/commands/crm-approvals-scoring.js';
138
+ import { featureDiscoveryGroup } from '../lib/commands/feature-discovery.js';
139
+ import { billingInsightsGroup } from '../lib/commands/billing-insights.js';
140
+ import { supportTicketsCommand } from '../lib/commands/support-tickets.js';
141
+ import { aiAckGroup } from '../lib/commands/ai-ack.js';
142
+ import { afterHoursSupportCommand } from '../lib/commands/after-hours-support.js';
143
+ import { automationAddonCommand } from '../lib/commands/automation-addon.js';
144
+ import { startUpdateCheck } from '../lib/update-check.js';
145
+ import { printBanner, printBannerIfFirstRun } from '../lib/banner.js';
146
+ import { createRequire } from 'module';
147
+
148
+ // Banner on first run, and on the "front door" commands (bare `velaro`, help, login, update).
149
+ // Never on data commands or --version: their output is parsed by scripts.
150
+ const cliVersion = createRequire(import.meta.url)('../package.json').version;
151
+ const firstArg = process.argv[2];
152
+ const frontDoor = !firstArg || ['help', '--help', '-h', 'login', 'update'].includes(firstArg);
153
+ if (!printBannerIfFirstRun() && frontDoor) printBanner({ version: cliVersion });
154
+
155
+ const printUpdateNoticeIfStale = startUpdateCheck();
156
+
157
+ // Staff commands live in cli/staff, which is NOT in the "files" allowlist of package.json, so the public npm install does not have it.
158
+ // A dev checkout or a staff install does; load it only when present (scripts/validate-cli-no-staff-commands.js guards the split).
159
+ let registerStaffCommands = null;
160
+ try {
161
+ ({ registerStaffCommands } = await import('../staff/register.js'));
162
+ } catch (e) {
163
+ if (e?.code !== 'ERR_MODULE_NOT_FOUND' || !/staff[\\/]register\.js/.test(String(e.message))) throw e;
164
+ }
165
+ const baseYargs = yargs(hideBin(process.argv));
166
+
167
+ await (registerStaffCommands ? registerStaffCommands(baseYargs) : baseYargs)
168
+ .scriptName('velaro')
169
+ .usage('$0 <command> [options]')
170
+ .command(loginCommand)
171
+ .command(logoutCommand)
172
+ .command(envCommand)
173
+ .command(whoamiCommand)
174
+ .command(kbCommand)
175
+ .command(botCommand)
176
+ .command(indexCommand)
177
+ .command(ingestCommand)
178
+ .command(indexMoveCommand)
179
+ .command(safetyCommand)
180
+ .command(knowledgeAdvisorCommand)
181
+ .command(productMatchCommand)
182
+ .command(partFinderCommand)
183
+ .command(knowledgeCommand)
184
+ .command(productCommand)
185
+ .command(mcpKeyCommand)
186
+ .command(apiUsageCommand)
187
+ .command(conversationActionCommand)
188
+ .command(checkCommand)
189
+ .command(siteCommand)
190
+ .command(statusCommand)
191
+ .command(ruleCommand)
192
+ .command(teamCommand)
193
+ .command(dynamicsCommand)
194
+ .command(workflowCommand)
195
+ .command(aiConfigCommand)
196
+ .command(updateCommand)
197
+ .command(agentCommand)
198
+ .command(linkedIdentityCommand)
199
+ .command(notificationsCommand)
200
+ .command(signatureCommand)
201
+ .command(articleCommand)
202
+ .command(imageCommand)
203
+ .command(copilotStudioCommand)
204
+ .command(applePayPresetCommand)
205
+ .command(integrationCommand)
206
+ .command(appointmentsCommand)
207
+ .command(schedulerCommand)
208
+ .command(publicApiCommand)
209
+ .command(bookingDefaultsCommand)
210
+ .command(bookingCommand)
211
+ .command(reportCommand)
212
+ .command(conversationEfficiencyCommand)
213
+ .command(executiveInsightsCommand)
214
+ .command(experienceImpactCommand)
215
+ .command(commerceSafetyCommand)
216
+ .command(enterpriseReportsCommand)
217
+ .command(reportSubscriptionCommand)
218
+ .command(reportBackfillCommand)
219
+ .command(reportExplainCommand)
220
+ .command(skillRoutingCommand)
221
+ .command(keywordIntelligenceCommand)
222
+ .command(aiFieldExtractionCommand)
223
+ .command(sentimentCommand)
224
+ .command(qualityCommand)
225
+ .command(chatIntelligenceThemesCommand)
226
+ .command(cannedLearningCommand)
227
+ .command(chatIntelligenceTopicsCommand)
228
+ .command(csatOverrideUnapproveCommand)
229
+ .command(moshkyWriteAccessCommand)
230
+ .command(translationCommand)
231
+ .command(focusCommand)
232
+ .command(automationDraftCommand)
233
+ .command(serviceStateCommand)
234
+ .command(magentoCommand)
235
+ .command(sapCommand)
236
+ .command(salesforceCommand)
237
+ .command(actionsCommand)
238
+ .command(mondayCommand)
239
+ .command(makeCommand)
240
+ .command(notionCommand)
241
+ .command(apolloCommand)
242
+ .command(callrailCommand)
243
+ .command(emailCampaignCommand)
244
+ .command(outboundActivityCommand)
245
+ .command(klaviyoMigrationCommand)
246
+ .command(telephonyCommand)
247
+ .command(teamsPhoneCommand)
248
+ .command(zoomPhoneCommand)
249
+ .command(smsCommand)
250
+ .command(teamsCommand)
251
+ .command(slackCommand)
252
+ .command(webflowCommand)
253
+ .command(shopifyCommand)
254
+ .command(commerceRoutingCommand)
255
+ .command(netsuiteCommand)
256
+ .command(woocommerceCommand)
257
+ .command(squarespaceCommand)
258
+ .command(complianceCommand)
259
+ .command(billingContactsCommand)
260
+ .command(registerStaffCommands ? { command: 'billing-public-in-staff-group', describe: false, builder: (y) => y, handler: () => {} } : billingCommand)
261
+ .command(widgetContainerCommand)
262
+ .command(inlineWidgetConfigCommand)
263
+ .command(routingCommand)
264
+ .command(callbackCommand)
265
+ .command(ticketNumberingCommand)
266
+ // The staff build already registers a cobrowse group that includes seats/seat set; only the public build adds this one.
267
+ .command(registerStaffCommands ? { command: 'cobrowse-seats-in-staff-group', describe: false, builder: (y) => y, handler: () => {} } : cobrowseCommand)
268
+ .command(registerStaffCommands ? { command: 'package-builder-my-in-staff-group', describe: false, builder: (y) => y, handler: () => {} } : packageBuilderMyCommand)
269
+ .command(callpresenceCommand)
270
+ .command(signupFormCommand)
271
+ .command(authorityCommand)
272
+ .command(caseCommand)
273
+ .command(dealCommand)
274
+ .command(salesCommand)
275
+ .command(ticketCommand)
276
+ .command(crmCommand)
277
+ .command(emailRouteCommand)
278
+ .command(emailRouteOverrideCommand)
279
+ .command(pickupCommand)
280
+ .command(siteSaleCommand)
281
+ .command(visitorMonitorCommand)
282
+ .command(visitorLinkCommand)
283
+ .command(applePayCommand)
284
+ .command(siteBuilderCommand)
285
+ .command(paymentRecoveryCommand)
286
+ .command(recruitingCommand)
287
+ .command(workforceCommand)
288
+ .command(surveyCommand)
289
+ .command(bundleCommand)
290
+ .command(chatWindowCommand)
291
+ .command(featureDiscoveryGroup)
292
+ .command(billingInsightsGroup)
293
+ .command(supportTicketsCommand)
294
+ .command(aiAckGroup)
295
+ .command(afterHoursSupportCommand)
296
+ .command(automationAddonCommand)
297
+ .command(usageCommand)
298
+ .command(campaignsCommand)
299
+ .command(senderDomainHealthCommand)
300
+ .command(contactsCommand)
301
+ .command(contactsApiCommand)
302
+ .command(contactListCommand)
303
+ .command(contactSegmentCommand)
304
+ .command(recycleBinCommand)
305
+ .command(aiUsageCommand)
306
+ .command(siteInfoCommand)
307
+ .command(aiFollowupsCommand)
308
+ .command(businessActionCommand)
309
+ .command(callCommand)
310
+ .command(conversationCommand)
311
+ .command(conversionCommand)
312
+ .command(ivrCommand)
313
+ .command(crmViewCommand)
314
+ .command(crmBulkCommand)
315
+ .command(crmWebformCommand)
316
+ .command(crmImportCommand)
317
+ .command(crmTagCommand)
318
+ .command(crmDedupeCommand)
319
+ .command(crmAuditCommand)
320
+ .command(crmObjectCommand)
321
+ .command(crmRelCommand)
322
+ .command(crmDocTemplateCommand)
323
+ .command(crmDealDocCommand)
324
+ .command(crmOrderCommand)
325
+ .command(crmFulfillmentCommand)
326
+ .command(crmReturnCommand)
327
+ .command(crmApprovalCommand)
328
+ .command(crmScoreCommand)
329
+ .demandCommand(1, 'Specify a command. Run "velaro --help" for options.')
330
+ .strict()
331
+ .fail((msg, err, y) => {
332
+ if (err) throw err;
333
+ y.showHelp('error');
334
+ console.error(`\n${msg}`);
335
+ if (!registerStaffCommands && /unknown (command|argument)/i.test(String(msg))) {
336
+ console.error('If that is an internal command, it is only in the staff build (a dev checkout or staff install), not the public npm package.');
337
+ }
338
+ process.exit(1);
339
+ })
340
+ .help()
341
+ .parseAsync();
342
+
343
+ await printUpdateNoticeIfStale();