Skip to content

Commit 3f49a02

Browse files
committed
Merge branch 'main' into renovate-major-external-major
2 parents c450e85 + 92d8c92 commit 3f49a02

File tree

13 files changed

+521
-16
lines changed

13 files changed

+521
-16
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# [1.212.0](https://github.com/adobe/spacecat-api-service/compare/v1.211.0...v1.212.0) (2025-10-22)
2+
3+
4+
### Features
5+
6+
* add slack command to retrieve stats for llmo config ([#1385](https://github.com/adobe/spacecat-api-service/issues/1385)) ([3c994a8](https://github.com/adobe/spacecat-api-service/commit/3c994a82c40d3de143a6e8c343dee8e0670047be))
7+
8+
# [1.211.0](https://github.com/adobe/spacecat-api-service/compare/v1.210.2...v1.211.0) (2025-10-22)
9+
10+
11+
### Features
12+
13+
* add FAQs audit ([#1382](https://github.com/adobe/spacecat-api-service/issues/1382)) ([9492b4b](https://github.com/adobe/spacecat-api-service/commit/9492b4b21855974f402a73bfc6bcab7465ce54c0))
14+
15+
## [1.210.2](https://github.com/adobe/spacecat-api-service/compare/v1.210.1...v1.210.2) (2025-10-21)
16+
17+
18+
### Bug Fixes
19+
20+
* **deps:** update dependency @adobe/spacecat-shared-utils to v1.60.0 ([#1381](https://github.com/adobe/spacecat-api-service/issues/1381)) ([4099777](https://github.com/adobe/spacecat-api-service/commit/409977769ab0000de0cd28b8ecba045d2e69fa12))
21+
122
## [1.210.1](https://github.com/adobe/spacecat-api-service/compare/v1.210.0...v1.210.1) (2025-10-20)
223

324

docs/openapi/schemas.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ AuditType:
6161
- 'llm-error-pages'
6262
- 'prerender'
6363
- 'summarization'
64+
- 'faqs'
6465
example: 'cwv'
6566
URL:
6667
type: string
@@ -993,6 +994,29 @@ AuditResult:
993994
description: A list of top pages
994995
items:
995996
type: string
997+
- type: object
998+
description: The result of FAQs audit
999+
properties:
1000+
success:
1001+
type: boolean
1002+
description: Whether the audit was successful
1003+
promptsByUrl:
1004+
type: array
1005+
description: A list of prompts grouped by URL and topic
1006+
items:
1007+
type: object
1008+
properties:
1009+
url:
1010+
type: string
1011+
description: The URL of the page
1012+
topic:
1013+
type: string
1014+
description: The topic of the prompts
1015+
prompts:
1016+
type: array
1017+
description: A list of prompts for this URL and topic
1018+
items:
1019+
type: string
9961020
AuditList:
9971021
type: array
9981022
items:

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/spacecat-api-service",
3-
"version": "1.210.1",
3+
"version": "1.212.0",
44
"description": "SpaceCat API Service",
55
"main": "src/index.js",
66
"type": "module",
@@ -74,7 +74,7 @@
7474
"@adobe/spacecat-helix-content-sdk": "1.4.24",
7575
"@adobe/spacecat-shared-athena-client": "1.3.5",
7676
"@adobe/spacecat-shared-brand-client": "1.1.24",
77-
"@adobe/spacecat-shared-data-access": "2.73.1",
77+
"@adobe/spacecat-shared-data-access": "2.74.0",
7878
"@adobe/spacecat-shared-gpt-client": "1.6.5",
7979
"@adobe/spacecat-shared-http-utils": "1.17.7",
8080
"@adobe/spacecat-shared-ims-client": "1.8.13",

src/controllers/llmo/llmo-onboarding.js

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ const LLMO_PRODUCT_CODE = EntitlementModel.PRODUCT_CODES.LLMO;
2222
const LLMO_TIER = EntitlementModel.TIERS.FREE_TRIAL;
2323
const SHAREPOINT_URL = 'https://adobe.sharepoint.com/:x:/r/sites/HelixProjects/Shared%20Documents/sites/elmo-ui-data';
2424

25+
// These audits don't depend on any additonal data being configured
26+
export const BASIC_AUDITS = [
27+
'headings',
28+
'llm-blocked',
29+
'canonical',
30+
'hreflang',
31+
'summarization',
32+
'prerender',
33+
];
34+
2535
export const ASO_DEMO_ORG = '66331367-70e6-4a49-8445-4f6d9c265af9';
2636

2737
export const ASO_CRITICAL_SITES = [
@@ -682,6 +692,37 @@ export async function enableAudits(site, context, audits = []) {
682692
await configuration.save();
683693
}
684694

695+
export async function enableImports(siteConfig, imports = []) {
696+
const existingImports = siteConfig.getImports();
697+
698+
imports.forEach(({ type, options }) => {
699+
// Check if import is already enabled
700+
const isEnabled = existingImports?.find(
701+
(imp) => imp.type === type && imp.enabled,
702+
);
703+
704+
if (!isEnabled) {
705+
siteConfig.enableImport(type, options);
706+
}
707+
});
708+
}
709+
710+
export async function triggerAudits(audits, context, site) {
711+
const { sqs, dataAccess, log } = context;
712+
const { Configuration } = dataAccess;
713+
const configuration = await Configuration.findLatest();
714+
715+
await Promise.allSettled(
716+
audits.map(async (audit) => {
717+
log.info(`Triggering ${audit} audit for site: ${site.getId()}`);
718+
await sqs.sendMessage(configuration.getQueues().audits, {
719+
type: audit,
720+
siteId: site.getId(),
721+
});
722+
}),
723+
);
724+
}
725+
685726
/**
686727
* Complete LLMO onboarding process.
687728
* @param {object} params - Onboarding parameters
@@ -722,15 +763,16 @@ export async function performLlmoOnboarding(params, context) {
722763
await updateIndexConfig(dataFolder, context);
723764

724765
// Enable audits
725-
await enableAudits(site, context, [
726-
'headings',
727-
'llm-blocked',
728-
'llmo-customer-analysis',
729-
]);
766+
await enableAudits(site, context, [...BASIC_AUDITS, 'llm-error-pages', 'llmo-customer-analysis']);
730767

731768
// Get current site config
732769
const siteConfig = site.getConfig();
733770

771+
// Enable imports
772+
await enableImports(siteConfig, [
773+
{ type: 'top-pages' },
774+
]);
775+
734776
// Update brand and data directory
735777
siteConfig.updateLlmoBrand(brandName.trim());
736778
siteConfig.updateLlmoDataFolder(dataFolder.trim());
@@ -739,6 +781,9 @@ export async function performLlmoOnboarding(params, context) {
739781
site.setConfig(Config.toDynamoItem(siteConfig));
740782
await site.save();
741783

784+
// Trigger audits
785+
await triggerAudits([...BASIC_AUDITS], context, site);
786+
742787
return {
743788
siteId: site.getId(),
744789
organizationId: organization.getId(),

src/support/slack/actions/onboard-llmo-modal.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import {
1919
copyFilesToSharepoint,
2020
updateIndexConfig,
2121
enableAudits,
22+
BASIC_AUDITS,
23+
triggerAudits,
2224
} from '../../../controllers/llmo/llmo-onboarding.js';
2325

2426
const REFERRAL_TRAFFIC_AUDIT = 'llmo-referral-traffic';
@@ -494,6 +496,9 @@ export async function onboardSite(input, lambdaCtx, slackCtx) {
494496
// enable the llmo-prompts-ahrefs import
495497
siteConfig.enableImport('llmo-prompts-ahrefs', { limit: 25 });
496498

499+
// enable top 200 pages import
500+
siteConfig.enableImport('top-pages');
501+
497502
// update the site config object
498503
site.setConfig(Config.toDynamoItem(siteConfig));
499504

@@ -531,12 +536,12 @@ export async function onboardSite(input, lambdaCtx, slackCtx) {
531536
await configuration.save();
532537

533538
await enableAudits(site, lambdaCtx, [
539+
...BASIC_AUDITS,
534540
AGENTIC_TRAFFIC_REPORT_AUDIT, // enable the cdn-logs-report audits for agentic traffic
535541
'llmo-customer-analysis', // this generates LLMO excel sheets and triggers audits
536542
REFERRAL_TRAFFIC_AUDIT,
537543
'geo-brand-presence',
538-
'headings',
539-
'llm-blocked',
544+
'llm-error-pages',
540545
]);
541546

542547
await site.save();
@@ -553,6 +558,8 @@ export async function onboardSite(input, lambdaCtx, slackCtx) {
553558
};
554559
await sqs.sendMessage(configuration.getQueues().audits, sqsTriggerMessage);
555560

561+
await triggerAudits(BASIC_AUDITS, lambdaCtx, site);
562+
556563
const message = `:white_check_mark: *LLMO onboarding completed successfully!*
557564
558565
:link: *Site:* ${baseURL}

src/support/slack/commands.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import toggleSiteImport from './commands/toggle-site-import.js';
3333
import runTrafficAnalysisBackfill from './commands/run-traffic-analysis-backfill.js';
3434
import backfillLlmo from './commands/backfill-llmo.js';
3535
import getPromptUsage from './commands/get-prompt-usage.js';
36+
import getLlmoConfigSummary from './commands/get-llmo-config-summary.js';
3637

3738
/**
3839
* Returns all commands.
@@ -64,4 +65,5 @@ export default (context) => [
6465
toggleSiteImport(context),
6566
backfillLlmo(context),
6667
getPromptUsage(context),
68+
getLlmoConfigSummary(context),
6769
];

0 commit comments

Comments
 (0)