@velaro/cli 1.4.178 → 1.4.179
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 +2 -0
- package/lib/commands/ai-ack.js +37 -0
- package/package.json +1 -1
package/bin/velaro.js
CHANGED
|
@@ -132,6 +132,7 @@ import { crmViewCommand, crmBulkCommand, crmWebformCommand } from '../lib/comman
|
|
|
132
132
|
import { featureDiscoveryGroup } from '../lib/commands/feature-discovery.js';
|
|
133
133
|
import { billingInsightsGroup } from '../lib/commands/billing-insights.js';
|
|
134
134
|
import { supportTicketsCommand } from '../lib/commands/support-tickets.js';
|
|
135
|
+
import { aiAckGroup } from '../lib/commands/ai-ack.js';
|
|
135
136
|
import { afterHoursSupportCommand } from '../lib/commands/after-hours-support.js';
|
|
136
137
|
import { startUpdateCheck } from '../lib/update-check.js';
|
|
137
138
|
import { printBanner, printBannerIfFirstRun } from '../lib/banner.js';
|
|
@@ -283,6 +284,7 @@ await (registerStaffCommands ? registerStaffCommands(baseYargs) : baseYargs)
|
|
|
283
284
|
.command(featureDiscoveryGroup)
|
|
284
285
|
.command(billingInsightsGroup)
|
|
285
286
|
.command(supportTicketsCommand)
|
|
287
|
+
.command(aiAckGroup)
|
|
286
288
|
.command(afterHoursSupportCommand)
|
|
287
289
|
.command(usageCommand)
|
|
288
290
|
.command(campaignsCommand)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// velaro ai-ack: the AI Features Acknowledgment (read-only).
|
|
2
|
+
// Site scoping is server-side: calls never pass a siteId. Acceptance is done by an administrator in the app.
|
|
3
|
+
import { request } from '../api.js';
|
|
4
|
+
|
|
5
|
+
async function status() {
|
|
6
|
+
const r = await request('GET', 'FeatureAcknowledgments/status?key=AiFeatures');
|
|
7
|
+
console.log(`\nAI Features Acknowledgment, version ${r.textVersion}`);
|
|
8
|
+
if (r.accepted && r.acceptedRecord) {
|
|
9
|
+
const a = r.acceptedRecord;
|
|
10
|
+
console.log(` Accepted by ${a.signerName}, ${a.signerTitle} (${a.signerEmail}) on ${a.acceptedAt}`);
|
|
11
|
+
} else {
|
|
12
|
+
console.log(' Not accepted yet. An administrator accepts it in the app the first time they turn on an AI feature.');
|
|
13
|
+
if (r.acceptedEarlierVersion) console.log(' An earlier version was accepted; the current version needs a new acceptance.');
|
|
14
|
+
}
|
|
15
|
+
console.log(` Full text: ${r.fullTextUrl}\n`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function list() {
|
|
19
|
+
const rows = await request('GET', 'FeatureAcknowledgments');
|
|
20
|
+
if (!Array.isArray(rows) || rows.length === 0) {
|
|
21
|
+
console.log('No acknowledgments accepted yet.');
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
for (const a of rows) {
|
|
25
|
+
console.log(` v${a.textVersion} ${a.acceptedAt} ${a.signerName}, ${a.signerTitle} <${a.signerEmail}> (${a.signerRole}) trigger: ${a.triggerFeature ?? '-'}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function aiAckCommand(yargs) {
|
|
30
|
+
return yargs
|
|
31
|
+
.command('status', 'Show whether the current AI Features Acknowledgment has been accepted', () => {}, () => status())
|
|
32
|
+
.command('list', 'List every acknowledgment this site accepted', () => {}, () => list())
|
|
33
|
+
.demandCommand(1, 'Specify a subcommand: status | list');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Registered group object (the CLI/MCP parity validator reads `command:` from a named const).
|
|
37
|
+
export const aiAckGroup = { command: 'ai-ack', desc: 'AI Features Acknowledgment status and history (read-only)', builder: aiAckCommand, handler: () => {} };
|
package/package.json
CHANGED